/* =========================================================================
   Xpect Synergy LLC — xpectsynergy.com
   Visual system: "Register" — paper ground, editorial serif display,
   monospace metadata, hairline rules, left label rail.
   No external fonts. No external requests of any kind.
   ========================================================================= */

/* ---------------------------------------------------------------- tokens */
:root {
  /* Paper ground: warm, low-glare, reads as printed stock rather than UI. */
  --paper:        #fbfaf8;
  --paper-sunk:   #f4f1ec;
  --ink:          #191817;
  --ink-2:        #5c584f;
  --ink-3:        #6f6960;
  --rule:         #e2ddd4;
  --rule-strong:  #c8c1b4;
  /* The hero lattice needs slightly more presence than a border rule. */
  --figure-line:  #c8c1b4;
  /* Single accent. Used only for focus, status marks, and the traced path. */
  --accent:       #2f4858;

  --font-display: ui-serif, "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-text:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono:    ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", Menlo, Consolas, monospace;

  --shell-max:    1200px;
  --shell-pad:    clamp(1.25rem, 5vw, 4rem);
  --header-h:     4rem;

  --t-label:      0.6875rem;
  --t-small:      0.8125rem;
  --t-body:       clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --t-statement:  clamp(1.25rem, 1.05rem + 0.9vw, 1.6rem);
  --t-lede:       clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  --t-h1:         clamp(2.1rem, 1.3rem + 3.6vw, 3.85rem);
  --t-h3:         clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:        #121312;
    --paper-sunk:   #191a19;
    --ink:          #ece9e3;
    --ink-2:        #a29d94;
    --ink-3:        #918b80;
    --rule:         #2a2c2a;
    --rule-strong:  #434540;
    --figure-line:  #55584f;
    --accent:       #9dbacb;
  }
}

/* ----------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1.5rem); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--t-body);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; font-weight: 400; }
p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }

svg { display: block; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 50%; top: 0;
  transform: translate(-50%, -110%);
  z-index: 100;
  padding: 0.7rem 1.25rem;
  background: var(--ink); color: var(--paper);
  font-family: var(--font-mono); font-size: var(--t-small);
}
.skip-link:focus-visible { transform: translate(-50%, 0.5rem); }

.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--shell-pad);
}

/* Small uppercase monospace. The site's metadata voice. */
.eyebrow, .rail-label, .entry-ref, .entry-category, .entry-status,
.note-label, .footer-label, .domains li, .facts dt, .figure-caption,
.contents-label, .contents-num,
.nav-external, .footer-base {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}

/* ------------------------------------------------------- identity mark */
/* XS monogram. The X is two crossing hairlines; the S is squared, built
   from the same orthogonal steps as the lattice diagrams. One drawing,
   referenced by <use>, so header, footer and favicon cannot drift apart. */
.sprite { position: absolute; }
.monogram {
  width: 24px; height: 24px; flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: square;
  stroke-linejoin: miter;
}
.monogram-lg { width: 30px; height: 30px; stroke-width: 1.5; }

.wordmark { display: inline-flex; align-items: center; gap: 0.7rem; }
.wordmark-text {
  font-size: 0.8125rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
}

.site-nav { display: flex; align-items: center; gap: 2rem; }
.nav-list { display: flex; gap: 1.75rem; }
.nav-list a, .nav-external {
  font-size: var(--t-small);
  color: var(--ink-2);
  padding-block: 0.4rem;
  border-bottom: 1px solid transparent;
  transition: color 120ms ease, border-color 120ms ease;
}
.nav-list a:hover, .nav-list a[aria-current] { color: var(--ink); border-bottom-color: var(--ink); }
.nav-external {
  color: var(--ink);
  letter-spacing: 0.1em;
  padding-inline-start: 1.75rem;
  border-inline-start: 1px solid var(--rule);
  border-bottom: none;
}
.nav-external:hover { color: var(--accent); }
.ext { font-size: 0.85em; vertical-align: 0.05em; }

.nav-toggle {
  display: none;
  align-items: center; gap: 0.5rem;
  margin: 0; padding: 0.5rem 0;
  background: none; border: 0; color: var(--ink);
  font-family: var(--font-mono); font-size: var(--t-label);
  letter-spacing: 0.1em; text-transform: uppercase;
  cursor: pointer;
}
.nav-toggle-glyph { position: relative; width: 16px; height: 9px; flex: none; }
.nav-toggle-glyph::before, .nav-toggle-glyph::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1px; background: currentColor;
}
.nav-toggle-glyph::before { top: 0; }
.nav-toggle-glyph::after  { bottom: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-glyph::before { top: 4px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-glyph::after  { bottom: 4px; }

/* ------------------------------------------------------------------ hero */
.hero {
  padding-block: clamp(2.25rem, 4.5vw, 3.5rem) clamp(3.5rem, 7vw, 6rem);
}

/* Masthead: the company name set across a rule, with the entity on the
   far end. The site's strongest statement of identity, and it costs one
   line of height. */
.masthead {
  display: flex; align-items: center; gap: clamp(1rem, 3vw, 2rem);
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}
.masthead-name {
  font-size: clamp(0.9rem, 0.82rem + 0.35vw, 1.1rem);
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  white-space: nowrap;
}
.masthead-rule { flex: 1 1 auto; height: 1px; background: var(--rule-strong); min-width: 1rem; }
.masthead-meta {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
}
.hero-body { max-width: 46ch; }

.eyebrow { color: var(--ink-3); margin-bottom: 1.25rem; }
/* Label followed by a short rule — the device that marks every heading. */
.eyebrow-rule { display: flex; align-items: center; gap: 0.9rem; color: var(--ink-2); }
.eyebrow-rule::after {
  content: ""; width: clamp(2rem, 6vw, 4rem); height: 1px;
  background: var(--rule-strong); flex: none;
}

h1 {
  font-family: var(--font-display);
  font-size: var(--t-h1);
  line-height: 1.04;
  letter-spacing: -0.021em;
  text-wrap: balance;
}

h1 .eyebrow {
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.1em;
}

.lede {
  margin-top: 1.5rem;
  max-width: 54ch;
  font-size: var(--t-lede);
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.75rem; margin-top: 2.25rem; }

.btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.8rem 1.4rem;
  border: 1px solid var(--ink);
  border-radius: 2px;
  font-size: var(--t-small);
  letter-spacing: 0.01em;
  transition: background-color 130ms ease, color 130ms ease, border-color 130ms ease;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }
@media (prefers-color-scheme: dark) { .btn-primary:hover { color: #121312; } }
.btn-quiet { border-color: var(--rule-strong); color: var(--ink); }
.btn-quiet:hover { border-color: var(--ink); }
.btn .arr { font-size: 0.95em; }

/* Secondary action. Deliberately not a button: one action leads, the other
   follows. */
.link-cta {
  font-size: var(--t-small);
  padding: 0.8rem 0.25rem;
  border-bottom: 1px solid var(--rule-strong);
  transition: border-color 130ms ease, color 130ms ease;
}
.link-cta:hover { border-bottom-color: var(--ink); color: var(--accent); }

.hero-figure { color: var(--figure-line); }
.hero-figure svg { width: clamp(200px, 22vw, 320px); height: auto; }
.fig-grid   { opacity: 0.85; }
.fig-nodes  { color: var(--figure-line); }
.fig-path   { color: var(--accent); }
.fig-marks  { color: var(--accent); }
.figure-caption {
  margin-top: 1rem;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .js .fig-path {
    stroke-dasharray: 400; stroke-dashoffset: 400;
    animation: trace 1.7s cubic-bezier(0.22, 0.61, 0.36, 1) 0.35s forwards;
  }
  .js .fig-marks { opacity: 0; animation: settle 0.6s ease-out 1.85s forwards; }
  @keyframes trace  { to { stroke-dashoffset: 0; } }
  @keyframes settle { to { opacity: 1; } }
}

/* -------------------------------------------------------------- contents */
/* The page's architecture, stated once and in order, the way a technical
   report states it. It is navigation, but it is also the argument that the
   site has a structure worth following. */
.contents {
  border-block: 1px solid var(--rule-strong);
  background: var(--paper-sunk);
  padding-block: clamp(1.75rem, 3.5vw, 2.5rem);
}
.contents-label { color: var(--ink-3); margin-bottom: 1.25rem; }
.contents-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(1.5rem, 4vw, 3rem);
  border-top: 1px solid var(--rule);
}
.contents-list li { border-bottom: 1px solid var(--rule); }
.contents-list a {
  display: flex; align-items: baseline; gap: 1rem;
  padding-block: 0.85rem;
  color: var(--ink-2);
  transition: color 130ms ease;
}
.contents-list a:hover { color: var(--ink); }
.contents-num {
  font-family: var(--font-mono);
  font-size: var(--t-label);
  letter-spacing: 0.1em;
  color: var(--ink-3);
  flex: none;
}
.contents-name { font-size: var(--t-small); line-height: 1.4; }
.contents-list a:hover .contents-num { color: var(--accent); }

/* -------------------------------------------------------------- sections */
.section {
  border-top: 1px solid var(--rule);
  padding-block: clamp(3.5rem, 8vw, 7rem);
}
/* The contents bar already closes with a rule; don't draw a second one. */
.contents + .section { border-top: 0; }
.section-contact { background: var(--paper-sunk); }

.section-grid {
  display: grid;
  grid-template-columns: minmax(10rem, 13rem) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.rail { position: sticky; top: calc(var(--header-h) + 2.5rem); }
.rail-label { color: var(--ink); line-height: 1.5; }
/* Every section heading carries the same trailing rule as the hero label. */
.rail-label::after {
  content: ""; display: block; width: 2.5rem; height: 1px;
  background: var(--rule-strong); margin-top: 0.8rem;
}

/* Full-width section: the heading becomes a bar across the top. */
.section-wide .rail-bar {
  position: static;
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 0.75rem 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule-strong);
  margin-bottom: clamp(1.5rem, 2.5vw, 2rem);
}
.section-wide .rail-label::after { display: none; }
.section-wide .rail-note { margin-top: 0; max-width: 42ch; text-align: right; }
.rail-note {
  margin-top: 0.9rem;
  font-size: var(--t-small);
  line-height: 1.5;
  color: var(--ink-3);
  max-width: 26ch;
}
.col { min-width: 0; }

.statement {
  font-family: var(--font-display);
  font-size: var(--t-statement);
  line-height: 1.35;
  letter-spacing: -0.012em;
  max-width: 60ch;
  text-wrap: pretty;
}
.statement + .statement { margin-top: 1.5rem; }
.statement-secondary { color: var(--ink-2); }

.body {
  margin-top: 1.5rem;
  max-width: 62ch;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* Taxonomy list — the company's declared domains. */
.domains { margin-top: 3rem; border-top: 1px solid var(--rule); }
.domains li {
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-2);
  letter-spacing: 0.09em;
}

/* -------------------------------------------------------------- register */
.register { border-top: 1px solid var(--rule-strong); }

/* ------------------------------------------------------------ work grid */
/* Three programmes side by side, divided by rules rather than boxed into
   cards. Each carries a small diagram of what it actually does, drawn in
   the same hairline language as the hero lattice. */
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.work-item {
  display: flex; flex-direction: column;
  padding: 2.25rem clamp(1.5rem, 3vw, 2.5rem) 2rem;
  border-left: 1px solid var(--rule);
}
.work-item:first-child { padding-left: 0; border-left: 0; }
.work-item:last-child { padding-right: 0; }

.work-figure {
  width: 52px; height: 52px;
  margin-bottom: 1.75rem;
  color: var(--figure-line);
}
.wf-faint  { color: var(--figure-line); }
.wf-accent { color: var(--accent); }
.wf-mark   { color: var(--accent); }

.work-item .entry-ref { padding-top: 0; margin-bottom: 0.9rem; }
.work-item .entry-name { font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.6rem); }
.work-item .entry-category { margin-top: 0.5rem; }
.work-item .entry-desc { margin-top: 1rem; padding-top: 0; max-width: none; }
/* Statuses line up across the three columns whatever the copy length. */
.work-item .entry-status {
  margin-top: auto;
  padding-top: 2rem;
}

.statement + .register,
.body + .register { margin-top: 2.75rem; }

.entry {
  display: grid;
  grid-template-columns: 4.25rem minmax(11rem, 0.9fr) minmax(0, 1.35fr) 13.5rem;
  gap: 1.5rem;
  align-items: start;
  padding: 2rem 0;
  border-bottom: 1px solid var(--rule);
  transition: background-color 130ms ease;
}
.register-compact .entry { padding-block: 1.5rem; }

/* Only rows that lead somewhere respond to the pointer. */
.entry:has(a):hover {
  background: var(--paper-sunk);
  box-shadow: 0 0 0 1rem var(--paper-sunk);
}

.entry-ref { color: var(--ink-3); padding-top: 0.45rem; }

.entry-name {
  font-family: var(--font-display);
  font-size: var(--t-h3);
  line-height: 1.2;
  letter-spacing: -0.012em;
}
.entry-name a { border-bottom: 1px solid var(--rule-strong); transition: border-color 130ms ease; }
.entry-name a:hover { border-bottom-color: var(--ink); }
.entry-category { margin-top: 0.6rem; color: var(--ink-3); line-height: 1.5; }

.entry-desc {
  font-size: var(--t-small);
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 48ch;
  padding-top: 0.2rem;
}

.entry-status {
  display: flex; align-items: baseline; gap: 0.55rem;
  color: var(--ink-2);
  line-height: 1.55;
  padding-top: 0.45rem;
}
.dot {
  width: 6px; height: 6px; flex: none;
  transform: translateY(-1px);
  background: var(--accent);
}
.entry-status[data-stage="internal"] .dot { background: none; box-shadow: inset 0 0 0 1px var(--ink-3); }
.entry-status[data-stage="research"] .dot { background: none; box-shadow: inset 0 0 0 1px var(--rule-strong); }

/* Claim-discipline note. Deliberately plain. */
.note {
  margin-top: 2.5rem;
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--rule);
  background: var(--paper-sunk);
  max-width: 64ch;
}
.note-label { color: var(--ink-3); margin-bottom: 0.75rem; }
.note p { font-size: var(--t-small); line-height: 1.7; color: var(--ink-2); }
.note strong { color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------------ principles */
.principles { border-top: 1px solid var(--rule-strong); }
.principles li {
  display: grid;
  grid-template-columns: minmax(14rem, 0.95fr) minmax(0, 1.3fr);
  gap: 1.5rem clamp(1.5rem, 4vw, 3rem);
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--rule);
}
.principles h3 {
  font-family: var(--font-display);
  font-size: var(--t-h3);
  line-height: 1.25;
  letter-spacing: -0.012em;
}
.principles p { color: var(--ink-2); font-size: var(--t-small); line-height: 1.7; max-width: 52ch; }

/* ----------------------------------------------------------------- facts */
.facts { margin-top: 3rem; border-top: 1px solid var(--rule); max-width: 40rem; }
.facts > div {
  display: grid;
  grid-template-columns: minmax(9rem, 12rem) minmax(0, 1fr);
  gap: 1rem;
  padding-block: 0.9rem;
  border-bottom: 1px solid var(--rule);
}
.facts dt { color: var(--ink-3); padding-top: 0.2rem; }
.facts dd { font-size: var(--t-small); color: var(--ink); }

/* --------------------------------------------------------------- contact */
.contact-pending {
  margin-top: 1.75rem;
  max-width: 58ch;
  color: var(--ink-2);
  padding-left: 1.25rem;
  border-left: 2px solid var(--rule-strong);
}
.contact-primary { margin-top: 1.75rem; font-family: var(--font-display); font-size: var(--t-statement); }
.contact-primary a { border-bottom: 1px solid var(--rule-strong); }
.contact-primary a:hover { border-bottom-color: var(--ink); }

.disclaimer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  max-width: 62ch;
  font-size: var(--t-small);
  line-height: 1.7;
  color: var(--ink-3);
}

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--rule-strong); padding-top: clamp(3rem, 6vw, 4.5rem); }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 4rem);
  padding-bottom: clamp(3rem, 6vw, 4.5rem);
}
.footer-wordmark {
  display: flex; align-items: center; gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.015em;
}
.footer-line { margin-top: 0.75rem; max-width: 34ch; font-size: var(--t-small); color: var(--ink-3); line-height: 1.6; }

.footer-label { color: var(--ink-3); margin-bottom: 1.1rem; }
.footer-col li { font-size: var(--t-small); line-height: 1.5; margin-bottom: 0.65rem; }
.footer-col a { color: var(--ink-2); border-bottom: 1px solid transparent; }
.footer-col a:hover { color: var(--ink); border-bottom-color: var(--rule-strong); }
.footer-plain li { color: var(--ink-3); }

.footer-base {
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  padding-block: 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-3);
}
.footer-base a { border-bottom: 1px solid transparent; }
.footer-base a:hover { color: var(--ink); border-bottom-color: var(--rule-strong); }

/* On the 404 page the base row is the whole footer; one rule, not two. */
.site-footer-slim { padding-top: 0; }
.site-footer-slim .footer-base { border-top: 0; padding-block: 1.75rem; }

/* ------------------------------------------------------------ 404 page */
.page-narrow { padding-block: clamp(5rem, 14vw, 10rem); }
.page-narrow h1 { max-width: 20ch; }
.page-narrow .lede { margin-bottom: 2.5rem; }

/* ===================================================== responsive ======= */
@media (max-width: 1080px) {
  /* Two programmes across, the third beneath — still rules, still no cards. */
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-item { border-top: 1px solid var(--rule); padding-block: 2rem; }
  .work-item:nth-child(-n+2) { border-top: 0; }
  .work-item:nth-child(odd) { padding-left: 0; border-left: 0; }
  .work-item:nth-child(even) { padding-right: 0; }

  /* Ref, name and status stay on one line; the description drops beneath
     them. Placement is explicit — auto-placement would push the status
     onto a row of its own. */
  .entry { grid-template-columns: 3.5rem minmax(0, 1fr) 11rem; }
  .entry-ref    { grid-column: 1; grid-row: 1; }
  .entry-head   { grid-column: 2; grid-row: 1; }
  .entry-status { grid-column: 3; grid-row: 1; }
  .entry-desc   { grid-column: 2 / -1; grid-row: 2; padding-top: 0.25rem; max-width: 56ch; }
}

@media (max-width: 860px) {
  :root { --header-h: 3.5rem; }

  .no-js .nav-toggle { display: none; }
  .js .nav-toggle { display: inline-flex; }

  .js .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 0.5rem var(--shell-pad) 1.5rem;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
  }
  .js .site-nav[data-open] { display: flex; }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-list a {
    display: block;
    padding-block: 0.85rem;
    font-size: 1rem;
    color: var(--ink);
    border-bottom: 1px solid var(--rule);
  }
  .nav-list a:hover, .nav-list a[aria-current] { border-bottom-color: var(--rule); color: var(--accent); }
  .nav-external {
    padding: 1.1rem 0 0;
    border-inline-start: none;
  }

  .hero-grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .hero-body { max-width: none; }
  /* The headline leads on small screens; the diagram follows it. */
  .hero-figure { margin-top: 3.5rem; padding-top: 2.5rem; border-top: 1px solid var(--rule); }
  .hero-figure svg { width: min(200px, 54vw); }
  .figure-caption { margin-top: 1.25rem; }

  .masthead { gap: 1rem; }
  .masthead-meta { font-size: 0.625rem; }

  .contents-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .section-grid { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
  .rail { position: static; }
  .rail-label { padding-bottom: 0.9rem; border-bottom: 1px solid var(--rule); }
  .rail-label::after { display: none; }
  .rail-note { max-width: none; }

  .section-wide .rail-bar { display: block; padding-bottom: 0; border-bottom: 0; margin-bottom: 2rem; }
  .section-wide .rail-label { padding-bottom: 0.9rem; border-bottom: 1px solid var(--rule); }
  .section-wide .rail-note { margin-top: 0.9rem; text-align: left; max-width: none; }

  .principles li { grid-template-columns: minmax(0, 1fr); gap: 0.6rem; }

  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  /* A catalogue entry, read top to bottom: ref, name, description, status. */
  .entry {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-block: 1.75rem;
  }
  /* Clear the explicit placement set at the tablet breakpoint, or it would
     create extra implicit tracks in this single-column grid. */
  .entry > * { grid-column: 1 / -1; grid-row: auto; padding-top: 0; }
  .entry-head   { margin-top: 0.9rem; }
  .entry-desc   { margin-top: 0.85rem; max-width: none; }
  .entry-status { margin-top: 1.25rem; }
  .entry:has(a):hover { background: none; box-shadow: none; }

  .facts > div { grid-template-columns: minmax(0, 1fr); gap: 0.35rem; }
  .facts dt { padding-top: 0; }

  .note { padding: 1.25rem; }
  .btn { flex: 0 0 auto; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }

  /* The header wordmark is already the identity at this width; a second
     one directly beneath it is repetition, not presence. The jurisdiction
     is still stated under Company and in the footer. */
  .masthead { display: none; }
  .hero { padding-top: clamp(2.5rem, 9vw, 3.5rem); }

  .contents-list { grid-template-columns: minmax(0, 1fr); }

  .work-grid { grid-template-columns: minmax(0, 1fr); }
  .work-item, .work-item:nth-child(even), .work-item:nth-child(odd) {
    padding-inline: 0;
    border-left: 0;
    border-top: 1px solid var(--rule);
  }
  .work-item:first-child { border-top: 0; }
  .work-item:nth-child(2) { border-top: 1px solid var(--rule); }
  .work-figure { margin-bottom: 1.25rem; }
  .work-item .entry-status { padding-top: 1.5rem; }
}

@media print {
  .site-header, .nav-toggle, .hero-figure { display: none; }
  body { background: #fff; color: #000; }
  .section { break-inside: avoid; }
}
