/* Zert landing page. Built from prototype E (branch prototype/landing-variants). */

:root {
  --zert-green: #00a368;
  --green-mid: #46d387;
  --ink: #191919;
  --paper: #fcfcfc;
  --coral: #ff5c38;
  --coral-ink: #c63a1a; /* coral darkened for text/lines on paper (contrast) */
  --g-606: #606060;
  --g-909: #909090;
  --g-d4: #d4d4d4;
  --g-f5: #f5f5f5;
  --line-dark: rgba(252, 252, 252, .14);
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --max: 1280px;
  --gut: 24px;
  --pad-y: clamp(4.5rem, 10vw, 8.5rem);
}
@media (max-width: 640px) { :root { --gut: 16px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
p { margin: 0 0 1em; max-width: 68ch; }
a { color: inherit; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { color: var(--zert-green); }
:focus-visible { outline: 2px solid var(--zert-green); outline-offset: 3px; }

.dark { background: var(--ink); color: var(--paper); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
.btn {
  display: inline-block; font: 600 .8125rem/1 var(--sans); text-transform: uppercase; letter-spacing: .08em;
  padding: 16px 28px; border-radius: 2px; border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background .2s ease-out, transform .2s ease-out;
}
.btn-primary { background: var(--zert-green); color: var(--ink); }
.btn-primary:hover { background: var(--green-mid); color: var(--ink); transform: translateY(-1px); }

/* Logo */
.logo img { height: 26px; width: auto; }


/* Tables */
.tscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px 10px 0; border-top: 1px solid var(--g-d4); }
th { font: 600 .6875rem/1.3 var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--g-606); }
.dark th, .dark td { border-color: var(--line-dark); }
.log td { font-family: var(--mono); font-size: .8125rem; white-space: nowrap; }
.log td.ev { font-weight: 600; }

/* ---------- Figures (inline SVG). Always drawn on a paper plate. ---------- */
svg.xsec { width: 100%; height: auto; display: block; font-family: var(--sans); text-rendering: geometricPrecision; }
svg .f-ink { fill: var(--ink); }
svg .f-bg { fill: var(--paper); }
svg .f-risk { fill: var(--coral-ink); }
svg .s-hatch { stroke: var(--ink); stroke-width: 1; }
svg .s-wall { stroke: var(--ink); stroke-width: 1.5; }
svg .s-ground { stroke: var(--ink); stroke-width: 2.5; }
svg .s-thin { fill: none; stroke: var(--ink); stroke-width: 1; }
svg .s-dim { fill: none; stroke: var(--ink); stroke-width: 2; }
svg .s-box2 { stroke: var(--ink); stroke-width: 2; fill: none; }
svg .s-box2.f-bg { fill: var(--paper); }
svg .s-port { fill: var(--paper); stroke: var(--ink); stroke-width: 2; }
svg .s-ok { fill: none; stroke: var(--ink); stroke-width: 3; }
svg .s-leak { fill: none; stroke: var(--coral-ink); stroke-width: 2.5; stroke-dasharray: 8 6; }
svg .s-risk { fill: none; stroke: var(--coral-ink); stroke-width: 2; }
svg text { fill: var(--ink); }
svg .t-lbl { font-size: 15px; font-weight: 600; letter-spacing: .12em; }
svg .t-mono { font-family: var(--mono); font-size: 13px; }
svg .t-mute { fill: var(--g-606); }
svg .t-risk { fill: var(--coral-ink); font-weight: 600; }
svg .t-sm { font-size: 17px; }
svg .t-b { font-weight: 600; }
svg .t-try { font-size: 21px; font-weight: 600; }
svg .t-hv { font-size: 22px; font-weight: 700; letter-spacing: .04em; }
svg .t-port { font-family: var(--mono); font-size: 14px; font-weight: 600; }
svg .t-dim { font-family: var(--mono); font-size: 13px; letter-spacing: .04em; }
svg [data-layer] { transition: opacity .35s ease-out; }
svg [data-layer].is-off { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  svg .s-leak { animation: leak 1.6s linear infinite; }
  @keyframes leak { to { stroke-dashoffset: -28; } }
}

/* Oversized mark: decorative */
.bigmark { position: absolute; pointer-events: none; opacity: .07; }

/* =====================================================================
   Page: a technical document. Numbered sections, a margin column for
   section number and notes, the body column for text and figures.
   ===================================================================== */
.page { --margin: 15rem; background: var(--paper); }
.page .doc { max-width: 1120px; margin: 0 auto; padding: 0 var(--gut); }
.page .masthead { display: grid; grid-template-columns: var(--margin) minmax(0, 1fr); gap: 40px; border-bottom: 2px solid var(--ink); padding: 28px 0 18px; align-items: end; }
.page .masthead .meta { display: flex; flex-wrap: wrap; gap: 6px 28px; justify-content: flex-end; font: .75rem/1.4 var(--mono); color: var(--g-606); }
.page .masthead .meta a { color: var(--ink); }
.page .sec { display: grid; grid-template-columns: var(--margin) minmax(0, 1fr); gap: 40px; padding: 56px 0; border-bottom: 1px solid var(--g-d4); }
.page .margin { font: .75rem/1.55 var(--mono); color: var(--g-606); }
.page .margin .no { display: block; font: 600 2.75rem/1 var(--sans); color: var(--ink); letter-spacing: -.03em; margin-bottom: 12px; }
.page .margin p, .page .margin .label { margin: 0 0 14px; }
/* section name in the margin: a real h2 for the outline, styled like the margin text */
.page .margin .label { font: inherit; letter-spacing: 0; color: inherit; }
.page .margin .note { border-top: 1px solid var(--g-d4); padding-top: 10px; margin-top: 18px; }
.page .body h1 { font-size: clamp(2.25rem, 5vw, 4.25rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.02; margin: 0 0 24px; max-width: 18ch; }
.page .body h2 { font-size: clamp(1.5rem, 2.6vw, 2.125rem); margin: 0 0 18px; }
.page .body h3 { font-size: 1.125rem; margin: 0 0 8px; }
.page figure { margin: 28px 0 0; }
.page figure .frame { border: 1px solid var(--ink); padding: 16px; }
.page figcaption { font: .8125rem/1.5 var(--sans); margin-top: 10px; max-width: 80ch; }
.page figcaption b { font-weight: 600; margin-right: 6px; }
.page footer { display: grid; grid-template-columns: var(--margin) minmax(0, 1fr); gap: 40px; padding: 32px 0 110px; font: .75rem/1.6 var(--mono); color: var(--g-606); }
.page footer .end { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
@media (max-width: 900px) {
  .page .masthead, .page .sec, .page footer { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .page .masthead .meta { justify-content: flex-start; }
  .page .margin .no { font-size: 2rem; display: inline-block; margin-right: 12px; }
  .page .sec { padding: 40px 0; }
}
/* Wider document; overrides of the base above */
.page { --margin: 17rem; }
.page .doc { max-width: 1240px; }

/* Drawing text sizes for the figures */
svg.xsec-d .t-lbl { font-size: 16px; }
svg.xsec-d .t-mono { font-size: 15px; }
svg.xsec-d .t-dim { font-size: 14px; }
svg.xsec-d .t-try { font-size: 20px; }
svg.xsec-d .t-port { font-size: 15px; }

/* Scrolly (sections 1 and 2): steps in the margin column, sticky figure in the body column */
.page .scrolly { grid-column: 1 / -1; display: grid; grid-template-columns: var(--margin) minmax(0, 1fr); gap: 40px; align-items: start; }
.page .steps { padding: 2vh 0 8vh; }
.page .step { min-height: 62vh; display: flex; flex-direction: column; justify-content: center; opacity: .32; transition: opacity .3s ease-out; }
.page .step.is-active { opacity: 1; }
.page .step .no { font: 500 .8125rem/1 var(--mono); border-top: 1px solid var(--g-d4); padding-top: 12px; margin-bottom: 16px; }
.page .step.is-active .no { border-top-color: var(--ink); }
.page .step h3 { font-size: 1.625rem; line-height: 1.12; margin: 0 0 14px; }
.page .step p { font-size: .9375rem; }
.page .step .builder { font: .8125rem/1.6 var(--mono); color: #333; border-top: 1px solid var(--g-d4); padding-top: 12px; margin: 4px 0 0; }
.page .stage { position: sticky; top: max(16px, calc(50vh - 330px)); margin: 0; }
.page .stage .frame { padding: 16px; }
.page .stage figcaption { display: flex; justify-content: space-between; align-items: center; gap: 16px; max-width: none; font-family: var(--mono); font-size: .8125rem; }
.page .ticks { display: inline-flex; gap: 4px; }
.page .ticks i { width: 22px; height: 6px; border: 1px solid var(--ink); }
.page .ticks i.on { background: var(--ink); }

@media (max-width: 900px) {
  .page .masthead { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0 14px; }
  .page .masthead .meta span { display: none; }
  .page .margin { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; }
  .page .margin .no { margin: 0; }
  .page .margin p, .page .margin .label { margin: 0; }
  .page .margin .note { flex-basis: 100%; margin-top: 10px; }
}

/* ---------- Fig. 2 parts (user → SSH → Zert cube → agents → local inference) ---------- */
svg .s-hvbox { fill: none; stroke: var(--ink); stroke-width: 6; }
svg .cube-f { fill: var(--paper); stroke: var(--ink); stroke-width: 2; }
svg .cube-top { fill: var(--g-f5); stroke: var(--ink); stroke-width: 2; stroke-linejoin: miter; }
svg .cube-r { fill: var(--g-d4); stroke: var(--ink); stroke-width: 2; stroke-linejoin: miter; }
svg .s-icon { fill: none; stroke: var(--paper); stroke-width: 2.5; stroke-linecap: square; }
svg .t-sm2 { font-size: 15px; }
svg.xsec-d .t-hv { font-size: 17px; letter-spacing: .1em; }
svg.xsec-d .t-try { font-size: 19px; }

/* ---------- Bands: dark band, footer with the oversized mark ---------- */
.page { position: relative; overflow-x: clip; }
.page .band { position: relative; }
.page .bigmark { position: absolute; z-index: 0; pointer-events: none; }
.page .bigmark path { fill: var(--g-f5); stroke: var(--g-d4); stroke-width: 1.5; vector-effect: non-scaling-stroke; }

.page .band.dark { background: var(--ink); color: var(--paper); }
.page .band.dark .sec { border-bottom: 0; }
.page .dark .margin { color: var(--g-909); }
.page .dark .margin .no { color: var(--paper); }
.page .dark .margin .note { border-top-color: var(--line-dark); }
.page .dark figure .frame { background: var(--paper); border-color: var(--paper); }
.page .dark figcaption { color: var(--g-d4); }
.page .dark figcaption b { color: var(--paper); }

.page .site-foot { background: var(--ink); color: var(--g-909); position: relative; overflow: hidden; }
.page .site-foot .bigmark { width: 360px; right: -90px; bottom: -150px; }
.page .site-foot .bigmark path { fill: rgba(252, 252, 252, .06); stroke: rgba(252, 252, 252, .16); }
.page .site-foot .doc { position: relative; z-index: 1; }
.page .site-foot footer { padding: 48px 0 120px; color: var(--g-909); }
.page .site-foot .logo img { height: 24px; }

.page .step .builder { color: var(--g-606); }
.page .step { transition: none; }
@media (prefers-reduced-motion: no-preference) { .page .step { transition: opacity .3s ease-out; } }
@media (max-width: 900px) {
  .page .site-foot .bigmark { width: 240px; right: -70px; bottom: -110px; }
}
svg .t-port-s { font-size: 13px !important; }
svg .s-tube-o { fill: none; stroke: var(--ink); stroke-width: 10; stroke-linejoin: miter; }
svg .s-tube-i { fill: none; stroke: var(--paper); stroke-width: 4; stroke-linejoin: miter; }

/* Viewport fit: keep the sticky figure inside short screens */
.page .stage svg { max-height: calc(100vh - 96px); max-height: calc(100svh - 96px); width: 100%; }
.page .stage { top: max(12px, calc(50vh - 330px)); }

/* Phones and tablets: the same sticky build-up as on desktop. The wide figure sticks to the
   top of the screen and the steps (1.0, 1.1 …) scroll up underneath it. */
@media (max-width: 1100px) {
  .page .scrolly { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .page .stage {
    order: -1; position: sticky; top: 0; z-index: 2;
    margin: 0 calc(-1 * var(--gut)); padding: 10px var(--gut) 12px;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
    background: var(--paper); border-bottom: 1px solid var(--g-d4);
  }
  .page .dark .stage { background: var(--ink); border-bottom-color: var(--line-dark); }
  .page .stage .frame { padding: 6px; }
  .page .stage svg { display: block; width: 100%; max-height: 48vh; max-height: 48svh; margin: 0 auto; }
  /* the frame and caption hug the figure when its height cap kicks in (landscape phones) */
  .page .stage .frame, .page .stage figcaption { max-width: calc(48svh * 1000 / 620 + 14px); margin-inline: auto; }
  .page .stage figcaption { margin-top: 8px; font-size: .75rem; }
  .page .steps { padding: 6vh 0 28vh; }
  .page .step { min-height: 52vh; justify-content: flex-start; }
}
@media (max-width: 1100px) and (orientation: landscape) and (max-height: 520px) {
  .page .stage svg { max-height: 40svh; }
  .page .stage .frame { max-width: calc(40svh * 1000 / 620 + 14px); }
  .page .stage figcaption { max-width: none; }
}

/* ---------- Fig. 1 risk build-up (coral = what you can't see) ---------- */
svg .q-ring { fill: var(--paper); stroke: var(--coral-ink); stroke-width: 2; }
svg .t-q { font-size: 15px; font-weight: 700; fill: var(--coral-ink); }
svg .t-xs { font-size: 12px !important; }
svg .s-risk.f-bg { fill: var(--paper); }
.page .dark .step .builder { color: var(--g-909); border-top-color: var(--line-dark); }
.page .dark .step .no { border-top-color: var(--line-dark); }
.page .dark .step.is-active .no { border-top-color: var(--paper); }
.page .dark .ticks i { border-color: var(--paper); }
.page .dark .ticks i.on { background: var(--paper); }
.page .dark .stage figcaption { color: var(--g-d4); }
svg .s-task { fill: none; stroke: var(--ink); stroke-width: 3.5; }
svg .s-box3 { stroke: var(--ink); stroke-width: 3.5; }
svg .s-folder { fill: var(--g-f5); stroke: var(--ink); stroke-width: 2; stroke-linejoin: miter; }

/* ---- Section 3: use cases, tabbed ---- */
.uses .tabs { display: flex; gap: 0; border-bottom: 1px solid var(--ink); margin: 1.75rem 0 1.75rem; }
.uses [role=tab] { font: 600 .9375rem var(--sans); color: var(--g-606); background: none; border: 1px solid transparent; border-bottom: 0; padding: .7rem 1.1rem .65rem; margin-bottom: -1px; cursor: pointer; }
.uses [role=tab] span { font: 500 .8125rem var(--mono); margin-right: .4rem; }
.uses [role=tab][aria-selected=true] { color: var(--ink); background: var(--paper); border-color: var(--ink); }
.uses [role=tab]:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.uses .lede { font-size: 1.1875rem; font-weight: 500; max-width: 44ch; }
.uses .builder { font: 400 .8125rem/1.6 var(--mono); color: var(--g-606); max-width: 70ch; }
.uses code { font: 500 .85em var(--mono); background: var(--g-f5); padding: .05em .3em; }
.uses figure { margin: 1.75rem 0 0; }
.uses figcaption { font: 400 .75rem var(--mono); color: var(--g-606); margin-top: .75rem; }
.uses figcaption b { color: var(--ink); }
/* Light terminal: white surface with an ink frame, like the chat in 3.1. The prompt is
   ink and bold (green text on white is under 4.5:1); output and comments are grey. */
.term { margin: 0; background: #fff; color: var(--ink); border: 1px solid var(--ink); font: 400 .875rem/1.75 var(--mono); padding: 1.1rem 1.25rem; overflow-x: auto; }
.term .p { color: var(--ink); font-weight: 600; }
.term .o { color: var(--g-606); }
.term .c { color: var(--g-606); }
.term .zh { color: var(--zert-green); font-weight: 600; } /* the zert command */
.trees { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--ink); border-top: 0; }
.tree { padding: 1.1rem 1.25rem 1rem; min-width: 0; }
.tree + .tree { border-left: 1px solid var(--ink); }
.tree h4 { font: 600 .9375rem var(--sans); margin-bottom: .9rem; }
.tree h4 span { font: 600 .6875rem var(--mono); letter-spacing: .12em; text-transform: uppercase; border: 1px solid currentColor; padding: .1rem .4rem; margin-right: .5rem; vertical-align: 1px; }
.tree.before h4 span { color: var(--coral-ink); }
.tree pre { margin: 0; font: 400 .8125rem/1.65 var(--mono); overflow-x: auto; }
.tree pre b { font-weight: 600; }
.tree pre i { font-style: normal; color: var(--coral-ink); }
.tree pre em { font-style: normal; color: var(--g-606); }
.tree .cap { font: 500 .8125rem var(--mono); margin: .9rem 0 0; padding-top: .7rem; border-top: 1px solid var(--g-d4); }
.tree.before .cap { color: var(--coral-ink); }
@media (max-width: 760px) { .trees { grid-template-columns: 1fr; } .tree + .tree { border-left: 0; border-top: 1px solid var(--ink); } }

.chat { border: 1px solid var(--ink); background: var(--paper); }
.chat-h { display: flex; align-items: center; gap: .55rem; padding: .7rem 1rem; border-bottom: 1px solid var(--ink); font-size: .9375rem; }
.chat-h { position: relative; }
.chat-h > span:last-child { font: 400 .75rem var(--mono); color: var(--g-606); margin-left: auto; }
.ai { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; background: var(--ink); color: var(--paper); font: 600 .625rem var(--mono); flex: none; }
.who .ai { width: 1.15rem; height: 1.15rem; font-size: .5rem; margin-right: .3rem; vertical-align: -3px; }
.msg { position: relative; padding: .85rem 1rem .9rem 1rem; border-bottom: 1px solid var(--g-d4); }
.msg:last-child { border-bottom: 0; }
.msg.ag { background: var(--g-f5); }
.msg .who { font: 600 .8125rem var(--sans); margin-bottom: .25rem; }
.msg time { font: 400 .75rem var(--mono); color: var(--g-909); margin-left: .4rem; }
.msg p { margin: 0; font-size: .9375rem; }
.att { display: inline-flex; align-items: center; gap: .45rem; margin-top: .6rem; border: 1px solid var(--ink); background: var(--paper); padding: .35rem .65rem; font: 500 .8125rem var(--mono); }
.att small { color: var(--g-606); font-size: .75rem; }
.att .fold { width: 15px; height: 11px; border: 1.5px solid var(--ink); background: var(--g-f5); position: relative; margin-top: 2px; }
.att .fold::before { content: ""; position: absolute; left: -1.5px; top: -4px; width: 6px; height: 3px; border: 1.5px solid var(--ink); border-bottom: 0; background: var(--g-f5); }
.att.file::before { content: ""; width: 10px; height: 13px; border: 1.5px solid var(--ink); }
@media (max-width: 760px) {  .msg { padding-right: 2.4rem; } .chat-h { padding-right: 2.4rem; } }

/* ---- Section 4: questions answered by the log ---- */
.lede4 { font-size: 1.1875rem; font-weight: 500; max-width: 46ch; margin-top: 1rem; }
.audit { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 2rem; margin-top: 2rem; align-items: start; }
.qs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.q { all: unset; box-sizing: border-box; white-space: normal; display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: .15rem .5rem; width: 100%; padding: .95rem .9rem .95rem 0; border-bottom: 1px solid var(--g-d4); cursor: pointer; position: relative; }
.q .qn { font: 500 .8125rem var(--mono); color: var(--g-606); padding-top: .2rem; grid-row: span 2; }
.q .qt { font: 600 1rem/1.35 var(--sans); }
.q:hover .qt { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.q[aria-pressed=true] { box-shadow: inset 4px 0 0 var(--ink); padding-left: .9rem; }
.q[aria-pressed=true]::after { content: "→"; position: absolute; right: .2rem; top: 1rem; font: 500 1rem var(--mono); }
.q:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.alog { margin: 0; }
.alog .frame { border: 1px solid var(--ink); background: var(--paper); padding: 0 !important; margin: 0; }
.ans-box { border-bottom: 1px solid var(--ink); padding: .9rem 1rem; min-height: 4.2rem; }
.ans { margin: 0; font-size: .9375rem; }
.ans b { font: 600 .75rem var(--mono); letter-spacing: .06em; text-transform: uppercase; background: var(--ink); color: var(--paper); padding: .1rem .4rem; margin-right: .5rem; }
.alog .log { width: 100%; border-collapse: collapse; }
.alog .log th { font: 500 .6875rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--g-606); text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--g-d4); }
.alog .log td:last-child { white-space: normal; min-width: 9em; }
.alog .log td { padding: .55rem .65rem; border-bottom: 1px solid var(--g-d4); transition: opacity .25s, background-color .25s; }
.alog .log tr:last-child td { border-bottom: 0; }
.alog .log .d { color: var(--g-909); }
.audit.has-q .log tbody tr { opacity: .28; }
.audit.has-q .log tbody tr.hit { opacity: 1; }
.audit.has-q .log tbody tr.hit td { background: var(--g-f5); }
.audit.has-q .log tbody tr.hit td:first-child { box-shadow: inset 3px 0 0 var(--ink); }
.alog figcaption { font: 400 .75rem var(--mono); color: var(--g-606); margin-top: .75rem; }
.alog figcaption b { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .alog .log td { transition: none; } }
@media (max-width: 900px) {
  .audit { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .q[aria-pressed=true]::after { content: "↓"; }
}
@media (max-width: 600px) {
  .alog .tscroll { overflow: visible; }
  .alog .log thead { display: none; }
  .alog .log, .alog .log tbody { display: block; }
  .alog .log tr { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; padding: .55rem .9rem .55rem 8.4rem; border-bottom: 1px solid var(--g-d4); transition: opacity .25s, background-color .25s; }
  .alog .log tr:last-child { border-bottom: 0; }
  .alog .log td { padding: 0; border: 0; white-space: normal; background: none !important; box-shadow: none !important; }
  .alog .log td:first-child { position: absolute; left: .9rem; top: .55rem; }
  .alog .log td:nth-child(2) { flex: 1 0 100%; }
  .alog .log td:nth-child(n+3) { color: var(--g-606); font-size: .6875rem; }
  .alog .log td:nth-child(n+4)::before { margin: 0 .3rem !important; }
  .alog .log td:nth-child(n+4)::before { content: "·"; margin: 0 .45rem; color: var(--g-909); }
  .alog .log td:nth-child(5) { flex: 1 0 100%; color: var(--ink) !important; }
  .alog .log td:nth-child(5)::before { content: none !important; }
  .alog .log td:nth-child(5):empty, .alog .log td.none { display: none; }
  .audit.has-q .log tbody tr.hit { background: var(--g-f5); box-shadow: inset 3px 0 0 var(--ink); }
}
.audit .alog { margin: 0 !important; }

/* Tighter header → figure spacing: the margin note may sit beside the top
   of the scrolly instead of pushing it down; smaller gaps elsewhere. */
@media (min-width: 1101px) {
  .page .sec:has(> .scrolly) > .margin { grid-row: 1; grid-column: 1; position: relative; z-index: 1; }
  .page .sec:has(> .scrolly) > .scrolly { grid-row: 1; }
  .page .sec:has(> .scrolly) .steps { padding-top: 120px; }
}
.uses .tabs { margin: 1.25rem 0 1.25rem; }
.uses figure { margin-top: 1.25rem; }
.audit { margin-top: 1.5rem; }
.lede4 { margin-top: .5rem; }
/* 4: unselected questions read as quieter options; hover brings them up */
.q .qt { transition: color .2s; }
.q[aria-pressed=false] .qt { color: #767676; } /* lightest grey that still meets 4.5:1 on paper */
.q[aria-pressed=false] .qn { color: var(--g-909); }
.q[aria-pressed=false]:hover .qt, .q[aria-pressed=false]:focus-visible .qt { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .q .qt { transition: none; } }

/* ---- Photographic hero ---- */
.page .hero { position: relative; isolation: isolate; overflow: hidden; color: var(--paper); background: #22303a; min-height: min(80svh, 760px); display: flex; }
.page .hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 45%; z-index: -2; }
.page .hero-shade { position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(12, 16, 19, .82) 0%, rgba(12, 16, 19, .58) 38%, rgba(12, 16, 19, .12) 72%, rgba(12, 16, 19, 0) 100%),
    linear-gradient(180deg, rgba(12, 16, 19, .5) 0%, rgba(12, 16, 19, 0) 22%, rgba(12, 16, 19, 0) 68%, rgba(12, 16, 19, .6) 100%); }
.page .hero .doc { width: 100%; display: flex; flex-direction: column; }
.page .hero .masthead { border-bottom-color: rgba(252, 252, 252, .38); }
.page .hero .masthead .meta, .page .hero .masthead .meta a { color: var(--paper); }
.page .hero .masthead .meta span { opacity: .75; }
.page .hero-body { margin: auto 0; padding: clamp(56px, 9vh, 104px) 0; max-width: 780px; }
.page .hero h1 { font-size: clamp(2.5rem, 6.2vw, 5.25rem); line-height: 1.0; letter-spacing: -.035em; max-width: 14ch; margin: 0; text-wrap: balance; }
.page .hero-thesis { font-size: clamp(1.125rem, 1.7vw, 1.4375rem); line-height: 1.4; margin: 26px 0 0; max-width: 46ch; padding-left: 16px; border-left: 2px solid rgba(252, 252, 252, .7); }
.page .hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 38px; }
.page .btn { display: inline-block; text-transform: none; letter-spacing: 0; font: 600 1rem/1 var(--sans); padding: 16px 22px; background: var(--paper); color: var(--ink); text-decoration: none; border: 1px solid var(--paper); }
.page .btn:hover { background: #fff; }
.page .btn:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
@media (max-width: 760px) {
  .page .hero { min-height: 82svh; }
  .page .hero-bg { object-position: 30% 50%; }
  .page .hero-shade { background: linear-gradient(180deg, rgba(12, 16, 19, .6) 0%, rgba(12, 16, 19, .45) 40%, rgba(12, 16, 19, .7) 100%); }
  .page .btn { padding: 14px 18px; }
}
/* hero has no bottom line, so give the body a little air below */
.page .hero-body { padding: clamp(32px, 5vh, 64px) 0 clamp(56px, 9vh, 104px); }
.page .hero .masthead { border-bottom: 0; }

/* ---- Section 5: contact. After the brand book's layout examples (p. 15):
   white surface, text left, the Zert mark used as a window onto a photo ---- */
.page .contact-band { background: #fff; }
.page .contact-band .sec { grid-template-columns: minmax(0, 1fr); border-bottom: 0; padding-block: clamp(56px, 8vw, 104px); }
.page .contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.page .contact h2 { font-size: clamp(1.75rem, 3.2vw, 2.75rem); line-height: 1.08; max-width: 16ch; margin: 0 0 18px; }
.page .contact .lede5 { font-size: 1.1875rem; line-height: 1.45; max-width: 34ch; margin: 0; color: #333; }
.page .contact-cta { margin: 32px 0 0; }
.page .btn-ink { background: var(--ink); color: var(--paper); border-color: var(--ink); padding: 16px 24px; }
.page .btn-ink:hover { background: #000; color: var(--paper); }
.page .btn-ink:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.page .contact-mark {
  justify-self: end; width: 100%; max-width: 520px; aspect-ratio: 1;
  background: url('assets/img/norway/lofoten-winter-sunset-panorama-1280.webp') 42% 50% / cover no-repeat;
  background-image: image-set(url('assets/img/norway/lofoten-winter-sunset-panorama-1280.webp') 1x, url('assets/img/norway/lofoten-winter-sunset-panorama-1920.webp') 2x);
  -webkit-mask: url('assets/logo/zert-mark-black.svg') center / contain no-repeat;
          mask: url('assets/logo/zert-mark-black.svg') center / contain no-repeat;
}
/* Wide screens: the mark gets exactly the width of Fig. 4 above it, so its left and right
   edges line up with the figure. Mirrors section 4's grid: margin column + 40px gap, then
   .audit's 4fr / 7fr columns with a 2rem gap. */
@media (min-width: 901px) {
  .page .contact { grid-template-columns: minmax(0, 1fr) calc((100% - var(--margin) - 40px - 2rem) * 7 / 11); column-gap: 0; }
  .page .contact-mark { max-width: none; }
}
/* Phones and small tablets: one centred column. Mark on top, then heading, lede and button,
   all on the same centre line; the button spans the column on phones. */
@media (max-width: 900px) {
  .page .contact { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: clamp(32px, 7vw, 48px); text-align: center; }
  .page .contact-mark { justify-self: center; width: min(100%, 320px); max-width: none; order: -1; }
  .page .contact-text { display: flex; flex-direction: column; align-items: center; width: 100%; }
  .page .contact h2 { font-size: clamp(1.75rem, 7vw, 2.25rem); max-width: 18ch; margin-bottom: 14px; text-wrap: balance; }
  .page .contact .lede5 { font-size: 1.0625rem; max-width: 32ch; text-wrap: balance; }
  .page .contact-cta { margin-top: 28px; width: 100%; max-width: 320px; }
  .page .contact-cta .btn { display: block; width: 100%; text-align: center; }
}

/* ---- Section 0: executive summary. Full-width lede, then challenge | solution | team. ---- */
.page .sec-sum { padding: 64px 0 72px; }
.page .summary .lede0 { font-size: clamp(1.375rem, 2.6vw, 2.125rem); font-weight: 500; line-height: 1.25; letter-spacing: -.015em; max-width: 46ch; margin: 0 0 56px; }
.page .summary h3 { font-size: 1.125rem; margin: 0 0 14px; padding-top: 12px; border-top: 1px solid var(--ink); }
.page .summary h3 span { font: 500 .8125rem/1 var(--mono); color: var(--g-606); margin-right: 10px; }
.page .sum-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; }
.page .sum-col p { font-size: .9375rem; max-width: 46ch; }
.page .sum-col p:last-child { margin-bottom: 0; }
.page .people { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.page .person { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; align-items: center; }
.page .person img { width: 96px; height: 96px; object-fit: cover; filter: grayscale(1) contrast(1.05); }
/* Oskar's photo is framed looser than Jan Petter's: scale it from the bottom centre so head size and
   eye line match, and clip it back to the 96px box (inset = 1 - 1/1.1 on top, half that on the sides). */
.page .person img.portrait-loose { transform: scale(1.1); transform-origin: 50% 100%; clip-path: inset(9.09% 4.55% 0 4.55%); }
.page .person p { margin: 0; }
.page .person .name { font-weight: 600; font-size: 1rem; line-height: 1.3; }
.page .person .role { font: 500 .75rem/1.5 var(--mono); color: var(--g-606); margin-bottom: 4px; }
.page .person .bio { font-size: .875rem; line-height: 1.45; }
@media (max-width: 1000px) {
  .page .sum-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page .team { grid-column: 1 / -1; }
  .page .people { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }
}
@media (max-width: 900px) {
  .page .sec-sum { padding: 40px 0 48px; }
  .page .summary .lede0 { margin-bottom: 40px; }
}
@media (max-width: 640px) {
  .page .sum-cols, .page .people { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .page .people { gap: 20px; }
}

/* ---- Sections 0–2 (.sec-top): the section number, name and note sit in one row on top,
   and the content gets the full width. Replaces the left margin column, which left
   dead space there. (The scrolly sections keep their steps | figure split.)
   Sections 3 and 4 keep the margin column. ---- */
.page .sec-top { grid-template-columns: minmax(0, 1fr); gap: 0; }
.page .sec-top > .margin { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 16px; row-gap: 8px; margin-bottom: 28px; }
.page .sec-top > .margin .no { display: inline-block; margin: 0; }
.page .sec-top > .margin .label { margin: 0; }
.page .sec-top > .margin .note { margin: 0; padding: 0 0 0 16px; border: 0; border-left: 1px solid var(--g-d4); max-width: 80ch; }
.page .dark .sec-top > .margin .note { border-left-color: var(--line-dark); }
@media (min-width: 1101px) {
  .page .sec-top:has(> .scrolly) > .margin { grid-row: auto; grid-column: auto; }
  .page .sec-top:has(> .scrolly) > .scrolly { grid-row: auto; }
  .page .sec-top:has(> .scrolly) .steps { padding-top: 0; }
}
@media (max-width: 900px) {
  .page .sec-top > .margin .note { flex-basis: 100%; padding: 0; border-left: 0; }
}

/* ---- Section 3: the intro explaining both ways of working sits in the margin column;
   the tabs in the body just switch the figure ---- */
.page .margin .uses-intro { font: 400 .875rem/1.55 var(--sans); color: var(--ink); }
.page .margin .uses-intro p { margin: 0 0 12px; }
.page .margin .uses-intro .lede3 { font-weight: 500; font-size: .9375rem; line-height: 1.45; }
.page .margin .uses-intro b { font-weight: 600; }
.page .margin .uses-intro code { font: 500 .85em var(--mono); background: var(--g-f5); padding: .05em .3em; white-space: nowrap; }
.page .margin .uses-intro .uses-foot { font: .75rem/1.55 var(--mono); color: var(--g-606); margin: 0; }
.page #d-3 .uses .tabs { margin-top: 0; }

/* ---- Section 4: the answer sits under the questions, not on top of the log ---- */
.qcol .ans-box { border: 1px solid var(--ink); margin-top: 1rem; min-height: 0; }
/* All answers share one grid cell, so the box is always as tall as the longest answer
   and section 4 keeps its height whichever question is selected. Hidden answers stay
   in layout but invisible (visibility also hides them from screen readers). */
.qcol .ans-box { display: grid; }
.qcol .ans-box .ans { grid-area: 1 / 1; }
.qcol .ans-box .ans[hidden] { display: block; visibility: hidden; }
/* Same left inset on every question, so selecting one never re-wraps its text */
.q { padding-left: .9rem; }

/* ---- Fig. 1/2 portrait versions (phones): larger drawing text, one figure per step ---- */
svg.xsec-m .t-mono { font-size: 18px; }
svg.xsec-m .t-sm { font-size: 21px; }
svg.xsec-m .t-lbl { font-size: 19px; }
svg.xsec-m .t-try { font-size: 23px; }
svg.xsec-m .t-dim { font-size: 16px; }
svg.xsec-m .t-hv { font-size: 19px; letter-spacing: .1em; }
svg.xsec-m .t-port-s { font-size: 17px !important; }
svg.xsec-m .t-xs { font-size: 15px !important; }

/* ---- Footer ---- */
.page .site-foot footer { display: block; padding: 56px 0 96px; }
.page .foot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 14rem)); justify-content: center; gap: 40px 64px; padding-bottom: 40px; border-bottom: 1px solid var(--line-dark); text-align: center; }
.page .foot-brand { grid-column: 1 / -1; }
.page .foot-brand .logo { display: inline-block; }
.page .foot-brand .tagline { margin: 16px auto 0; font: .875rem/1.5 var(--sans); color: var(--g-d4); max-width: 40ch; }
.page .foot-col h2 { font: 500 .75rem/1.4 var(--mono); color: var(--g-909); letter-spacing: .04em; text-transform: uppercase; margin: 0 0 14px; }
.page .foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.page .foot-col li, .page .foot-col p { font: .875rem/1.5 var(--sans); color: var(--g-d4); margin: 0; }
.page .foot-col a { color: var(--paper); text-decoration: none; }
.page .foot-col a:hover { color: var(--green-mid); text-decoration: underline; }
.page .site-foot .end { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 32px; padding-top: 20px; text-align: center; }
.page .site-foot .end a { color: var(--g-d4); }
@media (max-width: 480px) {
  .page .foot-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
