/* jev.36nine.ai: layout only. Every colour, size and rule is a token from the vendored 36nine system. */
@font-face { font-family: "Exo 2"; src: url("/static/fonts/Exo2-VariableFont_wght.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
html { font-size: 16px; }
body { margin: 0; }
.shell { flex: 1; display: grid; grid-template-columns: 220px 1fr; min-height: 0; }
.side { background: var(--bg); border-right: 1px solid var(--border); padding: var(--space-6) 0; display: flex; flex-direction: column; gap: var(--space-6); }
.side__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.side__link { display: block; padding: 10px var(--space-6); min-height: 44px; line-height: 24px; font-size: var(--text-sm); font-weight: var(--fw-semibold); color: var(--fg-body); text-decoration: none; border-left: 2px solid transparent; }
.side__link:hover { background: var(--bg-muted); color: var(--fg); }
.side__link.is-active { color: var(--fg); border-left-color: var(--accent); background: var(--bg-muted); }
.side__link:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.side__note { margin: 0; padding: 0 var(--space-6); font-size: var(--text-xs); color: var(--fg-subtle); line-height: var(--lh-normal); }
.main { min-width: 0; }
.wrap { max-width: 1280px; }
.page-hd { display: flex; flex-direction: column; gap: var(--space-2); }
.h1 { margin: 0; font-size: var(--text-3xl); font-weight: var(--fw-bold); letter-spacing: var(--tracking-tight); line-height: 1.1; }
.lede { margin: 0; max-width: 70ch; font-size: var(--text-sm); color: var(--fg-body); line-height: var(--lh-normal); }
.pad { padding: var(--space-6); }
.mt { margin-top: var(--space-4); }
.muted { color: var(--fg-subtle); }
.nowrap { white-space: nowrap; }
.chart { position: relative; height: 220px; }
.read { margin: var(--space-3) 0 0; font-size: var(--text-xs); color: var(--fg-body); line-height: var(--lh-normal); }
.empty { padding: var(--space-6); font-size: var(--text-sm); color: var(--fg-subtle); }
.empty a { color: var(--accent); }
.crit { font-size: var(--text-xs); color: var(--fg-body); line-height: var(--lh-normal); }
.crit b { color: var(--fg); font-weight: var(--fw-semibold); }
.tbl .msg { max-width: 38ch; font-size: var(--text-xs); line-height: var(--lh-normal); overflow-wrap: anywhere; }
.tbl .msg b { font-weight: var(--fw-semibold); }
.tbl .num { font-variant-numeric: tabular-nums; }
.tbl a { color: var(--accent); }
.tbl--msgs th:nth-child(1), .tbl--msgs td:nth-child(1) { width: 8ch; }
.ans { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.ans__item { display: inline-flex; align-items: baseline; gap: 4px; font-size: var(--text-xs); white-space: nowrap; }
.ans__q { color: var(--fg-muted); text-transform: uppercase; font-size: 10px; letter-spacing: var(--tracking-wide); font-weight: var(--fw-bold); }
.ans__v { font-weight: var(--fw-semibold); color: var(--fg); }
.ans__c { color: var(--fg-subtle); font-size: 10px; }
.num { font-variant-numeric: tabular-nums; }
.stack-sm { display: flex; flex-direction: column; gap: var(--space-4); }
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field__label { font-size: 10px; font-weight: var(--fw-bold); letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--fg-muted); }
.input { width: 100%; font-family: var(--font-sans); font-size: var(--text-sm); padding: 10px 12px; border: 1px solid var(--border-strong); background: var(--bg); color: var(--fg); border-radius: 0; }
textarea.fc-textarea.mono { font-family: var(--font-mono); font-size: var(--text-xs); line-height: 1.5; }
.input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.grade { display: flex; flex-direction: column; gap: var(--space-4); }
.grade__meta { font-size: var(--text-xs); color: var(--fg-subtle); }
.grade__ctx { font-size: var(--text-xs); line-height: var(--lh-normal); border-left: 1px solid var(--border); padding-left: var(--space-4); }
.grade__msg { overflow-wrap: anywhere; margin: 0; padding: var(--space-4); background: var(--bg-muted); border: 1px solid var(--border); font-size: var(--text-sm); line-height: var(--lh-normal); }
.grade__msg b { font-weight: var(--fw-semibold); }
.verdict { display: flex; gap: var(--space-4); white-space: nowrap; }
.verdict label { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-xs); min-height: 44px; cursor: pointer; }
.grade__actions { display: flex; gap: var(--space-4); align-items: center; }
.grade__actions .fc-input { max-width: 48ch; }
.dv-crumbs { font-size: var(--text-xs); }
.dv-crumbs__list { list-style: none; display: flex; gap: var(--space-2); margin: 0; padding: 0; }
.dv-crumbs a { color: var(--accent); }
.dv-crumbs__sep { color: var(--fg-muted); }
a.dv-tab { text-decoration: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 1px solid var(--border); padding: 0; gap: 0; }
  .side__list { flex-direction: row; overflow-x: auto; }
  .side__link { border-left: 0; border-bottom: 2px solid transparent; white-space: nowrap; }
  .side__link.is-active { border-bottom-color: var(--accent); }
  .side__note { display: none; }
  .appbar, .main, .footer { padding-left: var(--space-4); padding-right: var(--space-4); }
  .appmeta { display: none; }
  .tbl .msg { max-width: 60vw; }
  .verdict { flex-wrap: wrap; }
  .grade__actions { flex-direction: column; align-items: stretch; }
  .grade__actions .fc-input { max-width: none; }
}
/* phones: grid children may shrink below their content, canvases follow their box */
.grid > * { min-width: 0; }
.chart canvas { max-width: 100%; }
.shell, .main, .wrap, .surface { min-width: 0; max-width: 100%; }
body { overflow-x: hidden; }
/* tables scroll sideways inside their own wrapper on narrow screens, with a visible edge hint */
.tblwrap { position: relative; overflow-x: auto; max-width: 100%; }
@media (max-width: 900px) {
  .tblwrap::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 28px; pointer-events: none;
    background: linear-gradient(to right, transparent, var(--bg)); }
  .tblwrap .tbl { min-width: 640px; }
}
/* landing page: intro on the left, the framed sign-in on the right */
.landing__main { display: flex; align-items: center; }
.landing__grid { width: 100%; max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--space-8); align-items: start; }
.landing__intro { display: flex; flex-direction: column; gap: var(--space-4); }
.landing__h1 { font-size: var(--text-4xl); max-width: 16ch; }
.landing__facts { margin-top: var(--space-2); }
.landing__login { padding: var(--space-6); }
.landing__error { margin: 0 0 var(--space-4); padding: var(--space-3) var(--space-4); font-size: var(--text-xs); color: var(--status-danger); background: var(--status-danger-bg); border: 1px solid var(--status-danger-edge); }
.side__logout { margin-top: auto; padding: 0 var(--space-6); }
.side__logout .btn { width: 100%; justify-content: center; }
@media (max-width: 900px) {
  .landing__grid { grid-template-columns: 1fr; }
  .landing__h1 { font-size: var(--text-3xl); }
}
.badge { white-space: nowrap; }
/* routine tab: four summary panels and the per-question table */
.panels .panel { display: flex; flex-direction: column; gap: var(--space-3); min-height: 200px; }
.panel__big.accent { color: var(--accent); }
.panel__big { font-size: var(--text-3xl); font-weight: var(--fw-bold); letter-spacing: var(--tracking-tight); line-height: 1; }
.panel__of { font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--fg-subtle); }
.panel__sub { font-size: var(--text-xs); color: var(--fg-body); }
.panel__note { margin: auto 0 0; font-size: var(--text-xs); color: var(--fg-subtle); line-height: var(--lh-normal); }
.panel__kv { display: grid; grid-template-columns: auto 1fr; gap: 4px var(--space-4); margin: 0; font-size: var(--text-xs); }
.panel__kv dt { color: var(--fg-muted); } .panel__kv dd { margin: 0; text-align: right; color: var(--fg); font-weight: var(--fw-semibold); }
.panel__kv--2 { grid-template-columns: auto 1fr; }
.signals { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3) var(--space-4); }
.signal { display: flex; flex-direction: column; gap: 2px; }
.signal__k { font-size: 10px; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--fg-muted); font-weight: var(--fw-bold); }
.signal__n { font-size: var(--text-2xl); font-weight: var(--fw-bold); line-height: 1.1; color: var(--accent); }
.signal__p { font-size: var(--text-xs); color: var(--fg-subtle); }
.ubars { display: flex; flex-direction: column; gap: var(--space-2); }
.ubar { display: grid; grid-template-columns: 10ch 1fr 3ch; align-items: center; gap: var(--space-2); font-size: var(--text-xs); }
.ubar__k { color: var(--fg-body); white-space: nowrap; }
.ubar__track { display: block; height: 12px; background: var(--bg-muted); border: 1px solid var(--border); }
.ubar__fill { display: block; height: 100%; background: var(--s-300); }
.ubar__fill--1 { background: var(--s-500); }
.ubar__fill--2 { background: var(--s-700); }
.ubar__fill--3 { background: var(--status-danger); }   /* "Now" is a genuinely adverse threshold, the one red the system allows */
.ubar__n { text-align: right; }
.yn { font-weight: var(--fw-semibold); color: var(--fg-subtle); }
.yn--yes { color: var(--accent); }
.yn__p { font-size: 10px; color: var(--fg-muted); }
.ucells { display: inline-flex; gap: 2px; vertical-align: middle; margin-right: 6px; }
.ucell { width: 5px; height: 12px; background: var(--bg-muted); border: 1px solid var(--border); }
.ucell.on { background: var(--accent); border-color: var(--accent); }
.ucells--3 .ucell.on { background: var(--status-danger); border-color: var(--status-danger); }
.tbl--jev { font-size: var(--text-xs); }
.tbl--jev .msg { min-width: 30ch; max-width: 40ch; }
.fc-field--search { min-width: 22ch; }
.card-hd .fc-field--search { margin: 0; }
@media (max-width: 900px) { .signals { grid-template-columns: 1fr 1fr; } .panels .panel { min-height: 0; } }
.shell > * { min-width: 0; }
.side { min-width: 0; }
