:root {
  /* Admin palette: deep navy with electric cyan (always dark, regardless of the device's light/dark setting) */
  color-scheme: dark;
  --bg: #050d1c; --card: #0b1a33; --ink: #e6eefb; --muted: #94a8c9; --line: #1b3157;
  --accent: #19b8e6; --accent-ink: #04121f; --accent-soft: #0c2a45; --cyan: #4cc9f0; --link: #4cc9f0;
  --head-bg: #030a16; --head-ink: #ffffff; --head-muted: #8aa2c8;
  --warn: #f0c565; --warn-bg: #3a2f12; --warn-line: #6a5520;
  --bad: #f19b9b; --bad-bg: #3a1a1a; --ok: #7ad3b6; --ok-bg: #0e2e2a;
  --info: #9cc0f2; --info-bg: #14264a;
  --radius: 8px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--link); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.muted { color: var(--muted); }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; background: var(--head-bg); color: var(--head-ink); border-bottom: 3px solid var(--cyan); flex-wrap: wrap; }
.top .muted { color: var(--head-muted); }
.brand { text-decoration: none; color: var(--head-ink); font-size: 18px; letter-spacing: .01em; }
.brand b { color: var(--cyan); }
.who { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.provisional { background: var(--warn-bg); color: var(--warn); border-bottom: 1px solid var(--warn-line); padding: 8px 16px; font-size: 14px; }
main { max-width: 1360px; margin: 0 auto; padding: 16px; }
h1 { font-size: 24px; margin: 0; }
h2 { font-size: 18px; margin: 0 0 10px; }
h3 { font-size: 15px; margin: 14px 0 6px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.spread { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 800px) { .grid2 { grid-template-columns: 1fr; } }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--line); color: var(--ink); }
.badge.env { background: transparent; color: var(--cyan); border: 1px solid var(--cyan); }
.badge.setup { background: var(--info-bg); color: var(--info); }
.badge.running { background: var(--ok-bg); color: var(--ok); }
.badge.finished { background: var(--line); color: var(--muted); }
.badge.draft { background: var(--warn-bg); color: var(--warn); }
button, select, input[type=text], input[type=number], textarea { font: inherit; }
button { padding: 7px 13px; border-radius: 6px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
button:hover:not(:disabled) { border-color: var(--cyan); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
button.danger { color: var(--bad); border-color: var(--bad); }
button.ghost { background: transparent; }
button.small { padding: 3px 9px; font-size: 13px; }
input[type=text], input[type=number], select, textarea { padding: 6px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--ink); }
textarea { width: 100%; min-height: 90px; }
label.check { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0; }
label.check small { display: block; color: var(--muted); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.scroll { overflow-x: auto; }
tr.winner td.w { font-weight: 700; }
.tag { font-size: 12px; padding: 1px 7px; border-radius: 999px; background: var(--line); color: var(--muted); margin-left: 4px; white-space: nowrap; }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.next { border-left: 5px solid var(--cyan); background: var(--accent-soft); }
.next p { margin: 0 0 10px; font-size: 17px; }
.flags { margin: 0 0 12px; padding: 0; list-style: none; }
.flags li { padding: 8px 10px; border-radius: 6px; margin-bottom: 6px; font-size: 14px; }
.flags li.warn { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-line); }
.flags li.info { background: var(--info-bg); color: var(--info); }
.toast { position: sticky; top: 0; z-index: 5; margin: 0; padding: 10px 16px; font-size: 15px; }
.toast.ok, .toast.info { background: var(--ok-bg); color: var(--ok); }
.toast.err { background: var(--bad-bg); color: var(--bad); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.tabs button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.result-cell { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
details > summary { cursor: pointer; color: var(--link); margin: 6px 0; }
.notes { font-size: 13px; color: var(--muted); margin-top: 8px; }
.pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 2px 12px; }
dialog { border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); max-width: 460px; width: calc(100% - 32px); }
dialog::backdrop { background: rgba(0, 0, 0, .4); }
dialog menu { display: flex; justify-content: flex-end; gap: 8px; padding: 0; margin: 14px 0 0; }
.log td { font-size: 13px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; font-size: 14px; }
.empty { color: var(--muted); padding: 12px 0; }

/* ---------- branding: emblem + hero (sparingly: welcome screen and event header only) ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.emblem { width: 30px; height: 30px; display: block; flex: none; }
.hero { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; color: #fff; border-radius: var(--radius); margin-bottom: 16px; overflow: hidden;
  background: #04101f; border: 1px solid var(--line); }
.hero h1 { color: #fff; overflow-wrap: anywhere; }
.hero p, .hero .sub { margin: 4px 0 0; color: #c7d8f0; }
.hero a.back { color: #8fdcf6; font-size: 14px; text-decoration: none; }
.hero-lg { padding: 22px 22px; justify-content: flex-start; flex-wrap: nowrap; min-height: 0; }
.hero-lg h1 { font-size: 28px; }
.emblem-lg { width: 72px; height: 72px; flex: none; }
.hero-sm { padding: 14px 18px; min-height: 120px; background: linear-gradient(90deg, #04101f 0%, rgba(4,16,31,.9) 38%, rgba(4,16,31,.25) 100%), #04101f url(/img/showdown-hero-2000.webp) 70% 62% / cover no-repeat; }
.hero button { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.35); }
.hero button:hover:not(:disabled) { border-color: var(--cyan); }
.hero .badge { background: rgba(255,255,255,.16); color: #fff; }
.hero .badge.running { background: #0e5a45; color: #d6fff0; }
.hero-actions { flex: none; }

/* ---------- lists ---------- */
.evlist { display: flex; flex-direction: column; }
.evrow { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; padding: 12px 4px; min-height: 52px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.evrow:hover { background: var(--accent-soft); }
.evname { font-weight: 600; color: var(--link); overflow-wrap: anywhere; }
.evmeta { margin-left: auto; font-size: 14px; }
.plist, .loglist { list-style: none; margin: 10px 0 0; padding: 0; }
.prow { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.pname { overflow-wrap: anywhere; }
.pact { display: flex; align-items: center; gap: 10px; flex: none; }
label.check.inline { margin: 0; align-items: center; }
.logrow { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; overflow-wrap: anywhere; }

/* ---------- pairings and results ---------- */
.games { border-top: 1px solid var(--line); }
.games-head, .game { display: grid; grid-template-columns: 76px minmax(0, 1fr) minmax(0, 1.25fr); gap: 8px 14px; align-items: center; }
.games-head { padding: 7px 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); }
.game { padding: 10px 4px; border-bottom: 1px solid var(--line); }
.game.done { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.gp { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; font-size: 17px; overflow-wrap: anywhere; }
.gp .vs { color: var(--muted); font-size: 14px; }
.gp .p.win { font-weight: 700; }
.gt { font-weight: 600; }
.result-cell { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rbtns { display: flex; gap: 8px; }
.after { margin-top: 14px; }
.standings .pl { overflow-wrap: anywhere; }
.sub-note { display: none; }

/* ---------- phones ---------- */
@media (max-width: 640px) {
  main { padding: 10px; }
  .card { padding: 14px; margin-bottom: 12px; }
  h1 { font-size: 21px; }
  .top { padding: 8px 12px; }
  .brand { font-size: 16px; }
  .who { font-size: 13px; }
  button, button.small { min-height: 44px; padding: 9px 14px; font-size: 16px; }
  select, input[type=text], input[type=number], textarea { font-size: 16px; min-height: 44px; }
  textarea { min-height: 96px; }
  input[type=checkbox] { width: 24px; height: 24px; flex: none; }
  label.check { min-height: 44px; align-items: center; }
  label.check small { font-size: 14px; }
  .notes { font-size: 14px; }
  .tag { font-size: 13px; }
  th { font-size: 12px; }
  td, th { padding: 9px 6px; }
  .next p { font-size: 16px; }
  .next .row > button, .next > button, .next .after button { flex: 1 1 100%; }
  .hero-lg { padding: 18px 14px; min-height: 0; }
  .hero-lg h1 { font-size: 23px; }
  .emblem-lg { width: 56px; height: 56px; }
  .hero-sm { padding: 12px 14px; min-height: 0; background: linear-gradient(180deg, rgba(4,16,31,.55) 0%, rgba(4,16,31,.9) 100%), #04101f url(/img/showdown-hero-1400.webp) 78% 64% / cover no-repeat; }
  .hero-actions { width: 100%; }
  .hero-actions button { flex: 1; }
  .row > label { flex: 1 1 140px; }
  .row > label input[type=text] { width: 100%; }
  /* pairings become one card per game */
  .games-head { display: none; }
  .game { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px 4px; }
  .gt { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
  .gp { font-size: 18px; }
  .game.bye .gt { display: none; }
  .result-cell.entry { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .result-cell.entry select, .result-cell.entry .ghost { grid-column: 1 / -1; width: 100%; }
  .win-btn { white-space: normal; line-height: 1.2; }
  .result-cell:not(.entry) { justify-content: space-between; }
  .done-text { flex: 1 1 100%; }
  .rbtns { width: 100%; }
  .rbtns button { flex: 1; }
  .tabs button { flex: 1 1 auto; }
  /* standings: no sideways scroll; notes move under the name */
  .standings .col-notes { display: none; }
  .standings .sub-note { display: block; font-size: 13px; color: var(--muted); }
  .standings td, .standings th { padding: 9px 4px; }
  .prow { flex-wrap: wrap; padding: 6px 0; }
  .pact { width: 100%; justify-content: space-between; }
  .evmeta { margin-left: 0; width: 100%; }
}

/* tap-friendly links */
.brand { min-height: 44px; }
.hero a.back { display: inline-flex; align-items: center; min-height: 44px; }

/* links styled as buttons (admin -> Live View) */
.navlink { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border: 1px solid rgba(255,255,255,.35); border-radius: 6px; color: #fff; text-decoration: none; font-size: 14px; }
.navlink:hover { border-color: var(--cyan); }
.btnlink { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 3px 11px; border: 1px solid rgba(255,255,255,.35); border-radius: 6px; color: #fff; background: rgba(255,255,255,.1); text-decoration: none; font-size: 13px; }
.btnlink:hover { border-color: var(--cyan); }
@media (max-width: 640px) { .btnlink { min-height: 44px; font-size: 16px; padding: 9px 14px; } .hero-actions .btnlink { flex: 1; } }

/* ---------- event workspace: pairings (main) beside live standings; stacked on narrower screens ---------- */
.workgrid { display: block; }
.workgrid .card { margin-bottom: 16px; }
@media (min-width: 1040px) {
  .workgrid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 16px; align-items: start; }
  .workside { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; }
  .workside .standings .col-notes { display: none; }
  .workside .standings .sub-note { display: block; font-size: 13px; color: var(--muted); }
  .workside .standings td, .workside .standings th { padding: 8px 5px; }
}

/* admin event hero: keep the buttons legible over the artwork */
.hero-sm .hero-actions button, .hero-sm .hero-actions .btnlink { background: rgba(4,16,31,.78); }

/* the hidden attribute must win over display rules (directory search hides rows with it) */
[hidden] { display: none !important; }
@media (max-width: 640px) { details > summary { display: flex; align-items: center; min-height: 44px; } }

/* event settings: Rounds is the main setting; advanced and detail sections stay quiet */
.settings .rounds-main { gap: 12px; }
.settings .rounds-main label { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.settings .rounds-main input { width: 5.5em; font-size: 20px; font-weight: 700; padding: 8px 10px; }
.settings details.adv { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 4px; }
.settings details.adv > summary { font-weight: 600; }
.settings details.more { margin: 2px 0 0; }
.settings details.more > summary { font-size: 13px; margin: 2px 0; }
.settings label.check > span { min-width: 0; }
.settings label.check > span > small { display: block; margin-top: 2px; line-height: 1.4; }

.settings .rule { margin-bottom: 6px; }
.settings .rule > details.more { margin-left: 26px; }
.settings .rule > details.more > small { display: block; color: var(--muted); font-size: 13px; line-height: 1.4; }
@media (max-width: 640px) { .settings .rule > details.more { margin-left: 32px; } .settings .rule > details.more > small { font-size: 14px; } }

/* connection timers (10 minutes per player per match) */
.pw { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.ctimer { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.ctimer .clock { font: 700 18px/1 var(--mono, ui-monospace, monospace); font-variant-numeric: tabular-nums; color: var(--cyan); }
.ctimer.out { color: var(--bad); font-weight: 600; }
.cdecision { grid-column: 1 / -1; border: 1px solid var(--bad); background: var(--bad-bg); color: var(--ink); border-radius: 6px; padding: 10px 12px; font-size: 15px; }
.cdecision .row { margin: 8px 0 4px; }
@media (max-width: 640px) { .pw { align-items: stretch; width: 100%; } .ctimer { flex-direction: column; align-items: stretch; } .ctimer .clock { font-size: 22px; } }
.gp:has(.pw) { flex-direction: column; align-items: flex-start; gap: 4px; }
.gp:has(.pw) .vs { font-size: 13px; }

/* Stored pairing explanation (admin panel only) */
.gwhy { grid-column: 1 / -1; font-size: 14px; color: var(--muted); }
.gwhy summary { cursor: pointer; width: fit-content; }
.gwhy p { margin: 6px 0 0; color: var(--ink, inherit); line-height: 1.45; max-width: 70ch; }
#dlgHint { display: block; margin-top: 6px; line-height: 1.4; }

/* Approved Oct 3: round plan, no-show clock, blocked round, championship playoff */
.plan { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--card, transparent); }
.plain { margin: 4px 0 8px; padding-left: 20px; font-size: 15px; line-height: 1.45; }
.plain li { margin: 4px 0; }
.brk { flex-basis: 100%; font-size: 14px; color: var(--muted); }
.noshow { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; font-size: 15px; }
.noshow.due { border-color: var(--warn-line); background: var(--warn-bg); }
.noshow .row { margin: 8px 0 2px; }
.blocked { border: 1px solid var(--warn-line); background: var(--warn-bg); border-radius: 8px; padding: 10px 14px; margin: 8px 0 12px; font-size: 15px; }
.blocked ul { margin: 4px 0 8px; padding-left: 20px; }
.champ { font-size: 18px; margin: 6px 0; }
tr.champion td { background: var(--ok-bg, rgba(46, 160, 67, .12)); }
#dlgChoices { margin: 8px 0; display: grid; gap: 8px; }
#dlgChoices .check { align-items: flex-start; }
.card.playoff h3 { margin: 12px 0 4px; font-size: 15px; }

/* Preview inside a confirm dialog (voids and repairs) */
#dlgHtml { margin: 8px 0; max-height: 46vh; overflow: auto; font-size: 0.95em; line-height: 1.45; }
#dlgHtml h4 { margin: 10px 0 4px; font-size: 1em; }
#dlgHtml ul, #dlgHtml ol { margin: 4px 0 8px; padding-left: 1.2em; }
#dlgHtml table { width: 100%; border-collapse: collapse; }
#dlgHtml th, #dlgHtml td { text-align: left; padding: 3px 6px 3px 0; vertical-align: top; }
#dlgCheckWrap { margin: 8px 0; align-items: flex-start; }
.voidnote { margin: 6px 0; padding: 8px 10px; border: 1px solid var(--warn, #b7791f); border-radius: 8px; }
.ghist { margin: 4px 0 0; font-size: 0.9em; }
.ghist ol { margin: 4px 0 0; padding-left: 1.2em; }
.repairbar { margin: 8px 0; }

/* Admin clarity pass. Scoped so public pages keep their current layout. */
.admin-panel .notes, .admin-panel small, .admin-panel .settings details.more > summary { font-size: 14px; }
.admin-panel .next .notes { font-size: 14px; }
.admin-panel .event-mode { width: 100%; padding: 12px 14px; border-radius: var(--radius); font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.admin-panel .event-mode.warn { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-line); }
.admin-panel .event-mode.ok { background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok); }
.admin-panel .evrow .event-mode { margin: 4px 0 0; }
.admin-panel .progress-path { display: flex; flex-wrap: wrap; gap: 8px 16px; list-style: none; margin: 0 0 12px; padding: 0 0 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.admin-panel .progress-path li { color: var(--muted); }
.admin-panel .progress-path li:not(:last-child)::after { content: ' →'; margin-left: 8px; }
.admin-panel .progress-path [aria-current=step] { color: var(--cyan); font-weight: 700; }
.admin-panel .toast { font-size: 16px; }
.admin-panel .toast button { margin-left: 12px; }
.admin-panel button.small, .admin-panel .btnlink { font-size: 14px; }
.admin-panel .rbtns { flex-wrap: wrap; }
.admin-panel .standings { table-layout: fixed; }
.admin-panel .standings th, .admin-panel .standings td { overflow-wrap: anywhere; }
.admin-panel th { font-size: 14px; }
.admin-panel .standings th { text-transform: none; letter-spacing: 0; }
.admin-panel .standings .pl { width: 30%; }
.admin-panel .badge, .admin-panel .tag, .admin-panel .who, .admin-panel .gt,
.admin-panel .games-head, .admin-panel .gp:has(.pw) .vs,
.admin-panel .workside .standings .sub-note { font-size: 14px; }
.admin-panel .standings:has(th:nth-child(7)) th:nth-child(1) { width: 13%; }
.admin-panel .standings:has(th:nth-child(7)) th:nth-child(2) { width: 23%; }
.admin-panel .standings:has(th:nth-child(7)) th:nth-child(3) { width: 14%; }
.admin-panel .standings:has(th:nth-child(7)) th:nth-child(4) { width: 12%; }
.admin-panel .standings:has(th:nth-child(7)) th:nth-child(5) { width: 15%; }
.admin-panel .standings:has(th:nth-child(7)) th:nth-child(6) { width: 23%; }
.admin-panel .playoff .gr { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-panel .standings .col-notes { display: none; }
.admin-panel .standings .sub-note { display: block; font-size: 14px; color: var(--muted); }
@media (max-width: 640px) {
  .admin-panel button.small, .admin-panel .btnlink { font-size: 16px; }
  .admin-panel .who { flex-wrap: wrap; }
  .admin-panel button, .admin-panel select, .admin-panel input[type=text], .admin-panel input[type=number], .admin-panel textarea { max-width: 100%; }
  .admin-panel summary { min-height: 44px; min-width: 44px; }
  .admin-panel .standings th { font-size: 14px; }
  .admin-panel .standings th, .admin-panel .standings td { padding: 9px 2px; }
  .admin-panel .standings .sub-note { font-size: 14px; }
  .admin-panel input[type=radio] { min-width: 24px; min-height: 24px; }
  .admin-panel dialog menu { flex-wrap: wrap; }
}

/* Event management: collapsed card for rare actions; arrow, heading and hint on one line */
details.card.manage > summary { cursor: pointer; }
details.card.manage > summary h2 { display: inline; margin: 0 8px 0 0; }
details.card.manage[open] > summary { margin-bottom: 8px; }

/* Match list (UI phase): waiting matches first; a finished match collapses to one line and opens to its full card */
details.game.compact { display: block; }
details.game.compact > summary.gline { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; cursor: pointer; }
details.game.compact > summary.gline .gt { min-width: 64px; }
details.game.compact[open] > summary.gline { margin-bottom: 8px; }
.gbody { display: grid; grid-template-columns: 76px minmax(0, 1fr) minmax(0, 1.25fr); gap: 8px 14px; align-items: center; }
.issue { margin-top: 6px; font-size: 14px; }
.issue > summary { cursor: pointer; width: fit-content; color: var(--muted); }
.issue .row { margin: 6px 0 0; }
.row.search input { width: 18em; max-width: 100%; }
@media (max-width: 640px) { .gbody { grid-template-columns: minmax(0, 1fr); gap: 8px; } }
details.game.compact .gbody > .gt, details.game.compact .done-text { display: none; } /* already in the one-line summary */

/* Event tabs (UI phase): Round, Standings (phones only), Players, Settings, Activity */
.evtabs { display: flex; flex-wrap: wrap; gap: 2px 4px; margin: 4px 0 16px; border-bottom: 1px solid var(--line); }
.evtabs [role=tab] { background: transparent; border: none; border-radius: 6px 6px 0 0; padding: 10px 14px; font-weight: 600; color: var(--muted); min-height: 44px; }
.evtabs [role=tab][aria-selected=true] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--accent); }
.evtabs [role=tab]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@media (min-width: 1040px) { .evtabs .phone-only { display: none; } }
@media (max-width: 1039px) { .tabpanel .workside { display: none; } }
@media (max-width: 640px) { .evtabs { flex-wrap: nowrap; gap: 0; } .evtabs [role=tab] { flex: 1 1 auto; padding: 10px 4px; font-size: 14px; } }

/* Round 1 summary (approved Oct 3): scan in a few seconds before publishing */
.r1summary { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin: 10px 0 12px; }
.r1summary h3 { margin: 0 0 8px; }
.r1summary dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0; }
.r1summary dt { font-weight: 600; color: var(--muted); }
.r1summary dd { margin: 0; }
@media (max-width: 640px) { .r1summary dl { grid-template-columns: minmax(0, 1fr); gap: 2px; } .r1summary dd { margin-bottom: 8px; } }
