:root {
  --paper: #f5f3ee;
  --card: #ffffff;
  --ink: #1b2330;
  --muted: #5d6675;
  --line: #e4e0d6;
  --line-strong: #cfc9bb;
  --board: #14532d;
  --board-2: #1f6f43;
  --accent: #15803d;
  --accent-soft: #e6f4ea;
  --red: #c2410c;
  --red-soft: #fdeee6;
  --amber: #b45309;
  --amber-soft: #fdf3e1;
  --blue: #1d4ed8;
  --blue-soft: #e8eefc;
  --violet: #6d28d9;
  --violet-soft: #f0e9fd;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(27, 35, 48, .06), 0 4px 16px rgba(27, 35, 48, .05);
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--sans); background: var(--paper); color: var(--ink); font-size: 14px; line-height: 1.5; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h2 { font-size: 15px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12px; }

.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }

/* ---------- sidebar */
.sidebar { background: var(--board); color: #e8f3ea; padding: 18px 14px; display: flex; flex-direction: column; gap: 14px;
  position: sticky; top: 0; height: 100vh; }
.brand { display: flex; gap: 10px; align-items: center; padding: 2px 6px 6px; }
.brand strong { display: block; font-size: 17px; letter-spacing: .2px; }
.brand span { display: block; font-size: 11.5px; opacity: .75; }
.course-select { width: 100%; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); color: #fff;
  border-radius: 8px; padding: 7px 8px; }
.course-select option { color: var(--ink); }
nav { display: flex; flex-direction: column; gap: 2px; }
nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: #dcebdf; text-decoration: none; font-weight: 500; }
nav a svg { width: 18px; height: 18px; flex: none; opacity: .9; }
nav a:hover { background: rgba(255,255,255,.07); }
nav a.active { background: rgba(255,255,255,.14); color: #fff; }
.badge { margin-left: auto; background: #fbbf24; color: #3b2a00; border-radius: 999px; font-size: 11px; padding: 0 7px; font-weight: 700; }
.badge:empty { display: none; }
.live-dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: transparent; }
.live-dot.on { background: #4ade80; box-shadow: 0 0 0 0 rgba(74,222,128,.6); animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(74,222,128,.6); } 70% { box-shadow: 0 0 0 8px rgba(74,222,128,0); } 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); } }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.side-foot .chip { background: rgba(255,255,255,.1); color: #e8f3ea; border: 0; }
.integrations { display: flex; flex-wrap: wrap; gap: 6px; font-size: 11.5px; }
.integrations span { display: inline-flex; align-items: center; gap: 5px; opacity: .85; }
.integrations i { width: 7px; height: 7px; border-radius: 50%; background: #64748b; display: inline-block; }
.integrations i.on { background: #4ade80; }

/* ---------- main */
main { padding: 22px 28px 48px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.topbar h1 { font-size: 22px; font-weight: 700; letter-spacing: -.2px; }
.topbar p { margin: 2px 0 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.btn { border: 1px solid var(--line-strong); background: var(--card); border-radius: 9px; padding: 7px 13px; cursor: pointer;
  font-weight: 550; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #166534; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red); }
.btn.sm { padding: 4px 9px; font-size: 12.5px; border-radius: 7px; }
.btn:disabled { opacity: .55; cursor: default; }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head .muted { font-size: 12.5px; }
.empty { color: var(--muted); padding: 10px 0; }
.stack > * + * { margin-top: 10px; }

.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--line); background: #faf9f6; white-space: nowrap; }
.pill { display: inline-block; border-radius: 999px; padding: 1px 9px; font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.pill.green { background: var(--accent-soft); color: #166534; }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.blue { background: var(--blue-soft); color: var(--blue); }
.pill.violet { background: var(--violet-soft); color: var(--violet); }
.pill.grey { background: #eeece6; color: var(--muted); }

/* ---------- hero / pacing */
.hero { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; margin-bottom: 16px; }
.pace-bar { position: relative; height: 16px; background: #efece4; border-radius: 999px; margin: 30px 0 30px; }
.pace-bar .taught { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #16a34a, #22c55e); border-radius: 999px; }
.pace-bar .due { position: absolute; top: -5px; bottom: -5px; border-left: 2px dashed var(--amber); }
.pace-bar .exam { position: absolute; top: -8px; bottom: -8px; width: 2px; background: var(--ink); }
.pace-bar .label { position: absolute; top: 24px; transform: translateX(-50%); font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.pace-bar .label.right { transform: translateX(-100%); }
.pace-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat { background: #faf9f6; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.stat b { display: block; font-size: 20px; letter-spacing: -.3px; }
.stat span { font-size: 12px; color: var(--muted); }
.stat.bad b { color: var(--red); }
.stat.ok b { color: var(--accent); }
.banner { border-radius: 10px; padding: 10px 12px; font-weight: 550; margin-top: 12px; }
.banner.bad { background: var(--red-soft); color: #9a3412; }
.banner.ok { background: var(--accent-soft); color: #166534; }

.next-lesson h3 { font-size: 17px; margin: 4px 0 6px; }
.demo-card { background: linear-gradient(135deg, #14532d, #1f6f43); color: #ecfdf3; border: 0; }
.demo-card .muted { color: #c9e8d2; }
.demo-card .btn.primary { background: #fbbf24; border-color: #fbbf24; color: #3b2a00; }

.list-row { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--line); }
.list-row:first-child { border-top: 0; padding-top: 2px; }
.list-row .grow { flex: 1; min-width: 0; }
.dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex: none; }
.dot.amber { background: #f59e0b; } .dot.red { background: #dc2626; } .dot.green { background: #22c55e; } .dot.grey { background: #a8a29e; }
.clickable { cursor: pointer; }
.clickable:hover { background: #faf9f6; }

/* ---------- staffroom board */
.board { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: 16px; }
.agents { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; position: relative; }
.agent { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; min-height: 148px; position: relative;
  transition: border-color .25s, box-shadow .25s, transform .25s; box-shadow: var(--shadow); }
.agent .who { display: flex; gap: 10px; align-items: center; }
.avatar { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; font-weight: 750; font-size: 14px; flex: none; }
.agent .role { font-size: 11.5px; color: var(--muted); }
.agent .say { margin-top: 10px; font-size: 12.5px; color: var(--ink); background: #faf9f6; border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 10px; min-height: 52px; }
.agent .state { display: inline-flex; align-items: center; }
.agent .foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 8px; }
.agent.working { border-color: #86efac; box-shadow: 0 0 0 3px rgba(34,197,94,.15), var(--shadow); transform: translateY(-2px); }
.agent.rejecting { border-color: #fdba74; box-shadow: 0 0 0 3px rgba(234,88,12,.18), var(--shadow); }
.agent.passed { border-color: #86efac; }
.agent .count { font-size: 11px; color: var(--muted); }
.typing { display: inline-flex; gap: 3px; vertical-align: middle; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: #22c55e; animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }

.feed { max-height: calc(100vh - 210px); overflow: auto; padding-right: 4px; }
.ev { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--line); animation: slidein .35s ease-out; }
.ev:first-child { border-top: 0; }
.ev .avatar { width: 28px; height: 28px; border-radius: 8px; font-size: 11px; }
.ev .meta { font-size: 11.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ev .msg { font-size: 13px; }
.ev.reject .msg { color: #9a3412; }
.ev.pass .msg { color: #166534; }
.ev.handoff .msg::before { content: "→ "; color: var(--muted); }
@keyframes slidein { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.flowline { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 0 0 12px; }
.flowline b { color: var(--ink); font-weight: 600; }

/* ---------- plan */
.timeline { position: relative; }
.lesson-row { display: grid; grid-template-columns: 92px 34px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.lesson-row:hover { background: #faf9f6; }
.lesson-row .date { font-size: 12.5px; color: var(--muted); }
.lesson-row .num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; background: #eeece6; }
.lesson-row.taught .num { background: var(--accent); color: #fff; }
.lesson-row.next .num { background: #fbbf24; color: #3b2a00; }
.lesson-row.late .date { color: var(--red); font-weight: 600; }
.lesson-row.atrisk .date { color: var(--red); font-weight: 650; }
.lesson-row .title { font-weight: 550; }
.lesson-row .sub { font-size: 12px; color: var(--muted); }
.exam-line { display: flex; align-items: center; gap: 10px; margin: 6px 0; color: var(--ink); font-weight: 650; font-size: 12.5px; }
.exam-line::before, .exam-line::after { content: ""; flex: 1; border-top: 2px solid var(--ink); }

/* ---------- lesson drawer */
.drawer { position: fixed; inset: 0; background: rgba(27,35,48,.35); display: none; z-index: 30; }
.drawer.open { display: block; }
.drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(760px, 96vw); background: var(--paper); overflow: auto; padding: 24px 28px 60px;
  box-shadow: -10px 0 40px rgba(0,0,0,.15); animation: drawerin .2s ease-out; }
@keyframes drawerin { from { transform: translateX(30px); opacity: .5; } to { transform: none; opacity: 1; } }
.drawer .close { position: sticky; top: 0; float: right; border: 0; background: #e9e6de; width: 32px; height: 32px; border-radius: 50%; font-size: 20px; cursor: pointer; }
.doc h2 { font-size: 20px; margin-bottom: 4px; }
.doc h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin: 18px 0 8px; }
.doc ul, .doc ol { margin: 0; padding-left: 20px; }
.doc li { margin: 5px 0; }
.stmt { border-radius: 6px; padding: 1px 3px; }
.stmt.bad { background: var(--red-soft); text-decoration: underline wavy #ea580c; text-underline-offset: 3px; }
.cite { display: inline-block; font-size: 11px; font-weight: 700; color: var(--blue); background: var(--blue-soft); border-radius: 5px; padding: 0 5px;
  margin: 0 1px; cursor: pointer; vertical-align: 1px; }
.cite:hover { background: #d4defa; }
.popover { position: fixed; z-index: 60; max-width: 420px; background: #fff; border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,.18); font-size: 13px; }
.popover .where { font-size: 11.5px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.review-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.review-table td, .review-table th { text-align: left; padding: 7px 8px; border-top: 1px solid var(--line); vertical-align: top; }
.review-table th { font-size: 11.5px; color: var(--muted); font-weight: 600; border-top: 0; }
.gbar { width: 70px; height: 6px; background: #eeece6; border-radius: 99px; overflow: hidden; display: inline-block; vertical-align: middle; }
.gbar i { display: block; height: 100%; background: #22c55e; }
.gbar.mid i { background: #f59e0b; } .gbar.low i { background: #ea580c; }
.claim-box { display: flex; gap: 8px; margin-top: 8px; }
.claim-box input { flex: 1; border: 1px solid var(--line-strong); border-radius: 9px; padding: 8px 10px; background: #fff; }
.verdict { margin-top: 10px; border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.verdict.Supported { background: var(--accent-soft); color: #166534; }
.verdict.bad { background: var(--red-soft); color: #9a3412; }

/* ---------- class report */
.report-table { width: 100%; border-collapse: collapse; }
.report-table th { text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 600; padding: 6px 10px; }
.report-table td { padding: 10px; border-top: 1px solid var(--line); vertical-align: middle; }
.report-table tr.sel td { background: #f2f7f3; }
.score { display: flex; align-items: center; gap: 8px; }
.score .bar { width: 110px; height: 8px; background: #eeece6; border-radius: 99px; overflow: hidden; }
.score .bar i { display: block; height: 100%; border-radius: 99px; }
.transcript { max-height: 560px; overflow: auto; font-size: 13px; }
.line { display: grid; grid-template-columns: 52px 1fr; gap: 8px; padding: 5px 8px; border-radius: 8px; }
.line .t { font-family: var(--mono); font-size: 11px; color: var(--muted); padding-top: 2px; }
.line .sp { font-weight: 650; margin-right: 6px; }
.line.teacher .sp { color: var(--muted); }
.line.hl { background: #fef9c3; }
.line.dim { opacity: .45; }

/* ---------- tests */
.q { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; }
.q + .q { margin-top: 10px; }
.q .qh { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.q .memo { margin-top: 8px; font-size: 13px; color: #334155; background: #faf9f6; border-radius: 8px; padding: 8px 10px; }
.levels { display: inline-flex; gap: 2px; }
.levels i { width: 12px; height: 6px; border-radius: 2px; background: #e7e5e4; }
.levels i.on { background: var(--violet); }

/* ---------- mastery heatmap */
.heat { border-collapse: separate; border-spacing: 4px; width: 100%; }
.heat th { font-size: 11.5px; color: var(--muted); font-weight: 600; text-align: left; padding: 2px 4px; }
.heat th.topic { writing-mode: vertical-rl; transform: rotate(180deg); height: 150px; text-align: left; font-weight: 550; white-space: nowrap; }
.heat td.cell { height: 34px; border-radius: 7px; text-align: center; font-weight: 700; font-size: 12px; min-width: 38px; }
.heat td.name { font-weight: 600; white-space: nowrap; padding-right: 8px; cursor: pointer; }
.l0 { background: #f1efe9; color: #a8a29e; } .l1 { background: #fed7aa; color: #9a3412; } .l2 { background: #fde68a; color: #854d0e; }
.l3 { background: #d9f99d; color: #3f6212; } .l4 { background: #86efac; color: #14532d; } .l5 { background: #22c55e; color: #fff; }
.legend { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.legend span { display: inline-flex; gap: 5px; align-items: center; }
.legend i { width: 16px; height: 12px; border-radius: 3px; display: inline-block; }

/* ---------- forms */
.form { display: grid; gap: 10px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 9px; padding: 8px 10px; background: #fff; }
.field textarea { min-height: 120px; font-family: var(--mono); font-size: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hint { font-size: 12px; color: var(--muted); }
.drop { border: 2px dashed var(--line-strong); border-radius: 12px; padding: 16px; text-align: center; color: var(--muted); }

/* ---------- toasts */
.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 80; }
.toast { background: var(--ink); color: #fff; border-radius: 10px; padding: 10px 14px; font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.2); max-width: 380px;
  animation: slidein .25s ease-out; }
.toast.bad { background: #9a3412; }
.toast.ok { background: #166534; }

@media (max-width: 1100px) {
  .hero, .board, .g2 { grid-template-columns: 1fr; }
  .agents { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  main { padding: 16px; }
  .g3, .pace-stats { grid-template-columns: 1fr 1fr; }
  .agents { grid-template-columns: 1fr; }
  .lesson-row { grid-template-columns: 70px 28px 1fr; }
  .lesson-row > :last-child { grid-column: 3; }
}

/* ---------- layouts and extras */
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.split.list { grid-template-columns: 330px minmax(0, 1fr); }
.split.even { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.section-gap { margin-top: 16px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; }
.kv b { font-weight: 600; color: var(--muted); }
.mini-feed { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 4px 12px; margin-top: 12px; }
.mini-feed:empty { display: none; }
.welcome { padding: 34px 32px; }
.welcome h2 { font-size: 26px; letter-spacing: -.4px; margin-bottom: 8px; }
.welcome p { max-width: 640px; font-size: 15px; }
.team { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 22px 0 6px; }
.team div { background: rgba(255,255,255,.08); border-radius: 12px; padding: 10px; font-size: 12px; }
.team b { display: block; font-size: 13px; margin: 6px 0 2px; color: #fff; }
.team .avatar { border: 2px solid rgba(255,255,255,.35); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tab { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 12px; font-size: 12.5px; cursor: pointer; font-weight: 550; }
.tab.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.test-row { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; }
.test-row:hover { background: #faf9f6; }
.test-row.on { border-color: var(--line-strong); background: #fff; box-shadow: var(--shadow); }
.test-row .grow { flex: 1; min-width: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.checks label { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 500; color: var(--ink); }
.checks input { width: auto; }
.speed { border: 1px solid var(--line-strong); border-radius: 9px; padding: 6px 8px; background: #fff; }
.feed-note { display: inline-flex; gap: 8px; align-items: center; }
.ok-text { color: #166534; } .bad-text { color: var(--red); }
.cu-mark { width: 16px; height: 16px; vertical-align: -3px; }
.agent-flow { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.agent-flow .step { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px 3px 4px; }
.agent-flow .step i { width: 18px; height: 18px; border-radius: 6px; display: inline-block; }
.agent-flow .arrow { color: var(--muted); padding: 0 2px; }
.agent-flow .loop { color: var(--red); font-weight: 600; }
.heat tfoot td.name { cursor: default; color: var(--muted); }
@media (max-width: 1100px) {
  .split, .split.list, .split.even { grid-template-columns: 1fr; }
  .team { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .team { grid-template-columns: repeat(2, 1fr); }
  .heat-wrap { overflow-x: auto; }
}
.form > .btn, .form > button { justify-self: start; }
.say { font-size: 12.5px; background: #faf9f6; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.pace-bar .label.up { top: -22px; }
.stack .pace-stats, .narrow .pace-stats { grid-template-columns: 1fr 1fr; }
.flow-rows { display: grid; gap: 8px; margin: 0 0 14px; }
.flow-rows .flowline { margin: 0; }
.flow-rows .tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); width: 92px; }
.test-row .top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.heat-foot { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.heat-foot .hint { margin: 0; }
.misc { border-left: 3px solid #ea580c; padding: 6px 10px; background: var(--red-soft); border-radius: 0 8px 8px 0; font-size: 13px; }
.misc + .misc { margin-top: 8px; }
@media (max-width: 760px) {
  .g3 { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; }
  .actions { justify-content: flex-start; }
  .flow-rows .tag { width: auto; }
}
.line.wrong { background: var(--red-soft); }
.line.wrong.dim { opacity: .7; }
