/* 0. Fonts — IBM Plex, SIL Open Font Licence (fonts/OFL.txt), served from this site */
@font-face { font-family: "IBM Plex Serif"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/IBMPlexSerif-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/IBMPlexSerif-Italic.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/IBMPlexSans-Regular.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/IBMPlexSans-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/IBMPlexMono-Regular.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/IBMPlexMono-SemiBold.woff2") format("woff2"); }

/* 1. Tokens — site-office palette: navy, hi-vis orange, and status colours that mean what they mean in the product */
/* 1. Tokens — site-office palette */
:root {
  color-scheme: light;
  --ink: #13212e;
  --ink-2: #1c2f40;
  --paper: #f7f3ea;
  --wash: #ebe5d8;
  --card: #ffffff;
  --text: #16202a;
  --muted: #4a5561;
  --slate: #9fb1c2;
  --line: #ddd5c6;
  --hivis: #f26a21;
  --hivis-deep: #c8511a;
  --link: #b3470f;
  --red: #b42318;
  --amber: #f5a524;
  --amber-text: #9a5b00;
  --teal: #0e7c66;
  --wrap: 74rem;
  --measure: 66ch;
  --serif: "IBM Plex Serif", Charter, "Bitstream Charter", Cambria, Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}

/* 2. Base */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); color: var(--text); }
body { margin: 0; font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6; }
a { color: var(--link); text-underline-offset: 0.18em; }
a:focus-visible { outline: 3px solid var(--hivis); outline-offset: 3px; }
p { margin: 0 0 1rem; }
h1, h2, h3, .wordmark, .dk-title, .kicker-num { font-family: var(--serif); font-weight: 600; line-height: 1.18; margin: 0; }
.vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 0.75rem; top: 0.75rem; padding: 0.35rem 0.6rem; background: var(--paper); color: var(--ink); transform: translateY(-300%); z-index: 2; }
.skip:focus { transform: none; }

/* 3. Bands — the page is a stack of full-width bands; each one carries an object */
.band { padding: 4rem 0; }
.band > .inner { width: min(100% - 2rem, var(--wrap)); margin: 0 auto; }
.band--ink { background: var(--ink); color: var(--paper); }
.band--ink-2 { background: var(--ink-2); color: var(--paper); }
.band--paper { background: var(--paper); }
.band--wash { background: var(--wash); }
.band--hivis { background: var(--hivis); color: var(--ink); }
.band--ink a, .band--ink-2 a { color: #ffb48a; }
.band--ink .muted, .band--ink-2 .muted { color: var(--slate); }
.band--hivis a { color: var(--ink); }
.band--hivis .muted { color: #4a2410; }
.muted { color: var(--muted); }

/* 4. Header and footer */
.site-header { background: var(--ink); color: var(--paper); }
.site-header .inner { width: min(100% - 2rem, var(--wrap)); margin: 0 auto; padding: 1.1rem 0; display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; }
.wordmark { font-size: 1.45rem; color: var(--paper); text-decoration: none; }
.wordmark::after { content: ""; display: inline-block; width: 0.42em; height: 0.42em; margin-left: 0.14em; background: var(--hivis); }
.site-nav { display: flex; gap: 1.2rem; font-size: 0.95rem; }
.site-nav a { color: var(--paper); text-decoration: none; white-space: nowrap; padding-bottom: 0.15rem; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--hivis); }
.site-footer { background: var(--ink); color: var(--slate); font-size: 0.9rem; }
.site-footer .inner { width: min(100% - 2rem, var(--wrap)); margin: 0 auto; padding: 1.25rem 0 2rem; border-top: 1px solid #2a3d50; }
.site-footer p { margin: 0; }

/* 5. Section rhythm — number, clock, heading, lead, prose */
.kicker { display: flex; align-items: baseline; gap: 0.8rem; margin-bottom: 0.9rem; font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; }
.kicker-num { font-family: var(--mono); font-weight: 600; color: var(--hivis); }
.band--hivis .kicker-num { color: var(--ink); }
.band h1 { font-size: clamp(2.3rem, 1.3rem + 4vw, 4.2rem); letter-spacing: -0.02em; margin-bottom: 1.1rem; }
.band h2 { font-size: clamp(1.7rem, 1.25rem + 1.6vw, 2.5rem); letter-spacing: -0.015em; margin-bottom: 1rem; max-width: 22ch; }
.lead { font-family: var(--serif); font-size: 1.32rem; line-height: 1.4; font-weight: 600; max-width: 30ch; margin: 0 0 1.1rem; }
.prose { max-width: var(--measure); }
.scene { font-family: var(--serif); font-style: italic; font-size: 1.2rem; line-height: 1.45; border-left: 4px solid var(--hivis); padding: 0.1rem 0 0.1rem 1rem; margin: 0 0 1.1rem; }
.band--hivis .scene { border-left-color: var(--ink); }
.two { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 62rem) { .two { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 4rem; } .two.flip > .dk, .two.flip > figure { order: -1; } }

/* 6. Hero */
.hero .two { align-items: center; }
.hero .strap { font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--hivis); margin-bottom: 1.2rem; }
.hero .prose p { font-size: 1.12rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.9rem 1.4rem; align-items: center; margin: 1.6rem 0 1.2rem; }
.btn { display: inline-block; background: var(--hivis); color: var(--ink); font-weight: 600; font-size: 1.08rem; text-decoration: none; padding: 0.85rem 1.4rem; border-radius: 3px; }
.btn:hover { background: #ff7d36; }
.band--hivis .btn { background: var(--ink); color: var(--paper); }
.band--hivis .btn:hover { background: var(--ink-2); }
.trust { font-size: 0.95rem; color: var(--slate); margin: 0; }

/* 7. Dockets — every object is a document with an ink header */
.dk { background: var(--card); color: var(--text); border-radius: 4px; overflow: hidden; box-shadow: 0 14px 34px rgba(19, 33, 46, 0.18); }
.band--ink .dk, .band--ink-2 .dk { box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4); }
.dk-head { background: var(--ink); color: var(--paper); padding: 0.75rem 1.2rem; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.dk-head .dk-title { font-size: 1.05rem; color: var(--paper); }
.dk-head .dk-when { font-family: var(--mono); font-size: 0.8rem; color: var(--slate); white-space: nowrap; }
.dk--client .dk-head { background: var(--teal); }
.dk--client .dk-head .dk-when { color: #cdeee6; }
.dk-body { padding: 1.1rem 1.2rem 1.2rem; }
.dk figcaption, .dk .cap { margin: 0.9rem 1.2rem 1rem; color: var(--muted); font-size: 0.86rem; }
.dk table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.dk th, .dk td { padding: 0.5rem 0; border-bottom: 1px solid var(--line); vertical-align: baseline; font-weight: 400; text-align: left; }
.dk td:last-child { text-align: right; font-family: var(--mono); font-size: 0.92em; white-space: nowrap; }
.dk td.l { text-align: left; font-family: var(--sans); font-size: 1em; white-space: normal; }
.dk tr.total th, .dk tr.total td { border-bottom: 0; border-top: 2px solid var(--text); font-weight: 600; padding-top: 0.6rem; }
.dk tr:last-child td, .dk tr:last-child th { border-bottom: 0; }
.tag { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 2px; font-family: var(--sans); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.tag--red { background: var(--red); color: #fff; }
.tag--amber { background: var(--amber); color: var(--ink); }
.tag--teal { background: var(--teal); color: #fff; }
.tag--ink { background: var(--ink); color: #fff; }
.tag--hivis { background: var(--hivis); color: var(--ink); }
.tag--quiet { background: var(--wash); color: var(--muted); }
.num-red { color: var(--red); font-weight: 600; }
.num-amber { color: var(--amber-text); font-weight: 600; }
.unknown { display: inline-block; margin-left: 0.4rem; padding: 0.05rem 0.45rem; background: var(--amber); color: var(--ink); font-family: var(--sans); font-weight: 600; border-radius: 2px; }

/* 8. The morning board */
.board { margin: 0; }
.board dt { display: inline-block; margin: 0.9rem 0 0.35rem; }
.board dt:first-child { margin-top: 0; }
.board dd { margin: 0; padding: 0.35rem 0 0.45rem; border-bottom: 1px solid var(--line); }
.board dd .rest { display: block; font-family: var(--mono); font-size: 0.78rem; color: var(--muted); margin-top: 0.15rem; }

/* 9. Grids of small dockets */
.grid { display: grid; gap: 1.2rem; }
@media (min-width: 40rem) { .grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 62rem) { .grid--4 { grid-template-columns: repeat(4, 1fr); } .grid--3 { grid-template-columns: repeat(3, 1fr); } }
.mini { background: var(--card); color: var(--text); border-radius: 4px; padding: 1rem 1.1rem 1.1rem; border-top: 4px solid var(--hivis); }
.mini h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.mini p { margin: 0 0 0.5rem; font-size: 0.97rem; }
.mini .rest { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.mini dl { margin: 0; }
.mini dt { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 0.55rem; }
.mini dd { margin: 0; font-family: var(--mono); font-size: 0.9rem; }

/* 10. Track — stages as tags */
.track { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; margin: 0.3rem 0 0; padding: 0; list-style: none; }
.track li { white-space: nowrap; padding: 0.3rem 0.65rem; font-size: 0.9rem; border: 1px solid var(--line); border-radius: 2px; color: var(--muted); background: var(--paper); }
.track li.done { background: var(--teal); border-color: var(--teal); color: #fff; }
.track li.now { background: var(--hivis); border-color: var(--hivis); color: var(--ink); font-weight: 600; }

/* 11. Pieces table (workshop) */
.pieces td.st { text-align: left; font-family: var(--sans); white-space: normal; }

/* 12. Portfolio strip */
.strip th:first-child { width: 40%; }

/* 13. Close */
.close .two { align-items: center; }
.agenda { margin: 0; padding: 0; list-style: none; counter-reset: a; }
.agenda li { counter-increment: a; padding: 0.6rem 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 2.2rem 1fr; gap: 0.6rem; }
.agenda li::before { content: counter(a, decimal-leading-zero); font-family: var(--mono); color: var(--hivis); font-weight: 600; }
.agenda li:last-child { border-bottom: 0; }
.mail { font-family: var(--mono); font-size: 1.05rem; }

@media (max-width: 36rem) {
  .band { padding: 2.8rem 0; }
  .site-nav { gap: 0.8rem; font-size: 0.82rem; }
  .dk td:last-child { white-space: normal; }
}
