/* tenders.ldp.net — built to the TEN-4 canvas (claude/TEN-design). Self-hosted fonts (OFL), no third-party requests. */

@font-face { font-family: "PT Sans"; src: url("../fonts/PTSans-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "PT Sans"; src: url("../fonts/PTSans-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Jost"; src: url("../fonts/Jost-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Jost"; src: url("../fonts/Jost-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Source Code Pro"; src: url("../fonts/SourceCodePro-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Code Pro"; src: url("../fonts/SourceCodePro-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

/* ---------- tokens: light, then dark by preference or by choice (user menu) ----------
   The tender palette (TEN-D, DJ 2026-10-26), a subset that does not apply back up to the website or deLighter: gold
   lives in the LDP logo only. Text is ink (light) or 0.9 grey (dark); colour only indicates — compliance, progress,
   deadlines, scan state — solid, never a wash. --hl is a neutral highlight, not a gold tint. */
:root {
  color-scheme: light;
  --bg: #FFFFFF; --ink: #16191D; --sub: #555B62; --line: #D5D9DE; --field: #8A9097;
  --hl: #ECEEF0; --soft: #F4F5F6; --input-bg: #FFFFFF; --thumb-bg: #F4F5F6; --on-ink: #FFFFFF;
  --g-ok: #2E7D57; --g-err: #A63A2C; --g-info: #2C6A84; --g-warn: #B7791F; --g-faint: #8A9097; --g-on-fill: #FFFFFF; --g-on-warn: #16191D;
  --mono: "Source Code Pro", ui-monospace, monospace;
  --label: "Jost", "PT Sans", sans-serif;
  /* navigation colour (board H, DJ 2026-10-27): the tabs and prev/next only; the tender palette otherwise holds */
  --nav: #1F5FA8; --nav-soft: #DCE8F6; --on-nav: #FFFFFF;
  /* group bars, register style, shaded by progress */
  --bar: #F3F5F7; --bar-head: #FAFBFC; --shade-ok: #D6ECDF; --shade-warn: #F4DFC7; --shade-err: #F0D3CE;
  /* the type scale of the spec work (board H): prose, interface, data, labels, headings, the code on the rule */
  --t-prose: 13.3px; --t-ui: 12px; --t-data: 10.5px; --t-label: 10px; --t-head: 15px; --t-code: 30px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #000000; --ink: #E6E6E6; --sub: #A6A6A6; --line: #2A2E33; --field: #3A3F45;
    --hl: #1A1C20; --soft: #0C0D0F; --input-bg: #0C0D0F; --thumb-bg: #16181B; --on-ink: #000000;
    --g-ok: #5BBF8A; --g-err: #E06A5E; --g-info: #7FB8CE; --g-warn: #E0A84E; --g-faint: #6B7178; --g-on-fill: #0C0D0F; --g-on-warn: #0C0D0F;
    --nav: #8FB7E6; --nav-soft: #13243A; --on-nav: #000000;
    --bar: #0F1215; --bar-head: #0A0C0E; --shade-ok: #12291D; --shade-warn: #2E2213; --shade-err: #2E1714;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000; --ink: #E6E6E6; --sub: #A6A6A6; --line: #2A2E33; --field: #3A3F45;
  --hl: #1A1C20; --soft: #0C0D0F; --input-bg: #0C0D0F; --thumb-bg: #16181B; --on-ink: #000000;
  --g-ok: #5BBF8A; --g-err: #E06A5E; --g-info: #7FB8CE; --g-warn: #E0A84E; --g-faint: #6B7178; --g-on-fill: #0C0D0F; --g-on-warn: #0C0D0F;
  --nav: #8FB7E6; --nav-soft: #13243A; --on-nav: #000000;
  --bar: #0F1215; --bar-head: #0A0C0E; --shade-ok: #12291D; --shade-warn: #2E2213; --shade-err: #2E1714;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); accent-color: var(--ink); font-family: "PT Sans", system-ui, sans-serif; font-size: var(--t-prose); line-height: 1.4; }
a { color: inherit; }
a:hover { text-decoration: underline; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--ink); outline-offset: 2px;
}
h1 { margin: 0; font-size: var(--t-head); line-height: 1.3; font-weight: 700; }
h2, h3 { font-size: var(--t-head); }
h2.label, .label { margin: 0; font-family: var(--label); font-size: var(--t-label); font-weight: 600; letter-spacing: 1.8px; color: var(--sub); text-transform: uppercase; }
.code, .ref { font-family: var(--mono); }
.ref { font-weight: 600; }
.sub { color: var(--sub); }
.small { font-size: var(--t-ui); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.struck { text-decoration: line-through; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.glyph { display: inline-block; flex: 0 0 18px; vertical-align: middle; }
.with-glyph { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: var(--t-ui); padding: 7px 14px; border: 1px solid var(--ink);
  background: transparent; color: var(--ink); text-decoration: none; cursor: pointer; }
.btn:hover { text-decoration: none; background: var(--soft); }
.btn.quiet { border-color: var(--line); }
.btn.dashed { border-style: dashed; border-color: var(--sub); }
.btn.primary { border: 1px solid var(--ink); background: var(--ink); color: var(--on-ink); font-weight: 700; font-size: var(--t-prose); padding: 8px 18px; }
.btn.primary:hover { background: var(--ink); filter: opacity(0.88); }
.btn.danger { border-color: var(--g-err); color: var(--g-err); }
.btn[disabled] { border-color: var(--line); color: var(--sub); background: transparent; cursor: not-allowed; filter: none; }
.field { display: flex; flex-direction: column; gap: 4px; font-family: var(--label); font-size: var(--t-label); letter-spacing: 1px; text-transform: uppercase; color: var(--sub); }
.field input, .field select, input.answer, textarea {
  font-family: "PT Sans", system-ui, sans-serif; font-size: var(--t-prose); letter-spacing: 0; text-transform: none; padding: 5px 8px;
  border: 1px solid var(--field); border-radius: 0; background: var(--input-bg); color: var(--ink); width: 100%;
}
input.answer { font-family: var(--mono); font-size: var(--t-data); padding: 2px 6px; max-width: 220px; }
.field input[readonly] { border-style: dashed; }
.amount-box { display: flex; align-items: stretch; }
.amount-box .code-label { display: flex; align-items: center; padding: 0 8px; border: 1px solid var(--field); border-right: 0; font-family: var(--mono); font-size: var(--t-data); color: var(--sub); background: var(--soft); }
.amount-box input { text-align: right; }
.computed { font-family: var(--mono); font-size: var(--t-data); padding: 6px 8px; border: 1px dashed var(--line); color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; min-height: 30px; }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { margin-top: 5px; }
.save-state { font-size: var(--t-ui); color: var(--sub); min-height: 21px; }
.save-state[data-state="error"], .message.error { color: var(--g-err); }

/* ---------- the frame and the flag (DJ 2026-11-10) ----------
   the header and the rule are one frame that never scrolls; the page scrolls under it. The flag is the original
   full-bleed flag, flush left at the top of the frame, clear of the rule (DJ: "the rule should not touch the logo").
   Everything below it starts under the leg of the L: --gutter is the L's stem, 131 px across the 319 × 88 px
   ldp-header-logo.png (3.625 : 1), so the left margin shrinks to the flag's own letter. 56 px, 42 px from 560 px
   down. --frame-h is the frame's height, set by portal.js, for anything
   that sticks or scrolls into view under it. */
:root { --logo-h: 56px; --flag-top: calc(1.44 * var(--logo-h)); --frame-h: 0px; }   /* the flag's drop from the top of the window: 1.44 x its height, as on www.LDP.net (F1; DJ 2026-11-10) */
html { scroll-padding-top: calc(var(--frame-h) + 12px); }
.topframe { position: sticky; top: 0; z-index: 50; background: var(--bg); }
.ten-flag { position: absolute; left: 0; top: var(--flag-top); z-index: 2; display: block; line-height: 0; }
.ten-flag img { display: block; height: var(--logo-h); width: auto; }
.ten-flag:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- masthead ---------- */
.masthead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
  min-height: var(--logo-h); padding: var(--flag-top) 40px 18px calc(319 / 88 * var(--logo-h) + 28px);
  border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 28px; text-decoration: none; }
.brand .word { font-family: var(--label); font-size: 14px; letter-spacing: 4px; }
.usermenu { position: relative; font-size: 14px; }
.usermenu > summary { list-style: none; cursor: pointer; display: flex; gap: 8px; align-items: baseline; padding: 6px 0; }
.usermenu > summary::-webkit-details-marker { display: none; }
.usermenu > summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid var(--sub); border-bottom: 1.5px solid var(--sub); transform: translateY(-3px) rotate(45deg); }
.usermenu .panel { position: absolute; right: 0; top: 100%; z-index: 10; min-width: 280px; display: flex; flex-direction: column; gap: 16px;
  padding: 18px 20px; background: var(--bg); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.choice { display: flex; flex-direction: column; gap: 8px; }
.choice .options { display: flex; flex-wrap: wrap; gap: 8px; }
.choice button { font: inherit; font-size: 14px; padding: 6px 10px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; }
.choice button[aria-pressed="true"] { border-color: var(--ink); font-weight: 700; }

/* ---------- the tender frame (board H, the spec work; every tender page, vendor and staff, DJ 2026-10-28) ----------
   the flag at the left; the document block in mono and the revision QR at the right, no rules inside; then a 3 px ink
   rule carrying the project and client at its left, opposite the page's title (or the luminaire code) at its right
   (DJ 2026-11-10: "the project name can drop to the rule opposite the lum code"); then the tabs in the navigation colour. */
.masthead.tender { justify-content: flex-end; align-items: flex-start; flex-wrap: nowrap; gap: 24px; border-bottom: 0;
  min-height: calc(var(--logo-h) + 12px); padding-top: var(--flag-top); padding-bottom: 12px; position: relative; }
.tender-id { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 14px; padding-bottom: 5px; }
.tender-id .project { font-size: var(--t-head); line-height: 1.2; }
.tender-id .client { font-family: var(--label); font-size: var(--t-label); letter-spacing: 1.6px; text-transform: uppercase; color: var(--sub); }
.tender-doc { flex: 0 0 auto; display: flex; gap: 14px; align-items: flex-start; }
.tender-doc dl { margin: 0; display: grid; grid-template-columns: auto auto; gap: 5px 10px; align-content: start; line-height: 1;
  font-family: var(--mono); font-size: var(--t-data); }
.tender-doc dl .title { grid-column: 1 / -1; margin: 0 0 3px; font-family: "PT Sans", system-ui, sans-serif; font-size: var(--t-head); font-weight: 700; }
.tender-doc dt { color: var(--sub); }
.tender-doc dd { margin: 0; white-space: nowrap; }
.tender-doc .doc-qr { display: block; width: 70px; height: 70px; background: #FFFFFF; overflow: hidden; font-size: 8px; color: var(--sub); }
.deadline { display: inline-flex; align-items: center; gap: 4px; }
.deadline .glyph { width: 12px; height: 12px; flex-basis: 12px; }
.deadline.near { color: var(--g-warn); }
.deadline.past { color: var(--g-err); }
/* the user menu sits above the header at the right, out of the board's way */
.masthead.tender .usermenu { position: absolute; top: 14px; right: 40px; }
.masthead.tender .usermenu > summary { white-space: nowrap; font-size: var(--t-ui); }
.masthead.tender .usermenu > summary .sub { display: none; }

:root { --gutter: calc(131 / 88 * var(--logo-h)); }
.rule { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; min-height: 36px; margin: 0 40px 0 var(--gutter); border-bottom: 3px solid var(--ink); }
.rule-title { flex: 0 0 auto; }
.rule-title { font-family: var(--label); font-size: 20px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; line-height: 1; padding-bottom: 5px; }
.rule-title.code { font: 400 var(--t-code)/1 var(--mono); letter-spacing: -0.5px; text-transform: none; padding-bottom: 3px; }

/* ---------- tabs: under the rule, screen only, in the navigation colour (board H) ---------- */
nav.tabs { display: flex; align-items: center; gap: 16px; padding: 8px 40px 8px var(--gutter); background: var(--bg); }
nav.tabs ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
nav.tabs ul::-webkit-scrollbar { display: none; }
nav.tabs .tab { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; white-space: nowrap; text-decoration: none;
  font-family: var(--label); font-size: var(--t-label); letter-spacing: 1.4px; text-transform: uppercase; background: var(--nav-soft); color: var(--nav); }
nav.tabs .tab .glyph { width: 12px; height: 12px; flex-basis: 12px; }
nav.tabs a.tab:hover { text-decoration: none; filter: brightness(0.96); }
nav.tabs a.tab[aria-current="page"] { background: var(--nav); color: var(--on-nav); font-weight: 600; }
nav.tabs a.tab:focus-visible { outline: 2px solid var(--nav); outline-offset: 2px; }
nav.tabs .tab.locked { background: var(--soft); color: var(--sub); cursor: not-allowed; }
nav.tabs .meta { font-family: var(--mono); letter-spacing: 0; text-transform: none; opacity: .8; }
nav.tabs .saved { flex: 0 0 auto; font-size: var(--t-ui); }

.page { min-width: 0; padding: 32px 40px 72px var(--gutter); display: flex; flex-direction: column; gap: 32px; }
.page.narrow > * { max-width: 760px; }
.head { display: flex; flex-direction: column; gap: 8px; }
.banner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 18px 20px; background: var(--hl); }
.banner > span { flex: 1 1 420px; }
.banner.soft { background: var(--soft); }
.flash { padding: 14px 18px; border-left: 3px solid var(--ink); background: var(--soft); }

/* ---------- tables ---------- */
.scroll { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.grid { width: 100%; border-collapse: collapse; font-size: var(--t-ui); }
table.grid thead th { text-align: left; color: var(--sub); font-family: var(--label); font-size: var(--t-label); font-weight: 400; letter-spacing: 1px;
  text-transform: uppercase; padding: 4px 8px; background: var(--bar-head); border-bottom: 1px solid var(--line); }
table.grid td { padding: 5px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.grid td.code, table.grid .num { font-family: var(--mono); font-size: var(--t-data); }
table.grid th:first-child, table.grid td:first-child { padding-left: 0; }
table.grid th:last-child, table.grid td:last-child { padding-right: 0; }
table.grid tr.changed td, table.grid tr.changed th { background: var(--hl); }
table.grid tr.withdrawn { opacity: .5; }
table.grid tr.withdrawn .ref, table.grid tr.withdrawn .name { text-decoration: line-through; }
table.grid tbody th { font-weight: 400; text-align: left; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); }
.lum-index { min-width: 860px; }
.thumb { display: block; width: 56px; height: 56px; object-fit: contain; background: #FFFFFF; border: 1px solid var(--line); }
.thumb-empty { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border: 1px dashed var(--line); color: var(--sub); font-size: 11px; }
.counts { display: flex; flex-wrap: wrap; gap: 14px; }
.counts span { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.total { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--ink); }
.tally { display: flex; flex-wrap: wrap; gap: 24px; font-size: var(--t-ui); }
.tally strong { font-size: var(--t-head); }
.key { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 24px; font-size: var(--t-ui); }
.two { display: flex; flex-wrap: wrap; gap: 48px; }
.two > * { flex: 1 1 300px; display: flex; flex-direction: column; gap: 14px; }

/* ---------- index: rows per page and the pager (TEN-D) ---------- */
.rows { display: inline-flex; align-items: center; gap: 0; margin-left: auto; font-size: var(--t-ui); }
.rows .sub { margin-right: 10px; }
.rows a { padding: 3px 10px; border: 1px solid var(--line); border-left-width: 0; text-decoration: none; }
.rows a:first-of-type { border-left-width: 1px; }
.rows a[aria-current="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 12px 0 0; }
.pager .pages { display: flex; gap: 12px; }

/* ---------- text pages: the text scrolls in its own pane, with a clear, wide scroll bar ---------- */
.textpane { max-height: calc(100vh - 300px); min-height: 320px; overflow-y: scroll; padding: 8px 24px 8px 0;
  display: flex; flex-direction: column; gap: 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  scrollbar-width: auto; scrollbar-color: var(--field) var(--soft); }
.textpane::-webkit-scrollbar { width: 14px; }
.textpane::-webkit-scrollbar-track { background: var(--soft); }
.textpane::-webkit-scrollbar-thumb { background: var(--field); border: 3px solid var(--soft); }
.textpane:focus-visible { outline-offset: 4px; }

/* ---------- offline form ---------- */
.offline-step { display: flex; gap: 16px; align-items: flex-start; padding-top: 20px; border-top: 1px solid var(--line); }
.offline-step .glyph { margin-top: 2px; }
.drop-zone { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 20px; border: 1px dashed var(--field); }
.drop-zone.over { border-style: solid; background: var(--soft); }

/* ---------- specification page (board H, the spec work, DJ 2026-10-27) ----------
   prev / next in the side margins in the navigation colour; the code on the rule (frame); the description and facts
   with the images at the right; group bars, register style, shaded by progress; compact mono rows; the offer last. */
.specwrap { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 12px; margin: 0 -24px 0 -56px; }
.edge { position: sticky; top: calc(var(--frame-h) + 8px); height: calc(100vh - var(--frame-h) - 24px); max-height: 760px; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 6px; color: var(--nav); text-decoration: none; font-size: var(--t-label); writing-mode: vertical-rl; }
.edge svg { writing-mode: horizontal-tb; width: 26px; height: 26px; }
.edge.prev span { transform: rotate(180deg); }
.edge:hover { background: var(--nav-soft); text-decoration: none; }
.edge.none { background: transparent; }
.spec-body { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.ident { display: grid; grid-template-columns: minmax(0, 1fr) 128px; gap: 14px; align-items: start; }
.ident .pic { order: 2; display: flex; flex-direction: column; gap: 6px; }
.ident .drawing { display: flex; align-items: center; justify-content: center; width: 128px; height: 128px; object-fit: contain; background: #FFFFFF; border: 1px solid var(--line); }
.ident .lum-code { margin: 0; font: 600 var(--t-head)/1.2 var(--mono); }
.ident .desc { margin: 6px 0 0; font-size: var(--t-prose); line-height: 18px; max-width: 600px; }
.ident .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; margin-top: 8px; color: var(--sub); }
.ident .meta strong { color: var(--ink); }
.gallery { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.gallery a { display: block; }
.gallery img { width: 40px; height: 40px; object-fit: contain; background: #FFFFFF; border: 1px solid var(--line); }
.qr { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: var(--t-label); color: var(--sub); }
.qr img, .qr .qr-empty { display: flex; align-items: center; justify-content: center; width: 70px; height: 70px; padding: 4px; background: #FFFFFF; border: 1px solid var(--line); }
.qr .qr-empty { color: #555B62; font-family: var(--mono); font-size: var(--t-label); border-style: dashed; }
.sections { display: flex; flex-direction: column; gap: 10px; }
details.sec > summary { position: relative; list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; height: 22px; padding: 0 8px;
  background: var(--bar); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
details.sec > summary::-webkit-details-marker { display: none; }
details.sec > summary > :not(.shade) { position: relative; }
details.sec > summary .shade { position: absolute; inset: 0; display: flex; }
details.sec > summary .shade .ok { width: var(--ok); background: var(--shade-ok); }
details.sec > summary .shade .warn { width: var(--warn); background: var(--shade-warn); }
details.sec > summary .shade .err { width: var(--err); background: var(--shade-err); }
details.sec > summary .glyph { width: 12px; height: 12px; flex-basis: 12px; }
details.sec > summary .name { font-family: var(--label); font-size: var(--t-data); font-weight: 600; letter-spacing: 1.8px; text-transform: uppercase; }
details.sec > summary .counts { margin-left: auto; gap: 10px; font-family: var(--mono); font-size: var(--t-data); }
details.sec > summary .caret { color: var(--sub); transition: transform .15s ease; }
details.sec[open] > summary .caret { transform: rotate(90deg); }
details.sec > .scroll { padding: 0; }
/* wide enough for the table: no scroll box (a rounding pixel would draw a bar); phones keep it */
@media (min-width: 761px) { details.sec > .scroll { overflow-x: visible; } }
.crit-table { min-width: 520px; table-layout: fixed; }
.crit-table thead th { font-size: 8px; letter-spacing: 1px; padding: 2px 4px; }
.crit-table td, .crit-table tbody th { padding: 2px 4px; font-size: var(--t-data); }
.crit-table tbody th { font-family: "PT Sans", system-ui, sans-serif; font-size: var(--t-ui); }
.crit-table td:nth-child(3) { font-family: var(--mono); }
/* one column grid for every section, so the columns line up down the page */
.crit-table th.mark, .crit-table td.mark { width: 16px; padding-right: 0; }
.crit-table td.mark .glyph { width: 12px; height: 12px; }
.crit-table th:nth-child(2) { width: 26%; }
.crit-table th:nth-child(3) { width: 32%; }
.crit-table th:nth-child(5) { width: 22px; }
.crit-table td.result { width: 22px; padding-right: 0; }
.crit-table .result .glyph { width: 14px; height: 14px; }
.crit-table form[data-autosave] { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.crit-table .save-state { min-height: 0; font-size: var(--t-label); }
.crit-table input[type=file] { font-size: var(--t-label); max-width: 100%; }
.crit-table .was { color: var(--sub); text-decoration: line-through; margin-left: 6px; }
.crit-table .evidence { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 3px; font-size: var(--t-label); color: var(--sub); }
.offer { display: flex; flex-direction: column; gap: 16px; padding: 14px; border: 1px solid var(--ink); }
.offer-files { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
@media (prefers-reduced-motion: reduce) { details.sec > summary .caret { transition: none; } }

/* the staff side's read-only luminaire page keeps its two-column layout */
.spec { flex: 1 1 300px; max-width: 360px; display: flex; flex-direction: column; gap: 14px; }
/* the diagram and the polar curve side by side, one size: half the old 360 px (DJ 2026-11-10) */
.spec .figs { display: flex; flex-wrap: wrap; gap: 8px; }
.spec .drawing { display: block; width: 176px; max-width: calc(50% - 4px); aspect-ratio: 1 / 1; object-fit: contain; background: #FFFFFF; border: 1px solid var(--line); }
.offer-col { flex: 2 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 36px; }
.crit-group + .crit-group { margin-top: 24px; }
.crit-group h3 { margin: 0 0 8px; font-size: 14px; font-weight: 700; }
.sample { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border: 1px solid var(--line); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px 20px; }
.grid-2 > h2, .grid-5 > h2 { grid-column: 1 / -1; }
.files { display: flex; flex-wrap: wrap; gap: 20px; }
.file { margin: 0; width: 148px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.file .tile { position: relative; width: 148px; height: 148px; border: 1px solid var(--line); background: var(--thumb-bg);
  display: flex; align-items: center; justify-content: center; overflow: hidden; }
.file .tile img { width: 100%; height: 100%; object-fit: cover; }
.file .tile .type { position: absolute; left: 6px; bottom: 6px; padding: 1px 6px; background: var(--ink); color: var(--bg); font-family: var(--mono); font-size: 13px; }
.file .page-sketch { width: 92px; height: 124px; background: #FFFFFF; border: 1px solid #D5D9DE; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.file .page-sketch span { display: block; height: 3px; background: #C9CDD2; }
.file .page-sketch span:first-child { height: 38px; background: #E8EAED; }
.file figcaption { display: flex; flex-direction: column; gap: 4px; }
.file .name { font-family: var(--mono); word-break: break-all; }
.file .meta { display: flex; align-items: center; gap: 6px; color: var(--sub); }
.file .meta form { margin-left: auto; }
.icon-btn { width: 28px; height: 28px; border: 0; background: transparent; color: var(--sub); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.add-file { width: 148px; min-height: 148px; border: 1px dashed var(--sub); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 10px; font-size: 14px; color: var(--sub); text-align: center; }
.add-file input[type=file] { width: 100%; font-size: 12px; }
.sample { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border: 1px solid var(--line); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding-top: 24px; border-top: 1px solid var(--line); }

/* ---------- agreement, notes, review, confirmation ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.steps li { display: flex; align-items: center; gap: 12px; padding-top: 14px; border-top: 2px solid var(--line); }
.steps li[aria-current="step"] { border-top-color: var(--ink); font-weight: 700; }
.agreement-doc { width: 100%; height: 520px; border: 1px solid var(--line); background: var(--soft); }
.offer-choice { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.offer-choice legend { margin-bottom: 4px; }
.file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.file-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.decline-box { display: flex; flex-direction: column; gap: 12px; padding-top: 24px; border-top: 1px solid var(--line); }
.agreement-text { height: 200px; overflow-y: auto; padding: 20px 24px; border: 1px solid var(--line); background: var(--soft); font-size: 14px; color: var(--sub); }
.sign { display: flex; flex-wrap: wrap; gap: 32px; }
.sign > * { flex: 1 1 340px; display: flex; flex-direction: column; gap: 16px; }
.sign > .paper { flex-basis: 280px; padding-left: 32px; border-left: 1px solid var(--line); }
.sign h3 { margin: 0; font-size: 16px; }
.notes details { border-top: 1px solid var(--line); }
.notes details:last-of-type { border-bottom: 1px solid var(--line); }
.notes summary { display: flex; align-items: baseline; gap: 16px; padding: 14px 0; list-style: none; cursor: pointer; }
.notes summary::-webkit-details-marker { display: none; }
.notes summary .n { font-family: var(--mono); width: 28px; color: var(--sub); }
.notes summary strong { flex: 1; }
.notes .clauses { padding: 0 0 20px 44px; display: flex; flex-direction: column; gap: 10px; }
.notes .clauses p { margin: 0; }
.checks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 32px; }
.checks > div { display: flex; gap: 12px; align-items: flex-start; padding-top: 14px; border-top: 1px solid var(--line); }
.checks > div > div { display: flex; flex-direction: column; }
.submit-box { display: flex; flex-direction: column; gap: 18px; padding: 24px; background: var(--soft); }
.receipt { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.receipt > div { padding: 14px 0; border-top: 1px solid var(--line); }
.receipt dt { font-size: 14px; color: var(--sub); }
.receipt dd { margin: 2px 0 0; word-break: break-all; }
.diff td.from { color: var(--sub); text-decoration: line-through; }
.problems { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

/* ---------- plain pages (staff side: tenders list, offer status, invited vendors, privacy) ----------
   in the tender frame's geometry (DJ 2026-11-19): the header space of .masthead.tender with nothing beside the flag,
   the rule with the page's name at its right, and the content under the leg of the L, as .page. */
.masthead.plain-head { min-height: calc(var(--flag-top) + var(--logo-h) + 20px); }   /* = a tender header with its document block (157 px at 56 px) */
.plain { padding: 32px 40px 72px var(--gutter); }
.plain:not(.wide) > * { max-width: 960px; }
.plain.wide { display: flex; flex-direction: column; gap: 32px; }
.faint { color: var(--g-faint); }
.state { font-family: var(--label); font-size: var(--t-label); letter-spacing: 1.2px; text-transform: uppercase; }
.state.open { color: var(--g-ok); }
.state.closed { color: var(--sub); }

/* ---------- the register (the tenders list): ProjectManager's fileman grid on the web ----------
   one header strip, then a band per project (caret, bar, label in caps, count, next date right). Columns line up
   because the strip and every band share one colgroup with table-layout: fixed. Rows 26 px min, 13 px text, hairlines
   only, no stripes; the sorted column shows an arrow. */
.register { min-width: 0; }
.register table { width: 100%; min-width: 900px; table-layout: fixed; border-collapse: collapse; }
.register-head th { height: 24px; padding: 0 10px; text-align: left; background: var(--bar-head); border-bottom: 1px solid var(--line);
  font-family: var(--label); font-size: var(--t-label); font-weight: 400; letter-spacing: 1.3px; text-transform: uppercase; color: var(--g-faint); }
.register-head th.num { text-align: right; }
.register-head a.sort { color: inherit; text-decoration: none; display: inline-flex; gap: 6px; align-items: baseline; }
.register-head a.sort:hover, .register-head a.sort:focus-visible { color: var(--ink); }
.register-head .arrow { color: var(--ink); font-size: 10px; }
.band > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 22px; padding: 0 8px;
  background: var(--bar); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band > summary::-webkit-details-marker { display: none; }
.band > summary:hover { background: var(--hl); }
.band .caret { font-size: 10px; color: var(--sub); transition: transform .15s ease; }
.band:not([open]) .caret { transform: rotate(-90deg); }
.band .bar { width: 6px; height: 6px; align-self: center; background: var(--ink); }
.band-label { font-family: var(--label); font-size: var(--t-label); font-weight: 600; letter-spacing: 1.8px; text-transform: uppercase; color: var(--ink); }
.band-meta { font-family: var(--mono); font-size: var(--t-data); color: var(--sub); }
.band-meta.right { margin-left: auto; }
.register-rows td, .register-rows th { font-size: var(--t-ui); height: 20px; padding: 2px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; text-align: left; }
.register-rows td.num, .register-rows th.num { text-align: right; }
.register-rows tbody tr:hover { background: var(--hl); }
@media (prefers-reduced-motion: reduce) { .band .caret { transition: none; } }

/* ---------- phone width ---------- */
@media (max-width: 560px) {
  :root { --logo-h: 42px; }
  /* beside the flag there is room for the name only; the tier and organisation stay inside the menu */
  .usermenu > summary .sub { display: none; }
}
@media (max-width: 760px) {
  .masthead { padding-right: 16px; padding-bottom: 16px; }
  .brand { gap: 16px; }
  .agreement-doc { height: 420px; }
  /* the flag stands above the header on phones, so the header, rule and tabs run the full width under it */
  :root { --gutter: 16px; }
  .masthead { padding-left: 16px; padding-top: calc(var(--flag-top) + var(--logo-h) + 12px); }
  .masthead.tender { flex-wrap: wrap; padding-left: 16px; padding-top: calc(var(--flag-top) + var(--logo-h) + 12px); padding-bottom: 8px; }
  .masthead.tender .usermenu { right: 16px; }
  .tender-doc { width: 100%; justify-content: space-between; }
  .rule { margin: 0 16px; }
  .rule-title { font-size: 16px; letter-spacing: 2px; }
  .rule-title.code { font-size: 24px; }
  nav.tabs { padding-right: 0; }
  /* 16 px in fields on phones, or iOS zooms the page on focus */
  .field input, .field select, input.answer, textarea { font-size: 16px; }
  nav.tabs .saved { display: none; }
  .page { padding: 24px 16px 56px; gap: 28px; }
  .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .checks, .receipt, .steps, .key { grid-template-columns: 1fr; }
  .sign > .paper { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); padding-top: 24px; }
  .usermenu .panel { right: -16px; min-width: 0; width: calc(100vw - 32px); }
  .two { gap: 32px; }
  .specwrap { grid-template-columns: 24px minmax(0, 1fr) 24px; gap: 6px; margin: 0 -16px; }
  .edge { font-size: 0; }
  .ident { grid-template-columns: 1fr; }
  .ident .pic { order: 0; }
  .ident .drawing { width: 96px; height: 96px; }
  .offer { padding: 12px; }
  .textpane { max-height: 70vh; padding-right: 12px; }
}

/* The agreement issued as text (DJ 2026-11-19), in the luminaire specification's format: labelled clause bands, the
   clauses scrolling between the fixed header and a signature pane frozen at the foot of the window. */
.nda-doc { display: flex; flex-direction: column; gap: 14px; max-width: 820px; padding-bottom: 8px; }
.nda-clause { display: flex; flex-direction: column; gap: 8px; }
.nda-label { margin: 0; padding: 6px 10px; background: var(--bar); font-family: var(--label); font-size: var(--t-label); font-weight: 600;
  letter-spacing: 1.8px; text-transform: uppercase; color: var(--sub); }
.nda-label .num { margin-right: 14px; }
.nda-p { margin: 0; max-width: 72ch; }
.nda-p.marked { display: grid; grid-template-columns: 34px minmax(0, 1fr); }
.nda-p .fill { background: var(--hl); padding: 0 2px; }
.nda-sign { position: sticky; bottom: 0; z-index: 5; background: var(--bg); border-top: 3px solid var(--ink); padding: 14px 0 16px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.nda-sign .who { display: flex; flex-direction: column; gap: 2px; min-width: 260px; flex: 1 1 320px; }
.nda-sign .who strong { font-size: var(--t-head); }
.nda-sign form { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.nda-sign .fp { font-family: var(--mono); font-size: var(--t-data); color: var(--sub); overflow-wrap: anywhere; }
.nda-details { display: flex; flex-direction: column; gap: 16px; max-width: 720px; }
.nda-details textarea { min-height: 72px; }

/* ---------- privacy policy (DJ 2026-11-19) and the footer that links it ---------- */
.policy { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.policy h1 { margin: 0; }
.policy h2.label { margin-top: 20px; }
.policy p, .policy ul { margin: 0; }
.policy ul { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.policy-table { overflow-x: auto; }
.policy table.grid td { vertical-align: top; }
.site-foot { padding: 24px 16px 32px; text-align: center; }
.site-foot a { color: inherit; }
