:root {
  color-scheme: light;
  font: 16px/1.48 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #17281d;
  --muted: #4e5c51;
  --white: #fff;
  --canvas: #faf7f1;
  --line: #dbe0d5;
  --forest: #174a2c;
  --forest-hover: #103721;
  --forest-soft: #eaf2e8;
  --gold: #cc932b;
  --gold-light: #eab952;
  --amber: #74470e;
  --amber-soft: #fff1d2;
  --danger: #a32532;
  background: var(--canvas);
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
a, button, input, select { -webkit-tap-highlight-color: transparent; }
a { color: #174a2c; font-weight: 640; text-underline-offset: .18em; }
a:hover { color: var(--forest-hover); }
button, select { cursor: pointer; }
:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; }
[hidden] { display: none !important; }
.frame { width: min(100% - 3.5rem, 1392px); margin-inline: auto; }
.topbar { color: var(--ink); background: var(--canvas); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; gap: clamp(.9rem, 3vw, 2.6rem); min-height: 4.5rem; }
.brand { display: inline-flex; align-items: center; min-height: 44px; flex-shrink: 0; }
.brand img { display: block; width: clamp(7rem, 13vw, 8rem); height: auto; }
.primary-nav { display: flex; align-items: stretch; gap: .25rem; min-height: 4.5rem; }
.primary-nav a, #feedback-link { display: inline-flex; align-items: center; color: #354b3d; font-size: .87rem; text-decoration: none; white-space: nowrap; }
.primary-nav a { position: relative; padding-inline: .85rem; }
.primary-nav a:hover, #feedback-link:hover { color: var(--forest-hover); background: #eee8da; }
.primary-nav a[aria-current] { color: var(--forest-hover); background: #eee8da; }
.primary-nav a[aria-current]::after { position: absolute; inset: auto .85rem 0; height: .18rem; background: #cc932b; content: ""; }
#feedback-link { margin-left: auto; padding: .55rem .6rem; border-radius: .3rem; }
.topbar :focus-visible { outline-color: #174a2c; outline-offset: -3px; }
.main:has(.shift-header) { padding-top: clamp(.9rem, 2.2vw, 1.8rem); }
.main { min-height: calc(100vh - 8rem); padding-block: clamp(1.1rem, 4vw, 2.8rem) 2rem; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: .75rem 1.3rem; flex-wrap: wrap; margin-bottom: 1.45rem; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.95rem, 3.9vw, 3rem); font-weight: 790; line-height: 1.08; letter-spacing: -.045em; }
h2 { font-size: 1.05rem; font-weight: 760; letter-spacing: -.012em; }
.subtitle { margin-top: .38rem; font-size: .92rem; color: var(--muted); }
.back { display: inline-block; margin-bottom: .85rem; font-size: .87rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: .55rem .9rem; background: var(--forest); color: var(--white); border: 1px solid transparent; border-radius: .42rem; font-weight: 700; text-decoration: none; font-size: .87rem; }
.button:hover { background: var(--forest-hover); color: var(--white); }
.button.secondary { background: var(--white); border-color: #a8b3a5; color: var(--ink); }
.button.secondary:hover { background: var(--forest-soft); color: #174a2c; border-color: #9aaf9c; }
.compact { white-space: nowrap; }
.shift-header, .signin-lead {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--forest);
  color: var(--white);
  border-left: .36rem solid var(--gold);
}
.shift-header::before, .signin-lead::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, #174a2c 18%, #174a2cef 55%, #174a2cda 68%, #174a2c00 90%),
    url("/fact-road-cover.webp") right bottom / auto 100% no-repeat;
}
.shift-header { margin-bottom: 1.15rem; }
.shift-header:has(+ .metrics) { margin-bottom: 0; }
.shift-inner { padding: 1rem clamp(1rem, 2.6vw, 2rem) 1.15rem; }
.shift-date { color: #e0ece0; font-size: .88rem; font-variant-numeric: tabular-nums; }
.shift-header h1 { font-size: clamp(2.25rem, 5vw, 4rem); letter-spacing: -.055em; margin: 0 0 .4rem; }
.shift-header :focus-visible, .signin-lead :focus-visible { outline-color: #f7d787; }
.shift-action { min-height: 39px; margin-top: .75rem; padding-block: .4rem; background: var(--gold-light); color: #201708; }
.shift-action:hover { background: #f6d48a; color: #201708; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 1.15rem; border: 1px solid var(--line); border-top: 0; background: var(--white); }
.metric, .card { border: 1px solid var(--line); background: var(--white); min-width: 0; }
.card { border-radius: .35rem; }
.metric { position: relative; display: flex; align-items: center; gap: .62rem; min-height: 4.15rem; text-align: left; color: var(--ink); padding: .7rem clamp(.65rem, 1.7vw, 1.35rem); border: 0; }
.metric + .metric { border-left: 1px solid var(--line); }
.metric::after { position: absolute; inset: auto 0 0; height: .2rem; content: ""; }
.metric[aria-pressed="true"], .metric:hover { background: #edf3ea; }
.metric[aria-pressed="true"]::after { background: var(--forest); }
.metric:focus-visible { outline-offset: -3px; }
.metric strong { color: var(--ink); font-size: 1.76rem; font-weight: 780; line-height: 1; font-variant-numeric: tabular-nums; }
.metric-label { font-size: .8rem; font-weight: 700; color: var(--muted); }
.metric-arrow { margin-left: auto; color: var(--forest); line-height: 1; }
.dashboard, .details { display: grid; align-items: start; gap: 1rem; }
.dashboard { grid-template-columns: minmax(0, 3.5fr) minmax(245px, 1fr); }
.board, .queue { border-radius: 0; }
.board { border-top: .22rem solid var(--ink); }
.details { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.stack { display: grid; gap: 1rem; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: 1rem 1.1rem .65rem; }
.card-head p { color: var(--muted); font-size: .83rem; margin-top: .15rem; }
.board-toolbar { display: grid; grid-template-columns: 1fr auto auto; align-items: end; gap: .6rem 1rem; padding: .85rem 1.1rem; }
.board-heading p { margin-top: .15rem; font-size: .83rem; color: var(--muted); }
.filters { display: flex; gap: .55rem; }
.filters label { min-width: min(9rem, 100%); }
label { display: block; color: var(--ink); font-size: .82rem; font-weight: 680; min-width: 0; }
input, select { display: block; width: 100%; min-height: 44px; min-width: 0; margin-top: .27rem; border: 1px solid #acb9ab; border-radius: .4rem; background: var(--white); color: var(--ink); font-weight: 500; font-size: .91rem; padding: .55rem .65rem; }
.table-scroll { min-width: 0; overflow-x: auto; }
.orders { border-collapse: collapse; width: 100%; text-align: left; font-size: .86rem; }
.orders th { font-size: .72rem; color: #3c5242; font-weight: 760; background: #eef1e8; vertical-align: top; }
.board .orders td:first-child .order-link { color: #174a2c; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
.board .orders tbody tr:nth-child(even) { background: #fafbf8; }
.orders td, .orders th { padding: .72rem .63rem; border-top: 1px solid var(--line); }
.orders :is(td, th):first-child { padding-left: 1.1rem; }
.orders :is(td, th):last-child { padding-right: 1.1rem; }
.orders tbody tr:hover { background: #f1f5ee; }
.board .orders .order-row { position: relative; cursor: pointer; }
.board .orders .order-row:is(:hover, :focus-within) { background: var(--forest-soft); }
.order-row .order-link::after { content: ""; position: absolute; inset: 0; }
.order-row .order-link:focus-visible { outline: none; }
.order-row .order-link:focus-visible::after { outline: 2px solid var(--forest); outline-offset: -2px; }
.orders td { vertical-align: top; }
.orders td .order-link, .orders td strong, .orders td small { display: block; }
.orders td strong { font-weight: 660; }
.orders td :is(.order-link, strong) + :is(strong, small) { margin-top: .12rem; }
.orders .numeric { white-space: nowrap; font-variant-numeric: tabular-nums; }
.order-link { font-weight: 760; }
small, .muted { color: var(--muted); }
small { font-size: .76rem; }
.next-action { color: #295f3b; }
.next-action.urgent { color: var(--amber); font-weight: 700; }
.pill, .count { display: inline-block; width: fit-content; border: 1px solid transparent; border-radius: .22rem; font-size: .73rem; font-weight: 720; line-height: 1.25; padding: .3rem .52rem; }
.pill.neutral, .count { background: #eef1ea; border-color: #d8e2d5; color: #35513d; }
.pill.active { background: var(--forest-soft); border-color: #c9ddc8; color: #205632; }
.pill.attention { background: var(--amber-soft); border-color: #efd8aa; color: var(--amber); }
.queue { border: 0; border-top: .22rem solid #cc932b; background: #183f29; color: var(--white); }
.queue .card-head { padding-bottom: .95rem; }
.queue .empty { color: #d8e6d8; }
.queue .count { color: #fff; border-color: #6f8d77; background: #395e44; }
.queue :focus-visible { outline: 2px solid #eecf82; outline-offset: -3px; }
.queue-list, .record-list, .invoice-lines, .timeline { list-style: none; padding: 0; margin: 0; }
.queue-list li { border-top: 1px solid #43674c; }
.queue-list a { display: grid; justify-items: start; gap: .27rem; min-height: 44px; padding: .86rem 1.1rem; text-decoration: none; color: var(--white); }
.queue-list a:hover { background: #285238; }
.queue-list small { color: #dce9dc; }
.queue-list strong { font-size: .91rem; }
.card-foot { display: block; padding: .8rem 1.1rem; border-top: 1px solid #43674c; font-size: .82rem; color: #c9ddc8; }
.card-foot:hover { color: #fff; background: #285238; }
.detail-card { padding: 1rem 1.1rem; overflow-wrap: anywhere; }
.detail-card > h2 { margin-bottom: .8rem; }
.order-workspace:has(.order-action) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.order-action { padding-inline-start: 1.4rem; border-inline-start: 1px solid var(--line); }
.order-action h3 { margin-bottom: .7rem; font-size: 1rem; }
.order-action p + form { margin-top: .85rem; }
.reschedule { margin-top: 1rem; padding-top: .85rem; border-top: 1px solid var(--line); }
.reschedule summary { color: var(--forest-hover); cursor: pointer; font-size: .87rem; font-weight: 680; }
.reschedule form { margin-top: .8rem; }
.detail-card > p + form { margin-top: .85rem; }
.detail-card > :not(h2) + :is(.button, p.muted) { margin-top: .75rem; }
.detail-card form + form { margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.facts { display: grid; gap: .52rem; margin: 0; font-size: .87rem; }
.facts div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: .75rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 660; }
.facts + form { margin-top: .95rem; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-bottom: .9rem; }
.fields > :only-child { grid-column: 1 / -1; }
.form-error { color: var(--danger); margin: .45rem 0; font-size: .87rem; }
.form-error:empty { display: none; }
.empty { padding: 1rem 1.1rem; color: var(--muted); font-size: .9rem; }
.detail-card .empty { padding: 0; }
.banner { margin-bottom: 1rem; padding: .65rem .85rem; border: 1px solid #c9ddc8; border-radius: .4rem; background: var(--forest-soft); color: #214b30; font-weight: 650; font-size: .86rem; }
.record-list { display: grid; }
.record-list li, .timeline li { display: grid; gap: .12rem; padding-block: .75rem; font-size: .91rem; }
.record-list li + li, .timeline li + li, .invoice-lines li + li { border-top: 1px solid var(--line); }
.record-list li:first-child, .timeline li:first-child { padding-top: 0; }
.record-list li:last-child, .timeline li:last-child { padding-bottom: 0; }
.record-list form { margin-top: .65rem; }
.record-list .facts { margin-top: .55rem; }
.record-list .order-link, .record-list li > a { justify-self: start; }
.vendor-list .pill { margin-top: .25rem; }
.timeline span { color: var(--muted); }
.account-selector { max-width: 19rem; margin-bottom: 1rem; }
.document-id { color: var(--muted); font-size: .86rem; margin-bottom: .65rem; }
.invoice-lines { margin-top: .75rem; border-top: 1px solid var(--line); font-size: .9rem; }
.invoice-lines li, .invoice-total { display: flex; align-items: start; justify-content: space-between; gap: .75rem; padding-block: .6rem; }
.invoice-lines small { display: block; }
.invoice-lines strong, .invoice-total strong { white-space: nowrap; font-variant-numeric: tabular-nums; }
.invoice-total { border-top: 1px solid var(--line); font-weight: 750; padding-bottom: 0; }
.footer { display: flex; justify-content: space-between; gap: .5rem 1rem; flex-wrap: wrap; border-top: 1px solid var(--line); padding-block: .85rem 1.25rem; color: var(--muted); font-size: .77rem; }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: absolute; inset: .25rem auto auto .25rem; background: var(--white); padding: .5rem; z-index: 5; }
@media (max-width: 1110px) {
  .orders { min-width: 650px; }
}
@media (max-width: 970px) {
  .dashboard { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .frame { width: calc(100% - 1.5rem); }
  .topbar-inner { gap: .2rem; flex-wrap: wrap; padding-top: .6rem; }
  .primary-nav { order: 3; flex: 1 0 100%; min-height: 2.8rem; }
  .primary-nav a { padding-inline: .5rem; font-size: .79rem; }
  .primary-nav a[aria-current]::after { inset-inline: .5rem; }
  .shift-header::before, .signin-lead::before {
    background-image: linear-gradient(90deg, #174a2c 18%, #174a2cef 45%, #174a2caa 100%), url("/fact-road-cover.webp");
    background-size: auto, auto 75%;
  }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { min-height: 3.2rem; padding: .54rem .62rem; gap: .37rem; }
  .metric:nth-child(odd) { border-left: 0; }
  .metric:nth-child(n+3) { border-top: 1px solid var(--line); }
  .metric-label { font-size: .73rem; }
  .metric strong { font-size: 1.35rem; }
  .details, .order-workspace:has(.order-action) { grid-template-columns: minmax(0, 1fr); }
  .order-action { border-inline-start: 0; border-top: 1px solid var(--line); padding: 1rem 0 0; }
  .board-toolbar { grid-template-columns: 1fr auto; padding: .75rem .85rem; }
  .board-toolbar .compact { grid-column: 2; grid-row: 1; }
  .filters { grid-column: 1 / -1; }
  .page-heading { align-items: center; margin-bottom: .9rem; }
  .orders { min-width: 590px; }
  .details .orders { min-width: 410px; }
}
@media (max-width: 380px) {
  .fields { grid-template-columns: 1fr; }
  .primary-nav a { font-size: .75rem; }
}
@media (max-width: 600px) {
  .filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters label { min-width: 0; }
  .orders, .details .orders { min-width: 0; display: block; }
  .orders thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .orders tbody { display: block; }
  .orders tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); padding: .65rem .9rem; gap: .6rem .8rem; }
  .orders tr td { display: block; min-width: 0; padding: 0 !important; border-top: 0; }
  .orders tr td:first-child { grid-column: 1 / -1; }
  .orders tr td[data-column]::before { display: block; content: attr(data-column); font-weight: 650; color: var(--muted); font-size: .72rem; }
  .orders tr td[data-column] .pill { margin-top: .15rem; }
}

.identity { display: flex; align-items: center; gap: .65rem; margin-left: auto; color: #314c38; font-size: .84rem; }
.identity button { min-height: 44px; padding-inline: .65rem; border: 0; background: transparent; color: var(--forest); font-size: .84rem; }
.identity button:hover { color: var(--forest-hover); background: #eee8da; }
.identity + #feedback-link { margin-left: 0; }
.identity[hidden] + #feedback-link { margin-left: auto; }
.signin { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(18rem, 1fr); align-items: center; gap: clamp(1rem, 5vw, 4.5rem); }
.signin-lead {
  display: grid; align-content: center; gap: 1rem; min-height: clamp(24rem, 35vw, 34rem);
  padding: clamp(1.25rem, 4vw, 3.8rem);
}
.signin-lead h1 { font-size: clamp(2.3rem, 4.3vw, 4.7rem); max-width: 19ch; }
.signin-lead p { color: #e0ece0; font-size: .92rem; }
.product-lineup { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.product-lineup h2 { color: var(--forest); border-bottom: 1px solid var(--line); padding-bottom: .7rem; }
.product-lineup .record-list li { position: relative; padding-inline-start: 1.1rem; }
.product-lineup .record-list li::before { position: absolute; left: 0; top: 1.2rem; width: .35rem; height: .35rem; background: var(--gold); content: ""; }
.product-lineup .record-list li:first-child::before { top: .43rem; }
.product-lineup small, .product-contact p { color: var(--muted); }
.product-contact { margin-top: 1.2rem; border-left: .25rem solid var(--gold); padding: .85rem 1rem; }
.product-contact h2 { color: var(--forest); margin-bottom: .25rem; }
.signin .fields { grid-template-columns: minmax(0, 1fr); }
.role-picker { display: grid; gap: .45rem; min-inline-size: 0; margin: 0; padding: 0; border: 0; }
.role-picker legend { padding: 0 0 .35rem; font-size: .82rem; font-weight: 680; }
.role-option { display: flex; align-items: flex-start; gap: .65rem; padding: .65rem .75rem; border: 1px solid var(--line); border-radius: .4rem; cursor: pointer; }
.role-option:hover { border-color: #9aaf9c; }
.role-option:has(input:checked) { border-color: var(--forest); background: var(--forest-soft); }
.role-option:focus-within { outline: 2px solid var(--forest); outline-offset: 2px; }
.role-option input { flex: 0 0 1rem; inline-size: 1rem; block-size: 1rem; min-height: 0; margin: .15rem 0 0; padding: 0; accent-color: var(--forest); }
.role-option input:focus-visible { outline: none; }
.role-option strong { display: block; margin-bottom: .12rem; font-size: .88rem; }
.role-option span span { color: var(--muted); font-size: .79rem; font-weight: 500; }
#account-fields { display: grid; gap: .75rem; }
button:disabled { cursor: wait; opacity: .65; }
@media (max-width: 680px) {
  .signin, .product-lineup { grid-template-columns: minmax(0, 1fr); }
  .signin-lead { min-height: 15rem; }
  .identity { gap: .1rem; }
  .identity span { max-width: 8rem; line-height: 1.2; }
}
