@font-face{font-family:'Montserrat';font-style:normal;font-weight:600;font-display:swap;src:url(/assets/montserrat-600.woff2?v=uj8hdp) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}@font-face{font-family:'Montserrat';font-style:normal;font-weight:700;font-display:swap;src:url(/assets/montserrat-600.woff2?v=uj8hdp) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}@font-face{font-family:'Source Sans 3';font-style:normal;font-weight:400;font-display:swap;src:url(/assets/source-sans-3-400.woff2?v=g1p126) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}@font-face{font-family:'Source Sans 3';font-style:normal;font-weight:600;font-display:swap;src:url(/assets/source-sans-3-400.woff2?v=g1p126) format('woff2');unicode-range:U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;}

:root {
  /* --blue is the ACCENT: links, active nav, headings, icon strokes. It moves
     with the theme and goes lighter in dark mode.
     --brand-fill is the SOLID: anything with white text sitting on it. It must
     stay dark enough for that text in both themes, so the two cannot be one
     token - lightening the accent for dark mode would put white on pale blue. */
  --blue: #006898;
  --brand-fill: #006898;
  --blue-deep: #00537A;
  --blue-tint: #E8F4F9;
  --tint-line: #CFE4EF;
  --cyan: #00B0D8;
  /* Same split as --blue / --brand-fill. --green is the accent (savings figures,
     the live-stock tick); --green-fill is the solid behind white button text,
     and is darker because #469C15 under white is 3.9:1 and the dark theme's
     lighter green was 2.7:1 - both short of the 4.5:1 small text needs. */
  --green: #469C15;
  --green-fill: #357A0F;
  --red: #C4211F;
  --amber: #B26A00;
  --ground: #DCE5EC;
  --surface: #FFFFFF;
  --surface-2: #F7FBFD;
  --ink: #13242E;
  --muted: #5D7284;
  --line: #DBE7EE;
  --line-strong: #BFD2DE;
  --ok-bg: #E6F3DE; --ok-ink: #35750F;
  --low-bg: #FBEFD9; --low-ink: #8A5200;
  --out-bg: #EDF1F4; --out-ink: #77879A;
  --shadow: 0 1px 2px rgba(0,60,90,.07), 0 12px 28px -20px rgba(0,60,90,.45);

  /* Page container width. Both .wrap and .megawrap read this, so the page and
     the mega menu can never drift to different widths. */
  --page: 96rem;

  /* Corner rounding, in one place on purpose. Every boxed surface on every page
     reads from --radius, so the whole site retunes by changing this one number.
     --radius-sm is for controls sitting inside a rounded box, which need a
     tighter curve or they read as bulging out of it; --radius-lg is the hero,
     which the concept mockup gives a deliberately larger curve. */
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --display: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --body: "Source Sans 3", "Segoe UI", Helvetica, Arial, sans-serif;
  /* System monospace. IBM Plex Mono was dropped: it appeared only on SKUs and
     figures, where the platform face is near-indistinguishable, and it cost
     14.7KB and a request on every first visit. */
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

/* ---------- dark theme ----------
   Only the palette changes; not one layout rule is duplicated. The switch sets
   data-theme on <html>, and "no choice yet" follows the operating system.
   Solid brand fills stay dark (see --brand-fill) so the white text on them is
   unchanged, while the accent lightens to stay readable on a dark ground. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark;
    --blue: #5CBFEA; --brand-fill: #0E4A69; --blue-deep: #0A2E42;
    --blue-tint: #12303F; --tint-line: #1E4257; --cyan: #35C9EC;
    --green: #57B22B; --green-fill: #357A0F; --red: #E4635F; --amber: #D99425;
    --ground: #0B1620; --surface: #132330; --surface-2: #182C3A;
    --ink: #E7EFF5; --muted: #93A9B9; --line: #22394A; --line-strong: #34505F;
    --ok-bg: #14301A; --ok-ink: #8FD86A;
    --low-bg: #33280F; --low-ink: #E0B45C;
    --out-bg: #1E2A33; --out-ink: #8FA3B3;
    --shadow: 0 1px 2px rgba(0,0,0,.45), 0 12px 28px -20px rgba(0,0,0,.9); }
}
:root[data-theme="dark"] { color-scheme: dark;
  --blue: #5CBFEA; --brand-fill: #0E4A69; --blue-deep: #0A2E42;
  --blue-tint: #12303F; --tint-line: #1E4257; --cyan: #35C9EC;
  --green: #57B22B; --green-fill: #357A0F; --red: #E4635F; --amber: #D99425;
  --ground: #0B1620; --surface: #132330; --surface-2: #182C3A;
  --ink: #E7EFF5; --muted: #93A9B9; --line: #22394A; --line-strong: #34505F;
  --ok-bg: #14301A; --ok-ink: #8FD86A;
  --low-bg: #33280F; --low-ink: #E0B45C;
  --out-bg: #1E2A33; --out-ink: #8FA3B3;
  --shadow: 0 1px 2px rgba(0,0,0,.45), 0 12px 28px -20px rgba(0,0,0,.9); }


* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); }
.wrap { max-width: 110rem; margin: 0 auto; padding: 0 1.25rem; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.muted { color: var(--muted); }
h1, h2, h3 { font-family: var(--display); letter-spacing: .01em; margin: 0; text-wrap: balance; }
h1 { font-size: 1.35rem; }
h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .7rem; }

.utility { background: var(--brand-fill); color: #fff; }
.utility .wrap { display: flex; align-items: center; justify-content: flex-end; gap: 1.2rem; min-height: 2.4rem; font-size: .82rem; }
.utility a { color: #fff; text-decoration: none; opacity: .9; }
.utility a:hover { opacity: 1; text-decoration: underline; }
.utility .who { opacity: .8; }
.themeswitch { background: none; border: 0; padding: .3rem; cursor: pointer; color: #fff; opacity: .85; display: inline-flex; border-radius: var(--radius-sm); }
.themeswitch:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.themeswitch .ico-sun { display: none; }
:root[data-theme="dark"] .themeswitch .ico-moon { display: none; }
:root[data-theme="dark"] .themeswitch .ico-sun { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .themeswitch .ico-moon { display: none; } :root:not([data-theme="light"]) .themeswitch .ico-sun { display: block; } }

.masthead { background: var(--surface); border-bottom: 1px solid var(--line); }
.masthead .wrap { display: flex; align-items: center; gap: 1rem; min-height: 4.2rem; }
.brand { display: inline-flex; align-items: center; gap: .9rem; text-decoration: none; color: var(--ink); }
.brand img { height: 2.1rem; display: block; }
.brand .app { font-family: var(--display); font-weight: 700; font-size: 1rem; padding-left: .9rem; border-left: 1px solid var(--line-strong); line-height: 1; }
.brand .app small { display: block; font-family: var(--mono); font-weight: 500; font-size: .6rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: .35rem; }
.masthead .push { margin-left: auto; }
.chip { display: inline-flex; align-items: center; gap: .4rem; font-family: var(--mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; padding: .3rem .6rem; border-radius: 999px; border: 1px solid var(--tint-line); background: var(--blue-tint); color: var(--blue); }
.chip .dot { width: .45rem; height: .45rem; border-radius: 50%; background: var(--amber); }

main { padding: 1.5rem 0 4rem; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.25rem; }
.stack { display: flex; flex-direction: column; gap: 1rem; }

.btn { font-family: var(--display); font-weight: 600; font-size: .74rem; letter-spacing: .05em; text-transform: uppercase; padding: .7rem 1.2rem; border-radius: var(--radius-sm); border: 1px solid transparent; text-decoration: none; display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; line-height: 1; background: var(--surface); color: var(--blue); border-color: var(--line-strong); }
.btn-green { background: var(--green-fill); color: #fff; border-color: transparent; }
.btn-blue { background: var(--brand-fill); color: #fff; border-color: transparent; }
.btn-quiet { background: none; border-color: transparent; padding-left: .4rem; padding-right: .4rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

input[type=text], input[type=date], input[type=number], select, textarea { font: inherit; font-size: .9rem; padding: .45rem .55rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); width: 100%; }
textarea { font-family: var(--mono); font-size: .8rem; min-height: 5.5rem; }
label { display: block; font-size: .78rem; color: var(--muted); margin-bottom: .2rem; }

/* queue */
.tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.tab { text-decoration: none; padding: .5rem .9rem; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font-size: .86rem; display: inline-flex; gap: .5rem; align-items: center; }
.tab[aria-current] { background: var(--brand-fill); color: #fff; border-color: transparent; }
.tab .n { font-family: var(--mono); font-size: .75rem; opacity: .75; }
.queue-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem; justify-content: space-between; margin-bottom: 1rem; }
.upload { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.upload input[type=file] { font-size: .85rem; color: var(--ink); }
/* The browser's own "Choose Files" button ignores the dark theme: styled with the tokens instead. */
.upload input[type=file]::file-selector-button { font: inherit; font-size: .82rem; font-weight: 600; margin-right: .6rem; padding: .4rem .8rem; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--blue); cursor: pointer; }
.upload input[type=file]::file-selector-button:hover { border-color: var(--blue); }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th { text-align: left; font-family: var(--mono); font-weight: 500; font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: .55rem .6rem; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
td { padding: .6rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tr.row-link { cursor: pointer; }
tr.row-link:hover td { background: var(--surface-2); }
.empty { padding: 2.5rem 1rem; text-align: center; color: var(--muted); }

.pill { display: inline-block; font-family: var(--mono); font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; padding: .2rem .5rem; border-radius: 4px; white-space: nowrap; background: var(--out-bg); color: var(--out-ink); }
.pill.ok { background: var(--ok-bg); color: var(--ok-ink); }
.pill.warn { background: var(--low-bg); color: var(--low-ink); }
.pill.bad { background: color-mix(in srgb, var(--red) 14%, var(--surface)); color: var(--red); }
.pill.info { background: var(--blue-tint); color: var(--blue); }

/* review */
.review { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 1.25rem; align-items: start; }
@media (max-width: 70rem) { .review { grid-template-columns: 1fr; } }
.pdf { position: sticky; top: 1rem; height: calc(100vh - 2rem); min-height: 36rem; padding: 0; overflow: hidden; }
.pdf object, .pdf iframe { width: 100%; height: 100%; border: 0; display: block; }
.back-link { display: inline-block; margin: 0 0 .6rem; font-size: .88rem; text-decoration: none; color: var(--blue); }
.back-link:hover { text-decoration: underline; }
.doc-head { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; align-items: baseline; margin-bottom: 1rem; }
.doc-head .meta { color: var(--muted); font-size: .85rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .8rem 1.2rem; }
.facts div span { display: block; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.facts div b { font-weight: 600; }
.issues { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.issues li { padding: .55rem .75rem; border-radius: var(--radius-sm); font-size: .88rem; border-left: 3px solid var(--line-strong); background: var(--surface-2); }
.issues li.block { border-left-color: var(--red); background: color-mix(in srgb, var(--red) 8%, var(--surface)); }
.issues li.warn { border-left-color: var(--amber); background: var(--low-bg); color: var(--ink); }
.issues li.info { border-left-color: var(--blue); }
.lines td.issue { padding-top: 0; border-top: 0; font-size: .8rem; }
.lines tr.has-issue td { border-bottom: 0; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.ack { display: flex; gap: .5rem; align-items: flex-start; font-size: .88rem; color: var(--ink); margin: 0 0 .8rem; }
.ack input { margin-top: .2rem; }
.flash { padding: .7rem .9rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: .9rem; }
.flash.ok { background: var(--ok-bg); color: var(--ok-ink); }
.flash.bad { background: color-mix(in srgb, var(--red) 12%, var(--surface)); color: var(--red); }
.inline-form { display: flex; gap: .5rem; align-items: flex-end; flex-wrap: wrap; }
.inline-form > div { flex: 1 1 10rem; }
details summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem 1rem; }
.grid2 .full { grid-column: 1 / -1; }
.log { font-size: .82rem; }
.log td { padding: .35rem .5rem; }

.spinner { width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
.busy-note { font-size: .85rem; color: var(--muted); margin-left: .6rem; }
.price-choices { margin: 0 0 .9rem; }
.po-search { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; margin: 0 0 .8rem; }
.po-search input[type=search] { font: inherit; font-size: .9rem; padding: .5rem .65rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); width: min(26rem, 100%); }
.batch-bar { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; margin: 0 0 .8rem; }
.pick-all { display: flex; gap: .4rem; align-items: center; margin: 0; font-size: .88rem; }
th.pick, td.pick { width: 2.2rem; text-align: center; cursor: default; }
td.pick input, .pick-all input { width: 1.05rem; height: 1.05rem; }
.price-flag { font-size: .75rem; color: var(--low-ink); font-weight: 600; }
.batch-run { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.price-choice { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .55rem .7rem; margin: 0 0 .45rem; font-size: .88rem; }
.price-own { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-top: .4rem; color: var(--muted); font-size: .85rem; }
.price-own input { width: 7.5rem; }
.margin-out { font-family: var(--mono); color: var(--ink); }
.margin-out.below { color: var(--red); }
.login { max-width: 30rem; margin: 3rem auto; }
.login p { margin: .6rem 0 1.2rem; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
footer .wrap { padding: 1.2rem 1.25rem; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
