/* app.css — Cadus SPA. Technical, precise, keyboard-first. Dark-first in the
   Tokyo Night palette (see CLAUDE.md § Design Context); Tokyo Night Day is the
   light fallback. All color flows through the tokens below — no hard-coded hex. */

:root {
  color-scheme: dark;
  /* Tokyo Night (night) — the main, dark-first theme. */
  --bg: #1a1b26;
  --bg-dark: #16161e;
  --surface: #1f2335;
  --surface-2: #24283b;
  --text: #c0caf5;
  --muted: #7e88b4;         /* lightened from Tokyo Night #565f89 to meet WCAG AA */
  --border: #292e42;
  --accent: #7aa2f7;        /* blue — primary/focus */
  --accent-2: #bb9af7;      /* purple — secondary accent */
  --accent-ink: #1a1b26;    /* text/glyphs ON a bright accent fill */
  --accent-weak: rgba(122, 162, 247, 0.14);
  --good: #9ece6a;          /* green — correct/pass */
  --good-weak: rgba(158, 206, 106, 0.13);
  --bad: #f7768e;           /* red — incorrect/fail */
  --bad-weak: rgba(247, 118, 142, 0.13);
  --warn: #e0af68;          /* yellow — caution */
  --info: #7dcfff;          /* cyan — info/links */
  --scrim: rgba(10, 12, 20, 0.55);   /* modal backdrop overlay */
  --ring-bg: #292e42;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --maxw: 720px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
}

/* Light fallback — Tokyo Night Day (only when the OS explicitly prefers light). */
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #e1e2e7;
    --bg-dark: #d0d5e3;
    --surface: #ffffff;
    --surface-2: #d5d6db;
    --text: #24283b;
    --muted: #6b7089;
    --border: #c4c8da;
    --accent: #2e7de9;
    --accent-2: #9854f1;
    --accent-ink: #ffffff;
    --accent-weak: rgba(46, 125, 233, 0.10);
    --good: #587539;
    --good-weak: rgba(88, 117, 57, 0.10);
    --bad: #f52a65;
    --bad-weak: rgba(245, 42, 101, 0.10);
    --warn: #8f5e15;
    --info: #007197;
    --scrim: rgba(16, 24, 40, 0.35);
    --ring-bg: #d5d6db;
    --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 6px 20px rgba(16, 24, 40, 0.06);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.25; margin: 0 0 0.4rem; }
h2 { font-size: 1.4rem; }
p { margin: 0.4rem 0; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

/* ---- topbar ---- */
.topbar {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.8rem 1rem; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg); z-index: 5;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: none; border: 0; color: var(--text); cursor: pointer;
  font-size: 1.05rem; font-weight: 650; padding: 0.2rem 0.3rem; border-radius: 8px;
}
.brand:hover { background: var(--surface-2); }
.brand-mark { display: inline-flex; width: 1.15em; height: 1.15em; }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.demo-badge {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em;
  color: var(--accent); border: 1px solid var(--accent); border-radius: 999px;
  padding: 0.1rem 0.5rem;
}
/* Signed-in cluster, pushed to the trailing edge. */
.topbar-user { margin-left: auto; display: inline-flex; align-items: center; gap: 0.6rem; min-width: 0; }
.user-email {
  font-size: 0.82rem; color: var(--muted);
  max-width: min(44vw, 240px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.logout-btn { min-height: 34px; padding: 0.35rem 0.7rem; font-size: 0.85rem; }

/* ---- layout ---- */
.view { max-width: var(--maxw); margin: 0 auto; padding: 1.2rem 1rem 4rem; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.2rem; margin-bottom: 1rem;
}

/* ---- buttons ---- */
.btn {
  appearance: none; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font: inherit; font-weight: 550;
  padding: 0.7rem 1.1rem; border-radius: 10px; cursor: pointer;
  transition: background 0.12s, border-color 0.12s, transform 0.05s;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: 44px;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 650; }
.btn-primary:hover { filter: brightness(1.08); background: var(--accent); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); }
.btn:disabled, .btn.is-busy { opacity: 0.65; cursor: default; }
.btn.is-busy { position: relative; color: transparent; }
.btn.is-busy::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  color: var(--muted); animation: spin 0.7s linear infinite;
}
.btn-primary.is-busy::after { color: var(--accent-ink); }

/* ---- dashboard ---- */
.status-card { padding-bottom: 1rem; }
.status-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.status-head h2 { margin-bottom: 0.15rem; }
.ring { position: relative; flex: 0 0 auto; display: grid; place-items: center; }
.ring svg { display: block; }
.ring-bg { stroke: var(--ring-bg); }
.ring-fg { stroke: var(--accent); transition: stroke-dashoffset 0.6s ease; }
.ring-label { position: absolute; text-align: center; }
.ring-label strong { display: block; font-size: 1.25rem; }
.ring-label span { font-size: 0.72rem; color: var(--muted); }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; margin-top: 1rem; }
.stat {
  background: var(--surface-2); border-radius: 10px; padding: 0.7rem 0.6rem; text-align: center;
}
.stat-value { font-size: 1.3rem; font-weight: 700; }
.stat-label { font-size: 0.75rem; color: var(--muted); }
.stat.accent .stat-value { color: var(--accent); }
.stat.warn .stat-value { color: var(--warn); }

.outbox-line { display: flex; align-items: center; justify-content: space-between; margin-top: 1rem; }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.demo-hint { text-align: center; color: var(--muted); font-size: 0.85rem; margin-top: 1rem; }

/* ---- chips ---- */
.chip {
  display: inline-flex; align-items: center; font-size: 0.72rem; font-weight: 650;
  padding: 0.15rem 0.55rem; border-radius: 999px; background: var(--surface-2); color: var(--muted);
  text-transform: capitalize; letter-spacing: 0.01em;
}
.chip-accent, .chip-lesson { background: var(--accent-weak); color: var(--accent); }
.chip-review { background: var(--accent-weak); color: var(--accent); }
.chip-quiz { background: var(--bad-weak); color: var(--bad); }
.chip-good { background: var(--good-weak); color: var(--good); }
.chip-bad { background: var(--bad-weak); color: var(--bad); }
.chip-xp { background: var(--good-weak); color: var(--good); }
.chip-quality { background: var(--surface-2); }
.note { margin-top: 0.9rem; color: var(--muted); }

/* ---- task header ---- */
.task-header { margin-bottom: 0.8rem; }
.task-meta { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.topic-name { font-weight: 650; }
.topic-module { font-size: 0.8rem; color: var(--muted); }
.task-right { display: flex; align-items: center; gap: 0.8rem; margin-top: 0.35rem; color: var(--muted); font-size: 0.9rem; }
.progress-count { font-variant-numeric: tabular-nums; }
.timer { font-variant-numeric: tabular-nums; font-weight: 600; }
.clock { color: var(--text); }
.clock.urgent { color: var(--bad); }
.why-chip {
  margin-top: 0.5rem; font-size: 0.82rem; color: var(--muted);
  background: var(--surface-2); border-radius: 8px; padding: 0.35rem 0.6rem; display: inline-block;
}

/* ---- problem + answer ---- */
.problem-card { padding: 1.3rem 1.2rem; }
.problem-text { font-size: 1.15rem; margin-bottom: 1rem; overflow-x: auto; }
.problem-text .katex { font-size: 1.15em; }
.answer-field { margin-bottom: 0.7rem; }
.answer-input, .work-input, .token-input, .auth-input {
  width: 100%; font: inherit; color: var(--text);
  background: var(--surface); border: 1.5px solid var(--border); border-radius: 10px;
  padding: 0.75rem 0.85rem;
}
.answer-input { font-size: 1.1rem; }
.answer-input:focus, .work-input:focus, .token-input:focus, .auth-input:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak);
}
.field-hint { font-size: 0.8rem; color: var(--muted); margin: 0.35rem 0.2rem 0; }
.sym-palette { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.4rem; }
.sym-key {
  min-width: 2.1rem; padding: 0.25rem 0.45rem; font-size: 1rem; line-height: 1;
  color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; cursor: pointer;
}
.sym-key:hover { border-color: var(--accent); background: var(--accent-weak); }
.work { margin-bottom: 0.8rem; }
.work summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; padding: 0.3rem 0; }
.work-input { margin-top: 0.5rem; resize: vertical; }
.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.actions .btn-primary { order: 2; }
.hint-list { margin-bottom: 0.8rem; }
.hint {
  background: var(--accent-weak); border-radius: 10px; padding: 0.6rem 0.8rem; margin-bottom: 0.5rem;
  font-size: 0.95rem;
}
.hint-text { display: inline; }

/* ---- feedback ---- */
.feedback { margin-top: 1rem; padding: 1rem; border-radius: 12px; border: 1px solid var(--border); }
.feedback-correct { background: var(--good-weak); border-color: var(--good); }
.feedback-incorrect { background: var(--bad-weak); border-color: var(--bad); }
.feedback-skip { background: var(--surface-2); }
.feedback-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.feedback-mark { display: inline-flex; }
.feedback-correct .feedback-mark { color: var(--good); }
.feedback-incorrect .feedback-mark { color: var(--bad); }
.feedback-skip .feedback-mark { color: var(--muted); }
.feedback-title { font-weight: 700; font-size: 1.05rem; }
.feedback-text { margin: 0.3rem 0 0.6rem; }
.feedback .btn { margin-top: 0.8rem; }
.solution { margin-top: 0.6rem; padding-top: 0.6rem; border-top: 1px dashed var(--border); }
.solution-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 0.2rem; }
.solution-text { overflow-x: auto; }
.remediation { margin: 0.3rem 0 0 1rem; padding: 0; }

/* ---- quiz ---- */
.quiz-note { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-top: 0.8rem; font-size: 0.85rem; }
.remaining { font-weight: 650; color: var(--accent); }
.quiz-score { display: flex; align-items: center; gap: 0.8rem; margin: 0.4rem 0 0.2rem; }
.score-big { font-size: 2rem; font-weight: 750; }
.reveal-list { display: grid; gap: 0.6rem; }
.reveal-item { background: var(--surface); border: 1px solid var(--border); border-left-width: 4px; border-radius: 10px; padding: 0.8rem 0.9rem; }
.reveal-item.ok { border-left-color: var(--good); }
.reveal-item.bad { border-left-color: var(--bad); }
.reveal-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.4rem; }
.q-index { font-weight: 700; }
.reveal-q { font-size: 1.02rem; margin-bottom: 0.35rem; overflow-x: auto; }
.reveal-your, .reveal-exp { font-size: 0.92rem; }
.center-actions { text-align: center; margin-top: 1.2rem; }

/* ---- diagnostic ---- */
.progress-bar { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-bottom: 1rem; }
.progress-fill { height: 100%; background: var(--accent); transition: width 0.3s ease; }
.view-diagnostic .feedback { display: flex; align-items: center; gap: 0.5rem; }
.view-diagnostic .feedback .btn { margin-top: 0; }
.frontier-list { margin: 0.3rem 0 0 1.1rem; padding: 0; }
.frontier-block { margin-top: 0.8rem; }

/* ---- diagnostic intro (P3: brief the learner before probe 1) ---- */
.intro-card { outline: none; } /* R15: card takes programmatic focus on entry — no ring */
.intro-card h2 { margin-bottom: 0.4rem; }
.intro-rules { margin: 0.9rem 0 0.2rem; padding-left: 1.15rem; display: flex; flex-direction: column; gap: 0.7rem; }
.intro-rules li { line-height: 1.5; }
.intro-rules li::marker { color: var(--accent); }
.intro-rules strong { color: var(--accent); }

/* ---- summary ---- */
.summary-card { text-align: center; }
.summary-card .stat-grid { margin: 1rem 0; }
.summary-card .btn { margin-top: 0.5rem; }

/* ---- empty / loading ---- */
.empty { text-align: center; padding: 3rem 1rem; }
.empty .btn { margin-top: 1rem; }
.loading { display: flex; align-items: center; justify-content: center; gap: 0.6rem; color: var(--muted); padding: 3rem 1rem; }
.spinner svg { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- toast ---- */
.toasts { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 50; display: grid; gap: 0.5rem; width: min(92vw, 460px); }
.toast {
  display: flex; align-items: center; gap: 0.6rem; background: var(--surface);
  border: 1px solid var(--border); border-left: 4px solid var(--bad);
  border-radius: 10px; padding: 0.7rem 0.9rem; box-shadow: var(--shadow);
  animation: rise 0.18s ease;
}
.toast-info { border-left-color: var(--accent); }
.toast-success { border-left-color: var(--good); }
.toast-msg { flex: 1; font-size: 0.92rem; }
.toast-action { background: none; border: 0; color: var(--accent); font: inherit; font-weight: 650; cursor: pointer; padding: 0.2rem 0.4rem; }
.toast-close { background: none; border: 0; color: var(--muted); font-size: 1.2rem; line-height: 1; cursor: pointer; padding: 0 0.2rem; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* ---- modal / auth ---- */
.modal-overlay { position: fixed; inset: 0; background: var(--scrim); display: grid; place-items: center; z-index: 100; padding: 1rem; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.6rem; width: min(92vw, 380px); }
.token-modal { display: grid; gap: 0.7rem; }
.brand-lg { font-size: 1.5rem; font-weight: 700; }
.token-modal .btn { margin-top: 0.2rem; }
.field-error { color: var(--bad); font-size: 0.85rem; }

/* ---- auth view (login / signup) — reuses the modal card, centered in #view ---- */
.auth-view { display: grid; place-items: center; min-height: 62vh; padding: 1.5rem 0; }
.auth-card { display: grid; gap: 0.55rem; width: min(92vw, 380px); }
.auth-brand { display: inline-flex; align-items: center; gap: 0.55rem; }
.auth-brand .brand-mark { width: 1.7rem; height: 1.7rem; }
.auth-tagline { margin: 0.1rem 0 0.4rem; font-size: 0.92rem; }
.auth-mode {
  font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent); margin: 0 0 0.3rem;
}
.auth-label { font-size: 0.78rem; font-weight: 600; color: var(--muted); margin-top: 0.15rem; }
.auth-submit { margin-top: 0.7rem; width: 100%; }
.auth-toggle { margin: 0.6rem 0 0; font-size: 0.9rem; text-align: center; }
/* AUTH-8 recovery flows: intro/confirmation copy + the "Forgot password?" affordance. */
.auth-help { margin: 0.1rem 0 0.6rem; font-size: 0.9rem; line-height: 1.5; }
.auth-forgot { margin: 0.5rem 0 0; font-size: 0.85rem; text-align: right; }
.link-btn {
  background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
  color: var(--accent); font-weight: 600;
}
.link-btn:hover { text-decoration: underline; }
.link-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.auth-divider {
  display: flex; align-items: center; gap: 0.6rem;
  margin: 0.8rem 0 0.2rem; color: var(--muted); font-size: 0.8rem;
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}
.oauth-btn { width: 100%; margin-top: 0.4rem; }

/* ---- worksheet / formula-sheet picker (W5) ---- */
.picker-modal { display: grid; gap: 0.4rem; }
.picker-modal h2 { margin: 0 0 0.3rem; font-size: 1.1rem; }
.picker-label { font-size: 0.78rem; font-weight: 600; color: var(--muted); margin-top: 0.3rem; }
.picker-select {
  width: 100%; padding: 0.5rem 0.6rem; font: inherit; color: inherit;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.picker-select:disabled { opacity: 0.5; }
.picker-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.picker-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 0.7rem; }

/* ---- responsive ---- */
@media (max-width: 560px) {
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .action-grid { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
  .view { padding: 1rem 0.75rem 4rem; }
  .card { padding: 1rem; }
  .status-head { flex-direction: column-reverse; align-items: flex-start; }
  .ring svg { width: 96px; height: 96px; }
  .stat-value { font-size: 1.15rem; }
  .problem-text { font-size: 1.08rem; }
}

/* Lesson worked-example (direct instruction before practice — PEDAGOGY §2) */
.teach-badge {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--accent); border: 1px solid var(--accent); border-radius: 999px;
  padding: 0.15rem 0.6rem;
}
.teach-card { border-left: 3px solid var(--accent); }
.teach-concept { font-size: 1.05rem; margin-bottom: 1rem; }
.teach-example {
  background: var(--surface-2); border-radius: 10px; padding: 0.9rem 1.1rem;
  margin-bottom: 1.1rem;
}
.teach-label {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted); margin: 0.2rem 0 0.3rem;
}
.teach-problem { font-weight: 600; margin-bottom: 0.6rem; }
.teach-steps { color: var(--muted); }

/* Dashboard: single primary action, journey arc, More menu (W-C) */
.course-arc {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  margin-bottom: 1rem; font-size: 0.9rem;
}
.arc-course { color: var(--muted); }
.arc-current { color: var(--accent); font-weight: 700; }
.arc-sep { color: var(--border); }
.btn-hero { font-size: 1.05rem; padding: 0.85rem 1.4rem; width: 100%; }
.primary-action { margin: 1.1rem 0 0.5rem; }
.primary-sub { margin: 0.5rem 0 0; text-align: center; }
.caught-up { font-size: 1.05rem; margin: 0 0 0.6rem; text-align: center; }
.onboard-card { text-align: center; }
.onboard-card .btn-hero { margin: 1rem 0 0.4rem; }
.onboard-foot { margin-top: 0.4rem; }
.more-menu { margin-top: 1.2rem; border-top: 1px solid var(--border); padding-top: 0.6rem; }
.more-menu summary {
  cursor: pointer; color: var(--muted); font-size: 0.9rem; list-style: none;
  padding: 0.3rem 0;
}
.more-menu summary::-webkit-details-marker { display: none; }
.more-menu summary::before { content: '⌄ '; }
.more-menu[open] summary::before { content: '⌃ '; }
.more-actions {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem;
}
.more-caption { margin: 0.6rem 0 0; }

/* Progress / "what you've learned" panel (W-E3) */
.progress-card { margin-top: 1rem; }
.progress-card h3 { margin: 0 0 0.6rem; font-size: 1rem; }
.progress-notes { margin: 0; padding-left: 1.1rem; color: var(--muted); }
.progress-notes li { margin: 0.25rem 0; }

/* Stuck-on-review reference-lesson pointer (W-A4) */
.reference-lesson {
  margin-top: 0.6rem; padding: 0.6rem 0.8rem; border-radius: 8px;
  background: var(--accent-weak); color: var(--muted); font-size: 0.92rem;
}

/* Technical readouts — timers, scores, XP/streak and other numerics read as
   instrument output: monospace with aligned (tabular) figures. (Design Context
   principle 3: monospace for the technical.) */
.timer, .clock, .progress-count, .remaining,
.stat-value, .score-big, .ring-label strong, .mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* Anki connection panel (AK-2.4) — hairline rows, mono readouts, token-only
   state dots; high-signal, low-chrome per the Design Context. */
.view-anki { max-width: 640px; margin: 0 auto; }
.anki-head { margin-bottom: 1.5rem; }
.anki-panel { border-top: 1px solid var(--border); margin: 1rem 0; }
.anki-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.7rem 0; border-bottom: 1px solid var(--border);
}
.anki-row-label { color: var(--muted); }
.anki-row-value { text-align: right; }
.anki-row-toggle { cursor: pointer; }
.anki-status { display: inline-flex; align-items: center; gap: 0.5rem; }
.anki-dot {
  width: 0.6rem; height: 0.6rem; border-radius: 50%;
  background: var(--muted); display: inline-block;
}
.anki-dot-ok { background: var(--good); }
.anki-dot-down { background: var(--bad); }
.anki-dot-warn { background: var(--warn); }
.anki-dot-info { background: var(--info); }
.anki-url {
  width: 18rem; max-width: 60vw; padding: 0.35rem 0.5rem;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 6px;
}
.anki-url-edit { display: inline-flex; gap: 0.5rem; align-items: center; }
.anki-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }
.anki-foot { margin-top: 1rem; }
.anki-toggle { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }

/* Respect reduced-motion: strip the spinners, transitions, and entrance motion
   for anyone who asks (Design Context principle 4). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
