@font-face{font-family:"Archivo";src:url(/fonts/archivo-var.woff2) format("woff2-variations");font-weight:100 900;font-stretch:62% 125%;font-display:swap}
@font-face{font-family:"IBM Plex Mono";src:url(/fonts/ibm-plex-mono-400-normal.woff2) format("woff2");font-weight:400;font-display:swap}
@font-face{font-family:"IBM Plex Mono";src:url(/fonts/ibm-plex-mono-500-normal.woff2) format("woff2");font-weight:500;font-display:swap}
@font-face{font-family:"IBM Plex Mono";src:url(/fonts/ibm-plex-mono-600-normal.woff2) format("woff2");font-weight:600;font-display:swap}
html{color-scheme:light}body{margin:0}img{max-width:100%}
/* Layout concept: a job-site spec sheet. Concrete-grey ground, white work surfaces, hi-vis tape-measure yellow reserved for the primary action and the tape rule. */
:root {
  --bg: #e9ecec;
  --surface: #ffffff;
  --surface-2: #f4f6f6;
  --ink: #121618;
  --ink-2: #434c50;
  --muted: #646f74;
  --line: #d3d9da;
  --line-strong: #aeb7ba;
  --hi: #ffc20e;
  --hi-ink: #121618;
  --hi-soft: #fff1bf;
  --link: #0a59a8;
  --ok: #1d7347;
  --warn: #8f5100;
  --warn-bg: #fff3dc;
  --bad: #b42318;
  --shadow: 0 1px 0 rgba(18,22,24,.06), 0 8px 24px -12px rgba(18,22,24,.18);
  --display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --r: 6px;
  --maxw: 1200px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1213; --surface: #171b1d; --surface-2: #1d2326; --ink: #e8eded; --ink-2: #b6c0c2; --muted: #8a979b;
    --line: #2a3236; --line-strong: #3d484d; --hi: #ffc20e; --hi-ink: #121618; --hi-soft: #3a3011; --link: #82b8ff;
    --ok: #4cc38a; --warn: #f2aa4c; --warn-bg: #2c2210; --bad: #ff7a6e; --shadow: 0 1px 0 rgba(0,0,0,.4), 0 10px 30px -14px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1213; --surface: #171b1d; --surface-2: #1d2326; --ink: #e8eded; --ink-2: #b6c0c2; --muted: #8a979b;
  --line: #2a3236; --line-strong: #3d484d; --hi: #ffc20e; --hi-ink: #121618; --hi-soft: #3a3011; --link: #82b8ff;
  --ok: #4cc38a; --warn: #f2aa4c; --warn-bg: #2c2210; --bad: #ff7a6e; --shadow: 0 1px 0 rgba(0,0,0,.4), 0 10px 30px -14px rgba(0,0,0,.7);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.5; margin: 0; min-height: 100%; }
a { color: var(--link); text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.1; text-wrap: balance; margin: 0; }
h1 { font-variation-settings: "wdth" 75; font-weight: 800; font-size: clamp(30px, 5vw, 46px); letter-spacing: -0.01em; }
h2 { font-variation-settings: "wdth" 80; font-weight: 750; font-size: clamp(22px, 3vw, 28px); }
h3 { font-variation-settings: "wdth" 85; font-weight: 700; font-size: 18px; }
p { margin: 0; }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: 20px; }
@media (max-width: 520px) { .wrap { padding-inline: 16px; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; background: var(--surface); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand-mark { width: 30px; height: 30px; border-radius: 4px; background: var(--hi); display: grid; place-items: center; color: var(--hi-ink); }
.brand-name { font-family: var(--display); font-variation-settings: "wdth" 70; font-weight: 850; font-size: 23px; letter-spacing: .01em; text-transform: uppercase; }
.brand-name b { font-weight: 850; color: var(--muted); }
.nav { display: flex; gap: 2px; margin-left: 8px; }
.nav a { text-decoration: none; color: var(--ink-2); padding: 8px 12px; border-radius: var(--r); font-weight: 550; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); box-shadow: inset 0 -2px 0 var(--hi); }
.badge { font-family: var(--mono); font-size: 11px; background: var(--ink); color: var(--surface); border-radius: 10px; padding: 1px 6px; min-width: 18px; text-align: center; }
.top-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.searchbtn { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); border-radius: var(--r); padding: 7px 10px; cursor: pointer; min-width: 220px; font-size: 14px; }
.searchbtn kbd { margin-left: auto; font-family: var(--mono); font-size: 11px; border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 5px; }
.region { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; }
.region button { border: 0; background: transparent; padding: 6px 10px; font-family: var(--mono); font-size: 13px; font-weight: 600; cursor: pointer; color: var(--muted); }
.region button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.iconbtn { border: 1px solid var(--line); background: transparent; width: 36px; height: 36px; border-radius: var(--r); display: grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.iconbtn:hover { background: var(--surface-2); }
.tape { height: 12px; background-color: var(--hi); background-repeat: no-repeat; background-position: 0 0; border-top: 1px solid rgba(0,0,0,.18); }
.tape.us { background-image: repeating-linear-gradient(90deg, var(--hi-ink) 0 1.5px, transparent 1.5px 48px), repeating-linear-gradient(90deg, var(--hi-ink) 0 1px, transparent 1px 24px), repeating-linear-gradient(90deg, var(--hi-ink) 0 1px, transparent 1px 12px), repeating-linear-gradient(90deg, rgba(18,22,24,.55) 0 1px, transparent 1px 6px); background-size: 100% 100%, 100% 70%, 100% 45%, 100% 28%; }
.tape.uk { background-image: repeating-linear-gradient(90deg, var(--hi-ink) 0 1.5px, transparent 1.5px 40px), repeating-linear-gradient(90deg, var(--hi-ink) 0 1px, transparent 1px 20px), repeating-linear-gradient(90deg, rgba(18,22,24,.55) 0 1px, transparent 1px 4px); background-size: 100% 100%, 100% 60%, 100% 30%; }
@media (max-width: 900px) { .nav, .searchbtn span.lbl, .searchbtn kbd { display: none; } .searchbtn { min-width: 0; padding: 8px; border: 1px solid var(--line); } }
@media (max-width: 520px) { .brand-name { font-size: 20px; } .top-in { gap: 10px; } #themeBtn { display: none; } }

/* bottom nav (phones) */
.bnav { display: none; }
@media (max-width: 900px) {
  .bnav { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .bnav a, .bnav button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 9px; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 600; background: none; border: 0; cursor: pointer; }
  .bnav [aria-current="page"] { color: var(--ink); box-shadow: inset 0 3px 0 var(--hi); }
  body { padding-bottom: 66px; }
}

/* ---------- Generic ---------- */
main { min-height: 60vh; }
.section { padding-block: 36px; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.sec-head p { color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); border-radius: var(--r); padding: 9px 14px; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; line-height: 1.2; white-space: nowrap; }
.btn:hover { border-color: var(--ink-2); }
.btn.primary { background: var(--hi); color: var(--hi-ink); border-color: #d9a400; }
.btn.primary:hover { filter: brightness(.97); border-color: var(--hi-ink); }
.btn.dark { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.small { padding: 6px 10px; font-size: 13.5px; }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; border-radius: 3px; padding: 2px 7px; border: 1px solid var(--line-strong); color: var(--ink-2); white-space: nowrap; }
.pill.draft { border-color: var(--line-strong); }
.pill.sent { border-color: var(--link); color: var(--link); }
.pill.accepted { border-color: var(--ok); color: var(--ok); }
.pill.invoiced { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.pill.lost { color: var(--muted); text-decoration: line-through; }
.crumbs { font-size: 13.5px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; padding-top: 18px; }
.crumbs a { color: var(--muted); }
.ad-live { margin-block: 28px; min-height: 100px; }
.ad { border: 1px dashed var(--line-strong); border-radius: var(--r); min-height: 110px; display: grid; place-items: center; color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; background: repeating-linear-gradient(135deg, transparent 0 10px, var(--surface-2) 10px 20px); margin-block: 28px; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--ink); margin-bottom: 6px; }
.toast-wrap { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; width: min(92vw, 420px); }
@media (max-width: 900px) { .toast-wrap { bottom: 82px; } }
.toast { background: var(--ink); color: var(--surface); padding: 11px 14px; border-radius: var(--r); box-shadow: var(--shadow); font-size: 14.5px; display: flex; align-items: center; gap: 12px; }
.toast a { color: var(--hi); font-weight: 650; margin-left: auto; }
@media (prefers-reduced-motion: no-preference) { .toast { animation: tin .18s ease-out; } @keyframes tin { from { transform: translateY(8px); opacity: 0; } } }

/* ---------- Home ---------- */
.hero { padding-block: 40px 28px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 36px; align-items: center; }
.hero h1 { font-size: clamp(38px, 6.2vw, 68px); text-transform: uppercase; line-height: .95; letter-spacing: -.005em; }
.hero h1 em { font-style: normal; background: linear-gradient(transparent 62%, var(--hi) 62% 92%, transparent 92%); padding-inline: 2px; }
.hero .lede { font-size: 18px; color: var(--ink-2); max-width: 52ch; margin-top: 16px; }
.hsearch { margin-top: 22px; position: relative; max-width: 560px; }
.hsearch input { width: 100%; font-size: 17px; padding: 14px 16px 14px 46px; border: 2px solid var(--ink); border-radius: var(--r); background: var(--surface); }
.hsearch svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.hstats { display: flex; gap: 22px; margin-top: 18px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.hstats b { font-family: var(--mono); color: var(--ink); font-size: 15px; }
.ticket { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.ticket-h { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.ticket-b { padding: 16px; display: grid; gap: 12px; }
.ticket .big { font-size: 40px; }
.ticket-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; border-top: 1px dashed var(--line); padding-top: 8px; }
.ticket-row span:last-child { font-family: var(--mono); }
.ticket-f { padding: 12px 16px; background: var(--surface-2); border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; gap: 26px; } }
.trades { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.trade { display: grid; grid-template-columns: 44px 1fr; gap: 4px 14px; padding: 16px; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); align-items: start; transition: border-color .12s; }
.trade:hover { border-color: var(--ink); }
.trade .ic { grid-row: span 2; width: 44px; height: 44px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink); }
.trade:hover .ic { background: var(--hi); border-color: var(--hi); color: var(--hi-ink); }
.trade h3 { font-size: 18px; display: flex; justify-content: space-between; gap: 8px; }
.trade h3 .num { font-size: 12px; color: var(--muted); font-weight: 500; align-self: center; }
.trade p { font-size: 13.5px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); padding: 7px 12px; border-radius: 20px; font-size: 14px; font-weight: 550; }
.chip:hover { border-color: var(--ink); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.step { padding: 22px; border-right: 1px solid var(--line); }
.step:last-child { border-right: 0; }
.step .n { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.step h3 { margin: 6px 0 6px; font-size: 21px; }
.step p { color: var(--ink-2); font-size: 15px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } .step { border-right: 0; border-bottom: 1px solid var(--line); } .step:last-child { border-bottom: 0; } }
.glist { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.gcard { display: flex; flex-direction: column; gap: 8px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); }
.gcard:hover { border-color: var(--ink); }
.gcard h3 { font-size: 19px; }
.gcard p { font-size: 14.5px; color: var(--ink-2); }
.gcard .eyebrow { margin-top: auto; padding-top: 6px; }

/* ---------- Calculator list ---------- */
.clist { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.citem { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); }
.citem:hover { border-color: var(--ink); }
.citem b { font-weight: 650; font-size: 16px; }
.citem span { font-size: 13.5px; color: var(--muted); }
.catblock { margin-bottom: 30px; }
.catblock h2 { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; font-size: 22px; }

/* ---------- Calculator page ---------- */
.chead { padding-block: 10px 22px; display: flex; gap: 20px; justify-content: space-between; align-items: end; flex-wrap: wrap; }
.chead p { color: var(--ink-2); margin-top: 8px; font-size: 17px; max-width: 60ch; }
.cgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 20px; align-items: start; }
@media (max-width: 920px) { .cgrid { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.panel-h { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); gap: 10px; }
.panel-b { padding: 18px; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
@media (max-width: 520px) { .form { grid-template-columns: 1fr; } }
.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fld.wide { grid-column: 1 / -1; }
.fld > label, .fld > .lbl { font-size: 13.5px; font-weight: 650; color: var(--ink-2); }
.ctl { display: flex; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.ctl:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px var(--hi-soft); }
.ctl input, .ctl select { border: 0; background: transparent; padding: 10px 12px; min-width: 0; outline: none; }
.ctl input { flex: 1; font-family: var(--mono); font-size: 16px; width: 100%; }
.ctl select { font-size: 14px; color: var(--ink-2); }
.ctl .unit { border-left: 1px solid var(--line); background: var(--surface-2); max-width: 46%; }
.ctl .adorn { display: grid; place-items: center; padding: 0 12px; background: var(--surface-2); color: var(--muted); font-family: var(--mono); font-size: 14px; border-left: 1px solid var(--line); }
.ctl .adorn.pre { border-left: 0; border-right: 1px solid var(--line); }
.ctl select.full { width: 100%; color: var(--ink); font-size: 15px; }
.fld small { font-size: 12.5px; color: var(--muted); }
.fld small.err { color: var(--bad); font-weight: 600; }
.fld.has-err .ctl { border-color: var(--bad); }
.seg { display: flex; border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.seg button { flex: 1; border: 0; border-right: 1px solid var(--line); background: transparent; padding: 9px 8px; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--ink-2); min-width: 0; }
.seg button:last-child { border-right: 0; }
.seg button[aria-checked="true"] { background: var(--ink); color: var(--surface); }
.switch { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; min-height: 42px; }
.switch input { appearance: none; width: 40px; height: 24px; border-radius: 12px; background: var(--line-strong); position: relative; cursor: pointer; flex-shrink: 0; margin: 0; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); transition: left .15s; }
.switch input:checked { background: var(--ink); }
.switch input:checked::after { left: 19px; background: var(--hi); }
.readout { position: sticky; top: 90px; }
@media (max-width: 920px) { .readout { position: static; } }
.rmain { padding: 18px; border-bottom: 1px solid var(--line); display: grid; gap: 14px; background: linear-gradient(var(--surface), var(--surface-2)); }
.rmain .lab { font-size: 13px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.big { font-family: var(--mono); font-weight: 600; font-size: clamp(30px, 4.4vw, 44px); line-height: 1.05; letter-spacing: -.02em; overflow-wrap: anywhere; }
.rmain .sub { font-family: var(--mono); font-size: 14px; color: var(--ink-2); margin-top: 4px; }
.rows { margin: 0; padding: 6px 18px; }
.rows > div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px; }
.rows > div:last-child { border-bottom: 0; }
.rows dt { color: var(--ink-2); }
.rows dd { margin: 0; font-family: var(--mono); text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; min-width: 0; }
.alert { margin: 12px 18px; padding: 10px 12px; border-radius: 4px; font-size: 14px; background: var(--warn-bg); color: var(--ink); border-left: 4px solid var(--warn); }
.note { margin: 12px 18px; font-size: 13.5px; color: var(--muted); }
.mats { border-top: 1px solid var(--line); }
.mats h3 { padding: 14px 18px 6px; font-size: 16px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.mats h3 a { font-family: var(--body); font-size: 13px; font-weight: 600; }
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th { text-align: left; font-size: 12px; font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl td.n, .tbl th.n { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: 0; }
.mats .tbl td:first-child, .mats .tbl th:first-child { padding-left: 18px; }
.mats .tbl td:last-child, .mats .tbl th:last-child { padding-right: 18px; }
.mtotal { display: flex; justify-content: space-between; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface-2); font-weight: 650; gap: 12px; }
.mtotal span:last-child { font-family: var(--mono); }
.ractions { padding: 14px 18px 18px; display: grid; gap: 10px; border-top: 1px solid var(--line); }
.ractions .btn.primary { width: 100%; padding: 12px; font-size: 16px; }
.ractions .btns .btn { flex: 1; }
.errbox { padding: 26px 18px; color: var(--muted); }

/* guide */
.guide { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 36px; padding-block: 18px 30px; }
@media (max-width: 920px) { .guide { grid-template-columns: 1fr; } }
.prose { max-width: 72ch; }
.prose h2 { margin: 30px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 22px 0 8px; font-size: 19px; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; color: var(--ink-2); font-size: 16.5px; line-height: 1.65; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--ink); }
.prose .formula, .prose code { font-family: var(--mono); font-size: 14.5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 15px; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.prose th { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 500; }
.prose blockquote { margin: 0 0 16px; padding: 12px 16px; border-left: 4px solid var(--hi); background: var(--surface); color: var(--ink); font-size: 16px; }
.example { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; margin-bottom: 16px; }
.example dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 10px 0 0; font-size: 15px; }
.example dt { color: var(--muted); }
.example dd { margin: 0; font-family: var(--mono); }
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 650; color: var(--ink); }
.faq details p { margin-top: 8px; }
.side { display: grid; gap: 16px; align-content: start; }
.side .card { padding: 16px; }
.side h3 { font-size: 15px; margin-bottom: 10px; }
.side ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.side li a { text-decoration: none; font-size: 15px; }
.side li a:hover { text-decoration: underline; }

/* ---------- Article ---------- */
.art-head { padding-block: 12px 24px; max-width: 72ch; }
.art-head p { font-size: 19px; color: var(--ink-2); margin-top: 12px; }
.art-meta { margin-top: 14px; display: flex; gap: 14px; flex-wrap: wrap; }
.toc a { font-size: 14.5px; }

/* ---------- Jobs ---------- */
.jlist { display: grid; gap: 10px; }
.jrow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); }
.jrow:hover { border-color: var(--ink); }
.jrow b { font-size: 17px; display: block; }
.jrow small { color: var(--muted); font-size: 13.5px; }
.jrow .num { font-size: 16px; font-weight: 600; text-align: right; }
@media (max-width: 560px) { .jrow { grid-template-columns: 1fr auto; } .jrow .pill { grid-column: 1; justify-self: start; } }
.jgrid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 980px) { .jgrid { grid-template-columns: 1fr; } }
.jcol { display: grid; gap: 16px; min-width: 0; }
.sec-card .panel-h h3 { font-size: 17px; }
.jt td { padding: 6px 6px; }
.jt input { width: 100%; border: 1px solid transparent; background: transparent; padding: 6px 6px; border-radius: 4px; min-width: 0; }
.jt input:hover { border-color: var(--line); }
.jt input:focus { border-color: var(--ink); background: var(--surface); outline: none; }
.jt input.n { text-align: right; font-family: var(--mono); }
.jt .c-name { min-width: 180px; }
.jt .c-q { width: 90px; } .jt .c-u { width: 90px; } .jt .c-p { width: 110px; } .jt .c-t { width: 110px; } .jt .c-x { width: 36px; }
.xbtn { border: 0; background: transparent; color: var(--muted); cursor: pointer; width: 30px; height: 30px; border-radius: 4px; }
.xbtn:hover { background: var(--surface-2); color: var(--bad); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 14px; }
@media (max-width: 560px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.tf { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.tf label { font-size: 13px; font-weight: 650; color: var(--ink-2); }
.tf input, .tf select, .tf textarea { border: 1px solid var(--line-strong); border-radius: var(--r); padding: 9px 11px; background: var(--surface); min-width: 0; width: 100%; }
.tf textarea { min-height: 96px; resize: vertical; }
.tf input:focus, .tf select:focus, .tf textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px var(--hi-soft); }
.tf.span2 { grid-column: 1 / -1; }
.totals { position: sticky; top: 90px; }
@media (max-width: 980px) { .totals { position: static; } }
.tot-rows > div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 18px; font-size: 15px; }
.tot-rows > div span:last-child { font-family: var(--mono); }
.tot-rows .grand { border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 12px; font-weight: 750; font-size: 19px; }
.tot-rows .muted { color: var(--muted); font-size: 14px; }

/* quote doc */
.qwrap { padding-block: 20px 40px; }
.qbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.qdoc { background: #fff; color: #15191b; max-width: 860px; margin: 0 auto; border-radius: 4px; box-shadow: var(--shadow); padding: clamp(20px, 5vw, 56px); font-size: 14.5px; border: 1px solid var(--line); }
.qdoc .qtop { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; border-bottom: 3px solid #15191b; padding-bottom: 18px; }
.qdoc .qbiz { display: flex; gap: 16px; align-items: flex-start; min-width: 0; }
.qdoc .qbiz img { max-width: 120px; max-height: 70px; object-fit: contain; }
.qdoc .qbiz b { font-size: 20px; font-family: var(--display); font-variation-settings: "wdth" 80; display: block; }
.qdoc .qbiz div { color: #4a5357; font-size: 13px; line-height: 1.45; }
.qdoc .qtitle { text-align: right; }
.qdoc .qtitle h2 { font-size: 34px; text-transform: uppercase; font-variation-settings: "wdth" 70; letter-spacing: .02em; }
.qdoc .qtitle .mono { font-size: 13px; color: #4a5357; margin-top: 4px; }
.qdoc .qparties { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding-block: 18px; }
@media (max-width: 560px) { .qdoc .qparties { grid-template-columns: 1fr; } .qdoc .qtitle { text-align: left; } }
.qdoc .qparties h4 { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #6b757a; margin-bottom: 4px; font-weight: 500; }
.qdoc table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.qdoc th { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; text-align: left; color: #6b757a; font-weight: 500; border-bottom: 1.5px solid #15191b; padding: 8px 6px; }
.qdoc td { padding: 8px 6px; border-bottom: 1px solid #e3e7e8; vertical-align: top; }
.qdoc td.n, .qdoc th.n { text-align: right; font-family: var(--mono); white-space: nowrap; }
.qdoc tr.sec td { font-weight: 700; background: #f3f5f5; border-bottom: 1px solid #d3d9da; }
.qdoc .qtot { margin-left: auto; width: min(100%, 330px); margin-top: 16px; }
.qdoc .qtot div { display: flex; justify-content: space-between; padding: 5px 0; }
.qdoc .qtot div span:last-child { font-family: var(--mono); }
.qdoc .qtot .g { border-top: 2px solid #15191b; margin-top: 4px; padding-top: 9px; font-weight: 800; font-size: 18px; }
.qdoc .qnotes { margin-top: 26px; display: grid; gap: 14px; font-size: 13.5px; color: #3b4347; white-space: pre-wrap; }
.qdoc .qnotes h4 { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #6b757a; font-weight: 500; }
.qdoc .qsign { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 34px; font-size: 12.5px; color: #6b757a; }
.qdoc .qsign div { border-top: 1px solid #15191b; padding-top: 6px; }

/* ---------- Modal & palette ---------- */
.scrim { position: fixed; inset: 0; background: rgba(10,12,13,.55); z-index: 80; display: grid; place-items: start center; padding: 10vh 16px 16px; }
.modal { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; width: min(560px, 100%); box-shadow: var(--shadow); max-height: 80vh; display: flex; flex-direction: column; overflow: hidden; }
.modal-h { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.modal-b { padding: 16px 18px; overflow: auto; display: grid; gap: 12px; }
.modal-f { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; background: var(--surface-2); flex-wrap: wrap; }
.pick { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; }
.pick:has(input:checked) { border-color: var(--ink); background: var(--hi-soft); }
.pick small { color: var(--muted); margin-left: auto; font-family: var(--mono); }
.pal input { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 16px 18px; font-size: 17px; background: transparent; outline: none; }
.pal ul { list-style: none; margin: 0; padding: 6px; overflow: auto; }
.pal li a { display: flex; gap: 10px; align-items: baseline; padding: 10px 12px; border-radius: var(--r); text-decoration: none; color: var(--ink); }
.pal li a small { color: var(--muted); margin-left: auto; font-size: 12.5px; white-space: nowrap; }
.pal li a.on, .pal li a:hover { background: var(--hi-soft); }
.pal .hint { padding: 10px 18px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); }
.hs-drop { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 6px; }
.hs-drop a { display: flex; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 4px; text-decoration: none; color: var(--ink); }
.hs-drop a small { color: var(--muted); }
.hs-drop a:hover, .hs-drop a.on { background: var(--hi-soft); }

/* ---------- Footer ---------- */
.foot { margin-top: 40px; background: #111517; color: #c9d1d3; border-top: 1px solid var(--line); }
.foot a { color: #e8eded; text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot-in { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; padding-block: 36px 22px; }
.foot h4 { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: #8a979b; margin-bottom: 10px; font-weight: 500; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 14.5px; }
.foot p { font-size: 14px; line-height: 1.6; max-width: 40ch; }
.foot .brand-name { color: #fff; }
.foot-b { border-top: 1px solid #2a3236; padding-block: 16px; font-size: 13px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; color: #8a979b; }
@media (max-width: 760px) { .foot-in { grid-template-columns: 1fr 1fr; } .foot-in > :first-child { grid-column: 1 / -1; } }

/* static */
.static { max-width: 760px; padding-block: 10px 40px; }
.static h1 { margin-bottom: 16px; }
.pricetbl input { width: 120px; text-align: right; font-family: var(--mono); border: 1px solid var(--line-strong); border-radius: 4px; padding: 6px 8px; background: var(--surface); }
.logo-prev { width: 140px; height: 80px; border: 1px dashed var(--line-strong); border-radius: var(--r); display: grid; place-items: center; overflow: hidden; background: #fff; color: #6b757a; font-size: 12px; }
.logo-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
