/* Work or Wait · one system: Archivo, one blue, solid ink for work, a halftone screen for wait */
@font-face { font-family: "Archivo"; src: url("/fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --font: "Archivo", "Arial Narrow", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --dot: 6px; --r: 12px;
  /* desk, light */
  --bg: #F3F5F6; --card: #FFFFFF; --ink: #12171C; --muted: #56606A; --line: #D5DADE; --blue: #0A5FA0; --blue-ink: #FFFFFF; --tint: #E6EDF3; --warn: #12171C;
  --wm-ink: var(--ink); --wm-soft: #8A939C; --wm-line: var(--blue);
}
body.floor {
  color-scheme: dark;
  --bg: #26292D; --card: #31353A; --ink: #F2F3F4; --muted: #B4B8BD; --line: #484D54; --blue: #5AA8F0; --blue-ink: #10202E; --tint: #3A4048;
  --wm-ink: #F2F3F4; --wm-soft: #8E949B; --wm-line: #5AA8F0;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.5; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(26px, 4vw, 34px); font-weight: 700; font-stretch: 112%; line-height: 1.1; letter-spacing: -0.01em; text-wrap: balance; }
h2 { font-size: 19px; font-weight: 700; font-stretch: 108%; line-height: 1.25; }
h3 { font-size: 16px; font-weight: 700; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.fine { font-size: 13px; color: var(--muted); }
.lbl { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.err { color: var(--ink); font-size: 14px; font-weight: 600; border-left: 3px solid var(--blue); padding-left: 8px; }

/* the two textures */
.solid { background: var(--ink); }
.ht { background-image: radial-gradient(circle, var(--ink) 34%, transparent 38%); background-size: var(--dot) var(--dot); background-position: center; }
.hatch { background: repeating-linear-gradient(135deg, var(--ink) 0 1.5px, transparent 1.5px 6px); }
.blank { box-shadow: inset 0 0 0 1.5px var(--ink); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: var(--r); border: 1.5px solid var(--ink); background: var(--card); font-size: 16px; font-weight: 600; text-align: center; transition: transform 0.12s ease, background-color 0.2s ease; }
.btn:active:not(:disabled) { transform: scale(0.985); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: var(--blue-ink); }
.btn.big { min-height: 60px; font-size: 18px; width: 100%; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--blue); }
.btn.danger { border-color: var(--ink); }
.link { background: none; border: 0; padding: 0; color: var(--blue); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.link.quiet { color: var(--muted); }
.link.back { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: transparent; min-height: 36px; padding: 0 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.seg.wide { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
.seg.wide button { min-height: 46px; font-size: 14px; }
.icon-btn { border: 0; background: transparent; width: 44px; height: 44px; display: grid; place-items: center; color: var(--muted); border-radius: 10px; }

/* fields */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field label, .field .flabel, .field legend { font-size: 14px; font-weight: 600; }
.field legend { padding: 0; margin-bottom: 6px; }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea {
  width: 100%; min-width: 0; min-height: 48px; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font-size: 16px;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 25%, transparent); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--blue); width: 20px; height: 20px; margin: 0; flex: none; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.checks label { display: flex; align-items: center; gap: 8px; font-weight: 500; min-height: 36px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 48px; padding: 8px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); font-size: 15px; font-weight: 600; text-align: left; line-height: 1.25; }
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip small { display: block; font-weight: 500; color: var(--muted); font-size: 13px; margin-top: 2px; }
.chips.one { flex-direction: column; }
.chips.one .chip { width: 100%; }
.flash { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 50; max-width: min(560px, calc(100% - 32px)); padding: 12px 16px; border-radius: 12px; background: var(--ink); color: var(--bg); font-size: 15px; font-weight: 600; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25); }
.flash.warn { border-left: 6px solid var(--blue); }

/* ================= welcome and sign-in ================= */
.welcome, .signin { max-width: 440px; margin: 0 auto; min-height: 100%; padding: 32px 20px calc(32px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 20px; }
.welcome { justify-content: center; }
.welcome-mark svg { width: 220px; height: auto; display: block; }
.welcome-line { font-size: 22px; font-weight: 600; font-stretch: 108%; line-height: 1.3; }
.choose { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.signin form { display: flex; flex-direction: column; gap: 14px; }
.signin h1 { margin-top: 8px; }
.code { font-family: var(--mono); font-size: 30px !important; letter-spacing: 0.25em; text-transform: uppercase; text-align: center; min-height: 68px !important; }
.pin input { font-family: var(--mono); font-size: 36px !important; letter-spacing: 0.6em; text-align: center; min-height: 72px !important; }
.whos { display: flex; flex-direction: column; gap: 10px; }
.who { text-align: left; border: 1.5px solid var(--line); background: var(--card); border-radius: 14px; padding: 14px 16px; min-height: 64px; display: flex; flex-direction: column; gap: 2px; }
.who b { font-size: 18px; }
.who span { font-size: 14px; color: var(--muted); }
.who:hover { border-color: var(--ink); }

/* ================= the phone ================= */
.phone { max-width: 560px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; }
.ph-head { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px; background: var(--bg); border-bottom: 1px solid var(--line); }
.ph-icon svg { width: 34px; height: 34px; display: block; border-radius: 8px; }
.ph-who { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; flex: 1; }
.ph-who b { font-size: 16px; }
.ph-who span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-body { flex: 1; padding: 14px 16px 120px; display: flex; flex-direction: column; gap: 16px; }
.ph-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; justify-content: center; padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px)); background: var(--bg); border-top: 1px solid var(--line); }
.sync { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.sync i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.sync.wait i { background: var(--blue); animation: pulse 1.2s ease-in-out infinite; }
.sync.off i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }
@keyframes pulse { 50% { opacity: 0.3; } }
.undo { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(56px + env(safe-area-inset-bottom, 0px)); z-index: 20; width: min(528px, calc(100% - 24px)); display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-radius: 14px; background: var(--ink); color: var(--bg); font-size: 15px; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); animation: rise 0.2s ease-out; }
.undo span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.undo button { border: 0; background: var(--blue); color: var(--blue-ink); min-height: 44px; padding: 0 14px; border-radius: 10px; font-weight: 700; }
@keyframes rise { from { transform: translate(-50%, 12px); opacity: 0; } }

.tools { display: flex; flex-direction: column; gap: 10px; }
.tool { min-height: 56px; border-radius: 14px; border: 1.5px dashed var(--line); background: transparent; font-size: 16px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 10px; }
.tool.primary { border: 0; background: var(--blue); color: var(--blue-ink); font-size: 17px; }
.tool.primary span { font-size: 24px; line-height: 1; font-weight: 500; }
.tool.running { border-style: solid; border-color: var(--ink); }
.tool i { width: 26px; height: 10px; display: block; }
.search input { min-height: 46px; }
.group { display: flex; flex-direction: column; gap: 8px; }
.group h2 { font-size: 13px; font-family: var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; font-weight: 500; }
.group .count { background: var(--card); border-radius: 20px; padding: 0 8px; color: var(--ink); }
.jobs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.jobrow { width: 100%; text-align: left; border: 1.5px solid transparent; background: var(--card); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; min-height: 72px; transition: border-color 0.15s ease; }
.jobrow:hover { border-color: var(--line); }
.jobrow.work { border-color: var(--ink); }
.jobrow.pick { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 12px; cursor: pointer; }
.jobrow.pick input { width: 24px; height: 24px; }
.jobrow.pick .jr-top { flex: 1; }
.jobrow.pick .jr-sub { flex-basis: 100%; padding-left: 36px; }
.jr-top { display: flex; align-items: baseline; gap: 10px; }
.jr-top b { font-size: 19px; font-weight: 500; }
.jr-top .pt { margin-left: auto; font-size: 13px; color: var(--muted); white-space: nowrap; }
.jr-mid { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.jr-mid i { width: 30px; height: 10px; flex: none; }
.jr-mid span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jr-mid b { font-weight: 500; }
.jr-sub { font-size: 13px; color: var(--muted); }
.rush { font-size: 11px; font-family: var(--mono); letter-spacing: 0.08em; text-transform: uppercase; border: 1.5px solid var(--blue); color: var(--blue); border-radius: 6px; padding: 1px 6px; font-weight: 500; }
.empty-state { margin: 40px auto 0; max-width: 320px; text-align: center; display: flex; flex-direction: column; gap: 16px; align-items: center; color: var(--muted); }
.big-line { display: flex; width: 160px; height: 16px; }
.big-line i { flex: 1; }

.jobcard { background: var(--card); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.jc-top { display: flex; align-items: baseline; gap: 10px; }
.jc-top b { font-size: 24px; font-weight: 500; }
.jc-sub { font-size: 15px; color: var(--muted); }
.due { font-size: 14px; }
.due.over { font-weight: 700; color: var(--blue); }
.now-at { display: flex; flex-direction: column; }
.now-at span { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.now-at b { font-size: 30px; font-weight: 700; font-stretch: 110%; line-height: 1.1; }
.state { display: flex; align-items: center; gap: 12px; border-radius: 12px; padding: 12px 14px; background: var(--tint); font-size: 16px; }
.state i { width: 40px; height: 14px; flex: none; }
.state b { margin-left: auto; font-size: 20px; font-weight: 500; }
.state.work { background: var(--card); box-shadow: inset 0 0 0 1.5px var(--ink); }
.actions { display: flex; flex-direction: column; gap: 10px; }
.done-note { display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 600; }
.done-note i { width: 40px; height: 14px; }
.hist { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; }
.hist h2 { font-size: 13px; font-family: var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.hist ol { list-style: none; margin: 0; padding: 0; }
.hist li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.hist li .mono { color: var(--muted); }
.pend { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); vertical-align: middle; }
.picker { display: flex; flex-direction: column; gap: 14px; }
.picker h2 { font-size: 22px; }
.pgroup { display: flex; flex-direction: column; gap: 8px; }
.plabel { font-size: 12px; font-family: var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.pgroup .chip { flex: 1 1 calc(50% - 8px); }
.form form { display: flex; flex-direction: column; gap: 18px; }
.form .chips.row .chip { min-height: 44px; padding: 6px 12px; font-size: 14px; }
.stepper { display: flex; align-items: center; gap: 0; border: 1.5px solid var(--line); border-radius: 12px; width: max-content; overflow: hidden; }
.stepper button { width: 56px; height: 52px; border: 0; background: var(--card); font-size: 24px; }
.stepper output { min-width: 56px; text-align: center; font-size: 22px; }
.toggle { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; }

/* the job line */
.jl { display: flex; height: 16px; min-width: 4px; }
.jl span { height: 100%; min-width: 1px; }
.jl span.live { box-shadow: inset -3px 0 0 var(--blue); }
.jl.open { border-right: 0; }
.hist .jl { width: 100% !important; height: 14px; }

/* ================= the desk ================= */
body.desk { background: var(--bg); }
.desk-head { display: flex; align-items: center; gap: 24px; padding: 14px 24px; border-bottom: 1.5px solid var(--ink); background: var(--bg); flex-wrap: wrap; }
.desk-mark svg { height: 30px; width: auto; display: block; }
.desk-shop { display: flex; flex-direction: column; line-height: 1.25; }
.desk-shop b { font-size: 16px; }
.desk-shop span { font-size: 13px; color: var(--muted); }
.desk-me { margin-left: auto; display: flex; align-items: center; gap: 18px; font-size: 14px; flex-wrap: wrap; }
.banner { margin: 0; padding: 10px 24px; background: var(--tint); font-weight: 600; }
.desk { max-width: 1220px; margin: 0 auto; padding: 28px 24px 96px; display: flex; flex-direction: column; gap: 22px; }
.desk.narrow { max-width: 640px; }
.page-head { display: flex; flex-direction: column; gap: 8px; max-width: 780px; }
.page-head.row { flex-direction: row; justify-content: space-between; align-items: flex-end; gap: 16px; max-width: none; flex-wrap: wrap; }
.lede { font-size: 17px; color: var(--muted); max-width: 64ch; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 22px; align-items: start; }
.cols.wide-left { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; align-items: end; }
.pair { display: flex; gap: 10px; flex-wrap: wrap; }
.pair > * { flex: 1 1 180px; }
.next { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 22px; border-radius: 16px; border: 1.5px solid var(--ink); background: var(--card); flex-wrap: wrap; }
.next > div { flex: 1 1 320px; }
.next .btn.big { width: auto; min-width: 280px; }
.tscroll { overflow-x: auto; }

/* the rail: one line from set-up to verdict */
.rail { padding: 16px 24px 0; max-width: 1220px; margin: 0 auto; }
.rail ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.rail li { position: relative; }
.rail li::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 6px; }
.rail li.done::before { background: var(--ink); }
.rail li.cur::before { background-image: linear-gradient(90deg, var(--blue) 45%, transparent 45%), radial-gradient(circle, var(--ink) 34%, transparent 38%); background-size: 100% 100%, 6px 6px; }
.rail li.lock::before { background-image: radial-gradient(circle, var(--line) 34%, transparent 38%); background-size: 6px 6px; }
.r-link { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 0 12px 12px 0; background: none; border: 0; text-align: left; width: 100%; color: var(--ink); }
.r-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--ink); background: var(--bg); margin-bottom: 8px; }
.done .r-dot { background: var(--ink); }
.cur .r-dot { background: var(--blue); border-color: var(--blue); }
.lock .r-dot { border-color: var(--line); }
.rail-now { display: none; margin: 10px 0 0; font-size: 14px; font-weight: 600; }
.rail-now span { font-family: var(--mono); font-weight: 400; color: var(--muted); margin-right: 6px; }
.r-n { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.r-t { font-size: 15px; font-weight: 600; line-height: 1.25; }
.lock .r-t { color: var(--muted); }
.on .r-t { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
button.r-link:hover .r-t { color: var(--blue); }

/* set-up */
.codebox { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 12px; background: var(--tint); }
.codebox b { font-size: 40px; font-weight: 500; letter-spacing: 0.2em; }
.steps-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.pinbox { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; padding: 16px; border-radius: 12px; border: 2px solid var(--blue); }
.pinbox b.mono { font-size: 34px; letter-spacing: 0.3em; grid-row: span 2; }
.pinbox small { color: var(--muted); }
.pinbox .link { justify-self: start; }
.t { width: 100%; border-collapse: collapse; font-size: 15px; }
.t th { text-align: left; font-size: 12px; font-family: var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 8px 10px 8px 0; border-bottom: 1.5px solid var(--ink); }
.t td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.t .r { text-align: right; white-space: nowrap; }
.t tr.inactive td { color: var(--muted); }
.addperson { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px 14px; padding-top: 8px; border-top: 1px solid var(--line); }
.addperson fieldset { grid-column: 1 / -1; }
.addperson .btn { grid-column: 1 / -1; justify-self: start; }
.profile { display: flex; flex-direction: column; gap: 16px; }
.profile h3 { margin-top: 8px; }
.profile > .btn { align-self: flex-start; }
.danger-zone .erase { display: flex; flex-direction: column; gap: 8px; }

/* process check */
.check { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; align-items: start; }
.stages ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.stg { width: 100%; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto 14px; gap: 8px; align-items: center; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 9px 4px; font-size: 14px; min-height: 42px; }
.stg .mono { color: var(--muted); font-size: 12px; }
.stg .gate { font-size: 11px; color: var(--blue); }
.stg i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--line); }
.stg.ok i { background: var(--ink); border-color: var(--ink); }
.stg[aria-current="step"] { background: var(--card); font-weight: 700; box-shadow: inset 3px 0 0 var(--blue); }
.qs h2 { font-size: 26px; font-stretch: 110%; }
.qq { border: 0; padding: 14px 0 0; margin: 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.qq legend { display: block; float: none; width: 100%; font-size: 17px; font-weight: 600; padding: 0; margin-bottom: 10px; }
.qq legend .mono { color: var(--muted); font-size: 13px; margin-right: 6px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills label { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--line); cursor: pointer; font-weight: 600; }
.pills label:has(input:checked) { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pills input { position: absolute; opacity: 0; pointer-events: none; }
.pills label:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }

/* trace: the owner's screen */
.owner { gap: 18px; }
.say { font-size: clamp(22px, 3vw, 32px); font-weight: 700; font-stretch: 110%; line-height: 1.2; max-width: 30ch; text-wrap: balance; }
.say em { font-style: normal; color: var(--blue); }
.big-bars { display: flex; flex-direction: column; gap: 10px; }
.bb { display: grid; grid-template-columns: 200px minmax(0, 1fr) 100px; gap: 14px; align-items: center; }
.bb-l { font-size: 14px; font-weight: 600; }
.bb-bar { height: 28px; display: flex; }
.bb-bar i { display: block; height: 100%; }
.bb b { font-weight: 500; text-align: right; font-size: 16px; }
.waiting { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.waiting li { display: grid; grid-template-columns: 150px minmax(0, 1fr) 84px; gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.waiting .who { display: flex; flex-direction: column; border: 0; padding: 0; min-height: 0; background: none; line-height: 1.3; }
.waiting .who span { font-size: 13px; }
.waiting .why { display: flex; flex-direction: column; gap: 6px; font-size: 14px; min-width: 0; }
.waiting .why i { display: block; height: 10px; min-width: 4px; }
.waiting .for { text-align: right; font-weight: 500; }
.facts { margin: 0; display: flex; flex-direction: column; }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; }
.rows { display: flex; flex-direction: column; gap: 12px; }
.brow { display: grid; grid-template-columns: 170px minmax(0, 1fr) 170px; gap: 14px; align-items: center; }
.brow .who { display: flex; flex-direction: column; line-height: 1.25; border: 0; background: none; padding: 0; min-height: 0; }
.brow .who b { font-size: 15px; font-weight: 500; }
.brow .who span { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brow .jl { height: 20px; }
.brow .jl span { outline: none; }
.brow .jl span:hover, .brow .jl span:focus-visible { box-shadow: 0 0 0 2px var(--blue); }
.brow .lt { font-size: 13px; text-align: right; color: var(--muted); white-space: nowrap; }
.brow .lt b { color: var(--ink); font-weight: 500; }
.detail { min-height: 48px; font-size: 15px; display: flex; align-items: center; gap: 12px; background: var(--tint); border-radius: 10px; padding: 10px 14px; }
.detail i { width: 34px; height: 12px; flex: none; }

/* read */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.kpis > div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.kpis span { font-size: 13px; color: var(--muted); }
.kpis b { font-size: 26px; font-weight: 700; font-stretch: 110%; }
.kpis small { font-size: 12px; color: var(--muted); }
.read { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.read aside { display: flex; flex-direction: column; gap: 22px; }
.finding { background: var(--card); border: 1.5px solid var(--ink); border-radius: 16px; padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.f-top { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.f-top .sev { font-family: var(--mono); font-size: 12px; border-radius: 6px; padding: 2px 8px; background: var(--ink); color: var(--bg); }
.sev2 .f-top .sev { background: var(--tint); color: var(--ink); }
.sev1 .f-top .sev { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.f-top .basis { font-size: 13px; color: var(--muted); margin-left: auto; }
.finding h2 { font-size: clamp(22px, 2.6vw, 28px); font-stretch: 110%; line-height: 1.2; }
.finding .ev { font-size: 17px; }
.f-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.f-grid p { margin-top: 4px; }
.ben { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.ben span { background: var(--tint); border-radius: 8px; padding: 6px 10px; }
.flist { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; }
.flist button { width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 10px 4px; display: flex; gap: 10px; align-items: center; font-size: 15px; min-height: 44px; }
.flist button.on { font-weight: 700; box-shadow: inset 3px 0 0 var(--blue); padding-left: 10px; }
.sevdot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.sevdot.s3 { background: var(--ink); }
.sevdot.s2 { background: var(--muted); }
.sevdot.s1 { box-shadow: inset 0 0 0 1.5px var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 22px; height: 10px; display: inline-block; }
.tp { min-width: 380px; display: flex; flex-direction: column; gap: 8px; }
.tprow { display: grid; grid-template-columns: 118px minmax(0, 1fr) 96px; gap: 10px; align-items: center; font-size: 13px; }
.tpbar { display: flex; height: 14px; }
.tpbar i { display: block; height: 100%; }
.tprow .r { text-align: right; color: var(--muted); }
.ctrlbar { display: flex; height: 22px; box-shadow: inset 0 0 0 1.5px var(--ink); }
.ctrlbar i { display: block; height: 100%; }
details.card summary { cursor: pointer; font-weight: 700; font-size: 17px; }
.thrs { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.thr { display: grid; grid-template-columns: minmax(0, 1fr) 120px 56px; gap: 10px; align-items: center; font-size: 14px; }
.thr input { accent-color: var(--blue); width: 100%; }
.thr b { text-align: right; font-weight: 500; }

/* verdict */
.rtabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1.5px solid var(--ink); }
.rtabs button { border: 0; background: none; padding: 10px 14px; font-size: 15px; font-weight: 600; color: var(--muted); border-radius: 10px 10px 0 0; min-height: 44px; }
.rtabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.doc { background: var(--card); border: 1px solid var(--line); border-radius: 0 0 16px 16px; padding: 44px clamp(20px, 5vw, 64px); display: flex; flex-direction: column; gap: 16px; max-width: 900px; }
.doc-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.doc-head svg { height: 26px; width: auto; }
.dh { font-size: clamp(26px, 3.4vw, 36px); font-weight: 700; font-stretch: 112%; line-height: 1.15; text-wrap: balance; }
.doc h3 { font-size: 13px; font-family: var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-top: 12px; border-top: 1.5px solid var(--ink); padding-top: 12px; }
.doc p { max-width: 68ch; }
.split { display: flex; height: 18px; box-shadow: inset 0 0 0 1.5px var(--ink); }
.split i { display: block; height: 100%; }
.prio { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.prio .pn { font-size: 34px; font-weight: 700; font-stretch: 112%; line-height: 1; color: var(--blue); }
.prio > div { display: flex; flex-direction: column; gap: 6px; }
.prio b { font-size: 18px; }
.other, .teamlist { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.escgrid { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 8px 16px; align-items: center; max-width: 640px; }
.escgrid input { min-height: 44px; text-align: right; }
.road { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.road > div { display: flex; flex-direction: column; gap: 8px; border-top: 1.5px solid var(--ink); padding-top: 10px; }
.road ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.doc.lock { align-items: flex-start; }

/* consultant */
.shops { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.shoprow { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 180px 170px; gap: 16px; align-items: center; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 14px 4px; text-align: left; min-height: 64px; }
.shoprow:hover .sr-name b { color: var(--blue); }
.sr-name { display: flex; flex-direction: column; }
.sr-name b { font-size: 17px; }
.minirail { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.minirail i { height: 6px; background-image: radial-gradient(circle, var(--line) 34%, transparent 38%); background-size: 6px 6px; }
.minirail i.done { background: var(--ink); }
.minirail i.cur { background: var(--blue); }
.sr-stage { font-size: 14px; color: var(--muted); }

/* ================= smaller screens ================= */
@media (max-width: 960px) {
  .cols, .cols.wide-left, .read, .check { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid3 { grid-template-columns: 1fr 1fr; }
  .stages ol { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 6px; }
  .stg { grid-template-columns: auto; min-width: 150px; border: 1px solid var(--line); border-radius: 10px; }
  .stg .gate, .stg i { display: none; }
}
@media (max-width: 640px) {
  .desk-head { padding: 12px 16px; gap: 12px; }
  .desk-mark svg { height: 24px; }
  .desk-me { width: 100%; margin-left: 0; justify-content: space-between; }
  .rail { padding: 12px 16px 0; }
  .r-t, .r-n { display: none; }
  .r-link { padding-bottom: 0; }
  .r-dot { width: 28px; height: 28px; margin: -4px 0 0; }
  .rail-now { display: block; }
  .desk { padding: 20px 16px 96px; }
  .card { padding: 16px; }
  .grid3, .addperson, .f-grid, .road { grid-template-columns: 1fr; }
  .bb { grid-template-columns: minmax(0, 1fr) 90px; gap: 6px 10px; }
  .bb-l { grid-column: 1 / -1; }
  .waiting li { grid-template-columns: minmax(0, 1fr) 80px; gap: 6px 10px; }
  .waiting .who { grid-column: 1 / -1; flex-direction: row; gap: 8px; align-items: baseline; }
  .brow { grid-template-columns: 1fr; gap: 6px; }
  .brow .lt { text-align: left; }
  .shoprow { grid-template-columns: 1fr; gap: 8px; }
  .next .btn.big { width: 100%; min-width: 0; }
  .escgrid { grid-template-columns: 1fr; }
  .doc { padding: 24px 18px; }
  .thr { grid-template-columns: 1fr 56px; }
  .thr input { grid-column: 1 / -1; grid-row: 2; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ================= print: the report only ================= */
@media print {
  @page { size: A4; margin: 16mm; }
  body { background: #fff; --bg: #fff; --card: #fff; --ink: #12171C; --muted: #56606A; --line: #D5DADE; --blue: #0A5FA0; --tint: #EEF2F5; --dot: 5px; }
  .desk-head, .rail, .page-head, .rtabs, .next, .flash, .banner, .danger-zone, .undo, .ph-foot, .link { display: none !important; }
  .desk { padding: 0; max-width: none; }
  .doc { border: 0; padding: 0; max-width: none; }
  .solid, .ht, .hatch, .split i { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .prio, .road > div { break-inside: avoid; }
}
