/* bidr.ai demo: BIDR Technologies design system (bidr-tech DESIGN.md, "The Contract File, Played Straight").
   Tokens, type roles, header, page head, credentials strip, buttons, fields and ruled tables follow bidrtech.com
   (site/home.css, site/pages.css). Navy, white, mist, hairlines and one gold accent; flat; sentence case. */

@font-face { font-family: "Assistant"; font-style: normal; font-weight: 200 800; font-display: swap; src: url(fonts/assistant-variable-latin.woff2) format("woff2"); }
@font-face { font-family: "Assistant Fallback"; font-style: normal; font-weight: 200 549; src: local("Arial"), local("ArialMT"); size-adjust: 93.9%; ascent-override: 108.6%; descent-override: 30.9%; line-gap-override: 0%; }
@font-face { font-family: "Assistant Fallback"; font-style: normal; font-weight: 550 800; src: local("Arial Bold"), local("Arial-BoldMT"); size-adjust: 91.3%; ascent-override: 111.7%; descent-override: 31.8%; line-gap-override: 0%; }

:root {
  --navy-950: #05192d; --navy-900: #0a2248; --navy-850: #0b2440; --navy-700: #1f3a5f; --ink-600: #42526a;
  --gold-500: #d6ac4e; --gold-400: #e0bb68; --gold-text: #8c5f10; --gold-numeral: #a8761a; --focus: #f0c45a;
  --mist-100: #f2f4f7; --mist-200: #dadee5; --table-head: #f7f8fa; --rule: #c8ced6; --rule-strong: #5d6b80; --paper: #ffffff;
  --on-navy: #e1e9f5; --on-navy-muted: #aebbd0; --field-border: #768296; --placeholder: #66748a; --error: #a3261b; --scrollbar: #8f9bb0;
  /* Status tints, for order and check states only (never decoration) */
  --ok: #1d5c2e; --ok-bg: #e7f3ea; --warn: #7a5208; --warn-bg: #fbf2dc; --bad: #a3261b; --bad-bg: #f8e5e3; --info: #0a2248; --info-bg: #e6edf7;

  --font: "Assistant", "Assistant Fallback", "Segoe UI", system-ui, -apple-system, sans-serif;
  --text-display: clamp(2.125rem, 3.39vw, 3.5rem);
  --text-page: clamp(2rem, 3.3vw, 3.125rem);
  --text-record: clamp(2.1rem, 3.6vw, 3.4rem);
  --text-headline: clamp(1.75rem, 2.6vw, 2.25rem);
  --text-title-lg: 1.5rem; --text-title: 1.25rem; --text-title-sm: 1.125rem;
  --text-lede: 1.0625rem; --text-body: 1rem; --text-ui: .9375rem; --text-small: .875rem; --text-micro: .8125rem;
  --measure: 31em; --wrap: 100rem; --gutter: clamp(1rem, 4.76vw, 6rem);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --drop: 0 18px 32px -8px rgba(0, 0, 0, .55);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--scrollbar) var(--mist-100); }
body { margin: 0; background: var(--paper); color: var(--ink-600); font: 400 var(--text-body)/1.55 var(--font); font-kerning: normal; text-rendering: optimizeLegibility; caret-color: var(--navy-900); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; color: var(--navy-900); text-wrap: balance; }
p { margin: 0; }
p, li, dd { text-wrap-style: pretty; }
::selection { background: var(--gold-500); color: var(--navy-950); }
:focus-visible { outline: 3px solid var(--navy-900); outline-offset: 3px; border-radius: 2px; }
main:focus, h1[tabindex="-1"]:focus { outline: none; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 60; padding: .6rem 1rem; border-radius: 3px; background: var(--gold-500); color: var(--navy-950); font-weight: 700; text-decoration: none; }
.skip:focus { top: 1rem; outline: 3px solid #fff; outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num, .n, time { font-variant-numeric: tabular-nums lining-nums; }
.muted { color: var(--ink-600); }
.small { font-size: var(--text-small); }
.ico { width: 1.15em; height: 1.15em; flex: none; display: inline-block; vertical-align: -.2em; }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right)); }

/* ---------- Header (bidrtech.com interior header, solid Contract Navy) ---------- */
.site-header { background: var(--navy-950); position: sticky; top: 0; z-index: 20; }
.site-header__bar { display: flex; align-items: center; gap: clamp(1.25rem, 2.4vw, 2.25rem); min-height: clamp(4.5rem, 5.6vw, 5.5rem); }
.site-header :focus-visible { outline-color: var(--focus); }
.brand { flex: none; display: block; }
.brand img { width: clamp(11.5rem, 15.5vw, 15.5rem); height: auto; }
.primary-nav { margin-left: auto; min-width: 0; }
.primary-nav ul { display: flex; align-items: center; gap: clamp(.9rem, 1.7vw, 1.6rem); margin: 0; padding: 0; list-style: none; }
.primary-nav a { display: inline-flex; align-items: center; gap: .4rem; color: #fff; font-size: clamp(.875rem, 1.05vw, 1.0625rem); font-weight: 600; text-decoration: none; white-space: nowrap; padding-block: .5rem;
  background: linear-gradient(var(--gold-500), var(--gold-500)) no-repeat 0 calc(100% - .2rem) / 0 2px; transition: background-size .28s var(--ease-out); }
.primary-nav a:hover, .primary-nav a[aria-current] { background-size: 100% 2px; }
.badge { min-width: 1.3rem; padding: 0 .35rem; border-radius: 3px; background: var(--gold-500); color: var(--navy-950); font-size: .75rem; font-weight: 800; line-height: 1.3rem; text-align: center; font-variant-numeric: tabular-nums; }
.who { flex: none; display: flex; align-items: center; gap: .6rem; padding-left: clamp(1rem, 1.8vw, 1.75rem); border-left: 1px solid rgba(255, 255, 255, .14); }
.who span { color: var(--on-navy-muted); font-size: var(--text-small); white-space: nowrap; }
.who select { font: 600 var(--text-ui) var(--font); color: #fff; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .35); border-radius: 3px; min-height: 2.5rem; padding: .3rem .5rem; max-width: 15rem; cursor: pointer; }
.who select option { color: var(--navy-950); background: #fff; }

/* Sample-data line: the bidrtech.com credentials strip */
.credentials { background: var(--mist-200); color: var(--navy-900); }
.credentials .wrap { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .2rem .9rem; padding-block: .4rem; font-size: var(--text-small); font-weight: 500; }
.credentials strong { font-weight: 700; }
.credentials .sep { color: var(--rule-strong); }
.credentials button { position: relative; font: 700 var(--text-small) var(--font); color: var(--navy-900); background: none; border: 0; padding: .15rem 0; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(10, 34, 72, .35); text-underline-offset: .18em; }
.credentials button:hover { text-decoration-color: var(--gold-500); }
.credentials button::after { content: ""; position: absolute; inset: -.7rem -.5rem; }

/* ---------- Page head (navy band, hairline above, 3px gold rule below) ---------- */
.page-head { background: var(--navy-950); color: var(--on-navy); border-top: 1px solid rgba(255, 255, 255, .14); border-bottom: 3px solid var(--gold-500); }
.page-head[hidden] { display: none; }
.page-head__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1.25rem 3rem; padding-block: clamp(.9rem, 1.3vw, 1.2rem) clamp(1.2rem, 1.9vw, 1.7rem); }
.page-head .t { display: grid; gap: .45rem; min-width: 0; }
.page-head h1 { max-width: 22em; color: #fff; font-size: clamp(1.875rem, 2.8vw, 2.75rem); font-weight: 700; line-height: 1.04; letter-spacing: -.012em; }
.page-head .t > p { max-width: 40em; color: var(--on-navy); font-size: clamp(1.0625rem, 1.2vw, 1.125rem); line-height: 1.6; letter-spacing: .01em; }
.page-head :focus-visible { outline-color: var(--focus); }
.page-head .contract-tag { color: var(--gold-500); }
.page-head .actions .btn:not(.gold) { background: transparent; border-color: #fff; color: #fff; }
.page-head .actions .btn:not(.gold):hover { background: #fff; color: var(--navy-950); }
.page-head .btn.gold:focus-visible { outline-color: #fff; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; margin: 0 0 .2rem; padding: 0; list-style: none; font-size: var(--text-small); }
.breadcrumbs li { display: inline-flex; align-items: center; color: var(--on-navy-muted); }
.breadcrumbs li + li::before { content: ""; width: .4rem; height: .4rem; margin: 0 .7rem 0 .55rem; border-top: 1.5px solid var(--on-navy-muted); border-right: 1.5px solid var(--on-navy-muted); transform: rotate(45deg); }
.breadcrumbs a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .4); text-underline-offset: .2em; }
.breadcrumbs a:hover { text-decoration-color: var(--gold-500); }
.breadcrumbs [aria-current] { color: var(--on-navy); font-weight: 600; }
.rec-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.stamp { display: inline-flex; align-items: baseline; gap: .55rem; padding: .3rem .7rem; border: 1px solid rgba(255, 255, 255, .3); border-radius: 3px; color: #fff; font-weight: 700; font-variant-numeric: tabular-nums lining-nums; }
.stamp small { color: var(--on-navy-muted); font-size: var(--text-small); font-weight: 700; }

/* ---------- Page body ---------- */
main.page { padding-block: clamp(1.75rem, 3vw, 2.75rem) 4rem; display: grid; gap: 2rem; }
main.page > *, .block > *, .panel > *, .cols > *, .rgrid > *, #tabpanel { min-width: 0; }
section.block { display: grid; gap: 1rem; }
section.block > h2, .h2 { font-size: var(--text-title-lg); font-weight: 700; line-height: 1.2; }
section.block > h2::after { content: ""; display: block; width: 3.15rem; height: 3px; margin-top: .65rem; background: var(--gold-500); }
section.block > h2 .muted { font-size: var(--text-small); font-weight: 400; }
section.block > p, details.how p { max-width: 72ch; }
.cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
.cols.wide-side { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
.rgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; align-items: start; }
.stack { display: grid; gap: 1.25rem; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }

/* Record card: white sheet, hairline border, 3px Navy 900 top rule (the bidrtech.com rail card) */
.panel { background: var(--paper); border: 1px solid var(--rule); border-top: 3px solid var(--navy-900); border-radius: 0 0 4px 4px; padding: clamp(1rem, 1.8vw, 1.4rem); display: grid; gap: 1rem; align-content: start; }
.panel.tight { padding: 1.1rem 1.25rem; gap: .8rem; }
.panel > h2, .panel h3 { font-size: var(--text-title); font-weight: 700; line-height: 1.25; }
.ferr { color: var(--error); font-size: var(--text-small); font-weight: 700; }
textarea[aria-invalid="true"] { border-color: var(--error); box-shadow: inset 0 0 0 1px var(--error); }
.note { background: var(--mist-100); border: 1px solid var(--rule); border-radius: 4px; padding: .8rem 1rem; display: grid; gap: .25rem; color: var(--navy-900); }
.note strong { color: var(--navy-900); }
.note.bad { background: var(--bad-bg); border-color: rgba(163, 38, 27, .35); color: var(--bad); }
.note.bad strong { color: var(--bad); }
.approve-box { background: var(--paper); border: 1px solid var(--rule); border-top: 3px solid var(--gold-500); border-radius: 0 0 4px 4px; padding: clamp(1rem, 1.8vw, 1.4rem); display: grid; gap: .85rem; }
.approve-box h2 { font-size: var(--text-title-lg); font-weight: 700; }
.approve-box ul, .ticks { margin: 0; padding: 0; list-style: none; display: grid; gap: .3rem; }
.approve-box li, .ticks li { position: relative; padding-left: 1.4rem; color: var(--navy-900); }
.approve-box li::before, .ticks li::before { content: ""; position: absolute; left: 0; top: .72rem; width: .55rem; height: 3px; background: var(--gold-500); }

/* ---------- Buttons and links ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 2.5rem; padding: .45rem 1.25rem;
  border: 2px solid var(--navy-900); border-radius: 3px; background: transparent; color: var(--navy-900); cursor: pointer;
  font: 700 var(--text-ui)/1.1 var(--font); text-decoration: none; white-space: nowrap;
  transition: background-color .2s var(--ease-out), color .2s var(--ease-out), border-color .2s var(--ease-out); }
.btn:hover { background: var(--navy-900); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--navy-900); color: #fff; }
.btn.primary:hover { background: var(--navy-950); border-color: var(--navy-950); }
.btn.gold { background: var(--gold-500); border-color: var(--gold-numeral); color: var(--navy-950); }
.btn.gold:hover { background: var(--gold-400); }
.btn.quiet { border-color: var(--rule); border-width: 1px; }
.btn.quiet:hover { border-color: var(--navy-900); background: var(--mist-100); color: var(--navy-900); }
.btn.danger { border-color: var(--error); color: var(--error); }
.btn.danger:hover { background: var(--error); color: #fff; }
.btn.sm { min-height: 2.15rem; padding: .3rem .8rem; font-size: var(--text-small); }
.btn.icon { padding: 0; width: 2.25rem; min-height: 2.25rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.text-link, .linkbtn { display: inline-flex; align-items: center; gap: .4rem; color: var(--gold-text); font: 700 var(--text-ui) var(--font); text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; }
.text-link .ico, .linkbtn .ico { transition: transform .2s var(--ease-out); }
.text-link:hover, .linkbtn:hover { text-decoration: underline; text-underline-offset: .2em; }
.text-link:hover .ico, .linkbtn:hover .ico { transform: translateX(3px); }
.text-link.back:hover .ico { transform: translateX(-3px); }
main a:not(.btn):not(.text-link):not(.cat):not(.tab) { color: var(--navy-900); text-decoration-color: rgba(10, 34, 72, .35); text-underline-offset: .18em; }
main a:not(.btn):not(.text-link):not(.cat):not(.tab):hover { text-decoration-color: var(--gold-500); }

/* ---------- Fields ---------- */
.form { display: grid; gap: 1rem; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 1.25rem; }
.field { display: grid; gap: .3rem; min-width: 0; }
.field > span, .field > label, fieldset > legend { color: var(--navy-900); font-size: var(--text-small); font-weight: 700; line-height: 1.3; }
.field small { font-weight: 400; color: var(--ink-600); }
.hint { font-size: var(--text-small); color: var(--ink-600); max-width: 72ch; }
input:not([type]), input[type="text"], input[type="email"], input[type="number"], input[type="search"], select, textarea {
  font: 400 var(--text-body) var(--font); color: var(--navy-950); background: var(--paper); border: 1px solid var(--field-border); border-radius: 3px;
  padding: .55rem .75rem; width: 100%; min-height: 2.75rem; transition: border-color .15s var(--ease-out); accent-color: var(--navy-900); }
input[readonly] { background: var(--mist-100); }
textarea { min-height: 5.5rem; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--placeholder); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--navy-900); outline-offset: 1px; border-color: var(--navy-900); }
fieldset { border: 0; border-top: 1px solid var(--rule); margin: 0; padding: .8rem 0 0; display: grid; gap: .45rem; min-width: 0; }
fieldset > legend { padding: 0 0 .2rem; float: left; width: 100%; }
.check { display: flex; gap: .55rem; align-items: flex-start; cursor: pointer; color: var(--navy-900); font-size: var(--text-ui); }
.check input { width: 1.1rem; height: 1.1rem; margin-top: .15rem; accent-color: var(--navy-900); flex: none; }
.form-foot { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--rule-strong); border-radius: 3px; overflow: hidden; max-width: 100%; justify-self: start; }
.seg button { font: 700 var(--text-small) var(--font); border: 0; border-left: 1px solid var(--rule); background: var(--paper); color: var(--navy-900); padding: .5rem .9rem; cursor: pointer; transition: background-color .15s var(--ease-out); }
.seg button:first-child { border-left: 0; }
.seg button:hover { background: var(--mist-100); }
.seg button[aria-pressed="true"] { background: var(--navy-900); color: #fff; }
.tabs { display: flex; gap: .25rem 1.5rem; border-bottom: 1px solid var(--rule); overflow-x: auto; scrollbar-width: thin; }
.tabs a { font: 700 var(--text-ui) var(--font); color: var(--ink-600); text-decoration: none; padding: .7rem 0; white-space: nowrap;
  background-image: linear-gradient(var(--gold-500), var(--gold-500)); background-repeat: no-repeat; background-position: 0 100%; background-size: 0 3px; transition: background-size .28s var(--ease-out), color .15s; }
.tabs a:hover { color: var(--navy-900); }
.tabs a[aria-current] { color: var(--navy-900); background-size: 100% 3px; }

/* ---------- Ruled tables (bidrtech .data-table) ---------- */
.tablewrap { overflow-x: auto; border-top: 2px solid var(--navy-900); background: var(--paper); }
table.t { width: 100%; border-collapse: collapse; font-size: var(--text-body); font-variant-numeric: tabular-nums lining-nums; }
table.t th, table.t td { text-align: left; padding: .7rem 1.1rem .7rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; color: var(--navy-950); }
table.t th:last-child, table.t td:last-child { padding-right: 0; }
table.t thead th { color: var(--navy-700); font-size: var(--text-small); font-weight: 700; border-bottom-color: var(--rule-strong); white-space: nowrap; }
table.t td.n, table.t th.n { text-align: right; white-space: nowrap; }
table.t td small, table.t .meta { color: var(--ink-600); font-size: var(--text-small); }
table.t tr.click { cursor: pointer; }
table.t tbody tr { transition: background-color .15s var(--ease-out); }
table.t tr.click:hover td { background: rgba(10, 34, 72, .04); }
table.t .name { font-weight: 700; color: var(--navy-900); }
[data-row] { scroll-margin-block: 8rem 6rem; } /* clear of the sticky header and the toast */
@keyframes row-new { from { background-color: rgba(214, 172, 78, .3); } to { background-color: transparent; } }
table.t tr.is-new td { animation: row-new 2.6s var(--ease-out); }
table.t input.qty { width: 5rem; min-height: 2.35rem; padding: .3rem .5rem; }
.panel .tablewrap { border-top-width: 1px; border-top-color: var(--rule-strong); }

/* Ruled fact list */
dl.kv { display: grid; grid-template-columns: minmax(8rem, 12rem) minmax(0, 1fr); margin: 0; border-bottom: 1px solid var(--rule); }
dl.kv dt, dl.kv dd { margin: 0; padding: .55rem 0; border-top: 1px solid var(--rule); }
dl.kv dt { color: var(--navy-700); font-size: var(--text-small); font-weight: 700; padding-right: 1rem; padding-top: .62rem; }
dl.kv dd { color: var(--navy-950); min-width: 0; overflow-wrap: anywhere; }
dl.kv.tight { grid-template-columns: minmax(4.5rem, 5.5rem) minmax(0, 1fr); }

/* Pills: nearly square, sentence case */
.pill { display: inline-flex; align-items: center; gap: .3rem; padding: .08rem .45rem; border: 1px solid var(--rule-strong); border-radius: 3px; color: var(--navy-900); font-size: var(--text-micro); font-weight: 700; line-height: 1.45; white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); border-color: rgba(29, 92, 46, .3); }
.pill.warn { background: var(--warn-bg); color: var(--warn); border-color: rgba(122, 82, 8, .3); }
.pill.bad { background: var(--bad-bg); color: var(--bad); border-color: rgba(163, 38, 27, .3); }
.pill.info { background: var(--info-bg); color: var(--info); border-color: rgba(10, 34, 72, .2); }
.pill.gold { background: var(--gold-500); color: var(--navy-950); border-color: var(--gold-numeral); }
.pill.cert { background: var(--paper); color: var(--navy-900); border-color: var(--navy-700); }
.pill.attr { background: var(--mist-100); color: var(--navy-700); border-color: var(--rule); }
.pill.plain { color: var(--ink-600); border-color: var(--rule); }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.contract-tag { color: var(--gold-text); font-weight: 700; font-variant-numeric: tabular-nums lining-nums; }

/* ---------- Home ---------- */
.hero { background: var(--navy-950); color: var(--on-navy); border-top: 1px solid rgba(255, 255, 255, .14); border-bottom: 3px solid var(--gold-500); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 2rem clamp(2rem, 5vw, 5rem); align-items: end; padding-block: clamp(2.5rem, 5vw, 4.25rem) clamp(2.75rem, 5.5vw, 4.5rem); }
.hero h1 { max-width: 13.6em; color: #fff; font-size: var(--text-display); font-weight: 700; line-height: 1; letter-spacing: -.012em; }
.hero .lede { max-width: 32em; margin-top: 1.1rem; color: #fff; font-size: clamp(1rem, 1.37vw, 1.25rem); font-weight: 700; line-height: 1.3; }
.hero .actions { margin-top: clamp(1.5rem, 2.4vw, 2.25rem); gap: .9rem; }
.hero .btn { min-height: clamp(2.5rem, 3.1vw, 3rem); padding-inline: 1.6rem; font-size: clamp(.9375rem, 1.05vw, 1.0625rem); }
.hero .btn.outline { border-color: #fff; color: #fff; }
.hero .btn.outline:hover { background: #fff; color: var(--navy-950); }
.hero :focus-visible { outline-color: var(--focus); }
.hero .btn.gold:focus-visible { outline-color: #fff; }
.record { padding-top: clamp(1.1rem, 1.8vw, 1.5rem); border-top: 1px solid rgba(255, 255, 255, .18); display: grid; gap: .1rem; }
.record__label { color: var(--on-navy-muted); font-size: var(--text-small); font-weight: 700; }
.record__no { color: #fff; font-size: var(--text-record); font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.record__name { margin-top: .8rem; color: #fff; font-size: clamp(1.125rem, 1.5vw, 1.375rem); font-weight: 700; line-height: 1.25; }
.record__line { margin-top: .5rem; color: var(--on-navy); font-size: var(--text-ui); letter-spacing: .01em; }
.record__line strong { color: var(--gold-500); }
.record__note { margin-top: .9rem; padding-top: .7rem; border-top: 1px solid rgba(255, 255, 255, .14); color: var(--on-navy-muted); font-size: var(--text-small); }
.sec { padding-block: clamp(3rem, 6vw, 4.75rem); }
.sec.mist { background: var(--mist-100); }
.section__head { max-width: 46rem; margin-bottom: 2rem; }
.section__head h2 { font-size: var(--text-headline); font-weight: 700; line-height: 1.1; letter-spacing: -.01em; }
.section__head h2::after { content: ""; display: block; width: 3.15rem; height: 3px; margin-top: .9rem; background: var(--gold-500); }
.section__head p { margin-top: .9rem; font-size: var(--text-lede); max-width: var(--measure); line-height: 1.6; }
/* Offer row: four columns split by vertical hairlines */
.cats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.cat { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: .55rem; align-content: start; padding: 1.5rem clamp(1rem, 2vw, 1.75rem) 1.6rem; text-decoration: none; color: var(--ink-600); }
.cat + .cat { border-left: 1px solid var(--rule); }
.cat:first-child { padding-left: 0; }
.cat b { color: var(--navy-900); font-size: var(--text-title); font-weight: 700; line-height: 1.25; }
.cat b::after { content: ""; display: block; width: 3.15rem; height: 3px; margin-top: .7rem; background: var(--gold-500); }
.cat .n { color: var(--navy-700); font-size: var(--text-small); font-weight: 700; }
.cat .text-link { align-self: end; padding-top: .4rem; }
.cat:hover .text-link { text-decoration: underline; text-underline-offset: .2em; }
.cat:hover .text-link .ico { transform: translateX(3px); }
.ruled-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 clamp(1.5rem, 3vw, 3rem); }
.ruled-item { position: relative; padding: 1.25rem 0 1.5rem; border-top: 1px solid var(--rule); display: grid; gap: .5rem; align-content: start; }
.ruled-item--key::before { content: ""; position: absolute; top: -2px; left: 0; width: 3.15rem; height: 3px; background: var(--gold-500); }
.ruled-item h3 { font-size: var(--text-title); font-weight: 700; line-height: 1.25; }
.ruled-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rec-no { color: var(--navy-900); font-size: var(--text-headline); font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }

/* ---------- Shop ---------- */
.searchbar { display: flex; gap: .6rem; }
.searchbar input { font-size: var(--text-title-sm); min-height: 3.1rem; }
.searchbar .btn { min-height: 3.1rem; padding-inline: 1.75rem; }
.examples { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: var(--text-small); }
.examples > span { color: var(--navy-700); font-weight: 700; margin-right: .2rem; }
.examples button { font: 600 var(--text-small) var(--font); background: var(--mist-100); color: var(--navy-900); border: 1px solid var(--rule); border-radius: 3px; padding: .25rem .6rem; cursor: pointer; transition: border-color .15s var(--ease-out), background-color .15s; }
.examples button:hover { border-color: var(--navy-900); background: var(--paper); }
.finder { display: grid; grid-template-columns: 15.5rem minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.filters { position: sticky; top: 7rem; }
.fbox > summary { display: none; }
.fbody { display: grid; gap: 1.1rem; }
.filters select, .filters input[type="number"] { min-height: 2.5rem; }
.understood { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; background: var(--mist-100); border: 1px solid var(--rule); border-radius: 4px; padding: .6rem .85rem; color: var(--navy-900); }
.understood > b { margin-right: .3rem; font-size: var(--text-small); }
.understood .fon { margin-left: auto; display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; color: var(--navy-700); font-size: var(--text-small); font-weight: 600; }
.understood .fon .linkbtn { font-size: var(--text-small); }
.chip { display: inline-flex; gap: .35rem; align-items: baseline; background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 3px; color: var(--navy-900); font-weight: 700; font-size: var(--text-small); padding: .12rem .55rem; }
.chip small { font-weight: 600; color: var(--navy-700); font-size: var(--text-micro); }
.catgroup { display: grid; gap: 1rem; }
.catgroup + .catgroup { margin-top: 2.25rem; }
.catgroup > h2 { font-size: var(--text-title-lg); font-weight: 700; }
.catgroup > h2::after { content: ""; display: block; width: 3.15rem; height: 3px; margin-top: .6rem; background: var(--gold-500); }
.catgroup > h2 .muted { font-size: var(--text-ui); font-weight: 400; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr)); gap: 0 2rem; }
.pcard { position: relative; display: grid; gap: .55rem; align-content: start; grid-template-rows: auto auto auto 1fr; padding: 1.15rem 0 1.6rem; border-top: 1px solid var(--rule); min-width: 0; }
.pcard h3 { font-size: var(--text-title-sm); font-weight: 700; line-height: 1.3; }
.pcard h3 a { text-decoration: none; }
.pcard h3 a:hover { text-decoration: underline; text-decoration-color: var(--gold-500); text-underline-offset: .18em; }
.pcard .meta { display: grid; gap: .15rem; color: var(--ink-600); font-size: var(--text-small); }
.pcard.blocked .price b, .pcard.blocked h3 { color: var(--ink-600); }
.pcard.best { grid-template-columns: minmax(0, 1fr) minmax(15rem, auto); grid-template-rows: none; gap: .55rem 2.5rem; padding: 1.25rem 1.5rem 1.4rem; background: var(--paper); border: 1px solid var(--rule); border-top: 3px solid var(--navy-900); border-radius: 0 0 4px 4px; }
.pcard.best h3 { font-size: var(--text-title-lg); line-height: 1.2; }
.pcard.best .buy { grid-column: 2; grid-row: 1 / span 4; align-self: center; padding-left: 2rem; border-left: 1px solid var(--rule); }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .6rem; }
.price b { font-size: var(--text-title-lg); font-weight: 800; color: var(--navy-900); font-variant-numeric: tabular-nums lining-nums; }
.strike { text-decoration: line-through; color: var(--ink-600); font-size: var(--text-small); font-variant-numeric: tabular-nums; }
.save { font-size: var(--text-small); font-weight: 700; color: var(--ok); }
.breaknote { font-size: var(--text-small); font-weight: 700; color: var(--gold-text); }
.buy { display: grid; gap: .55rem; align-content: start; }
.buyrow { display: flex; gap: .45rem; align-items: end; flex-wrap: wrap; }
.buyrow label { display: grid; gap: .2rem; color: var(--navy-900); font-size: var(--text-micro); font-weight: 700; }
.buyrow select, .buyrow input { min-height: 2.5rem; padding: .3rem .5rem; }
.buyrow input[type="number"] { width: 5rem; }
.buyrow select { width: 5.5rem; }
.buyrow .btn { flex: 1 1 auto; }
.blocked-note { display: grid; gap: .25rem; justify-items: start; color: var(--bad); font-size: var(--text-small); }

/* ---------- Cart, checkout, policy check ---------- */
.sum { display: grid; gap: .35rem; }
.sum div { display: flex; justify-content: space-between; gap: 1rem; color: var(--navy-950); font-variant-numeric: tabular-nums lining-nums; }
.sum .tot { border-top: 2px solid var(--navy-900); padding-top: .55rem; margin-top: .25rem; font-size: var(--text-title); font-weight: 800; color: var(--navy-900); }
.policy { background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
.policy .ph { background: var(--navy-900); color: #fff; padding: .7rem 1.1rem; display: grid; gap: .1rem; }
.policy .ph b { font-size: var(--text-title-sm); font-weight: 700; }
.policy .ph small { color: var(--on-navy); font-size: var(--text-small); }
.policy .pb { display: grid; }
.policy .pb > p { padding: .8rem 1.1rem; color: var(--ink-600); }
.issue { display: grid; grid-template-columns: 1.4rem minmax(0, 1fr); gap: .25rem .7rem; padding: .85rem 1.1rem; border-top: 1px solid var(--rule); background: var(--mist-100); }
.policy .pb > .issue:first-child { border-top: 0; }
.issue > .ico { width: 1.4rem; height: 1.4rem; grid-row: span 3; margin-top: .05rem; }
.issue .head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .5rem; color: var(--navy-900); font-weight: 700; line-height: 1.3; }
.issue p { color: var(--navy-950); font-size: var(--text-ui); line-height: 1.5; }
.issue .fixes { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .35rem; }
.issue.block { background: var(--bad-bg); }
.issue.block > .ico, .issue.block .head { color: var(--bad); }
.issue.warn { background: var(--warn-bg); }
.issue.warn > .ico { color: var(--warn); }
.issue.info { background: var(--info-bg); }
.issue.info > .ico { color: var(--navy-900); }
.issue.ok { background: var(--ok-bg); }
.issue.ok > .ico, .issue.ok .head { color: var(--ok); }
details.how { border: 1px solid var(--rule); border-radius: 4px; background: var(--paper); padding: .65rem 1rem; }
details.how summary { cursor: pointer; color: var(--navy-900); font-weight: 700; }
details.how[open] summary { margin-bottom: .6rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); margin: 0; border-top: 2px solid var(--navy-900); border-bottom: 1px solid var(--rule); }
.kpis > div { padding: .8rem 1.25rem .9rem; border-left: 1px solid var(--rule); display: grid; gap: .15rem; }
.kpis > div:first-child { border-left: 0; padding-left: 0; }
.kpis dt { color: var(--navy-700); font-size: var(--text-small); font-weight: 700; }
.kpis dd { margin: 0; color: var(--navy-900); font-size: var(--text-title-lg); font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums lining-nums; }
.kpis dd small { margin-left: .2rem; color: var(--navy-700); font-size: var(--text-small); font-weight: 700; }

/* ---------- Order record ---------- */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--rule); }
.timeline li { display: grid; grid-template-columns: minmax(9rem, 11.5rem) minmax(0, 1fr); gap: .2rem 1rem; padding: .5rem 0; border-bottom: 1px solid var(--rule); font-size: var(--text-ui); color: var(--navy-950); }
.timeline time { color: var(--ink-600); }
.timeline b { color: var(--navy-900); }

/* ---------- Reports: one hue per chart, 4px rounded data ends ---------- */
.bars { display: grid; gap: .6rem; }
.bar-row { display: grid; grid-template-columns: minmax(8rem, 13rem) minmax(0, 1fr) minmax(7.5rem, auto); gap: .9rem; align-items: center; font-size: var(--text-ui); }
.bar-row .bl { color: var(--navy-900); font-weight: 700; }
.bar-row .bt { height: 12px; position: relative; background: var(--mist-100); }
.bar-row .bf { position: absolute; inset: 0 auto 0 0; background: var(--navy-900); border-radius: 0 4px 4px 0; min-width: 2px; }
.bar-row .bf.gold { background: var(--gold-500); }
.bar-row .bv { text-align: right; color: var(--navy-900); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums lining-nums; }
.bar-row .bv small { margin-left: .4rem; color: var(--ink-600); font-weight: 600; }

/* ---------- Admin ---------- */
.rule-sentence { display: flex; flex-wrap: wrap; align-items: end; gap: .6rem .75rem; }
.rule-sentence .field { min-width: 10rem; }
.rule-sentence .txt { padding-bottom: .7rem; color: var(--navy-900); font-weight: 700; }
#tabpanel table.t td, table.t td:has(> input, > select) { vertical-align: middle; }
table.t tr.catrow td { background: var(--table-head); }
table.t tr.subrow td:first-child { padding-left: 1.5rem; }

/* ---------- Empty states, toast, footer ---------- */
.empty { display: grid; gap: .5rem; justify-items: start; padding: 1.5rem 1.25rem; background: var(--mist-100); border: 1px solid var(--rule); border-radius: 4px; color: var(--navy-900); }
.toast { position: fixed; left: 50%; bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 50; max-width: calc(100vw - 32px);
  display: flex; align-items: center; gap: .6rem; padding: .7rem 1.1rem; background: var(--navy-950); color: #fff; border-top: 3px solid var(--gold-500); border-radius: 0 0 3px 3px; font-weight: 700; box-shadow: var(--drop); }
.toast.bad { border-top-color: var(--error); }
.loading { padding: 3rem 0; text-align: center; }
.foot { background: var(--navy-950); color: var(--on-navy-muted); font-size: var(--text-small); letter-spacing: .01em; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; padding-block: 1.4rem; }
.foot strong { color: #fff; font-weight: 700; }

/* ---------- Documents (invoice, PO) ---------- */
.docpage { position: relative; overflow: hidden; width: 100%; max-width: 56rem; margin: 0 auto; padding: clamp(1.25rem, 4vw, 2.75rem); background: #fff; color: var(--navy-950); border: 1px solid var(--rule); border-radius: 4px; }
.docpage::after { content: "SAMPLE"; position: absolute; top: 44%; left: 50%; transform: translate(-50%, -50%) rotate(-24deg); font-size: clamp(5rem, 16vw, 10rem); font-weight: 800; letter-spacing: .1em; color: rgba(10, 34, 72, .055); pointer-events: none; }
.docpage h1 { color: var(--navy-900); font-size: var(--text-headline); font-weight: 800; letter-spacing: .02em; }
.docpage .dtop { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: start; gap: 1.5rem; padding-bottom: 1rem; margin-bottom: 1.25rem; border-bottom: 3px solid var(--gold-500); }
.docpage .dtop img { height: 46px; width: auto; }
.docpage .parties { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 1.5rem; margin-bottom: 1.25rem; font-size: var(--text-ui); }
.docpage .parties b { display: block; margin-bottom: .2rem; color: var(--navy-700); font-size: var(--text-small); }
.docpage .tablewrap { background: transparent; }
.docpage .sum { max-width: 24rem; margin: .9rem 0 0 auto; }
.docpage .dfoot { display: grid; gap: .3rem; margin-top: 1.25rem; color: var(--ink-600); font-size: var(--text-small); }

/* ---------- Tablet and phone ---------- */
@media (max-width: 1180px) {
  .site-header__bar { flex-wrap: wrap; row-gap: 0; padding-block: .6rem; }
  .primary-nav { order: 3; flex-basis: 100%; margin: 0; overflow-x: auto; scrollbar-width: none; }
  .who { margin-left: auto; }
}
@media (max-width: 900px) {
  .site-header { position: static; }
  .cols, .cols.wide-side, .rgrid, .finder { grid-template-columns: minmax(0, 1fr); }
  .filters { position: static; }
  .fbox { border: 1px solid var(--rule); border-radius: 4px; background: var(--mist-100); }
  .fbox > summary { display: flex; align-items: center; justify-content: space-between; min-height: 2.75rem; padding: .5rem .9rem; color: var(--navy-900); font-weight: 700; cursor: pointer; list-style: none; }
  .fbox > summary::-webkit-details-marker { display: none; }
  .fbox > summary::after { content: ""; width: .5rem; height: .5rem; margin: 0 .2rem .2rem 0; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
  .fbox[open] > summary::after { margin-bottom: -.2rem; transform: rotate(-135deg); }
  .fbody { padding: 0 .9rem 1rem; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .cat:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .ruled-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pcard.best { grid-template-columns: minmax(0, 1fr); }
  .pcard.best .buy { grid-column: auto; grid-row: auto; padding-left: 0; border-left: 0; padding-top: .8rem; border-top: 1px solid var(--rule); }
}
@media (max-width: 720px) {
  .brand img { width: 8.5rem; }
  .who span { display: none; }
  .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); }
  .cats, .ruled-grid { grid-template-columns: minmax(0, 1fr); }
  .cat + .cat { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); }
  .credentials .wrap { display: block; text-align: center; font-size: var(--text-micro); line-height: 1.5; }
  .credentials .sep { font-size: 0; }
  .credentials .sep::before { content: "·"; margin: 0 .4rem; font-size: var(--text-micro); }
  .credentials button { font-size: var(--text-micro); }
  .primary-nav { overflow: visible; }
  .primary-nav ul { flex-wrap: wrap; column-gap: 1.1rem; row-gap: 0; }
  .tabs { flex-wrap: wrap; overflow: visible; column-gap: 1.25rem; }
  .ruled-grid.two { grid-template-columns: minmax(0, 1fr); }
  .rec-no { font-size: var(--text-title-lg); }
  /* Cart and price check: each row stacks, with its column label beside the value */
  table.t.cart thead, table.t.pcheck thead { display: none; }
  table.t.cart tr, table.t.pcheck tr { display: grid; gap: .5rem .9rem; align-items: center; padding: .85rem 0; border-bottom: 1px solid var(--rule); }
  table.t.cart tr { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  table.t.pcheck tr { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  table.t.cart td, table.t.pcheck td { display: block; padding: 0; border: 0; }
  table.t.cart td:first-child, table.t.pcheck td:first-child, table.t.pcheck td:last-child { grid-column: 1 / -1; }
  table.t.pcheck td.n { text-align: left; }
  table.t.cart td[data-label]::before, table.t.pcheck td[data-label]::before { content: attr(data-label); display: block; color: var(--navy-700); font-size: var(--text-micro); font-weight: 700; }
  table.t.pcheck td:last-child::before { display: none; }
  dl.kv { grid-template-columns: minmax(0, 1fr); }
  dl.kv dd { border-top: 0; padding-top: 0; }
  .timeline li { grid-template-columns: minmax(0, 1fr); }
  .bar-row { grid-template-columns: minmax(0, 1fr) auto; }
  .bar-row .bt { grid-column: 1 / -1; grid-row: 2; }
  .docpage .parties { grid-template-columns: minmax(0, 1fr); }
  .kpis > div:first-child { padding-left: 1.25rem; }
  .kpis > div { border-left: 0; border-top: 1px solid var(--rule); }
}
@media (pointer: coarse) {
  .btn, .btn.sm, .who select, .examples button { min-height: 2.75rem; }
  .btn.icon { width: 2.75rem; min-height: 2.75rem; }
  .primary-nav a { padding-block: .7rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  table.t tr.is-new td { animation: none; background-color: rgba(214, 172, 78, .18); }
}
@media print {
  .site-header, .foot, .no-print, .skip, .toast, .credentials button, .page-head .actions, .breadcrumbs { display: none !important; }
  .credentials { background: none; border-bottom: 1px solid #000; }
  .credentials .sep:has(+ button) { display: none; }
  .credentials .wrap { justify-content: flex-start; padding-inline: 0; }
  .page-head { background: none; border: 0; border-bottom: 2px solid #000; }
  .page-head__inner { padding-inline: 0; }
  .page-head h1, .page-head .t > p, .page-head .contract-tag, .stamp, .stamp small { color: #000 !important; }
  .stamp { border-color: #000; }
  main.page { padding: 0; }
  .docpage { border: 0; max-width: none; }
  .panel, .policy { break-inside: avoid; }
}
