/* =============================================================================
   DASHBOARD — the shared layout of the signed-in account pages (Profile, My
   Evaluations): a sidebar, a greeting header, KPI tiles with sparklines,
   chart cards, a table card and one solid accent "highlight" card.
   Built only on the PRISM theme tokens (--pt-*, css/shared/theme.css and
   theme-light.css), so it follows light / dark mode; sizes from the one type
   scale (--t-*). Charts are drawn by js/shared/dash-charts.js.
============================================================================= */
.prism-theme {
  --dash-nav-h: 64px;
  --dash-side-w: 232px;
  --dash-rail-w: 300px;
  --dash-radius: 16px;
  --dash-gap: 18px;
  --dash-good: var(--pt-good);
  --dash-mid: var(--pt-warn);
  --dash-low: var(--pt-bad);
  --dash-accent: var(--pt-accent);
  --dash-soft: color-mix(in srgb, var(--pt-accent) 12%, transparent);
  --dash-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 12px 32px -20px rgba(0, 0, 0, 0.5);
}
html.prism-theme[data-theme="light"] {
  --dash-good: #16a34a;
  --dash-mid: #d97706;
  --dash-low: #dc2626;
  --dash-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px -20px rgba(15, 23, 42, 0.25);
}

/* ─── Shell ────────────────────────────────────────────────────────────────── */
.dash {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--dash-side-w) minmax(0, 1fr);
  min-height: calc(100vh - var(--dash-nav-h));
  font-family: var(--pt-font);
  color: var(--pt-text);
}
.dash--rail { grid-template-columns: var(--dash-side-w) minmax(0, 1fr) var(--dash-rail-w); }
.dash-main { min-width: 0; padding: 28px 32px 56px; }
.dash-main > * + * { margin-top: var(--dash-gap); }

/* ─── Sidebar ──────────────────────────────────────────────────────────────── */
.dash-side {
  position: sticky;
  top: var(--dash-nav-h);
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: calc(100vh - var(--dash-nav-h));
  padding: 24px 14px 18px;
  border-right: 1px solid var(--pt-border);
  background: var(--pt-surface);
  overflow-y: auto;
}
.dash-nav { display: grid; gap: 2px; }
.dash-nav-h {
  padding: 0 12px 8px;
  font-size: var(--t-caption); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--pt-text-3);
}
.dash-nav-link {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 10px 12px;
  border: 0; border-radius: 10px; background: none;
  font: inherit; font-size: var(--t-body); font-weight: 500; text-align: left;
  color: var(--pt-text-2); text-decoration: none; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.dash-nav-link svg { flex: none; opacity: .85; }
.dash-nav-link:hover { background: var(--pt-surface-2); color: var(--pt-text); }
.dash-nav-link.is-active {
  background: var(--dash-soft);
  color: var(--pt-accent);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--pt-accent);
}
.dash-nav-link:focus-visible { outline: 2px solid var(--pt-accent); outline-offset: 1px; }
.dash-side-foot { margin-top: auto; display: grid; gap: 2px; padding-top: 12px; border-top: 1px solid var(--pt-border); }

/* Upgrade card (free plan only) — the one solid accent card in the sidebar */
.dash-promo {
  position: relative;
  display: grid; gap: 4px;
  padding: 16px;
  border-radius: 14px;
  background: var(--pt-primary);
  color: #ffffff;
  text-decoration: none;
  overflow: hidden;
}
.dash-promo::after {
  content: ''; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}
.dash-promo[hidden] { display: none; }
.dash-promo-icon {
  display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 6px;
  border-radius: 10px; background: rgba(255, 255, 255, 0.18);
}
.dash-promo strong { font-size: var(--t-heading); }
.dash-promo span { font-size: var(--t-small); line-height: 1.45; color: rgba(255, 255, 255, 0.85); }
.dash-promo .dash-promo-cta {
  justify-self: start; margin-top: 8px; padding: 6px 12px; border-radius: 8px;
  background: #ffffff; color: var(--pt-primary-hover); font-size: var(--t-small); font-weight: 600;
}

/* ─── Header ───────────────────────────────────────────────────────────────── */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.dash-eyebrow { margin: 0 0 6px; font-size: var(--t-small); font-weight: 600; color: var(--pt-accent); }
.dash-title { margin: 0; font-size: var(--t-display); font-weight: 700; line-height: 1.2; color: var(--pt-text); }
.dash-sub { margin: 6px 0 0; font-size: var(--t-body); color: var(--pt-text-2); }
.dash-head-actions { display: flex; gap: 10px; }
.dash-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 10px;
  border: 1px solid var(--pt-border-strong); background: var(--pt-surface);
  font: inherit; font-size: var(--t-small); font-weight: 600; color: var(--pt-text);
  text-decoration: none; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.dash-btn:hover { border-color: var(--pt-accent); transform: translateY(-1px); }
.dash-btn--primary { background: var(--pt-primary); border-color: var(--pt-primary); color: #ffffff; }
.dash-btn--primary:hover { background: var(--pt-primary-hover); border-color: var(--pt-primary-hover); }

/* ─── Cards ────────────────────────────────────────────────────────────────── */
.dash-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--pt-border);
  border-radius: var(--dash-radius);
  background: var(--pt-surface);
  box-shadow: var(--dash-shadow);
}
.dash-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.dash-card-title { margin: 0; font-size: var(--t-heading); font-weight: 700; color: var(--pt-text); }
.dash-card-meta { font-size: var(--t-small); color: var(--pt-text-3); }
.dash-link { font-size: var(--t-small); font-weight: 600; color: var(--pt-accent); text-decoration: none; }
.dash-link:hover { text-decoration: underline; }
.dash-grid { display: grid; gap: var(--dash-gap); }
.dash-grid--2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.dash-grid--1-1 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* Highlight card: solid accent surface, white type (ref. "Continue learning") */
.dash-card--accent {
  position: relative;
  overflow: hidden;
  border-color: transparent;
  background: var(--pt-primary);
  color: #ffffff;
}
.dash-card--accent::before {
  content: ''; position: absolute; right: -60px; bottom: -80px; width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.10);
  pointer-events: none;
}
.dash-card--accent::after {
  content: ''; position: absolute; right: 40px; top: -70px; width: 140px; height: 140px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  pointer-events: none;
}
.dash-card--accent > * { position: relative; z-index: 1; }
.dash-card--accent .dash-card-title { color: #ffffff; }
.dash-card--accent .dash-link { color: #ffffff; opacity: .9; }

/* ─── KPI tiles ────────────────────────────────────────────────────────────── */
.dash-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 14px; }
.dash-kpi {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "icon label" "val val" "spark spark";
  align-items: center;
  column-gap: 10px;
  min-width: 0;
  padding: 16px 16px 12px;
  border: 1px solid var(--pt-border);
  border-radius: var(--dash-radius);
  background: var(--pt-surface);
  box-shadow: var(--dash-shadow);
  color: inherit;
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease;
}
a.dash-kpi:hover { transform: translateY(-2px); border-color: var(--pt-border-strong); }
.dash-kpi-icon {
  grid-area: icon;
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px;
  background: color-mix(in srgb, var(--tone, var(--pt-accent)) 14%, transparent);
  color: var(--tone, var(--pt-accent));
}
.dash-kpi-label { grid-area: label; font-size: var(--t-small); font-weight: 500; color: var(--pt-text-2); }
.dash-kpi-val {
  grid-area: val; margin-top: 12px;
  font-size: var(--t-metric); font-weight: 700; line-height: 1.1; color: var(--pt-text);
  font-variant-numeric: tabular-nums;
}
.dash-kpi-val small { margin-left: 2px; font-size: var(--t-small); font-weight: 500; color: var(--pt-text-3); }
.dash-kpi-foot { grid-area: spark; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; min-height: 28px; margin-top: 6px; }
.dash-kpi-note { font-size: var(--t-caption); color: var(--pt-text-3); white-space: nowrap; }
.dash-kpi .dash-spark { width: min(96px, 100%); height: 28px; margin-left: auto; color: var(--tone, var(--pt-accent)); }
.dash-kpi-note { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tone-orange { --tone: #fb923c; }
.tone-indigo { --tone: #818cf8; }
.tone-sky    { --tone: var(--pt-accent); }
.tone-amber  { --tone: #fbbf24; }
.tone-green  { --tone: #34d399; }
html.prism-theme[data-theme="light"] .tone-orange { --tone: #ea580c; }
html.prism-theme[data-theme="light"] .tone-indigo { --tone: #4f46e5; }
html.prism-theme[data-theme="light"] .tone-amber  { --tone: #d97706; }
html.prism-theme[data-theme="light"] .tone-green  { --tone: #16a34a; }

/* Week strip inside a KPI tile */
.dash-week { display: flex; gap: 3px; }
.dash-week i { width: 7px; height: 18px; border-radius: 3px; background: var(--pt-surface-2); border: 1px solid var(--pt-border); }
.dash-week i.on { background: var(--tone, var(--pt-accent)); border-color: transparent; }

/* ─── Sparkline ────────────────────────────────────────────────────────────── */
.dash-spark { overflow: visible; }
.dash-spark-line { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke;
  stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1s ease .2s; }
.dash-spark-area { fill: currentColor; opacity: 0; transition: opacity .6s ease .7s; }
.dash-spark-dot { fill: currentColor; opacity: 0; transition: opacity .3s ease 1.1s; }
.dash-in .dash-spark-line { stroke-dashoffset: 0; }
.dash-in .dash-spark-area { opacity: .12; }
.dash-in .dash-spark-dot { opacity: 1; }

/* ─── Column chart ─────────────────────────────────────────────────────────── */
.dash-cols { position: relative; height: 100%; min-height: 220px; padding: 0 0 26px 30px; }
.dash-card--chart { display: flex; flex-direction: column; }
.dash-card--chart > .dash-chart { flex: 1; min-height: 220px; }
.dash-cols-grid { position: absolute; inset: 0 0 26px 30px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.dash-cols-grid span { position: relative; border-top: 1px dashed var(--pt-border); }
.dash-cols-grid i { position: absolute; left: -30px; top: -8px; width: 24px; text-align: right; font-style: normal; font-size: var(--t-micro); color: var(--pt-text-3); }
.dash-cols-line { position: absolute; left: 30px; right: 0; margin-bottom: 26px; border-top: 2px dashed var(--pt-text-3); opacity: 0; transition: opacity .4s ease .6s; pointer-events: none; }
.dash-cols-line span {
  position: absolute; left: -32px; top: -9px; width: 28px; text-align: right;
  font-size: var(--t-micro); font-weight: 700; color: var(--pt-text); white-space: nowrap;
}
.dash-in .dash-cols-line { opacity: .7; }
.dash-cols-plot { position: relative; height: 100%; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 8px; align-items: end; }
.dash-col { position: relative; height: 100%; display: flex; justify-content: center; outline: none; cursor: default; }
.dash-col-bar {
  align-self: flex-end;
  width: min(22px, 70%);
  height: 0;
  border-radius: 6px 6px 2px 2px;
  transition: height .7s cubic-bezier(.2, .7, .2, 1), filter .15s ease;
  transition-delay: calc(var(--i, 0) * 50ms + 100ms);
}
.dash-in .dash-col-bar { height: var(--h); }
.dash-col:hover .dash-col-bar, .dash-col:focus-visible .dash-col-bar { filter: brightness(1.15); box-shadow: 0 0 0 3px var(--dash-soft); }
.dash-col-bar.is-good { background: var(--dash-good); }
.dash-col-bar.is-mid { background: var(--dash-mid); }
.dash-col-bar.is-low { background: var(--dash-low); }
.dash-col-bar.is-accent { background: var(--pt-accent); }
.dash-col-lbl {
  position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%);
  font-size: var(--t-micro); color: var(--pt-text-3); white-space: nowrap;
}
.dash-legend { display: flex; flex-wrap: wrap; gap: 14px; }
.dash-key { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-caption); color: var(--pt-text-2); }
.dash-key i { width: 10px; height: 10px; border-radius: 3px; }
.dash-key i.is-good { background: var(--dash-good); }
.dash-key i.is-mid { background: var(--dash-mid); }
.dash-key i.is-low { background: var(--dash-low); }
.dash-key i.is-line { width: 14px; height: 0; border-radius: 0; border-top: 2px dashed var(--pt-text-3); }

/* ─── Donut ────────────────────────────────────────────────────────────────── */
.dash-donut { position: relative; width: 148px; height: 148px; flex: none; }
.dash-donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dash-donut circle { fill: none; stroke-width: 10; }
.dash-donut-track { stroke: var(--pt-surface-2); }
.dash-donut-val {
  stroke: var(--pt-accent); stroke-linecap: round;
  stroke-dasharray: var(--c); stroke-dashoffset: var(--c);
  transition: stroke-dashoffset 1.1s cubic-bezier(.2, .7, .2, 1) .15s;
}
.dash-in .dash-donut-val { stroke-dashoffset: var(--off); }
.dash-donut-mid { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.dash-donut-mid strong { font-size: var(--t-metric); font-weight: 700; color: var(--pt-text); font-variant-numeric: tabular-nums; }
.dash-donut-mid span { font-size: var(--t-caption); color: var(--pt-text-3); }

/* ─── Progress bars (phases, continue card) ───────────────────────────────── */
.dash-bar { height: 8px; border-radius: 999px; background: var(--pt-surface-2); overflow: hidden; }
.dash-bar > i { display: block; width: 0; height: 100%; border-radius: 999px; background: var(--pt-accent); transition: width .9s cubic-bezier(.2, .7, .2, 1); }
.dash-card--accent .dash-bar { background: rgba(255, 255, 255, 0.22); }
.dash-card--accent .dash-bar > i { background: #ffffff; }

/* ─── Table card ───────────────────────────────────────────────────────────── */
.dash-table { width: 100%; border-collapse: collapse; }
.dash-table th {
  padding: 0 12px 10px; text-align: left;
  font-size: var(--t-caption); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--pt-text-3);
  border-bottom: 1px solid var(--pt-border);
}
.dash-table td { padding: 12px; font-size: var(--t-body); color: var(--pt-text-2); border-bottom: 1px solid var(--pt-border); }
.dash-table tr:last-child td { border-bottom: 0; }
.dash-table tbody tr { transition: background .15s ease; }
.dash-table tbody tr:hover { background: var(--pt-surface-2); }
.dash-table .is-name { color: var(--pt-text); font-weight: 600; }
.dash-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: var(--t-caption); font-weight: 600;
  background: color-mix(in srgb, var(--tone, var(--pt-accent)) 14%, transparent);
  color: var(--tone, var(--pt-accent));
}
.dash-pill.is-good { --tone: var(--dash-good); }
.dash-pill.is-mid { --tone: var(--dash-mid); }
.dash-pill.is-low { --tone: var(--dash-low); }
.dash-pill.is-none { --tone: var(--pt-text-3); }
.dash-score {
  display: inline-grid; place-items: center; min-width: 40px; height: 28px; padding: 0 8px; border-radius: 8px;
  font-weight: 700; font-variant-numeric: tabular-nums;
  background: color-mix(in srgb, var(--tone, var(--pt-text-3)) 14%, transparent); color: var(--tone, var(--pt-text-3));
}
.dash-score.is-good { --tone: var(--dash-good); }
.dash-score.is-mid { --tone: var(--dash-mid); }
.dash-score.is-low { --tone: var(--dash-low); }

/* ─── Right rail (profile card) ────────────────────────────────────────────── */
.dash-rail {
  position: sticky; top: var(--dash-nav-h); align-self: start;
  height: calc(100vh - var(--dash-nav-h));
  padding: 28px 20px 24px 0;
  overflow-y: auto;
}

/* ─── Tooltip ──────────────────────────────────────────────────────────────── */
.dash-tip {
  position: absolute; z-index: 10000; pointer-events: none;
  max-width: 280px; padding: 6px 10px; border-radius: 8px;
  background: #0b1220; color: #f1f5f9; border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--pt-font); font-size: var(--t-small); line-height: 1.4;
  box-shadow: 0 10px 28px -10px rgba(0, 0, 0, 0.6);
}

/* ─── Entrance: cards rise in one after another ───────────────────────────── */
@keyframes dash-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.dash-rise > * { animation: dash-rise .5s cubic-bezier(.2, .7, .2, 1) both; }
.dash-rise > *:nth-child(2) { animation-delay: .06s; }
.dash-rise > *:nth-child(3) { animation-delay: .12s; }
.dash-rise > *:nth-child(4) { animation-delay: .18s; }
.dash-rise > *:nth-child(5) { animation-delay: .24s; }
.dash-rise > *:nth-child(6) { animation-delay: .30s; }
.dash-rise > *:nth-child(n+7) { animation-delay: .36s; }

@media (prefers-reduced-motion: reduce) {
  .dash-rise > * { animation: none; }
  .dash-col-bar, .dash-donut-val, .dash-bar > i, .dash-spark-line, .dash-spark-area, .dash-spark-dot, .dash-cols-line { transition: none !important; }
}

/* ─── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1240px) {
  .dash--rail { grid-template-columns: var(--dash-side-w) minmax(0, 1fr); }
  .dash--rail .dash-rail { grid-column: 2; position: static; height: auto; padding: 0 32px 48px; }
}
@media (max-width: 1000px) {
  .dash-grid--2-1, .dash-grid--1-1 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .dash, .dash--rail { grid-template-columns: minmax(0, 1fr); }
  .dash-side {
    position: sticky; top: var(--dash-nav-h); z-index: 5;
    flex-direction: row; align-items: center; height: auto; padding: 8px 16px;
    border-right: 0; border-bottom: 1px solid var(--pt-border);
    overflow-x: auto; scrollbar-width: none;
  }
  .dash-side::-webkit-scrollbar { display: none; }
  .dash-nav { display: flex; gap: 4px; }
  .dash-nav-h, .dash-promo, .dash-side-foot { display: none; }
  .dash-nav-link { width: auto; white-space: nowrap; padding: 8px 12px; }
  .dash-nav-link.is-active { box-shadow: inset 0 -2px 0 var(--pt-accent); }
  .dash-main { padding: 20px 16px 40px; }
  .dash--rail .dash-rail { grid-column: 1; padding: 0 16px 40px; }
  .dash-table th:nth-child(n+4), .dash-table td:nth-child(n+4) { display: none; }
}

/* ─── Page scroll: dashboard pages scroll the document, not an inner box ───── */
.prism-theme body:has(> .dash) { overflow: auto !important; height: auto !important; }

/* ─── Profile ──────────────────────────────────────────────────────────────── */
.dash-skeleton { display: grid; gap: var(--dash-gap); }
.dash-skeleton.prof-hidden { display: none !important; }
.dash-hint { margin: 16px 0 0; font-size: var(--t-small); line-height: 1.5; color: var(--pt-text-3); }
.dash-kpi-bar { width: 96px; height: 6px; }
.dash-kpi-bar > i { background: var(--tone, var(--pt-accent)); }
.dash-in .dash-kpi-bar > i { transition-delay: .2s; }

/* Roadmap card: donut beside the summary, phases below */
.dash-roadmap { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.dash-roadmap .dash-card-meta { max-width: 120px; line-height: 1.45; }
.dash-phases { display: grid; gap: 12px; }
.dash-phase {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-areas: "idx name meta" "idx bar bar";
  align-items: center; column-gap: 10px; row-gap: 6px;
}
.dash-phase-idx {
  grid-area: idx; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px;
  background: var(--pt-surface-2); font-size: var(--t-micro); font-weight: 700; color: var(--pt-text-2);
}
.dash-phase-name { grid-area: name; font-size: var(--t-small); font-weight: 500; color: var(--pt-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-phase-meta { grid-area: meta; font-size: var(--t-caption); color: var(--pt-text-3); font-variant-numeric: tabular-nums; }
.dash-phase .dash-bar { grid-area: bar; height: 6px; }

/* Continue learning (accent card) */
.dash-continue { display: flex; flex-direction: column; }
.dash-continue-phase { font-size: var(--t-caption); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255, 255, 255, 0.8); }
.dash-continue-title { margin: 6px 0 18px; font-size: var(--t-title); font-weight: 700; line-height: 1.3; color: #ffffff; }
.dash-continue-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: auto; padding-top: 16px; font-size: var(--t-small); color: rgba(255, 255, 255, 0.85); }
.dash-continue-cta {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 10px;
  background: #ffffff; color: var(--pt-primary-hover); font-size: var(--t-small); font-weight: 700; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.dash-continue-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.45); }

/* This week: day squares in theme colours */
.prism-theme .dash .prof-week-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.prism-theme .dash .prof-day { display: grid; justify-items: center; gap: 6px; }
.prism-theme .dash .prof-day-dot { width: 100%; max-width: 44px; aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--pt-border); background: var(--pt-surface-2); }
.prism-theme .dash .prof-day.is-active .prof-day-dot { background: var(--pt-accent); border-color: var(--pt-accent); }
.prism-theme .dash .prof-day.is-today .prof-day-dot { box-shadow: 0 0 0 3px var(--dash-soft); }
.prism-theme .dash .prof-day-lbl { font-size: var(--t-caption); color: var(--pt-text-3); }
.prism-theme .dash .prof-day.is-today .prof-day-lbl { color: var(--pt-text); font-weight: 600; }
.prism-theme .dash .prof-empty { font-size: var(--t-body); color: var(--pt-text-3); }

/* Profile card in the right rail */
.dash-profile { display: grid; gap: 18px; }
.dash-profile-top { display: grid; justify-items: center; gap: 8px; text-align: center; }
.prism-theme .dash .prof-avatar {
  width: 80px; height: 80px; margin-bottom: 4px; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
  font-size: var(--t-title); font-weight: 700; background: var(--dash-soft); color: var(--pt-accent);
  box-shadow: 0 0 0 4px var(--pt-surface), 0 0 0 6px color-mix(in srgb, var(--pt-accent) 40%, transparent);
}
.prism-theme .dash .prof-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dash-profile-name { margin: 0; font-size: var(--t-subtitle); font-weight: 700; color: var(--pt-text); overflow-wrap: anywhere; }
.prism-theme .dash .prof-rank-badge {
  --rank: var(--pt-accent);
  display: inline-flex; align-items: center; gap: 8px; padding: 3px 12px 3px 3px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--rank) 50%, transparent);
  background: color-mix(in srgb, var(--rank) 14%, transparent);
  font-size: var(--t-small); font-weight: 600; color: var(--pt-text);
}
.prism-theme .dash .prof-rank-lv {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px;
  background: var(--rank); color: #ffffff; font-size: var(--t-caption); font-weight: 700;
}
.dash-profile-xp { display: grid; gap: 8px; }
.prism-theme .dash .prof-xp-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.prism-theme .dash .prof-xp-total { font-size: var(--t-small); color: var(--pt-text-3); }
.prism-theme .dash .prof-xp-total strong { font-size: var(--t-heading); font-weight: 700; color: var(--pt-text); }
.prism-theme .dash .prof-xp-next { font-size: var(--t-caption); color: var(--pt-text-3); }
.dash-profile-xp .dash-bar > i { width: auto; }
.dash-profile-details { display: grid; gap: 12px; margin: 0; padding: 16px 0 0; border-top: 1px solid var(--pt-border); }
.dash-profile-details > div { display: flex; justify-content: space-between; gap: 12px; min-width: 0; }
.dash-profile-details dt { font-size: var(--t-small); color: var(--pt-text-3); }
.dash-profile-details dd { margin: 0; min-width: 0; font-size: var(--t-small); font-weight: 600; color: var(--pt-text); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-profile-edit { justify-content: center; }
.dash-profile-account { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--pt-border); }
.dash-btn--danger { justify-content: center; color: var(--dash-low); border-color: color-mix(in srgb, var(--dash-low) 40%, transparent); }
.dash-btn--danger:hover { border-color: var(--dash-low); background: color-mix(in srgb, var(--dash-low) 10%, transparent); }

/* ─── My Evaluations ───────────────────────────────────────────────────────── */
.dash-main.evals-dash { padding: 0; }
.dash-main.evals-dash .evals-content { max-width: none; margin: 0; padding: 28px 32px 56px; }
.dash-main.evals-dash #evals-main { display: grid; gap: var(--dash-gap); }
.dash-main.evals-dash .evals-page-header { margin: 0; padding: 0; border: 0; }
.dash-main.evals-dash #evals-main > * { margin-top: 0; margin-bottom: 0; }
.evals-history .evals-toolbar { margin: 0 0 14px; padding: 0; background: none; border: 0; }
.evals-history .evals-table { border: 0; border-radius: 0; background: none; box-shadow: none; }
.evals-history .evals-pagination:empty { display: none; }
.dash-kpi-val small { font-size: var(--t-small); }

.dash-diff { display: grid; gap: 18px; }
.dash-diff-row { display: grid; gap: 8px; }
.dash-diff-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.dash-diff-name { font-size: var(--t-body); font-weight: 600; color: var(--pt-text); }
.dash-diff-val { display: inline-flex; align-items: baseline; gap: 8px; }
.dash-diff-val strong { font-size: var(--t-heading); font-weight: 700; color: var(--pt-text); font-variant-numeric: tabular-nums; }
.dash-diff-n { font-size: var(--t-caption); color: var(--pt-text-3); }
.dash-diff .dash-bar { height: 10px; }
.dash-diff .dash-bar > i { transition-delay: calc(.15s + var(--i, 0) * 90ms); }
.dash-in .dash-diff-row .dash-bar > i, .dash-diff.dash-in .dash-bar > i { width: var(--w); }
.dash-bar > i.is-good { background: var(--dash-good); }
.dash-bar > i.is-mid { background: var(--dash-mid); }
.dash-bar > i.is-low { background: var(--dash-low); }

/* ─── Pricing: plan cards in the dashboard card language ───────────────────── */
.prism-theme body.page-pricing .pr-card {
  border-radius: 20px;
  border-color: var(--pt-border);
  background: var(--pt-surface);
  box-shadow: var(--dash-shadow);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  animation: dash-rise .5s cubic-bezier(.2, .7, .2, 1) both;
}
.prism-theme body.page-pricing .pr-card:nth-child(2) { animation-delay: .07s; }
.prism-theme body.page-pricing .pr-card:nth-child(3) { animation-delay: .14s; }
.prism-theme body.page-pricing .pr-card:nth-child(4) { animation-delay: .21s; }
.prism-theme body.page-pricing .pr-card:hover { transform: translateY(-3px); border-color: var(--pt-border-strong); }
.pr-plan-icon {
  display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 14px; border-radius: 12px;
  background: color-mix(in srgb, var(--tone, var(--pt-accent)) 14%, transparent);
  color: var(--tone, var(--pt-accent));
}
.prism-theme body.page-pricing .pr-feat-icon--check {
  box-sizing: content-box; padding: 3px; border-radius: 50%;
  color: var(--dash-good); background: color-mix(in srgb, var(--dash-good) 14%, transparent);
}

/* Recommended plan = the one solid accent highlight card */
.prism-theme body.page-pricing .pr-card--pe {
  overflow: hidden;
  border-color: transparent;
  background: var(--pt-primary);
  color: #ffffff;
  box-shadow: 0 24px 48px -24px color-mix(in srgb, var(--pt-primary) 70%, transparent);
}
.prism-theme body.page-pricing .pr-card--pe::before {
  content: ''; position: absolute; right: -70px; top: -70px; width: 220px; height: 220px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.10); pointer-events: none;
}
.prism-theme body.page-pricing .pr-card--pe:hover { border-color: transparent; }
.prism-theme body.page-pricing .pr-card--pe .pr-plan-icon { background: rgba(255, 255, 255, 0.18); color: #ffffff; }
.prism-theme body.page-pricing .pr-card--pe .pr-card-tier,
.prism-theme body.page-pricing .pr-card--pe .pr-card-name,
.prism-theme body.page-pricing .pr-card--pe .pr-price-amount,
.prism-theme body.page-pricing .pr-card--pe .pr-price-currency,
.prism-theme body.page-pricing .pr-card--pe .pr-feature-heading,
.prism-theme body.page-pricing .pr-card--pe .pr-feature-list li { color: #ffffff; }
.prism-theme body.page-pricing .pr-card--pe .pr-card-tagline,
.prism-theme body.page-pricing .pr-card--pe .pr-price-period,
.prism-theme body.page-pricing .pr-card--pe .pr-price-total,
.prism-theme body.page-pricing .pr-card--pe .pr-card-renew,
.prism-theme body.page-pricing .pr-card--pe .pr-feature-list li.dim { color: rgba(255, 255, 255, 0.78); }
.prism-theme body.page-pricing .pr-card--pe .pr-divider { border-color: rgba(255, 255, 255, 0.22); }
.prism-theme body.page-pricing .pr-card--pe .pr-feat-icon--check { color: #ffffff; background: rgba(255, 255, 255, 0.2); }
.prism-theme body.page-pricing .pr-card--pe .pr-feat-icon--dim { color: rgba(255, 255, 255, 0.5); }
.prism-theme body.page-pricing .pr-card--pe .pr-card-cta--primary { background: #ffffff; color: var(--pt-primary-hover); }
.prism-theme body.page-pricing .pr-card--pe .pr-card-cta--primary:hover { background: #f1f5f9; }
.prism-theme body.page-pricing .pr-card--pe .pr-card-badge {
  top: 18px; left: auto; right: 18px; transform: none;
  background: #ffffff; color: var(--pt-primary-hover); box-shadow: none;
}

/* Value pillars: icon tiles back on, dashboard cards */
.prism-theme body.page-pricing .pr-pillar { border-radius: 16px; box-shadow: var(--dash-shadow); }
.prism-theme body.page-pricing .pr-pillar-icon {
  display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 14px; border-radius: 12px; border: 0;
  background: var(--dash-soft); color: var(--pt-accent);
}
.prism-theme body.page-pricing .pr-beta-banner-inner { border-radius: 14px; background: var(--dash-soft); border-color: color-mix(in srgb, var(--pt-accent) 30%, transparent); }
.prism-theme body.page-pricing .pr-faq-item { border-radius: 14px; }
@media (prefers-reduced-motion: reduce) { .prism-theme body.page-pricing .pr-card { animation: none; } }
/* theme-light.css forces every pricing card white with !important; the
   recommended plan keeps its solid accent surface in light mode too. */
html.prism-theme[data-theme="light"] body.page-pricing .pr-card--pe {
  background: var(--pt-primary) !important;
  border-color: transparent !important;
  box-shadow: 0 24px 48px -24px rgba(37, 99, 235, 0.55) !important;
}
.prism-theme body.page-pricing .pr-current-indicator {
  align-self: flex-start; width: fit-content; padding: 3px 10px; border-radius: 999px;
  /* Solid green pill so it stands out on any card, blue or white. */
  background: #16a34a; color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.45);
}

/* ─── In-page views (Plan & billing, Help — js/shared/dash-views.js) ───────── */
.dash.is-view .dash-main > :not(.dash-view) { display: none !important; }
.dash.is-view .dash-rail { display: none !important; }
.dash--rail.is-view { grid-template-columns: var(--dash-side-w) minmax(0, 1fr); }
.dash-view[hidden] { display: none !important; }
.dash-view { display: grid; gap: var(--dash-gap); }
.dash-main.evals-dash > .dash-view { padding: 28px 32px 56px; }
.dash-nav-link[data-view] { cursor: pointer; }

/* Current plan (accent card) */
.dash-plan-current { display: flex; flex-direction: column; gap: 10px; }
.dash-plan-current .dash-card-head { margin-bottom: 4px; }
.dash-plan-status { padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.2); font-size: var(--t-caption); font-weight: 700; text-transform: capitalize; }
.dash-plan-name { display: flex; align-items: center; gap: 12px; font-size: var(--t-display); font-weight: 700; line-height: 1.2; }
.dash-plan-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(255, 255, 255, 0.18); }
.dash-plan-blurb { margin: 0; font-size: var(--t-body); color: rgba(255, 255, 255, 0.85); }
.dash-plan-note { margin: auto 0 0; padding-top: 10px; font-size: var(--t-small); color: rgba(255, 255, 255, 0.85); }
.dash-plan-note strong { color: #ffffff; }
.dash-plan-days { margin: auto 0 0; padding-top: 10px; font-size: var(--t-body); color: rgba(255, 255, 255, 0.85); }
.dash-plan-days strong { font-size: var(--t-metric); font-weight: 700; color: #ffffff; margin-right: 4px; }
.dash-plan-days + .dash-plan-note { margin-top: 0; padding-top: 0; }

/* Feature checklist */
.dash-feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.dash-feats li { display: flex; align-items: center; gap: 10px; font-size: var(--t-body); color: var(--pt-text); }
.dash-feats li.is-off { color: var(--pt-text-3); }
.dash-feat-ic { display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 50%;
  background: color-mix(in srgb, var(--dash-good) 14%, transparent); color: var(--dash-good); }
.dash-feats li.is-off .dash-feat-ic { background: var(--pt-surface-2); color: var(--pt-text-3); }

/* Duration segmented control */
.dash-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; border: 1px solid var(--pt-border); background: var(--pt-surface-2); flex-wrap: wrap; }
.dash-seg-btn { padding: 6px 12px; border: 0; border-radius: 8px; background: none; font: inherit; font-size: var(--t-small); font-weight: 600; color: var(--pt-text-2); cursor: pointer; }
.dash-seg-btn em { font-style: normal; color: var(--dash-good); }
.dash-seg-btn.is-on { background: var(--pt-primary); color: #ffffff; }
.dash-seg-btn.is-on em { color: #ffffff; }

/* Plan options */
.dash-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.dash-plans > .dash-plan:only-child { max-width: 460px; }
.dash-table-wrap { overflow-x: auto; }
.dash-pay-table td, .dash-pay-table th { white-space: nowrap; }
.dash-pay-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--t-caption); color: var(--pt-text-3); }
.dash-plan {
  position: relative; display: grid; gap: 8px; align-content: start;
  padding: 18px; border: 1px solid var(--pt-border); border-radius: 14px; background: var(--pt-surface);
  transition: transform .18s ease, border-color .18s ease;
}
.dash-plan:hover { transform: translateY(-2px); border-color: var(--pt-border-strong); }
.dash-plan.is-rec { border-color: color-mix(in srgb, var(--pt-accent) 55%, transparent); box-shadow: 0 0 0 3px var(--dash-soft); }
.dash-plan.is-current { border-color: color-mix(in srgb, var(--dash-good) 55%, transparent); }
.dash-plan .dash-kpi-icon { margin-bottom: 4px; }
.dash-plan-badge { position: absolute; top: 14px; right: 14px; padding: 2px 8px; border-radius: 999px; background: var(--pt-primary); color: #ffffff; font-size: var(--t-micro); font-weight: 700; }
.dash-plan-title { font-size: var(--t-heading); color: var(--pt-text); }
.dash-plan-desc { font-size: var(--t-small); color: var(--pt-text-3); line-height: 1.45; min-height: 38px; }
.dash-plan-price { margin-top: 4px; font-size: var(--t-metric); font-weight: 700; color: var(--pt-text); }
.dash-plan-price small { font-size: var(--t-small); font-weight: 500; color: var(--pt-text-3); }
.dash-plan-total { font-size: var(--t-caption); color: var(--pt-text-3); }
.dash-plan .dash-btn { justify-content: center; margin-top: 8px; }
.dash-plan .dash-seg--sm { justify-self: start; margin-top: 4px; }
.dash-seg--sm .dash-seg-btn { padding: 4px 9px; font-size: var(--t-caption); }
.dash-btn:disabled { opacity: .6; cursor: default; transform: none; }

/* Help */
.dash-help-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.dash-help-card {
  display: grid; gap: 6px; align-content: start; text-align: left; font: inherit; color: inherit; text-decoration: none; cursor: pointer;
  transition: transform .18s ease, border-color .18s ease;
}
.dash-help-card:hover { transform: translateY(-2px); border-color: var(--pt-border-strong); }
.dash-help-card .dash-kpi-icon { margin-bottom: 6px; }
.dash-help-card strong { font-size: var(--t-heading); color: var(--pt-text); }
.dash-help-card span:last-child { font-size: var(--t-small); line-height: 1.5; color: var(--pt-text-2); }
.dash-faq { display: grid; }
.dash-faq-item + .dash-faq-item { border-top: 1px solid var(--pt-border); }
.dash-faq-q {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 14px 0;
  border: 0; background: none; font: inherit; font-size: var(--t-body); font-weight: 600; color: var(--pt-text); text-align: left; cursor: pointer;
}
.dash-faq-q svg { flex: none; color: var(--pt-text-3); transition: transform .2s ease; }
.dash-faq-q[aria-expanded="true"] svg { transform: rotate(180deg); }
.dash-faq-a { padding: 0 0 14px; font-size: var(--t-body); line-height: 1.6; color: var(--pt-text-2); }

/* ─── Light mode: a soft gradient on cards (accent cards keep their solid fill) */
html.prism-theme[data-theme="light"] .dash-card:not(.dash-card--accent),
html.prism-theme[data-theme="light"] .dash-plan,
html.prism-theme[data-theme="light"] .dash-side {
  background: linear-gradient(160deg, #ffffff 0%, #fbfcff 55%, #f1f6ff 100%);
}
html.prism-theme[data-theme="light"] .dash-kpi {
  background: linear-gradient(150deg, #ffffff 35%, color-mix(in srgb, var(--tone, #2563eb) 7%, #ffffff) 100%);
}
html.prism-theme[data-theme="light"] .dash-card--accent {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 60%, #60a5fa 100%);
}
html.prism-theme[data-theme="light"] .dash-promo {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 70%, #60a5fa 100%);
}
html.prism-theme[data-theme="light"] body.page-pricing .pr-card:not(.pr-card--pe),
html.prism-theme[data-theme="light"] body.page-pricing .pr-pillar {
  background: linear-gradient(160deg, #ffffff 0%, #fbfcff 55%, #f1f6ff 100%) !important;
}
html.prism-theme[data-theme="light"] body.page-pricing .pr-card--pe {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 60%, #60a5fa 100%) !important;
}
/* The icon tile is shared with KPI tiles, whose grid places it by area name. */
.dash-plan .dash-kpi-icon, .dash-help-card .dash-kpi-icon { grid-area: auto; }

/* ─── Activity heatmap (GitHub-style, js/shared/dash-charts.js heatmap()) ──── */
.dash-stack { display: grid; gap: var(--dash-gap); align-content: start; min-width: 0; }
.dash-stack .dash-card--chart > .dash-chart { min-height: 220px; flex: none; height: 220px; }
.dash-heat {
  display: grid;
  grid-template-columns: 28px minmax(calc(var(--weeks) * 11px), 1fr);
  grid-template-rows: auto auto;
  column-gap: 6px; row-gap: 4px;
  overflow-x: auto; scrollbar-width: thin;
  padding-bottom: 4px;
}
.dash-heat-months {
  grid-column: 2; display: grid; grid-template-columns: repeat(var(--weeks), minmax(0, 1fr)); column-gap: 3px;
  font-size: var(--t-micro); color: var(--pt-text-3);
}
.dash-heat-months span { white-space: nowrap; }
.dash-heat-days {
  grid-column: 1; grid-row: 2; display: grid; grid-template-rows: repeat(7, minmax(0, 1fr)); row-gap: 3px;
  font-size: var(--t-micro); color: var(--pt-text-3); line-height: 1;
}
.dash-heat-days span { display: flex; align-items: center; }
.dash-heat-grid {
  grid-column: 2; grid-row: 2;
  display: grid; grid-template-columns: repeat(var(--weeks), minmax(0, 1fr)); grid-template-rows: repeat(7, auto); gap: 3px;
}
.dash-heat-grid i, .dash-heat-legend i {
  display: block; aspect-ratio: 1; min-width: 8px; border-radius: 3px;
  background: var(--heat-0);
  outline: 1px solid color-mix(in srgb, var(--pt-text) 6%, transparent); outline-offset: -1px;
}
.dash-heat-grid i.is-empty { background: transparent; outline: 0; }
.dash-heat-grid i { opacity: 0; transform: scale(.4); transition: opacity .35s ease, transform .35s cubic-bezier(.34, 1.56, .64, 1), box-shadow .15s ease; transition-delay: calc(var(--w, 0) * 12ms); }
.dash-in .dash-heat-grid i { opacity: 1; transform: none; }
.dash-heat-grid i[data-tip]:hover { box-shadow: 0 0 0 2px var(--pt-text-2); }
.dash-heat i.l1 { background: var(--heat-1); }
.dash-heat i.l2 { background: var(--heat-2); }
.dash-heat i.l3 { background: var(--heat-3); }
.dash-heat i.l4 { background: var(--heat-4); }
.dash-heat-legend i.l1 { background: var(--heat-1); }
.dash-heat-legend i.l2 { background: var(--heat-2); }
.dash-heat-legend i.l3 { background: var(--heat-3); }
.dash-heat-legend i.l4 { background: var(--heat-4); }
.prism-theme {
  --heat-0: color-mix(in srgb, var(--pt-text) 6%, transparent);
  --heat-1: color-mix(in srgb, var(--pt-accent) 28%, var(--pt-surface));
  --heat-2: color-mix(in srgb, var(--pt-accent) 50%, var(--pt-surface));
  --heat-3: color-mix(in srgb, var(--pt-accent) 75%, var(--pt-surface));
  --heat-4: var(--pt-accent);
}
html.prism-theme[data-theme="light"] { --heat-0: #ebeff5; }
.dash-heat-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.dash-heat-legend { display: inline-flex; align-items: center; gap: 3px; font-size: var(--t-caption); color: var(--pt-text-3); }
.dash-heat-legend i { width: 11px; min-width: 11px; }
.dash-heat-legend i:first-of-type { margin-left: 4px; }
.dash-heat-legend i:last-of-type { margin-right: 4px; }
@media (prefers-reduced-motion: reduce) { .dash-heat-grid i { transition: none; opacity: 1; transform: none; } }

/* ─── Card depth: a top-lit gradient, layered shadow and a lift on hover ───── */
.prism-theme {
  --card-lit: linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0) 42%);
  --card-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 2px 6px rgba(0, 0, 0, 0.25), 0 22px 44px -26px rgba(0, 0, 0, 0.85);
  --card-shadow-hover: 0 1px 0 rgba(255, 255, 255, 0.07) inset, 0 4px 12px rgba(0, 0, 0, 0.3), 0 28px 56px -24px rgba(0, 0, 0, 0.9),
    0 0 0 1px color-mix(in srgb, var(--pt-accent) 28%, transparent), 0 0 32px -10px color-mix(in srgb, var(--pt-accent) 35%, transparent);
}
html.prism-theme[data-theme="light"] {
  --card-lit: linear-gradient(160deg, #ffffff 0%, #fbfcff 55%, #eff5ff 100%);
  --card-shadow: 0 1px 0 #ffffff inset, 0 1px 2px rgba(15, 23, 42, 0.06), 0 16px 36px -22px rgba(37, 99, 235, 0.28);
  --card-shadow-hover: 0 1px 0 #ffffff inset, 0 2px 6px rgba(15, 23, 42, 0.07), 0 24px 48px -22px rgba(37, 99, 235, 0.38),
    0 0 0 1px rgba(37, 99, 235, 0.22);
}
.dash-card:not(.dash-card--accent),
.dash-kpi, .dash-plan {
  background: var(--card-lit), var(--pt-surface);
  box-shadow: var(--card-shadow);
  transition: transform .25s cubic-bezier(.34, 1.4, .64, 1), box-shadow .25s ease, border-color .25s ease;
}
.dash-card:not(.dash-card--accent):hover,
.dash-kpi:hover, .dash-plan:hover { box-shadow: var(--card-shadow-hover); border-color: color-mix(in srgb, var(--pt-accent) 30%, var(--pt-border)); }
/* Small cards lift; big chart / table cards only glow so content doesn't jump. */
.dash-kpi:hover, .dash-plan:hover, .dash-help-card:hover { transform: translateY(-4px); }
html.prism-theme[data-theme="light"] .dash-kpi {
  background: linear-gradient(150deg, #ffffff 30%, color-mix(in srgb, var(--tone, #2563eb) 9%, #ffffff) 100%);
}
.prism-theme:not([data-theme="light"]) .dash-kpi {
  background: radial-gradient(120% 90% at 100% 100%, color-mix(in srgb, var(--tone, var(--pt-accent)) 13%, transparent) 0%, transparent 60%), var(--card-lit), var(--pt-surface);
}
.dash-card--accent { box-shadow: 0 20px 44px -22px color-mix(in srgb, var(--pt-primary) 75%, transparent); transition: transform .25s ease, box-shadow .25s ease; }
.dash-card--accent:hover { box-shadow: 0 26px 56px -22px color-mix(in srgb, var(--pt-primary) 90%, transparent); }

/* Pricing cards get the same depth */
.prism-theme body.page-pricing .pr-card:not(.pr-card--pe),
.prism-theme body.page-pricing .pr-pillar { background: var(--card-lit), var(--pt-surface); box-shadow: var(--card-shadow); }
.prism-theme body.page-pricing .pr-card:not(.pr-card--pe):hover,
.prism-theme body.page-pricing .pr-pillar:hover { box-shadow: var(--card-shadow-hover); transform: translateY(-4px); }
.prism-theme body.page-pricing .pr-pillar { transition: transform .25s ease, box-shadow .25s ease; }
html.prism-theme[data-theme="light"] body.page-pricing .pr-card:not(.pr-card--pe),
html.prism-theme[data-theme="light"] body.page-pricing .pr-pillar { background: var(--card-lit) !important; box-shadow: var(--card-shadow) !important; }
html.prism-theme[data-theme="light"] body.page-pricing .pr-card:not(.pr-card--pe):hover,
html.prism-theme[data-theme="light"] body.page-pricing .pr-pillar:hover { box-shadow: var(--card-shadow-hover) !important; }

/* ─── Signed out: no sidebar or rail, the sign-in prompt centred on the page ── */
.dash:has(#prof-auth-gate:not(.prof-hidden)),
.dash:has(#evals-auth-gate:not(.evals-hidden)) { grid-template-columns: minmax(0, 1fr); }
.dash:has(#prof-auth-gate:not(.prof-hidden)) > .dash-side,
.dash:has(#prof-auth-gate:not(.prof-hidden)) > .dash-rail,
.dash:has(#evals-auth-gate:not(.evals-hidden)) > .dash-side { display: none; }
.dash #prof-auth-gate:not(.prof-hidden),
.dash #evals-auth-gate:not(.evals-hidden) {
  min-height: calc(100vh - var(--dash-nav-h) - 84px);
  margin: 0 auto;
  max-width: 520px;
}
.dash #prof-auth-gate .prof-auth-gate-sub,
.dash #evals-auth-gate .evals-auth-gate-sub { max-width: 420px; margin-left: auto; margin-right: auto; }
.dash .prof-auth-gate-title, .dash .evals-auth-gate-title { color: var(--pt-text); font-size: var(--t-title); }
.dash .prof-auth-gate-sub, .dash .evals-auth-gate-sub { color: var(--pt-text-2); font-size: var(--t-body); }
.dash .prof-auth-gate-btn, .dash .evals-auth-gate-btn {
  background: var(--pt-primary); box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--pt-primary) 80%, transparent);
}
.dash .prof-auth-gate-btn:hover, .dash .evals-auth-gate-btn:hover { background: var(--pt-primary-hover); }
