/* Swiftmark styles: steno pad paper, fountain pen ink */
:root {
  --paper: #f6f2e7; --paper-2: #ede7d6; --card: #fffdf8; --line: #e2dac6; --line-2: #d4cab2;
  --text: #1f1d1a; --muted: #6d675c; --ink: #1b2a6b; --ink-dark: #121d4d;
  --accent: #df7a1c; --accent-dark: #b45f10; --good: #2f8f5b; --good-dark: #237046; --bad: #c2413a; --bad-dark: #9b302a; --gold: #d29b17;
  --guide: rgba(27, 42, 107, .13); --guide-strong: rgba(27, 42, 107, .5);
  --steno: rgba(47, 143, 91, .16);
  --radius: 16px; --shadow: 0 1px 0 rgba(60, 50, 30, .06), 0 8px 24px -12px rgba(60, 50, 30, .22);
  --display: 'Fraunces', Georgia, 'Times New Roman', serif; --ui: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; --hand: 'Caveat', 'Segoe Print', cursive;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 var(--ui); color: var(--text); background: var(--paper); min-height: 100vh;
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, var(--steno) 31px 32px); background-attachment: fixed; }
body.big-text { font-size: 18.5px; }
body.playing { overflow: hidden; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.01em; line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: 2.1rem; } h2 { font-size: 1.55rem; } h3 { font-size: 1.12rem; }
p { margin: 0 0 .8em; }
a { color: var(--ink); }
code { background: var(--paper-2); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
button { font: inherit; color: inherit; }
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.muted { color: var(--muted); } .small { font-size: .86rem; } .center { text-align: center; }
.lead { font-size: 1.08rem; color: #3d3931; }
.k { display: block; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.row { display: flex; gap: 10px; align-items: center; } .row.end { justify-content: flex-end; } .row.between { justify-content: space-between; } .row.center { justify-content: center; } .row.wrap { flex-wrap: wrap; } .nowrap { flex-wrap: nowrap; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.loading { color: var(--muted); padding: 20px; }
.notice { display: flex; gap: 10px; align-items: flex-start; background: #eef2fb; border: 1px solid #cfd8ef; color: #2a3561; padding: 12px 14px; border-radius: 12px; margin: 0 0 14px; font-size: .92rem; }
.notice.warn { background: #fbf1e3; border-color: #efd5ad; color: #6a4413; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 99px; background: var(--paper-2); font-size: .78rem; font-weight: 600; text-transform: capitalize; }
.pill.gold { background: #f8ebc5; color: #7a5a06; } .pill.bad { background: #f7dcd9; color: var(--bad-dark); }
.avatar { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; font-family: var(--display); font-weight: 700; flex: none; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 11px 18px; font-weight: 700; cursor: pointer; background: var(--paper-2); color: var(--text);
  box-shadow: 0 3px 0 var(--line-2); transition: transform .08s, box-shadow .08s, background .15s; text-decoration: none; letter-spacing: .01em; }
.btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--line-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--ink); color: #fff; box-shadow: 0 3px 0 var(--ink-dark); }
.btn.primary:active:not(:disabled) { box-shadow: 0 1px 0 var(--ink-dark); }
.btn.secondary { background: var(--accent); color: #fff; box-shadow: 0 3px 0 var(--accent-dark); }
.btn.good { background: var(--good); color: #fff; box-shadow: 0 3px 0 var(--good-dark); }
.btn.danger { background: var(--bad); color: #fff; box-shadow: 0 3px 0 var(--bad-dark); }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 2px var(--line); }
.btn.ghost:hover { background: var(--paper-2); }
.danger-text { color: var(--bad) !important; }
.btn.big { padding: 15px 26px; font-size: 1.05rem; } .btn.wide { width: 100%; } .btn.small { padding: 6px 12px; font-size: .85rem; border-radius: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); background: var(--card); border-radius: 99px; padding: 6px 13px; font-size: .88rem; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s; }
.chip:hover { border-color: var(--ink); }
.chip.light { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .35); color: #fff; }
.chip.light:hover { background: rgba(255, 255, 255, .26); border-color: #fff; }
.icon-btn { border: 0; background: none; padding: 6px; border-radius: 10px; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: var(--paper-2); color: var(--text); }
.icon-btn .ic { width: 26px; height: 26px; }
.input { width: 100%; border: 2px solid var(--line); border-radius: 12px; padding: 11px 13px; background: #fff; font: inherit; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(27, 42, 107, .12); }
textarea.input { resize: vertical; }
:focus-visible { outline: 3px solid rgba(223, 122, 28, .55); outline-offset: 2px; }
.kbd { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 1.5px solid var(--line); border-radius: 6px; font-size: .72rem; color: var(--muted); font-weight: 700; }
.tabs { display: flex; gap: 4px; background: var(--paper-2); padding: 4px; border-radius: 14px; margin-bottom: 16px; }
.tabs.inline { display: inline-flex; flex-wrap: wrap; }
.tab { border: 0; background: none; padding: 9px 16px; border-radius: 10px; font-weight: 700; cursor: pointer; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.tab.on { background: var(--card); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }

/* gregg svg */
.greggsvg { display: block; overflow: visible; max-width: 100%; height: auto; }
.gs-start { fill: var(--good); opacity: .85; }
.gs-dot { transition: opacity .2s; }

/* toasts & modal */
#toasts { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: 8px; width: min(440px, calc(100vw - 24px)); pointer-events: none; }
.toast { display: flex; gap: 10px; align-items: center; background: #23211c; color: #fff; padding: 12px 16px; border-radius: 14px; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .4); animation: toastIn .3s cubic-bezier(.2, .9, .3, 1.3); font-size: .93rem; }
.toast.good .ic { color: #7fe0a8; } .toast.gold .ic { color: #ffd35c; } .toast.bad .ic { color: #ff9b94; }
.toast.out { opacity: 0; transform: translateY(-8px); transition: .4s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px) scale(.96); } }
.modal-wrap { position: fixed; inset: 0; background: rgba(31, 29, 26, .45); z-index: 300; display: grid; place-items: center; padding: 16px; opacity: 0; transition: opacity .18s; backdrop-filter: blur(2px); }
.modal-wrap.in { opacity: 1; } .modal-wrap.out { opacity: 0; }
.modal { position: relative; background: var(--card); border-radius: 20px; padding: 26px; width: min(460px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45); transform: translateY(10px) scale(.98); transition: transform .2s; }
.modal-wrap.in .modal { transform: none; }
.modal.wide { width: min(760px, 100%); } .modal.center { text-align: center; }
.modal-x { position: absolute; top: 12px; right: 12px; border: 0; background: var(--paper-2); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.modal h3 { margin-top: 0; }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 500; }
.action-list { display: grid; gap: 8px; margin-top: 12px; }

/* ================= AUTH ================= */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
.auth-brand { background: var(--ink); color: #f4f1ea; padding: 56px 6vw; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden;
  background-image: repeating-linear-gradient(to bottom, transparent 0 47px, rgba(255, 255, 255, .06) 47px 48px); }
.auth-brand > * { position: relative; z-index: 1; }
.auth-brand h1 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); margin: 28px 0 16px; color: #fff; }
.auth-brand .lead { color: #cfd3e6; max-width: 520px; }
.auth-demo { display: flex; gap: 22px; align-items: flex-end; margin: 26px 0; color: #fff; flex-wrap: wrap; }
.auth-demo figure { margin: 0; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); border-radius: 14px; padding: 10px 14px 6px; --ink: #fff; }
.auth-demo figcaption { font-family: var(--hand); font-size: 1.35rem; color: #f3c58f; text-align: center; }
.auth-demo .gb-line { stroke: #fff; }
.auth-points { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 10px; color: #dfe2ef; }
.auth-points li { display: flex; gap: 10px; align-items: center; } .auth-points .ic { color: var(--accent); }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 1.3rem; text-decoration: none; color: inherit; }
.brand.big { font-size: 1.7rem; }
.logo { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #1e2f5e; color: #fff; padding: 5px; }
.auth-brand .logo { background: #fffdf6; color: #1e2f5e; }
.logo svg { width: 100%; height: 100%; }
.logo .ic { width: 26px; height: 26px; }
.auth-panel { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: min(420px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 26px; box-shadow: var(--shadow); }
.auth-card .tabs { display: flex; } .auth-card .tab { flex: 1; justify-content: center; }
.auth-form { display: grid; gap: 14px; }
.auth-form label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
.form-err { color: var(--bad); font-weight: 600; font-size: .9rem; min-height: 1.2em; }

/* ================= ONBOARDING ================= */
.onboard { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.onb-card { width: min(620px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 30px; box-shadow: var(--shadow); }
.onb-dots { display: flex; gap: 6px; margin-bottom: 18px; } .onb-dots span { height: 6px; flex: 1; border-radius: 9px; background: var(--paper-2); transition: background .3s; } .onb-dots span.on { background: var(--accent); }
.onb-body { min-height: 330px; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 18px; } .choice-grid.one { grid-template-columns: 1fr; }
.choice { text-align: left; border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 14px; cursor: pointer; display: grid; gap: 2px; transition: border-color .15s, background .15s, transform .1s; }
.choice b { font-size: 1.02rem; } .choice span { color: var(--muted); font-size: .88rem; }
.choice:hover { border-color: var(--line-2); } .choice.on { border-color: var(--ink); background: #eef1fa; }
.switch-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.switch-row span { display: grid; } .switch-row small { color: var(--muted); }
.switch-row input { appearance: none; width: 46px; height: 28px; border-radius: 99px; background: var(--line-2); position: relative; cursor: pointer; transition: background .2s; flex: none; }
.switch-row input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.switch-row input:checked { background: var(--good); } .switch-row input:checked::after { transform: translateX(18px); }
.onb-demo { display: flex; align-items: center; gap: 16px; margin-top: 18px; padding: 14px; background: var(--paper); border-radius: 14px; }
.onb-demo span { font-family: var(--hand); font-size: 1.7rem; color: var(--accent-dark); }

/* ================= SHELL ================= */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: 22px 16px; display: flex; flex-direction: column; gap: 22px; border-right: 1px solid var(--line); background: rgba(255, 253, 248, .75); backdrop-filter: blur(6px); }
.side .brand { padding: 0 8px; }
.nav { display: grid; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; text-decoration: none; color: var(--muted); font-weight: 700; position: relative; border: 2px solid transparent; }
.nav a .ic { width: 22px; height: 22px; }
.nav a:hover { background: var(--paper-2); color: var(--text); }
.nav a.on { color: var(--ink); background: #eef1fa; border-color: #cdd5ee; }
.badge-count { margin-left: auto; background: var(--accent); color: #fff; font-style: normal; font-size: .72rem; min-width: 22px; height: 22px; border-radius: 99px; display: grid; place-items: center; padding: 0 6px; }
.side-foot { margin-top: auto; display: grid; gap: 10px; }
.mode-pill { display: flex; gap: 6px; align-items: center; font-size: .8rem; color: #6a4413; background: #fbf1e3; padding: 6px 10px; border-radius: 10px; }
.me-mini { display: flex; gap: 10px; align-items: center; border: 0; background: none; padding: 8px; border-radius: 12px; cursor: pointer; text-align: left; }
.me-mini:hover { background: var(--paper-2); } .me-mini span { display: grid; line-height: 1.25; min-width: 0; } .me-mini b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .me-mini small { color: var(--muted); }
.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 28px; background: rgba(246, 242, 231, .9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.page-title { font-size: 1.45rem; margin: 0; }
.stats { display: flex; gap: 6px; align-items: center; }
.stat { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 7px 10px; border-radius: 12px; cursor: pointer; font-weight: 800; color: var(--muted); }
.stat:hover { background: var(--paper-2); }
.stat .ic { width: 22px; height: 22px; }
.stat.streak.lit { color: var(--accent); } .stat.streak.lit .ic { fill: var(--accent); fill-opacity: .25; }
.stat.ink { color: #2f6db5; } .stat.ink .ic { fill: #2f6db5; fill-opacity: .2; }
.stat.lvl { gap: 8px; color: var(--ink); } .lvl-bar { width: 54px; height: 8px; background: var(--paper-2); border-radius: 9px; overflow: hidden; } .lvl-bar i { display: block; height: 100%; background: var(--ink); border-radius: 9px; transition: width .6s; }
.ring { width: 28px; height: 28px; transform: rotate(-90deg); } .ring.big { width: 100%; height: 100%; }
.ring-bg { fill: none; stroke: var(--paper-2); stroke-width: 4; } .ring-fg { fill: none; stroke: var(--good); stroke-width: 4; stroke-linecap: round; transition: stroke-dasharray .7s; stroke-dasharray: 0 100; }
.stat.goal { color: var(--good); } .stat.goal.done b { color: var(--good-dark); }
.announce { display: flex; gap: 10px; align-items: center; margin: 14px 28px 0; padding: 12px 16px; border-radius: 14px; background: #fff4e3; border: 1px solid #f2d2a5; color: #6a4413; font-weight: 600; }
#view { padding: 24px 28px 90px; max-width: 1180px; outline: none; }
.page-lead { max-width: 720px; }
.bottomnav { display: none; }

/* ================= LEARN PATH ================= */
.learn-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.rail { position: sticky; top: 86px; display: grid; gap: 0; }
.rail .card { padding: 18px; margin-bottom: 14px; }
.rail h3 { display: flex; align-items: center; gap: 8px; }
.next-card { border-top: 6px solid var(--unit); }
.goal-card { display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: center; }
.goal-ring { position: relative; width: 92px; height: 92px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.goal-ring svg { position: absolute; inset: 0; } .goal-ring b { font-size: 1.45rem; font-family: var(--display); line-height: 1; } .goal-ring small { font-size: .68rem; color: var(--muted); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 8px; }
.day { display: grid; justify-items: center; gap: 4px; font-size: .75rem; color: var(--muted); font-weight: 700; }
.day i { width: 30px; height: 30px; border-radius: 50%; background: var(--paper-2); display: grid; place-items: center; color: #fff; }
.day.on i { background: var(--accent); } .day.today span { color: var(--text); } .day.today i { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--accent); }
.day i .ic { width: 16px; height: 16px; }
.quest { padding: 8px 0; font-size: .92rem; } .quest small { color: var(--muted); font-weight: 700; }
.qbar { height: 8px; background: var(--paper-2); border-radius: 9px; margin-top: 6px; overflow: hidden; } .qbar i { display: block; height: 100%; background: var(--gold); border-radius: 9px; }
.quest.done span { text-decoration: line-through; color: var(--muted); } .quest.done .qbar i { background: var(--good); }

.unit { margin-bottom: 26px; }
.unit-head { display: flex; justify-content: space-between; gap: 16px; background: var(--unit); color: #fff; border-radius: 18px; padding: 20px 22px; box-shadow: 0 4px 0 rgba(0, 0, 0, .18);
  background-image: linear-gradient(135deg, rgba(255, 255, 255, .12), transparent 60%), repeating-linear-gradient(to bottom, transparent 0 23px, rgba(255, 255, 255, .07) 23px 24px); }
.unit-head h2 { color: #fff; margin: 2px 0 4px; font-size: 1.45rem; } .unit-head p { margin: 0; opacity: .88; }
.unit-n { font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.unit-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }
.unit-prog { font-family: var(--display); font-size: 1.1rem; } .unit-prog b { font-size: 1.6rem; }
.nodes { display: flex; flex-direction: column; align-items: center; padding: 18px 0 6px; }
.node-wrap { display: flex; flex-direction: column; align-items: center; position: relative; margin: 6px 0; }
.node { width: 74px; height: 70px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; color: #fff; background: var(--unit); box-shadow: 0 7px 0 color-mix(in srgb, var(--unit) 70%, #000); transition: transform .1s, box-shadow .1s; position: relative; }
.node .ic { width: 30px; height: 30px; }
.node:active { transform: translateY(5px); box-shadow: 0 2px 0 color-mix(in srgb, var(--unit) 70%, #000); }
.node.open { background: var(--card); color: var(--unit); box-shadow: 0 7px 0 var(--line-2), inset 0 0 0 3px var(--unit); }
.node.locked { background: #e3ddcd; color: #a59d8a; box-shadow: 0 7px 0 #cbc3ae; cursor: pointer; }
.node.current { animation: pulse 2s infinite; }
.node.cp { border-radius: 22px; }
.node.done .ic { stroke-width: 3; }
@keyframes pulse { 0%, 100% { outline: 6px solid color-mix(in srgb, var(--unit) 25%, transparent); outline-offset: 4px; } 50% { outline: 10px solid color-mix(in srgb, var(--unit) 10%, transparent); outline-offset: 6px; } }
.bubble { position: absolute; top: -40px; background: var(--card); border: 2px solid var(--line); padding: 4px 12px; border-radius: 10px; font-weight: 800; color: var(--unit); font-size: .85rem; white-space: nowrap; animation: bob 1.8s ease-in-out infinite; z-index: 2; }
.bubble::after { content: ''; position: absolute; bottom: -7px; left: 50%; width: 10px; height: 10px; background: var(--card); border-right: 2px solid var(--line); border-bottom: 2px solid var(--line); transform: translateX(-50%) rotate(45deg); }
.node-wrap:has(.bubble) { margin-top: 44px; }
@keyframes bob { 50% { transform: translateY(-4px); } }
.node-label { margin-top: 12px; text-align: center; font-size: .86rem; max-width: 170px; line-height: 1.25; display: grid; gap: 2px; justify-items: center; }
.mini-stars { display: inline-flex; gap: 1px; } .mini-stars i .ic { width: 14px; height: 14px; color: var(--line-2); fill: var(--line-2); } .mini-stars i.on .ic { color: var(--gold); fill: var(--gold); }
.path-end { display: flex; align-items: center; gap: 14px; justify-content: center; padding: 20px; color: var(--muted); font-family: var(--hand); font-size: 1.4rem; }

.sheet h2 { margin-top: 4px; } .sheet .btn { margin-top: 10px; }
.intro-syms { display: flex; gap: 14px; flex-wrap: wrap; margin: 14px 0; }
.intro-syms figure, .examples figure, .g-words figure, .pair-row figure { margin: 0; background: var(--paper); border-radius: 14px; padding: 10px 14px 6px; display: grid; justify-items: center; border: 1px solid var(--line); }
.intro-syms figcaption, .examples figcaption, .g-words figcaption, .pair-row figcaption { font-family: var(--hand); font-size: 1.35rem; color: var(--accent-dark); line-height: 1.1; }
.intro-syms.small figure { padding: 6px 10px 4px; }

.guide h3 { margin-top: 20px; } .g-syms { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.g-sym { border: 1px solid var(--line); background: var(--paper); border-radius: 14px; padding: 10px; display: grid; justify-items: center; gap: 2px; cursor: pointer; text-align: center; }
.g-sym small { color: var(--muted); font-size: .76rem; } .g-rule { background: var(--paper); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; } .g-rule p { margin: 4px 0 0; }
.g-words { display: flex; flex-wrap: wrap; gap: 10px; }
.brief-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; margin: 12px 0; }
.brief { border: 1px solid var(--line); background: var(--paper); border-radius: 14px; padding: 8px; display: grid; justify-items: center; gap: 2px; cursor: pointer; }
.brief span { font-weight: 700; font-size: .9rem; text-align: center; }

/* ================= PRACTICE / REVIEW / SYMBOLS ================= */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.game-card { text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 20px; padding: 22px; cursor: pointer; box-shadow: 0 5px 0 var(--line); transition: transform .12s, box-shadow .12s; display: grid; gap: 6px; align-content: start; }
.game-card:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 8px 0 var(--line); }
.game-card p { color: var(--muted); margin: 0; }
.game-card.locked { opacity: .6; cursor: not-allowed; }
.g-ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--ink); color: #fff; margin-bottom: 6px; }
.game-card:nth-child(2) .g-ic { background: var(--accent); } .game-card:nth-child(3) .g-ic { background: #5B3F8C; } .game-card:nth-child(4) .g-ic { background: #2F6F5E; } .game-card:nth-child(5) .g-ic { background: #8C3B2F; } .game-card:nth-child(6) .g-ic { background: #2F5F8C; }
.g-ic .ic { width: 28px; height: 28px; }
.g-meta { margin-top: 8px; font-weight: 700; font-size: .85rem; color: var(--ink); display: inline-flex; gap: 6px; align-items: center; }
.freepad .pad-wrap { margin: 10px 0; }
.fp-model { margin-top: 12px; display: grid; justify-items: center; background: var(--paper); border-radius: 14px; padding: 12px; }
.review-hero { display: grid; grid-template-columns: 1fr 180px; gap: 24px; align-items: center; }
.strength { position: relative; width: 170px; height: 170px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.strength svg { position: absolute; inset: 0; } .strength b { font-family: var(--display); font-size: 2.2rem; line-height: 1; } .strength small { color: var(--muted); }
.boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin: 10px 0; }
.box { display: grid; justify-items: center; gap: 4px; } .box span { font-size: .78rem; color: var(--muted); }
.box-bar { width: 100%; height: 110px; background: var(--paper); border-radius: 10px; display: flex; align-items: flex-end; overflow: hidden; border: 1px solid var(--line); }
.box-bar i { display: block; width: 100%; background: linear-gradient(to top, var(--ink), #4058b8); border-radius: 8px 8px 0 0; transition: height .6s; }
.fam { margin-bottom: 26px; } .fam h2 { font-size: 1.2rem; }
.sym-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.sym-card { position: relative; border: 1px solid var(--line); background: var(--card); border-radius: 16px; padding: 12px; display: grid; justify-items: center; gap: 2px; cursor: pointer; box-shadow: 0 3px 0 var(--line); transition: transform .1s; }
.sym-card:hover { transform: translateY(-2px); } .sym-card b { font-size: 1.05rem; } .sym-card small { color: var(--muted); font-size: .78rem; text-align: center; }
.sym-card .tick { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--good); color: #fff; display: grid; place-items: center; }
.sym-card .tick .ic { width: 14px; height: 14px; stroke-width: 3; }
.rules-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.rule-mini { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; }
.rule-mini div { display: grid; } .rule-mini small { font-family: var(--hand); font-size: 1.2rem; color: var(--accent-dark); }
.sm-trace { margin-top: 14px; text-align: center; border-top: 1px dashed var(--line); padding-top: 14px; }

/* ================= LEADERBOARD ================= */
.lb { padding: 8px; }
.lb-row { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 14px; }
.lb-row:nth-child(odd) { background: var(--paper); }
.lb-row.me { background: #eef1fa; box-shadow: inset 0 0 0 2px #cdd5ee; }
.rank { width: 46px; display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 800; }
.rank.r1 { color: var(--gold); } .rank.r2 { color: #8a96a8; } .rank.r3 { color: #b06c35; }
.lb-name { display: grid; flex: 1; min-width: 0; } .lb-name small { color: var(--muted); display: flex; align-items: center; gap: 4px; }
.lb-xp { font-weight: 800; color: var(--ink); }
.lb p { padding: 10px 12px 4px; margin: 0; }

/* ================= PROFILE ================= */
.profile-head { display: flex; gap: 20px; align-items: center; }
.ph-main { flex: 1; } .ph-main h2 { margin: 0; }
.lv-row { display: flex; gap: 10px; align-items: center; margin: 8px 0; }
.lv-chip { background: var(--ink); color: #fff; padding: 3px 10px; border-radius: 8px; font-weight: 800; font-size: .85rem; }
.xpbar { height: 12px; background: var(--paper-2); border-radius: 9px; overflow: hidden; margin-bottom: 4px; } .xpbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--gold)); border-radius: 9px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 2px; }
.stat-card .ic { color: var(--accent); width: 22px; height: 22px; } .stat-card b { font-family: var(--display); font-size: 1.5rem; } .stat-card span { color: var(--muted); font-size: .84rem; }
.stat-grid.small .stat-card { padding: 10px; } .stat-grid.small .stat-card b { font-size: 1.15rem; }
.heat { display: flex; gap: 4px; flex-wrap: wrap; align-items: flex-start; }
.hcol { display: grid; gap: 4px; }
.heat i { width: 16px; height: 16px; border-radius: 4px; display: block; }
.h0 { background: var(--paper-2); } .h1 { background: #cfe3d6; } .h2 { background: #8cc3a2; } .h3 { background: #46a06c; } .h4 { background: #1f6f47; } .heat i.future { background: transparent; }
.heat-legend { display: flex; gap: 4px; align-items: center; width: 100%; margin-top: 10px; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.badge { display: grid; justify-items: center; text-align: center; gap: 2px; padding: 14px 10px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); filter: grayscale(1); opacity: .55; }
.badge.on { filter: none; opacity: 1; background: #fff8e6; border-color: #f0d895; }
.b-ic { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #fff; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .18); margin-bottom: 4px; }
.b-ic .ic { width: 26px; height: 26px; } .badge small { color: var(--muted); font-size: .75rem; line-height: 1.3; }
.shop { display: grid; gap: 8px; }
.shop-item { display: flex; gap: 14px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--paper); }
.shop-item div { flex: 1; display: grid; } .shop-item small { color: var(--muted); }
.swatch { width: 38px; height: 38px; border-radius: 50%; flex: none; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2); } .swatch.ic { display: grid; place-items: center; background: #d8e8f7; color: #2f6db5; width: 38px; height: 38px; padding: 8px; }
.settings .field { display: grid; gap: 6px; font-weight: 600; margin-bottom: 14px; }

/* ================= ADMIN ================= */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 18px; }
.chart-grid h3 { margin-bottom: 0; }
.bars { width: 100%; height: auto; display: block; } .bar-v { font-size: 11px; fill: var(--text); font-weight: 700; } .bar-l { font-size: 10px; fill: var(--muted); }
.toolbar { margin-bottom: 14px; }
.search { position: relative; flex: 1; max-width: 380px; } .search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); } .search .input { padding-left: 38px; }
.table-wrap { padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--paper); white-space: nowrap; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; } .table tr.flag td { background: #fdf3f1; }
.who { display: flex; gap: 10px; align-items: center; } .who span { display: grid; } .who small { color: var(--muted); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }
.user-detail h3 { margin-top: 18px; }
.mini-path { display: grid; gap: 8px; } .mp-unit { display: grid; grid-template-columns: 200px 1fr; gap: 10px; align-items: center; font-weight: 700; font-size: .85rem; }
.mp-unit div { display: flex; gap: 5px; } .mp-unit i { width: 22px; height: 22px; border-radius: 6px; background: var(--paper-2); }
.mp-unit i.s1 { background: #8cc3a2; } .mp-unit i.s2 { background: #46a06c; } .mp-unit i.s3 { background: var(--gold); }
.events { display: grid; gap: 6px; max-height: 300px; overflow: auto; }
.ev { display: grid; grid-template-columns: 90px 1fr 60px 70px 70px; gap: 8px; align-items: center; font-size: .88rem; padding: 6px 8px; border-radius: 10px; background: var(--paper); }

/* ================= PLAYER ================= */
.player { position: fixed; inset: 0; z-index: 200; background: var(--paper); display: grid; grid-template-rows: auto 1fr auto; animation: plIn .25s ease;
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, var(--steno) 31px 32px); }
@keyframes plIn { from { opacity: 0; transform: translateY(14px); } }
.pl-top { display: flex; align-items: center; gap: 16px; padding: 16px max(20px, calc(50vw - 420px)); }
.pl-bar { flex: 1; height: 16px; background: var(--paper-2); border-radius: 99px; overflow: hidden; }
.pl-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--good), #4fbf80); border-radius: 99px; transition: width .4s cubic-bezier(.2, .8, .3, 1); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .1), inset 0 3px 0 rgba(255, 255, 255, .3); }
.pl-combo { display: flex; align-items: center; gap: 4px; color: var(--accent); font-weight: 800; font-size: 1.1rem; }
.pl-combo .ic { fill: var(--accent); fill-opacity: .3; width: 24px; height: 24px; } .pl-combo.pop { animation: pop .35s; }
@keyframes pop { 50% { transform: scale(1.3); } }
.pl-body { overflow-y: auto; padding: 8px 20px 30px; }
.pl-stage { max-width: 760px; margin: 0 auto; transition: opacity .25s, transform .25s; }
.pl-stage.enter { opacity: 0; transform: translateX(24px); }
.pl-foot { border-top: 2px solid var(--line); background: var(--card); padding: 18px max(20px, calc(50vw - 400px)); display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 96px; transition: background .2s; }
.pl-foot.hidden { display: none; }
.pl-foot.good { background: #dcf3e4; border-color: #b6e3c6; } .pl-foot.bad { background: #fbe0dd; border-color: #f2bdb7; } .pl-foot.neutral { background: #e7ecf8; border-color: #ccd5ee; }
.pl-feedback { display: flex; gap: 14px; align-items: center; min-width: 0; }
.fb-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #fff; flex: none; }
.pl-foot.good .fb-icon { color: var(--good); } .pl-foot.bad .fb-icon { color: var(--bad); } .pl-foot.neutral .fb-icon { color: var(--ink); }
.fb-icon .ic { width: 30px; height: 30px; stroke-width: 3; }
.pl-feedback b { font-size: 1.2rem; font-family: var(--display); } .pl-foot.good b { color: var(--good-dark); } .pl-foot.bad b { color: var(--bad-dark); }
.fb-ans { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-weight: 600; } .fb-msg { color: #4d483f; font-size: .92rem; }
.pl-foot.bad .btn.primary { background: var(--bad); box-shadow: 0 3px 0 var(--bad-dark); } .pl-foot.good .btn.primary { background: var(--good); box-shadow: 0 3px 0 var(--good-dark); }
.pl-actions { display: flex; gap: 10px; flex: none; } .pl-main { min-width: 150px; padding: 14px 24px; font-size: 1.05rem; }
.step-kicker { font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-dark); margin: 6px 0 8px; }
h2.q { font-size: 1.5rem; margin-bottom: 18px; } h2.q small { display: block; font-family: var(--ui); font-size: .95rem; color: var(--muted); font-weight: 500; margin-top: 6px; }

.intro-card { background: var(--card); border: 1px solid var(--line); border-top: 8px solid var(--unit); border-radius: 22px; padding: 30px; box-shadow: var(--shadow); margin-top: 20px; }
.intro-card h1 { font-size: 2.3rem; }
.modes { list-style: none; padding: 0; margin: 18px 0 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.modes li { display: flex; gap: 10px; align-items: center; background: var(--paper); padding: 10px 12px; border-radius: 12px; font-weight: 600; font-size: .92rem; } .modes .ic { color: var(--unit, var(--ink)); width: 22px; height: 22px; }

.learn { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.learn-visual { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 18px; box-shadow: var(--shadow); display: grid; gap: 12px; justify-items: center;
  background-image: repeating-linear-gradient(to bottom, transparent 0 35px, var(--steno) 35px 36px); }
.learn-svg { min-height: 200px; display: grid; place-items: center; width: 100%; }
.learn-ctrls { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.sym-name { font-size: 3rem; margin: 0; color: var(--ink); }
.sound { display: flex; gap: 8px; align-items: center; font-weight: 700; color: var(--accent-dark); }
.mnemonic { display: flex; gap: 10px; align-items: flex-start; font-family: var(--hand); font-size: 1.5rem; line-height: 1.2; color: #3b3a6b; background: #fff9e9; border-radius: 12px; padding: 10px 14px; border: 1px dashed #ecd9a5; }
.mnemonic .ic { color: var(--gold); margin-top: 4px; }
.note { display: flex; gap: 8px; font-size: .93rem; color: #4b4a5e; background: #eef1fa; border-radius: 10px; padding: 8px 12px; }
.brief-chip { background: var(--paper-2); display: inline-block; padding: 6px 12px; border-radius: 10px; font-size: .92rem; }
.pair { margin-top: 6px; } .pair-row { display: flex; gap: 10px; margin-top: 6px; }

.rule-card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 28px; box-shadow: var(--shadow); }
.examples { display: flex; flex-wrap: wrap; gap: 14px; margin: 16px 0 12px; }

.watch { text-align: center; display: grid; justify-items: center; gap: 12px; }
.watch .word { font-size: 3rem; margin: 0; font-family: var(--hand); color: var(--accent-dark); font-weight: 700; }
.chips-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.snd { background: var(--ink); color: #fff; padding: 5px 13px; border-radius: 10px; font-weight: 800; animation: sndIn .35s both; }
.plus { color: var(--muted); font-weight: 800; }
@keyframes sndIn { from { opacity: 0; transform: translateY(8px) scale(.8); } }
.watch-svg { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 18px 26px; box-shadow: var(--shadow); min-width: 280px; display: grid; place-items: center; }

.prompt-svg { display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 16px; margin-bottom: 18px; box-shadow: var(--shadow); min-height: 150px; }
.sentence { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; justify-content: center; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow); }
.say-btn { display: grid; place-items: center; margin: 0 auto 22px; width: 120px; height: 120px; border-radius: 30px; border: 0; background: var(--ink); color: #fff; cursor: pointer; box-shadow: 0 6px 0 var(--ink-dark); transition: transform .1s; }
.say-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink-dark); } .say-btn .ic { width: 52px; height: 52px; }
.opts { display: grid; gap: 10px; }
.opts-text { grid-template-columns: 1fr; } .opts-svg { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.opt { position: relative; display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px 16px; border: 2px solid var(--line); background: var(--card); border-radius: 16px; cursor: pointer; font-size: 1.05rem; font-weight: 600; box-shadow: 0 3px 0 var(--line); transition: border-color .12s, background .12s, transform .1s; }
.opts-svg .opt { justify-content: center; min-height: 120px; }
.opts-svg .opt .kbd { position: absolute; top: 8px; left: 8px; }
.opt:hover:not(:disabled) { border-color: var(--line-2); background: #fffdf3; }
.opt.sel { border-color: var(--ink); background: #eef1fa; box-shadow: 0 3px 0 #cdd5ee; } .opt.sel .kbd { border-color: var(--ink); color: var(--ink); }
.opt.right { border-color: var(--good); background: #dcf3e4; box-shadow: 0 3px 0 #b6e3c6; } .opt.wrong { border-color: var(--bad); background: #fbe0dd; box-shadow: 0 3px 0 #f2bdb7; }
.opt:disabled { cursor: default; }
.read-row { max-width: 420px; margin: 0 auto 12px; }
.big-input { font-size: 1.4rem; text-align: center; padding: 14px; font-weight: 600; }
.big-input.right { border-color: var(--good); background: #f1faf4; } .big-input.wrong { border-color: var(--bad); background: #fdf3f1; }
.hint-btn { display: flex; margin: 0 auto; } .hint { text-align: center; background: #fff9e9; border-radius: 12px; padding: 10px; max-width: 420px; margin: 0 auto; }
.step-read, .step-build, .step-trace, .step-write { text-align: center; }
.say-inline { margin: -8px auto 14px; }
.build-preview { background: var(--card); border: 1px solid var(--line); border-radius: 22px; min-height: 170px; padding: 14px; margin-bottom: 14px; display: grid; place-items: center; gap: 8px; box-shadow: var(--shadow); }
.build-seq { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; min-height: 32px; } .build-seq .snd { animation-duration: .2s; }
.tiles { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 14px; }
.tile { min-width: 84px; padding: 8px 10px 6px; border: 2px solid var(--line); background: var(--card); border-radius: 14px; cursor: pointer; display: grid; justify-items: center; gap: 2px; box-shadow: 0 4px 0 var(--line); transition: transform .08s; }
.tile:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); } .tile:disabled { opacity: .6; }
.tile-label { font-weight: 800; font-size: .85rem; color: var(--ink); } .tile-mark { height: 40px; display: grid; place-items: center; font-size: .8rem; color: var(--muted); }
.trace-wrap { position: relative; margin: 0 auto 10px; background: var(--card); border-radius: 22px; border: 1px solid var(--line); box-shadow: var(--shadow); touch-action: none;
  background-image: repeating-linear-gradient(to bottom, transparent 0 39px, var(--steno) 39px 40px); }
.trace-guide, .trace-cv { position: absolute; inset: 0; } .trace-cv { cursor: crosshair; touch-action: none; }
.trace-guide .gs-start { opacity: 1; }
.trace-msg { min-height: 1.6em; margin-bottom: 8px; } .trace-msg.warn { color: var(--bad-dark); font-weight: 700; }
.pad-wrap { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 12px; }
.pad { background: #fff; border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); touch-action: none; cursor: crosshair; max-width: 100%; }
.pad-model { background: var(--card); border: 1px dashed var(--line-2); border-radius: 18px; padding: 10px 16px; display: grid; place-items: center; }
.selfcheck { margin-top: 14px; } .selfcheck p { font-weight: 700; }
.match { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mcol { display: grid; gap: 10px; align-content: start; }
.mcard { border: 2px solid var(--line); background: var(--card); border-radius: 14px; min-height: 76px; padding: 8px; cursor: pointer; display: grid; place-items: center; box-shadow: 0 3px 0 var(--line); transition: all .15s; }
.mcard.txt { font-weight: 700; font-size: 1.05rem; }
.mcard.sel { border-color: var(--ink); background: #eef1fa; }
.mcard.done { border-color: #b6e3c6; background: #dcf3e4; opacity: .55; transform: scale(.97); pointer-events: none; }
.mcard.shake { animation: shake .4s; border-color: var(--bad); background: #fbe0dd; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.sprint-top { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.timer { flex: 1; height: 14px; background: var(--paper-2); border-radius: 9px; overflow: hidden; } .timer-fill { height: 100%; width: 100%; background: linear-gradient(90deg, var(--accent), var(--gold)); transition: width .1s linear; }
.sprint-score { display: flex; gap: 6px; align-items: center; font-size: 1.4rem; font-weight: 800; color: var(--accent-dark); }
.sprint-start { text-align: center; padding: 30px 0; }
.finish { text-align: center; display: grid; justify-items: center; gap: 6px; padding-top: 4vh; }
.finish-art { background: var(--card); border-radius: 50%; width: 170px; height: 170px; display: grid; place-items: center; border: 1px solid var(--line); box-shadow: var(--shadow); margin-bottom: 12px; animation: pop .6s; }
.finish h2 { font-size: 2.2rem; }
.stars.big { display: flex; gap: 10px; margin: 6px 0 14px; }
.stars.big span .ic { width: 54px; height: 54px; color: var(--line-2); fill: var(--paper-2); }
.stars.big span.on .ic { color: var(--gold); fill: var(--gold); animation: starIn .5s both; animation-delay: inherit; }
.stars.big span { animation-delay: inherit; }
@keyframes starIn { from { transform: scale(0) rotate(-40deg); } 70% { transform: scale(1.25); } }
.finish-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: min(560px, 100%); margin: 8px 0 22px; }
.finish-stats div { background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 10px; display: grid; }
.finish-stats .k { margin: 0; font-size: .68rem; } .finish-stats b { font-family: var(--display); font-size: 1.5rem; }
.finish-stats div:first-child { border-color: var(--gold); } .finish-stats div:first-child b { color: var(--accent-dark); }
.levelup { padding: 10px 0; } .lv-badge { width: 110px; height: 110px; margin: 0 auto 14px; border-radius: 30px; background: linear-gradient(135deg, var(--accent), var(--gold)); color: #fff; font-family: var(--display); font-size: 3.4rem; font-weight: 800; display: grid; place-items: center; box-shadow: 0 8px 0 var(--accent-dark); animation: pop .6s; }

/* ================= RESPONSIVE ================= */
@media (max-width: 1100px) {
  .learn-layout { grid-template-columns: 1fr; }
  .rail { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 14px; order: -1; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .bottomnav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: var(--card); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .bottomnav a { display: grid; justify-items: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: .68rem; font-weight: 700; padding: 4px 6px; border-radius: 10px; flex: 1; }
  .bottomnav a .ic { width: 24px; height: 24px; } .bottomnav a.on { color: var(--ink); background: #eef1fa; }
  .topbar { padding: 10px 12px; gap: 6px; } .page-title { font-size: 1.05rem; white-space: nowrap; }
  .stats { gap: 0; } .stat { white-space: nowrap; font-size: .9rem; } .stat .ic { width: 19px; height: 19px; } .ring { width: 22px; height: 22px; }
  .stat { padding: 6px; } .stat.lvl .lvl-bar { display: none; }
  #view { padding: 16px 14px 100px; }
  .announce { margin: 10px 14px 0; }
  .auth { grid-template-columns: 1fr; } .auth-brand { padding: 26px 22px 22px; } .auth-brand h1 { font-size: 2rem; margin: 16px 0 8px; } .auth-brand .lead { font-size: .98rem; margin: 0; } .auth-demo, .auth-points { display: none; } .auth-panel { padding: 18px 14px 32px; place-items: start center; } 
  .learn { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .review-hero { grid-template-columns: 1fr; } .strength { margin: 0 auto; }
  .unit-head { flex-direction: column; } .unit-side { flex-direction: row; align-items: center; flex-wrap: wrap; }
}
@media (max-width: 560px) {
  h1 { font-size: 1.7rem; } .intro-card h1 { font-size: 1.8rem; } h2.q { font-size: 1.25rem; }
  .stat.goal b, .stat.ink b { font-size: .85rem; }
  .finish-stats { grid-template-columns: repeat(2, 1fr); }
  .pl-foot { flex-direction: column; align-items: stretch; } .pl-actions { justify-content: stretch; } .pl-main { flex: 1; }
  .choice-grid { grid-template-columns: 1fr; }
  .mp-unit { grid-template-columns: 1fr; } .ev { grid-template-columns: 1fr 1fr; }
  .boxes { gap: 6px; }
  .node-wrap { transform: none !important; }
  .opts-svg { grid-template-columns: 1fr 1fr; }
  .profile-head { flex-direction: column; text-align: center; } .lv-row { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ===== course map, milestones, skills, lesson summary ===== */
.course-map { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 20px 22px; box-shadow: var(--shadow); margin-bottom: 22px; }
.cm-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.cm-head h2 { margin: 2px 0 4px; font-size: 1.3rem; } .cm-head p { margin: 0; color: var(--muted); }
.cm-pct { text-align: center; flex: none; } .cm-pct b { display: block; font-family: var(--display); font-size: 2rem; color: var(--good); line-height: 1; } .cm-pct small { color: var(--muted); font-size: .75rem; }
.cm-track { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-top: 16px; position: relative; }
.cm-stop { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 10px 6px; border-radius: 14px; background: var(--paper); font-size: .82rem; }
.cm-stop i { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); color: var(--muted); font-style: normal; font-weight: 800; }
.cm-stop.got i { background: var(--good); color: #fff; } .cm-stop.got { background: #e6f4ec; }
.cm-stop.cur { background: #fff4e3; box-shadow: inset 0 0 0 2px var(--accent); } .cm-stop.cur i { background: var(--accent); color: #fff; }
.ms-banner { display: flex; gap: 14px; align-items: center; margin: -8px auto 26px; max-width: 520px; padding: 12px 16px; border-radius: 16px; border: 2px dashed var(--line-2); background: var(--card); }
.ms-banner > .ic { width: 30px; height: 30px; color: var(--muted); flex: none; } .ms-banner div { display: grid; } .ms-banner small { color: var(--muted); }
.ms-banner.got { border-style: solid; border-color: #f0d895; background: #fff8e6; } .ms-banner.got > .ic { color: var(--gold); }
.skills-card .skill { margin: 8px 0 10px; font-size: .9rem; } .skills-card .skill b small { color: var(--muted); font-weight: 600; }
.skills-card .qbar i { background: var(--good); }
.finish-can { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; width: min(560px, 100%); text-align: left; margin-bottom: 12px; }
.finish-can h3 { margin: 0 0 6px; } .finish-can ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.finish-can li { display: flex; gap: 8px; align-items: flex-start; } .finish-can li .ic { color: var(--good); margin-top: 3px; }
.finish-milestone { display: flex; gap: 12px; align-items: center; background: #fff8e6; border: 2px solid #f0d895; border-radius: 16px; padding: 12px 16px; width: min(560px, 100%); text-align: left; margin-bottom: 12px; }
.finish-milestone > .ic { width: 34px; height: 34px; color: var(--gold); flex: none; } .finish-milestone div { display: grid; } .finish-milestone span { color: var(--muted); }
.finish-next { display: flex; gap: 8px; align-items: flex-start; max-width: 560px; text-align: left; color: #4d483f; margin: 0 0 16px; }
.finish { padding-bottom: 30px; }

/* ===================== Classes & teacher tools ===================== */
.block { display: block; } .nowrap { flex-wrap: nowrap; white-space: nowrap; } .bad-text { color: var(--bad); } .warn-text { color: #9a5b0c; }
.pill.good { background: #dcefe3; color: var(--good-dark); } .pill.warn { background: #fbe9cf; color: #8a520b; } .pill.blue { background: #e1e8fa; color: var(--ink); } .pill.teal { background: #d8efec; color: #1d6b62; }
.pill.st { text-transform: none; white-space: nowrap; }
.danger-text { color: var(--bad) !important; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h2 { margin: 0 0 4px; font-family: var(--display); } .page-head p { margin: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .88rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--ink); font-weight: 600; text-decoration: none; } .crumbs a:hover { text-decoration: underline; }
h3.sec { font-family: var(--display); margin: 22px 0 10px; display: flex; gap: 8px; align-items: baseline; }
.card h3 { display: flex; align-items: center; gap: 8px; margin-top: 0; } .card h3 .ic { color: var(--accent); }
.stack-form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; } .field > small, .field small.muted { font-weight: 400; }
.field-label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.input.narrow { max-width: 160px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.toolbar { margin-bottom: 12px; gap: 12px; } .toolbar p { margin: 0; }
.empty { text-align: left; } .empty p { margin-top: 0; } .empty ol { padding-left: 20px; margin-bottom: 0; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.list-row:last-child { border-bottom: 0; } .list-row:hover { background: var(--paper); }
.list-row > div:first-child, .list-row > div:nth-child(2) { flex: 1; display: grid; min-width: 0; } .list-row small { color: var(--muted); }
.mini-prog { display: grid; gap: 4px; font-size: .78rem; color: var(--muted); min-width: 110px; text-align: right; flex: none !important; }
.mini-prog i { display: block; height: 6px; border-radius: 9px; background: var(--paper-2); overflow: hidden; } .mini-prog i b { display: block; height: 100%; background: var(--good); }
.table tr.click { cursor: pointer; } .table tr.click:hover td { background: var(--paper); }
.table.compact td, .table.compact th { padding: 7px 10px; font-size: .85rem; }
.table a { color: var(--ink); text-decoration: none; } .table a:hover { text-decoration: underline; }
.grade { font-variant-numeric: tabular-nums; } .grade.a { color: var(--good-dark); } .grade.b { color: #3d7a2a; } .grade.c { color: #9a5b0c; } .grade.d { color: var(--bad-dark); }
.type-tag { display: inline-flex; align-items: center; gap: 5px; font-size: .84rem; color: var(--muted); white-space: nowrap; } .type-tag .ic { width: 16px; height: 16px; }

/* dashboard */
.onboard-steps ol { padding-left: 20px; } .onboard-steps li { margin-bottom: 8px; }
.class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-bottom: 18px; }
.class-card { display: grid; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; color: inherit; text-decoration: none; box-shadow: var(--shadow); border-top: 5px solid var(--ink); transition: transform .15s, box-shadow .15s; }
.class-card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -16px rgba(60, 50, 30, .4); }
.class-card.is-archived { opacity: .7; border-top-color: var(--line-2); }
.class-card h3 { margin: 0; font-family: var(--display); font-size: 1.2rem; } .class-card p { margin: 0; }
.cc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.cc-stats { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .86rem; color: var(--muted); } .cc-stats b { color: var(--text); }
.cc-foot { display: flex; justify-content: space-between; align-items: center; font-size: .88rem; padding-top: 10px; border-top: 1px solid var(--line); }
.code-chip { display: inline-flex; align-items: center; gap: 5px; border: 1.5px dashed var(--line-2); background: var(--paper); border-radius: 10px; padding: 4px 9px; font: 700 .85rem ui-monospace, Menlo, Consolas, monospace; letter-spacing: .08em; cursor: pointer; color: var(--ink); }
.code-chip .ic { width: 14px; height: 14px; } .code-chip:hover { border-color: var(--ink); }
.feed { display: grid; } .feed-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .92rem; } .feed-row:last-child { border-bottom: 0; }
details.archived summary, details.done-list summary, details.rules-sum summary, details.prev-sub summary { cursor: pointer; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 6px; }
details.archived[open] summary { margin-bottom: 14px; }
.pending { max-width: 560px; margin: 30px auto; } .big-ic { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--paper-2); color: var(--ink); } .big-ic .ic { width: 30px; height: 30px; }

/* class page */
.class-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 16px; }
.class-head h2 { font-family: var(--display); margin: 0 0 4px; display: flex; gap: 10px; align-items: center; } .class-head p { margin: 0; }
.code-box { background: var(--card); border: 2px dashed var(--line-2); border-radius: 16px; padding: 12px 16px; display: grid; gap: 6px; justify-items: start; }
.code-box .k { margin: 0; } .code { font: 800 1.7rem ui-monospace, Menlo, Consolas, monospace; letter-spacing: .16em; color: var(--ink); }
.code.inline { font-size: 1rem; background: var(--paper-2); padding: 1px 8px; border-radius: 6px; }
.class-tabs { margin-bottom: 18px; } .class-tabs .tab { text-decoration: none; } .class-tabs .tab .ic { width: 16px; height: 16px; }
.class-body textarea { margin: 6px 0 10px; resize: vertical; }

/* gradebook */
.gradebook { max-height: 70vh; overflow: auto; }
.table.gb th, .table.gb td { white-space: nowrap; text-align: center; } .table.gb td:first-child, .table.gb th:first-child { text-align: left; }
.table.gb thead th { position: sticky; top: 0; z-index: 2; } .table.gb .sticky { position: sticky; left: 0; background: var(--card); z-index: 1; box-shadow: 1px 0 0 var(--line); } .table.gb thead .sticky { z-index: 3; background: var(--paper); }
.gb-h { min-width: 120px; } .gb-h a { display: block; text-transform: none; letter-spacing: 0; font-size: .86rem; color: var(--ink); white-space: normal; max-width: 160px; margin: 0 auto; }
.gb-h small { display: block; text-transform: none; letter-spacing: 0; font-weight: 400; }
.gb-cell { cursor: pointer; position: relative; } .gb-cell:hover { background: #eef2fb !important; } .gb-cell small { color: var(--muted); }
.gb-cell.missing { background: #fdf0ee; } .gb-cell.late { background: #fdf6ea; } .gb-cell.submitted { background: #eef2fb; } .gb-cell.excused { background: var(--paper); }
.late-dot, .ovr-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #e2a03b; margin-left: 4px; vertical-align: middle; } .ovr-dot { background: var(--ink); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .84rem; color: var(--muted); align-items: center; }
.table tfoot td { background: var(--paper); border-top: 2px solid var(--line); }

/* assignment form & grading */
.type-pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.type-opt input, .rule-opt input, .acct-opt input { position: absolute; opacity: 0; pointer-events: none; }
.type-opt span, .rule-opt span, .acct-opt span { display: grid; gap: 2px; border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; height: 100%; transition: border-color .15s, background .15s; }
.type-opt span .ic { color: var(--accent); } .type-opt small, .rule-opt small, .acct-opt small { color: var(--muted); font-weight: 400; font-size: .82rem; }
.type-opt input:checked + span, .rule-opt input:checked + span, .acct-opt input:checked + span { border-color: var(--ink); background: #eef2fb; }
.type-opt input:focus-visible + span, .rule-opt input:focus-visible + span, .acct-opt input:focus-visible + span { box-shadow: 0 0 0 4px rgba(27, 42, 107, .15); }
.type-opt, .rule-opt, .acct-opt { position: relative; }
.lesson-pick { max-height: 260px; overflow: auto; border: 2px solid var(--line); border-radius: 12px; padding: 6px 12px; }
.lesson-pick fieldset { border: 0; padding: 6px 0; margin: 0; border-bottom: 1px solid var(--line); } .lesson-pick fieldset:last-child { border-bottom: 0; }
.lesson-pick legend { font-weight: 700; padding: 0; } .lesson-pick legend label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.lp { display: flex; gap: 8px; align-items: center; padding: 3px 0 3px 22px; font-weight: 400; font-size: .9rem; cursor: pointer; }
.grade-facts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.hw-view, .prev-sub { margin: 10px 0; } .hw-view img, .prev-sub img { max-width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 12px; display: block; }

/* rules */
.rule-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.penalty-fields { margin-bottom: 6px; transition: opacity .2s; } .penalty-fields.dim { opacity: .45; }
.rules-form .card .field { margin-bottom: 12px; }
.sticky-save { position: sticky; bottom: 12px; z-index: 5; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow); margin-bottom: 18px; }

/* student detail */
.profile-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.profile-head .ph-main { flex: 1; min-width: 220px; } .profile-head h2 { margin: 0; font-family: var(--display); } .profile-head p { margin: 2px 0 10px; }
.ph-grade { display: grid; justify-items: end; gap: 2px; text-align: right; } .ph-grade .grade, .ph-grade .muted { font-family: var(--display); font-size: 1.9rem; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0 0 12px; font-size: .92rem; } .facts dt { color: var(--muted); } .facts dd { margin: 0; font-weight: 600; }
.mini-path { display: grid; gap: 8px; } .mp-unit { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 10px; align-items: center; font-size: .86rem; font-weight: 600; }
.mp-unit > div { display: flex; flex-wrap: wrap; gap: 4px; } .mp-unit i { width: 22px; height: 22px; border-radius: 6px; background: var(--paper-2); border: 1px solid var(--line); }
.mp-unit i.s1 { background: #b9dcc7; } .mp-unit i.s2 { background: #6fb58d; } .mp-unit i.s3 { background: var(--good-dark); }

/* student: my classes */
.join-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; } .join-card h3, .join-card p { margin: 0; }
.join-form { flex: 0 1 320px; } .mono-code { font: 700 1.1rem ui-monospace, Menlo, Consolas, monospace; letter-spacing: .14em; text-transform: uppercase; }
.my-class .mc-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; } .my-class h2 { margin: 2px 0; font-family: var(--display); } .my-class .mc-head p { margin: 0; }
.announce.inline { margin: 14px 0 6px; }
details.rules-sum { margin: 10px 0 4px; font-size: .92rem; } details.rules-sum ul { margin: 8px 0 0; padding-left: 22px; color: var(--muted); }
.assign-row { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.assign-row:last-child { border-bottom: 0; } .assign-row.overdue { background: linear-gradient(90deg, #fdf0ee, transparent 60%); }
.ar-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--paper-2); display: grid; place-items: center; color: var(--ink); }
.ar-main { display: grid; gap: 2px; min-width: 0; } .ar-main small { color: var(--muted); }
.ar-side { display: grid; justify-items: end; gap: 4px; text-align: right; }
.fb { display: flex; gap: 8px; align-items: flex-start; margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: #eef2fb; color: #2a3561; font-size: .88rem; } .fb .ic { flex: none; width: 16px; height: 16px; margin-top: 2px; }
details.done-list { margin-top: 10px; } details.done-list[open] summary { margin-bottom: 4px; }
.pad-wrap { margin: 12px 0; border: 2px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; display: flex; justify-content: center; } .pad-wrap canvas { touch-action: none; display: block; }

/* register: account type */
.acct-type { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.acct-opt span .ic { color: var(--accent); }
.code-field { display: grid; gap: 6px; }

/* assignments on the learn page */
.due-card .due-item { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.due-card .due-item b { grid-column: 1; } .due-card .due-item small { grid-column: 1; color: var(--muted); } .due-card .due-item .pill { grid-column: 2; grid-row: 1 / span 2; }
.due-card .due-item.missing b { color: var(--bad-dark); } .due-card .btn { margin-top: 10px; }
.due-tag { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 700; color: var(--accent-dark); background: #fbecd9; border-radius: 99px; padding: 1px 8px; margin-top: 2px; } .due-tag .ic { width: 12px; height: 12px; }

@media (max-width: 760px) {
  .grid3, .rule-grid, .type-pick { grid-template-columns: 1fr; }
  .assign-row { grid-template-columns: auto 1fr; } .ar-side { grid-column: 1 / -1; justify-items: start; text-align: left; grid-auto-flow: column; justify-content: start; align-items: center; }
  .mp-unit { grid-template-columns: 1fr; } .profile-head .ph-grade { justify-items: start; text-align: left; }
  .code { font-size: 1.35rem; } .feed-row { grid-template-columns: auto 1fr; } .feed-row > :last-child { grid-column: 2; }
  .acct-type { grid-template-columns: 1fr; }
}

/* ===================== Courses (one site, two shorthand systems) ===================== */
.course-badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; font: 700 .72rem/1 var(--ui); letter-spacing: .02em; color: #fff; background: var(--ink); vertical-align: middle; white-space: nowrap; }
.course-badge.teeline { background: #2f8f5b; } .course-badge.gregg { background: #c4651a; } .course-badge.typo { background: #4a3f8f; } .course-badge.steno { background: #1d3a6b; }
.course-badge.big { width: 40px; height: 40px; min-width: 40px; padding: 0; border-radius: 12px; font: 800 1.15rem/1 var(--display); flex: none; }
.course-chip { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); background: var(--card); border-radius: 99px; padding: 6px 12px; font: 700 .88rem var(--ui); color: var(--text); cursor: pointer; margin-right: auto; margin-left: 14px; }
.course-chip:hover { border-color: var(--ink); } .course-chip .chev { width: 12px; height: 12px; color: var(--muted); }
.course-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); flex: none; } .course-dot.teeline { background: #2f8f5b; } .course-dot.gregg { background: #c4651a; } .course-dot.typo { background: #4a3f8f; } .course-dot.steno { background: #1d3a6b; }
.course-list { display: grid; gap: 8px; margin-bottom: 12px; }
.course-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 14px; color: inherit; text-decoration: none; background: var(--card); }
.course-row > div { flex: 1; display: grid; min-width: 0; } .course-row small { color: var(--muted); }
.course-row.on { border-color: var(--good); background: #f1f8f3; } a.course-row:hover { border-color: var(--ink); }
.course-switch { display: inline-flex; gap: 4px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); border-radius: 99px; padding: 4px; margin-top: 18px; align-self: flex-start; }
.course-switch a { color: #dfe3f2; text-decoration: none; font-weight: 700; font-size: .88rem; padding: 6px 14px; border-radius: 99px; }
.course-switch a.on { background: #fff; color: var(--ink); } .course-switch a:not(.on):hover { background: rgba(255, 255, 255, .14); }
.course-pick { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; } .course-pick legend { font-weight: 600; font-size: .92rem; padding: 0; margin-bottom: 8px; }
.course-pick legend small { font-weight: 400; }
.course-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.course-opt { position: relative; } .course-opt input { position: absolute; opacity: 0; pointer-events: none; }
.course-opt > span { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; height: 100%; font-weight: 400; transition: border-color .15s, background .15s; }
.course-opt > span > .course-badge { grid-row: 1 / span 2; } .course-opt b { font-size: .95rem; } .course-opt small { color: var(--muted); font-size: .8rem; line-height: 1.3; }
.course-opt input:checked + span { border-color: var(--ink); background: #eef2fb; }
.course-opt input:focus-visible + span { box-shadow: 0 0 0 4px rgba(27, 42, 107, .15); }
.course-opt input:disabled + span { opacity: .45; cursor: not-allowed; }
.code-info { display: flex; gap: 6px; align-items: flex-start; font-size: .86rem; font-weight: 500; padding: 8px 10px; border-radius: 10px; }
.code-info.ok { background: #e7f4ec; color: var(--good-dark); } .code-info.bad { background: #fbe9e7; color: var(--bad-dark); } .code-info .ic { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.cc-course { display: block; margin-bottom: 4px; }
.profile-cols .card { margin-bottom: 0; } .profile-cols { margin-bottom: 18px; }
.profile-cols .join-form { margin-bottom: 6px; flex: none; }
@media (max-width: 900px) {
  .course-chip { margin-left: 4px; padding: 5px 10px; } .course-chip .cc-long { display: none; }
}
@media (max-width: 560px) { .course-opts { grid-template-columns: 1fr; } .topbar .page-title { display: none; } .course-chip { margin-left: 0; } }

/* ===================== Key idea (rule) cards ===================== */
.rule-card.rich { padding: 0; overflow: hidden; border-top: 6px solid var(--accent); }
.rule-top { display: flex; gap: 16px; align-items: flex-start; padding: 26px 28px 8px; }
.rule-badge { flex: none; width: 46px; height: 46px; border-radius: 14px; background: #fbecd9; color: var(--accent-dark); display: grid; place-items: center; }
.rule-badge .ic { width: 24px; height: 24px; }
.rule-top h2 { font-family: var(--display); font-size: clamp(1.5rem, 2.6vw, 2.05rem); line-height: 1.15; margin: 2px 0 10px; }
.rule-top .lead { font-size: 1.12rem; line-height: 1.6; margin: 0; color: #3a362e; }
.rule-points { font-size: 1.12rem; line-height: 1.55; margin: 4px 0 0; padding: 0; list-style: none; color: #3a362e; display: grid; gap: 10px; }
.rule-points li { position: relative; padding-left: 26px; }
.rule-points li::before { content: ''; position: absolute; left: 6px; top: 0.62em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent, #2f8f5b); }
.qw { font-family: var(--hand); font-size: 1.35em; color: var(--ink); font-weight: 700; padding: 0 2px; line-height: 1; }
.rule-visual { display: grid; gap: 16px; margin: 18px 28px 6px; padding: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; }
.rule-card.rich > .replay-all { margin: 10px 28px 0; }
.rule-tip { display: flex; gap: 14px; align-items: center; margin: 18px 0 0; padding: 16px 28px 20px; background: linear-gradient(90deg, #fff6e8, #fffdf8); border-top: 1px solid #f2dfc2; }
.rule-tip .rt-ic { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--gold); color: #fff; display: grid; place-items: center; }
.rule-tip .rt-ic .ic { width: 20px; height: 20px; } .rule-tip .k { color: #9a6a0a; margin: 0 0 2px; } .rule-tip b { font-size: 1.06rem; line-height: 1.4; }
.rule-card.rich:not(:has(.rule-tip)) { padding-bottom: 22px; }
/* worked examples */
.rule-demo { display: grid; gap: 8px; }
.rd-head, .rd-row { display: grid; grid-template-columns: minmax(150px, 1.2fr) minmax(120px, 1fr) minmax(130px, 1fr); gap: 14px; align-items: center; }
.rd-head span { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.rd-row { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; animation: rdIn .4s both; }
.rd-row:nth-child(3) { animation-delay: .12s; } .rd-row:nth-child(4) { animation-delay: .24s; } .rd-row:nth-child(5) { animation-delay: .36s; }
@keyframes rdIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.rd-word { display: grid; gap: 2px; } .rd-word small { color: var(--muted); font-size: .82rem; }
.rd-word .strip-show { font-size: 2rem; }
.hand-word { font-family: var(--hand); font-size: 2rem; line-height: 1; color: var(--text); }
.swap { display: inline-flex; align-items: baseline; gap: 2px; } .swap b { color: var(--good-dark) !important; }
.rd-keep { display: flex; flex-wrap: wrap; gap: 5px; } .rd-keep .snd { padding: 3px 9px; font-size: .9rem; border-radius: 8px; }
.rd-out { margin: 0; display: grid; place-items: center; min-height: 64px; } .rd-out svg { max-height: 90px; width: auto; }
/* flow */
.rule-flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; counter-reset: rf; }
.rf-step { position: relative; display: grid; justify-items: center; text-align: center; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 10px 14px; animation: rdIn .4s both; }
.rf-n { position: absolute; top: 8px; left: 10px; font: 800 .75rem var(--ui); color: var(--muted); }
.rf-ic { width: 44px; height: 44px; border-radius: 50%; background: #eef2fb; color: var(--ink); display: grid; place-items: center; margin-bottom: 4px; } .rf-ic .ic { width: 22px; height: 22px; }
.rf-step b { font-size: 1rem; } .rf-step small { color: var(--muted); font-size: .82rem; line-height: 1.35; }
/* compare */
.rule-compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch; }
.rc-col { display: grid; gap: 8px; align-content: start; } .rc-col .k { margin: 0; }
.rc-col div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-weight: 600; }
.rc-col.slow div { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(194, 65, 58, .5); }
.rc-col.fast div { border-color: #b9dcc7; background: #f1f8f3; color: var(--good-dark); font-family: var(--hand); font-size: 1.5rem; line-height: 1.1; }
.rc-arrow { align-self: center; color: var(--accent); } .rc-arrow .ic { width: 26px; height: 26px; }
/* symbols */
.rule-symbols { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.rule-symbols div { display: grid; justify-items: center; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 8px; }
.rule-symbols b { font-size: 2.2rem; line-height: 1; color: var(--ink); } .rule-symbols span { font-weight: 600; color: var(--muted); font-size: .9rem; }
/* steno pad illustration */
.rule-pad { display: grid; grid-template-columns: 1fr 1fr; width: min(320px, 100%); margin: 0 auto; background: #fffef6; border: 1px solid var(--line-2); border-radius: 6px 6px 10px 10px; box-shadow: 0 8px 20px -12px rgba(0, 0, 0, .35); padding: 18px 0 14px; position: relative; }
.rule-pad::before { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; border-left: 2px solid #e3a7a2; }
.rp-col { position: relative; display: grid; gap: 12px; padding: 0 18px; }
.rp-col i { display: block; height: 3px; border-radius: 3px; background: var(--ink); opacity: .55; width: 85%; }
.rp-col i:nth-child(odd) { width: 60%; } .rp-col i:nth-child(3n) { width: 75%; }
.rp-n { position: absolute; top: -14px; left: 6px; font: 800 .8rem var(--ui); color: var(--accent-dark); }
.rp-arrow { position: absolute; right: 6px; top: 20%; width: 14px; color: var(--accent); }
@media (max-width: 700px) {
  .rule-top { padding: 20px 18px 6px; gap: 12px; } .rule-badge { width: 38px; height: 38px; }
  .rule-visual { margin: 14px 12px 4px; padding: 12px; } .rule-card.rich > .replay-all { margin: 10px 18px 0; } .rule-tip { padding: 14px 18px 18px; }
  .rd-head { display: none; } .rd-row { grid-template-columns: 1fr auto; } .rd-keep { grid-column: 1; } .rd-out { grid-column: 2; grid-row: 1 / span 2; }
  .rule-compare { grid-template-columns: 1fr; } .rc-arrow { transform: rotate(90deg); justify-self: center; }
}

/* ===================== Exams and checkpoints ===================== */
.pl-stage.exam .tile-label, .pl-stage.exam .build-seq, .pl-stage.exam .tile-mark { display: none !important; }
.pl-stage.exam .tile { min-height: 74px; }
.exam-q { float: right; color: var(--muted); letter-spacing: .04em; }
.pl-stage.exam .step-kicker { display: block; max-width: 760px; margin-left: auto; margin-right: auto; text-align: left; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.opt.locked { border-color: var(--ink) !important; background: #eef2fb !important; }
.transcribe-in { display: block; width: min(640px, 100%); margin: 18px auto 0; font-size: 1.15rem; resize: vertical; }
.exam-report { text-align: left; width: min(720px, 100%); margin: 18px auto 6px; display: grid; gap: 10px; }
.exam-report h3 { margin: 10px 0 2px; font-family: var(--display); }
.er-secs { display: grid; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.er-sec { display: grid; grid-template-columns: 150px 1fr 48px; gap: 12px; align-items: center; font-weight: 600; font-size: .92rem; }
.er-sec i { height: 10px; border-radius: 9px; background: var(--paper-2); overflow: hidden; } .er-sec i b { display: block; height: 100%; border-radius: 9px; background: var(--good); }
.er-sec.mid i b { background: var(--gold); } .er-sec.low i b { background: var(--bad); } .er-sec em { font-style: normal; text-align: right; color: var(--muted); }
.er-missed { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; counter-reset: er; }
.er-missed li { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--bad); border-radius: 12px; padding: 10px 14px; }
.er-tag { font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); grid-column: 1 / -1; }
.er-body { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; grid-column: 1 / -1; } .er-body svg { max-height: 54px; width: auto; }
.er-note { grid-column: 1 / -1; font-size: .86rem; color: var(--muted); } .er-note s { color: var(--bad); }
.er-perfect { display: flex; gap: 8px; align-items: center; font-weight: 700; color: var(--good-dark); }
@media (max-width: 560px) { .er-sec { grid-template-columns: 1fr 44px; } .er-sec i { grid-column: 1 / -1; grid-row: 2; } .exam-q { float: none; display: block; margin-top: 2px; } }

/* ===================== Lesson phases ===================== */
.pl-phase { flex: none; font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 5px 10px; border-radius: 99px; background: var(--paper-2); color: var(--muted); white-space: nowrap; }
.pl-phase.learn { background: #e1e8fa; color: var(--ink); } .pl-phase.guided { background: #fbecd9; color: var(--accent-dark); }
.pl-phase.practice { background: #dcefe3; color: var(--good-dark); } .pl-phase.check { background: #f3e3f7; color: #6b2f7a; }
.guided-tag { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 99px; background: #fbecd9; color: var(--accent-dark); font-size: .68rem; letter-spacing: .04em; vertical-align: 1px; }
.phase-card { width: min(640px, 100%); margin: 24px auto 0; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: 30px 28px 34px; box-shadow: var(--shadow); }
.phase-card h2 { font-family: var(--display); font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 10px 0 8px; }
.phase-card .lead { margin: 0 auto; max-width: 480px; }
.phase-ic { display: inline-grid; place-items: center; width: 68px; height: 68px; border-radius: 22px; background: #eef2fb; color: var(--ink); margin-top: 18px; } .phase-ic .ic { width: 32px; height: 32px; }
.phase-card.guided .phase-ic { background: #fbecd9; color: var(--accent-dark); } .phase-card.practice .phase-ic { background: #dcefe3; color: var(--good-dark); } .phase-card.check .phase-ic { background: #f3e3f7; color: #6b2f7a; }
.phase-n { font-weight: 800; color: #6b2f7a; margin: 14px 0 0; }
.phase-track { display: flex; justify-content: center; gap: 6px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.phase-track li { display: flex; align-items: center; gap: 6px; padding: 6px 12px 6px 6px; border-radius: 99px; background: var(--paper); color: var(--muted); font-size: .82rem; }
.phase-track li span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); } .phase-track li .ic { width: 14px; height: 14px; }
.phase-track li.done { color: var(--good-dark); } .phase-track li.done span { background: var(--good); color: #fff; }
.phase-track li.now { background: var(--ink); color: #fff; } .phase-track li.now span { background: rgba(255, 255, 255, .2); color: #fff; }
@media (max-width: 560px) { .pl-phase { display: none; } .phase-track li b { display: none; } .phase-track li { padding: 6px; } }

/* ===================== Dictation studio ===================== */
.studio-cta { display: flex; align-items: center; gap: 18px; padding: 18px 22px; margin-bottom: 18px; border-radius: 20px; background: linear-gradient(120deg, var(--ink), #2c3f8f); color: #fff; text-decoration: none; box-shadow: var(--shadow); }
.studio-cta h3 { margin: 0 0 2px; font-family: var(--display); font-size: 1.35rem; color: #fff; } .studio-cta p { margin: 0; color: #d6dcf2; } .studio-cta .k { color: #f6c27a; margin: 0; }
.studio-cta > div { flex: 1; } .studio-cta .btn.primary { background: #fff; color: var(--ink); box-shadow: 0 3px 0 rgba(0, 0, 0, .25); }
.sc-ic { flex: none; width: 56px; height: 56px; border-radius: 18px; background: rgba(255, 255, 255, .14); display: grid; place-items: center; } .sc-ic .ic { width: 28px; height: 28px; }
.studio-hero { display: grid; gap: 18px; }
.studio-hero h2 { font-family: var(--display); margin: 2px 0 8px; font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.studio-steps { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 14px 0 0; counter-reset: st; }
.studio-steps li { display: flex; align-items: center; gap: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; font-weight: 700; font-size: .88rem; } .studio-steps .ic { width: 16px; height: 16px; color: var(--accent); }
.ladder { border-top: 1px solid var(--line); padding-top: 14px; } .ladder-rungs { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: 6px; margin-top: 6px; }
.rung { display: grid; justify-items: center; gap: 0; padding: 8px 6px; text-align: center; position: relative; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.rung b { font-family: var(--display); font-size: 1.3rem; color: var(--text); line-height: 1.1; } .rung > .ic, .rung > em { position: absolute; top: 4px; right: 6px; } .rung .ic { width: 16px; height: 16px; color: var(--good); } .rung em { font-style: normal; font-weight: 800; color: var(--accent-dark); font-size: .72rem; text-transform: uppercase; }
.rung.passed { background: #e7f4ec; border-color: #b9dcc7; } .rung.target { background: #fff4e3; border-color: #f2d2a5; }
.recent-takes { display: flex; gap: 10px; flex-wrap: wrap; }
.take { display: grid; gap: 1px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); text-decoration: none; color: inherit; min-width: 130px; }
.take b { font-family: var(--display); font-size: 1.3rem; color: var(--bad-dark); } .take.pass b { color: var(--good-dark); } .take small { color: var(--muted); }
.studio-filters { justify-content: space-between; align-items: flex-start; } .studio-filters .chips-row { justify-content: flex-start; flex: 1; min-width: 300px; }
.pg-best.muted { color: var(--muted); font-weight: 600; } .studio-filters .tabs { margin: 0; } .chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.passage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.passage { display: grid; gap: 6px; padding: 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: transform .15s; }
.passage:hover { transform: translateY(-2px); border-color: var(--ink); } .passage b { font-family: var(--display); font-size: 1.12rem; } .passage small { color: var(--muted); }
.passage.done { border-left: 4px solid var(--good); }
.pg-top { display: flex; justify-content: space-between; align-items: center; } .pg-best { font-size: .82rem; font-weight: 700; color: var(--good-dark); display: flex; gap: 4px; align-items: center; } .pg-best .ic { width: 14px; height: 14px; }
.lvl-dots { display: flex; gap: 3px; } .lvl-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); } .lvl-dots i.on { background: var(--accent); }
.ds-setup { display: grid; gap: 14px; } .speed-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; } .speed-pick .ic { width: 12px; height: 12px; }
.ds-preview summary { cursor: pointer; font-weight: 700; display: flex; gap: 6px; align-items: center; }
.ds-hard { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; } .ds-hard figure { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; display: grid; justify-items: center; }
.ds-hard figcaption { font-family: var(--hand); font-size: 1.2rem; color: var(--accent-dark); } .ds-hard .lh span { font-family: var(--hand); font-size: 1.6rem; }
.ds-controls { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.ds-status { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; margin: 16px 0; } .ds-count { font-weight: 700; color: var(--muted); min-width: 150px; text-align: right; }
.ds-bar { height: 10px; background: var(--paper-2); border-radius: 9px; overflow: hidden; } .ds-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s linear; }
.ds-pad { margin-bottom: 10px; }
.ds-input { font-size: 1.05rem; line-height: 1.5; margin: 8px 0 12px; }
.ds-score { display: flex; gap: 22px; align-items: center; } .ds-score.pass { border-left: 6px solid var(--good); } .ds-score.fail { border-left: 6px solid var(--bad); }
.ds-big { display: grid; justify-items: center; min-width: 120px; } .ds-big b { font-family: var(--display); font-size: 3rem; line-height: 1; } .ds-score.pass .ds-big b { color: var(--good-dark); } .ds-score.fail .ds-big b { color: var(--bad-dark); }
.ds-big span { color: var(--muted); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
.ds-verdict h3 { margin: 0 0 4px; font-family: var(--display); font-size: 1.4rem; } .ds-verdict p { margin: 0 0 10px; }
.ds-stats { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .9rem; color: var(--muted); } .ds-stats b { color: var(--text); }
.ds-marked { font-size: 1.12rem; line-height: 1.8; } .ds-marked s { color: var(--bad); text-decoration-thickness: 2px; background: #fdecea; border-radius: 4px; padding: 0 2px; }
.ds-model { display: grid; gap: 14px; } .dm-row { border-bottom: 1px dashed var(--line); padding-bottom: 10px; } .dm-row:last-child { border-bottom: 0; }
.dm-row p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; } .dm-out { overflow-x: auto; } .dm-out svg { max-width: none; }
.dm-out.gregg { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; } .gw.lh { font-family: var(--hand); font-size: 1.4rem; color: var(--muted); }
.ds-again { margin: 6px 0 24px; gap: 10px; }
.dict-tx { width: min(620px, 100%); margin: 12px auto 0; display: grid; gap: 4px; } .dict-tx .transcribe-in { margin-top: 0; }
@media (max-width: 760px) { .studio-hero { grid-template-columns: 1fr; } .studio-cta { flex-direction: column; align-items: flex-start; } .ds-score { flex-direction: column; align-items: flex-start; } }
.dm-out { cursor: pointer; }

/* ===================== Unit 1 rework: stats, previews, objectives, back ===================== */
.rule-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.rule-stats > div { display: grid; gap: 2px; justify-items: center; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 10px 14px; animation: rdIn .4s both; }
.rule-stats b { font-family: var(--display); font-size: 2.2rem; line-height: 1; color: var(--ink); }
.rule-stats span { color: var(--muted); font-size: .84rem; line-height: 1.35; max-width: 160px; }
.rule-preview { display: flex; gap: 8px; align-items: flex-start; margin: 2px 0 0; font-size: .86rem; color: var(--muted); font-style: italic; }
.rule-preview .ic { flex: none; width: 15px; height: 15px; margin-top: 2px; }
.intro-objectives { text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; margin: 16px auto 4px; width: min(560px, 100%); }
.intro-objectives .k { margin-bottom: 8px; }
.intro-objectives ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.intro-objectives li { display: flex; gap: 9px; align-items: flex-start; font-weight: 600; font-size: .95rem; }
.intro-objectives li .ic { flex: none; width: 17px; height: 17px; color: var(--good); margin-top: 2px; }
.pl-back { margin-left: 2px; }
.q .kept, .kept { font-family: ui-monospace, Menlo, Consolas, monospace; text-transform: uppercase; letter-spacing: .22em; font-weight: 800; }
.q .stripped, .stripped { font-family: ui-monospace, Menlo, Consolas, monospace; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; background: var(--paper-2); padding: 2px 8px; border-radius: 8px; white-space: nowrap; }
.er-missed .stripped { font-size: .85em; white-space: normal; }
@media (max-width: 700px) { .rule-stats b { font-size: 1.7rem; } .q .stripped { white-space: normal; } }
.rule-grid.five { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.avg-fields { margin-bottom: 6px; transition: opacity .2s; max-width: 260px; } .avg-fields.dim { opacity: .45; }

/* watch step: strip, write, join explained */
.watch-why { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; width: min(760px, 100%); margin: 6px auto 14px; }
.ww-step { position: relative; display: grid; gap: 6px; justify-items: center; align-content: start; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px 12px 14px; }
.ww-n { position: absolute; top: 8px; left: 10px; font: 800 .78rem var(--ui); color: var(--muted); }
.ww-step > b { font-size: .95rem; } .ww-step small { color: var(--muted); font-size: .8rem; line-height: 1.35; text-align: center; }
.ww-step .strip-show { font-size: 1.7rem; }
.ww-pieces { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: center; }
.ww-pieces figure { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 4px 8px; }
.ww-pieces .plus { color: var(--muted); font-weight: 700; }
.ww-pieces figcaption { font-size: 0.68rem; color: var(--muted); text-align: center; margin-top: 2px; }
.ww-step.ww-shrink { background: #fdf6e8; border: 1px solid #ecd9ab; border-radius: 12px; }
.ww-step.ww-shrink .ww-n { background: #b9830f; color: #fff; }
.ww-step .chips-row .snd { padding: 3px 9px; font-size: .88rem; }
button.stat-card.click { text-align: left; cursor: pointer; font: inherit; color: inherit; transition: transform .12s, border-color .12s; }
button.stat-card.click:hover { border-color: var(--ink); transform: translateY(-2px); }
.tile-list { max-height: 60vh; overflow: auto; margin-top: 8px; }
.tile-list .list-row .ic { width: 20px; height: 20px; color: var(--muted); flex: none; }
.nick-btn { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 2px; vertical-align: middle; }
.nick-btn:hover { color: var(--ink); } .nick-btn .ic { width: 14px; height: 14px; }
.pl-stage.exam .strip-note { display: none; }

/* Printables card on the Learn rail */
.print-card .print-links { display: grid; gap: 8px; margin-top: 10px; }
.print-card .btn { justify-content: flex-start; text-decoration: none; }
