/* PitDaily. Tokens from the Resources ID logo; contrast checked to WCAG 2.1 AA (see docs/06_UI_UX_Design.md). */
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/plus-jakarta-sans-latin-400-normal.657ceef57276.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/plus-jakarta-sans-latin-600-normal.4f54d6c65e11.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/plus-jakarta-sans-latin-700-normal.bf5e25824fd7.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 800; font-style: normal; font-display: swap; src: url("../fonts/plus-jakarta-sans-latin-800-normal.9e00056eb42e.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/jetbrains-mono-latin-500-normal.a21e038a03f7.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/jetbrains-mono-latin-700-normal.69002db50656.woff2") format("woff2"); }
:root {
  --navy: #19325C; --teal: #06A599; --teal-d: #0E736E; --sky: #579ED6; --orange: #F5A236; --red: #EC3A31;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  /* field (light) */
  --bg: #F4F6F9; --surface: #FFFFFF; --surface-2: #EEF2F7; --line: #D5DCE5; --text: #0F1D33; --muted: #4F5F75;
  --ok: #0E736E; --warn: #9A5B00; --bad: #B4231C; --plan: #19325C; --link: #19325C;
  --ok-bg: #E2F4F2; --warn-bg: #FFF4E2; --bad-bg: #FDECEB;
}
body.cr {
  --bg: #070E1A; --surface: #0D1728; --surface-2: #162338; --line: #1B2A40; --text: #EAF0F7; --muted: #93A4BA; --faint: #7A8CA5;
  --ok: #06A599; --warn: #F5A236; --bad: #FF6B5E; --plan: #7FB6E6; --link: #7FB6E6;
  --ok-bg: rgba(6,165,153,.14); --warn-bg: rgba(245,162,54,.13); --bad-bg: rgba(236,58,49,.13);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; }
a { color: var(--link); }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
.num, td.n, .fig { font-family: var(--mono); font-variant-numeric: tabular-nums; }
td.n, th.n { text-align: right; white-space: nowrap; }
.muted { color: var(--muted); }
.eyebrow { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* shell */
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 10px 24px; background: var(--navy); color: #fff; }
body.cr .top { background: var(--bg); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand img { width: 30px; height: 31px; background: #fff; border-radius: 7px; padding: 3px; }
body.cr .brand img { background: transparent; padding: 0; }
.brand b { font-size: 17px; letter-spacing: -.01em; }
.brand small { display: block; font-size: 10px; letter-spacing: .18em; opacity: .8; font-weight: 700; }
.top nav { display: flex; flex-wrap: wrap; gap: 2px; }
.top nav a { color: inherit; opacity: .85; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: 14px; }
.top nav a.on, .top nav a:hover { opacity: 1; background: rgba(255,255,255,.12); }
.spacer { flex: 1 1 auto; }
.top select { font: inherit; font-size: 14px; color: var(--text); background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 8px; min-height: 36px; }
.who { font-size: 13px; opacity: .9; }
.top form { margin: 0; }
.linkbtn { background: none; border: 0; color: inherit; font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; padding: 6px; }
main.page { max-width: 1440px; margin: 0 auto; padding: 22px 24px 48px; }
.msgs { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 6px; }
.msgs li { padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.msgs li.error { background: var(--bad-bg); border-color: var(--bad); }
.msgs li.success { background: var(--ok-bg); border-color: var(--ok); }
.msgs li.info { background: var(--warn-bg); border-color: var(--warn); }

/* cards and grids */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; }
.c7 { grid-column: span 7; } .c8 { grid-column: span 8; } .c12 { grid-column: span 12; }
@media (max-width: 1100px) { .c3, .c4, .c5 { grid-column: span 6; } .c6, .c7, .c8 { grid-column: span 12; } }
@media (max-width: 700px) { .c3, .c4, .c5, .c6 { grid-column: span 12; } main.page { padding: 16px 12px 40px; } .top { padding: 10px 12px; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; min-width: 0; }
body:not(.cr) .card { box-shadow: 0 1px 2px rgba(15,29,51,.06); }
.card h2 { font-size: 16px; font-weight: 700; margin-top: 2px; }
.card .sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.card.alert { border-color: var(--warn); }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 18px; }
.head h1 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; max-width: 980px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800;
  letter-spacing: .02em; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.chip.ok { background: var(--ok-bg); color: var(--ok); } .chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); } .chip.muted { background: var(--surface-2); color: var(--muted); }
.big { font-family: var(--mono); font-size: 40px; font-weight: 700; letter-spacing: -.04em; line-height: 1.05; }
.mid { font-family: var(--mono); font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.kv { display: grid; grid-template-columns: auto auto; gap: 6px 16px; font-size: 13.5px; }
.kv span:nth-child(odd) { color: var(--muted); } .kv span:nth-child(even) { text-align: right; font-family: var(--mono); }
.ok-t { color: var(--ok); } .warn-t { color: var(--warn); } .bad-t { color: var(--bad); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); align-items: center; }
.legend i { display: inline-block; width: 12px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.legend i.plan { height: 0; border-top: 2px dashed var(--plan); width: 16px; }
.note { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }

/* tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-weight: 700; color: var(--muted); font-size: 12px; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.sub td { background: var(--surface-2); font-weight: 700; }
.scroll { overflow-x: auto; }

/* charts */
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ax { fill: var(--muted); font-family: var(--mono); font-size: 10.5px; }
.chart .val { fill: var(--text); font-family: var(--mono); font-size: 10.5px; }
.chart .val.strong { font-size: 12px; font-weight: 700; }
.chart .lbl { fill: var(--text); font-size: 12px; font-weight: 700; }
.chart .bar.ok { fill: var(--teal); } .chart .bar.warn { fill: var(--orange); } .chart .bar.bad { fill: var(--red); }
.chart .bar.neutral { fill: var(--sky); }
.chart .bar.unv { opacity: .55; }
.chart .nodata { fill: var(--muted); opacity: .5; }
.chart .plan { stroke: var(--plan); stroke-width: 2; stroke-dasharray: 5 4; fill: none; }
.chart .line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.plan { stroke: var(--plan); stroke-dasharray: 6 5; stroke-width: 2; }
.chart .line.actual { stroke: var(--teal); stroke-width: 3.5; }
.chart .line.req { stroke: var(--orange); stroke-dasharray: 2 5; stroke-width: 2.2; }
.chart .line.stock { stroke: var(--orange); }
.chart .dot { fill: var(--text); stroke: var(--surface); stroke-width: 2; }
.chart .dot.stock { fill: var(--orange); }
.chart .plan-t { fill: var(--plan); } .chart .stock-t { fill: var(--orange); }
.chart .track { stroke: var(--surface-2); stroke-width: 2; }
.chart .gap { stroke: var(--orange); stroke-width: 6; stroke-linecap: round; opacity: .6; }
.chart .tick { stroke: var(--plan); stroke-width: 2.5; }
.ring { width: 176px; height: 176px; flex: 0 0 auto; }
.ring .track { stroke: var(--surface-2); } .ring .arc.ok { stroke: var(--teal); } .ring .arc.warn { stroke: var(--orange); }
.ring .arc.bad { stroke: var(--red); } .ring .arc.time { stroke: var(--plan); }
.ring .ring-v { fill: var(--text); font-family: var(--mono); font-size: 30px; font-weight: 700; }
.ring .ring-c { fill: var(--muted); font-size: 11px; font-weight: 600; }
.gauge { position: relative; height: 30px; margin: 8px 0 4px; }
.gauge .tr { position: absolute; left: 0; right: 0; top: 12px; height: 8px; border-radius: 99px; background: var(--surface-2); }
.gauge .fill { position: absolute; left: 0; top: 12px; height: 8px; border-radius: 99px; background: var(--red); }
.gauge .mk { position: absolute; top: 5px; width: 3px; height: 22px; border-radius: 2px; }
.gauge .mk.plan { background: var(--plan); } .gauge .mk.req { background: var(--orange); }

/* buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn.primary { background: var(--teal-d); border-color: var(--teal-d); color: #fff; }
.btn.navy { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn.light { background: #EAF0F7; color: #070E1A; border-color: #EAF0F7; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13.5px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
input.i, select.i, textarea.i { font: inherit; font-size: 16px; color: var(--text); background: var(--surface); border: 1.5px solid var(--line);
  border-radius: 8px; padding: 8px 10px; min-height: 42px; width: 100%; }
input.i.n { font-family: var(--mono); text-align: right; }
input.i:focus, select.i:focus, textarea.i:focus, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--sky); outline-offset: 1px; }
.entry section.card { margin-bottom: 16px; }
.entry section.card > h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.entry h2 small { font-size: 12px; font-weight: 600; color: var(--muted); }
.ftable { width: 100%; border-collapse: separate; border-spacing: 0 6px; font-size: 13px; }
.ftable th { text-align: left; color: var(--muted); font-size: 11.5px; padding: 0 4px; white-space: nowrap; }
.ftable td { padding: 0 4px; vertical-align: middle; }
.ftable td.code { font-weight: 800; white-space: nowrap; }
.ftable input.i, .ftable select.i { min-height: 40px; font-size: 15px; padding: 6px 8px; }
.ftable .w60 { width: 72px; min-width: 72px; } .ftable .w90 { width: 104px; min-width: 104px; } .ftable .w120 { width: 140px; min-width: 140px; }
.ftable td .wide { min-width: 240px; }
.stick { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; border-top: 1px solid var(--line); z-index: 5; }
.status { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.draft-banner { display: none; padding: 10px 14px; border-radius: 10px; background: var(--warn-bg); border: 1px solid var(--warn); margin-bottom: 14px; }
.draft-banner.show { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cal { display: grid; gap: 8px; }
.cal a.day { display: grid; grid-template-columns: 120px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--text); }
.cal a.day:hover { border-color: var(--navy); }
.cal .figs { display: flex; gap: 18px; flex-wrap: wrap; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.cal .figs b { color: var(--text); }
@media (max-width: 700px) { .cal a.day { grid-template-columns: 1fr auto; } .cal .figs { grid-column: 1 / -1; } }
.login { max-width: 400px; margin: 9vh auto; padding: 28px; }
.login img { height: 42px; }
.pill-row { display: flex; gap: 6px; flex-wrap: wrap; }
.pill-row a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-size: 13px; font-weight: 700; color: var(--muted); }
.pill-row a.on { background: var(--surface-2); color: var(--text); border-color: var(--text); }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: 13.5px; margin: 0; }
dl.facts dt { color: var(--muted); } dl.facts dd { margin: 0; }
pre.diff { white-space: pre-wrap; font-family: var(--mono); font-size: 12px; margin: 0; }
