/* NSG: warm, friendly study space. "Day shift" (light) and "Night shift" (dark) themes. */
:root {
  --paper: #fbf6f1;
  --card: #ffffff;
  --ink: #2b2236;
  --ink-2: #584c64;
  --muted: #76697f;
  --line: #eee3da;
  --accent: #7a3fa6;
  --accent-ink: #ffffff;
  --accent-soft: #f2e9f8;
  --warm: #e9935a;
  --warm-soft: #fdeee3;
  --good: #1c7560;
  --good-soft: #e0f3ec;
  --mid: #9a5f0e;
  --mid-soft: #fcf0dc;
  --bad: #b42318;
  --bad-soft: #fdecea;
  --mark: #ffe28a;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(64, 32, 90, .05), 0 6px 20px rgba(64, 32, 90, .06);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
/* Night shift: used when the device prefers dark (unless the user chose Day shift), or when chosen. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #16121d; --card: #211a2b; --ink: #f2ecf7; --ink-2: #cfc4da; --muted: #a898b6; --line: #342a42;
    --accent: #c9a3f0; --accent-ink: #1e1430; --accent-soft: #2e2440; --warm: #f0a673; --warm-soft: #3a2a20;
    --good: #74d8b8; --good-soft: #17332b; --mid: #f2c46d; --mid-soft: #3a2e17; --bad: #ff8a80; --bad-soft: #3d1f22;
    --mark: #6b5a14; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #16121d; --card: #211a2b; --ink: #f2ecf7; --ink-2: #cfc4da; --muted: #a898b6; --line: #342a42;
  --accent: #c9a3f0; --accent-ink: #1e1430; --accent-soft: #2e2440; --warm: #f0a673; --warm-soft: #3a2a20;
  --good: #74d8b8; --good-soft: #17332b; --mid: #f2c46d; --mid-soft: #3a2e17; --bad: #ff8a80; --bad-soft: #3d1f22;
  --mark: #6b5a14; --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--sans); }
a { color: var(--accent); text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 650; line-height: 1.2; letter-spacing: -.01em; font-variation-settings: "SOFT" 100; }
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: .6em 0 .35em; }
h2 { font-size: 1.2rem; margin: 0 0 .6em; }
code { background: var(--accent-soft); padding: .1em .35em; border-radius: 4px; }
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.lead { font-size: 1.1rem; color: var(--ink-2); max-width: 62ch; }
.crumbs { margin: 1.2em 0 -.4em; font-size: .9rem; }

/* Top bar */
.topbar { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar-inner { display: flex; align-items: center; gap: 16px; min-height: 58px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font: 650 1.3rem var(--serif); font-variation-settings: "SOFT" 100; color: var(--ink); text-decoration: none; }
.brand-mark { display: block; width: 34px; height: 34px; flex: none; }
.brand-sub { font: 500 .8rem var(--sans); color: var(--muted); margin-left: 2px; }
@media (max-width: 1180px) { .brand-sub { display: none; } }
.nav { display: flex; gap: 2px; margin-left: auto; align-items: center; overflow-x: auto; scrollbar-width: none; }
.nav a, .nav .linkish { padding: 7px 11px; border-radius: 999px; color: var(--ink-2); text-decoration: none; white-space: nowrap; font-size: .93rem; }
.nav a:hover, .nav .linkish:hover { background: var(--accent-soft); }
.nav a[aria-current] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
@media (max-width: 720px) {
  .brand-sub { display: none; }
  .nav { margin: 0 -16px; padding: 0 12px 8px; width: calc(100% + 32px); }
}

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  padding: 10px 20px; border-radius: 999px; font: 700 .95rem var(--sans); cursor: pointer; text-decoration: none; min-height: 44px; transition: transform .08s, filter .15s; }
.btn:active { transform: translateY(1px); }
.btn:hover { filter: brightness(1.08); }
.btn-quiet { background: transparent; color: var(--accent); }
.btn-quiet:hover { background: var(--accent-soft); filter: none; }
.btn-danger { background: transparent; border-color: var(--bad); color: var(--bad); }
.btn[disabled] { opacity: .6; cursor: wait; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.danger { color: var(--bad); }
form.inline { display: inline; }
.stack { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-weight: 500; font-size: .95rem; }
input[type=text], input[type=email], input[type=password], input[type=search], input:not([type]), select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); color: var(--ink); font: inherit; min-height: 44px; }
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
label.check, label.radio { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
label.check input, label.radio input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
legend { font-weight: 600; margin-bottom: 6px; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg label { display: block; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; padding: 8px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); cursor: pointer; }
.seg input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }

/* Layout bits */
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.row.tight { gap: 12px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 16px 0; box-shadow: var(--shadow); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid2 > .panel { margin: 0; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }
.actions { margin: 20px 0; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.list li:last-child { border-bottom: 0; }

.flash { padding: 12px 14px; border-radius: 10px; margin: 12px 0; border: 1px solid transparent; }
.flash-info { background: var(--accent-soft); }
.flash-ok { background: var(--good-soft); color: var(--good); }
.flash-warn { background: var(--mid-soft); }
.flash-bad { background: var(--bad-soft); color: var(--bad); }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.badge-ok { background: var(--good-soft); color: var(--good); }
.badge-warn { background: var(--mid-soft); color: var(--mid); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-busy { background: var(--accent-soft); color: var(--accent); }

.table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 12px 0; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .table { display: block; overflow-x: auto; } }

/* Landing */
.hero { padding: 48px 0 24px; max-width: 720px; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.2rem); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; color: var(--accent); font-weight: 600; margin: 0; }
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0 40px; }
.steps3 > div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.steps3 h3 { margin: 8px 0 4px; }
.steps3 p { margin: 0; color: var(--ink-2); }
.stepnum { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
@media (max-width: 720px) { .steps3 { grid-template-columns: 1fr; } }
.auth { max-width: 420px; margin: 24px auto; }

/* Dashboard */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 2px; }
.tile-num { font: 650 1.9rem var(--serif); font-variant-numeric: tabular-nums; }
.tile-label { color: var(--muted); font-size: .85rem; }
@media (max-width: 720px) { .tiles { grid-template-columns: 1fr 1fr; } }
.catbars { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.catbars a { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 8px; margin: 0 -8px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.catbars a:hover { background: var(--accent-soft); }
.catname { font-weight: 500; font-size: .92rem; }
.catnum { color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.fill { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.fill.good { background: var(--good); } .fill.mid { background: var(--mid); } .fill.low { background: var(--bad); }

/* Upload */
.dropzone { position: relative; display: grid; gap: 4px; place-items: center; text-align: center; padding: 36px 16px; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--paper); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dz-title { font-weight: 600; }
.dz-sub { color: var(--muted); font-size: .88rem; font-weight: 400; }
.dz-file { color: var(--accent); font-weight: 600; }
.tips ul { margin: 0; padding-left: 1.2em; color: var(--ink-2); }

/* Progress */
.progress { height: 10px; background: var(--line); border-radius: 5px; overflow: hidden; }
.progress.slim { height: 4px; margin-top: 8px; }
.progress-fill { display: block; height: 100%; background: var(--accent); transition: width .4s; }
.progress-text { margin: 10px 0; }
.progress-panel[data-finished="0"] .progress-fill { background-image: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; min-width: 4%; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .progress-fill { animation: none !important; transition: none; } }
.concerns { border-color: var(--mid); background: var(--mid-soft); }
.concerns ul { margin: 0; padding-left: 1.2em; }
.qlist { padding-left: 1.4em; margin: 0; }
.qlist li { margin: 6px 0; }
.notetext { white-space: pre-wrap; font: .85rem/1.5 ui-monospace, Menlo, Consolas, monospace; max-height: 420px; overflow: auto; background: var(--paper); padding: 12px; border-radius: 8px; }
details > summary { cursor: pointer; font-weight: 600; }

/* Questions */
.quiz-top { position: sticky; top: 58px; background: var(--paper); padding: 4px 0 10px; z-index: 5; }
.quiz-top h1 { margin-bottom: 0; }
.quiz-top p { margin: 2px 0 0; }
@media (max-width: 720px) { .quiz-top { position: static; } }
.qcard { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 14px 0; box-shadow: var(--shadow); }
.qcard.is-right { border-left-color: var(--good); }
.qcard.is-wrong { border-left-color: var(--bad); }
.qhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qnum { display: grid; place-items: center; min-width: 28px; height: 28px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .9rem; }
.qmeta { color: var(--muted); font-size: .82rem; }
.verdict { margin-left: auto; font-weight: 700; font-size: .85rem; }
.is-right .verdict { color: var(--good); } .is-wrong .verdict { color: var(--bad); }
.stem { font-size: 1.05rem; margin: 12px 0; }
.options { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.opt label, .bankq .opt, .flagged .opt { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-weight: 400; cursor: pointer; }
.opt label:hover { border-color: var(--accent); }
.opt label { position: relative; }
.opt input { position: absolute; left: 12px; top: 12px; opacity: 0; pointer-events: none; }
.letter { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line); font-weight: 600; font-size: .85rem; }
input[type=checkbox] + .letter { border-radius: 6px; }
.opt input:checked + .letter { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.opt input:focus-visible + .letter { outline: 2px solid var(--accent); outline-offset: 2px; }
.opt.key label, .opt.key { border-color: var(--good); background: var(--good-soft); }
.opt.key .letter { border-color: var(--good); }
.opt.chosen:not(.key) label { border-color: var(--bad); background: var(--bad-soft); }
.opt.chosen.key .letter, .opt.key input:checked + .letter { background: var(--good); border-color: var(--good); color: #fff; }
.opt.chosen:not(.key) input:checked + .letter { background: var(--bad); border-color: var(--bad); }
.check-btn { margin-top: 12px; }
.rationale { margin-top: 14px; padding: 12px 14px; background: var(--paper); border-radius: 10px; color: var(--ink-2); }
.qfoot { margin-top: 10px; font-size: .85rem; }
.flag-box { display: grid; gap: 8px; margin-top: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.submit-bar { position: sticky; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; margin: 16px -16px 0; background: var(--card); border-top: 1px solid var(--line); }
.results.only-wrong .is-right { display: none; }

.result-head { display: flex; gap: 24px; align-items: center; margin: 20px 0; flex-wrap: wrap; }
.result-head h1 { margin: 0 0 4px; }
.score-ring { --p: 0; width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--line) 0); }
.score-ring span { display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; background: var(--paper); font: 650 1.6rem var(--serif); }
.due-card { align-items: center; }

/* Bank */
.filters input[type=search] { flex: 1 1 240px; width: auto; }
.filters select { flex: 0 1 280px; width: auto; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 4px 10px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: .82rem; text-decoration: none; color: var(--ink-2); }
.chip span { color: var(--muted); }
.bankq { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 10px 0; }
.bankq summary { display: grid; gap: 4px; font-weight: 400; list-style: none; }
.bankq summary::-webkit-details-marker { display: none; }
.bankq summary .stem { margin: 0; font-size: 1rem; }
.bankq[open] summary { margin-bottom: 12px; }
.pager { display: flex; gap: 16px; justify-content: center; align-items: center; margin: 20px 0; }

/* Admin */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--ink-2); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a[aria-current] { color: var(--accent); border-color: var(--accent); font-weight: 600; }
.flaglist { padding-left: 1.2em; font-size: .9rem; }

.footer { color: var(--muted); font-size: .82rem; padding: 32px 16px 48px; }

.scan-help { border-color: var(--mid); background: var(--mid-soft); }
.scan-help h2 { margin-bottom: .4em; }
.convert-steps { padding-left: 1.3em; margin: .6em 0; display: grid; gap: 6px; }
.tips details { margin-top: 4px; }

.credit { margin: 8px 0 0; font-size: .8rem; color: var(--muted); }
.exam-card { border-color: var(--accent); }
.exam-card h2 { margin-bottom: .2em; }
.seg.exam-pick span { min-width: 120px; text-align: center; }
.blueprint td .bar { display: block; width: 120px; margin-top: 4px; }
.ref-tag { display: inline-block; font-size: .72rem; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }

.ask-form input[type=search] { flex: 1 1 280px; width: auto; }
.tutor-answer { border-color: var(--accent); }
.tutor-answer p, .tutor-answer ul { margin: .5em 0; }
.tutor-answer .sources { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 8px; }
.tutor-answer .sources details { margin: 6px 0; }
.cite { text-decoration: none; font-weight: 600; font-size: .85em; }
.passage { color: var(--ink-2); }
.passage-card { padding: 16px 18px; }
mark { background: var(--mark); color: inherit; padding: 0 2px; border-radius: 3px; }
.passage p { margin: .35em 0; }
.passage ul { margin: .35em 0; padding-left: 1.2em; }
.passage .passage-h { font-weight: 600; color: var(--ink); margin-top: .6em; }

/* Nursing channels we follow */
.video-strip { margin: 48px 0 8px; }
.video-strip .eyebrow { font: 600 .78rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.video-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .video-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .video-row { grid-template-columns: 1fr; } }
.vcard { background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.vthumb { position: relative; display: block; padding: 0; border: 0; background: #000; cursor: pointer; aspect-ratio: 16 / 9; width: 100%; }
.vthumb img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .95; transition: opacity .15s; }
.vthumb:hover img, .vthumb:focus-visible img { opacity: .8; }
.vplay { position: absolute; left: 50%; top: 50%; width: 52px; height: 36px; margin: -18px 0 0 -26px; border-radius: 9px; background: rgba(205, 32, 31, .92); }
.vplay::after { content: ""; position: absolute; left: 21px; top: 10px; border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent #fff; }
.vbody { padding: 10px 12px 12px; display: grid; gap: 6px; }
.vtitle { margin: 0; font-size: .86rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vmeta { margin: 0; font-size: .76rem; color: var(--muted); }
.vmodal { border: 0; padding: 0; border-radius: 12px; width: min(960px, 94vw); background: var(--card); color: var(--ink); }
.vmodal::backdrop { background: rgba(10, 12, 18, .75); }
.vmodal-head { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; font-weight: 600; font-size: .92rem; }
.vframe { aspect-ratio: 16 / 9; background: #000; }
.vframe iframe { width: 100%; height: 100%; border: 0; display: block; }
.vmodal-foot { margin: 0; padding: 10px 14px; font-size: .85rem; }
.vmeta a { white-space: nowrap; }

/* Forum */
.chip-on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.ftopics td:first-child a { font-weight: 600; }
.fpost { padding: 16px 18px; margin: 12px 0; }
.fpost.is-hidden { opacity: .75; border-style: dashed; }
.fpost-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-bottom: 6px; }
.fbody p { margin: .45em 0; overflow-wrap: anywhere; }
.fpost-foot { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 8px; color: var(--muted); }
.freport summary { list-style: none; cursor: pointer; }
.freport summary::-webkit-details-marker { display: none; }
.freport form { margin-top: 8px; }
.freport input { min-width: 220px; }

.footer-links { margin-top: 8px; }
.legal { max-width: 760px; }
.legal h2 { font-size: 1.1rem; margin: 1.6em 0 .4em; }
.legal ul { padding-left: 1.2em; }
.legal li { margin: .35em 0; }

/* Theme switch (sun / moon) */
.theme-toggle { display: inline-grid; place-items: center; width: 38px; height: 38px; margin-left: 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); cursor: pointer; flex: none; }
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-toggle .sun { display: none; }
  :root:not([data-theme]) .theme-toggle .moon { display: block; }
}
.topbar-inner { flex-wrap: nowrap; }
@media (max-width: 720px) { .topbar-inner { flex-wrap: wrap; } .theme-toggle { margin-left: auto; order: 2; } .nav { order: 3; } }

/* Friendly touches */
.tile { border-top: 3px solid var(--accent-soft); }
.tile-num { color: var(--accent); }
.hero h1 { color: var(--ink); }
.eyebrow { color: var(--accent); }
.stepnum { background: var(--warm-soft); color: var(--warm); }
.qnum { background: var(--warm-soft); color: var(--ink); }
.brand + .theme-toggle { margin-left: auto; }

/* Continue with Google (Google's light button style) */
.btn-google { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; padding: 10px 18px; border-radius: 999px;
  border: 1px solid #dadce0; background: #fff; color: #1f1f1f; font: 600 .95rem var(--sans); text-decoration: none; }
.btn-google:hover { background: #f8f9fa; border-color: #c6c9ce; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin: 18px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Share NSG (footer) */
.share { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 18px 0 6px; }
.share-label { font-weight: 700; color: var(--ink-2); margin-right: 4px; }
.share-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); cursor: pointer; padding: 0; transition: color .15s, border-color .15s, transform .08s; }
.share-btn svg { width: 18px; height: 18px; fill: currentColor; }
.share-btn:hover, .share-btn:focus-visible { color: var(--accent); border-color: var(--accent); }
.share-btn:active { transform: translateY(1px); }
.share-msg { font-size: .85rem; color: var(--good); font-weight: 700; }
.share-copy svg, .share-native svg { fill: none; }
.footer .share { margin-top: 0; margin-bottom: 14px; }

/* Flashcards */
.decks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 16px 0; }
.deck { display: grid; gap: 6px; align-content: start; justify-items: start; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); text-decoration: none; box-shadow: 4px 4px 0 -1px var(--card), 4px 4px 0 0 var(--line); transition: transform .12s; }
.deck:hover { transform: translateY(-2px); border-color: var(--accent); }
.deck-title { font: 600 1.08rem var(--serif); }
.deck-head h1 { margin-bottom: 2px; }
.deck-head p { margin: 0; }
.fc-ways { padding-left: 1.2em; display: grid; gap: 6px; margin: 0 0 10px; }
.cardlist { display: grid; gap: 8px; margin: 8px 0 20px; }
.fc-row { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.fc-row summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) auto; gap: 14px; align-items: start; cursor: pointer; list-style: none; }
.fc-row summary::-webkit-details-marker { display: none; }
.fc-front { font-weight: 600; }
.fc-back { color: var(--ink-2); font-size: .93rem; }
.fc-meta { white-space: nowrap; display: flex; gap: 8px; align-items: center; }
.fc-row[open] summary { margin-bottom: 12px; }
.fc-edit { border-top: 1px solid var(--line); padding-top: 12px; }
@media (max-width: 640px) { .fc-row summary { grid-template-columns: 1fr; gap: 4px; } }
.tabpanel[hidden] { display: none; }
.deck-settings summary { cursor: pointer; }
.deck-settings[open] summary { margin-bottom: 12px; }
.to-cards { margin-top: 10px; }
.to-cards select { width: auto; max-width: 220px; }

.study { max-width: 640px; margin: 8px auto 24px; display: grid; gap: 14px; }
.flashcard { perspective: 1200px; min-height: 300px; cursor: pointer; outline: none; }
.flashcard:focus-visible .flash-face { outline: 2px solid var(--accent); outline-offset: 3px; }
.flashcard-inner { position: relative; min-height: 300px; transition: transform .45s cubic-bezier(.3,.7,.3,1); transform-style: preserve-3d; display: grid; }
.flashcard.flipped .flashcard-inner { transform: rotateY(180deg); }
.flash-face { grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow); padding: 34px 28px 28px; display: grid; place-items: center; text-align: center; position: relative; }
.flash-front { border-top: 6px solid var(--accent); }
.flash-back { transform: rotateY(180deg); border-top: 6px solid var(--warm); text-align: left; }
.flash-front .flash-text { font: 600 clamp(1.3rem, 4vw, 1.8rem)/1.25 var(--serif); }
.flash-back .flash-text { font-size: 1.05rem; line-height: 1.5; }
.flash-side { position: absolute; top: 12px; left: 18px; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.study-actions { justify-content: center; }
.study-actions .btn { min-width: 130px; justify-content: center; }
@media (prefers-reduced-motion: reduce) { .flashcard-inner { transition: none; } }
.study [hidden], .tabpanel[hidden] { display: none !important; }

/* Landing page: features + public stats */
.features { margin: 28px 0 8px; }
.features h2 { margin-bottom: 14px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.feature svg { width: 38px; height: 38px; padding: 8px; border-radius: 12px; background: var(--accent-soft); stroke: var(--accent); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { margin: 12px 0 4px; }
.feature p { margin: 0; color: var(--ink-2); }
@media (max-width: 900px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } }
.sitestats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 32px 0 40px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.sitestats > div { padding: 22px 16px; text-align: center; display: grid; gap: 4px; border-left: 1px solid var(--line); }
.sitestats > div:first-child { border-left: 0; }
.sitestat-num { font: 650 2.1rem var(--serif); color: var(--accent); font-variant-numeric: tabular-nums; }
.sitestat-label { color: var(--muted); font-size: .9rem; }
@media (max-width: 720px) { .sitestats { grid-template-columns: 1fr 1fr; } .sitestats > div:nth-child(3) { border-left: 0; } .sitestats > div:nth-child(n+3) { border-top: 1px solid var(--line); } }
.hero-sub { font: 600 clamp(1.15rem, 2.6vw, 1.45rem)/1.35 var(--serif); color: var(--accent); margin: 4px 0 12px; }
.guest-banner { background: var(--accent-soft); border-bottom: 1px solid var(--line); font-size: .92rem; }
.guest-banner .wrap { padding-top: 8px; padding-bottom: 8px; gap: 8px 16px; flex-wrap: wrap; }
.btn-small { padding: 6px 14px; font-size: .88rem; }
.guest-lock { max-width: 680px; margin: 32px auto; }
button.guest-link { font-size: .95rem; padding: 0; background: none; border: 0; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Swipe study */
.flashcard { position: relative; touch-action: pan-y; transition: transform .15s; user-select: none; }
.swipe-hint { position: absolute; top: 14px; z-index: 3; padding: 4px 12px; border-radius: 999px; font-weight: 800; font-size: .85rem; opacity: 0; transition: opacity .12s; pointer-events: none; }
.swipe-again { left: 14px; background: var(--bad); color: #fff; }
.swipe-got { right: 14px; background: var(--good); color: #fff; }
.flashcard.lean-again .swipe-again, .flashcard.lean-got .swipe-got { opacity: 1; }
.study-tip { text-align: center; margin: 0; }

/* Streaks */
.streak { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; max-width: 420px; }
.streak svg { width: 34px; height: 34px; flex: none; fill: var(--line); }
.streak.is-lit svg { fill: var(--warm); }
.streak > div { display: grid; gap: 3px; flex: 1; }
.goalbar { height: 6px; border-radius: 999px; background: var(--accent-soft); overflow: hidden; }
.goalbar span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.streak-row { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin: 8px 0 12px; }
.goal-form select { width: auto; margin-left: 6px; }
.study-done .streak { margin: 12px 0; }

/* Games */
.game [hidden] { display: none !important; }
.game-stat { font-variant-numeric: tabular-nums; font-weight: 700; }
.match-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 12px 0 20px; }
@media (max-width: 720px) { .match-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 420px) { .match-grid { grid-template-columns: repeat(2, 1fr); } }
.match-tile { min-height: 96px; padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: .88rem; line-height: 1.3; cursor: pointer; transition: transform .1s, opacity .3s, background .15s; box-shadow: var(--shadow); }
.match-tile.side-f { font-weight: 700; border-top: 4px solid var(--accent); }
.match-tile.side-b { border-top: 4px solid var(--warm); }
.match-tile:hover { transform: translateY(-2px); }
.match-tile.picked { background: var(--accent-soft); border-color: var(--accent); }
.match-tile.matched { opacity: 0; pointer-events: none; transform: scale(.9); }
.match-tile.wrong { animation: shake .4s; border-color: var(--bad); }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.speed-start { text-align: center; }
.speed-play { max-width: 640px; margin: 0 auto 20px; display: grid; gap: 14px; }
.speed-timer { height: 8px; border-radius: 999px; background: var(--accent-soft); overflow: hidden; }
.speed-timer span { display: block; height: 100%; width: 100%; background: var(--warm); transition: width .1s linear; }
.speed-q { min-height: 120px; font: 600 1.3rem/1.3 var(--serif); }
.speed-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .speed-opts { grid-template-columns: 1fr; } }
.speed-opt { padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.speed-opt:hover { border-color: var(--accent); }
.speed-opt.right { background: color-mix(in srgb, var(--good) 18%, var(--card)); border-color: var(--good); }
.speed-opt.wrong { background: color-mix(in srgb, var(--bad) 15%, var(--card)); border-color: var(--bad); }
@media (prefers-reduced-motion: reduce) { .match-tile, .flashcard { transition: none; } .match-tile.wrong { animation: none; } }
.dash-top { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; margin: 4px 0 8px; }
.install-card { display: grid; gap: 6px; background: var(--card); border: 1px dashed var(--accent); border-radius: var(--radius); padding: 12px 16px; max-width: 460px; }
.install-card[hidden] { display: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.upload-tabs { margin-bottom: 12px; }
.scan-form[hidden], .upload-form[hidden] { display: none; }
.scan-buttons label.btn { cursor: pointer; }
.scan-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.scan-thumbs:empty { display: none; }
.scan-thumb { position: relative; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--paper); }
.scan-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan-num { position: absolute; left: 6px; bottom: 6px; background: var(--accent); color: #fff; font-size: .75rem; font-weight: 800; border-radius: 999px; padding: 1px 8px; }
.scan-remove { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.reminders summary { cursor: pointer; }
.reminders[open] summary { margin-bottom: 8px; }
.reminders select { width: auto; margin-left: 6px; }
.rem-msg:empty { display: none; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.verify-banner { background: color-mix(in srgb, var(--warm) 18%, var(--card)); }
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--av); color: #fff; font-weight: 800; font-size: .85rem; flex: none; }
.avatar-lg { width: 76px; height: 76px; font-size: 1.5rem; }
.avatar-xl { width: 104px; height: 104px; font-size: 2rem; }
.profile-photo-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.swatches { gap: 8px; }
.swatch { width: 26px; height: 26px; border-radius: 50%; display: inline-block; cursor: pointer; }
.swatch.on { outline: 3px solid var(--card); box-shadow: 0 0 0 5px var(--accent); }
.notif-table select { width: auto; }
.notif-table td:nth-child(3) { text-align: center; }
.profile-head { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.profile-head h1 { margin: 0 0 4px; }
.pronouns { font-family: var(--sans); font-weight: 400; }
.profile-bio { font-size: 1.05rem; margin: 18px 0; }
.profile-stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); margin: 8px 0 18px; }
.profile-stats > div { padding: 14px; text-align: center; display: grid; border-left: 1px solid var(--line); }
.profile-stats > div:first-child { border-left: 0; }
.profile-stats .sitestat-num { font-size: 1.5rem; }
@media (max-width: 640px) { .profile-stats { grid-template-columns: 1fr 1fr; } }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.pbadge { padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); font-size: .88rem; font-weight: 600; }
.pbadge-lock { opacity: .45; background: var(--paper); border: 1px dashed var(--line); }
.msg-thread { display: grid; gap: 10px; margin: 10px 0 14px; }
.msg { display: flex; gap: 10px; align-items: flex-end; max-width: 80%; }
.msg p { margin: 0; padding: 10px 14px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); }
.msg.me { margin-left: auto; }
.msg.me p { background: var(--accent); color: #fff; border-color: var(--accent); }
.msg-warn { background: color-mix(in srgb, var(--warm) 16%, var(--card)); border: 1px solid var(--warm); border-radius: 12px; padding: 10px 14px; font-size: .9rem; margin-bottom: 10px; }
img.avatar { object-fit: cover; background: var(--line); }
.avatar-sm { width: 26px; height: 26px; font-size: .66rem; }
.member { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; color: var(--ink); text-decoration: none; }
.member:hover span { text-decoration: underline; }
.nav-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--warm); color: #fff; font-size: .7rem; font-weight: 800; margin-left: 2px; }
.nav a.nav-me { padding: 4px; }
.swatch-pick { display: inline-flex; cursor: pointer; }
.swatch-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swatch-pick input:checked + .swatch { outline: 3px solid var(--card); box-shadow: 0 0 0 5px var(--accent); }
.swatch-pick input:focus-visible + .swatch { box-shadow: 0 0 0 5px var(--ink); }
.report-box { position: relative; }
.report-box summary { list-style: none; cursor: pointer; }
.report-box summary::-webkit-details-marker { display: none; }
.report-box[open] form { position: absolute; right: 0; z-index: 5; width: 280px; margin-top: 6px; }
.profile-head .report-box[open] form { left: 0; right: auto; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; box-shadow: var(--shadow); }
.msg-head { gap: 12px; align-items: center; }
.msg-head h1 { margin: 0; }
.msg-head h1 a { color: inherit; text-decoration: none; }
.msg > div { display: grid; gap: 2px; }
.msg.me > div { justify-items: end; }
.msg-time { font-size: .72rem; color: var(--muted); padding: 0 6px; }
.msg-compose textarea { flex: 1; }
.msg-request { border-color: var(--accent); }
.convs { display: grid; gap: 8px; margin-bottom: 20px; }
.conv { display: flex; gap: 12px; align-items: center; padding: 12px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none; }
.conv:hover { border-color: var(--accent); }
.conv-main { display: grid; flex: 1; min-width: 0; }
.conv-name { font-weight: 700; }
.conv-last { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv.unread .conv-name, .conv.unread .conv-last { color: var(--ink); font-weight: 800; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--warm); }
.thanks-btn.on { color: var(--warm); font-weight: 700; }
.thanks-count { margin-right: 6px; }
.admin-thread { max-height: 420px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 12px; }
.report-item h2 { margin-top: 0; }

/* Account menu (avatar, top right): always visible, never scrolls away with the menu links */
.nav { flex: 1 1 auto; min-width: 0; }
.nav > a:first-child { margin-left: auto; }
@media (max-width: 720px) { .nav > a:first-child { margin-left: 0; } }
.topbar-inner:has(.nav) .brand-sub { display: none; }
.avatar-md { width: 34px; height: 34px; font-size: .78rem; }
.usermenu { position: relative; flex: none; }
.usermenu summary { list-style: none; display: flex; align-items: center; gap: 3px; cursor: pointer; padding: 3px; border-radius: 999px; color: var(--ink-2); }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu summary:hover, .usermenu[open] summary { background: var(--accent-soft); }
.usermenu summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.usermenu .caret { width: 12px; height: 12px; }
.usermenu-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 220px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; display: grid; }
.usermenu-panel a, .usermenu-panel .linkish { display: block; text-align: left; width: 100%; padding: 9px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: .95rem; }
.usermenu-panel a:hover, .usermenu-panel .linkish:hover { background: var(--accent-soft); }
.usermenu-panel form { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid var(--line); }
.usermenu-name { margin: 4px 12px 8px; display: grid; }
@media (max-width: 720px) { .usermenu { order: 2; margin-left: auto; } .usermenu + .theme-toggle { margin-left: 4px; } }

/* ---------- Grouped menu (update 25) ---------- */
.nav { overflow: visible; gap: 4px; }
.nav > a:first-child { margin-left: auto; }
.nav a, .navmenu summary { padding: 8px 12px; font-size: .95rem; }
.navmenu { position: relative; }
.navmenu summary { list-style: none; display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.navmenu summary::-webkit-details-marker { display: none; }
.navmenu summary:hover, .navmenu[open] summary { background: var(--accent-soft); }
.navmenu summary[aria-current] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.navmenu summary:focus-visible, .nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.navmenu .caret { width: 12px; height: 12px; transition: transform .15s; }
.navmenu[open] .caret { transform: rotate(180deg); }
.navmenu-panel { position: absolute; left: 0; top: calc(100% + 8px); z-index: 20; min-width: 240px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; display: grid; }
.navmenu:last-child .navmenu-panel { left: auto; right: 0; }
.navmenu-item, .navmenu-panel form .navmenu-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font: inherit; font-size: .95rem; background: none; border: 0; text-align: left; cursor: pointer; }
.navmenu-item:hover { background: var(--accent-soft); }
.navmenu-panel form, .sheet form { margin: 0; }
.nav .nav-count { margin-left: 4px; }

/* Phones: bottom tab bar replaces the top menu */
.tabbar { display: none; }
@media (max-width: 720px) {
  .topbar .nav, .topbar .usermenu { display: none; }
  .brand + .theme-toggle, .topbar .theme-toggle { margin-left: auto; }
  body:has(.tabbar) { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--card); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 18px rgba(0,0,0,.06); }
  .tabbar > a, .tabmenu > summary { display: grid; justify-items: center; gap: 2px; padding: 4px 0; color: var(--muted); text-decoration: none; font-size: .7rem; font-weight: 700; list-style: none; cursor: pointer; position: relative; }
  .tabmenu > summary::-webkit-details-marker { display: none; }
  .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar .avatar { width: 24px; height: 24px; font-size: .6rem; }
  .tabbar [aria-current], .tabmenu[open] > summary { color: var(--accent); }
  .tabbar > a .nav-count, .tabmenu > summary .nav-count { position: absolute; top: 0; left: calc(50% + 6px); margin: 0; }
  .tabmenu .sheet { position: fixed; left: 8px; right: 8px; bottom: calc(72px + env(safe-area-inset-bottom)); z-index: 31; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 10px; display: grid; max-height: 70vh; overflow: auto; }
  .tabmenu .sheet .navmenu-item { padding: 13px 14px; font-size: 1rem; }
  .sheet-title { margin: 4px 14px 6px; font-weight: 800; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
  .sheet form:last-child { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
}
.notes-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 8px 0 20px; }
@media (max-width: 560px) { .notes-actions { grid-template-columns: 1fr; } }
.action-card { display: flex; gap: 14px; align-items: center; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.action-card:hover { border-color: var(--accent); }
.action-card svg { width: 42px; height: 42px; padding: 9px; border-radius: 12px; background: var(--accent-soft); stroke: var(--accent); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.action-card > span { display: grid; }
.dash-head { align-items: center; gap: 12px; flex-wrap: wrap; }
.dash-head h1 { margin: 0; }
.dash-ask { display: flex; gap: 8px; flex: 1 1 320px; max-width: 460px; }
.dash-ask input { flex: 1; }

/* Public study pages (question, topic, category, shared deck) */
.crumbs { margin: 4px 0 14px; color: var(--muted); }
.crumbs a { color: var(--ink-2); }
.seo-question { max-width: 780px; }
.seo-stem { font-size: clamp(1.3rem, 3vw, 1.75rem); line-height: 1.3; }
.seo-opts { display: grid; gap: 8px; padding-left: 0; list-style: none; counter-reset: opt; margin: 16px 0; }
.seo-opts li { counter-increment: opt; padding: 12px 14px 12px 48px; position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.seo-opts li::before { content: counter(opt, upper-alpha); position: absolute; left: 14px; top: 11px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: .8rem; }
.seo-question:has(.seo-answer[open]) .seo-opts li[data-correct="1"] { border-color: var(--good); background: color-mix(in srgb, var(--good) 12%, var(--card)); }
.seo-answer summary { list-style: none; display: inline-flex; }
.seo-answer summary::-webkit-details-marker { display: none; }
.seo-answer[open] summary { margin-bottom: 12px; }
.seo-correct { font-size: 1.05rem; }
.seo-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 24px 0; border-color: var(--accent); }
.seo-cta > div { display: grid; gap: 2px; max-width: 620px; }
.seo-list { display: grid; gap: 8px; padding-left: 1.2em; }
.seo-qlist { display: grid; gap: 14px; padding-left: 1.6em; }
.seo-qlink { font-weight: 600; color: var(--ink); }
.seo-mini summary { list-style: none; cursor: pointer; margin-top: 4px; }
.seo-mini summary::-webkit-details-marker { display: none; }
.seo-excerpt .excerpt-text { font-size: .98rem; line-height: 1.6; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 18px; }
.chip { padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: .9rem; }
.chip:hover { border-color: var(--accent); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin: 8px 0 20px; }
.cat-card { display: grid; gap: 4px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none; }
.cat-card:hover { border-color: var(--accent); }
.seo-cards { display: grid; gap: 0; margin: 0; }
.seo-cards > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.seo-cards > div:first-child { border-top: 0; }
.seo-cards dt { font-weight: 700; }
.seo-cards dd { margin: 0; color: var(--ink-2); }
@media (max-width: 560px) { .seo-cards > div { grid-template-columns: 1fr; gap: 4px; } }
.pager { gap: 8px; margin-top: 12px; }
.share-form { margin: 12px 0; }
.excerpt-text p { margin: 0 0 8px; }
.excerpt-text .excerpt-h { font-weight: 800; margin-top: 10px; }
.excerpt-text .excerpt-row { font-size: .92rem; color: var(--ink-2); margin-bottom: 2px; }
.excerpt-text ul { margin: 0 0 8px; padding-left: 1.2em; }
