/* Decision Inbox v0 — the grey-box screens from Design step 3, as shipped.
   No colour carries meaning; every target ≥ 44 px; 390 px first. */
:root {
  --ink: #111111; --ink-2: #333333; --ink-3: #555555; --line: #bbbbbb; --line-2: #dddddd;
  --ground: #ffffff; --ground-2: #f2f2f2; --ground-3: #fafafa; --disabled: #eeeeee; --disabled-ink: #777777;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ground); color: var(--ink); font: 16px/1.4 system-ui, -apple-system, "Helvetica Neue", sans-serif; -webkit-text-size-adjust: 100%; }
body { padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.app { max-width: 480px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
button, .btn { font: inherit; }

.header { padding: 20px 20px 12px; display: flex; justify-content: space-between; align-items: baseline; }
.header h1 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.5px; }
.header .meta { font-size: 13px; color: var(--ink-3); }

.tabs { margin: 0 20px 14px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1.5px solid #cccccc; border-radius: 10px; overflow: hidden; }
.tabs button { height: 44px; border: 0; background: var(--ground); color: var(--ink); font-size: 14px; font-weight: 500; }
.tabs button + button { border-left: 1.5px solid #cccccc; }
.tabs button[aria-current="page"] { background: var(--ink); color: #ffffff; font-weight: 600; }

.banner { margin: 0 20px 10px; padding: 10px 12px; border: 1.5px solid var(--ink); border-radius: 10px; font-size: 13px; background: var(--ground-2); }
.banner.stopped { background: var(--ink); color: #ffffff; border-color: var(--ink); padding: 14px; border-radius: 12px; }
.banner.stopped strong { display: block; font-size: 15px; margin-bottom: 6px; }
.banner.stopped p { margin: 0; color: #dddddd; }

.list { padding: 0 20px 24px; display: flex; flex-direction: column; gap: 12px; }
.card { border: 1.5px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--ground); }
.card.sitting { background: var(--ground-3); border-color: #cccccc; }
.card.failed { border-color: var(--ink); }
.card.stale { opacity: 0.6; }
.kind { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; letter-spacing: 0.6px; text-transform: uppercase; color: var(--ink-3); }
.kind b { font-weight: 700; }
.chip { border: 1.5px solid var(--line); border-radius: 6px; padding: 1px 6px; text-transform: none; letter-spacing: 0; }
.title { font-size: 16px; font-weight: 600; line-height: 1.3; margin: 0; }
.title button { all: unset; cursor: pointer; }
.context { font-size: 13px; color: #444444; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 13px; white-space: pre-line; color: #222222; }
.row { display: grid; gap: 8px; margin-top: 4px; }
.row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.row.main-aux { grid-template-columns: 1fr auto auto; align-items: center; }
.btn { height: 44px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--ground); color: var(--ink); font-size: 14px; font-weight: 500; padding: 0 12px; }
.btn.primary { border-color: var(--ink); background: var(--ink); color: #ffffff; font-weight: 600; }
.btn.outline { border-color: var(--ink); font-weight: 600; }
.btn:disabled { border-color: #cccccc; background: var(--disabled); color: var(--disabled-ink); }
.btn.big { height: 50px; border-radius: 12px; font-size: 16px; }
.note-text { display: flex; align-items: center; justify-content: center; height: 44px; font-size: 13px; color: var(--ink-3); }

.section-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--ink-3); }
.table { border: 1.5px solid #cccccc; border-radius: 12px; }
.table > div { padding: 12px 14px; min-height: 44px; display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 14px; }
.table > div + div { border-top: 1.5px solid var(--line-2); }
.table .v { color: var(--ink-2); text-align: right; }

.empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 0 40px; text-align: center; }
.empty h2 { margin: 0; font-size: 20px; }
.empty p { margin: 0; font-size: 14px; color: var(--ink-3); }

.detail { padding: 0 20px; display: flex; flex-direction: column; gap: 12px; }
.detail h1 { margin: 0; font-size: 21px; font-weight: 700; line-height: 1.25; letter-spacing: -0.3px; }
.facts { display: grid; grid-template-columns: 96px 1fr; gap: 4px 10px; font-size: 13px; color: var(--ink-2); }
.facts span:nth-child(odd) { color: var(--ink-3); }
.box { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.box .h { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--ink-3); }
.back { display: flex; align-items: center; gap: 6px; height: 44px; font-size: 15px; background: none; border: 0; color: var(--ink); padding: 0; }

.sheet-wrap { position: fixed; inset: 0; background: rgba(0,0,0,0.35); display: flex; align-items: flex-end; z-index: 10; }
.sheet { width: 100%; max-width: 480px; margin: 0 auto; background: var(--ground); border-radius: 24px 24px 0 0; padding: 12px 20px calc(34px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.grab { width: 40px; height: 4px; border-radius: 2px; background: #cccccc; align-self: center; }
.sheet-h { display: flex; justify-content: space-between; align-items: center; }
.sheet-h h2 { margin: 0; font-size: 18px; }
.sheet-h button { height: 44px; background: none; border: 0; color: var(--ink-3); font-size: 14px; }
.hint { font-size: 12px; color: var(--ink-3); border-left: 2px solid #cccccc; padding-left: 10px; }
label { font-size: 13px; font-weight: 600; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; }
.counter { font-size: 12px; color: var(--ink-3); }
textarea, input[type="date"] { width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 15px; resize: none; background: var(--ground); color: var(--ink); }
input[type="date"] { height: 44px; }
.fine { font-size: 12px; color: var(--ink-3); text-align: center; }
.foot { padding: 14px 20px calc(34px + env(safe-area-inset-bottom)); border-top: 1.5px solid var(--line-2); display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.signin { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 0 40px; text-align: center; }
.err { font-size: 13px; color: var(--ink); }
.sr { position: absolute; left: -9999px; }
