:root {
  --bg: #f3f8f4;
  --surface: #ffffff;
  --soft: #e7f3eb;
  --soft-2: #d5eadc;
  --line: #d3e5d9;
  --text: #1c3328;
  --muted: #587063;
  --primary: #2e7d55;
  --primary-dark: #22603f;
  --primary-ink: #ffffff;
  --hour: #1f5e43;
  --minute: #d9822b;
  --good-bg: #e2f3e7;
  --good-line: #9fd0ae;
  --try-bg: #fdf4e3;
  --try-line: #ecc98a;
  --try-ink: #7a4f0f;
  --sector-a: #d7eedf;
  --sector-b: #fbecc9;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(28, 51, 40, .05), 0 4px 16px rgba(28, 51, 40, .05);
  --font: 'Lexend', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 18px; line-height: 1.55; }
h1, h2, h3 { line-height: 1.2; font-weight: 600; margin: 0 0 .5em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; margin-top: 1.4em; }
p { margin: 0 0 .8em; }
a { color: var(--primary-dark); }
b, strong { font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.row.center { justify-content: center; }
.loading { padding: 4rem 1rem; text-align: center; color: var(--muted); }
:focus-visible { outline: 3px solid #7bbf95; outline-offset: 2px; }

/* ---------- layout ---------- */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem clamp(16px, 4vw, 32px); background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 600; font-size: 1.2rem; text-decoration: none; color: var(--text); }
.logo svg { width: 32px; height: 32px; display: block; }
.topbar-right { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; justify-content: flex-end; }
.who { font-weight: 500; }
.save-status { font-size: .8rem; color: var(--muted); }
.save-status.warn { color: var(--try-ink); }
.main { max-width: 980px; margin: 0 auto; padding: 1.5rem 16px 4rem; }
.narrow { max-width: 460px; margin: 2rem auto; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); margin-bottom: 1.2rem; }
.card.flush { padding: 0; overflow: hidden; }
.crumbs { margin-bottom: .8rem; font-size: .95rem; }
.crumbs a { text-decoration: none; }
.eyebrow { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 500; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.page-head h1 { margin: 0; }

/* ---------- knappar och formulär ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: inherit; font-size: 1rem; font-weight: 500; padding: .65rem 1.2rem; border-radius: 999px; border: 1.5px solid var(--soft-2); background: var(--soft); color: var(--primary-dark); cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s; min-height: 44px; }
.btn:hover { background: var(--soft-2); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.ghost:hover { background: var(--soft); }
.btn.small { font-size: .85rem; padding: .35rem .8rem; min-height: 36px; }
.btn.big { font-size: 1.1rem; padding: .8rem 1.8rem; }
.btn.danger { color: #8a3b1c; border-color: #efd2c4; background: #fbf1ec; }
.btn:disabled { opacity: .55; cursor: default; }
input, textarea, select { font: inherit; color: var(--text); }
.field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: 1rem; }
.field label { font-weight: 500; }
.field input, .field textarea, .select { padding: .65rem .8rem; border: 1.5px solid var(--line); border-radius: 12px; background: #fbfdfb; }
.field input:focus, .field textarea:focus, .select:focus, .answer-input:focus, .code-input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(46, 125, 85, .15); }
.select { min-height: 44px; }
.form-error { color: var(--try-ink); min-height: 1.2em; font-size: .95rem; }
.check { display: flex; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); }
.row.wrap { gap: .5rem; }

/* ---------- inloggning ---------- */
.login-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2rem; align-items: center; margin-top: 1.5rem; }
.login-intro h2 { font-size: 1.6rem; }
.hero-clock { max-width: 200px; margin-bottom: 1rem; }
.intro-list { padding-left: 1.1rem; color: var(--muted); }
.intro-list li { margin-bottom: .4rem; }
.intro-list b { color: var(--text); }
.login-card { display: flex; flex-direction: column; gap: .4rem; }
.login-card h1 { font-size: 1.5rem; }
.code-input { font-size: 2rem; letter-spacing: .25em; text-align: center; padding: .6rem; border: 2px solid var(--line); border-radius: 14px; background: #fbfdfb; text-transform: uppercase; font-weight: 600; width: 100%; }
.login-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; font-size: .95rem; }

/* ---------- startsida ---------- */
.welcome { display: grid; grid-template-columns: 1fr minmax(260px, 380px); gap: 1.5rem; align-items: center; margin-bottom: 2rem; }
.next-card { margin: 0; background: linear-gradient(180deg, #ffffff, var(--soft)); }
.next-title { font-size: 1.25rem; font-weight: 600; margin: .2rem 0 .9rem; }
.part { margin-bottom: 2rem; }
.part-head { display: flex; align-items: baseline; gap: .7rem; }
.part-head h2 { margin: 0; }
.part-num { font-size: .8rem; font-weight: 600; color: var(--primary); background: var(--soft); border-radius: 999px; padding: .15rem .6rem; }
.level-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; }
.level-card { display: flex; align-items: center; gap: .9rem; padding: .9rem 1rem; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); text-decoration: none; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, transform .15s; }
.level-card:hover { border-color: var(--primary); transform: translateY(-1px); }
.level-card.rec { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(46, 125, 85, .12); }
.level-card.locked { background: transparent; color: var(--muted); cursor: default; }
.level-card.locked:hover { border-color: var(--line); transform: none; }
.level-num { flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--primary-dark); font-weight: 600; }
.level-card.mastered .level-num { background: var(--primary); color: #fff; }
.level-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.level-title { font-weight: 600; }
.level-short { font-size: .85rem; color: var(--muted); }
.lock svg { width: 22px; height: 22px; display: block; }
.legend { margin-top: 1rem; }
.stars { display: inline-flex; gap: 2px; flex: none; }
.star svg { width: 20px; height: 20px; display: block; fill: #dfe9e2; }
.star.on svg { fill: #e8b33c; }

/* ---------- förklaring ---------- */
.level-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1rem; }
.level-head h1 { margin: 0; }
.level-head .stars svg { width: 26px; height: 26px; }
.tabs { display: flex; gap: .3rem; border-bottom: 1.5px solid var(--line); margin-bottom: 1.2rem; }
.tab { padding: .55rem 1.1rem; text-decoration: none; color: var(--muted); font-weight: 500; border-bottom: 3px solid transparent; margin-bottom: -1.5px; }
.tab.active { color: var(--primary-dark); border-color: var(--primary); }
.lesson { padding: 1.6rem clamp(1rem, 4vw, 2.2rem); }
.blocks > * { max-width: 680px; margin-left: auto; margin-right: auto; }
.blocks > .examples, .blocks > .tryit, .blocks > .timeline-fig { max-width: 100%; }
.tip { background: var(--soft); border-left: 4px solid var(--primary); padding: .8rem 1rem; border-radius: 0 12px 12px 0; margin: 1rem auto; }
.steps { padding-left: 0; list-style: none; counter-reset: s; margin: .8rem auto 1rem; }
.steps li { counter-increment: s; position: relative; padding-left: 2.4rem; margin-bottom: .6rem; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: .05rem; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--soft); color: var(--primary-dark); font-weight: 600; font-size: .9rem; display: grid; place-items: center; }
.hl-hour { color: var(--hour); font-weight: 600; }
.hl-min { color: #b86614; font-weight: 600; }
.clock-fig { margin: 1rem auto; display: flex; flex-direction: column; align-items: center; gap: .4rem; text-align: center; }
.clock-fig figcaption { font-size: .95rem; color: var(--muted); max-width: 320px; }
.cap-top { font-weight: 600; color: var(--text) !important; }
.examples { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.5rem; }
.examples .clock-fig { margin: .5rem 0; width: 150px; }
.examples figcaption { color: var(--text); font-weight: 500; }
.table-wrap { overflow-x: auto; margin: 1rem 0; }
.tbl { border-collapse: collapse; width: 100%; font-size: .95rem; }
.tbl th, .tbl td { padding: .55rem .8rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl th { font-weight: 600; font-size: .85rem; color: var(--muted); background: #f8fbf9; }
.tbl .num { text-align: right; }
.tbl tr.dim td { color: #9fb1a6; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: #f6faf7; }
.blocks .tbl { max-width: 520px; margin: 0 auto; }

/* ---------- klocka ---------- */
.clock { width: 100%; height: auto; display: block; touch-action: none; user-select: none; -webkit-user-select: none; }
.clock .face { fill: #fff; stroke: var(--primary); stroke-width: 4; }
.clock .tick { stroke: #a9c6b3; stroke-width: 1.2; }
.clock .tick.major { stroke: var(--text); stroke-width: 2.6; }
.clock .num { font-family: var(--font); font-size: 17px; font-weight: 500; fill: var(--text); }
.clock .ring text { font-family: var(--font); font-size: 11px; font-weight: 500; fill: #b86614; }
.clock .hand line { stroke-linecap: round; }
.clock .hand.hour line { stroke: var(--hour); stroke-width: 8; }
.clock .hand.minute line { stroke: var(--minute); stroke-width: 4.5; }
.clock .pin { fill: var(--hour); }
.clock .sector.a { fill: var(--sector-a); }
.clock .sector.b { fill: var(--sector-b); }
.clock.interactive { cursor: grab; }
.clock.interactive:active { cursor: grabbing; }
.clock.interactive .face { fill: #fdfefd; }
.clock.drag-hour .hand.hour line, .clock.drag-minute .hand.minute line { filter: drop-shadow(0 0 3px rgba(0, 0, 0, .25)); }
.clock-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; margin-top: .6rem; }
.digital { display: inline-block; font-variant-numeric: tabular-nums; font-size: 2.4rem; font-weight: 600; letter-spacing: .04em; color: var(--primary-dark); background: var(--soft); border: 1.5px solid var(--soft-2); border-radius: 14px; padding: .2rem 1rem; line-height: 1.3; }
.digital.small { font-size: 1.3rem; padding: .1rem .6rem; border-radius: 10px; }
.digital-parts { display: flex; justify-content: center; align-items: flex-start; gap: .5rem; margin: 1rem auto; text-align: center; }
.digital-parts > div { display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.digital-parts span { font-size: .9rem; color: var(--muted); }
.digital-parts .colon { font-size: 2.4rem; font-weight: 600; color: var(--primary-dark); line-height: 1.3; }

.tryit { border: 1.5px dashed var(--soft-2); background: #fafdfb; border-radius: var(--radius); padding: 1rem 1.2rem; margin: 1.5rem 0; }
.tryit-label { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--primary); margin-bottom: .3rem; }
.tryit-body { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 1.2rem; align-items: center; }
.tryit-side { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.tryit-out { display: flex; flex-direction: column; gap: .6rem; align-items: flex-start; min-height: 3rem; }
.tryit-words { font-size: 1.5rem; font-weight: 600; }

.timeline-fig { margin: 1rem auto; }
.timeline { width: 100%; height: auto; display: block; }
.timeline .tl-axis { stroke: #a9c6b3; stroke-width: 2; }
.timeline .tl-jump { fill: none; stroke: var(--primary); stroke-width: 2.5; }
.timeline .tl-arrow { fill: var(--primary); }
.timeline .tl-label { font-family: var(--font); font-size: 15px; font-weight: 600; fill: var(--primary-dark); }
.timeline .tl-time { font-family: var(--font); font-size: 14px; fill: var(--muted); }
.timeline .tl-time.strong { fill: var(--text); font-weight: 600; }
.timeline .tl-dot { fill: #fff; stroke: var(--primary); stroke-width: 2; }
.timeline .tl-end { fill: var(--primary); }
.timeline-fig figcaption { text-align: center; color: var(--muted); }

/* ---------- övning ---------- */
.round-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .8rem; flex-wrap: wrap; }
.counter { font-size: .95rem; color: var(--muted); }
.dots { display: flex; gap: .35rem; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--soft-2); }
.dot.cur { background: #fff; box-shadow: inset 0 0 0 2.5px var(--primary); }
.dot.ok { background: var(--primary); }
.dot.miss { background: #e9c27c; }
.q-card { padding: 1.5rem clamp(1rem, 4vw, 2rem); }
.q-head { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .6rem; }
.badge { font-size: .78rem; font-weight: 500; padding: .15rem .65rem; border-radius: 999px; background: var(--soft); color: var(--primary-dark); }
.badge.rep { background: #fbf0d6; color: var(--try-ink); }
.badge.diff.d1 { background: #eef7f1; }
.badge.diff.d3 { background: var(--soft-2); }
.q-prompt { font-size: 1.35rem; font-weight: 500; text-align: center; margin: .4rem 0 1rem; }
.q-visual { display: flex; flex-direction: column; align-items: center; gap: 1rem; margin-bottom: .6rem; }
.q-visual > .clock { max-width: 260px; }
.hint-btn { margin-bottom: .6rem; }
.two-clocks { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; align-items: flex-end; }
.two-clocks .clock-fig { margin: 0; width: 190px; }
.timetable { border: 1.5px solid var(--line); border-radius: 14px; padding: .8rem 1.2rem; text-align: center; background: #fafdfb; }
.tt-title { font-weight: 600; margin-bottom: .4rem; }
.tt-times { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; font-variant-numeric: tabular-nums; }
.tt-times span { background: var(--soft); border-radius: 8px; padding: .2rem .6rem; font-weight: 500; }
.q-answer { margin-top: .6rem; }
.options { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; max-width: 620px; margin: 0 auto; }
.option { font: inherit; font-size: 1.1rem; font-weight: 500; padding: .9rem 1rem; border-radius: 14px; border: 2px solid var(--line); background: #fff; color: var(--text); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: .4rem; min-height: 56px; justify-content: center; transition: border-color .15s, background .15s; }
.option:hover:not(:disabled) { border-color: var(--primary); background: #fafdfb; }
.option:disabled { cursor: default; }
.option .clock { max-width: 130px; }
.options.digits .option { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.option.right { border-color: var(--primary); background: var(--good-bg); }
.option.wrong { border-color: var(--try-line); background: var(--try-bg); }
.set-wrap { display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.set-wrap .clock { max-width: 300px; }
.set-wrap .btn.primary { margin-top: .4rem; }
.input-row { display: flex; gap: .6rem; justify-content: center; align-items: center; flex-wrap: wrap; }
.answer-input { font-size: 1.6rem; width: 8.5rem; text-align: center; padding: .45rem .6rem; border: 2px solid var(--line); border-radius: 14px; background: #fbfdfb; font-variant-numeric: tabular-nums; }
.answer-input.short { width: 5rem; }
.unit { font-size: 1.1rem; color: var(--muted); margin-right: .4rem; }
.feedback:empty { display: none; }
.feedback { margin-top: 1.2rem; }
.fb { border-radius: 14px; padding: 1rem 1.2rem; border: 1.5px solid; }
.fb.good { background: var(--good-bg); border-color: var(--good-line); text-align: center; }
.fb.try { background: var(--try-bg); border-color: var(--try-line); }
.fb-title { font-size: 1.25rem; font-weight: 600; margin-bottom: .4rem; }
.fb.good .fb-title { color: var(--primary-dark); }
.fb.try .fb-title { color: var(--try-ink); }
.fb .btn { margin-top: .6rem; }
.fb.try .clock-fig { max-width: 220px; }
.fb .blocks > * { max-width: 100%; }
.summary { text-align: center; padding: 2rem 1.2rem; }
.summary h2 { font-size: 1.8rem; }
.summary .stars svg { width: 34px; height: 34px; }
.gain { font-weight: 600; color: var(--primary-dark); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--text); color: #fff; padding: .7rem 1.2rem; border-radius: 12px; font-size: .95rem; transition: all .25s; z-index: 100; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- lärare ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.stat { margin: 0; padding: 1rem 1.2rem; }
.stat-n { font-size: 1.6rem; font-weight: 600; color: var(--primary-dark); }
.stat-l { font-size: .85rem; color: var(--muted); }
.stat.warn .stat-n { color: var(--try-ink); }
.code { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; background: var(--soft); padding: .1rem .45rem; border-radius: 6px; letter-spacing: .08em; font-size: .95rem; }
.code.big { font-size: 1.5rem; padding: .2rem .7rem; }
.code-box { display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; }
.pbar { display: flex; gap: 6px; }
.pbar-part { display: flex; gap: 2px; }
.pcell { width: 13px; height: 18px; border-radius: 3px; background: #eef4f0; border: 1px solid #dde9e1; }
.pcell.locked { background: transparent; border-style: dashed; }
.pcell.s1 { background: #cfe8d7; border-color: #cfe8d7; }
.pcell.s2 { background: #84c39b; border-color: #84c39b; }
.pcell.s3 { background: var(--primary); border-color: var(--primary); }
.pct.warn { color: var(--try-ink); font-weight: 600; background: var(--try-bg); border-radius: 6px; padding: 0 .35rem; }
.students td { white-space: nowrap; }
.empty { text-align: center; padding: 2.5rem 1rem; }
.help summary { cursor: pointer; font-weight: 600; }
.help ul { margin: .8rem 0 0; padding-left: 1.2rem; color: var(--muted); }
.help li { margin-bottom: .4rem; }
.form textarea { resize: vertical; }
.print-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.print-card { border: 1.5px dashed #9fc7ad; border-radius: 14px; padding: 1rem; text-align: center; background: #fff; break-inside: avoid; }
.pc-brand { font-size: .8rem; color: var(--primary); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; }
.pc-name { font-size: 1.3rem; font-weight: 600; margin: .3rem 0 .6rem; }
.pc-label { font-size: .8rem; color: var(--muted); }
.pc-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.9rem; font-weight: 700; letter-spacing: .15em; }
.pc-url { font-size: 1.05rem; font-weight: 600; color: var(--primary-dark); word-break: break-all; }
.pc-code + .pc-label { margin-top: .7rem; }

@media print {
  .topbar, .no-print { display: none !important; }
  body { background: #fff; }
  .main { padding: 0; max-width: none; }
  .print-cards { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  body { font-size: 17px; }
  .login-layout, .welcome { grid-template-columns: 1fr; }
  .login-intro { order: 2; }
  .hero-clock { max-width: 140px; }
  .tryit-body { grid-template-columns: 1fr; justify-items: center; }
  .tryit-side { align-items: center; }
  .tryit-out { align-items: center; }
  .level-head { flex-direction: column; align-items: flex-start; gap: .4rem; }
  .q-prompt { font-size: 1.2rem; }
  .options.clocks { grid-template-columns: repeat(2, 1fr); }
  .code-box { align-items: flex-start; }
  .who { display: none; }
}
@media (max-width: 420px) {
  .options:not(.clocks) { grid-template-columns: 1fr; }
  .save-status { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- dela med kollegor ---------- */
.invite-box { margin-top: 1rem; padding: 1rem; border: 1.5px dashed var(--soft-2); border-radius: 14px; background: #fafdfb; display: flex; flex-direction: column; gap: .4rem; align-items: flex-start; }
.invite-text { width: 100%; font: inherit; font-size: .9rem; padding: .6rem; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; resize: vertical; }
form.card > label { display: block; font-weight: 500; margin-bottom: .4rem; }
form.card .code-input { max-width: 320px; display: block; }
form.card .btn { margin-top: .4rem; }
.narrow .tip { margin-bottom: 1rem; }

/* ---------- analys ---------- */
.analysis-btn { margin-bottom: 1.2rem; }
.report { padding: clamp(1.2rem, 4vw, 2.4rem); }
.report-head { border-bottom: 1.5px solid var(--line); padding-bottom: 1rem; margin-bottom: 1.2rem; }
.report-head h1 { margin: .2rem 0; }
.report section { margin: 1.8rem 0; }
.report section h2 { font-size: 1.2rem; margin-bottom: .6rem; }
.report .stat { box-shadow: none; }
.sec-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.sec-head h2 { margin: 0; }
.editable { border: 1.5px solid var(--line); border-radius: 12px; padding: .9rem 1rem; background: #fbfdfb; white-space: pre-wrap; line-height: 1.6; min-height: 3rem; }
.editable:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(46, 125, 85, .15); background: #fff; }
.editable.note:empty::before { content: attr(data-placeholder); color: #9fb1a6; }
.editable.letter { background: #fff; }
.can-list { list-style: none; padding: 0; margin: 0; }
.can-list li { padding: .45rem 0 .45rem 1.8rem; position: relative; border-bottom: 1px solid #eef4f0; }
.can-list li::before { content: ''; position: absolute; left: .2rem; top: .85rem; width: .8rem; height: .8rem; border-radius: 50%; }
.can-list li.yes::before { background: var(--primary); }
.can-list li.way::before { background: #84c39b; }
.dev-list { display: flex; flex-direction: column; gap: .8rem; }
.dev-item { border-left: 4px solid var(--try-line); background: var(--try-bg); border-radius: 0 12px 12px 0; padding: .8rem 1rem; }
.dev-item p { margin: .3rem 0 0; }
.dev-title { font-weight: 600; }
.dev-tip { color: var(--text); }
.chip { display: inline-block; font-size: .8rem; font-weight: 500; padding: .1rem .6rem; border-radius: 999px; white-space: nowrap; }
.chip.s-secure { background: var(--primary); color: #fff; }
.chip.s-good { background: #cfe8d7; color: var(--primary-dark); }
.chip.s-dev { background: var(--try-bg); color: var(--try-ink); border: 1px solid var(--try-line); }
.chip.s-started { background: #eef4f0; color: var(--muted); }
.chip.s-none { background: transparent; color: #9fb1a6; border: 1px dashed #cfdcd3; }
.tbl tr.part-row td { background: #f8fbf9; font-weight: 600; font-size: .85rem; color: var(--muted); }
.foot { margin-top: 2rem; border-top: 1px solid var(--line); padding-top: 1rem; }
@media print {
  .report { border: none; box-shadow: none; padding: 0; }
  .editable { border: none; padding: 0; background: none; }
  .note-sec.is-empty { display: none; }
  .report h2, .sec-head { break-after: avoid; }
  .dev-item, .can-list li, .tbl tr, .editable { break-inside: avoid; }
  .letter-sec { break-before: page; }
  .chip.s-secure { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .dev-item, .stat, .tbl tr.part-row td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
