/* Rapid Steno · Dictation Studio — light theme only */
:root {
  --page: #f3f6f5;
  --surface: #ffffff;
  --sunk: #f7faf9;
  --line: #dde6e3;
  --line-strong: #c9d6d2;
  --ink: #0e2a24;
  --muted: #5b6f6a;
  --soft: #8b9c98;
  --brand: #078f65;
  --brand-deep: #01563f;
  --brand-tint: #e6f4ee;
  --work: #b77405;
  --work-tint: #fff4dc;
  --fail: #c8323f;
  --fail-tint: #fdecee;
  --en: #1f5f9e;
  --en-tint: #e8f1fb;
  --hi: #a2470f;
  --hi-tint: #fdf0e6;
  --radius-lg: 14px;
  --radius: 10px;
  --radius-sm: 7px;
  --lift: 0 1px 2px rgba(14, 42, 36, .05), 0 6px 20px rgba(14, 42, 36, .04);
  --font: Lexend, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --deva: 'Noto Sans Devanagari', 'Nirmala UI', Mangal, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--page); color: var(--ink); font: 400 14px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.hi, [lang="hi"] { font-family: var(--deva), var(--font); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.boot { min-height: 100vh; display: grid; place-items: center; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin .8s linear infinite; }
.spinner.sm { width: 15px; height: 15px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── top bar ── */
.top { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1240px; margin: 0 auto; padding: 0 20px; height: 60px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; white-space: nowrap; color: var(--ink); text-decoration: none; }
.mark { width: 32px; height: 32px; border-radius: 9px; background: var(--brand); display: grid; place-items: center; flex: none; }
.brand small { display: block; font-weight: 400; font-size: 11.5px; color: var(--soft); line-height: 1.1; }
.nav { display: flex; gap: 2px; flex: 1; align-self: stretch; overflow-x: auto; scrollbar-width: none; }
.nav a { display: flex; align-items: center; padding: 0 12px; color: var(--muted); text-decoration: none; font-weight: 500; white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.nav a:hover { color: var(--ink); }
.nav a.on { color: var(--brand-deep); border-bottom-color: var(--brand); }
.who { display: flex; align-items: center; gap: 10px; white-space: nowrap; font-size: 13px; color: var(--muted); }
.av { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-tint); color: var(--brand-deep); display: grid; place-items: center; font-weight: 600; font-size: 13px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.status-dot.ok { background: var(--brand); }
.status-dot.bad { background: var(--fail); }
.linkbtn { background: none; border: none; color: var(--muted); cursor: pointer; padding: 6px 4px; font-size: 13px; text-decoration: none; }
.linkbtn:hover { color: var(--ink); }

main { max-width: 1240px; margin: 0 auto; padding: 28px 20px 80px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.head h1 { font-size: 26px; line-height: 1.2; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.head p { margin: 4px 0 0; color: var(--muted); max-width: 62ch; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--lift); }
.panel-pad { padding: 22px 24px; }
.panel h2 { font-size: 16px; font-weight: 600; margin: 0 0 4px; }
.panel .sub { color: var(--muted); margin: 0 0 16px; font-size: 13px; }
.stack { display: grid; gap: 16px; }

.note { padding: 12px 14px; border-radius: var(--radius); font-size: 13px; border: 1px solid; }
.note.warn { background: var(--work-tint); border-color: #f2d9a0; color: #7a4d03; }
.note.err { background: var(--fail-tint); border-color: #f4c3c8; color: #8f1f2a; }
.note.info { background: var(--brand-tint); border-color: #bfe3d4; color: var(--brand-deep); }

/* ── buttons & fields ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; font-weight: 500; font-size: 13.5px; white-space: nowrap; color: var(--ink); text-decoration: none; transition: background .12s, border-color .12s; }
.btn:hover:not(:disabled) { background: var(--sunk); border-color: var(--soft); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--brand-deep); border-color: var(--brand-deep); }
.btn.danger { color: var(--fail); }
.btn.sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: var(--radius-sm); }
.btn.lg { height: 46px; padding: 0 22px; font-size: 15px; }
.btn.block { width: 100%; }
.icon-btn { width: 32px; height: 32px; border-radius: var(--radius-sm); border: 1px solid transparent; background: transparent; display: inline-grid; place-items: center; cursor: pointer; color: var(--muted); }
.icon-btn:hover:not(:disabled) { background: var(--sunk); border-color: var(--line); color: var(--ink); }
.icon-btn:disabled { opacity: .3; cursor: not-allowed; }
.play { width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--brand); color: #fff; display: inline-grid; place-items: center; cursor: pointer; flex: none; }
.play:hover:not(:disabled) { background: var(--brand-deep); }
.play.on { background: var(--ink); }
.play:disabled { background: var(--line); color: var(--soft); cursor: not-allowed; }
svg.i { width: 16px; height: 16px; flex: none; }

.grid { display: grid; gap: 14px 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
@media (max-width: 800px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } .span2 { grid-column: auto; } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 13px; font-weight: 500; color: var(--ink); }
.field .hint, .hint { font-size: 12px; color: var(--soft); }
.req { color: var(--fail); }
.input, .select, .textarea { width: 100%; border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--radius); padding: 9px 12px; outline: none; transition: border-color .12s, box-shadow .12s; }
.input, .select { height: 40px; }
.input:disabled { background: var(--sunk); color: var(--muted); }
.textarea { min-height: 170px; resize: vertical; line-height: 1.7; }
.textarea.hi { font-size: 16.5px; line-height: 1.95; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(7, 143, 101, .14); }
.check { display: inline-flex; align-items: flex-start; gap: 9px; cursor: pointer; user-select: none; }
.check input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.check b { font-weight: 500; }
.check > div > span { display: block; font-size: 12.5px; color: var(--muted); }
.counter { display: flex; gap: 14px; font-size: 12px; color: var(--soft); justify-content: flex-end; flex-wrap: wrap; }
.counter b { color: var(--muted); font-weight: 500; }
.counter .over { color: var(--work); font-weight: 500; }

.seg { display: inline-flex; padding: 3px; background: var(--sunk); border: 1px solid var(--line); border-radius: 11px; gap: 2px; }
.seg button { border: none; background: transparent; padding: 7px 14px; border-radius: 8px; cursor: pointer; font-weight: 500; font-size: 13px; color: var(--muted); }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--surface); color: var(--brand-deep); box-shadow: 0 1px 3px rgba(14, 42, 36, .12); }
.seg.lg button { padding: 9px 20px; font-size: 14px; }

.choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 600px) { .choice { grid-template-columns: 1fr; } }
.choice label { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 13px 14px; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; background: var(--surface); }
.choice label:hover { border-color: var(--line-strong); }
.choice label:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }
.choice input { margin-top: 3px; accent-color: var(--brand); }
.choice b { display: block; font-weight: 600; font-size: 14px; }
.choice span { font-size: 12.5px; color: var(--muted); }

/* ── filters ── */
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 13px; color: var(--muted); font-weight: 500; }
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .n { font-variant-numeric: tabular-nums; color: var(--soft); }
.chip.on .n { color: rgba(255,255,255,.7); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; }
.search { position: relative; flex: 1 1 220px; max-width: 320px; margin-left: auto; }
.search svg { position: absolute; left: 11px; top: 11px; color: var(--soft); }
.search .input { padding-left: 34px; height: 38px; }

/* ── job list ── */
.jobs { overflow: hidden; }
.job { display: grid; grid-template-columns: 26px minmax(190px, 1.15fr) minmax(330px, 2fr) 170px 140px; gap: 16px; align-items: center; padding: 15px 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.job:last-child { border-bottom: none; }
.job:hover { background: var(--sunk); }
.job.sel { background: var(--brand-tint); }
.job input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--brand); }
.job-title { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 3px; }
.job-meta .sep { color: var(--line-strong); }
.job-nums { font-size: 12.5px; color: var(--muted); line-height: 1.6; font-variant-numeric: tabular-nums; }
.job-nums b { color: var(--ink); font-weight: 500; }
.job-nums > div { white-space: nowrap; }
.job-acts { display: flex; gap: 4px; justify-content: flex-end; align-items: center; }
.jobs-head { display: grid; grid-template-columns: 26px minmax(190px, 1.15fr) minmax(330px, 2fr) 170px 140px; gap: 16px; padding: 10px 18px; border-bottom: 1px solid var(--line); background: var(--sunk); font-size: 12px; color: var(--soft); font-weight: 500; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.jobs-head input { width: 16px; height: 16px; accent-color: var(--brand); }
@media (max-width: 960px) {
  .jobs-head { display: none; }
  .job { grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-areas: "c t a" "c p p" "c n n"; gap: 10px 12px; }
  .job > .c { grid-area: c; align-self: start; margin-top: 3px; }
  .job > .t { grid-area: t; min-width: 0; }
  .job > .p { grid-area: p; }
  .job > .n { grid-area: n; display: flex; gap: 14px; }
  .job > .a { grid-area: a; align-self: start; }
}

.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 5px; font-size: 11.5px; font-weight: 500; }
.tag.en { background: var(--en-tint); color: var(--en); }
.tag.hi { background: var(--hi-tint); color: var(--hi); }
.tag.plain { background: var(--sunk); color: var(--muted); border: 1px solid var(--line); }

/* ── progress track (the one loud thing) ── */
.track { display: flex; align-items: center; gap: 0; }
.st { display: flex; align-items: center; flex: 1 1 0; min-width: max-content; }
.st .node { flex: none; }
.st:last-child { flex: 0 0 auto; }
.st .node { height: 24px; padding: 0 9px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500; white-space: nowrap; border: 1.5px solid var(--line-strong); color: var(--soft); background: var(--surface); }
.st .bar { flex: 1; height: 2px; background: var(--line); margin: 0 3px; min-width: 6px; }
.st.done .node { background: var(--brand-tint); border-color: transparent; color: var(--brand-deep); }
.st.done .bar { background: var(--brand); }
.st.now .node { background: var(--work-tint); border-color: var(--work); color: #7a4d03; }
.st.now .node::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--work); animation: beat 1.1s ease-in-out infinite; }
.st.fail .node { background: var(--fail-tint); border-color: var(--fail); color: var(--fail); }
.st.all .node { background: var(--brand); border-color: var(--brand); color: #fff; }
@keyframes beat { 50% { opacity: .25; transform: scale(.7); } }
.track-text { font-size: 12.5px; color: var(--muted); margin-top: 7px; display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.track-text .what { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.track-text .clock { font-variant-numeric: tabular-nums; color: var(--work); font-weight: 500; flex: none; }
.track-text.fail .what { color: var(--fail); white-space: normal; }
.track-text.ok .what { color: var(--brand-deep); }
.track.big .node { height: 30px; padding: 0 12px; font-size: 12.5px; }

.bulkbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 18px; background: var(--ink); color: #fff; border-radius: var(--radius-lg) var(--radius-lg) 0 0; font-size: 13px; }
.bulkbar .btn { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.bulkbar .btn:hover:not(:disabled) { background: rgba(255,255,255,.1); }
.empty { padding: 56px 20px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--ink); font-size: 16px; font-weight: 600; margin: 0 0 6px; }
.foot { display: flex; justify-content: space-between; align-items: center; padding: 14px 2px 0; font-size: 13px; color: var(--muted); gap: 8px; flex-wrap: wrap; }
.foot-l { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.foot-l b { color: var(--ink); font-weight: 600; }
.perpage { display: inline-flex; align-items: center; gap: 8px; }
.perpage .select { height: 32px; width: auto; padding: 0 28px 0 10px; font-size: 13px; }
.pager { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pg { min-width: 34px; height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; font-variant-numeric: tabular-nums; }
.pg:hover:not(:disabled) { border-color: var(--line-strong); background: var(--sunk); }
.pg.on, .pg.on:hover:not(:disabled) { background: var(--brand); border-color: var(--brand); color: #fff; cursor: default; }
.pg:disabled { opacity: .45; cursor: default; }
.pager .gap { padding: 0 4px; color: var(--soft); }
.catsel { width: auto; min-width: 190px; max-width: 260px; height: 38px; }
.tag.lg { height: 34px; padding: 0 14px; font-size: 14px; border-radius: 9px; }
.editnote { display: flex; align-items: center; gap: 12px; padding: 13px 14px 13px 16px; margin: -4px 0 18px; border-radius: var(--radius-lg); background: var(--en-tint); border: 1px solid #c9dcf1; color: var(--en); }
.editnote.live { background: var(--work-tint); border-color: #f1d9a6; color: #7a4d03; }
.editnote > div { flex: 1; min-width: 0; }
.editnote b { display: block; font-weight: 600; font-size: 14px; }
.editnote span { font-size: 13px; opacity: .9; }
#keephint.warn { color: var(--work); font-weight: 500; }

/* ── drawer ── */
.scrim { position: fixed; inset: 0; background: rgba(14, 42, 36, .28); z-index: 40; animation: fade .15s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(660px, 100%); background: var(--surface); z-index: 41; box-shadow: -12px 0 40px rgba(14, 42, 36, .14); display: flex; flex-direction: column; animation: slide .2s ease-out; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(32px); opacity: 0; } }
.drawer-h { padding: 20px 22px 16px; border-bottom: 1px solid var(--line); }
.drawer-h .row1 { display: flex; gap: 12px; align-items: flex-start; }
.drawer-h h3 { margin: 0; font-size: 18px; font-weight: 600; flex: 1; min-width: 0; }
.drawer-b { padding: 18px 22px 28px; overflow-y: auto; flex: 1; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (max-width: 560px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.facts div { padding: 10px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; min-width: 0; }
.facts span { display: block; font-size: 12px; color: var(--soft); }
.facts b { font-weight: 500; font-size: 13.5px; word-break: break-word; }
.speedcard { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.speedcard div { padding: 12px 14px; border-right: 1px solid var(--line); }
.speedcard div:last-child { border-right: none; background: var(--brand-tint); }
.speedcard span { display: block; font-size: 12px; color: var(--muted); }
.speedcard b { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.speedcard small { font-size: 12px; color: var(--muted); font-weight: 400; }
.passage { background: var(--sunk); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; white-space: pre-wrap; line-height: 1.8; max-height: 280px; overflow-y: auto; }
.passage.hi { font-size: 16.5px; line-height: 2; }
.sec { font-size: 14px; font-weight: 600; margin: 22px 0 10px; }
.history { list-style: none; padding: 0; margin: 0; font-size: 13px; border-left: 2px solid var(--line); }
.history li { display: flex; gap: 12px; padding: 5px 0 5px 14px; position: relative; }
.history li::before { content: ""; position: absolute; left: -5px; top: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.history li:first-child::before { background: var(--brand); }
.history time { color: var(--soft); white-space: nowrap; font-variant-numeric: tabular-nums; }
audio { width: 100%; height: 42px; }

/* ── new dictation ── */
.compose { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
@media (max-width: 1000px) { .compose { grid-template-columns: minmax(0, 1fr); } }
.summary { position: sticky; top: 80px; }
.summary .row-line { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.summary .row-line span { color: var(--muted); }
.summary .row-line b { font-weight: 500; text-align: right; }
.summary .steps { list-style: none; padding: 0; margin: 4px 0 16px; counter-reset: s; }
.summary .steps li { counter-increment: s; display: flex; gap: 10px; align-items: baseline; padding: 6px 0; font-size: 13.5px; }
.summary .steps li::before { content: counter(s); width: 20px; height: 20px; border-radius: 50%; background: var(--brand-tint); color: var(--brand-deep); font-size: 11.5px; font-weight: 600; display: inline-grid; place-items: center; flex: none; transform: translateY(4px); }
.speedbox { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: var(--sunk); }
/* new dictation: numbered sections */
.sec-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.sec-head > div:first-child { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.sec-head .sub { margin: 0; }
.sec-num { width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 600; font-size: 13.5px; display: inline-grid; place-items: center; flex: none; }
.wc { display: inline-flex; align-items: center; gap: 4px; padding: 4px 11px; border-radius: 999px; background: var(--brand-tint); color: var(--brand-deep); font-size: 12.5px; white-space: nowrap; flex: none; }
.wc b { font-weight: 600; }
.wc .over { color: var(--work); font-weight: 500; }
.label-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.opt { font-size: 12px; color: var(--soft); font-weight: 400; margin-left: 4px; }
.opt-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0 0; margin-top: 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.opt-row b { display: block; font-weight: 500; font-size: 14px; }
.opt-row span { font-size: 12.5px; color: var(--muted); }
.opt-row .seg button { white-space: nowrap; }
.tw-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 14px; align-items: end; }
.tw-row .hint { padding-bottom: 10px; }
.textlink { background: none; border: none; padding: 0; color: var(--brand); font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; }
.textlink:hover { text-decoration: underline; }
.match { display: flex; gap: 8px 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); padding: 10px 14px; border-radius: var(--radius); background: var(--sunk); border: 1px solid var(--line); }
.match b { color: var(--ink); font-weight: 600; }
.match.ok { background: var(--brand-tint); border-color: #bfe3d3; }
.match.ok span:last-child { color: var(--brand-deep); font-weight: 600; }
.match.warn { background: var(--work-tint); border-color: #f1d9a6; }
.match.warn span:last-child { color: var(--work); font-weight: 600; }
.special { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 8px; padding: 8px 8px 8px 14px; border-radius: var(--radius); background: var(--fail-tint); border: 1px solid #f3c6cb; font-size: 13px; color: var(--fail); }
.special[hidden] { display: none; }
.special code { font: 600 13px ui-monospace, Menlo, monospace; background: #fff; border: 1px solid #f3c6cb; border-radius: 5px; padding: 1px 6px; color: var(--ink); }
.summary .sec { margin-top: 18px; }
.summary b.hi { font-family: var(--deva); }
details.more summary { cursor: pointer; font-weight: 500; color: var(--muted); padding: 4px 0; }
details.more summary:hover { color: var(--ink); }
.drop { border: 1.5px dashed var(--line-strong); border-radius: var(--radius); padding: 24px; text-align: center; color: var(--muted); cursor: pointer; background: var(--sunk); transition: border-color .12s, background .12s; }
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-tint); }
.drop b { color: var(--ink); display: block; font-size: 14.5px; font-weight: 600; margin-bottom: 2px; }

/* ── tables (bulk preview) ── */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 12px; color: var(--soft); font-weight: 500; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--sunk); }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr.bad td { background: var(--fail-tint); }
.ok-t { color: var(--brand-deep); font-weight: 500; }
.bad-t { color: var(--fail); font-weight: 500; }
.files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.files span { font-size: 12px; padding: 3px 9px; background: var(--sunk); border: 1px solid var(--line); border-radius: 999px; }

/* ── settings ── */
.health { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 800px) { .health { grid-template-columns: minmax(0, 1fr); } }
.health div { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.health i { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--brand); }
.health i.bad { background: var(--fail); }
.health span { font-size: 12.5px; color: var(--muted); display: block; }
.health b { font-weight: 500; font-size: 13.5px; }

/* ── login ── */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(400px, 100%); padding: 34px 32px; }
.login-card .mark { width: 44px; height: 44px; border-radius: 12px; margin-bottom: 18px; }
.login-card h1 { margin: 0 0 6px; font-size: 24px; font-weight: 600; }
.login-card p { color: var(--muted); margin: 0 0 22px; }
.me { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; background: var(--sunk); }
.me .av { width: 38px; height: 38px; font-size: 15px; }
.me b { display: block; font-weight: 600; }
.me span { font-size: 12.5px; color: var(--muted); }
.otp { letter-spacing: .45em; text-align: center; font-size: 22px; font-weight: 600; height: 52px !important; }

.sticky-actions { position: sticky; bottom: 0; padding: 16px 0 4px; display: flex; gap: 10px; justify-content: flex-end; background: linear-gradient(rgba(243,246,245,0), var(--page) 35%); }

/* ── toast ── */
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(520px, calc(100% - 32px)); }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: var(--radius); box-shadow: 0 10px 30px rgba(14, 42, 36, .25); font-size: 13.5px; animation: fade .2s; max-width: 100%; }
.toast.err { background: var(--fail); }
.toast.ok { background: var(--brand-deep); }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mt { margin-top: 16px; }
.mt-s { margin-top: 8px; }

@media (max-width: 760px) {
  .top-in { height: auto; flex-wrap: wrap; padding: 10px 14px 0; gap: 6px 12px; }
  .nav { order: 3; flex-basis: 100%; height: 42px; }
  .who .name, .hide-sm { display: none; }
  main { padding: 20px 14px 70px; }
  .head h1 { font-size: 22px; }
  .panel-pad { padding: 18px 16px; }
  .search { max-width: none; margin-left: 0; }
}

@media (max-width: 960px) {
  .track { flex-wrap: wrap; row-gap: 6px; }
  .st, .st:last-child { flex: 0 0 auto; }
  .st .bar { flex: none; width: 10px; min-width: 10px; }
}

/* status badge on each job */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge .t { font-weight: 500; font-variant-numeric: tabular-nums; opacity: .85; }
.badge.run { background: var(--work-tint); color: #8a5703; }
.badge.run i { animation: beat 1.1s ease-in-out infinite; }
.badge.wait { background: var(--sunk); color: var(--muted); border: 1px solid var(--line); }
.badge.retry { background: var(--work-tint); color: #8a5703; }
.badge.ok { background: var(--brand-tint); color: var(--brand-deep); }
.badge.bad { background: var(--fail-tint); color: var(--fail); }
.badge.off { background: var(--sunk); color: var(--soft); }
@media (max-width: 600px) { .sec-head { flex-direction: column; } .tw-row { grid-template-columns: minmax(0, 1fr); } .tw-row .hint { padding-bottom: 0; } }
/* jobs on phones: a card per job, actions at the bottom */
@media (max-width: 760px) {
  .job { grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-areas: "c t t" "c p p" "c n a"; padding: 14px; }
  .job > .a { align-self: center; }
  .job > .n { align-self: center; flex-direction: column; gap: 0; }
  .job-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .filters { gap: 8px; }
  .filters .chips { width: 100%; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .filters .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .catsel { flex: 1 1 150px; min-width: 0; max-width: none; }
  .foot { flex-direction: column; align-items: stretch; gap: 12px; }
  .foot-l { justify-content: space-between; }
  .pager { justify-content: center; }
  .foot > .btn { align-self: center; }
  .editnote { flex-wrap: wrap; }
}

/* ── Login (refresh) ─────────────────────────────────────────── */
.lgw { min-height: 100vh; display: grid; grid-template-columns: minmax(340px, 44%) 1fr; background: var(--page); }
.lg-brand {
  position: relative; overflow: hidden; color: #eafff6; padding: 36px 44px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(120% 80% at 0% 0%, #0b6b4f 0%, transparent 60%), linear-gradient(160deg, #01342f 0%, #024a3c 55%, #078f65 130%);
}
.lg-brand::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, rgba(126, 230, 184, .22), transparent 70%); pointer-events: none; }
.lg-brand-top { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: .01em; }
.lg-brand-top .mark { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); }
.lg-brand-mid h2 { font-size: clamp(30px, 3.2vw, 40px); line-height: 1.1; margin: 0 0 12px; font-weight: 700; color: #fff; letter-spacing: -.02em; }
.lg-brand-mid p { margin: 0; max-width: 34ch; color: rgba(234, 255, 246, .78); font-size: 15px; line-height: 1.55; }
.lg-wave { display: flex; align-items: center; gap: 4px; height: 64px; margin: 28px 0 24px; }
.lg-wave i { flex: 1; max-width: 6px; height: var(--h); border-radius: 3px; background: linear-gradient(180deg, #7ee6b8, #3fcf94); opacity: .85; transform-origin: center; animation: lgWave 1.4s ease-in-out var(--d) infinite; }
@keyframes lgWave { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
.lg-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; color: rgba(234, 255, 246, .9); }
.lg-points li { display: flex; align-items: center; gap: 10px; }
.lg-points li::before { content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%; background: rgba(126, 230, 184, .18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%237ee6b8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.lg-brand-foot { font-size: 12px; color: rgba(234, 255, 246, .55); letter-spacing: .06em; text-transform: uppercase; }

.lg-main { display: grid; place-items: center; padding: 32px 20px; }
.lg-card { width: min(420px, 100%); }
.lg-mob-brand { display: none; align-items: center; gap: 10px; margin-bottom: 26px; font-size: 16px; }
.lg-card h1 { margin: 0 0 6px; font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.lg-sub { margin: 0 0 22px; color: var(--muted); }
.lg-gap { margin-top: 14px; }

.lg-steps { list-style: none; display: flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 0; font-size: 13px; font-weight: 600; color: var(--soft); }
.lg-steps li { display: flex; align-items: center; gap: 8px; }
.lg-steps li span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; border: 1.5px solid var(--line-strong); background: var(--surface); }
.lg-steps li.sep { flex: 1; height: 2px; max-width: 56px; background: var(--line); border-radius: 2px; }
.lg-steps li.on { color: var(--ink); }
.lg-steps li.on span { background: var(--brand); border-color: var(--brand); color: #fff; }
.lg-steps li.done { color: var(--brand-deep); }
.lg-steps li.done span { background: var(--brand-tint); border-color: var(--brand); color: var(--brand-deep); }

.lg-me { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.lg-me .av { width: 40px; height: 40px; font-size: 16px; }
.lg-me b { display: block; font-weight: 600; }
.lg-me span { font-size: 12.5px; color: var(--muted); }

.lg-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; }
.lg-pass { position: relative; }
.lg-pass .input { height: 46px; padding-right: 46px; font-size: 15px; }
.lg-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: none; background: none; border-radius: 8px; color: var(--soft); cursor: pointer; display: grid; place-items: center; }
.lg-eye:hover, .lg-eye.on { color: var(--brand-deep); background: var(--brand-tint); }

.lg-digits { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.lg-digit { width: 100%; height: 54px; text-align: center; font-size: 22px; font-weight: 600; font-family: var(--font); border: 1.5px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink); outline: none; transition: border-color .12s, box-shadow .12s; }
.lg-digit:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(7, 143, 101, .16); }
.lg-digit.bad { border-color: var(--fail); background: var(--fail-tint); animation: lgShake .3s; }
@keyframes lgShake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.lg-hint { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.lg-row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.lg-row .linkbtn:disabled { opacity: .55; cursor: default; }

.lg-secure { display: flex; gap: 8px; align-items: flex-start; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--soft); line-height: 1.5; }
.lg-secure svg { flex: none; margin-top: 1px; color: var(--brand); }

@media (max-width: 860px) {
  .lgw { grid-template-columns: 1fr; }
  .lg-brand { display: none; }
  .lg-mob-brand { display: flex; }
  .lg-main { align-items: start; padding-top: 48px; }
  .lg-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--lift); padding: 28px 22px; }
}
@media (max-width: 380px) { .lg-digits { gap: 5px; } .lg-digit { height: 48px; font-size: 19px; } }
@media (prefers-reduced-motion: reduce) { .lg-wave i, .lg-digit.bad { animation: none; } }
