@font-face {
  font-family: GMon;
  src: url("../fonts/geist-mono-light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: GMon;
  src: url("../fonts/geist-mono-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: GMon;
  src: url("../fonts/geist-mono-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: GMon;
  src: url("../fonts/geist-mono-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
  color-scheme: light dark;
  --bg: #e9eeea;
  --side: #dde5df;
  --raise: #f6f8f6;
  --raise-2: #e2eae4;
  --active: #f6f8f6;
  --line: #cdd8d1;
  --line-strong: #8da197;
  --fg: #16201e;
  --muted: #566b63;
  --accent: #1f5745;
  --field: rgba(22, 32, 30, 0.05);
  --field-focus: rgba(22, 32, 30, 0.09);
  --gap: 1.25rem;
  --pad: 1.4rem;
  --sans: Helvetica, "Helvetica Neue", Arial, sans-serif;
  --mono: GMon, ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 15px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111917;
    --side: #16201e;
    --raise: #1c2926;
    --raise-2: #263733;
    --active: #263733;
    --line: #2c3f3a;
    --line-strong: #486158;
    --fg: #e3e8e4;
    --muted: #8fa39c;
    --accent: #a9d1c1;
    --field: rgba(227, 232, 228, 0.06);
    --field-focus: rgba(227, 232, 228, 0.1);
  }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2 { font-family: var(--sans); font-weight: 400; }
h1 { font-size: clamp(2.3rem, 6cqi, 3.8rem); line-height: 1; letter-spacing: -0.015em; text-wrap: balance; }
h2 { font-size: 1.45rem; line-height: 1.15; letter-spacing: -0.005em; }
a { color: inherit; text-decoration: none; }
em { font-style: normal; }
strong, b { font-weight: 500; }
::selection { background: var(--fg); color: var(--bg); }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.kicker,
.brand span,
.kpi > span,
.field > span,
.column > header,
.cost-row > label > span,
.milestone > header > span:not(.pill),
.attention > span,
.facts dt,
table.ledger th {
  font-size: 0.72rem;
  line-height: 1.35;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.quiet, .fine, .lede, .model { color: var(--muted); }
.sub { display: block; margin-top: 0.2rem; color: var(--muted); font-size: 0.8rem; }
.neg { font-weight: 700; }
.notes { white-space: pre-wrap; }
.nowrap { white-space: nowrap; }
.clip { display: inline-block; max-width: 13ch; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

.facts a,
.panel-head a,
.milestone a,
.result-list strong,
table.ledger td a,
.empty-hero a {
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 0.22em;
}
.facts a:hover,
.panel-head a:hover,
.milestone a:hover,
.result-list a:hover strong,
table.ledger td a:hover,
.empty-hero a:hover { text-decoration-color: currentColor; }

/* ---------- Shell ---------- */

.shell { display: grid; grid-template-columns: 15.5rem minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.75rem 1.25rem 1.4rem;
  background: var(--side);
  border-right: 1px solid var(--line);
  overflow-y: auto;
}
.brand { padding: 0 0.75rem; }
.brand strong { display: block; font-family: var(--sans); font-weight: 400; font-size: 2.1rem; line-height: 1; letter-spacing: -0.015em; }
.brand span { display: block; margin-top: 0.55rem; color: var(--muted); }
.search { display: block; }
.nav { display: flex; flex-direction: column; }
.nav a { display: flex; align-items: baseline; gap: 0.75ch; padding: 0.6rem 0.75rem; border-top: 1px solid var(--line); }
.nav a:last-child { border-bottom: 1px solid var(--line); }
.nav a::before { content: "+"; color: var(--muted); }
.nav a:hover { background: var(--field); }
.nav a.active { background: var(--active); }
.nav a.active::before { color: var(--fg); }
.nav a.active::after { content: "++++"; margin-left: auto; color: var(--muted); font-variant-ligatures: none; }
.side-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 1.1rem 0.75rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}
.side-foot a, .side-foot button { color: var(--fg); }
.side-foot a:hover, .side-foot button:hover { text-decoration: underline; text-underline-offset: 0.22em; }
.side-foot button { min-height: 0; padding: 0; border: 0; background: none; }
.clock { font-variant-numeric: tabular-nums; }

.main { container: main / inline-size; min-width: 0; padding: 2.25rem 2.5rem 5rem; }
#view { max-width: 84rem; }

/* ---------- Page head ---------- */

.back { display: inline-flex; gap: 0.75ch; margin-bottom: 1.1rem; color: var(--muted); font-size: 0.85rem; }
.back::before { content: "<-"; }
.back:hover { color: var(--fg); }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.25rem 2rem; margin-bottom: 1.75rem; }
.page-head > div:first-child { flex: 1 1 24rem; min-width: 0; }
.page-head .row-actions { flex: 0 1 auto; max-width: 100%; }
.kicker { margin-bottom: 0.7rem; }
.kicker::before { content: "++++++++++"; margin-right: 1ch; color: var(--muted); letter-spacing: 0; font-variant-ligatures: none; }
.model { max-width: 62ch; margin-top: 0.9rem; }
.model .pill { margin-right: 0.6rem; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.row-actions.more { justify-content: space-between; margin: -0.25rem 0 var(--gap); }
.sync-line { display: flex; gap: 0.75ch; max-width: 78ch; margin: -0.55rem 0 1.4rem; color: var(--muted); font-size: 0.85rem; }
.sync-line::before { content: "+"; }
.sync-line[data-tone="warn"]::before { content: "~"; color: var(--fg); }
.sync-line code { color: var(--fg); font: inherit; }

/* ---------- Controls ---------- */

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75ch;
  min-height: 2.65rem;
  padding: 0.5rem 0.9rem;
  border: 0;
  border-top: 1px dashed var(--line-strong);
  border-bottom: 1px dashed var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
}
button:hover, .button:hover { background: var(--field-focus); }
button:disabled { opacity: 0.5; cursor: default; }
button.primary, .button.primary, button.danger {
  border: 1px solid var(--fg);
  background: var(--fg);
  color: var(--bg);
}
button.primary::after, .button.primary::after { content: "->"; }
button.danger::before { content: "!"; }
button.primary:hover, .button.primary:hover, button.danger:hover { background: var(--accent); border-color: var(--accent); }
.quiet-button { padding: 0.5rem; border: 0; color: var(--muted); }
.quiet-button:hover { background: none; color: var(--fg); text-decoration: underline; text-underline-offset: 0.22em; }

.seg { display: inline-flex; border-top: 1px dashed var(--line-strong); border-bottom: 1px dashed var(--line-strong); }
.seg button { min-height: calc(2.65rem - 2px); border: 0; color: var(--muted); }
.seg button.on { background: var(--active); color: var(--fg); }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: var(--gap); }
.chips button { min-height: 2.3rem; padding: 0.35rem 0.8rem; border: 1px solid var(--line); color: var(--muted); }
.chips button.on { border-color: var(--line-strong); background: var(--active); color: var(--fg); }

input, select, textarea {
  width: 100%;
  min-width: 0;
  padding: 0.6rem 0.75rem;
  border: 0;
  border-bottom: 1px dashed var(--line-strong);
  border-radius: 0;
  background-color: var(--field);
  color: var(--fg);
  font: inherit;
  line-height: 1.4;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
input, select { height: 2.65rem; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, select:focus, textarea:focus { border-bottom: 1px solid var(--fg); background-color: var(--field-focus); }
textarea { min-height: 5.5rem; resize: vertical; }
select {
  padding-right: 2.2rem;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: right calc(0.85rem + 5px) center, right 0.85rem center;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}
.page-head select { width: auto; min-width: 10rem; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6ch;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.3;
  letter-spacing: 0.02em;
  white-space: nowrap;
  vertical-align: top;
}
.pill[data-tone="good"], .pill[data-tone="info"] { border-color: var(--line-strong); color: var(--accent); }
.pill[data-tone="good"]::before, .pill[data-tone="info"]::before { content: "+"; }
.pill[data-tone="warn"] { border-color: var(--line-strong); background: var(--raise-2); color: var(--fg); }
.pill[data-tone="warn"]::before { content: "~"; }
.pill[data-tone="bad"] { border-color: var(--fg); background: var(--fg); color: var(--bg); }
.pill[data-tone="bad"]::before { content: "!"; }
.inline { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.6rem; }

/* ---------- Tiles ---------- */

.kpi, .panel, .milestone, .column, .banner { background: var(--raise); }
.panel { container: panel / inline-size; padding: var(--pad); margin-bottom: var(--gap); }
.panel > * + * { margin-top: 1.1rem; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.panel-head a { font-size: 0.82rem; white-space: nowrap; }
.sheet { padding-top: 0.75rem; padding-bottom: 0.9rem; }

.split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: var(--gap); align-items: start; }
.split.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.col { min-width: 0; }

.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.75rem;
  padding: 1rem var(--pad);
  margin-bottom: 2rem;
}
.banner p { max-width: 64ch; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.kpis.compact { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.kpi { display: flex; flex-direction: column; gap: 0.55rem; padding: 1.2rem var(--pad) 1.3rem; }
.kpi > span { color: var(--muted); }
.kpi > strong { font-family: var(--sans); font-weight: 400; font-size: clamp(1.8rem, 3.6cqi, 2.9rem); line-height: 1.05; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.kpis.compact > .kpi > strong { font-size: clamp(1.6rem, 3.4cqi, 2.4rem); }
.kpi > em { color: var(--muted); font-size: 0.82rem; line-height: 1.4; }
.kpi.bad > em { color: var(--fg); }
.kpi.bad > em::before { content: "! "; }

/* ---------- Rows inside tiles ---------- */

.stack { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; }
.stack-row {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
  align-items: baseline;
  padding: 0.62rem 0;
  border-top: 1px solid var(--line);
}
.stack-row > strong { padding-left: 1.25rem; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stack-row > em { color: var(--muted); font-size: 0.8rem; }
.stack-row > em:not(:empty) { padding-left: 1rem; }
.stack-row.total > span, .stack-row.total > strong { font-weight: 700; }

.rows { display: flex; flex-direction: column; }
.attention {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.2rem 1.25rem;
  align-items: baseline;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
}
.attention > span { grid-column: 2; grid-row: 1; display: inline-flex; gap: 0.75ch; color: var(--muted); white-space: nowrap; }
.attention > span::before { content: "+"; }
.attention[data-tone="warn"] > span::before { content: "~"; }
.attention[data-tone="warn"] > span, .attention[data-tone="bad"] > span { color: var(--fg); }
.attention[data-tone="bad"] > span::before { content: "!"; }
.attention[data-tone="bad"] > span { font-weight: 700; }
.attention > em { grid-column: 1 / -1; color: var(--muted); font-size: 0.85rem; }
.attention:hover > strong { text-decoration: underline; text-underline-offset: 0.22em; }

.result-list { display: flex; flex-direction: column; }
.result-list a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.2rem 1.25rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
}
.result-list span { color: var(--muted); font-size: 0.85rem; }

.bars { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 1.25rem; }
.bar-row {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
  align-items: baseline;
  padding: 0.62rem 0;
  border-top: 1px solid var(--line);
}
.bar-row > span > em { margin-left: 0.5ch; color: var(--muted); }
.bar-row > strong { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar {
  position: relative;
  display: block;
  width: 100%;
  width: round(down, 100%, 1ch);
  height: 1.5em;
  overflow: hidden;
  color: var(--line-strong);
  white-space: nowrap;
  font-variant-ligatures: none;
}
.bar::before { content: "································································································································"; }
.bar > i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w, 0%);
  width: round(up, var(--w, 0%), 1ch);
  overflow: hidden;
  background: var(--raise);
  color: var(--fg);
  font-style: normal;
}
.bar > i::before { content: "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"; }

.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr)); gap: 1.2rem 1.75rem; }
.facts dt { color: var(--muted); }
.facts dd { margin-top: 0.35rem; overflow-wrap: anywhere; }

.milestones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.milestone { display: flex; flex-direction: column; align-items: flex-start; gap: 0.7rem; padding: var(--pad); }
.milestone > header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; }
.milestone > header > span:not(.pill) { color: var(--muted); }
.milestone > strong { font-family: var(--sans); font-weight: 400; font-size: 2.3rem; line-height: 1; letter-spacing: -0.015em; }
.milestone > p { color: var(--muted); font-size: 0.88rem; }
.milestone.missing { background: transparent; border: 1px dashed var(--line-strong); }
.milestone .field { width: 100%; margin-bottom: 0; }

.assign { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 1.25rem; }
.assign .field { margin-bottom: 0; }

/* ---------- Board ---------- */

.board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.board.leads { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.column { min-height: 7rem; padding: 1.05rem 1.1rem 0.4rem; }
.column.over { outline: 1px dashed var(--fg); outline-offset: 3px; }
.column > header { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: 0.85rem; color: var(--muted); }
.column > .quiet { padding: 0.8rem 0 0.9rem; border-top: 1px dashed var(--line-strong); font-size: 0.85rem; }
.card { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.95rem 0 1.05rem; border-top: 1px dashed var(--line-strong); cursor: grab; }
.card.dragging { opacity: 0.35; }
.card-title { font-family: var(--sans); font-size: 1.2rem; line-height: 1.12; letter-spacing: -0.005em; }
.card-title:hover { text-decoration: underline; text-underline-offset: 0.18em; }
.card-meta { color: var(--muted); font-size: 0.85rem; line-height: 1.4; }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.4rem 0.75rem; margin-top: 0.15rem; }
.card-foot > strong { font-variant-numeric: tabular-nums; }
.card-foot > .quiet { font-size: 0.8rem; }
.card-marks { display: flex; flex-wrap: wrap; gap: 0.1rem 1.5ch; color: var(--muted); font-size: 0.78rem; line-height: 1.4; }
.card-marks b { color: var(--fg); font-weight: 400; }

/* ---------- Tables ---------- */

.table-wrap { margin-inline: -0.9rem; overflow-x: auto; }
table.ledger { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.ledger th { padding: 0.6rem 0.9rem 0.7rem; border-bottom: 1px solid var(--line-strong); color: var(--muted); font-weight: 400; text-align: left; white-space: nowrap; }
table.ledger td { padding: 0.85rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.ledger tbody tr:last-child td { border-bottom: 0; }
table.ledger th.num, table.ledger td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.ledger tr[data-href] { cursor: pointer; }
table.ledger tr[data-href]:hover td { background: var(--raise-2); }
table.ledger td.empty-cell { padding: 1.6rem 0.9rem; color: var(--muted); }

/* ---------- Contractor cost editor ---------- */

.cost-list { display: flex; flex-direction: column; }
.cost-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem 0.75rem;
  align-items: end;
  padding: 1.1rem 0 1.2rem;
  border-top: 1px dashed var(--line-strong);
}
.cost-row > label { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.cost-row > label > span { color: var(--muted); }
.cost-what, .cost-who { grid-column: span 2; }
.cost-row > button { justify-self: start; }
.cost-list + .row-actions { padding-top: 1.2rem; border-top: 1px solid var(--line); }

@container panel (min-width: 60rem) {
  .cost-row {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.8fr) minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1.5fr) auto;
    padding: 0.35rem 0;
    border-top: 0;
  }
  .cost-what, .cost-who { grid-column: auto; }
  .cost-row:not(:first-child) > label > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .cost-list + .row-actions { margin-top: 0.9rem; }
}

/* ---------- Forms, modal, login ---------- */

.field { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; margin-bottom: 1.15rem; }
.field > span { color: var(--muted); }
.field > small { color: var(--muted); font-size: 0.78rem; line-height: 1.45; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.25rem; }
.form-grid .field { grid-column: 1 / -1; }
.form-grid .field.half { grid-column: span 1; }
.form-error { display: flex; gap: 0.75ch; padding: 0.75rem 0.95rem; margin-bottom: 1.25rem; background: var(--raise-2); border-left: 3px solid var(--fg); }
.form-error::before { content: "!"; font-weight: 700; }

.modal-back {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 2rem;
  overflow-y: auto;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(3px);
}
.modal {
  display: flex;
  flex-direction: column;
  width: min(36rem, 100%);
  max-height: calc(100vh - 4rem);
  overflow: hidden;
  background: var(--raise);
  border: 1px solid var(--line-strong);
}
.modal.wide { width: min(50rem, 100%); }
.modal > h2 { padding: 1.8rem 1.9rem 1.3rem; font-size: 1.9rem; line-height: 1.05; }
.modal > p { padding: 0 1.9rem 1.5rem; color: var(--muted); }
.modal > .form-error { margin: 0 1.9rem 1.3rem; }
.modal > .form-grid { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0.2rem 1.9rem 0.5rem; }
.modal > .row-actions { justify-content: flex-end; padding: 1.15rem 1.9rem 1.3rem; border-top: 1px solid var(--line); }

#toast { position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 40; }
.toast { display: flex; gap: 0.75ch; padding: 0.8rem 1.15rem; background: var(--fg); color: var(--bg); }
.toast.bad::before { content: "!"; font-weight: 700; }

.login { min-height: 100vh; display: grid; align-content: center; padding: 3rem clamp(1.5rem, 8vw, 7rem); }
.login form { width: min(27rem, 100%); }
.login h1 { font-size: clamp(3.2rem, 9vw, 5rem); }
.login .lede { margin: 0.9rem 0 2rem; }
.login button { margin-top: 0.4rem; }
.login .fine { margin-top: 2rem; font-size: 0.85rem; }
.login .clock { margin-top: 0.5rem; color: var(--muted); font-size: 0.82rem; }

.empty-hero { max-width: 46rem; padding-top: 1rem; }
.empty-hero .model { margin-bottom: 1.75rem; }
.empty-hero > p + p { margin-top: 1.25rem; }

/* ---------- Adapting to the space available ---------- */

@container main (max-width: 80rem) {
  .board.leads { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container main (max-width: 66rem) {
  .board { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container panel (max-width: 52rem) {
  .opt { display: none; }
}
@container panel (max-width: 30rem) {
  .opt-s { display: none; }
}
@container panel (max-width: 38rem) {
  .assign { grid-template-columns: minmax(0, 1fr); }
}
@container main (max-width: 56rem) {
  .split, .split.even { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
@container main (max-width: 52rem) {
  .kpis:not(.compact), .kpis.compact:has(> :nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row; }
  .kpis:not(.compact) > .kpi > strong { font-size: 2.3rem; }
}
@container main (max-width: 44rem) {
  .board, .board.leads { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .milestones { grid-template-columns: minmax(0, 1fr); }
  .banner { flex-direction: column; align-items: flex-start; }
  .form-grid .field.half { grid-column: 1 / -1; }
}
@container main (max-width: 28rem) {
  .kpis:not(.compact), .kpis.compact, .kpis.compact:has(> :nth-child(4)), .board, .board.leads { grid-template-columns: minmax(0, 1fr); grid-auto-flow: row; }
}

@media (max-width: 860px) {
  .shell { display: block; }
  .side { position: static; height: auto; gap: 1rem; padding: 1.25rem 1.25rem 1rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .nav { flex-direction: row; flex-wrap: wrap; gap: 0.25rem; }
  .nav a, .nav a:last-child { padding: 0.45rem 0.7rem; border: 0; }
  .nav a.active::after { content: none; }
  .side-foot { flex-direction: row; flex-wrap: wrap; gap: 0.4rem 1.25rem; padding-top: 0.9rem; }
  .side-foot .clock { display: none; }
  .main { padding: 1.5rem 1.25rem 4rem; }
  .modal-back { padding: 1rem; }
  .modal { max-height: calc(100vh - 2rem); }
}
