/* Akademija stolarstva EFS. Boje EFS-a (plava #007acc, tamna #2c2c2c) i hrast s naslovnice weba (#8E7861).
   Motivi: raster rupa sustava 32, kote, krojna ploča. Dizajn: prototip na claude.ai (PLAN_AKADEMIJA.md, Stanje). */
:root {
  --ink: #2C2C2C; --ink-2: #4A5058; --ink-3: #5A6068;
  --ground: #F3F4F5; --surface: #FFFFFF; --line: #DDE0E3; --line-2: #ECEEF0; --line-3: #A9AFB6;
  --blue: #0068B0; --blue-hover: #00589A; --blue-brand: #007ACC; --blue-light: #2E9BE6; --blue-dim: #4DA8EA; --blue-tint: #E3EEF8;
  --oak: #C9AE8E; --oak-dark: #8E7861; --oak-tint: #F1E8DC; --oak-ink: #5E4B36;
  --dark: #1D1F22; --dark-text: #F4F5F6; --dark-muted: #C9CDD2; --dark-faint: #A9AFB6;
  --ok: #1F7A44; --ok-tint: #EAF5EE; --ok-ink: #17552F; --bad: #B3261E; --bad-tint: #FBEDEC; --bad-ink: #8C1D18;
  --grey-tint: #EEF0F2;
  --display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  --oak-decor: repeating-linear-gradient(97deg, rgba(110,85,55,0.14) 0 2px, transparent 2px 9px), var(--oak);
  --holes: radial-gradient(circle, rgba(255,255,255,0.07) 2px, transparent 2.6px);
  --radius: 16px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); }
a:hover { color: var(--blue-hover); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--blue-brand); outline-offset: 2px; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
img, svg { max-width: 100%; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* layout */
.wrap { max-width: 1240px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.page-pad { padding-top: 24px; padding-bottom: 64px; }
.section { padding-top: 56px; display: flex; flex-direction: column; gap: 20px; }
.row-wrap { display: flex; flex-wrap: wrap; }
.gap-24 { gap: 24px; } .gap-32 { gap: 32px; }
.align-start { align-items: flex-start; }
.grow { flex: 1; }
.stack-2, .stack-4, .stack-6, .stack-8, .stack-10, .stack-12, .stack-16, .stack-20, .stack-24, .stack-28 { display: flex; flex-direction: column; }
.stack-2 { gap: 2px; } .stack-4 { gap: 4px; } .stack-6 { gap: 6px; } .stack-8 { gap: 8px; } .stack-10 { gap: 10px; } .stack-12 { gap: 12px; }
.stack-16 { gap: 16px; } .stack-20 { gap: 20px; } .stack-24 { gap: 24px; } .stack-28 { gap: 28px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; }

/* type */
.mono { font-family: var(--mono); }
.small { font-size: 14px; } .tiny { font-size: 12px; }
.muted { color: var(--ink-2); } .muted-light { color: var(--dark-muted); }
.accent { color: var(--blue); }
.h-hero { font-family: var(--display); font-stretch: 118%; font-weight: 800; font-size: clamp(40px, 5vw, 66px); line-height: 1.02; letter-spacing: -0.01em; }
.h-page { font-family: var(--display); font-stretch: 115%; font-weight: 800; font-size: clamp(30px, 3.4vw, 42px); line-height: 1.05; }
.h-lesson { font-family: var(--display); font-stretch: 118%; font-weight: 800; font-size: clamp(34px, 4vw, 52px); line-height: 1.02; }
.h-section { font-family: var(--display); font-stretch: 112%; font-weight: 700; font-size: 28px; line-height: 1.1; }
.h-card-lg { font-family: var(--display); font-stretch: 112%; font-weight: 700; font-size: 28px; line-height: 1.1; }
.h-card { font-family: var(--display); font-stretch: 110%; font-weight: 700; font-size: 21px; line-height: 1.15; }
.h-card-sm { font-family: var(--display); font-stretch: 110%; font-weight: 700; font-size: 18px; line-height: 1.2; }
.h-num { font-family: var(--display); font-stretch: 112%; font-weight: 800; font-size: 40px; line-height: 1; }

/* header / footer */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); text-decoration: none; font-family: var(--display); font-stretch: 115%; font-weight: 700; font-size: 17px; }
.main-nav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1 1 auto; }
.main-nav a, .lang-nav a { padding: 10px 14px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 15px; }
.main-nav a:hover { background: var(--grey-tint); }
.main-nav a[aria-current] { background: var(--grey-tint); font-weight: 600; }
.lang-nav { display: flex; gap: 4px; font-family: var(--mono); }
.lang-nav a { padding: 6px 10px; border: 1px solid #C9CDD1; font-size: 13px; }
.lang-nav a[aria-current] { background: var(--ink); color: #fff; border-color: var(--ink); }
.site-footer { border-top: 1px solid #D5D8DC; margin-top: 24px; }
.footer-row { display: flex; flex-wrap: wrap; gap: 6px 20px; padding-top: 24px; padding-bottom: 32px; font-size: 13px; color: var(--ink-2); }
.footer-note { flex-basis: 100%; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 10px; border: 0; font-family: var(--body); font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); color: #fff; }
.btn-ghost-light { background: transparent; color: var(--dark-text); border: 1px solid rgba(255,255,255,0.45); }
.btn-ghost-light:hover { color: #fff; border-color: #fff; }
.btn-start { align-self: flex-start; }
.btn:disabled { opacity: 0.5; cursor: default; }
.link-btn { padding: 0; min-height: 44px; border: 0; background: none; color: var(--blue); font-family: var(--body); text-decoration: underline; cursor: pointer; }

/* dimension line (kota) */
.dim { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--blue); }
.dim-tick { width: 1px; height: 14px; background: currentColor; }
.dim-line { flex: 0 0 44px; height: 1px; background: currentColor; }
.dim-light { color: var(--blue-dim); }
.reward-side .dim-line { flex: 1; }

/* hero */
.hero { background-color: var(--dark); background-image: var(--holes); background-size: 32px 32px; background-position: 21px 21px; color: var(--dark-text); padding: 56px 0 48px; }
.hero-grid { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.hero-text { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.hero-lead { max-width: 560px; font-size: 18px; line-height: 1.55; color: var(--dark-muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 8px; }
.hero-note { font-size: 14px; color: var(--dark-faint); }
.hero-side { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.hero-figure { display: flex; flex-direction: column; gap: 8px; }
.cabinet-svg { width: 100%; max-width: 420px; height: auto; align-self: center; }
.hero-figure figcaption { align-self: center; font-size: 11px; letter-spacing: 0.06em; color: #8E959D; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid rgba(255,255,255,0.22); }
.stats > div { padding: 12px 14px; border-right: 1px solid rgba(255,255,255,0.22); }
.stats > div:last-child { border-right: 0; }
.stats dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dark-faint); }
.stats dd { margin-top: 4px; font-family: var(--display); font-stretch: 112%; font-weight: 700; font-size: 24px; }
.stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.reward-note { display: flex; gap: 14px; align-items: flex-start; padding: 16px; background: rgba(201,174,142,0.12); border: 1px solid rgba(201,174,142,0.45); border-radius: 12px; color: var(--oak); }
.reward-note svg { flex: none; margin-top: 2px; }
.reward-note p { font-size: 15px; line-height: 1.5; color: #E9DCCB; }
.reward-note strong { color: #F4E9DA; }

/* how / faq */
.how { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.how li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.how h3 { font-family: var(--display); font-stretch: 110%; font-size: 20px; }
.how p { color: var(--ink-2); }
.how-num { color: var(--blue); font-size: 13px; }
.faq { display: flex; flex-direction: column; gap: 8px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; }
.faq summary { min-height: 52px; display: flex; align-items: center; font-weight: 600; cursor: pointer; }
.faq details p { padding-bottom: 16px; color: var(--ink-2); }

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-pad { padding: 22px 24px; }
.card-body { padding: 22px 24px 24px; flex: 1; }
.card-dark { background-color: var(--dark); background-image: var(--holes); background-size: 32px 32px; color: var(--dark-text); border: 0; padding: 20px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--grey-tint); color: var(--ink-2); white-space: nowrap; }

/* modules */
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.module-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 12px; min-height: 168px; text-decoration: none; color: var(--ink); }
.module-card:hover { border-color: var(--line-3); color: var(--ink); }
.module-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.module-card-title { display: flex; flex-direction: column; gap: 2px; }
.module-icon { width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--grey-tint); color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; }
.module-icon-lg { width: 56px; height: 56px; border-radius: 14px; }
[data-state="done"] .module-icon, [data-state="done"] > .module-icon { background: var(--oak-tint); color: #6E5A44; }
[data-state="done"] .chip { background: var(--oak-tint); color: var(--oak-ink); }
[data-state="cur"] .module-icon { background: var(--blue-tint); color: var(--blue); }
[data-state="cur"] .chip { background: var(--blue-tint); color: var(--blue-hover); }
.module-card[data-state="cur"] { border: 2px solid var(--blue-brand); padding: 17px; }
.module-card[data-state="soon"] .chip { background: transparent; border: 1px dashed #8A9098; }
.module-card[data-state="soon"] .h-card { color: var(--ink-2); }
.module-head { display: flex; align-items: center; gap: 16px; }

/* holes: one per lesson */
.holes { display: flex; flex-wrap: wrap; gap: 8px; }
.hole { width: 12px; height: 12px; flex: none; border-radius: 50%; border: 1.5px solid #8A9098; background: transparent; }
.hole.is-done { background: var(--ink); border-color: var(--ink); }
.hole.is-current { background: var(--blue-brand); border-color: var(--blue-brand); }

/* dashboard */
.page-title-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.continue-card { flex: 1 1 420px; min-width: 0; overflow: hidden; display: flex; flex-direction: column; }
.sheet-card { flex: 1.15 1 480px; min-width: 0; padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 16px; }
.sheet-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; }
.sheet-pct { text-align: right; }
.sheet-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--ink-3); font-size: 11px; }
.sheet { position: relative; width: 100%; aspect-ratio: 2800 / 2070; background: #E6E8EA; border: 1px solid var(--line-3); }
.part { position: absolute; overflow: hidden; background: var(--surface); border: 1px solid var(--line-3); }
.part-label { position: relative; padding: 6px 8px; display: flex; flex-direction: column; gap: 1px; font-size: 13px; font-weight: 600; line-height: 1.2; color: var(--ink-2); }
.part-label .mono { font-size: 11px; font-weight: 500; }
.part-fill { position: absolute; left: 0; top: 0; bottom: 0; width: var(--fill, 0%); background: repeating-linear-gradient(135deg, rgba(0,122,204,0.20) 0 4px, transparent 4px 9px); }
.part[data-state="done"] { background: var(--oak-decor); border: 0; box-shadow: inset 0 0 0 2px var(--oak-dark); }
.part[data-state="done"] .part-label, .part[data-state="cur"] .part-label { color: var(--ink); }
.part[data-state="cur"] { border: 2px solid var(--blue-brand); }
.part-offcut { background: transparent; border: 1px dashed #8A9098; }
.part-offcut .part-label { color: var(--ink-3); }
.legend { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--ink-2); }
.legend li { display: flex; align-items: center; gap: 8px; }
.sw { width: 18px; height: 12px; display: inline-block; }
.sw-done { background: var(--oak-decor); box-shadow: inset 0 0 0 2px var(--oak-dark); }
.sw-cur { border: 2px solid var(--blue-brand); background: repeating-linear-gradient(135deg, rgba(0,122,204,0.22) 0 3px, transparent 3px 6px); }
.sw-todo { border: 1px solid var(--line-3); background: #fff; }
.sw-off { border: 1px dashed #8A9098; }
.reward-band { background-color: var(--dark); background-image: var(--holes); background-size: 32px 32px; color: var(--dark-text); border-radius: var(--radius); padding: 26px 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 20px 40px; }
.reward-main { flex: 1 1 360px; min-width: 0; display: flex; gap: 16px; align-items: flex-start; }
.reward-main p { color: var(--dark-muted); font-size: 15px; }
.reward-icon { flex: none; width: 52px; height: 52px; border-radius: 12px; background: rgba(201,174,142,0.16); border: 1px solid rgba(201,174,142,0.5); color: var(--oak); display: inline-flex; align-items: center; justify-content: center; }
.reward-side { flex: 1 1 340px; min-width: 0; }

/* poster / video */
.poster { position: relative; aspect-ratio: 16 / 9; background-color: var(--dark); background-image: radial-gradient(circle, rgba(255,255,255,0.06) 1.6px, transparent 2px); background-size: 24px 24px; }
.poster-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.poster-play { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border: 0; border-radius: 50%; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 24px rgba(0,0,0,0.35); cursor: pointer; }
.poster-play:hover { background: var(--blue-hover); color: #fff; }
.poster-soon { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; color: var(--dark-faint); font-size: 12px; letter-spacing: 0.1em; }
.video { border-radius: var(--radius); overflow: hidden; background: var(--dark); }
.video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
.video-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 16px; color: var(--dark-muted); }
.video-mark { min-height: 40px; padding: 0 14px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.4); background: transparent; color: var(--dark-text); font-family: var(--body); font-size: 14px; font-weight: 600; cursor: pointer; }
.video-mark[aria-pressed="true"] { background: var(--oak); border-color: var(--oak); color: var(--ink); }

/* lesson */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 14px; color: var(--ink-2); }
.lesson-main { flex: 1 1 600px; min-width: 0; }
.aside { flex: 1 1 300px; max-width: 100%; min-width: 0; }
@media (min-width: 1000px) { .aside { flex: 0 0 340px; } }
.chapters { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.chapters li { display: flex; gap: 12px; align-items: baseline; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
.chapters li:has(.chapter-btn) { padding: 0; }
.chapter-btn { all: unset; box-sizing: border-box; width: 100%; display: flex; gap: 12px; align-items: baseline; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: 14px; color: inherit; }
.chapter-btn .ch-title { flex: 1; }
.chapter-btn .ch-time { color: var(--blue, #0068B0); }
.chapter-btn:hover { background: rgba(0,104,176,0.06); }
.chapter-btn:hover .ch-title { text-decoration: underline; }
.chapter-btn:focus-visible { outline: 2px solid var(--blue, #0068B0); outline-offset: 2px; }
.summary { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 16px; line-height: 1.55; }
.summary li { display: flex; gap: 14px; }
.summary .mono { flex: none; padding-top: 3px; }
.module-box { padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.module-box-head { display: flex; align-items: center; gap: 12px; padding: 0 4px 8px; text-decoration: none; color: var(--ink); }
.lesson-mini { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.lesson-mini a { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 6px 10px; border-radius: 10px; text-decoration: none; color: var(--ink); font-size: 15px; }
.lesson-mini a:hover { background: var(--grey-tint); }
.lesson-mini a[aria-current] { background: var(--blue-tint); font-weight: 600; }
.module-test-note { padding: 8px 4px 0; }
.link-card { padding: 18px 20px; display: flex; flex-direction: column; }
.link-card h2 { margin-bottom: 8px; }
.link-card a { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; border-top: 1px solid var(--line-2); text-decoration: none; color: var(--ink); font-size: 15px; }
.link-card a:hover { color: var(--blue); }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 20px; border-top: 1px solid #D5D8DC; }
.pager a { display: flex; flex-direction: column; gap: 2px; min-height: 44px; text-decoration: none; color: var(--ink); font-weight: 600; }
.pager-next { text-align: right; margin-left: auto; }

/* module page */
.lesson-list-card { flex: 1 1 600px; min-width: 0; padding: 8px 8px 16px; }
.lesson-list { list-style: none; padding: 0; }
.lesson-list a, .lesson-list .is-soon { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; min-height: 56px; padding: 8px 14px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.lesson-list a:hover { background: var(--grey-tint); }
.lesson-list .is-soon { color: var(--ink-2); }
.lesson-title { flex: 1 1 220px; font-weight: 600; }
.lesson-id { flex: 0 0 64px; }
.lesson-list-foot { padding: 12px 14px 0; }

/* sign-in */
.account { display: flex; align-items: center; gap: 10px; }
.account-in { display: flex; align-items: center; gap: 10px; }
.btn-small { min-height: 40px; padding: 0 14px; font-size: 14px; }
.login-card { max-width: 480px; margin: 24px auto 0; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.field input { height: 50px; padding: 0 14px; border: 1px solid var(--line-3); border-radius: 10px; font-family: var(--body); font-size: 16px; color: var(--ink); background: #fff; }
[hidden] { display: none !important; }
.key-card { max-width: 640px; }
.key-box { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; background: var(--ground); border: 1px dashed var(--line-3); border-radius: 10px; }
.key-box code { flex: 1 1 260px; font-family: var(--mono); font-size: 15px; letter-spacing: 0.03em; word-break: break-all; }

/* quiz (built by academy.js) */
.quiz { display: flex; flex-direction: column; gap: 24px; }
.q { display: flex; flex-direction: column; gap: 12px; padding-top: 24px; border-top: 1px solid var(--line-2); }
.q:first-child { padding-top: 0; border-top: 0; }
.q-kicker { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.q-text { font-size: 18px; line-height: 1.5; font-weight: 600; }
.q-hint { font-size: 14px; color: var(--ink-2); }
.opts { display: flex; flex-direction: column; gap: 8px; }
.opt { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 8px 14px; border: 1px solid #C9CDD1; border-radius: 10px; background: var(--surface); color: var(--ink); font-family: var(--body); font-size: 16px; text-align: left; cursor: pointer; width: 100%; }
.opt:hover:not(:disabled) { border-color: var(--line-3); background: #FAFAFB; }
.opt:disabled { cursor: default; }
.opt-letter { flex: none; width: 28px; height: 28px; border-radius: 7px; background: var(--grey-tint); display: inline-flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 13px; font-weight: 500; }
.opt-text { flex: 1; }
.opt-tag { flex: none; font-size: 13px; font-weight: 600; }
.opt[aria-pressed="true"]:not(.is-right):not(.is-wrong) { border: 2px solid var(--blue-brand); padding: 7px 13px; }
.opt[aria-pressed="true"]:not(.is-right):not(.is-wrong) .opt-letter { background: var(--blue-brand); color: #fff; }
.opt.is-right { border: 2px solid var(--ok); background: var(--ok-tint); padding: 7px 13px; }
.opt.is-right .opt-letter { background: var(--ok); color: #fff; }
.opt.is-right .opt-tag { color: var(--ok-ink); }
.opt.is-wrong { border: 2px solid var(--bad); background: var(--bad-tint); padding: 7px 13px; }
.opt.is-wrong .opt-letter { background: var(--bad); color: #fff; }
.opt.is-wrong .opt-tag { color: var(--bad-ink); }
.q-num-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.q-num-row label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.q-num-row input { width: 160px; height: 48px; padding: 0 14px; border: 1px solid var(--line-3); border-radius: 10px; font-family: var(--mono); font-size: 18px; color: var(--ink); background: #fff; }
.q-num-row input.is-right { border: 2px solid var(--ok); }
.q-num-row input.is-wrong { border: 2px solid var(--bad); }
.fb { padding: 12px 14px; border-radius: 10px; font-size: 15px; line-height: 1.5; }
.fb-ok { background: var(--ok-tint); color: var(--ok-ink); }
.fb-bad { background: var(--bad-tint); color: var(--bad-ink); }
.quiz-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: 12px; background: var(--ground); }
.btn-outline { background: #fff; color: var(--ink); border: 1px solid var(--line-3); min-height: 44px; font-size: 15px; }
.btn-outline:hover { border-color: var(--ink); color: var(--ink); }

@media (max-width: 640px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .dim-line { flex-basis: 16px; }
  .dim { gap: 6px; letter-spacing: 0.02em; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats > div:nth-child(2) { border-right: 0; }
  .stats > div:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,0.22); }
  .stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats-3 > div { border-bottom: 0 !important; border-right: 1px solid rgba(255,255,255,0.22) !important; }
  .stats-3 > div:last-child { border-right: 0 !important; }
  .part-label { padding: 3px 4px; font-size: 10px; }
  .part-label .mono { font-size: 9px; }
  .sheet-card, .card-pad, .card-body { padding-left: 16px; padding-right: 16px; }
  .reward-band { padding: 20px 18px; }
}
@media (prefers-reduced-motion: no-preference) {
  .opt, .btn, .module-card { transition: border-color .15s, background-color .15s; }
}
