/* ŌRIGIN — public website, v2 "Architecture" direction (design proof for approval).
   The site reads as a set of architectural drawings: a drafting grid, numbered sheets,
   level markers, a title-block footer, and the macron of the Ō used as a beam/lintel.
   Tokens keep the handbook palette (Midnight, Slate, Gold, Ivory, Mist, Paper, gold-on-paper). */

@font-face { font-family: "Instrument Serif"; src: url("/fonts/InstrumentSerif-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/fonts/InstrumentSerif-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("/fonts/WorkSans-wght400-600.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }

:root {
  --midnight: #0B1120; --slate: #151E30; --gold: #C9AA67; --ivory: #F4F1E9; --mist: #BBC3CF; --paper: #F6F3EC; --gold-on-paper: #76591F;

  --bg: var(--midnight);
  --surface: var(--slate);
  --surface-2: #1B2539;
  --text: var(--ivory);
  --text-2: var(--mist);
  --accent: var(--gold);
  --accent-soft: rgba(201, 170, 103, 0.14);
  --line: #263149;
  --line-strong: #44516C;
  --draw: #6B7A98;            /* drawing / construction lines */
  --grid: rgba(187, 195, 207, 0.045);
  --grid-major: rgba(187, 195, 207, 0.075);
  --hatch: rgba(201, 170, 103, 0.16);
  --btn-bg: var(--gold); --btn-text: var(--midnight); --btn-bg-hover: #DCC28A;
  --focus: #E7CF95;
  --field-bg: #0F1828;
  --error: #F0A898;

  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-body: "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "DejaVu Sans Mono", "Liberation Mono", monospace;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px;
  --s12: 48px; --s16: 64px; --s20: 80px; --s24: 96px; --s28: 112px;
  --max: 1200px; --gutter: 32px; --t: 200ms;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: var(--paper); --surface: #EFEADF; --surface-2: #E7E1D3; --text: #141C2E; --text-2: #46506A;
    --accent: var(--gold-on-paper); --accent-soft: rgba(118, 89, 31, 0.10);
    --line: #DDD5C4; --line-strong: #ABA18C; --draw: #9A8F78;
    --grid: rgba(11, 17, 32, 0.035); --grid-major: rgba(11, 17, 32, 0.06); --hatch: rgba(118, 89, 31, 0.16);
    --btn-bg: var(--gold-on-paper); --btn-text: var(--paper); --btn-bg-hover: #5C4515;
    --focus: #0B1120; --field-bg: #FBF9F4; --error: #9B2C1C;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: var(--paper); --surface: #EFEADF; --surface-2: #E7E1D3; --text: #141C2E; --text-2: #46506A;
  --accent: var(--gold-on-paper); --accent-soft: rgba(118, 89, 31, 0.10);
  --line: #DDD5C4; --line-strong: #ABA18C; --draw: #9A8F78;
  --grid: rgba(11, 17, 32, 0.035); --grid-major: rgba(11, 17, 32, 0.06); --hatch: rgba(118, 89, 31, 0.16);
  --btn-bg: var(--gold-on-paper); --btn-text: var(--paper); --btn-bg-hover: #5C4515;
  --focus: #0B1120; --field-bg: #FBF9F4; --error: #9B2C1C;
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--bg);
  /* drafting grid: 32 px minor, 160 px major */
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 160px 160px, 160px 160px, 32px 32px, 32px 32px;
  background-position: center top;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
@media (max-width: 640px) { body { font-size: 17px; } :root { --gutter: 20px; } }
img, svg { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
p { margin: 0 0 var(--s4); }
strong, b { font-weight: 600; }
ul, ol { margin: 0 0 var(--s4); padding-left: 1.25em; }
cite { font-family: var(--font-display); font-style: italic; }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 1px; }
.visually-hidden { 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: absolute; left: var(--s4); top: -100px; z-index: 50; background: var(--btn-bg); color: var(--btn-text); padding: var(--s2) var(--s4); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: var(--s4); }
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; margin: 0 0 var(--s5); color: var(--text); letter-spacing: -0.01em; }
h1 { font-size: clamp(46px, 26px + 4.6vw, 92px); line-height: 0.98; }
.page-title { font-size: clamp(44px, 26px + 3.6vw, 80px); line-height: 1; }
h2 { font-size: clamp(32px, 24px + 1.6vw, 48px); line-height: 1.06; }
h3 { font-size: clamp(24px, 21px + 0.6vw, 30px); line-height: 1.15; }
.h-break { display: block; }
.lead { font-size: clamp(18px, 16px + 0.45vw, 22px); line-height: 1.55; color: var(--text-2); max-width: 40em; }
.muted { color: var(--text-2); }
.small { font-size: 16px; }
.meta { font-size: 14px; line-height: 1.5; color: var(--text-2); }
.mono, .tag, .sheet-name, .level, .note-label {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tag { color: var(--accent); }

/* Macron: the bar over the Ō, reused as a lintel above headings */
.macron { display: block; width: 40px; height: 3px; background: var(--accent); margin-bottom: var(--s5); }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: relative; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s6); min-height: 80px; }
.brand { display: inline-flex; align-items: center; color: var(--text); text-decoration: none; padding: var(--s2) 0; }
.brand:hover { color: var(--text); }
.brand svg { width: 132px; display: block; }
.brand svg path, .tb-brand svg path { fill: currentColor; }
.menu-toggle {
  display: none; font: 600 15px/1 var(--font-body); color: var(--text); background: transparent;
  border: 1px solid var(--line-strong); border-radius: 2px; padding: 0 var(--s4); min-height: 44px;
  align-items: center; gap: var(--s2); cursor: pointer; transition: border-color var(--t) ease;
}
.menu-toggle:hover { border-color: var(--accent); }
.menu-icon { display: inline-block; width: 16px; height: 10px; position: relative; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; }
.menu-icon::after { content: ""; position: absolute; left: 0; right: 0; top: 2px; border-top: 2px solid currentColor; }
.menu-toggle[aria-expanded="true"] .menu-icon { border-color: transparent; }
.menu-toggle[aria-expanded="true"] .menu-icon::after { transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon::before { content: ""; position: absolute; left: 0; right: 0; top: 2px; border-top: 2px solid currentColor; transform: rotate(-45deg); }
.nav-panel { display: flex; align-items: center; gap: var(--s6); }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--s1); }
.primary-nav a {
  position: relative; display: inline-block; padding: var(--s3) var(--s3) var(--s2);
  font-size: 15px; text-decoration: none; color: var(--text-2); transition: color var(--t) ease;
}
.primary-nav a:hover { color: var(--text); }
/* current page carries the macron */
.primary-nav a::before {
  content: ""; position: absolute; left: 50%; top: 2px; width: 18px; height: 2px; margin-left: -9px;
  background: var(--accent); opacity: 0; transform: scaleX(0.4); transition: opacity var(--t) ease, transform var(--t) ease;
}
.primary-nav a:hover::before { opacity: 0.6; transform: scaleX(1); }
.primary-nav a[aria-current="page"] { color: var(--text); }
.primary-nav a[aria-current="page"]::before { opacity: 1; transform: scaleX(1); }
.theme-toggle {
  font: 500 14px/1 var(--font-body); color: var(--text-2); background: transparent; border: 1px solid var(--line-strong);
  border-radius: 2px; min-height: 36px; padding: 0 var(--s3); cursor: pointer; display: inline-flex; align-items: center; gap: var(--s2);
  transition: color var(--t) ease, border-color var(--t) ease;
}
.theme-toggle:hover { color: var(--text); border-color: var(--accent); }
.theme-toggle[hidden] { display: none; }
.theme-dot { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
@media (max-width: 980px) {
  html.js .menu-toggle { display: inline-flex; }
  html.js .nav-panel {
    display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg);
    border-bottom: 1px solid var(--line); padding: var(--s4) var(--gutter) var(--s6);
    flex-direction: column; align-items: stretch; gap: var(--s4); box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
  }
  html.js .nav-panel.is-open { display: flex; }
  html.js .primary-nav ul { flex-direction: column; gap: 0; }
  html.js .primary-nav li + li { border-top: 1px solid var(--line); }
  html.js .primary-nav a { display: block; padding: var(--s3) 0 var(--s3) var(--s6); font-size: 19px; color: var(--text); }
  html.js .primary-nav a::before { left: 0; top: 50%; margin: 0; width: 12px; }
  html.js .theme-toggle { align-self: flex-start; min-height: 44px; }
  html:not(.js) .site-header .wrap { flex-wrap: wrap; padding-bottom: var(--s3); }
  html:not(.js) .primary-nav ul { flex-wrap: wrap; }
}

/* ---------- Title sheet (page hero) ---------- */
.title-sheet { padding: var(--s24) 0 var(--s20); border-bottom: 1px solid var(--line); }
.title-sheet .crumb { color: var(--text-2); margin-bottom: var(--s6); display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.title-sheet .crumb a { color: var(--accent); }
.title-sheet .lead { margin-bottom: 0; }
@media (max-width: 640px) { .title-sheet { padding: var(--s12) 0 var(--s10); } }

/* Home hero */
.hero { padding: var(--s20) 0 var(--s24); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s12); align-items: center; }
.hero .lead { margin-bottom: var(--s8); max-width: 32em; }
.hero h1 { margin-bottom: var(--s6); }
.hero-drawing { margin: 0; position: relative; }
.hero-drawing svg { display: block; width: 100%; max-width: 460px; margin-left: auto; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s8); }
  .hero-drawing svg { max-width: 300px; margin: 0; }
}
@media (max-width: 640px) {
  .hero { padding: var(--s10) 0 var(--s12); }
  .hero .secondary-action { display: none; }
  .hero-drawing svg { max-width: 220px; }
}

/* Ō elevation drawing */
.d-axis { stroke: var(--draw); stroke-width: 1; stroke-dasharray: 14 4 2 4; fill: none; }
.d-guide { stroke: var(--draw); stroke-width: 1; stroke-dasharray: 3 5; fill: none; }
.d-dim { stroke: var(--draw); stroke-width: 1; fill: none; }
.d-tick { stroke: var(--text-2); stroke-width: 1.5; }
.d-bubble { stroke: var(--draw); stroke-width: 1; fill: var(--bg); }
.d-text { fill: var(--text-2); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; }
.d-ring { stroke: var(--accent); stroke-width: 18; fill: none; }
.d-beam { fill: var(--accent); }

/* ---------- Sheets (sections) ---------- */
.sheet { padding: var(--s28) 0; border-bottom: 1px solid var(--line); }
.sheet--tight { padding: var(--s20) 0; }
.sheet-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: var(--s12); align-items: start; }
.sheet-label { display: flex; align-items: center; gap: var(--s3); padding-top: var(--s2); position: sticky; top: var(--s6); }
.bubble {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--accent);
  font-family: var(--font-mono); font-size: 13px; color: var(--accent); letter-spacing: 0;
}
.sheet-name { color: var(--text-2); }
.sheet-body > :last-child { margin-bottom: 0; }
.sheet-body .lead { margin-bottom: var(--s8); }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s8) var(--s10); }
@media (max-width: 900px) {
  .sheet { padding: var(--s16) 0; }
  .sheet--tight { padding: var(--s12) 0; }
  .sheet-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s6); }
  .sheet-label { position: static; }
}
@media (max-width: 700px) { .two-col { grid-template-columns: minmax(0, 1fr); gap: var(--s6); } }

/* ---------- Actions ---------- */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4) var(--s8); }
.button {
  display: inline-flex; align-items: center; gap: var(--s3); min-height: 50px; padding: 0 var(--s6);
  background: var(--btn-bg); color: var(--btn-text); font: 600 16px/1.2 var(--font-body);
  border: 1px solid var(--btn-bg); border-radius: 2px; text-decoration: none; cursor: pointer;
  transition: background-color var(--t) ease, border-color var(--t) ease, transform var(--t) ease;
}
.button:hover { background: var(--btn-bg-hover); border-color: var(--btn-bg-hover); color: var(--btn-text); }
.button:active { transform: translateY(1px); }
.text-link { font-weight: 500; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line-strong); padding-bottom: 2px; transition: color var(--t) ease, border-color var(--t) ease; }
.text-link:hover { color: var(--accent); border-color: var(--accent); }
.arrow { display: inline-block; transition: transform var(--t) ease; }
a:hover .arrow { transform: translateX(3px); }
.after { margin-top: var(--s8); margin-bottom: 0; }

/* ---------- Framed panels with drafting corner marks ---------- */
.frame { position: relative; border: 1px solid var(--line); background: var(--surface); padding: var(--s8); }
.frame::before {
  content: ""; position: absolute; inset: -5px; pointer-events: none;
  background:
    linear-gradient(var(--accent), var(--accent)) top left / 12px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) top left / 1px 12px no-repeat,
    linear-gradient(var(--accent), var(--accent)) top right / 12px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) top right / 1px 12px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom left / 12px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom left / 1px 12px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom right / 12px 1px no-repeat,
    linear-gradient(var(--accent), var(--accent)) bottom right / 1px 12px no-repeat;
}
.frame > :last-child { margin-bottom: 0; }
@media (max-width: 640px) { .frame { padding: var(--s6); } }
.frame--dashed { border-style: dashed; border-color: var(--line-strong); background: transparent; }
.note-label { display: block; color: var(--accent); margin-bottom: var(--s3); }

/* Load-bearing cards */
.bearing { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6); }
.bearing > li > a, .bearing > li > div { display: block; height: 100%; text-decoration: none; border-top: 3px solid var(--accent); background: var(--surface); padding: var(--s6) var(--s8) var(--s8); transition: background-color var(--t) ease; }
.bearing > li > a:hover { background: var(--surface-2); color: inherit; }
.bearing h3 { margin-bottom: var(--s2); }
.bearing p { color: var(--text-2); margin-bottom: var(--s4); }
@media (max-width: 700px) { .bearing { grid-template-columns: minmax(0, 1fr); gap: var(--s4); } .bearing > li > a, .bearing > li > div { padding: var(--s5) var(--s6) var(--s6); } }

/* Chips / status tags */
.chips { list-style: none; padding: 0; margin: var(--s5) 0 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.04em; color: var(--text-2); border: 1px solid var(--line-strong); padding: 5px 10px; line-height: 1.35; }
.chip--proposed { border-style: dashed; }

/* Schedules (spec tables as definition lists) */
.schedule { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); margin: 0; border-top: 1px solid var(--line-strong); }
.schedule dt, .schedule dd { margin: 0; padding: var(--s4) 0; border-bottom: 1px solid var(--line); }
.schedule dt { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); padding-top: calc(var(--s4) + 4px); padding-right: var(--s5); }
.schedule dd { color: var(--text); }
.schedule .pending { color: var(--text-2); }
@media (max-width: 640px) {
  .schedule { grid-template-columns: minmax(0, 1fr); }
  .schedule dt { border-bottom: 0; padding-bottom: 0; }
  .schedule dd { padding-top: var(--s1); }
}

/* Index lists */
.index { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line-strong); }
.index > li { border-bottom: 1px solid var(--line); }
.index a, .index .row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s1) var(--s6); align-items: baseline; padding: var(--s5) 0; text-decoration: none; }
.index .name { font-family: var(--font-display); font-size: clamp(22px, 19px + 0.6vw, 28px); line-height: 1.2; color: var(--text); }
.index .desc { display: block; font-family: var(--font-body); font-size: 15px; color: var(--text-2); margin-top: 2px; }
.index .status { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); text-align: right; }
.index a:hover .name { color: var(--accent); }
@media (max-width: 640px) { .index a, .index .row { grid-template-columns: minmax(0, 1fr); } .index .status { text-align: left; } }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 16px; }
caption { text-align: left; padding-bottom: var(--s3); color: var(--text-2); font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
th, td { text-align: left; vertical-align: top; padding: var(--s4) var(--s4) var(--s4) 0; border-bottom: 1px solid var(--line); }
th { font-weight: 600; font-size: 14px; border-bottom-color: var(--line-strong); }
td { color: var(--text-2); }
td:first-child { color: var(--text); font-weight: 500; }

/* ---------- The structure (ecosystem concept map, Shared asset A) ---------- */
.structure { margin: 0; }
.st-drawing { position: relative; display: grid; grid-template-columns: 120px minmax(0, 1fr); column-gap: var(--s6); row-gap: 0; }
.level { grid-column: 1; margin: 0; color: var(--text-2); font-size: 12px; display: flex; align-items: center; gap: var(--s2); border-bottom: 1px dashed var(--draw); align-self: center; padding-bottom: 2px; }
.level::before { content: ""; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 7px solid var(--accent); }
.st-roof, .st-bays, .st-foundation, .st-ground { grid-column: 2; }
.st-roof { text-align: center; margin: 0; }
.st-roof .beam { display: block; height: 14px; background: var(--accent); }
.st-roof .st-name { display: block; font-family: var(--font-display); font-size: clamp(26px, 22px + 0.8vw, 34px); letter-spacing: 0.22em; padding-left: 0.22em; line-height: 1.2; color: var(--text); margin-bottom: var(--s1); }
.st-roof .st-role { display: block; margin-bottom: var(--s3); }
.st-role { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
.st-bays { list-style: none; padding: 0 var(--s6); margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s5); }
.st-bays > li {
  position: relative; text-align: center;
  padding: var(--s8) var(--s3) var(--s8);
  border-left: 3px solid var(--text-2); border-right: 3px solid var(--text-2);
  background: linear-gradient(var(--surface), var(--surface)) padding-box;
}
/* proposed relationship to the foundation: dashed joint */
.st-bays > li::after { content: ""; position: absolute; left: 50%; bottom: -14px; height: 14px; border-left: 1px dashed var(--accent); }
.st-kind { display: block; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--s2); }
.st-bays .st-name { display: block; font-size: 16px; color: var(--text); line-height: 1.35; }
.st-foundation {
  margin: 14px 0 0; padding: var(--s5) var(--s6); text-align: center;
  border: 1px dashed var(--accent);
  background-color: var(--surface);
  background-image: repeating-linear-gradient(135deg, var(--hatch) 0 1px, transparent 1px 10px);
}
.st-foundation .st-name { display: inline-block; font-family: var(--font-display); font-size: clamp(26px, 22px + 0.8vw, 34px); letter-spacing: 0.06em; line-height: 1.2; color: var(--text); background: var(--surface); padding: 0 var(--s3); }
.st-foundation .st-role { display: inline-block; margin-top: var(--s2); background: var(--surface); padding: 2px var(--s3); }
.st-ground { margin: 0; padding-top: var(--s4); border-top: 2px solid var(--text-2); text-align: center; font-size: 15px; color: var(--text); }
.st-ground-wrap { grid-column: 2; margin-top: var(--s5); }
.structure figcaption { margin-top: var(--s6); display: grid; gap: var(--s2); }
.structure .caveat { font-size: 14px; color: var(--text); }
.legend { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s6); font-size: 14px; color: var(--text-2); }
.legend span::before { content: ""; display: inline-block; width: 22px; margin-right: var(--s2); vertical-align: middle; border-top: 2px solid var(--text-2); }
.legend .lg-proposed::before { border-top: 1px dashed var(--accent); }
@media (max-width: 760px) {
  .st-drawing { grid-template-columns: minmax(0, 1fr); }
  .level { display: none; }
  .st-roof, .st-bays, .st-foundation, .st-ground-wrap { grid-column: 1; }
  .st-bays { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 var(--s3); gap: var(--s3); row-gap: var(--s3); }
  .st-bays > li { padding: var(--s5) var(--s2); }
  .st-bays > li:nth-child(-n+2)::after { display: none; }
  .st-foundation { padding: var(--s4) var(--s3); }
}
@media (max-width: 360px) { .st-bays { grid-template-columns: minmax(0, 1fr); } .st-bays > li::after { display: none; } .st-bays > li:last-child::after { display: block; } }

/* Key plan (small locator drawing) */
.keyplan { display: block; width: 132px; height: auto; margin-bottom: var(--s3); }
.keyplan rect, .keyplan line { fill: none; stroke: var(--draw); stroke-width: 1.2; }
.keyplan .kp-beam { fill: var(--draw); stroke: none; }
.keyplan .on { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2; }
.keyplan .kp-beam.on { fill: var(--accent); }
.keyplan line.on { stroke: var(--accent); stroke-width: 2.5; }

/* ---------- Technology components ---------- */
.component { padding: var(--s24) 0; border-bottom: 1px solid var(--line); }
.component-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 4fr) minmax(0, 5fr); gap: var(--s10); align-items: start; }
.component-grid .lead { margin-bottom: var(--s4); }
@media (max-width: 1060px) { .component-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .component-grid > .c-side { grid-column: 1 / -1; display: flex; gap: var(--s6); align-items: flex-end; } }
@media (max-width: 760px) { .component { padding: var(--s16) 0; } .component-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s6); } }

/* Workflow (proposed) */
.workflow { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); counter-reset: step; }
.workflow li { counter-increment: step; border: 1px dashed var(--accent); padding: var(--s6); background: transparent; }
.workflow li::before { content: "0" counter(step); display: block; font-family: var(--font-mono); font-size: 13px; color: var(--text-2); margin-bottom: var(--s4); }
.workflow h3 { margin-bottom: var(--s2); color: var(--accent); }
.workflow p { color: var(--text-2); margin: 0; font-size: 16px; }
@media (max-width: 960px) { .workflow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .workflow { grid-template-columns: minmax(0, 1fr); } }
.workflow + .meta { margin-top: var(--s5); }

/* ---------- The architects (umbrella) ---------- */
.architects { margin: 0; }
.arch-beam { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); margin-bottom: 0; }
.arch-beam .arch-title { font-family: var(--font-display); font-size: clamp(30px, 22px + 2vw, 56px); letter-spacing: 0.2em; line-height: 1; text-transform: uppercase; color: var(--text); padding-left: 0.04em; }
.arch-beam .meta { padding-bottom: 6px; }
.arch-bar { height: 12px; background: var(--accent); margin-top: var(--s4); }
.arch-people { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.arch-people > li { position: relative; padding: var(--s10) var(--s6) var(--s6); border-left: 1px solid var(--line-strong); }
.arch-people > li:last-child { border-right: 1px solid var(--line-strong); }
.arch-people > li::before { content: ""; position: absolute; left: -2px; top: 0; width: 3px; height: var(--s8); background: var(--text-2); }
.arch-people > li:last-child::after { content: ""; position: absolute; right: -2px; top: 0; width: 3px; height: var(--s8); background: var(--text-2); }
.arch-name { font-family: var(--font-display); font-size: clamp(28px, 22px + 1vw, 38px); line-height: 1.1; color: var(--text); margin: 0 0 var(--s3); }
.arch-focus { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin: 0 0 var(--s2); }
.arch-people .meta { margin: 0; }
@media (max-width: 860px) {
  .arch-people { grid-template-columns: minmax(0, 1fr); border-left: 1px solid var(--line-strong); margin-left: var(--s6); }
  .arch-people > li, .arch-people > li:last-child { border-left: 0; border-right: 0; padding: var(--s6) 0 var(--s6) var(--s6); }
  .arch-people > li::before { left: 0; top: 50%; width: var(--s4); height: 1px; background: var(--line-strong); }
  .arch-people > li:last-child::after { display: none; }
}

/* Steps (approval pipeline) */
.steps { list-style: none; padding: 0; margin: var(--s8) 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 3px solid var(--accent); counter-reset: st; }
.steps li { counter-increment: st; padding: var(--s4) var(--s3) var(--s2) 0; border-right: 1px solid var(--line); margin-right: var(--s3); }
.steps li:last-child { border-right: 0; }
.steps li::before { content: "0" counter(st); display: block; font-family: var(--font-mono); font-size: 13px; color: var(--accent); margin-bottom: var(--s1); }
.steps .meta { display: block; }
@media (max-width: 760px) { .steps { grid-template-columns: minmax(0, 1fr); } .steps li { border-right: 0; border-bottom: 1px solid var(--line); margin: 0; padding: var(--s3) 0; display: flex; gap: var(--s4); align-items: baseline; } .steps li::before { margin: 0; } }

/* Library */
.library { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s8); border-top: 1px solid var(--line-strong); }
.library li { padding: var(--s5) 0; border-bottom: 1px solid var(--line); }
.library cite { display: block; font-size: clamp(24px, 21px + 0.6vw, 30px); line-height: 1.15; color: var(--text); }
@media (max-width: 640px) { .library { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--s5); }
.field { display: grid; gap: var(--s2); }
.field label { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text); }
.field .hint { font-size: 14px; color: var(--text-2); margin: 0; }
.field input, .field select, .field textarea {
  font: 400 17px/1.4 var(--font-body); color: var(--text); background: var(--field-bg);
  border: 1px solid var(--line-strong); border-radius: 0; padding: var(--s3) var(--s4); min-height: 50px; width: 100%;
  transition: border-color var(--t) ease;
}
.field textarea { min-height: 170px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--accent); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline-offset: 1px; border-color: var(--accent); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field .error { color: var(--error); font-size: 15px; margin: 0; }
.field .error[hidden], .form-status[hidden] { display: none; }
.form-foot { display: grid; gap: var(--s3); }
.form-status { border-left: 3px solid var(--accent); background: var(--surface-2); padding: var(--s4) var(--s5); font-size: 16px; color: var(--text-2); }
.form-status strong { color: var(--text); }
.form-status > :last-child { margin-bottom: 0; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s12); align-items: start; }
.contact-aside > div + div { margin-top: var(--s10); padding-top: var(--s8); border-top: 1px solid var(--line); }
@media (max-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Prose (utility pages) ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: clamp(26px, 22px + 0.8vw, 34px); margin-top: var(--s12); }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--text-2); }
.prose strong { color: var(--text); }

/* ---------- Title-block footer ---------- */
.site-footer { padding: var(--s16) 0 var(--s12); }
.title-block { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 3fr) minmax(0, 3fr) minmax(0, 3fr); border: 1px solid var(--line-strong); background: var(--bg); }
.tb-cell { padding: var(--s5) var(--s6); border-right: 1px solid var(--line); }
.tb-cell:last-child { border-right: 0; }
.tb-cell + .tb-cell { }
.tb-head { display: block; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2); margin-bottom: var(--s3); }
.tb-brand { color: var(--text); }
.tb-brand svg { width: 120px; display: block; margin-bottom: var(--s3); }
.tb-brand p { color: var(--text-2); font-size: 15px; margin: 0; }
.tb-list { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.tb-list li { padding: 2px 0; }
.tb-list a { color: var(--text); text-decoration: none; }
.tb-list a:hover { color: var(--accent); text-decoration: underline; }
.tb-arch li { color: var(--text); }
.tb-arch .meta { display: block; margin-top: var(--s2); }
.tb-status p { font-size: 14px; color: var(--text-2); margin: 0 0 var(--s2); }
.tb-status p:last-child { margin: 0; }
.tb-status strong { color: var(--text); font-weight: 500; }
@media (max-width: 960px) { .title-block { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tb-cell:nth-child(2) { border-right: 0; } .tb-cell:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
@media (max-width: 560px) { .title-block { grid-template-columns: minmax(0, 1fr); } .tb-cell { border-right: 0; border-bottom: 1px solid var(--line); } .tb-cell:last-child { border-bottom: 0; } }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
@media print {
  body { background: #fff; color: #000; }
  .nav-panel, .menu-toggle, .theme-toggle, .skip-link { display: none !important; }
}

/* helpers */
.bubble { min-width: 36px; width: auto; padding: 0 8px; border-radius: 18px; }
h2.h3 { font-size: clamp(24px, 21px + 0.6vw, 30px); line-height: 1.15; margin-bottom: var(--s3); }
.title-sheet .chips { margin-top: var(--s6); }
.title-sheet .hero-grid { align-items: end; }
.c-side .meta { max-width: 22em; }
.tag { margin-bottom: var(--s3); }
.bearing .tag { display: block; margin-bottom: var(--s2); }
@media (max-width: 640px) {
  .arch-beam { flex-direction: column; align-items: flex-start; gap: var(--s2); }
  .arch-beam .arch-title { font-size: 34px; letter-spacing: 0.16em; }
  .arch-beam .meta { padding-bottom: 0; }
}
.component-grid { grid-template-columns: calc((100% - 48px) / 4) minmax(0, 4fr) minmax(0, 5fr); column-gap: var(--s12); }
.component .schedule { grid-template-columns: minmax(0, 140px) minmax(0, 1fr); }
.component .lead { font-size: clamp(18px, 16px + 0.3vw, 20px); }
@media (max-width: 1060px) { .component-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 760px) { .component-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .component .schedule { grid-template-columns: minmax(0, 1fr); } }
