/* Kafedrum — "stage" layer. Loaded after theme.css on every page; changes no script and no markup.
   Removing the <link> to this file restores the previous look exactly.

   Idea   A lecture is treated like a track. The app shell is two floating panels on a darker stage
          (library on the left, workspace on the right), subjects are cover tiles, lecture lists read
          like tracklists, and processing progress is a waveform with the signal colour as the playhead.
          The public page is calm and centred: big tight headlines, generous space, pill buttons,
          a frosted top bar.
   Colour The theme tokens are kept; the dark stage is a touch deeper, panels a touch lighter, the
          signal red a touch warmer. The light theme drops the graph-paper grid.
   Type   Inter throughout, heavy and tight for headlines; Unbounded only in the wordmark;
          tabular figures instead of mono for the timer. */

/* ---------- tokens ---------- */
:root {
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 24px;
  --stage-gap: 8px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
}
:root, :root[data-theme="dark"] {
  /* A cooler, deeper stage; panels with a faint green-grey cast; a crisper primary; the signal leans orange. */
  --bg: #0b0c0c;
  --panel: #161817;
  --panel-2: #1e2120;
  --panel-3: #292c2a;
  --line: #2a2d2b;
  --line-2: #3c403d;
  --field-line: #777974;
  --text: #f3f3ef;
  --accent: #e2e3dc;
  --accent-2: #f1f2ec;
  --signal: #e5583d;
  --good: #8fc19a;
  --cover-4: #7486b8;
  --hover: rgba(243, 243, 239, .06);
  --hover-strong: rgba(243, 243, 239, .1);
  --frost: rgba(11, 12, 12, .72);
}
:root[data-theme="light"] {
  /* Lighter paper, a slightly deeper wall, warmer brass. */
  --bg: #e7e0cd;
  --panel: #f9f6ef;
  --panel-2: #fdfbf7;
  --panel-3: #efe8d9;
  --line: #e0d6c1;
  --line-2: #cbbd9f;
  --field-line: #817458;
  --signal: #b47a28;
  --cover-4: #4d5d86;
  --texture: none;
  --frost: rgba(249, 246, 239, .74);
}

/* ---------- type ---------- */
.editorial-title, .pc-workspace-title h1 { font-family: var(--display); font-weight: 700; letter-spacing: -.035em; }
.editorial-title { font-size: clamp(32px, 3.2vw, 48px); line-height: 1.05; }
.pc-workspace-title h1 { font-size: clamp(26px, 2.6vw, 36px); line-height: 1.1; }
.page-lede { font-size: 17px; line-height: 1.5; }
.section-bar h2 { font: 700 22px/1.2 var(--display); letter-spacing: -.02em; }

/* One label style: small, sentence case, the theme's quiet ink. */
.stamp, .section-kicker, .pc-eyebrow, .tile-label, .dialog-mini-head .tile-label, .submit-kicker, .kb-group-label,
.wl-card-kicker, .wl-card-label, .workspace-stats span, .verdict-label, .reader-label, .ide-language-picker,
.instructions-details summary small {
  color: var(--subtle); font: 500 13px/1.4 var(--display); letter-spacing: 0; text-transform: none;
}
.release-stamp { color: var(--subtle); font: 500 11px/1.4 var(--mono); letter-spacing: 0; text-transform: none; }
/* Labels that only repeat the heading under them. */
.wl-hero-copy > .stamp, .wl-section > .stamp, .wl-privacy .stamp, .auth .stamp, .flow-head-copy .stamp,
.pc-hero .pc-eyebrow, .pc-workspace-title .pc-eyebrow, .scope-card-copy .section-kicker,
.check-history-section .section-kicker { display: none; }

/* ---------- controls ---------- */
.btn, .button { border-radius: 999px; font-weight: 600; }
.btn.large { min-height: 50px; padding: 0 26px; font-size: 16px; }
.btn.compact { border-radius: 999px; }
.btn:not(.primary):not(.ghost):not(.danger) { border-color: var(--line-2); background: transparent; }
.btn:not(.primary):not(.ghost):not(.danger):hover:not(:disabled):not([aria-disabled="true"]) { border-color: var(--text); background: transparent; }
.btn.primary:hover:not(:disabled):not([aria-disabled="true"]) { transform: scale(1.02); }
.btn.primary:active:not(:disabled):not([aria-disabled="true"]) { transform: scale(.98); }
.icon-btn { border-radius: 999px; }
.field :is(input:not([type="checkbox"]):not([type="file"]), select, textarea), .workspace-textarea {
  border-color: var(--field-line); border-radius: var(--radius-md); background: var(--panel-2);
}
.field :is(input:not([type="checkbox"]):not([type="file"]), select) { min-height: 48px; }
.seg { padding: 4px; border: 0; border-radius: 999px; background: var(--panel-3); }
.seg .segment-control { border-radius: 999px; }
.seg .segment-control.is-active { background: var(--panel); box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
.pref-switch { border-radius: 999px; }
.pref-switch button { border-radius: 999px; }
.popover-menu { border-radius: var(--radius-md); padding: 6px; }
.menu-item { border-radius: var(--radius-sm); }
.tooltip { border-radius: var(--radius-sm); }

/* ---------- dialogs: sheets ---------- */
dialog::backdrop, .record-dialog::backdrop, .result-dialog::backdrop, .confirm-dialog::backdrop { backdrop-filter: blur(10px) saturate(120%); }
.confirm-dialog, .record-dialog, .photo-dialog, .result-dialog { border-color: var(--line); border-radius: 20px; }
.record-dialog { background: var(--panel); }
.flow-source { border-radius: var(--radius-md); }
.consent-field, .gpu-choice { border-color: var(--line); border-radius: var(--radius-md); }
.rec-stage { border: 0; border-radius: var(--radius-lg); background: var(--panel-2); padding: 24px 16px 28px; }
.rec-timer { font-family: var(--display); font-weight: 600; font-size: clamp(48px, 7vw, 68px); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.rec-button { width: 84px; height: 84px; border: 0; background: var(--signal); box-shadow: 0 0 0 8px color-mix(in srgb, var(--signal) 18%, transparent); transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out); }
.rec-button:hover { background: var(--signal); filter: none; transform: scale(1.05); box-shadow: 0 0 0 12px color-mix(in srgb, var(--signal) 22%, transparent); }
.rec-button:active { transform: scale(.97); }

/* ---------- application shell: two panels on a stage ---------- */
#app-view, .app { background: var(--bg); }
.topbar { background: var(--bg); border-bottom: 0; }
.topbar .brand { font-size: 16px; }
.brand .logo::after { content: none; }
.logo, .topbar .logo, .brand .logo { border-radius: 8px; }
.avatar { border-radius: 999px; }
.profile-button { border-radius: 999px; }

/* Top-level sections as pills; the active one is filled. */
.product-tabs { align-items: center; gap: 4px; }
.product-tabs .nav-btn { min-height: var(--touch, 44px); height: var(--touch, 44px); padding: 0 18px; border-radius: 999px; font-weight: 600; }
.product-tabs .nav-btn::after { content: none; }
.product-tabs .nav-btn:hover { background: var(--hover); }
.product-tabs .nav-btn.active { background: var(--panel-3); color: var(--text); }

@media (min-width: 851px) {
  .unified-layout { gap: var(--stage-gap); padding: 0 var(--stage-gap) var(--stage-gap); }
  .library-panel { overflow: hidden; border: 0; border-radius: var(--radius-md); background: var(--panel); }
  .study-workbench, .sidebar-collapsed .study-workbench { border-radius: var(--radius-md); background: var(--panel); }
  .library-footer { border-top: 0; background: transparent; }
  .sidebar-queue { border-top: 0; }
}

/* Library: square covers, the active subject filled rather than barred. */
.knowledge-base-list { gap: 2px; }
.knowledge-base-item { border-radius: var(--radius-sm); }
.knowledge-base-item.is-active { background: var(--panel-3); box-shadow: none; }
.kb-icon { width: 40px; height: 40px; border: 0; border-radius: 6px; background: var(--panel-3); color: var(--text); font: 700 13px/1 var(--display); }
.knowledge-base-item { grid-template-columns: 40px minmax(0, 1fr) auto; }
.knowledge-base-item.is-active .kb-icon { border: 0; background: var(--line-2); }
.kb-group-label { margin-top: 16px; font-size: 13px; }
.library-footer .rail-record { min-height: 48px; }

/* ---------- cover tiles: knowledge base and Practice/Check subject pickers ---------- */
.subject-grid, .pc-subject-grid { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)) !important; gap: 12px !important; }
.subject-card, .pc-subject-card {
  position: relative; min-height: 0 !important; height: auto; display: grid !important; grid-template-columns: minmax(0, 1fr) !important;
  align-content: start; align-items: start; gap: 12px; padding: 12px 12px 16px !important;
  border: 0 !important; border-radius: var(--radius-md); background: transparent !important; box-shadow: none; text-align: left;
  transition: background-color .2s var(--ease-out);
}
.subject-card:hover, .pc-subject-card:hover:not(:disabled) { background: var(--panel-2) !important; transform: none; }
.subject-card .subject-monogram, .pc-subject-card .subject-monogram {
  width: 100%; height: auto; aspect-ratio: 1 / 1; display: flex; align-items: flex-end; justify-content: flex-start; padding: 16px;
  border: 0; border-radius: var(--radius-sm); color: var(--text); font: 800 clamp(30px, 3vw, 44px)/1 var(--display); letter-spacing: -.04em;
  --cover: var(--accent);
  background: linear-gradient(150deg, color-mix(in srgb, var(--cover) 62%, var(--panel-3)) 0%, color-mix(in srgb, var(--cover) 16%, var(--panel-2)) 100%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
}
.subject-card.tone-0 .subject-monogram, .pc-subject-card:nth-child(4n+1) .subject-monogram { --cover: var(--signal); }
.subject-card.tone-1 .subject-monogram, .pc-subject-card:nth-child(4n+2) .subject-monogram { --cover: var(--good); }
.subject-card.tone-2 .subject-monogram, .pc-subject-card:nth-child(4n+3) .subject-monogram { --cover: var(--warn); }
.subject-card.tone-3 .subject-monogram, .pc-subject-card:nth-child(4n+4) .subject-monogram { --cover: var(--cover-4); }
:root[data-theme="light"] .subject-card .subject-monogram, :root[data-theme="light"] .pc-subject-card .subject-monogram { color: var(--panel-2); box-shadow: 0 4px 12px rgba(54, 36, 18, .14); }
/* On cream the brass signal and the warning ochre are too close; the first cover takes the brick red instead. */
:root[data-theme="light"] .subject-card.tone-0 .subject-monogram, :root[data-theme="light"] .pc-subject-card:nth-child(4n+1) .subject-monogram { --cover: var(--bad); }
:root[data-theme="light"] .subject-card .subject-monogram, :root[data-theme="light"] .pc-subject-card .subject-monogram {
  background: linear-gradient(150deg, var(--cover) 0%, color-mix(in srgb, var(--cover) 70%, var(--text)) 100%);
}
.subject-card-copy, .pc-subject-copy { gap: 3px; padding: 0 2px; }
.subject-card-copy strong, .pc-subject-copy strong { font: 700 16px/1.25 var(--display); letter-spacing: -.01em; }
.subject-card-copy em, .pc-subject-copy em { font: 400 14px/1.35 var(--display); color: var(--muted); }
.subject-card-copy small, .pc-subject-copy small { color: var(--subtle); font: 500 13px/1.35 var(--display); letter-spacing: 0; text-transform: none; }
.pc-subject-action { margin-top: 6px; color: var(--text); }
.pc-subject-card:disabled { opacity: .5; }
/* The open arrow becomes a round button that rises onto the cover on hover. */
/* The cover is square, so its bottom edge sits one card width (minus padding) from the top. */
.subject-card { container-type: inline-size; }
.subject-card > .ui-icon {
  position: absolute; top: calc(100cqw - 42px); right: 22px; width: 20px; height: 20px; padding: 12px; box-sizing: content-box;
  border-radius: 999px; background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 18px rgba(0, 0, 0, .35);
  opacity: 0; transform: translateY(8px); transition: opacity .2s var(--ease-out), transform .2s var(--ease-out);
}
.subject-card:hover > .ui-icon, .subject-card:focus-visible > .ui-icon { opacity: 1; transform: none; }
@media (hover: none) { .subject-card > .ui-icon { display: none; } }
.subject-card.is-skeleton { grid-template-columns: minmax(0, 1fr) !important; }
.subject-card.is-skeleton .skeleton-block { width: 100%; height: auto; aspect-ratio: 1 / 1; }

/* The three-step explainer is onboarding: it shows until the first lecture exists. Every account starts with the
   default subject, so a subject alone says nothing; app.js marks each card with its lecture count. */
#knowledge-home:has(#subject-grid button.subject-card[data-lectures]:not([data-lectures="0"])) .how-it-works { display: none; }
.how-steps li { border: 0; border-radius: var(--radius-md); background: var(--panel-2); }

/* ---------- page headers ---------- */
.page-header { border-bottom: 0; padding-bottom: 8px; }
.subject-status .status-chip { min-height: 24px; padding: 0 14px 0 0; border: 0; border-radius: 0; background: transparent; }

/* ---------- tracklists: lectures, exercises, check history ---------- */
.lecture-rows, .exercise-list, .check-history-list { border: 0; border-radius: 0; background: transparent; }
.lecture-row, .exercise-row { border-radius: var(--radius-sm); }
.lecture-row + .lecture-row, .exercise-row + .exercise-row { border-top: 0; }
.lecture-row:first-child, .lecture-row:last-child, .lecture-row:only-child { border-radius: var(--radius-sm); }
.lecture-row:hover, .exercise-row:hover { background: var(--hover); }
.lecture-row-icon { width: 44px; height: 44px; border: 0; border-radius: 6px; background: var(--panel-3); color: var(--text); }
@media (min-width: 851px) { .lecture-row-main { grid-template-columns: 44px minmax(0, 1fr) auto auto; } }
.status-completed .lecture-row-icon, .status-failed .lecture-row-icon, .status-leased .lecture-row-icon, .status-queued .lecture-row-icon { border: 0; }
.lecture-row-open { border-radius: 999px; }
.exercise-number { border-color: transparent; background: var(--panel-3); }
.check-history-row { border: 0; border-radius: var(--radius-sm); background: transparent; }
.check-history-row:hover { border: 0; background: var(--hover); }

/* Processing progress drawn as a waveform; the filled part is the playhead colour. */
.lecture-row-progress {
  height: 18px; margin-top: 8px; border-radius: 0; background: var(--line-2);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='18'%3E%3Cg fill='%23000'%3E%3Crect x='0' y='7' width='2' height='4'/%3E%3Crect x='4' y='4' width='2' height='10'/%3E%3Crect x='8' y='6' width='2' height='6'/%3E%3Crect x='12' y='2' width='2' height='14'/%3E%3Crect x='16' y='5' width='2' height='8'/%3E%3Crect x='20' y='0' width='2' height='18'/%3E%3Crect x='24' y='3' width='2' height='12'/%3E%3Crect x='28' y='6' width='2' height='6'/%3E%3Crect x='32' y='4' width='2' height='10'/%3E%3Crect x='36' y='7' width='2' height='4'/%3E%3Crect x='40' y='2' width='2' height='14'/%3E%3Crect x='44' y='5' width='2' height='8'/%3E%3Crect x='48' y='1' width='2' height='16'/%3E%3Crect x='52' y='6' width='2' height='6'/%3E%3Crect x='56' y='3' width='2' height='12'/%3E%3Crect x='60' y='7' width='2' height='4'/%3E%3Crect x='64' y='4' width='2' height='10'/%3E%3Crect x='68' y='2' width='2' height='14'/%3E%3Crect x='72' y='5' width='2' height='8'/%3E%3Crect x='76' y='0' width='2' height='18'/%3E%3Crect x='80' y='6' width='2' height='6'/%3E%3Crect x='84' y='3' width='2' height='12'/%3E%3Crect x='88' y='5' width='2' height='8'/%3E%3Crect x='92' y='7' width='2' height='4'/%3E%3C/g%3E%3C/svg%3E") left center / 96px 18px repeat-x;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='18'%3E%3Cg fill='%23000'%3E%3Crect x='0' y='7' width='2' height='4'/%3E%3Crect x='4' y='4' width='2' height='10'/%3E%3Crect x='8' y='6' width='2' height='6'/%3E%3Crect x='12' y='2' width='2' height='14'/%3E%3Crect x='16' y='5' width='2' height='8'/%3E%3Crect x='20' y='0' width='2' height='18'/%3E%3Crect x='24' y='3' width='2' height='12'/%3E%3Crect x='28' y='6' width='2' height='6'/%3E%3Crect x='32' y='4' width='2' height='10'/%3E%3Crect x='36' y='7' width='2' height='4'/%3E%3Crect x='40' y='2' width='2' height='14'/%3E%3Crect x='44' y='5' width='2' height='8'/%3E%3Crect x='48' y='1' width='2' height='16'/%3E%3Crect x='52' y='6' width='2' height='6'/%3E%3Crect x='56' y='3' width='2' height='12'/%3E%3Crect x='60' y='7' width='2' height='4'/%3E%3Crect x='64' y='4' width='2' height='10'/%3E%3Crect x='68' y='2' width='2' height='14'/%3E%3Crect x='72' y='5' width='2' height='8'/%3E%3Crect x='76' y='0' width='2' height='18'/%3E%3Crect x='80' y='6' width='2' height='6'/%3E%3Crect x='84' y='3' width='2' height='12'/%3E%3Crect x='88' y='5' width='2' height='8'/%3E%3Crect x='92' y='7' width='2' height='4'/%3E%3C/g%3E%3C/svg%3E") left center / 96px 18px repeat-x;
}
.lecture-row-progress span { background: var(--signal); }
.reading-progress span, #reading-progress-bar { background: var(--signal); }

/* ---------- Practice and Check ---------- */
.pc-hero { border-bottom: 0; }
.back-chip { min-height: var(--touch, 44px); padding: 0 14px 0 10px; border: 0; border-radius: 999px; background: var(--panel-3); color: var(--text); }
.back-chip:hover { border: 0; background: var(--line-2); }
.pc-workspace-head { border-bottom: 0; }
.pc-how { border: 0; border-radius: var(--radius-md); background: var(--panel-2); }
.pc-how li + li { border-top-color: var(--line); }
.pc-how b { background: var(--panel-3); color: var(--text); }
.format-strip span { border: 0; border-radius: var(--radius-md); background: var(--panel-2); color: var(--text); }
.format-strip .ui-icon { color: var(--muted); }
.scope-card { padding: 0; border: 0; border-radius: 0; background: transparent; }
/* Material filters as chips: filled grey, the chosen one inverted. */
.scope-choice { min-height: var(--touch, 44px); padding: 0 16px; border: 0; background: var(--panel-3); color: var(--text); font-weight: 500; }
.scope-choice::before { content: none; }
.scope-choice:hover { border: 0; background: var(--line-2); }
.scope-choice.is-active { border: 0; background: var(--text); color: var(--bg); }
.scope-choice.is-active * { color: inherit; }
.practice-next-card { padding: 24px 28px; border: 0; border-radius: var(--radius-lg); background: var(--panel-2); }
.practice-next-card strong { font: 700 22px/1.25 var(--display); letter-spacing: -.02em; }
.workspace-stats { gap: 12px; overflow: visible; border: 0; border-radius: 0; background: transparent; }
.workspace-stats > div { padding: 18px 20px; border-radius: var(--radius-md); background: var(--panel-2); }
.workspace-stats strong { margin-top: 8px; font: 700 32px/1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.check-workspace { border: 0; border-radius: var(--radius-lg); background: var(--panel-2); }
.workspace-mode-switch { margin: 12px; padding: 4px; border: 0; border-radius: 999px; background: var(--panel-3); }
.workspace-mode { border-radius: 999px; }
.workspace-mode.is-active { border-color: transparent; background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
.instructions-details { border-color: var(--line); border-radius: var(--radius-md); background: transparent; }
.check-submit-dock { border-top-color: var(--line); background: transparent; }
.usage-note, .pc-connectivity { border: 0; border-radius: var(--radius-md); }
.verdict-card { border-radius: var(--radius-lg); }

/* ---------- sign-in ---------- */
.auth-card::before, .auth-card::after { content: none; }
.auth-card.webcheck-auth { border: 0; border-radius: var(--radius-xl); background: var(--panel); box-shadow: none; padding: 40px; }
.auth .brand.big { font-size: 30px; gap: 12px; }
.brand.big .logo { width: 34px; height: 34px; border-radius: 9px; }
.auth-back, .auth-prefs .pref-switch { border-radius: 999px; }
@media (max-width: 600px) { .auth-card.webcheck-auth { padding: 24px 20px; } }

/* ---------- public main page ---------- */
.wl-bar { height: 56px; border-bottom: 0; background: var(--frost); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); }
.wl-nav a { border-radius: 999px; font-size: 14px; }
.wl-bar-end { margin-left: auto; }
.wl-main { width: min(1200px, 100%); }

/* Hero: one centred statement, then the product itself on a stage. */
.wl-hero { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 48px; min-height: 0; padding: clamp(48px, 7vw, 96px) 0 24px; text-align: center; }
.wl-hero-copy { display: grid; justify-items: center; max-width: 1120px; }
.wl-title { margin: 0 0 24px; font: 800 clamp(44px, 7vw, 96px)/1 var(--display); letter-spacing: -.05em; text-wrap: balance; }
.wl-lede { max-width: 40ch; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.45; color: var(--muted); }
.wl-actions { justify-content: center; margin-top: 36px; }
.wl-note { margin-top: 20px; }
.wl-preview { width: 100%; justify-items: center; padding: clamp(32px, 6vw, 72px) clamp(16px, 4vw, 48px); border-radius: 32px; background: var(--panel); text-align: left; }
.wl-card { width: min(560px, 100%); border: 0; border-radius: var(--radius-lg); background: var(--panel-2); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); padding: 28px 30px; }
:root[data-theme="light"] .wl-card { box-shadow: 0 30px 80px rgba(54, 36, 18, .14); }
.wl-preview > .wl-card:first-child { padding-bottom: 56px; }
.wl-card-small { width: min(420px, 92%); margin: -32px -120px 0 0; border-left: 0; background: var(--panel-3); box-shadow: 0 24px 60px rgba(0, 0, 0, .4); }
.wl-card-small::before { content: ""; display: block; width: 36px; height: 4px; margin-bottom: 6px; border-radius: 4px; background: var(--signal); }
.wl-card-title { font: 700 22px/1.25 var(--display); letter-spacing: -.02em; }
.wl-card-small .wl-card-title { font-size: 18px; }
.wl-chip { border-radius: 999px; }

.wl-section { padding: clamp(56px, 7vw, 96px) 0; border-top: 0; }
.wl-h2 { max-width: 18ch; margin: 0 auto 40px; font: 800 clamp(32px, 4.6vw, 60px)/1.04 var(--display); letter-spacing: -.045em; text-align: center; text-wrap: balance; }

/* Features: a tile grid with one lead tile. */
.wl-features { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
/* theme.css lays these out on 12 columns with :has() rules; !important keeps this 3-column layout in charge. */
.wl-features > .wl-feature { grid-column: span 1 !important; }
.wl-features > .wl-feature:first-child { grid-column: span 2 !important; }
.wl-features:not(:has(> .wl-feature:nth-child(5):not([hidden]))) > .wl-feature:nth-child(4) { grid-column: span 2 !important; }
.wl-feature { min-height: 240px; align-content: end; gap: 12px; padding: 32px; border: 0; border-radius: var(--radius-xl); background: var(--panel); }
.wl-feature > .ui-icon { width: 32px; height: 32px; margin-bottom: auto; color: var(--text); }
.wl-feature:first-child { background: linear-gradient(160deg, color-mix(in srgb, var(--signal) 22%, var(--panel)) 0%, var(--panel) 70%); }
.wl-feature:first-child > .ui-icon { color: var(--signal); }
.wl-feature h3, .wl-steps h3 { font: 700 24px/1.2 var(--display); letter-spacing: -.02em; }
.wl-feature:first-child h3 { font-size: 32px; letter-spacing: -.03em; }
.wl-feature p, .wl-steps p { font-size: 16px; line-height: 1.5; max-width: 52ch; }

/* Steps: a real sequence, so big numerals. */
.wl-steps { gap: 16px; }
.wl-steps li { padding: 32px; border: 0; border-radius: var(--radius-xl); background: var(--panel); }
.wl-step-num { color: var(--signal); font: 800 48px/1 var(--display); letter-spacing: -.04em; }

.wl-privacy { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
.wl-privacy .wl-h2 { max-width: 30ch; margin-bottom: 40px; }
.wl-privacy-list { width: min(640px, 100%); gap: 0; text-align: left; }
.wl-privacy-list li { padding: 20px 4px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; font-size: 18px; }
.wl-privacy-list li:first-child { border-top: 1px solid var(--line); }
.wl-privacy .policy-link { grid-column: 1; justify-self: center; margin-top: 24px; }

.wl-cta { margin: 0 0 72px; padding: clamp(48px, 7vw, 88px) 24px; border: 0; border-radius: 32px; background: var(--panel); }
.wl-cta .wl-h2 { margin: 0; }
.wl-cta .wl-actions { margin-top: 32px; }
.wl-footer { border-top: 1px solid var(--line); color: var(--subtle); font-size: 13px; }

@media (max-width: 960px) {
  .wl-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wl-features > .wl-feature:nth-child(n), .wl-features:not(:has(> .wl-feature:nth-child(5):not([hidden]))) > .wl-feature:nth-child(4) { grid-column: span 1 !important; }
  .wl-features > .wl-feature:first-child { grid-column: 1 / -1 !important; }
  .wl-card-small { margin: -24px 0 0; width: min(420px, 100%); }
}
@media (max-width: 600px) {
  .wl-features > .wl-feature:nth-child(n), .wl-features > .wl-feature:first-child, .wl-features:not(:has(> .wl-feature:nth-child(5):not([hidden]))) > .wl-feature:nth-child(4) { grid-column: 1 / -1 !important; }
  .wl-feature { min-height: 0; padding: 24px; }
  .wl-steps li { padding: 24px; }
  .wl-preview { border-radius: var(--radius-xl); }
  .wl-cta { margin-bottom: 64px; border-radius: var(--radius-xl); }
}

/* ---------- phones and tablets ---------- */
@media (max-width: 850px) {
  /* The header stacks into a column here, where the copy's 320 px flex-basis became 320 px of height. */
  .page-header-copy { flex: 0 0 auto; }
  .study-workbench { background: var(--bg); }
  .library-panel { background: var(--panel); }
  .subject-grid, .pc-subject-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .product-tabs .nav-btn { height: auto; min-height: 60px; border-radius: 0; font: 600 11px/1.1 var(--display); letter-spacing: 0; text-transform: none; }
  .product-tabs .nav-btn.active { background: transparent; color: var(--text); border-top-color: transparent; }
  .product-tabs .nav-btn:hover { background: transparent; }
  .product-tabs { background: linear-gradient(to top, var(--bg) 55%, color-mix(in srgb, var(--bg) 85%, transparent)); backdrop-filter: blur(12px); }
}

/* Phones: covers become a compact list, so long subject names are not cut mid-word and the grid stays short. */
@media (max-width: 600px) {
  .subject-grid, .pc-subject-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 4px !important; }
  .subject-card, .pc-subject-card { grid-template-columns: 56px minmax(0, 1fr) !important; align-items: center; gap: 14px; padding: 8px !important; }
  .subject-card .subject-monogram, .pc-subject-card .subject-monogram { width: 56px; padding: 8px; font-size: 20px; box-shadow: none; }
  .subject-card > .ui-icon { display: none; }
  .subject-card.is-skeleton { grid-template-columns: 56px minmax(0, 1fr) !important; }
  .subject-card.is-skeleton .skeleton-block { width: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  .subject-card > .ui-icon, .rec-button, .btn.primary { transition: none; }
  .btn.primary:hover:not(:disabled):not([aria-disabled="true"]), .rec-button:hover { transform: none; }
}

/* Selected segments sit lighter than their track: on dark that is the raised grey, not the panel. */
:root:not([data-theme="light"]) .workspace-mode.is-active, :root:not([data-theme="light"]) .seg .segment-control.is-active { background: var(--line-2); }

/* Study pickers are lists at every width; large covers belong to the library home. */
.pc-subject-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 4px !important; }
.pc-subject-card { grid-template-columns: 56px minmax(0, 1fr) !important; align-items: center; gap: 14px; padding: 8px !important; }
.pc-subject-card .subject-monogram { width: 56px; height: 56px; padding: 8px; font-size: 20px; box-shadow: none; }
.pc-subject-action { margin-top: 4px; }

/* Only parsed with JavaScript disabled; authenticated initial paint keeps #landing-view hidden. */
body:has(> noscript > link[data-static-landing]) #landing-view[hidden] { display: block !important; }
