/* ============================================================
   Whetstone Learning Center — Note Maker full-page experience.
   Navy control panel (matches sign-in) + cream display (the app's
   reading surface). Reuses the --gm-* tokens from guidemate.css.
   ============================================================ */

:root {
    --lc-topbar-h: 66px;
    --lc-navy: #0F1D30;
    --lc-navy-soft: #16263c;
    --lc-navy-line: rgba(246, 239, 221, 0.14);
    --lc-on-navy: #F4ECD8;
    --lc-on-navy-dim: #AEB9C9;
}

* { box-sizing: border-box; }

.lc-page {
    margin: 0;
    min-height: 100vh;
    background: var(--gm-bg);
    color: var(--gm-ink);
    font-family: var(--gm-font);
    -webkit-font-smoothing: antialiased;
}

/* ── Top bar ── */
.lc-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: var(--lc-topbar-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 clamp(16px, 3vw, 28px);
    background: var(--gm-surface);
    border-bottom: 1px solid var(--gm-line);
}

.lc-topbar-side { display: flex; align-items: center; gap: 12px; min-width: 0; }

.lc-brand {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    text-decoration: none;
    white-space: nowrap;
}
.lc-brand-mark { display: block; border-radius: 8px; flex: none; }
.lc-brand-lockup { display: inline-flex; align-items: center; gap: 11px; }
.lc-brand-name {
    font-family: var(--gm-display);
    font-weight: 700;
    font-size: clamp(1.32rem, 2.2vw, 1.6rem);
    color: var(--gm-ink);
    letter-spacing: 0.01em;
}
.lc-brand-sub {
    font-family: var(--gm-font);
    font-weight: 600;
    font-size: clamp(0.7rem, 1vw, 0.82rem);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gm-gold-ink);
    transform: translateY(3px); /* nudge below the optical centre */
}

.lc-credit-pill { white-space: nowrap; }
.lc-back { white-space: nowrap; }

/* ── Shell ── */
.lc-shell {
    display: grid;
    grid-template-columns: clamp(360px, 31vw, 480px) 1fr;
    height: calc(100vh - var(--lc-topbar-h));
    transition: grid-template-columns 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.lc-shell.is-collapsed { grid-template-columns: 54px 1fr; }

/* ── Control panel (navy) ── */
.lc-control {
    position: relative;
    min-width: 0; /* allow the grid track to collapse below content width */
    overflow: hidden; /* the inner scrolls; pinned ×/arrow stay put */
    background: var(--lc-navy);
    color: var(--lc-on-navy);
    border-right: 1px solid rgba(0, 0, 0, 0.2);
}
.lc-shell.is-collapsed .lc-control { border-right-color: transparent; }

.lc-arc {
    position: absolute;
    fill: none;
    pointer-events: none;
    opacity: 0.5;
}
.lc-arc circle { stroke: var(--gm-gold); stroke-width: 1; opacity: 0.22; }
.lc-arc--tr { top: -150px; right: -150px; width: 360px; height: 360px; }

/* Minimal collapse/expand affordances: a bare gold × at the rings' centre, and a
   bare gold arrow on the collapsed rail. No bubbles. The rings sit at top:-150 /
   right:-150 (360px box) so their centre is 30px in from the panel's top-right;
   a 28px target at 16/16 lands its centre exactly there. */
.lc-collapse {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    padding: 0;
    color: var(--gm-gold);
    cursor: pointer;
    z-index: 3;
    transition: color 0.16s ease, transform 0.16s ease;
}
.lc-collapse:hover { color: #e0b864; transform: scale(1.12); }
.lc-collapse svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.lc-rail-expand {
    display: none;
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    padding: 0;
    color: var(--gm-gold);
    cursor: pointer;
    z-index: 3;
    transition: color 0.16s ease, transform 0.16s ease;
}
.lc-rail-expand:hover { color: #e0b864; transform: translateX(calc(-50% + 2px)); }
.lc-rail-expand svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Collapsed: hide the controls + ×, show only the gold arrow rail. */
.lc-shell.is-collapsed .lc-control-inner { display: none; }
.lc-shell.is-collapsed .lc-collapse { display: none; }
.lc-shell.is-collapsed .lc-rail-expand { display: inline-flex; }
.lc-shell.is-collapsed .lc-arc { display: none; }

.lc-control-inner {
    position: relative;
    z-index: 1;
    height: 100%;
    overflow-y: auto;
    padding: clamp(26px, 2.6vw, 38px) clamp(24px, 2.4vw, 34px);
    display: flex;
    flex-direction: column;
    gap: 30px;
    min-width: 340px;
    /* Slim navy pill scrollbar instead of the default chunky one (Firefox). */
    scrollbar-width: thin;
    scrollbar-color: #34496b transparent;
}
/* Slim navy pill scrollbar (WebKit/Chromium/Safari). */
.lc-control-inner::-webkit-scrollbar { width: 7px; }
.lc-control-inner::-webkit-scrollbar-track { background: transparent; }
.lc-control-inner::-webkit-scrollbar-thumb {
    background: #34496b;
    border-radius: 999px;
}
.lc-control-inner::-webkit-scrollbar-thumb:hover { background: #44598a; }

.lc-control-head { display: grid; gap: 9px; padding-right: 36px; }
.lc-eyebrow {
    margin: 0;
    font-size: 0.66rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--gm-gold);
}
.lc-control-title {
    margin: 0;
    font-family: var(--gm-display);
    font-weight: 600;
    font-size: 1.85rem;
    color: #fff;
}
.lc-mode-toggle {
    display: flex;
    gap: 4px;
    margin: 0 0 16px;
    padding: 4px;
    border-radius: 10px;
    background: rgba(246, 239, 221, 0.08);
    border: 1px solid var(--lc-navy-line);
}
.lc-mode-btn {
    flex: 1;
    padding: 9px 10px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: var(--lc-on-navy-dim);
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
}
.lc-mode-btn:hover { color: var(--lc-on-navy); }
.lc-mode-btn.is-active { background: var(--lc-gold, #C39A4C); color: #1B2A3C; }
.lc-mode-btn:focus-visible { outline: 2px solid var(--lc-gold, #C39A4C); outline-offset: 1px; }

.lc-control-lead { margin: 0; font-size: 0.9rem; line-height: 1.5; color: var(--lc-on-navy-dim); }

.lc-block {
    display: grid;
    gap: 16px;
    padding: 20px;
    border-radius: var(--gm-radius-card);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--lc-navy-line);
}
.lc-block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lc-block-head h3 { margin: 0; font-size: 1.04rem; font-weight: 700; color: #fff; }
.lc-cost {
    font-size: 0.74rem;
    font-weight: 700;
    color: #2a2008;
    background: var(--gm-gold);
    border-radius: var(--gm-radius-pill);
    padding: 3px 11px;
}

.lc-form { display: grid; gap: 15px; }
.lc-field { display: grid; gap: 7px; font-size: 0.82rem; font-weight: 600; color: var(--lc-on-navy-dim); }
.lc-field > span:first-child { letter-spacing: 0.02em; }
.lc-field input,
.lc-select {
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border-radius: var(--gm-radius-ctrl);
    border: 1px solid var(--lc-navy-line);
    background: rgba(255, 255, 255, 0.06);
    color: var(--lc-on-navy);
    font: inherit;
    font-weight: 500;
}
.lc-field input[type="file"] { padding: 10px 12px; font-size: 0.82rem; color: var(--lc-on-navy-dim); }
.lc-field input::placeholder { color: #7c8aa0; }
.lc-field input:focus,
.lc-select:focus { outline: none; border-color: var(--gm-gold); background: rgba(255, 255, 255, 0.1); }
.lc-select option { color: #15263B; }

.lc-primary {
    width: 100%;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid var(--gm-gold);
    border-radius: var(--gm-radius-ctrl);
    background: var(--lc-navy);
    color: var(--gm-gold);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.lc-primary:not(:disabled):hover { transform: translateY(-1px); background: rgba(195, 154, 76, 0.14); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28); }
.lc-primary:disabled { opacity: 0.55; cursor: default; }

.lc-hint { margin: 0; font-size: 0.76rem; color: #8492a6; line-height: 1.45; }
.lc-status { margin: 0; font-size: 0.82rem; color: var(--lc-on-navy-dim); }
.lc-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Chapters list in the control panel */
.lc-chapters { display: grid; gap: 14px; }
.lc-manage { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 2px; }
.lc-manage-sub { font-size: 0.82rem; color: var(--lc-on-navy-dim); font-weight: 600; }
.lc-link {
    background: none;
    border: none;
    color: var(--gm-gold);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}
.lc-link:hover { text-decoration: underline; }
.lc-restore-note { margin: 0; font-size: 0.82rem; color: var(--lc-on-navy-dim); }
.lc-restore { width: auto; }

.lc-credit-note { margin: 0; font-size: 0.78rem; color: var(--gm-gold); font-weight: 600; opacity: 0.85; }

.lc-chapter-list { display: grid; gap: 10px; }
.lc-chapter-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 14px;
    border-radius: var(--gm-radius-ctrl);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--lc-navy-line);
}
.lc-chapter-name { font-size: 0.88rem; font-weight: 600; color: var(--lc-on-navy); line-height: 1.4; }
.lc-chapter-actions { display: flex; align-items: center; gap: 7px; flex: none; }
.lc-chapter-empty { margin: 0; font-size: 0.82rem; color: #8492a6; }

.lc-generate {
    min-height: 36px;
    padding: 0 16px;
    border: 1px solid var(--gm-gold);
    border-radius: 9px;
    background: var(--lc-navy);
    color: var(--gm-gold);
    font: inherit;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: transform 0.16s ease, background 0.16s ease;
}
.lc-generate:not(:disabled):hover { transform: translateY(-1px); background: rgba(195, 154, 76, 0.14); }
.lc-generate:disabled { opacity: 0.55; cursor: default; }

.lc-ghost {
    min-height: 36px;
    padding: 0 12px;
    border-radius: 9px;
    border: 1px solid var(--lc-navy-line);
    background: transparent;
    color: var(--lc-on-navy);
    font: inherit;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease;
}
.lc-ghost:hover { border-color: var(--gm-gold); color: #fff; }

/* ── Display (cream) ── */
.lc-display {
    overflow-y: auto;
    padding: clamp(24px, 4vw, 56px) clamp(20px, 5vw, 64px);
    background:
        radial-gradient(900px 500px at 100% -10%, rgba(195, 154, 76, 0.07), transparent 60%),
        var(--gm-bg);
}

.lc-empty {
    max-width: 460px;
    margin: clamp(40px, 12vh, 130px) auto;
    text-align: center;
    color: var(--gm-ink-2);
}
.lc-empty-mark {
    width: 52px;
    height: 52px;
    fill: none;
    stroke: var(--gm-gold);
    stroke-width: 1.4;
    stroke-linejoin: round;
    stroke-linecap: round;
    margin-bottom: 16px;
}
.lc-empty h2 { margin: 0 0 8px; font-family: var(--gm-display); font-weight: 600; font-size: 1.7rem; color: var(--gm-ink); }
.lc-empty p { margin: 0; font-size: 0.96rem; line-height: 1.55; }

/* Result */
.lc-result {
    max-width: 820px;
    margin: 0 auto;
    background: var(--gm-surface);
    border: 1px solid var(--gm-line);
    border-radius: var(--gm-radius-card);
    box-shadow: var(--gm-shadow-card);
    padding: clamp(22px, 3vw, 40px);
    transition: max-width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus mode — when the control panel is collapsed, widen the reading column so
   there's more text per line and less scrolling. */
.lc-shell.is-collapsed .lc-result { max-width: 1180px; }
.lc-shell.is-collapsed .lc-notes { max-width: 1040px; }
.lc-shell.is-collapsed .lc-notes .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lc-result-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 18px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--gm-line);
}
.lc-result-kicker {
    margin: 0 0 6px;
    font-size: 0.66rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--gm-gold-ink);
}
.lc-result-title { margin: 0; font-family: var(--gm-display); font-weight: 600; font-size: clamp(1.5rem, 2.4vw, 2.1rem); color: var(--gm-ink); line-height: 1.12; }
.lc-result-actions { display: flex; gap: 8px; flex: none; }

/* Structured study notes — textbook card layout.
   Note cards group major topics; mini-sections split long cards; callouts surface
   labeled facts; product grids show outputs as small cards. Body 17–18px. */
.lc-notes {
    --lc-read: 17.5px;
    max-width: 820px;
    margin: 0 auto;
    color: var(--gm-ink);
    font-size: var(--lc-read);
    line-height: 1.55;
    transition: max-width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Fallback element styles for the rare plain-markdown path (structured classes
   below are scoped with .lc-notes so they always win over these). */
.lc-notes h1, .lc-notes h2, .lc-notes h3, .lc-notes h4 { font-family: var(--gm-display); color: var(--gm-ink); line-height: 1.25; }
.lc-notes p { margin: 0 0 12px; }
.lc-notes ul, .lc-notes ol { margin: 0 0 12px; padding-left: 1.3em; }
.lc-notes li { margin: 0.18em 0; }

/* Topic heading — the chapter's main title, sits above the cards. */
.lc-notes .lc-note-topic {
    font-family: var(--gm-display);
    font-weight: 700;
    font-size: clamp(1.9rem, 3.1vw, 2.4rem);
    line-height: 1.14;
    color: var(--gm-ink);
    margin: 0 0 1.2rem;
    padding-bottom: 0.45rem;
    border-bottom: 2px solid var(--gm-gold);
}

/* Note card — a major topic. */
.lc-notes .note-card {
    margin: 0 0 1.3rem;
    padding: clamp(20px, 2.6vw, 32px) clamp(20px, 2.8vw, 34px);
    background: var(--gm-surface);
    border: 1px solid var(--gm-line);
    border-radius: 20px;
    box-shadow: var(--gm-shadow-card);
}
.lc-notes .note-card:last-child { margin-bottom: 0; }
.lc-notes .note-card-title {
    font-family: var(--gm-display);
    font-weight: 700;
    font-size: clamp(1.4rem, 2.2vw, 1.7rem);
    line-height: 1.2;
    color: var(--gm-gold-ink);
    margin: 0 0 1.1rem;
}
.lc-notes .note-card > p { margin: 0 0 12px; }
.lc-notes .note-card > p:last-child { margin-bottom: 0; }

/* Mini-section — an internal block within a card, separated by a soft top rule. */
.lc-notes .mini-section { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--gm-line); }
.lc-notes .note-card-title + .mini-section,
.lc-notes .mini-section:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.lc-notes .mini-section > :first-child { margin-top: 0; }
.lc-notes .mini-section > :last-child { margin-bottom: 0; }
.lc-notes .mini-section h3 {
    font-family: var(--gm-display);
    font-weight: 700;
    font-size: 1.2rem;
    line-height: 1.25;
    color: var(--gm-ink);
    margin: 0 0 0.6rem;
}

/* Callout — tinted box for Location / Watch out / Key idea / etc. */
.lc-notes .callout {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--gm-gold-soft);
    border: 1px solid #ead6b8;
    border-radius: 14px;
    padding: 12px 15px;
    margin: 0 0 14px;
}
.lc-notes .callout:last-child { margin-bottom: 0; }
.lc-notes .callout-label {
    flex: 0 0 auto;
    color: var(--gm-gold-ink);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-size: 0.72rem;
    padding-top: 0.3em;
}
.lc-notes .callout-text { color: var(--gm-ink); line-height: 1.5; }

/* Markdown tables — clean bordered table (scrolls horizontally on narrow screens). */
.lc-notes .gm-table-wrap { overflow-x: auto; margin: 0 0 14px; }
.lc-notes .gm-table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.94em;
    line-height: 1.45;
}
.lc-notes .gm-table th,
.lc-notes .gm-table td {
    border: 1px solid var(--gm-line);
    padding: 8px 12px;
    text-align: left;
    vertical-align: top;
}
.lc-notes .gm-table thead th {
    background: var(--gm-gold-soft);
    color: var(--gm-gold-ink);
    font-weight: 700;
}
.lc-notes .gm-table tbody tr:nth-child(even) { background: var(--gm-field); }

/* Lists — real, visible lists with gold markers; compact rhythm. */
.lc-notes .lc-list { margin: 0 0 12px; padding-left: 1.4em; }
.lc-notes .lc-list:last-child { margin-bottom: 0; }
.lc-notes .lc-list li { margin: 0.35em 0; padding-left: 0.2em; line-height: 1.5; }
.lc-notes .lc-list li::marker { color: var(--gm-gold-ink); font-weight: 800; }

/* Definition card — highlighted, left gold accent; tight. */
.lc-notes .lc-def-card {
    margin: 0 0 0.5rem;
    padding: 0.5rem 0.8rem;
    background: var(--gm-gold-soft);
    border-left: 3px solid var(--gm-gold);
    border-radius: 0 10px 10px 0;
}
.lc-notes .lc-def-card:last-child { margin-bottom: 0; }
.lc-notes .lc-def-card-term { font-weight: 700; color: var(--gm-gold-ink); }
.lc-notes .lc-def-card-exp { margin: 0.05rem 0 0; color: var(--gm-ink); line-height: 1.5; }

/* Product grid — outputs as small cards (2-up desktop, 1-up mobile). */
.lc-notes .product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}
.lc-notes .product-card {
    background: var(--gm-bg);
    border: 1px solid var(--gm-line);
    border-radius: 14px;
    padding: 13px 16px;
}
.lc-notes .product-card strong { display: block; font-size: 1.05rem; line-height: 1.25; color: var(--gm-ink); margin-bottom: 0.2rem; }
.lc-notes .product-card span { display: block; color: var(--gm-muted); font-size: 0.86rem; line-height: 1.4; }

/* Process grid (comparisons) — two compact cards side by side. */
.lc-notes .process-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 0 0 4px;
}
.lc-notes .compact-card {
    background: var(--gm-bg);
    border: 1px solid var(--gm-line-strong);
    border-radius: 16px;
    padding: clamp(14px, 1.8vw, 20px);
}
.lc-notes .compact-card h3 {
    font-family: var(--gm-display);
    font-weight: 700;
    font-size: 1.12rem;
    color: var(--gm-gold-ink);
    margin: 0 0 0.55rem;
}
.lc-notes .compact-card .lc-list { margin-bottom: 0; }

/* Inline elements inside structured notes */
.lc-notes code {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 0.88em;
    background: var(--gm-field);
    padding: 0.12em 0.4em;
    border-radius: 5px;
}
.lc-notes .katex-display { margin: 0.6em 0; }
.lc-notes pre { background: var(--lc-navy); color: var(--lc-on-navy); padding: 14px 16px; border-radius: 12px; overflow-x: auto; }
.lc-notes pre code { background: none; padding: 0; color: inherit; }
.lc-notes blockquote { margin: 0 0 1em; padding: 0.4em 1em; border-left: 3px solid var(--gm-gold); color: var(--gm-ink-2); background: var(--gm-gold-soft); border-radius: 0 8px 8px 0; }
.lc-notes hr { border: none; border-top: 1px solid var(--gm-line); margin: 1.6em 0; }

/* Gold section rule */
.lc-rule {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 34px 0 22px;
}
.lc-rule::before, .lc-rule::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, transparent, var(--gm-line-strong), transparent); }
.lc-rule span {
    font-family: var(--gm-font);
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--gm-gold-ink);
}

.lc-disclaimer { margin: 26px 0 0; padding-top: 16px; border-top: 1px solid var(--gm-line); font-size: 0.78rem; line-height: 1.5; color: var(--gm-muted); }

/* Flashcards (display) */
.lc-flashcards { display: grid; gap: 14px; }
.lc-flashcards-head { display: flex; align-items: center; justify-content: space-between; }
.lc-flashcards-title { font-weight: 700; color: var(--gm-ink); }
.lc-flashcards-counter { font-size: 0.82rem; color: var(--gm-muted); font-weight: 600; }
.lc-flashcard {
    width: 100%;
    min-height: 168px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 26px;
    border-radius: var(--gm-radius-card);
    border: 1px solid var(--gm-line-strong);
    background: var(--gm-field);
    cursor: pointer;
    text-align: center;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}
.lc-flashcard:hover { transform: translateY(-2px); box-shadow: var(--gm-shadow-hover); }
.lc-flashcard:focus-visible { outline: 2px solid var(--gm-gold); outline-offset: 2px; }
.lc-flashcard.is-answer { background: var(--gm-gold-soft); border-color: var(--gm-gold); }
.lc-flashcard-face { font-size: 0.66rem; letter-spacing: 0.18em; font-weight: 800; color: var(--gm-gold-ink); }
.lc-flashcard-text { font-size: 1.04rem; line-height: 1.5; color: var(--gm-ink); }
.lc-flashcard-text p { margin: 0 0 0.5em; }
.lc-flashcard-text p:last-child { margin-bottom: 0; }
.lc-flashcards-nav { display: flex; gap: 10px; justify-content: center; }
.lc-flashcards-nav .lc-ghost { color: var(--gm-ink-2); border-color: var(--gm-line); }
.lc-flashcards-nav .lc-ghost:hover { border-color: var(--gm-gold); color: var(--gm-gold-ink); }
.lc-flashcards-hint { margin: 0; text-align: center; font-size: 0.78rem; color: var(--gm-muted); }

/* Loading (thinking animation reuses .gm-thinking* from guidemate.css) */
.lc-loading { max-width: 520px; margin: clamp(40px, 12vh, 130px) auto; }

/* ── Responsive ── */
.lc-shell.is-collapsed .lc-control { min-height: 60px; }

@media (max-width: 640px) {
    .lc-topbar { gap: 10px; }
    .lc-brand { gap: 11px; }
    .lc-brand-sub { display: none; }
    .lc-credit-pill { display: none; }
    .lc-back span,
    .lc-back { font-size: 0.84rem; }
    /* Grids stack; tighten reading size + card padding. */
    .lc-notes .product-grid,
    .lc-notes .process-grid { grid-template-columns: 1fr; }
    .lc-notes { --lc-read: 16.5px; }
    .lc-notes .note-card { padding: 20px 18px; border-radius: 16px; }
    .lc-notes .callout { display: block; }
    .lc-notes .callout-label { display: block; margin-bottom: 0.3rem; padding-top: 0; }
}

@media (max-width: 900px) {
    .lc-shell { grid-template-columns: 1fr; height: auto; }
    .lc-shell.is-collapsed { grid-template-columns: 1fr; }
    .lc-control { overflow: visible; border-right: none; border-bottom: 1px solid rgba(0, 0, 0, 0.2); }
    .lc-control-inner { height: auto; overflow: visible; }
    .lc-display { min-height: 60vh; }
}

@media (prefers-reduced-motion: reduce) {
    .lc-shell { transition: none; }
    .lc-result { scroll-behavior: auto; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   GuideMate Brain (Phase 1–3): generate/reopen buttons (navy sidebar),
   focus chips + "what improved" strips + progress panel (cream display).
   ═══════════════════════════════════════════════════════════════════════════ */

/* Sidebar chapter-row Brain actions — the row stacks: chapter name on its own
   line, then the buttons wrap in full-width rows beneath. The original
   `.lc-chapter-actions { flex: none }` can't shrink, so with 5 actions it
   overflowed the control panel; a forced 100% basis keeps every button (and
   the wrap point) inside the chapter box. */
.lc-chapter-row { flex-wrap: wrap; }
.lc-chapter-row .lc-chapter-name { flex: 1 1 100%; }
.lc-chapter-actions {
    flex: 1 1 100%;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: flex-start;
    row-gap: 8px;
}

.lc-brain-generate,
.lc-brain-test,
.lc-brain-view {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 9px;
    font: inherit;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.lc-brain-generate {
    border: 1px solid var(--gm-gold);
    background: var(--gm-gold);
    color: var(--lc-navy);
}
.lc-brain-generate:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28); }
.lc-brain-generate:disabled { opacity: 0.55; cursor: default; }
.lc-brain-test,
.lc-brain-view {
    border: 1px solid var(--lc-navy-line);
    background: transparent;
    color: var(--lc-on-navy);
    font-weight: 600;
}
.lc-brain-test:not(:disabled):hover,
.lc-brain-view:hover { border-color: var(--gm-gold); color: #fff; }
.lc-brain-test:disabled { opacity: 0.55; cursor: default; }
.lc-brain-hint {
    flex-basis: 100%;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--lc-on-navy-dim);
}

/* Display-area (cream) Brain meta: focus chips + "what improved" */
.lc-brain-meta {
    display: grid;
    gap: 12px;
    margin: 0 0 18px;
    padding: 14px 16px;
    border: 1px solid var(--gm-line);
    border-radius: var(--gm-radius-card);
    background: rgba(195, 154, 76, 0.06);
}
.lc-focus-hint { margin: 0; font-size: 0.82rem; font-weight: 700; color: var(--gm-gold-ink); }
.lc-focus-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lc-focus-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 600;
    background: var(--gm-surface);
    border: 1px solid var(--gm-line);
    color: var(--gm-ink);
}
.lc-focus-chip[data-band="weak"] { border-color: #d97a6c; color: #b23c2b; }
.lc-focus-chip[data-band="developing"] { border-color: #d9b45a; color: #96701c; }
.lc-focus-chip[data-band="provisional"] { border-color: #7fa6c9; color: #3c6187; }
.lc-focus-chip[data-band="mastered"] { border-color: #7fbf95; color: #2e7d4f; }
.lc-focus-chip--more { background: transparent; border-style: dashed; color: #8492a6; font-weight: 700; }

/* Brain-note version switcher (v1, v2, … + earlier-version dropdown) */
.lc-version-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gm-line);
}
.lc-version-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: var(--gm-ink);
    color: var(--gm-surface);
}
.lc-version-badge[data-latest="true"] { background: var(--gm-gold, #c39a4c); color: var(--gm-ink); }
.lc-version-note { font-size: 0.8rem; color: #8492a6; font-weight: 600; }
.lc-version-label { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8rem; font-weight: 700; color: var(--gm-ink); }
.lc-version-select {
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 5px 30px 5px 12px;
    border-radius: 999px;
    border: 1px solid var(--gm-line);
    background: var(--gm-surface);
    color: var(--gm-ink);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238492a6' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 9px center;
    background-size: 14px;
}
.lc-version-select:hover { border-color: var(--gm-gold, #c39a4c); }

.lc-improved-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.lc-counter {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    background: rgba(58, 150, 90, 0.12);
    color: #2e7d4f;
}

/* Expandable "what changed" progress summary above a Brain note */
.lc-winsum {
    border: 1px solid var(--gm-line);
    border-radius: 12px;
    background: var(--gm-surface);
    overflow: hidden;
}
.lc-winsum-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    list-style: none;
}
.lc-winsum-head::-webkit-details-marker { display: none; }
.lc-winsum-counts { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.lc-winsum-toggle {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--gm-gold-ink);
    white-space: nowrap;
}
/* Alt-text form ("/ \"\"") hides the decorative glyph from screen readers;
   older browsers that don't support it fall back to plain `content` via the
   preceding declaration. */
.lc-winsum-toggle::after { content: " ▸"; content: " ▸" / ""; }
.lc-winsum[open] .lc-winsum-toggle::after { content: " ▾"; content: " ▾" / ""; }
.lc-winsum[open] .lc-winsum-toggle { color: #8492a6; }
.lc-winsum-body { padding: 4px 14px 14px; display: flex; flex-direction: column; gap: 14px; }
.lc-winsum-group-title {
    margin: 8px 0 6px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #8492a6;
}
.lc-winsum-row { display: flex; align-items: baseline; gap: 9px; padding: 5px 0; border-top: 1px solid rgba(0,0,0,0.05); }
.lc-winsum-row:first-of-type { border-top: none; }
.lc-winsum-dot { width: 7px; height: 7px; border-radius: 2px; flex: none; align-self: center; }
.lc-winsum-group[data-kind="fixed"] .lc-winsum-dot { background: #d97a6c; }
.lc-winsum-group[data-kind="mastered"] .lc-winsum-dot { background: #3a965a; }
.lc-winsum-main { flex: 1; font-size: 0.86rem; font-weight: 600; color: var(--gm-ink); line-height: 1.4; }
.lc-winsum-tag { font-size: 0.72rem; font-weight: 600; color: #8492a6; white-space: nowrap; }
.lc-delta-win {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 600;
    background: rgba(58, 150, 90, 0.1);
    color: #2e7d4f;
    border: 1px solid rgba(58, 150, 90, 0.25);
}

.lc-stale-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 16px;
    padding: 12px 16px;
    border: 1px dashed var(--gm-gold);
    border-radius: var(--gm-radius-card);
    background: rgba(195, 154, 76, 0.08);
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--gm-gold-ink);
}
.lc-stale-cta .lc-brain-generate { min-height: 34px; width: auto; }

/* ── Brain panels (test / grade / progress) share the cream card frame ── */
.lc-brain-panel {
    max-width: 820px;
    margin: 0 auto;
    background: var(--gm-surface);
    border: 1px solid var(--gm-line);
    border-radius: var(--gm-radius-card);
    box-shadow: var(--gm-shadow-card);
    padding: clamp(22px, 3vw, 40px);
}
.lc-shell.is-collapsed .lc-brain-panel { max-width: 1180px; }
.lc-brain-subhint { display: block; margin: 0 0 14px; font-size: 0.8rem; color: #8492a6; line-height: 1.5; }

/* Test questions */
.lc-brain-questions { display: grid; gap: 16px; }
.lc-question {
    display: grid;
    gap: 10px;
    padding: 16px 18px;
    border: 1px solid var(--gm-line);
    border-radius: 14px;
    background: var(--gm-bg);
}
.lc-qmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.lc-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(195, 154, 76, 0.14);
    color: var(--gm-gold-ink);
}
.lc-chip--num { background: var(--gm-ink); color: var(--gm-surface); }
.lc-chip--concept { background: rgba(43, 108, 176, 0.12); color: #2b6cb0; }
.lc-chip--muted { background: var(--gm-surface); border: 1px solid var(--gm-line); color: #8492a6; font-weight: 600; }
.lc-qprompt { font-size: 0.95rem; line-height: 1.55; color: var(--gm-ink); font-weight: 600; }
.lc-options { display: grid; gap: 8px; }
.lc-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--gm-line);
    border-radius: 11px;
    background: var(--gm-surface);
    cursor: pointer;
    transition: border-color 0.14s ease, background 0.14s ease;
}
.lc-option:hover { border-color: var(--gm-gold); }
.lc-option:has(input:checked) { border-color: var(--gm-gold); background: rgba(195, 154, 76, 0.1); }
.lc-option input { margin-top: 3px; accent-color: var(--gm-gold); }
.lc-option-text { font-size: 0.9rem; line-height: 1.5; color: var(--gm-ink); }
.lc-brain-textarea {
    width: 100%;
    border: 1px solid var(--gm-line);
    border-radius: 11px;
    padding: 10px 12px;
    font: inherit;
    font-size: 0.9rem;
    color: var(--gm-ink);
    background: var(--gm-surface);
    resize: vertical;
}
.lc-brain-textarea:focus { outline: none; border-color: var(--gm-gold); }
.lc-brain-actions-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }
.lc-brain-actions-row .lc-brain-generate { width: auto; }
.lc-brain-actions-row .lc-brain-subhint { margin: 0; }

/* Grade rows */
.lc-brain-grade-list { display: grid; gap: 12px; margin-top: 4px; }
.lc-grade-row {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border: 1px solid var(--gm-line);
    border-left: 3px solid var(--gm-gold);
    border-radius: 12px;
    background: var(--gm-bg);
}
.lc-grade-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lc-grade-label { font-size: 0.82rem; font-weight: 700; color: var(--gm-ink); }
.lc-grade-score {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
    background: var(--gm-surface);
    border: 1px solid var(--gm-line);
}
.lc-grade-score[data-tier="high"] { color: #2e7d4f; border-color: rgba(58, 150, 90, 0.4); background: rgba(58, 150, 90, 0.1); }
.lc-grade-score[data-tier="mid"] { color: #96701c; border-color: rgba(217, 180, 90, 0.5); background: rgba(217, 180, 90, 0.12); }
.lc-grade-score[data-tier="low"] { color: #b23c2b; border-color: rgba(217, 122, 108, 0.5); background: rgba(217, 122, 108, 0.12); }
.lc-grade-comment { font-size: 0.86rem; line-height: 1.55; color: #4a5568; }

/* "You improved" */
.lc-brain-improve { margin-bottom: 18px; }
.lc-improve {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid rgba(58, 150, 90, 0.3);
    border-radius: 14px;
    background: rgba(58, 150, 90, 0.07);
}
.lc-improve-head { margin: 0; font-size: 0.9rem; font-weight: 800; color: #2e7d4f; }
.lc-improve-neutral { margin: 0; font-size: 0.86rem; font-weight: 600; color: #8492a6; }

/* ── Focused re-test CTA ── */
.lc-retest-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px dashed var(--gm-gold);
    border-radius: 14px;
    background: rgba(195, 154, 76, 0.07);
}
.lc-retest-msg { font-size: 0.86rem; font-weight: 700; color: var(--gm-gold-ink); }
.lc-retest-cta .lc-brain-generate { width: auto; }

/* ── Progress panel ── */
.lc-progress-stats { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.lc-progress-stat {
    display: grid;
    gap: 2px;
    padding: 12px 18px;
    border: 1px solid var(--gm-line);
    border-radius: 12px;
    background: var(--gm-bg);
    min-width: 96px;
}
.lc-progress-stat-value { font-size: 1.5rem; font-weight: 800; color: var(--gm-ink); font-family: var(--gm-display); }
.lc-progress-stat-label { font-size: 0.74rem; font-weight: 600; color: #8492a6; text-transform: uppercase; letter-spacing: 0.03em; }
.lc-progress-hint { margin: 0 0 14px; font-size: 0.84rem; color: var(--gm-gold-ink); font-weight: 600; }

.lc-cell-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.lc-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 13px;
    border: 1px solid var(--gm-line);
    border-left: 3px solid var(--gm-line);
    border-radius: 11px;
    background: var(--gm-surface);
}
.lc-cell[data-band="mastered"] { border-left-color: #3a965a; }
.lc-cell[data-band="developing"] { border-left-color: #d9b45a; }
.lc-cell[data-band="weak"] { border-left-color: #d97a6c; }
.lc-cell[data-band="provisional"] { border-left-color: #7fa6c9; }
.lc-cell[data-band="untested"] { border-left-color: var(--gm-line); }
.lc-cell-name { font-size: 0.82rem; font-weight: 600; color: var(--gm-ink); line-height: 1.4; }
.lc-cell-badges { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.lc-band {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: capitalize;
}
.lc-band--mastered { background: rgba(58, 150, 90, 0.14); color: #2e7d4f; }
.lc-band--developing { background: rgba(217, 180, 90, 0.18); color: #96701c; }
.lc-band--weak { background: rgba(217, 122, 108, 0.18); color: #b23c2b; }
.lc-band--provisional { background: rgba(127, 166, 201, 0.2); color: #3c6187; }
.lc-band--untested { background: var(--gm-bg); color: #8492a6; border: 1px solid var(--gm-line); }
.lc-trend { font-size: 0.9rem; font-weight: 800; color: #8492a6; }
.lc-trend[data-trend="improving"], .lc-trend[data-trend="rising"] { color: #2e7d4f; }
.lc-trend[data-trend="slipping"], .lc-trend[data-trend="falling"] { color: #b23c2b; }

/* ── Concept-first progress dashboard ── */
.lc-concept-section {
    border: 1px solid var(--gm-line);
    border-radius: 14px;
    background: var(--gm-surface);
    margin-bottom: 12px;
    overflow: hidden;
}
.lc-concept-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    list-style: none;
    font-family: var(--gm-display);
}
.lc-concept-section-head::-webkit-details-marker { display: none; }
.lc-concept-section-head::before {
    content: "▸";
    margin-right: 8px;
    color: #8492a6;
    font-size: 0.8rem;
    transition: transform 0.15s ease;
}
.lc-concept-section[open] .lc-concept-section-head::before { transform: rotate(90deg); }
.lc-concept-section-title { flex: 1; font-size: 1rem; font-weight: 700; color: var(--gm-ink); }
.lc-concept-section-count {
    flex: none;
    min-width: 24px;
    text-align: center;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    background: var(--gm-bg);
    color: #5a6b7b;
}
.lc-concept-section[data-tier="low"] { border-left: 4px solid #d97a6c; }
.lc-concept-section[data-tier="mid"] { border-left: 4px solid #d9b45a; }
.lc-concept-section[data-tier="strong"] { border-left: 4px solid #3a965a; }
.lc-concept-section[data-tier="untested"] { border-left: 4px solid var(--gm-line); }

.lc-concept-list { padding: 4px 16px 14px; display: flex; flex-direction: column; gap: 14px; }
.lc-concept { padding-top: 10px; border-top: 1px solid var(--gm-line); }
.lc-concept:first-child { border-top: none; padding-top: 2px; }
.lc-concept-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.lc-concept-name { font-size: 0.95rem; font-weight: 700; color: var(--gm-ink); line-height: 1.35; }

.lc-delta-badge {
    flex: none;
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
    white-space: nowrap;
}
.lc-delta-badge[data-dir="up"] { background: rgba(58, 150, 90, 0.14); color: #2e7d4f; }
.lc-delta-badge[data-dir="down"] { background: rgba(217, 122, 108, 0.18); color: #b23c2b; }
.lc-delta-badge[data-dir="flat"] { background: var(--gm-bg); color: #5a6b7b; }
.lc-delta-badge[data-dir="new"] { background: var(--gm-bg); color: #8492a6; border: 1px solid var(--gm-line); }

.lc-bar-row { display: flex; align-items: center; gap: 10px; }
.lc-bar-track { flex: 1; height: 12px; border-radius: 999px; background: var(--gm-bg); overflow: hidden; }
.lc-bar-fill { height: 100%; border-radius: 999px; min-width: 2px; transition: width 0.4s ease; }
.lc-bar-fill[data-tier="low"] { background: linear-gradient(90deg, #d97a6c, #c85a49); }
.lc-bar-fill[data-tier="mid"] { background: linear-gradient(90deg, #e0c46e, #d9b45a); }
.lc-bar-fill[data-tier="strong"] { background: linear-gradient(90deg, #57b97e, #3a965a); }
.lc-bar-fill[data-tier="untested"] { background: var(--gm-line); }
.lc-bar-pct { flex: none; min-width: 40px; text-align: right; font-size: 0.86rem; font-weight: 800; color: var(--gm-ink); font-variant-numeric: tabular-nums; }

.lc-skill-breakdown { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.lc-skill-chip {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--gm-bg);
    color: #5a6b7b;
    border: 1px solid var(--gm-line);
}
.lc-skill-chip[data-tier="low"] { background: rgba(217, 122, 108, 0.14); color: #b23c2b; border-color: transparent; }
.lc-skill-chip[data-tier="mid"] { background: rgba(217, 180, 90, 0.16); color: #96701c; border-color: transparent; }
.lc-skill-chip[data-tier="strong"] { background: rgba(58, 150, 90, 0.14); color: #2e7d4f; border-color: transparent; }

/* (The old "Test these N concepts" footer styles were removed — the coverage
   CTA now reuses .lc-retest-cta so both action rows read identically.) */

/* ── Session deltas ── */
.lc-session-deltas { display: grid; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--gm-line); }
.lc-delta-slip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 600;
    background: rgba(217, 122, 108, 0.12);
    color: #b23c2b;
    border: 1px solid rgba(217, 122, 108, 0.3);
}

/* ── Saved-Notes "Brain" source (notes.html) ── */
.nt-source-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    padding: 10px 12px;
    border-radius: var(--gm-radius-ctrl);
    border: 1px solid var(--lc-navy-line);
    background: rgba(195, 154, 76, 0.12);
    color: var(--lc-on-navy);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}
.nt-source-toggle input { width: 16px; height: 16px; accent-color: var(--gm-gold); }
.gm-note-tag.nt-tag--stale { background: rgba(195, 154, 76, 0.18); color: var(--gm-gold-ink); }
.nt-back--preview { margin-left: auto; }

/* ── Generate-with-Brain explainer modal ──
   Inherits the Iris "special feature" card; only difference: the two action
   labels are longer, so let them wrap instead of overflowing the 560px card. */
.gm-brain-modal .gm-note-modal-actions { flex-wrap: wrap; }

/* ── Frozen graded question cells (grade view mirrors the test) ── */
.lc-question--graded { position: relative; }
.lc-grade-score--corner { margin-left: auto; }
.lc-options--frozen .lc-option { cursor: default; }
.lc-options--frozen .lc-option:hover { border-color: var(--gm-line); }
.lc-options--frozen .lc-option input { cursor: default; }
.lc-option--chosen { border-color: var(--gm-gold); background: rgba(195, 154, 76, 0.12); }
.lc-answer-label, .lc-feedback-label {
    font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px;
    color: #8492a6; font-weight: 700; margin: 8px 0 3px;
}
.lc-answer-frozen {
    font-size: 0.9rem; line-height: 1.5; color: var(--gm-ink);
    background: var(--gm-field); border: 1px solid var(--gm-line);
    border-radius: 8px; padding: 8px 10px; white-space: pre-wrap;
}
.lc-answer-frozen--empty { color: #8492a6; font-style: italic; }
.lc-feedback {
    font-size: 0.86rem; line-height: 1.55; color: #4a5568;
    background: rgba(195, 154, 76, 0.07); border-left: 3px solid var(--gm-gold);
    border-radius: 0 8px 8px 0; padding: 7px 10px;
}
/* ── Improvements summary (hash-free) ── */
.lc-improve-summary { font-size: 0.9rem; color: var(--gm-ink); margin: 2px 0 6px; }
.lc-win-list { margin: 6px 0 0; padding-left: 18px; font-size: 0.86rem; color: #4a5568; }
.lc-win-list li { margin: 2px 0; }

/* ═══════════════════════════════════════════════════════════════════════════
   Progress dashboard — 1:1 from the "Progress Dashboard" design comp.
   Paper double-card (#F4ECDA outer / #FCFAF3 inner), ink #1B3A4B, gold
   #B08A3A, muted #A69D89. Space Grotesk for display numbers + headings,
   Hanken Grotesk for body (both loaded from Google Fonts in the HTML).
   ═══════════════════════════════════════════════════════════════════════════ */
@keyframes pg-pop-in { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: none; } }

/* No card chrome: the dashboard sits DIRECTLY on the display background, as if
   embedded in the page itself. Width is PINNED to 900px in BOTH collapsed and
   open shell states — the base `.is-collapsed .lc-brain-panel { max-width:
   1180px }` rule out-ranks the modifier, and that 1180→900 reflow mid-
   transition is what tore the heatmap apart when the control panel opened. */
.lc-brain-panel--pg,
.lc-shell.is-collapsed .lc-brain-panel--pg {
    max-width: 900px;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    color: #1B3A4B;
    font-family: 'Hanken Grotesk', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}
.pg-card {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: clamp(6px, 1.5vw, 14px) 0 0;
    min-width: 0;
}

/* Header */
.pg-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.pg-eyebrow { font-family: 'Space Grotesk'; font-size: 11px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: #B08A3A; margin-bottom: 12px; }
.pg-title { font-family: 'Space Grotesk'; font-size: 25px; font-weight: 600; letter-spacing: -0.015em; color: #1B3A4B; }
.pg-sub { font-size: 14px; color: #948C79; margin-top: 4px; }
.pg-stats { display: flex; gap: 30px; padding-bottom: 4px; }
.pg-stat { text-align: right; }
.pg-stat-num { font-family: 'Space Grotesk'; font-size: 22px; font-weight: 500; color: #1B3A4B; letter-spacing: -0.01em; }
.pg-stat-label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #A69D89; margin-top: 3px; }
.pg-note { font-size: 13px; color: #A69D89; margin-top: 14px; }
.pg-rule { height: 1px; background: rgba(27, 58, 75, 0.09); margin: 32px 0 0; }
.pg-rule--mid { margin: 36px 0 30px; }
.pg-empty { margin: 30px 0 0; font-size: 14.5px; line-height: 1.6; color: #948C79; }

/* Step headings */
.pg-step { display: flex; align-items: baseline; gap: 14px; margin-top: 30px; }
.pg-step--tight { margin-top: 0; }
.pg-step-num { font-family: 'Space Grotesk'; font-size: 12px; font-weight: 500; letter-spacing: 0.16em; color: #B08A3A; }
.pg-step-title { font-family: 'Space Grotesk'; font-size: 15px; font-weight: 600; letter-spacing: 0.02em; color: #1B3A4B; }
.pg-step-hint { font-size: 13.5px; color: #A69D89; }
.pg-step2head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 30px; }
.pg-reset { font-family: 'Hanken Grotesk'; font-size: 12.5px; font-weight: 600; color: #B08A3A; background: transparent; border: none; padding: 4px 2px; cursor: pointer; letter-spacing: 0.02em; }

/* Step 01 — donut + bucket rows */
.pg-overview { display: flex; gap: 52px; align-items: center; margin-top: 26px; flex-wrap: wrap; }
.pg-donut { position: relative; width: 196px; height: 196px; flex: none; }
.pg-donut svg { width: 196px; height: 196px; transform: rotate(-90deg); display: block; }
.pg-donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; }
.pg-donut-big { font-family: 'Space Grotesk'; font-size: 38px; font-weight: 500; line-height: 1; color: #1B3A4B; letter-spacing: -0.02em; }
.pg-donut-label { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; color: #A69D89; margin-top: 7px; max-width: 108px; text-transform: uppercase; }
.pg-buckets { flex: 1; min-width: 280px; display: flex; flex-direction: column; }
.pg-bucket { display: flex; align-items: center; gap: 14px; padding: 12px 12px; border-radius: 8px; cursor: pointer; border-bottom: 1px solid rgba(27, 58, 75, 0.06); transition: background 0.2s; }
.pg-bucket-dot { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.pg-bucket-name { flex: 1; font-size: 14.5px; font-weight: 500; color: #38424A; }
.pg-bucket-count { font-family: 'Space Grotesk'; font-size: 16px; font-weight: 500; color: #1B3A4B; }

/* Step 02 — chips + hover line + heatmap */
.pg-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 24px; }
.pg-chip { display: inline-flex; align-items: center; gap: 8px; font-family: 'Hanken Grotesk'; font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 8px; cursor: pointer; background: transparent; color: #514B3B; border: 1px solid rgba(27, 58, 75, 0.16); transition: all 0.18s; }
.pg-chip-dot { width: 7px; height: 7px; border-radius: 2px; flex: none; }
.pg-chip-count { font-family: 'Space Grotesk'; font-weight: 500; color: #9A927E; }
.pg-hoverline { min-height: 26px; margin-bottom: 14px; display: flex; align-items: center; }
.pg-hover-idle { font-size: 13px; color: #A69D89; }
.pg-hover-info { display: flex; align-items: center; gap: 11px; animation: pg-pop-in 0.15s ease; }
.pg-hover-dot { width: 8px; height: 8px; border-radius: 2px; }
.pg-hover-name { font-size: 13.5px; font-weight: 600; color: #1B3A4B; }
.pg-hover-label { font-size: 12.5px; color: #A69D89; }
.pg-hover-pct { font-family: 'Space Grotesk'; font-size: 13.5px; font-weight: 600; }
.pg-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.pg-tile { position: relative; aspect-ratio: 1; border-radius: 6px; border: 1px solid transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.15s, opacity 0.25s, box-shadow 0.15s; }
.pg-tile:hover { transform: scale(1.08); box-shadow: 0 6px 14px -6px rgba(27, 58, 75, 0.40); z-index: 2; }
.pg-tile-num { font-family: 'Space Grotesk'; font-size: 12.5px; font-weight: 500; }

/* Actions below the comp content (coverage + focused re-test) */
.pg-actions { margin-top: 34px; display: grid; gap: 14px; }
.pg-actions .lc-retest-cta { margin-top: 0; }

/* Focus insight — the weakest IB skill, called out under the header */
.pg-focus {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(206, 107, 90, 0.08);
    border-left: 2px solid #CE6B5A;
}
.pg-focus-label { font-family: 'Space Grotesk'; font-size: 10.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: #CE6B5A; }
.pg-focus-skill { font-family: 'Space Grotesk'; font-size: 15px; font-weight: 600; color: #1B3A4B; }
.pg-focus-val { font-size: 13px; color: #514B3B; }

/* Fix these mistakes — active misconceptions list (STEP 03) */
.pg-mistakes { margin-top: 18px; display: flex; flex-direction: column; }
.pg-mistake { display: flex; gap: 12px; padding: 13px 12px; border-bottom: 1px solid rgba(27, 58, 75, 0.06); }
.pg-mistake:last-child { border-bottom: none; }
.pg-mistake-dot { width: 8px; height: 8px; border-radius: 2px; background: #CE6B5A; margin-top: 6px; flex: none; }
.pg-mistake-body { flex: 1; min-width: 0; }
.pg-mistake-concept { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.pg-mistake-name { font-family: 'Space Grotesk'; font-size: 14.5px; font-weight: 600; color: #1B3A4B; }
.pg-mistake-skill { font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #A69D89; }
.pg-mistake-text { margin: 4px 0 0; font-size: 13.5px; line-height: 1.5; color: #514B3B; }
.pg-mistakes-more { margin: 10px 12px 0; font-size: 12.5px; color: #A69D89; }

@media (max-width: 560px) {
    .pg-grid { grid-template-columns: repeat(6, 1fr); }
    .pg-overview { gap: 28px; }
}
@media (prefers-reduced-motion: reduce) {
    .pg-tile, .pg-tile:hover { transform: none; transition: none; }
    .pg-hover-info { animation: none; }
}

/* ============ Welcome tour (first-visit carousel) ============ */
.lc-tour {
    position: fixed;
    inset: 0;
    margin: auto;              /* dead-center regardless of page resets */
    height: fit-content;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    width: min(560px, calc(100vw - 40px));
    border: 1px solid var(--gm-line, #E8DDC6);
    border-radius: 18px;
    padding: 0;
    background: #FBF6E9;
    color: #15263B;
    box-shadow: 0 30px 80px rgba(13, 29, 54, 0.35);
}
.lc-tour::backdrop { background: rgba(13, 29, 54, 0.55); backdrop-filter: blur(2px); }
.lc-tour-viewport { overflow: hidden; }
.lc-tour-track {
    display: flex;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.lc-tour-slide {
    flex: 0 0 100%;
    padding: clamp(24px, 5vw, 38px) clamp(22px, 5vw, 40px) 10px;
    text-align: center;
}
.lc-tour-art {
    width: min(300px, 80%);
    height: auto;
    margin: 0 auto 18px;
    display: block;
}
.lc-tour-slide h3 {
    margin: 0 0 8px;
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #15263B;
}
.lc-tour-slide p {
    margin: 0 auto;
    max-width: 46ch;
    font-size: 0.92rem;
    line-height: 1.6;
    color: #46566B;
}
.lc-tour-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px clamp(22px, 5vw, 40px) 22px;
}
.lc-tour-skip {
    background: none;
    border: none;
    flex: none;
    white-space: nowrap;
    padding: 6px 2px;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    color: #9A8F76;
    cursor: pointer;
}
.lc-tour-skip:hover { color: #15263B; }
.lc-tour-dots { display: flex; gap: 7px; }
.lc-tour-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #E0D5BC;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}
.lc-tour-dot.is-active { background: #C39A4C; transform: scale(1.25); }
.lc-tour-next { flex: none; width: auto; min-width: 132px; padding: 0 26px; }
@media (prefers-reduced-motion: reduce) {
    .lc-tour-track { transition: none; }
    .lc-tour-dot { transition: none; }
}
