@font-face { font-family: "Bricolage Grotesque"; src: url(/fonts/bricolage-grotesque-latin-wght-normal.woff2) format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url(/fonts/atkinson-hyperlegible-next-latin-wght-normal.woff2) format("woff2"); font-weight: 200 800; font-display: swap; }
:root { --text-ui: .9375rem; --text-ui-dense: .875rem; --nav-width: 256px; --tap: 44px;
  --color-ok-soft: color-mix(in oklch, var(--color-ok) 14%, transparent); --color-sea-soft: color-mix(in oklch, var(--color-sea) 14%, transparent); }
body { font-size: var(--text-ui); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--color-ink); color: var(--color-paper); padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }

/* Shell */
.shell { display: grid; grid-template-columns: var(--nav-width) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow: auto; border-right: 1px solid var(--color-line); background: var(--color-surface); padding: 20px 14px; display: flex; flex-direction: column; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; padding: 0 8px; }
.brand img { width: 28px; height: 28px; }
.brand span b { font-weight: 700; } .brand span i { font-style: normal; font-weight: 300; color: var(--color-ink-2); }
.clientcard { border: 1px solid var(--color-line); border-radius: var(--radius-lg); padding: 10px 12px; background: var(--color-paper); }
.clientcard small { display: block; color: var(--color-ink-3); font-size: var(--text-xs); }
.clientcard strong { display: block; overflow-wrap: anywhere; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: var(--text-label); text-transform: uppercase; letter-spacing: .08em; color: var(--color-ink-3); padding: 6px 12px; }
.nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: var(--tap); padding: 8px 12px; border-radius: var(--radius-md); text-decoration: none; font-weight: 500; position: relative; }
.nav a:hover { background: var(--color-sunk); color: var(--color-ink); }
.nav a[aria-current="page"] { background: var(--color-sunk); font-weight: 700; }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--color-accent); }
.nav a.off { color: var(--color-ink-3); font-weight: 400; }
.badge { background: var(--color-accent); color: var(--color-on-accent); border-radius: 999px; font-size: var(--text-xs); font-weight: 700; padding: 1px 8px; }
.who { margin-top: auto; border-top: 1px solid var(--color-line); padding: 12px 8px 0; font-size: var(--text-xs); color: var(--color-ink-3); overflow-wrap: anywhere; }
main { padding: 32px var(--space-gutter) 96px; max-width: 920px; width: 100%; }
.bottom, .sheet { display: none; }

/* Type + parts */
h1:focus { outline: none; }
h1.page { font-family: var(--font-display); font-weight: 560; font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.25rem); line-height: 1.1; letter-spacing: -.02em; }
h2 { font-family: var(--font-display); font-weight: 560; font-size: 1.25rem; letter-spacing: -.01em; }
.sub { color: var(--color-ink-2); margin-top: 6px; }
.head { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; }
.stack { display: flex; flex-direction: column; gap: 28px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tap); padding: 10px 20px; border-radius: 999px; border: 1px solid var(--color-line-strong); background: transparent; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--color-sunk); color: var(--color-ink); }
.btn.primary { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-on-accent); min-height: 48px; }
.btn.primary:hover { background: var(--color-accent-hover); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.link { border: 0; padding: 4px 6px; min-height: 0; text-decoration: underline; }
.list { border: 1px solid var(--color-line); border-radius: var(--radius-lg); background: var(--color-surface); overflow: hidden; }
.row { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; justify-content: space-between; padding: 14px 16px; border-top: 1px solid var(--color-line); text-decoration: none; min-height: 56px; }
.list > .row:first-child { border-top: 0; }
a.row:hover { background: var(--color-paper); color: var(--color-ink); }
.row .t { font-weight: 600; overflow-wrap: anywhere; flex: 1 1 14em; } .row .m { color: var(--color-ink-3); font-size: var(--text-xs); }
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 2px 10px; font-size: var(--text-xs); font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.chip.ok { background: var(--color-ok-soft); color: var(--color-ok); }
.chip.attn { background: var(--color-accent-soft); color: var(--color-accent-ink); }
.chip.wait { background: var(--color-sea-soft); color: var(--color-sea); }
.chip.off { background: var(--color-sunk); color: var(--color-ink-2); }
.empty { border: 1px dashed var(--color-line-strong); border-radius: var(--radius-lg); padding: 24px; color: var(--color-ink-2); text-align: center; }
.panel { border: 1px solid var(--color-line); border-radius: var(--radius-lg); background: var(--color-surface); padding: 20px; }
.headline { font-family: var(--font-display); font-weight: 560; font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem); line-height: 1.15; letter-spacing: -.02em; }
.headline .need { color: var(--color-accent-ink); }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.tabs a { padding: 6px 14px; border-radius: 999px; text-decoration: none; border: 1px solid var(--color-line); min-height: 36px; display: inline-flex; align-items: center; }
.tabs a[aria-current="page"] { background: var(--color-ink); color: var(--color-paper); border-color: var(--color-ink); }
.msgs { display: flex; flex-direction: column; gap: 12px; }
.msg { border: 1px solid var(--color-line); border-radius: var(--radius-lg); padding: 12px 16px; background: var(--color-surface); max-width: 46em; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.staff { background: var(--color-sea-soft); border-color: transparent; align-self: flex-end; }
.msg .by { font-size: var(--text-xs); color: var(--color-ink-3); margin-bottom: 4px; font-weight: 600; }

/* Forms */
form { display: flex; flex-direction: column; gap: 18px; max-width: 40em; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field legend { font-weight: 600; } .hint { color: var(--color-ink-3); font-size: var(--text-xs); }
input[type=text], input[type=date], select, textarea { border: 1px solid var(--color-line-strong); border-radius: var(--radius-md); background: var(--color-surface); padding: 10px 12px; min-height: var(--tap); width: 100%; }
textarea { min-height: 140px; resize: vertical; }
[aria-invalid="true"] { border-color: var(--color-accent-ink); }
.err { color: var(--color-accent-ink); font-weight: 600; font-size: var(--text-sm); display: flex; gap: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--color-accent); }

/* Quote + dialog */
table.q { width: 100%; border-collapse: collapse; } table.q td, table.q th { text-align: left; padding: 8px 0; border-top: 1px solid var(--color-line); vertical-align: top; }
table.q td:last-child, table.q th:last-child { text-align: right; white-space: nowrap; }
table.q td[colspan] { text-align: left; white-space: normal; }
dialog { border: 1px solid var(--color-line-strong); border-radius: var(--radius-xl); background: var(--color-surface); color: var(--color-ink); max-width: min(32em, calc(100vw - 32px)); padding: 24px; box-shadow: var(--shadow-card); }
dialog::backdrop { background: rgba(7,22,28,.55); }
dialog ul { list-style: disc; padding-left: 20px; margin: 12px 0 20px; display: flex; flex-direction: column; gap: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.banner { border-radius: var(--radius-md); padding: 10px 14px; margin-bottom: 18px; background: var(--color-sunk); border: 1px solid var(--color-line); }
.banner.attn { background: var(--color-accent-soft); color: var(--color-accent-ink); font-weight: 600; }
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--color-ink); color: var(--color-paper); padding: 10px 18px; border-radius: 999px; z-index: 60; }
.skeleton { height: 18px; border-radius: 6px; background: var(--color-sunk); margin: 10px 0; max-width: 28em; }
.center { min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center; }
.center > div { max-width: 28em; display: flex; flex-direction: column; gap: 14px; align-items: center; }

@media (max-width: 859px) {
  .shell { display: block; } .side { display: none; }
  main { padding: 20px var(--space-gutter) 110px; }
  .bottom { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--color-surface); border-top: 1px solid var(--color-line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .bottom a, .bottom button { flex: 1; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: var(--text-xs); text-decoration: none; background: none; border: 0; cursor: pointer; border-radius: 10px; position: relative; }
  .bottom [aria-current="page"] { font-weight: 700; background: var(--color-sunk); }
  .bottom .badge { position: absolute; top: 3px; left: calc(50% + 6px); font-size: .6875rem; padding: 0 6px; }
  .sheet { position: fixed; inset: auto 0 64px 0; z-index: 45; background: var(--color-surface); border: 1px solid var(--color-line); border-radius: 18px 18px 0 0; padding: 12px; box-shadow: var(--shadow-card); }
  .sheet[hidden] { display: none; } .sheet.show { display: block; }
}
