/* ==========================================================================
   Definitive Design Studio: "The Drawing Sheet"
   Brand tokens, the drawing-sheet components, the form, motion and states.
   The base reset lives in base.css, which loads after this file.
   ========================================================================== */

/* ---------- Colour tokens ----------
   "charcoal" is the ink colour and "alabaster" the sheet colour, so in dark mode
   they swap: light lines on a dark sheet, like a CAD screen. */
:root {
  color-scheme: light;
  --charcoal: #363532;
  --alabaster: #EFECE6;
  --paper: #E4E0D7;
  --muted: #625F59;
  --redline: #B5432F;
  --redline-dark: #963523;
  --redline-ink: #A23A27;   /* red text on the darker paper panels (5:1 contrast) */
  --on-red: #FFFFFF;
  --charcoal-deep: #24231F;
  --line: rgba(54, 53, 50, .9);
  --hair: rgba(54, 53, 50, .22);
  --hair-soft: rgba(54, 53, 50, .12);
  --header-bg: rgba(239, 236, 230, .94);
  --shadow: rgba(54, 53, 50, .55);
  --sheet: #F4F2ED;
  --face: #F7F5F1;
  --face-top: #FBFAF7;
  --face-side: #E4E0D7;
  --face-end: #CFCAC0;
  --hover-bg: rgba(228, 224, 215, .55);
  --ph-ink: rgba(54, 53, 50, .55);
  --ph-hatch: rgba(54, 53, 50, .045);
  --slot-detail: #EAE7E0;
  --red-tint: rgba(181, 67, 47, .045);
  --dotted: rgba(54, 53, 50, .35);
  --field: #FFFFFF;
  --field-soft: #F6F4F0;
  --field-border: rgba(54, 53, 50, .45);
  --placeholder: #8D8981;
  --rev-k: rgba(239, 236, 230, .7);
  --band-bg: #363532;
  --band-ink: #EFECE6;
  --band-muted: #BDB7AC;
  --solid-bg: #363532;
  --solid-ink: #EFECE6;
  --solid-hover: #24231F;

  --f-display: "Yeseva One", Georgia, serif;
  --f-sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --gutter: 16px;
  --pad: clamp(20px, 4.5vw, 64px);
  --rail: 0px;
  --rail-top: 22px;
  --header-h: 104px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (min-width: 700px) {
  :root { --gutter: 24px; --rail: 26px; }
}

/* Dark tokens: used when the system is dark (unless the visitor chose light),
   or when the visitor switched to dark. The two blocks must stay identical. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --charcoal: #E8E4DC; --alabaster: #1C1B19; --paper: #262522; --muted: #A8A296;
    --redline: #E07158; --redline-dark: #EA8670; --redline-ink: #E07158; --on-red: #1A1917; --charcoal-deep: #FFFFFF;
    --line: rgba(232, 228, 220, .9); --hair: rgba(232, 228, 220, .2); --hair-soft: rgba(232, 228, 220, .1);
    --header-bg: rgba(28, 27, 25, .92); --shadow: rgba(0, 0, 0, .7);
    --sheet: #201F1D; --face: #2A2926; --face-top: #312F2C; --face-side: #3A3834; --face-end: #4A4741;
    --hover-bg: rgba(255, 255, 255, .04); --ph-ink: rgba(232, 228, 220, .45); --ph-hatch: rgba(232, 228, 220, .05);
    --slot-detail: #2C2B28; --red-tint: rgba(224, 113, 88, .07); --dotted: rgba(232, 228, 220, .3);
    --field: #141311; --field-soft: #22211E; --field-border: rgba(232, 228, 220, .35); --placeholder: #7E796F;
    --rev-k: rgba(241, 238, 232, .6); --band-bg: #2A2926; --band-ink: #EFECE6; --band-muted: #A8A296; --solid-bg: #3B3936; --solid-ink: #F1EEE8; --solid-hover: #4A4844;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --charcoal: #E8E4DC; --alabaster: #1C1B19; --paper: #262522; --muted: #A8A296;
  --redline: #E07158; --redline-dark: #EA8670; --redline-ink: #E07158; --on-red: #1A1917; --charcoal-deep: #FFFFFF;
  --line: rgba(232, 228, 220, .9); --hair: rgba(232, 228, 220, .2); --hair-soft: rgba(232, 228, 220, .1);
  --header-bg: rgba(28, 27, 25, .92); --shadow: rgba(0, 0, 0, .7);
  --sheet: #201F1D; --face: #2A2926; --face-top: #312F2C; --face-side: #3A3834; --face-end: #4A4741;
  --hover-bg: rgba(255, 255, 255, .04); --ph-ink: rgba(232, 228, 220, .45); --ph-hatch: rgba(232, 228, 220, .05);
  --slot-detail: #2C2B28; --red-tint: rgba(224, 113, 88, .07); --dotted: rgba(232, 228, 220, .3);
  --field: #141311; --field-soft: #22211E; --field-border: rgba(232, 228, 220, .35); --placeholder: #7E796F;
  --rev-k: rgba(241, 238, 232, .6); --band-bg: #2A2926; --band-ink: #EFECE6; --band-muted: #A8A296; --solid-bg: #3B3936; --solid-ink: #F1EEE8; --solid-hover: #4A4844;
}

/* Logo: the right artwork for the current theme */
.logo--dark { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo--light { display: none !important; }
  :root:not([data-theme="light"]) .logo--dark { display: block !important; }
}
:root[data-theme="dark"] .logo--light { display: none !important; }
:root[data-theme="dark"] .logo--dark { display: block !important; }

/* Smooth hand-over when the switch is used (not on first paint) */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition: background-color .35s ease, border-color .35s ease, color .35s ease, fill .35s ease, stroke .35s ease !important;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--alabaster);
  color: var(--charcoal);
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--redline); color: var(--on-red); }

/* ---------- Accessibility helpers ---------- */
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  background: var(--charcoal); color: var(--alabaster);
  padding: 10px 16px; font: 600 14px/1 var(--f-sans);
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--redline);
  outline-offset: 3px;
  border-radius: 1px;
}
#main:focus { outline: none; }

/* ---------- Shared type ---------- */
.label, .view-label, .rev-strip, .site-header__meta, .rail,
.parts__row--head, .parts__no, .parts__as, .parts__k,
.detail__kicker, .detail__bubble, .studies__no, .chain__label, .study__k,
.dfm-note__k, .way__type, .way__spec dt, .general-notes__title,
.rfq__n, .rfq__progress, .rfq__count, .rfq__summary-k, .tb__k, .slot__ph span,
.notes-strip__no, .about__role, .field label, .field__legend {
  font-family: var(--f-mono);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-feature-settings: "zero" 1;
}

.label {
  display: flex; align-items: center; gap: 12px;
  font-size: 11px; color: var(--muted); margin: 0 0 22px;
}
.label__id { color: var(--redline); font-weight: 600; }

.section__title, .hero__title, .study__title, .way__title, .detail__title,
.parts__name, .rfq__done-title, .notes-strip__title {
  font-family: var(--f-display);
  font-weight: 400;
  letter-spacing: -.01em;
  color: var(--charcoal);
}

/* ---------- Buttons ---------- */
.btn {
  --b: var(--charcoal);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: 0 22px;
  font: 600 15px/1 var(--f-sans); letter-spacing: .01em;
  border: 1px solid var(--b); border-radius: 0;
  background: transparent; color: var(--charcoal);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn--red { --b: var(--redline); background: var(--redline); color: var(--on-red); }
.btn--red:hover { background: var(--redline-dark); border-color: var(--redline-dark); }
.btn--dark { --b: var(--solid-bg); background: var(--solid-bg); color: var(--solid-ink); }
.btn--dark:hover { background: var(--solid-hover); border-color: var(--solid-hover); }
.btn--ghost:hover { background: var(--solid-bg); color: var(--solid-ink); border-color: var(--solid-bg); }
.btn--line {
  min-height: 40px; padding: 0 14px;
  font: 500 11px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .14em;
  --b: var(--hair);
}
.btn--line:hover { --b: var(--redline); color: var(--redline); }
.btn--line.is-added { --b: var(--redline); background: var(--redline); color: var(--on-red); }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn:active { transform: translateY(1px); }
.btn[hidden] { display: none; }

/* ==========================================================================
   Header
   ========================================================================== */
/* Fixed (not sticky) so collapsing never changes page height or scroll position.
   body padding reserves the expanded header height: 28px meta row + 76px bar. */
body { padding-top: var(--header-h); }
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.is-collapsed { border-bottom-color: var(--charcoal); box-shadow: 0 6px 24px -18px var(--shadow); }

.site-header__meta,
.site-header__bar {
  max-width: 1440px; margin: 0 auto;
  padding-left: calc(var(--gutter) + var(--rail) + var(--pad) * .5);
  padding-right: calc(var(--gutter) + var(--pad) * .5);
}
.site-header__meta {
  display: flex; justify-content: space-between; gap: 16px;
  font-size: 10px; color: var(--muted);
  height: 28px; align-items: center; overflow: hidden;
  border-bottom: 1px solid var(--hair-soft);
  transition: height .3s var(--ease), opacity .25s var(--ease), border-color .3s;
}
.site-header__meta .meta-mid { display: none; }
@media (min-width: 640px) { .site-header__meta .meta-mid { display: inline; } }
.site-header.is-collapsed .site-header__meta { height: 0; opacity: 0; border-bottom-color: transparent; }

.site-header__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: 76px;
  transition: height .3s var(--ease);
}
.site-header.is-collapsed .site-header__bar { height: 60px; }
.site-header__logo { display: block; flex: none; }
.site-header__logo img { height: 34px; width: auto; transition: height .3s var(--ease); }
.site-header.is-collapsed .site-header__logo img { height: 26px; }
.site-header__actions { display: flex; align-items: center; gap: 8px; }

.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  position: relative; display: block; padding: 10px 12px;
  font: 500 15px/1 var(--f-sans); color: var(--charcoal); text-decoration: none;
}
.site-nav a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 1px;
  background: var(--redline); transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.site-nav a:hover::after, .site-nav a.is-active::after { transform: scaleX(1); }
.site-nav a.is-active { color: var(--redline); }
@media (min-width: 1100px) {
  .site-nav a { white-space: nowrap; }
}
@media (min-width: 1100px) and (max-width: 1279.98px) {
  /* seven tabs plus the quote button: use the short "Quote" label until there's room */
  .site-header__actions .btn-label-long { display: none; }
  .site-header__actions .btn-label-short { display: inline; }
}
@media (min-width: 1100px) and (max-width: 1199.98px) {
  .site-nav ul { gap: 0; }
  .site-nav a { padding: 10px 7px; font-size: 14px; }
  .site-nav a::after { left: 7px; right: 7px; }
}

.nav-toggle {
  display: none; width: 44px; height: 40px; border: 1px solid var(--hair);
  background: transparent; cursor: pointer; position: relative;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--charcoal);
  transition: transform .25s var(--ease), opacity .2s;
}
.nav-toggle__bars { top: 50%; margin-top: -.75px; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; left: 0; right: 0; }
.nav-toggle__bars::before { transform: translateY(-6px); }
.nav-toggle__bars::after { transform: translateY(6px); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: rotate(45deg); background: var(--charcoal); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: rotate(-45deg); background: var(--charcoal); }

@media (max-width: 1099.98px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--alabaster); border-bottom: 1px solid var(--charcoal);
    padding: 8px var(--gutter) 20px;
    display: none;
  }
  .js .site-nav.is-open { display: block; }
  .no-js .site-nav { position: static; display: block; border: 0; padding: 0; }
  .site-nav ul { flex-direction: column; gap: 0; max-width: 1440px; margin: 0 auto; }
  .site-nav li + li { border-top: 1px solid var(--hair-soft); }
  .site-nav a { padding: 16px 4px; font-size: 18px; }
  .site-nav a::after { left: 4px; right: auto; width: 40px; bottom: 10px; }
}
@media (max-width: 420px) {
  .site-header__logo img { height: 28px; }
  .site-header__actions .btn--sm { padding: 0 12px; font-size: 13px; }
}

/* ==========================================================================
   Drawing sheet frame and grid-reference rails
   ========================================================================== */
.sheet {
  position: relative;
  max-width: 1440px;
  margin: 12px auto var(--gutter);
  margin-left: max(var(--gutter), calc((100% - 1440px) / 2));
  margin-right: max(var(--gutter), calc((100% - 1440px) / 2));
  border: 1px solid var(--charcoal);
  padding-top: var(--rail-top);
  padding-left: var(--rail);
}
/* inner frame line, like a drawing border */
.sheet::before {
  content: ""; position: absolute; pointer-events: none;
  inset: var(--rail-top) 0 0 var(--rail);
  border-top: 1px solid var(--charcoal);
  border-left: 1px solid var(--charcoal);
}
@media (max-width: 699.98px) { .sheet::before { border-left: 0; } }

.rail { color: var(--muted); font-size: 10px; letter-spacing: .1em; user-select: none; }
.rail span { display: flex; align-items: center; justify-content: center; position: relative; }
.rail--top {
  position: absolute; top: 0; right: 0; left: var(--rail); height: var(--rail-top);
  display: grid; grid-template-columns: repeat(8, 1fr);
}
.rail--top span + span::before {
  content: ""; position: absolute; left: 0; bottom: 0; height: 7px; width: 1px; background: var(--charcoal);
}
.rail--left {
  position: absolute; top: var(--rail-top); bottom: 0; left: 0; width: var(--rail);
  display: grid; grid-template-rows: repeat(6, 1fr);
}
.rail--left span { align-items: flex-start; padding-top: 18px; }
.rail--left span + span::before {
  content: ""; position: absolute; top: 0; right: 0; width: 7px; height: 1px; background: var(--charcoal);
}
.rail--left span:first-child { align-items: flex-start; }
@media (max-width: 699.98px) {
  .rail--left { display: none; }
  .rail--top span:nth-child(even) { color: transparent; }
}

.sheet__body { display: block; }

/* ==========================================================================
   Sections
   ========================================================================== */
.section {
  padding: clamp(72px, 10vw, 132px) var(--pad);
  border-top: 1px solid var(--hair);
  position: relative;
}
.section__head { margin-bottom: clamp(36px, 5vw, 64px); }
.view-label {
  display: flex; align-items: center; gap: 14px;
  font-size: 11px; color: var(--muted); margin: 0 0 28px;
}
.view-label__id { color: var(--redline); font-weight: 600; white-space: nowrap; }
.view-label__id::before {
  content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 10px;
  border: 1.5px solid var(--redline); border-radius: 50%; vertical-align: -1px;
}
.view-label__rule { flex: 1; height: 1px; background: var(--hair); min-width: 24px; }
.view-label__meta { white-space: nowrap; }
@media (max-width: 479.98px) { .view-label__meta { display: none; } }

.section__intro { display: grid; gap: 18px 64px; align-items: end; }
@media (min-width: 960px) { .section__intro { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }
.section__title, .cta-band__title, .sector__title, .way__title, .detail__title, .hero__lede, .section__lede { text-wrap: balance; }
.section__title {
  font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.6rem);
  line-height: 1.02; margin: 0;
}
.section__lede { margin: 0; color: var(--muted); font-size: clamp(1.02rem, .98rem + .2vw, 1.14rem); max-width: 60ch; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  display: grid; gap: 48px;
  padding: clamp(40px, 7vw, 104px) var(--pad) clamp(48px, 7vw, 96px);
  align-items: center;
}
@media (min-width: 1080px) {
  .hero { grid-template-columns: minmax(0, 5fr) minmax(0, 6.2fr); gap: clamp(40px, 5vw, 80px); }
}
.hero__copy { container-type: inline-size; }
.hero__title {
  /* sized from the column, so the longest word ("department,", 6.25em) always fits */
  font-size: clamp(2.5rem, 1.6rem + 4.6vw, 5.4rem);
  font-size: clamp(2.5rem, 14.6cqi, 5.4rem);
  line-height: .98; margin: 0 0 28px; max-width: 12ch;
}
.hero__title em { font-style: normal; color: var(--charcoal); position: relative; white-space: nowrap; }
.hero__title em::after {
  /* redline revision cloud underline */
  content: ""; position: absolute; left: 0; right: .2em; bottom: -.06em; height: .09em;
  background: var(--redline); transform-origin: left; transform: scaleX(1);
}
.js .hero__title em::after { animation: underline-in 1s .6s var(--ease) both; }
@keyframes underline-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.hero__lede { font-size: clamp(1.06rem, 1rem + .35vw, 1.24rem); color: var(--muted); max-width: 44ch; margin: 0 0 34px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 32px; }
.hero__where {
  display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 0;
  font: 500 11px/1.6 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--charcoal);
  padding-top: 18px; border-top: 1px solid var(--hair);
}
.hero__where .dot { color: var(--redline); }
@media (max-width: 559.98px) { .hero__where { flex-direction: column; gap: 2px; } .hero__where .dot { display: none; } }

/* Drawing panel */
.hero__drawing { margin: 0; min-width: 0; }
.part-pick {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--charcoal); border-bottom: 0; background: var(--paper);
}
.part-pick__btn {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 46px; padding: 10px 6px;
  font: 500 11px/1.1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase;
  background: transparent; border: 0; color: var(--muted); cursor: pointer; position: relative;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.part-pick__btn + .part-pick__btn { border-left: 1px solid var(--hair); }
.part-pick__btn span { color: var(--redline-ink); font-weight: 600; }
.part-pick__btn:hover { color: var(--charcoal); }
.part-pick__btn[aria-pressed="true"] { background: var(--alabaster); color: var(--charcoal); }
.part-pick__btn[aria-pressed="true"]::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--redline);
}
.part-pick__btn:focus-visible { outline-offset: -4px; }
@media (max-width: 519.98px) {
  .part-pick__btn { font-size: 10px; letter-spacing: .05em; }
  .part-pick__btn span { display: none; }
}

.drawing-toolbar {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px;
  border: 1px solid var(--charcoal); border-bottom: 0;
  padding: 8px; background: var(--alabaster);
}
.seg { display: inline-flex; border: 1px solid var(--hair); }
.seg__btn {
  font: 500 11px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase;
  padding: 10px 14px; min-height: 36px; background: transparent; border: 0; color: var(--muted); cursor: pointer;
}
.seg__btn + .seg__btn { border-left: 1px solid var(--hair); }
.seg__btn[aria-pressed="true"] { background: var(--solid-bg); color: var(--solid-ink); }
.seg__btn:hover:not([aria-pressed="true"]) { color: var(--charcoal); }

.switch {
  display: inline-flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 6px;
  font: 500 11px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase;
  background: none; border: 0; color: var(--charcoal); cursor: pointer;
}
.switch__track { width: 34px; height: 18px; border: 1px solid var(--charcoal); position: relative; transition: background .2s; }
.switch__thumb {
  position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; background: var(--charcoal);
  transition: transform .25s var(--ease), background .2s;
}
.switch[aria-pressed="true"] .switch__track { background: var(--redline); border-color: var(--redline); }
.switch[aria-pressed="true"] .switch__thumb { transform: translateX(16px); background: var(--on-red); }

.drawing-frame {
  border: 1px solid var(--charcoal); background: var(--sheet);
  background-image:
    linear-gradient(var(--hair-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--hair-soft) 1px, transparent 1px);
  background-size: 24px 24px; background-position: -1px -1px;
  position: relative;
}
.drawing { display: block; width: 100%; height: auto; aspect-ratio: 600 / 424; }
.noscript-note { padding: 24px; font: 500 11px/1.6 var(--f-mono); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }

.rev-strip {
  display: flex; flex-wrap: wrap; gap: 0; font-size: 10.5px; color: var(--charcoal);
  border: 1px solid var(--charcoal); border-top: 0;
}
.rev-strip > span { padding: 10px 14px; border-right: 1px solid var(--hair); }
.rev-strip > span:last-child { border-right: 0; margin-left: auto; }
.rev-strip__rev { color: var(--on-red); background: var(--redline); font-weight: 600; }
@media (max-width: 559.98px) {
  .rev-strip > span { padding: 8px 10px; flex: 1 1 auto; }
  .rev-strip__date { display: none; }
  .rev-strip > span:nth-last-child(2) { border-right: 0; }
}

/* SVG drawing strokes (classes applied by main.js) */
.drawing .ln-frame  { fill: none; stroke: var(--charcoal); stroke-width: 1; }
.drawing .ln-thin   { fill: none; stroke: var(--charcoal); stroke-width: .5; }
.drawing .ln-obj    { fill: none; stroke: var(--charcoal); stroke-width: 1.35; stroke-linejoin: round; stroke-linecap: round; }
.drawing .ln-face   { fill: var(--face); stroke: var(--charcoal); stroke-width: 1.2; stroke-linejoin: round; }
.drawing .ln-face--top { fill: var(--face-top); }
.drawing .ln-face--side { fill: var(--face-side); }
.drawing .ln-face--end { fill: var(--face-end); }
.drawing .ln-hole   { fill: var(--sheet); stroke: var(--charcoal); stroke-width: 1; }
.drawing .ln-weld   { fill: none; stroke: var(--charcoal); stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: .01 2.3; }
.drawing .hatch-bg  { fill: var(--sheet); }
.drawing .hatch-ln  { stroke: var(--charcoal); stroke-width: .55; }
.drawing .ln-sect   { fill: url(#dds-hatch); stroke: var(--charcoal); stroke-width: 1; stroke-linejoin: round; }
.drawing .ln-sect2  { fill: url(#dds-hatch2); fill-rule: evenodd; stroke: var(--charcoal); stroke-width: 1; stroke-linejoin: round; }
.drawing .ln-sect.evenodd { fill-rule: evenodd; }
.drawing .t-notes   { font: 500 6px var(--f-mono); fill: var(--charcoal); letter-spacing: .06em; }
.drawing .ln-hidden { fill: none; stroke: var(--charcoal); stroke-width: .7; stroke-dasharray: 4 2.5; }
.drawing .ln-centre { fill: none; stroke: var(--muted); stroke-width: .45; stroke-dasharray: 12 2.5 2 2.5; }
.drawing .ln-dim    { fill: none; stroke: var(--redline); stroke-width: .6; }
.drawing .ln-ext    { fill: none; stroke: var(--redline); stroke-width: .45; }
.drawing .arrow     { fill: var(--redline); }
.drawing .t-dim     { font: 500 8.5px var(--f-mono); fill: var(--redline); letter-spacing: .04em; }
.drawing .t-note    { font: 500 6.6px var(--f-mono); fill: var(--redline); letter-spacing: .08em; text-transform: uppercase; }
.drawing .t-view    { font: 600 7px var(--f-mono); fill: var(--charcoal); letter-spacing: .18em; }
.drawing .t-tb-k    { font: 500 4.6px var(--f-mono); fill: var(--muted); letter-spacing: .16em; }
.drawing .t-tb-v    { font: 500 7.2px var(--f-mono); fill: var(--charcoal); letter-spacing: .06em; }
.drawing .t-tb-logo { font: 400 15px var(--f-display); fill: var(--charcoal); }
.drawing .t-tb-rev  { font: 600 13px var(--f-mono); fill: var(--redline); }
.drawing .t-zone    { font: 500 5.5px var(--f-mono); fill: var(--muted); }

.drawing .g-dims { transition: opacity .35s var(--ease); }
.drawing.dims-off .g-dims { opacity: 0; }

/* draw-on animation */
.drawing.is-drawing .draw {
  stroke-dasharray: var(--len, 1000);
  stroke-dashoffset: var(--len, 1000);
  animation: draw-line var(--dur, 1.2s) var(--delay, 0s) var(--ease) forwards;
}
.drawing.is-drawing .ln-face.draw, .drawing.is-drawing .ln-hole.draw, .drawing.is-drawing .ln-sect.draw, .drawing.is-drawing .ln-sect2.draw {
  fill-opacity: 0;
  animation:
    draw-line var(--dur, 1.2s) var(--delay, 0s) var(--ease) forwards,
    fill-in .5s var(--fill-delay, 1s) ease forwards;
}
.drawing.is-drawing .fade { opacity: 0; animation: fade-in .5s var(--delay, 1.4s) ease forwards; }
@keyframes draw-line { to { stroke-dashoffset: 0; } }
@keyframes fill-in { to { fill-opacity: 1; } }
@keyframes fade-in { to { opacity: 1; } }

/* ==========================================================================
   Notes strip (benefits)
   ========================================================================== */
.notes-strip {
  display: grid; border-top: 1px solid var(--hair);
}
@media (min-width: 820px) { .notes-strip { grid-template-columns: repeat(3, 1fr); } }
.notes-strip__item {
  padding: 30px var(--pad) 34px; position: relative;
}
.notes-strip__item + .notes-strip__item { border-top: 1px solid var(--hair); }
@media (min-width: 820px) {
  .notes-strip__item { padding: 34px clamp(20px, 2.6vw, 40px) 38px; }
  .notes-strip__item:first-child { padding-left: var(--pad); }
  .notes-strip__item + .notes-strip__item { border-top: 0; border-left: 1px solid var(--hair); }
}
.notes-strip__no {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
  color: var(--redline); font-size: 10.5px; font-weight: 600; letter-spacing: .1em;
}
.notes-strip__no::before {
  /* revision triangle */
  content: ""; width: 14px; height: 12px; background: var(--redline);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.notes-strip__title { font-size: 1.5rem; line-height: 1.1; margin: 0 0 8px; }
.notes-strip__item p { margin: 0; color: var(--muted); max-width: 38ch; }

/* ==========================================================================
   Sectors (key plan)
   ========================================================================== */
.sectors { display: grid; border: 1px solid var(--charcoal); }
@media (min-width: 700px) { .sectors { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1180px) { .sectors { grid-template-columns: repeat(4, 1fr); } }
.sector {
  padding: clamp(22px, 2.6vw, 34px); display: flex; flex-direction: column; gap: 12px;
  border-top: 1px solid var(--hair); transition: background-color .25s var(--ease);
}
.sector:first-child { border-top: 0; }
.sector:hover { background: var(--hover-bg); }
@media (min-width: 700px) and (max-width: 1179.98px) {
  .sector:nth-child(2) { border-top: 0; }
  .sector:nth-child(even) { border-left: 1px solid var(--hair); }
}
@media (min-width: 1180px) {
  .sector { border-top: 0; }
  .sector + .sector { border-left: 1px solid var(--hair); }
}
/* Each sector gets a framed drawing panel on a faint grid, like a detail view on the sheet */
.sector__art {
  position: relative; margin: 0 0 6px; aspect-ratio: 2 / 1;
  display: grid; place-items: center;
  border: 1px solid var(--hair); color: var(--charcoal);
  background-color: var(--slot-detail);
  background-image:
    linear-gradient(var(--hair-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--hair-soft) 1px, transparent 1px);
  background-size: 16px 16px; background-position: -1px -1px;
  transition: border-color .25s var(--ease);
}
.sector__art::before, .sector__art::after {
  /* registration ticks at two corners */
  content: ""; position: absolute; width: 9px; height: 9px; pointer-events: none;
  border: 0 solid var(--charcoal);
}
.sector__art::before { top: 6px; left: 6px; border-top-width: 1px; border-left-width: 1px; }
.sector__art::after { top: 6px; right: 6px; border-top-width: 1px; border-right-width: 1px; }
.sector__icon {
  width: min(56%, 190px); height: auto; aspect-ratio: 96 / 64; overflow: visible;
  margin-top: -8px; /* optical centre, leaving room for the caption */
  transition: color .25s var(--ease);
}
.sector__icon * { vector-effect: non-scaling-stroke; }   /* keep fine drawing line weights at any size */
.sector__art figcaption {
  position: absolute; left: 12px; bottom: 9px;
  font: 500 9.5px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.sector:hover .sector__art { border-color: var(--charcoal); }
.sector:hover .sector__icon { color: var(--redline); }
@media (min-width: 1180px) { .sector__art { aspect-ratio: 4 / 3; } .sector__icon { width: 74%; } }
.sector__no { margin: 0; font-family: var(--f-mono); font-size: 10.5px; font-weight: 600; letter-spacing: .16em; color: var(--redline); }
.sector__title { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.4rem, 1.2rem + .6vw, 1.7rem); line-height: 1.1; margin: 0; }
.sector > p:not(.sector__no) { margin: 0; color: var(--muted); }
.sector__list { list-style: none; margin: 4px 0 10px; padding: 0; font-size: 14.5px; border-top: 1px solid var(--hair); }
.sector__list li { padding: 8px 0 8px 20px; border-bottom: 1px solid var(--hair); position: relative; }
.sector__list li::before { content: ""; position: absolute; left: 2px; top: 1.05em; width: 9px; height: 1px; background: var(--redline); }
.sector .btn { align-self: flex-start; margin-top: auto; }

/* ==========================================================================
   Parts list
   ========================================================================== */
.parts { border: 1px solid var(--charcoal); }
.parts__row {
  display: grid; gap: 10px 24px; padding: 24px 20px;
  grid-template-columns: 1fr;
  grid-template-areas: "no" "desc" "as" "act";
  transition: background-color .25s var(--ease);
}
.parts__row + .parts__row { border-top: 1px solid var(--hair); }
.parts__row:not(.parts__row--head):hover { background: var(--hover-bg); }
.parts__row--head { display: none; }
.parts__no { grid-area: no; font-size: 12px; color: var(--redline); font-weight: 600; }
@media (min-width: 900px) { .parts__no { font-size: 13px; padding-top: 6px; } }
.parts__desc { grid-area: desc; }
.parts__name { font-size: clamp(1.45rem, 1.25rem + .8vw, 1.9rem); line-height: 1.1; margin: 0 0 8px; }
.parts__sub { font-family: var(--f-sans); font-size: .55em; color: var(--muted); letter-spacing: 0; vertical-align: .2em; white-space: nowrap; display: inline-block; }
.parts__desc p { margin: 0; color: var(--muted); max-width: 56ch; }
.parts__as { grid-area: as; font-size: 11px; line-height: 1.7; color: var(--charcoal); }
.parts__k { display: block; color: var(--muted); font-size: 9.5px; margin-bottom: 2px; }
.parts__act { grid-area: act; padding-top: 4px; }

@media (min-width: 900px) {
  .parts__row {
    grid-template-columns: 64px minmax(0, 1fr) 250px 140px;
    grid-template-areas: "no desc as act";
    align-items: start; padding: 28px 24px;
  }
  .parts__row--head {
    display: grid; padding: 12px 24px; background: var(--solid-bg); color: var(--solid-ink);
    font-size: 10px; grid-template-areas: none;
  }
  .parts__row--head:hover { background: var(--solid-bg); }
  .parts__as { padding-top: 6px; }
  .parts__k { display: none; }
  .parts__act { padding-top: 0; justify-self: end; }
}

/* ==========================================================================
   Image slots
   ========================================================================== */
.slot {
  position: relative; margin: 0; overflow: hidden;
  aspect-ratio: var(--ratio, 4 / 3);
  background: var(--paper);
  border: 1px solid var(--hair);
}
.slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.slot.is-empty img { display: none; }
.slot__ph {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: var(--ph-ink); padding: 12px;
  background-image: repeating-linear-gradient(135deg, transparent 0 9px, var(--ph-hatch) 9px 10px);
}
.slot__ph svg { width: 62%; max-width: 240px; height: auto; aspect-ratio: 160 / 113; overflow: visible; }
.slot__ph span { font-size: 9px; letter-spacing: .12em; color: var(--muted); text-align: center; }

/* ==========================================================================
   Details (what you receive)
   ========================================================================== */
.details { display: grid; gap: 24px; }
@media (min-width: 760px) { .details { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1140px) { .details { grid-template-columns: repeat(3, 1fr); gap: 28px; } }
.detail {
  border: 1px solid var(--charcoal); background: var(--paper);
  padding: 18px 18px 22px; display: flex; flex-direction: column; gap: 18px; position: relative;
}
.detail::after {
  /* corner registration marks */
  content: ""; position: absolute; inset: -5px; pointer-events: none;
  background:
    linear-gradient(var(--charcoal), var(--charcoal)) left top / 9px 1px no-repeat,
    linear-gradient(var(--charcoal), var(--charcoal)) left top / 1px 9px no-repeat,
    linear-gradient(var(--charcoal), var(--charcoal)) right bottom / 9px 1px no-repeat,
    linear-gradient(var(--charcoal), var(--charcoal)) right bottom / 1px 9px no-repeat;
}
.detail__head { display: flex; gap: 14px; align-items: center; }
.detail__bubble {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  border: 1.5px solid var(--redline); color: var(--redline-ink);
  display: grid; place-items: center; font-size: 12px; font-weight: 600; letter-spacing: .04em;
  position: relative;
}
.detail__bubble::after { content: ""; position: absolute; left: 50%; right: -16px; top: 50%; }
.detail__kicker { margin: 0 0 2px; font-size: 10px; color: var(--muted); }
.detail__title { font-size: 1.45rem; line-height: 1.1; margin: 0; }
.detail .slot { background: var(--slot-detail); border-color: var(--hair); }
.detail__list { list-style: none; margin: 0; padding: 0; font-size: 15.5px; }
.detail__list li { padding: 9px 0 9px 22px; border-top: 1px solid var(--hair); position: relative; }
.detail__list li::before {
  content: ""; position: absolute; left: 2px; top: 1.05em; width: 9px; height: 1px; background: var(--redline);
}

/* ==========================================================================
   Studies (tabs)
   ========================================================================== */
.studies { border: 1px solid var(--charcoal); }
.studies__tabs {
  display: flex; overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--charcoal); background: var(--paper);
}
.studies__tabs::-webkit-scrollbar { display: none; }
.studies__tabs [role="tab"] {
  flex: 1 0 auto; display: flex; align-items: center; gap: 10px;
  padding: 18px 22px; min-height: 56px;
  font: 600 15px/1.2 var(--f-sans); color: var(--muted);
  background: transparent; border: 0; border-right: 1px solid var(--hair);
  cursor: pointer; position: relative; text-align: left; white-space: nowrap;
}
.studies__tabs [role="tab"]:last-child { border-right: 0; }
.studies__tabs [role="tab"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--redline);
  transform: scaleX(0); transition: transform .3s var(--ease);
}
.studies__tabs [role="tab"][aria-selected="true"] { background: var(--alabaster); color: var(--charcoal); }
.studies__tabs [role="tab"][aria-selected="true"]::after { transform: scaleX(1); }
.studies__tabs [role="tab"]:hover { color: var(--charcoal); }
.studies__tabs [role="tab"]:focus-visible { outline-offset: -4px; }
.studies__no { font-size: 10px; color: var(--redline); font-weight: 600; }

.study { padding: clamp(22px, 3.5vw, 44px); }
.study[hidden] { display: none; }
.study:focus-visible { outline-offset: -6px; }
.js .study:not([hidden]) { animation: fade-in .4s ease both; }
.study__intro { display: grid; gap: 12px 48px; margin-bottom: 28px; align-items: baseline; }
@media (min-width: 960px) { .study__intro { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); } }
.study__title { font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.4rem); line-height: 1.05; margin: 0; }
.study__brief { margin: 0; color: var(--muted); max-width: 60ch; }
.study__k { display: block; font-size: 10px; color: var(--redline); font-weight: 600; margin-bottom: 4px; }

.chain { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); counter-reset: chain; }
@media (min-width: 900px) { .chain { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; } }
.chain__step { position: relative; min-width: 0; }
@media (min-width: 900px) {
  .chain__step:not(:last-child)::after {
    content: ""; position: absolute; top: calc(37.5% - 4px); right: -27px; width: 22px; height: 8px;
    background:
      linear-gradient(var(--redline), var(--redline)) left 50% / 100% 1px no-repeat;
    clip-path: polygon(0 45%, 75% 45%, 75% 0, 100% 50%, 75% 100%, 75% 55%, 0 55%);
    background-color: var(--redline);
  }
}
.chain__label { margin: 10px 0 0; font-size: 11px; color: var(--charcoal); display: flex; gap: 8px; }
.chain__label span { color: var(--redline); font-weight: 600; }

.dfm-note {
  margin-top: 30px; padding: 18px 20px 18px 22px;
  border: 1px dashed var(--redline); background: var(--red-tint);
  display: grid; gap: 6px 32px; position: relative;
}
@media (min-width: 900px) { .dfm-note { grid-template-columns: 220px 1fr; align-items: baseline; } }
.dfm-note__k { margin: 0; font-size: 10.5px; color: var(--redline); font-weight: 600; }
.dfm-note__k::before { content: "△ "; }
.dfm-note p:last-child { margin: 0; max-width: 72ch; }

/* ==========================================================================
   Ways to work
   ========================================================================== */
.ways { display: grid; gap: 0; border: 1px solid var(--charcoal); }
@media (min-width: 900px) { .ways { grid-template-columns: repeat(3, 1fr); } }
.way { padding: clamp(24px, 3vw, 40px); display: flex; flex-direction: column; gap: 14px; }
.way + .way { border-top: 1px solid var(--hair); }
@media (min-width: 900px) { .way + .way { border-top: 0; border-left: 1px solid var(--hair); } }
.way__type { margin: 0; font-size: 10.5px; color: var(--redline); font-weight: 600; }
.way__title { font-size: clamp(1.6rem, 1.35rem + .9vw, 2.1rem); line-height: 1.05; margin: 0; }
.way > p:not(.way__type) { margin: 0; color: var(--muted); }
.way__spec { margin: 6px 0 8px; border-top: 1px solid var(--hair); }
.way__spec div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--hair); font-size: 15px; }
.way__spec dt { font-size: 10px; color: var(--muted); padding-top: 3px; }
.way__spec dd { margin: 0; }
.way .btn { align-self: flex-start; }

/* ==========================================================================
   About
   ========================================================================== */
.about { display: grid; gap: 36px; }
@media (min-width: 760px) { .about { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); } }
@media (min-width: 1180px) { .about { grid-template-columns: minmax(0, 3.6fr) minmax(0, 4.6fr) minmax(0, 4.2fr); gap: 48px; align-items: start; } }
/* Portrait: the site's only photograph, toned to the palette and framed like a drawing detail */
.portrait { margin: 0; max-width: 420px; position: relative; }
.portrait::after {
  /* registration marks at the outer corners */
  content: ""; position: absolute; inset: -6px; pointer-events: none;
  background:
    linear-gradient(var(--charcoal), var(--charcoal)) left top / 10px 1px no-repeat,
    linear-gradient(var(--charcoal), var(--charcoal)) left top / 1px 10px no-repeat,
    linear-gradient(var(--charcoal), var(--charcoal)) right bottom / 10px 1px no-repeat,
    linear-gradient(var(--charcoal), var(--charcoal)) right bottom / 1px 10px no-repeat;
}
.portrait__head, .portrait__cap {
  display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px;
  font: 500 10px/1.2 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--charcoal);
}
.portrait__head span, .portrait__cap span { white-space: nowrap; }
.portrait__head { border-bottom: 0; }
.portrait__cap { border-top: 0; }
.portrait__id { color: var(--redline); font-weight: 600; }
.portrait__frame { position: relative; border: 1px solid var(--charcoal); padding: 10px; background: var(--paper); }
.portrait__frame img {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover;
  filter: grayscale(1) sepia(.22) contrast(1.06) brightness(1.03);   /* always toned, no colour on hover */
}
.portrait__frame::after {
  /* faint drawing grid laid over the photo */
  content: ""; position: absolute; inset: 10px; pointer-events: none;
  background-image:
    linear-gradient(var(--hair-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--hair-soft) 1px, transparent 1px);
  background-size: 24px 24px;
}
.portrait__bubble {
  position: absolute; right: -15px; top: 38%; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: var(--alabaster);
  border: 1.5px solid var(--redline); color: var(--redline);
  font: 600 11px/1 var(--f-mono); letter-spacing: .04em;
}
.portrait__bubble::before { content: ""; position: absolute; right: 100%; top: 50%; width: 14px; height: 1px; background: var(--redline); }
:root[data-theme="dark"] .portrait__frame img { filter: grayscale(1) sepia(.18) contrast(1.04) brightness(.86); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .portrait__frame img { filter: grayscale(1) sepia(.18) contrast(1.04) brightness(.86); }
}
@media (max-width: 759.98px) { .portrait { max-width: 380px; margin-right: 16px; } }
.about__bio .section__title { margin-bottom: 6px; }
.about__role { margin: 0 0 22px; font-size: 11px; color: var(--redline); font-weight: 600; }
.about__bio p:not(.about__role) { margin: 0 0 16px; max-width: 58ch; }
.about__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.general-notes {
  border: 1px solid var(--charcoal); background: var(--paper); padding: 22px 24px 18px;
  font-family: var(--f-mono); font-size: 12.5px; line-height: 1.65;
}
@media (min-width: 760px) and (max-width: 1179.98px) { .general-notes { grid-column: 1 / -1; } }
.general-notes__title {
  margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--charcoal);
  font-size: 12px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px;
}
.general-notes ol { margin: 0; padding: 0; list-style: none; counter-reset: gn; }
.general-notes li { counter-increment: gn; padding: 8px 0 8px 30px; position: relative; color: var(--charcoal); }
.general-notes li + li { border-top: 1px dotted var(--dotted); }
.general-notes li::before { content: counter(gn) "."; position: absolute; left: 0; color: var(--redline-ink); font-weight: 600; }
.general-notes strong { font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: 11.5px; }

/* ==========================================================================
   What you get: handover steps and file formats
   ========================================================================== */
/* Long-form text (privacy notice, 404) */
.prose { max-width: 68ch; }
.prose h2 { margin: 40px 0 10px; font: 400 clamp(1.35rem, 1.2rem + .6vw, 1.7rem)/1.15 var(--f-display); color: var(--charcoal); }
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 14px; }
.prose ul { margin: 0 0 14px; padding: 0; list-style: none; }
.prose li { position: relative; padding-left: 20px; margin-bottom: 8px; }
.prose li::before { content: ""; position: absolute; left: 2px; top: .8em; width: 9px; height: 1px; background: var(--redline); }
.prose a:not(.btn) { color: var(--charcoal); text-decoration: underline; text-decoration-color: var(--redline); text-underline-offset: 3px; }
.prose a:not(.btn):hover { color: var(--redline); }
.prose__updated { margin-top: 32px !important; font: 500 11px/1.4 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.prose__actions { margin-top: 28px !important; }

/* Privacy links: footer and quote form */
.tb__legal a, .tb-mini__strip a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.tb__legal a:hover, .tb-mini__strip a:hover { color: var(--redline); }
.rfq__privacy { margin: 18px 0 0; font-size: 14px; color: var(--muted); }
.rfq__privacy a { color: var(--charcoal); text-decoration: underline; text-decoration-color: var(--redline); text-underline-offset: 3px; }

/* A quiet aside: redline rule on the left, muted text, one short paragraph */
.section__note {
  margin: clamp(28px, 4vw, 40px) 0 0; padding: 2px 0 2px 16px; max-width: 72ch;
  border-left: 2px solid var(--redline); color: var(--muted); font-size: 15.5px; line-height: 1.6;
}
.section__note strong { color: var(--charcoal); font-weight: 600; }
.section__more { margin: 28px 0 0; }
.section__note + .section__more { margin-top: 20px; }
.section__more a {
  font: 600 12px/1.4 var(--f-mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--charcoal); text-decoration: underline; text-decoration-color: var(--redline);
  text-underline-offset: 5px; text-decoration-thickness: 1px;
}
.section__more a:hover { color: var(--redline); }

.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1px; background: var(--hair); border: 1px solid var(--charcoal);
}
@media (min-width: 700px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.step { background: var(--alabaster); padding: 26px clamp(20px, 2.2vw, 30px) 30px; }
.step__no {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px;
  font: 600 10.5px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--redline);
}
.step__no::before {
  /* revision triangle, as used for the notes on the home page */
  content: ""; width: 13px; height: 11px; background: var(--redline);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.step__title { margin: 0 0 8px; font: 400 1.4rem/1.15 var(--f-display); color: var(--charcoal); }
.step p { margin: 0; color: var(--muted); max-width: 40ch; }

.formats {
  margin-top: clamp(28px, 4vw, 44px); border: 1px solid var(--charcoal); background: var(--paper);
  padding: 20px 24px 22px; display: grid; gap: 14px 40px;
}
@media (min-width: 900px) {
  .formats { grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
}
.formats__title {
  margin: 0; font: 600 12px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase;
  text-decoration: underline; text-underline-offset: 4px;
}
.formats__list { margin: 0; display: grid; gap: 10px; }
.formats__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.formats__row dt {
  min-width: 92px; font: 500 10px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
}
.formats__row dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.formats__row dd span {
  padding: 6px 9px; border: 1px solid var(--charcoal); background: var(--alabaster);
  font: 600 11px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--charcoal);
}
.formats__row + .formats__row dd span { border-color: var(--hair); font-weight: 500; }
.formats__note { margin: 0; font-size: 14.5px; color: var(--muted); max-width: 46ch; }

/* ==========================================================================
   FAQ: questions set out like numbered drawing notes, each one opens in place
   ========================================================================== */
.faq { display: grid; gap: 36px; }
@media (min-width: 960px) {
  .faq { grid-template-columns: minmax(200px, 3fr) minmax(0, 9fr); gap: 64px; align-items: start; }
  .faq__index { position: sticky; top: 96px; }
}
.faq__index {
  border: 1px solid var(--charcoal); background: var(--paper); padding: 16px 18px 10px;
  font: 500 11px/1.4 var(--f-mono); letter-spacing: .14em; text-transform: uppercase;
}
.faq__index-title {
  margin: 0 0 8px; padding-bottom: 10px; border-bottom: 1px solid var(--charcoal);
  font-weight: 600; color: var(--muted);
}
.faq__index ol { list-style: none; margin: 0; padding: 0; }
.faq__index li + li { border-top: 1px dotted var(--dotted); }
.faq__index a { display: flex; gap: 12px; padding: 11px 0; color: var(--charcoal); text-decoration: none; }
.faq__index a span { color: var(--redline-ink); font-weight: 600; }
.faq__index a:hover { color: var(--redline); }

.faq__group { scroll-margin-top: 110px; }
.faq__group + .faq__group { margin-top: clamp(48px, 6vw, 72px); }
.faq__group-title {
  display: flex; align-items: baseline; gap: 14px; margin: 0 0 18px;
  font: 400 clamp(1.5rem, 1.3rem + .8vw, 2rem)/1.1 var(--f-display); letter-spacing: -.01em; color: var(--charcoal);
}
.faq__group-id { font: 600 11px/1 var(--f-mono); letter-spacing: .16em; color: var(--redline); }

.faq__item { border-bottom: 1px solid var(--hair); }
.faq__item:first-of-type { border-top: 1px solid var(--charcoal); }
.faq__item summary {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) 16px; gap: 14px; align-items: baseline;
  padding: 20px 0; cursor: pointer; list-style: none;
  font: 500 clamp(1.02rem, .98rem + .25vw, 1.15rem)/1.4 var(--f-sans); color: var(--charcoal);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:focus-visible { outline-offset: 2px; }
.faq__q { font: 600 11px/1 var(--f-mono); letter-spacing: .12em; color: var(--redline); font-feature-settings: "zero" 1; }
.faq__text { text-wrap: pretty; transition: color .2s var(--ease); }
.faq__item summary:hover .faq__text { color: var(--redline); }
.faq__mark { position: relative; width: 14px; height: 14px; align-self: center; }
.faq__mark::before, .faq__mark::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; margin-top: -.75px;
  background: var(--charcoal); transition: transform .25s var(--ease);
}
.faq__mark::after { transform: rotate(90deg); }
.faq__item[open] .faq__mark::after { transform: rotate(0deg); }
.faq__item[open] summary { padding-bottom: 12px; }
.faq__a { padding: 0 30px 24px 54px; max-width: calc(66ch + 84px); }
.faq__a p, .faq__a ul { margin: 0 0 12px; }
.faq__a > :last-child { margin-bottom: 0; }
.faq__a ul { padding-left: 1.1em; }
.faq__a li { margin-bottom: 6px; }
.faq__a li::marker { color: var(--redline); }
.faq__a strong { font-weight: 600; }
.faq__a a { color: var(--charcoal); text-decoration: underline; text-decoration-color: var(--redline); text-underline-offset: 3px; }
.faq__a a:hover { color: var(--redline); }
.js .faq__item[open] .faq__a { animation: faq-open .35s var(--ease) both; }
@keyframes faq-open { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (max-width: 559.98px) {
  .faq__item summary { grid-template-columns: 34px minmax(0, 1fr) 14px; gap: 10px; padding: 18px 0; }
  .faq__a { padding: 0 0 22px 44px; }
}

/* ==========================================================================
   Quote form
   ========================================================================== */
.section--quote { background: transparent; }
.rfq { border: 1px solid var(--charcoal); background: transparent; max-width: 1040px; }
.rfq__progress {
  display: grid; grid-template-columns: repeat(5, 1fr); list-style: none; margin: 0; padding: 0;
  border-bottom: 1px solid var(--charcoal); font-size: 10px; color: var(--muted);
}
.rfq__progress li { padding: 14px 10px; display: flex; align-items: center; gap: 8px; position: relative; }
.rfq__progress li + li { border-left: 1px solid var(--hair); }
.rfq__progress li span {
  display: inline-grid; place-items: center; width: 22px; height: 22px; flex: none;
  border: 1px solid var(--hair); font-size: 10px; letter-spacing: 0;
}
.rfq__progress li.is-done { color: var(--charcoal); }
.rfq__progress li.is-done span { background: var(--solid-bg); border-color: var(--solid-bg); color: var(--solid-ink); }
.rfq__progress li[aria-current="step"] { color: var(--charcoal); background: var(--hover-bg); }
.rfq__progress li[aria-current="step"] span { background: var(--redline); border-color: var(--redline); color: var(--on-red); }
.rfq__progress li[aria-current="step"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--redline); }
@media (max-width: 639.98px) {
  .rfq__progress li { justify-content: center; font-size: 0; letter-spacing: 0; padding: 12px 4px; }
  .rfq__progress li span { font-size: 10px; }
}

.rfq__step { border: 0; margin: 0; padding: clamp(32px, 5vw, 56px) clamp(22px, 4vw, 48px) clamp(28px, 4vw, 44px); min-width: 0; }
/* A <legend> normally sits in the fieldset's top border and ignores padding; floating it makes it lay out like normal content */
.rfq__step > :not(legend) { clear: both; }
.rfq__step::after { content: ""; display: table; clear: both; }
.rfq__step + .rfq__step { border-top: 1px solid var(--hair); }
.js .rfq.is-stepped .rfq__step { display: none; border-top: 0; }
.js .rfq.is-stepped .rfq__step.is-current { display: block; animation: fade-in .3s ease both; }
.rfq__legend {
  font-family: var(--f-display); font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem); line-height: 1.1;
  margin: 0 0 22px; padding: 0; display: block; width: 100%; float: left;
}
.rfq__legend:focus { outline: none; }
.rfq__n { display: block; font-size: 10.5px; line-height: 1; color: var(--redline); font-weight: 600; margin-bottom: 14px; font-family: var(--f-mono); }
.rfq__hint { margin: 0 0 18px; color: var(--muted); font-size: 15px; }
.field .rfq__hint { margin: 8px 0 0; font-size: 14px; }
.rfq__error { margin: 10px 0 0; color: var(--redline); font-weight: 600; font-size: 14px; }
.rfq__error::before { content: "▲ "; font-size: .8em; }

.choices { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .choices { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .choices { grid-template-columns: repeat(3, 1fr); } }
.choices--row { display: flex; flex-wrap: wrap; gap: 8px; }
@media (min-width: 900px) { .choices.choices--2 { grid-template-columns: repeat(2, 1fr); } }
.rfq__group { border: 0; margin: 0 0 28px; padding: 0; min-width: 0; }
.rfq__group > .field__legend { display: block; margin-bottom: 10px; padding: 0; color: var(--charcoal); font-weight: 600; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice > span {
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  min-height: 60px; padding: 14px 16px 14px 46px; position: relative;
  border: 1px solid var(--hair); background: var(--field-soft);
  font-weight: 600; font-size: 15.5px; line-height: 1.3;
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.choice > span small { font-weight: 400; font-size: 13px; color: var(--muted); }
.choice > span::before {
  content: ""; position: absolute; left: 16px; top: 50%; width: 16px; height: 16px; margin-top: -8px;
  border: 1.5px solid var(--charcoal); background: var(--field);
}
.choice input[type="radio"] + span::before { border-radius: 50%; }
.choice input:checked + span { border-color: var(--charcoal); background: var(--field); box-shadow: inset 3px 0 0 var(--redline); }
.choice input:checked + span::before {
  background: var(--redline); border-color: var(--redline);
  box-shadow: inset 0 0 0 3px var(--field);
}
.choice:hover > span { border-color: var(--charcoal); }
.choice input:focus-visible + span { outline: 2px solid var(--redline); outline-offset: 2px; }
.choice--sm > span { min-height: 44px; padding: 10px 16px 10px 40px; font-size: 15px; }
.choice--sm > span::before { left: 14px; width: 14px; height: 14px; margin-top: -7px; }

.fields-2 { display: grid; gap: 22px 24px; }
@media (min-width: 720px) { .fields-2 { grid-template-columns: repeat(2, 1fr); } .field--wide { grid-column: 1 / -1; } }
.field { display: flex; flex-direction: column; min-width: 0; border: 0; margin: 0; padding: 0; }
.field--gap { margin-top: 26px; }
.field--narrow { max-width: 420px; }
.field label, .field__legend { font-size: 10.5px; color: var(--charcoal); font-weight: 600; margin-bottom: 8px; padding: 0; }
.field__opt { color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; font-family: var(--f-sans); font-size: 13px; }
.req { color: var(--redline); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  font: 400 16px/1.4 var(--f-sans); color: var(--charcoal);
  background: var(--field); border: 1px solid var(--field-border); border-radius: 0;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none; appearance: none;
}
.field textarea { resize: vertical; min-height: 130px; }
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--charcoal) 50%), linear-gradient(135deg, var(--charcoal) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%;
  background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px;
}
.field input::placeholder, .field textarea::placeholder { color: var(--placeholder); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--charcoal); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: none; border-color: var(--charcoal); box-shadow: 0 0 0 2px var(--alabaster), 0 0 0 4px var(--redline);
}
.field [aria-invalid="true"] { border-color: var(--redline); box-shadow: inset 3px 0 0 var(--redline); }

.check { display: flex; gap: 14px; align-items: flex-start; margin-top: 26px; padding: 16px 18px; border: 1px dashed var(--charcoal); cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--redline); flex: none; }
.check strong { font-weight: 600; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.rfq__summary { margin-top: 28px; border: 1px solid var(--hair); background: var(--paper); padding: 16px 18px; }
.rfq__summary-k { margin: 0 0 10px; font-size: 10.5px; font-weight: 600; color: var(--redline-ink); }
.rfq__summary dl { margin: 0; display: grid; gap: 6px; font-size: 14.5px; }
.rfq__summary dl div { display: grid; grid-template-columns: 130px 1fr; gap: 12px; }
.rfq__summary dt { color: var(--muted); }
.rfq__summary dd { margin: 0; }
@media (max-width: 479.98px) { .rfq__summary dl div { grid-template-columns: 1fr; gap: 0; } }

.rfq__nav {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 18px clamp(22px, 4vw, 48px); border-top: 1px solid var(--charcoal); background: transparent;
}
.rfq__count { margin-right: auto; font-size: 11px; color: var(--muted); order: -1; }
.no-js .rfq__count, .no-js [data-prev], .no-js [data-next] { display: none; }
.rfq__nav [data-prev][disabled] { display: none; }
@media (max-width: 479.98px) { .rfq__nav .btn { padding: 0 16px; } }

.rfq__done { padding: clamp(28px, 5vw, 56px); }
.rfq__done:focus { outline: none; }
.rfq__ref {
  display: inline-block; margin: 0 0 14px; padding: 6px 10px;
  font: 600 12px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--redline); border: 1px solid var(--redline);
}
.rfq__ref[hidden] { display: none; }
.rfq__send-error {
  margin-top: 22px; padding: 14px 16px; border-left: 3px solid var(--redline); background: var(--red-tint);
  font-size: 15px; line-height: 1.55; color: var(--charcoal);
}
.rfq__send-error a { color: var(--redline); font-weight: 600; }
.rfq__done-title { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); line-height: 1.05; margin: 0 0 12px; }
.rfq__done p:last-child { margin: 0; color: var(--muted); max-width: 52ch; }
.rfq__done a { color: var(--redline); }
.rfq.is-sent .rfq__progress, .rfq.is-sent .rfq__step, .rfq.is-sent .rfq__nav { display: none !important; }

/* ==========================================================================
   Footer: drawing title block
   ========================================================================== */
.title-block { border-top: 1px solid var(--charcoal); }
/* Cells sit on a 1px hairline grid (the gap shows the lines), so no edge is ever doubled
   against the sheet border. Areas are named like zones on a real title block. */
.title-block__grid {
  display: grid; gap: 1px; background: var(--hair);
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-areas:
    "logo  logo  logo  idx idx idx"
    "logo  logo  logo  idx idx idx"
    "legal legal legal idx idx idx"
    "ph    ph    em    em  em  em"
    "loc   loc   srv   srv srv srv"
    "drw   drw   sht   sht rev rev";
}
@media (min-width: 1280px) {
  .title-block__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-areas:
      "logo  logo  logo  idx idx idx ph  ph  em  em  em  em"
      "logo  logo  logo  idx idx idx loc loc srv srv srv srv"
      "legal legal legal idx idx idx drw drw sht sht rev rev";
  }
}
.tb {
  background: var(--alabaster); padding: 14px 20px 16px;
  display: flex; flex-direction: column; justify-content: center; gap: 5px; min-width: 0;
}
.tb__k { font-size: 9.5px; color: var(--muted); }
.tb__v { font-size: 14.5px; line-height: 1.35; color: var(--charcoal); overflow-wrap: anywhere; text-decoration: none; }
a.tb__v:hover { color: var(--redline); }

.tb--logo  { grid-area: logo; padding: 24px 22px 20px; gap: 12px; justify-content: space-between; }
.tb--index { grid-area: idx; justify-content: flex-start; padding-top: 18px; padding-bottom: 18px; }
.tb--phone { grid-area: ph; }
.tb--email { grid-area: em; }
.tb--loc   { grid-area: loc; }
.tb--serve { grid-area: srv; }
.tb--legal { grid-area: legal; padding-top: 12px; padding-bottom: 12px; }
.tb--drawn { grid-area: drw; }
.tb--sheet { grid-area: sht; }
.tb--rev   { grid-area: rev; }

/* Logo + tagline lockup: the tagline is stretched to exactly the logo's width (SVG textLength),
   joined by a rule with a redline accent, so the two read as one mark */
.lockup { display: block; width: min(236px, 100%); text-decoration: none; color: var(--charcoal); }
.lockup img { width: 100%; height: auto; vertical-align: top; }
.lockup__rule { display: block; position: relative; height: 1px; margin: 10px 0 8px; background: var(--charcoal); }
.lockup__rule::before { content: ""; position: absolute; left: 0; top: -1px; width: 26px; height: 3px; background: var(--redline); }
.lockup__tag { display: block; width: 100%; height: auto; overflow: visible; }
.lockup__tag text { font: 600 12.8px var(--f-mono); fill: var(--charcoal); }
.lockup:hover .lockup__rule::before { width: 100%; transition: width .5s var(--ease); }

.tb__social { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; font-size: 13.5px; }
.tb__social a { color: var(--charcoal); text-underline-offset: 3px; text-decoration-color: var(--hair); }
.tb__social a:hover { color: var(--redline); text-decoration-color: currentColor; }

/* Sheet index: the seven pages listed like a drawing register */
.tb__pages { list-style: none; margin: 6px 0 0; padding: 0; }
.tb__pages li + li { border-top: 1px dotted var(--dotted); }
.tb__pages a {
  display: flex; align-items: baseline; gap: 12px; padding: 5px 0;
  font: 500 11px/1.4 var(--f-mono); letter-spacing: .12em; text-transform: uppercase;
  color: var(--charcoal); text-decoration: none;
}
.tb__no { color: var(--muted); font-feature-settings: "zero" 1; }
.tb__pages a:hover, .tb__pages a:hover .tb__no { color: var(--redline); }
.tb__pages a[aria-current="page"] { color: var(--redline); font-weight: 600; }
.tb__pages a[aria-current="page"] .tb__no { color: var(--redline); }
.tb__pages a[aria-current="page"]::after { content: "\25C2  this sheet"; margin-left: auto; font-weight: 500; font-size: 9.5px; color: var(--muted); white-space: pre; }

.tb__legal { margin: 0; font-size: 13px; color: var(--muted); }
.tb--sheet .tb__v { font-family: var(--f-mono); font-size: 13.5px; }
.tb--rev { background: var(--solid-bg); }
.tb--rev .tb__k { color: var(--rev-k); }
.tb--rev .tb__v { color: var(--solid-ink); font: 600 22px/1 var(--f-mono); }

/* ==========================================================================
   Multi-page additions
   ========================================================================== */
/* current page: ink underline; the section in view (is-active) stays red */
.site-nav a[aria-current="page"]::after { transform: scaleX(1); background: var(--charcoal); }

/* Call-to-action band */
.cta-band {
  display: grid; gap: 28px; align-items: end;
  padding: clamp(48px, 7vw, 88px) var(--pad);
  background: var(--band-bg); color: var(--band-ink);
  border-top: 1px solid var(--charcoal);
}
@media (min-width: 960px) { .cta-band { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.cta-band .label { color: var(--band-muted); }
.cta-band .label__id { color: var(--band-ink); }
.cta-band__title {
  font-family: var(--f-display); font-weight: 400; color: var(--band-ink);
  font-size: clamp(2rem, 1.5rem + 2.2vw, 3.2rem); line-height: 1.04; margin: 0 0 14px;
}
.cta-band__lede { margin: 0; color: var(--band-muted); max-width: 54ch; font-size: 1.05rem; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 960px) { .cta-band__actions { justify-content: flex-end; } }
.cta-band .btn--red { --b: #B5432F; background: #B5432F; color: #FFFFFF; }
.cta-band .btn--red:hover { background: #963523; border-color: #963523; }
.btn--light { --b: rgba(239, 236, 230, .5); color: var(--band-ink); }
.btn--light:hover { --b: var(--band-ink); background: var(--band-ink); color: #363532; }
.cta-band :focus-visible { outline-color: var(--band-ink); }

.rfq__prefill {
  margin: 0 0 16px; padding: 10px 14px; font-size: 14.5px;
  border-left: 3px solid var(--redline); background: var(--red-tint); color: var(--charcoal);
}

/* Contact page: direct lines */
.contact-direct {
  list-style: none; margin: 18px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px 28px; grid-column: 1 / -1;
}
@media (min-width: 960px) { .contact-direct { grid-column: 2; } }
.contact-direct li { display: flex; align-items: baseline; gap: 10px; }
.contact-direct__k { font: 500 10px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.contact-direct a { color: var(--charcoal); font-weight: 600; text-underline-offset: 4px; overflow-wrap: anywhere; }
.contact-direct a:hover { color: var(--redline); }

/* ==========================================================================
   Polish pass (stress test, 21.11.2026)
   ========================================================================== */
/* Hero drawing toolbar: one row on phones */
@media (max-width: 479.98px) {
  .drawing-toolbar { flex-wrap: nowrap; gap: 6px; padding: 6px; }
  .seg__btn { padding: 9px 9px; font-size: 10px; letter-spacing: .08em; }
  .switch { gap: 7px; padding: 0 2px; font-size: 10px; letter-spacing: .08em; white-space: nowrap; }
  .switch__show { display: none; }
  /* rev strip: REV A + status only, on one line */
  .rev-strip > span:nth-child(3) { display: none; }
  .rev-strip > span:nth-child(2) { border-right: 0; }
}

/* Deliverables: finished line illustrations in place of image slots */
.detail__art {
  margin: 0; aspect-ratio: 1.414 / 1; display: grid; place-items: center;
  border: 1px solid var(--hair); color: var(--charcoal);
  background-color: var(--slot-detail);
  background-image:
    linear-gradient(var(--hair-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--hair-soft) 1px, transparent 1px);
  background-size: 20px 20px; background-position: -1px -1px;
}
.detail__art svg { width: 72%; height: auto; aspect-ratio: 160 / 113; overflow: visible; }

/* Contact details: label above value on phones so the email never breaks mid-address */
@media (max-width: 559.98px) {
  .contact-direct { flex-direction: column; gap: 14px; }
  .contact-direct li { display: block; }
  .contact-direct__k { display: block; margin-bottom: 5px; }
  .contact-direct a, .contact-direct li > span:not(.contact-direct__k) { overflow-wrap: normal; word-break: normal; }
}

/* Card rows line up across each row (headings, text, lists, buttons) */
@media (min-width: 700px) {
  .sector { display: grid; grid-template-rows: subgrid; grid-row: span 6; row-gap: 12px; align-content: start; }
  .sector .btn { align-self: end; justify-self: start; margin-top: 8px; }
  .sector__list { margin-bottom: 0; }
}
@media (min-width: 760px) {
  .detail { display: grid; grid-template-rows: subgrid; grid-row: span 3; row-gap: 18px; align-content: start; }
  .detail__head { align-self: center; }
}
@media (min-width: 900px) {
  .way { display: grid; grid-template-rows: subgrid; grid-row: span 5; row-gap: 14px; align-content: start; }
  .way .btn { align-self: end; justify-self: start; margin-top: 8px; }
}

/* Contact page: form heading */
.form-title { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem); line-height: 1.1; margin: 0 0 18px; }

/* Footer: slim strip on phones, full title block from 700px */
.tb-mini { display: none; }
@media (max-width: 699.98px) {
  .title-block__grid { display: none; }
  .tb-mini { display: block; padding: 20px 16px 16px; }
  .tb-mini__logo { display: block; }

  .tb-mini__links { display: flex; gap: 22px; margin: 14px 0 16px; }
  .tb-mini__links a { font-weight: 600; color: var(--charcoal); text-underline-offset: 4px; }
  .tb-mini__links a:hover { color: var(--redline); }
  .tb-mini__strip {
    display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding-top: 12px; border-top: 1px solid var(--charcoal);
    font: 500 10px/1.4 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  }
}


/* Theme switch (header) */
.theme-switch {
  display: inline-flex; align-items: center; justify-content: center;
  width: 62px; height: 40px; padding: 0; border: 1px solid var(--hair); background: transparent; cursor: pointer;
}
.theme-switch__track {
  position: relative; width: 48px; height: 26px; border: 1px solid var(--charcoal); border-radius: 13px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 5px;
}
.theme-switch__track svg { width: 13px; height: 13px; color: var(--muted); position: relative; z-index: 1; transition: color .25s; }
.theme-switch__thumb {
  position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--charcoal);
  transition: transform .3s var(--ease), background-color .3s;
}
.theme-switch[aria-checked="true"] .theme-switch__thumb { transform: translateX(22px); }
.theme-switch[aria-checked="false"] .theme-switch__sun,
.theme-switch[aria-checked="true"] .theme-switch__moon { color: var(--alabaster); }
.theme-switch:hover { border-color: var(--charcoal); }
@media (max-width: 420px) {
  .theme-switch { width: 54px; border-color: transparent; }
  .btn-label-long { display: none; }
}
@media (min-width: 421px) { .btn-label-short { display: none; } }

/* Dark-mode polish: imagery and the drawing grid */
:root[data-theme="dark"] .slot img { filter: brightness(.9) contrast(1.05); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .slot img { filter: brightness(.9) contrast(1.05); } }

/* ==========================================================================
   Scroll-in motion. Content is only hidden once JS has confirmed it is
   below the fold, and is never hidden when motion is reduced.
   ========================================================================== */
.js [data-reveal].is-armed { opacity: 0; transform: translateY(18px); }
.js [data-reveal].is-in {
  opacity: 1; transform: none;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
  .js [data-reveal].is-armed { opacity: 1; transform: none; }
}

@media print {
  .site-header, .rail, .drawing-toolbar, .rfq__nav, .skip-link { display: none !important; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
  .js .rfq.is-stepped .rfq__step { display: block !important; }
}
