/* ============================================================
   ATHEMA — SCHEMATIC
   A drafted drawing set: "Retrofit of a vibe-coded structure"
   Palette: vellum / graphite / blueprint blue / redline
   ============================================================ */

:root {
  --table: #252a30;
  --table-2: #2e343b;
  --vellum: #f2f0e8;
  --vellum-2: #eceade;
  --vellum-3: #e5e2d4;
  --ink: #2b2e33;
  --ink-2: #55595f;
  --ink-3: #9b9d9a;
  --blue: #1d5fa8;
  --blue-2: #2d74c4;
  --blue-wash: rgba(29, 95, 168, 0.07);
  --red: #b03a2a;
  --red-2: #c1462f;
  --red-wash: rgba(176, 58, 42, 0.07);
  --grid-c: rgba(29, 95, 168, 0.055);
  --grid-major: rgba(29, 95, 168, 0.09);
  --frame: #3a3d42;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --sans: "Barlow", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --cond: "Barlow Condensed", "Arial Narrow", sans-serif;
  --hand: "Architects Daughter", "Comic Sans MS", cursive;
  --sheet-pad: clamp(22px, 4.5vw, 64px);
  --sheet-max: 1360px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--table);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(29, 95, 168, 0.22); }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* -------------------------------------------------- table surface */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(255,255,255,0.05), transparent 60%),
    linear-gradient(180deg, var(--table) 0%, #21262c 100%);
}

/* ==================================================== nav strip */
.navstrip {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  height: 46px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 clamp(14px, 3vw, 28px);
  background: rgba(30, 34, 40, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(242, 240, 232, 0.14);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #c9cbc6;
}
.navstrip .brand {
  display: flex; align-items: center; gap: 9px;
  color: #f2f0e8; font-weight: 500; letter-spacing: 0.22em;
}
.navstrip .brand svg { width: 15px; height: 18px; display: block; }
.navstrip .setno { color: #8b8e89; letter-spacing: 0.1em; }
.navstrip nav {
  display: flex; gap: 2px; margin-left: auto;
  overflow-x: auto; scrollbar-width: none;
}
.navstrip nav::-webkit-scrollbar { display: none; }
.navstrip nav a {
  color: #a6a9a3; padding: 5px 9px; white-space: nowrap;
  border: 1px solid transparent; border-radius: 2px;
}
.navstrip nav a:hover { color: #f2f0e8; text-decoration: none; }
.navstrip nav a.active { color: #f2f0e8; border-color: rgba(242,240,232,0.3); }
.navstrip .cta {
  flex-shrink: 0;
  background: var(--blue-2); color: #fff;
  padding: 7px 14px; border-radius: 2px;
  font-weight: 500; letter-spacing: 0.06em;
}
.navstrip .cta:hover { background: #3a83d4; text-decoration: none; }
@media (max-width: 900px) {
  .navstrip nav { display: none; }
  .navstrip .setno { display: none; }
  .navstrip .cta { margin-left: auto; }
}

/* ==================================================== sheets */
.set { padding: 78px clamp(10px, 2.5vw, 34px) 40px; }

.sheet {
  position: relative;
  max-width: var(--sheet-max);
  margin: 0 auto clamp(28px, 4vw, 56px);
  background:
    repeating-linear-gradient(0deg, var(--grid-c) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(90deg, var(--grid-c) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(0deg, var(--grid-major) 0 1px, transparent 1px 130px),
    repeating-linear-gradient(90deg, var(--grid-major) 0 1px, transparent 1px 130px),
    var(--vellum);
  border: 1.5px solid var(--frame);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.65), 0 4px 14px rgba(0,0,0,0.3);
  padding: calc(var(--sheet-pad) * 0.9) var(--sheet-pad) 0;
}
/* inner drawing frame */
.sheet::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(43, 46, 51, 0.55);
  pointer-events: none;
}
/* paper grain */
.sheet::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.16 0 0 0 0 0.16 0 0 0 0 0.14 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}
.sheet > * { position: relative; z-index: 1; }

/* edge tick marks */
.sheet .ticks-x, .sheet .ticks-y { position: absolute; pointer-events: none; }
.sheet .ticks-x {
  left: 12px; right: 12px; height: 6px;
  background: repeating-linear-gradient(90deg, rgba(43,46,51,.5) 0 1px, transparent 1px 130px);
}
.sheet .ticks-x.t-top { top: 12px; }
.sheet .ticks-x.t-bot { bottom: 12px; }
.sheet .ticks-y {
  top: 12px; bottom: 12px; width: 6px;
  background: repeating-linear-gradient(0deg, rgba(43,46,51,.5) 0 1px, transparent 1px 130px);
}
.sheet .ticks-y.t-left { left: 12px; }
.sheet .ticks-y.t-right { right: 12px; }
.gridref {
  position: absolute; pointer-events: none;
  font-family: var(--mono); font-size: 9px; color: rgba(43,46,51,0.4);
  letter-spacing: 0.05em;
}
@media (max-width: 700px) {
  .sheet { padding: calc(var(--sheet-pad) * 1.1) var(--sheet-pad) 0; }
}

/* sheet header band: number + title */
.sheethead {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  margin-bottom: clamp(26px, 4vw, 44px);
  border-bottom: 1px solid var(--ink);
}
.sheethead .no {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--vellum);
  background: var(--ink);
  padding: 4px 10px;
}
.sheethead h2 {
  font-family: var(--cond);
  font-weight: 600;
  font-size: clamp(30px, 4.6vw, 46px);
  line-height: 1;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  color: var(--ink);
}
.sheethead .rev {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--ink-2);
  text-transform: uppercase;
}
@media (max-width: 700px) { .sheethead .rev { display: none; } }

/* kicker + body text */
.kick {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}
.kick.r { color: var(--red); }
.kick.g { color: var(--ink-2); }
.lede {
  font-size: clamp(16.5px, 1.5vw, 18.5px);
  line-height: 1.65;
  color: var(--ink);
  max-width: 62ch;
}
.lede strong { font-weight: 600; }
.body-2 { font-size: 15px; line-height: 1.65; color: var(--ink-2); max-width: 62ch; }
.mono-note {
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.75;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}

/* title block (bottom of each sheet) */
.titleblock {
  margin: clamp(30px, 5vw, 56px) calc(var(--sheet-pad) * -1) 0;
  border-top: 1.5px solid var(--ink);
  display: grid;
  grid-template-columns: auto 1fr auto auto auto auto;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: rgba(236, 234, 222, 0.6);
}
.titleblock > div {
  padding: 9px 14px 11px;
  border-right: 1px solid rgba(43, 46, 51, 0.35);
  min-width: 0;
}
.titleblock > div:last-child { border-right: 0; }
.titleblock b {
  display: block;
  font-weight: 500;
  color: var(--ink);
  font-size: 10.5px;
  margin-top: 2px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.titleblock .tb-brand { display: flex; align-items: center; gap: 8px; }
.titleblock .tb-brand svg { width: 13px; height: 16px; }
.titleblock .tb-brand span { font-weight: 500; letter-spacing: 0.22em; color: var(--ink); font-size: 11px; }
@media (max-width: 860px) {
  .titleblock { grid-template-columns: 1fr 1fr 1fr; }
  .titleblock > div:nth-child(3n) { border-right: 0; }
  .titleblock > div { border-top: 1px solid rgba(43,46,51,0.2); }
  .titleblock > div:nth-child(-n+3) { border-top: 0; }
  .titleblock .tb-project { display: none; }
}

/* ==================================================== line-work */
svg.draft { display: block; width: 100%; height: auto; overflow: visible; }
.draft .ink { fill: none; stroke: var(--ink); stroke-width: 1.3; stroke-linejoin: round; stroke-linecap: round; }
.draft .thin { stroke-width: 0.8; }
.draft .thick { stroke-width: 2.1; }
.draft .face { stroke: none; }
.draft .ftop { fill: #f0eee5; }
.draft .fright { fill: #dcdacd; }
.draft .fleft { fill: #e7e5d8; }
.draft .new { fill: none; stroke: var(--blue); stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.draft .fault { fill: none; stroke: var(--red); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.draft .dash { stroke-dasharray: 5 4; }
.draft .cl { fill: none; stroke: var(--ink-3); stroke-width: 0.8; stroke-dasharray: 14 4 2.5 4; }
.draft .node { fill: var(--vellum); }
.draft text {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  fill: var(--ink-2);
}
.draft text.lab { font-size: 10.5px; fill: var(--ink); font-weight: 500; letter-spacing: 0.14em; }
.draft text.lab-b { fill: var(--blue); }
.draft text.lab-r { fill: var(--red); }
.draft text.hand-t { font-family: var(--hand); font-size: 14px; letter-spacing: 0; fill: var(--red); }
.draft .dim { stroke: var(--ink-2); stroke-width: 0.7; fill: none; }
.draft .dim-b { stroke: var(--blue); }
.draft .dim-r { stroke: var(--red); }
.draft .leader { fill: none; stroke-width: 0.9; }
.draft .hatch-r { fill: url(#hatchRed); stroke: none; }
.draft .hatch-b { fill: url(#hatchBlue); stroke: none; }

/* callout ring */
.draft .ring { fill: var(--vellum); stroke-width: 1.2; }

/* draw-on animation */
.draw-scope .drawable {
  transition: stroke-dashoffset 1.15s cubic-bezier(0.3, 0, 0.25, 1);
  transition-delay: var(--dd, 0ms);
}
.no-motion .draw-scope .drawable { transition: none !important; }
/* faces + text shade in after the lines plot */
html:not(.no-motion) .draw-scope .face,
html:not(.no-motion) .draw-scope text {
  opacity: 0;
  transition: opacity 0.9s ease;
}
html:not(.no-motion) .draw-scope.drawn .face { opacity: 1; transition-delay: 1s; }
html:not(.no-motion) .draw-scope.drawn text { opacity: 1; transition-delay: 1.3s; }

/* ==================================================== reveals */
[data-rv] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.25, 0.1, 0.2, 1);
  transition-delay: var(--rd, 0ms);
}
[data-rv].rv-in { opacity: 1; transform: none; }
.no-motion [data-rv] { opacity: 1; transform: none; transition: none; }

/* stamps */
.stamp {
  display: inline-block;
  font-family: var(--mono);
  font-weight: 500;
  text-transform: uppercase;
  border: 2px solid currentColor;
  border-radius: 3px;
  padding: 7px 13px 8px;
  font-size: 11.5px;
  letter-spacing: 0.16em;
  line-height: 1.35;
  color: var(--red-2);
  transform: rotate(-3deg);
  position: relative;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='60'%3E%3Cfilter id='r'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.55' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.82 0.15'/%3E%3C/filter%3E%3Crect width='140' height='60' filter='url(%23r)'/%3E%3C/svg%3E");
  mask-size: 140px 60px;
}
.stamp.blue { color: var(--blue); }
.stamp.ink { color: var(--ink-2); }
.stamp small { display: block; font-size: 8.5px; letter-spacing: 0.14em; opacity: 0.85; }
[data-stamp] { opacity: 0; transform: rotate(-3deg) scale(1.5); }
[data-stamp].stamped {
  opacity: 1;
  transform: rotate(-3deg) scale(1);
  transition: opacity 0.28s ease-out, transform 0.28s cubic-bezier(0.2, 0.6, 0.3, 1);
}
.no-motion [data-stamp]:not([data-manual]) { opacity: 1; transform: rotate(-3deg) scale(1); transition: none; }
.no-motion [data-stamp].stamped { opacity: 1; transform: rotate(-3deg) scale(1); transition: none; }

/* hand notes */
.handnote {
  font-family: var(--hand);
  font-size: 16px;
  line-height: 1.5;
  color: var(--red);
}
.handnote .attr {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  margin-top: 4px;
  text-transform: uppercase;
}

/* ==================================================== components */

/* general notes box */
.notesbox {
  border: 1px solid var(--ink);
  background: rgba(242, 240, 232, 0.75);
}
.notesbox header {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 9px 16px;
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.notesbox ol { list-style: none; counter-reset: gn; padding: 6px 0; }
.notesbox li {
  counter-increment: gn;
  display: flex;
  gap: 12px;
  padding: 8px 16px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
}
.notesbox li::before {
  content: counter(gn, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--blue);
  padding-top: 3px;
  flex-shrink: 0;
}
.notesbox li strong { font-weight: 600; }

/* data tables (fault schedule, equipment schedule) */
.dtable { width: 100%; border-collapse: collapse; border: 1px solid var(--ink); background: rgba(242,240,232,0.7); }
.dtable caption {
  caption-side: top;
  text-align: left;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 0 0 10px;
}
.dtable th {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: left;
  color: var(--vellum);
  background: var(--ink);
  padding: 8px 14px;
  border-right: 1px solid rgba(242,240,232,0.25);
}
.dtable td {
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.5;
  vertical-align: top;
  border-top: 1px solid rgba(43, 46, 51, 0.3);
  border-right: 1px solid rgba(43, 46, 51, 0.18);
}
.dtable td:last-child, .dtable th:last-child { border-right: 0; }
.dtable .mark {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--red);
  white-space: nowrap;
}
.dtable .mark.b { color: var(--blue); }
.dtable .quote { font-family: var(--hand); font-size: 15px; color: var(--ink); line-height: 1.45; }
.dtable .attr { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.08em; color: var(--ink-3); text-transform: uppercase; display: block; margin-top: 4px; }
.tscroll { overflow-x: auto; }
.tscroll .dtable { min-width: 560px; }

/* CTA buttons */
.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 14px 26px;
  border: 1.5px solid var(--blue);
  color: #fff;
  background: var(--blue);
  border-radius: 2px;
  box-shadow: 3px 3px 0 rgba(29, 95, 168, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { background: var(--blue-2); text-decoration: none; transform: translate(-1px, -1px); box-shadow: 4px 4px 0 rgba(29,95,168,0.3); }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
  box-shadow: 3px 3px 0 rgba(43, 46, 51, 0.15);
}
.btn.ghost:hover { background: rgba(43, 46, 51, 0.05); box-shadow: 4px 4px 0 rgba(43,46,51,0.2); }
.no-motion .btn { transition: none; }

/* legend chips */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i {
  display: inline-block;
  width: 26px;
  height: 0;
  border-top: 2px solid var(--ink);
}
.legend i.b { border-color: var(--blue); }
.legend i.r { border-color: var(--red); }
.legend i.dsh { border-top-style: dashed; }

/* plate: a mounted product panel */
.plate {
  border: 1px solid var(--ink);
  background: var(--vellum);
  box-shadow: 5px 5px 0 rgba(43, 46, 51, 0.12);
  position: relative;
}
.plate > header {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  padding: 9px 16px;
  border-bottom: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(43, 46, 51, 0.045);
}
.plate > header .tag { color: var(--blue); }
.plate-pin {
  position: absolute;
  top: -7px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  background: var(--vellum-3);
  box-shadow: inset 2px 2px 3px rgba(0,0,0,0.15);
}
.plate-pin.pl { left: 14px; }
.plate-pin.pr { right: 14px; }

/* generic two-col layout inside sheets */
.cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 4.5vw, 60px);
  align-items: start;
}
@media (max-width: 940px) { .cols { grid-template-columns: minmax(0, 1fr); } }
.cols-survey { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
@media (max-width: 940px) { .cols-survey { grid-template-columns: minmax(0, 1fr); } }

/* footer */
.setfoot {
  max-width: var(--sheet-max);
  margin: 0 auto;
  padding: 8px 4px 26px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7d817c;
}
.setfoot a { color: #aeb1ab; }

/* util */
.small { font-size: 13.5px; }
.dim-t { color: var(--ink-2); }
.nowrap { white-space: nowrap; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden;
}

/* drawing extras */
.draft .cloud { stroke-width: 0.9; fill: none; }
.draft .gusset { fill: var(--vellum); stroke: var(--blue); stroke-width: 1.1; }
.draft .brace { stroke-width: 1.9; }
.draft .pile { stroke-width: 2.2; }

/* ==================================================== cover */
.coverhead {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  margin-bottom: clamp(18px, 3vw, 34px);
}
.coverstamp { flex-shrink: 0; }
.cover {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(30px, 4.5vw, 64px);
  align-items: start;
}
.cover-title {
  font-family: var(--cond);
  font-weight: 600;
  font-size: clamp(52px, 6.6vw, 104px);
  line-height: 0.95;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 6px 0 22px;
}
.cover .lede { margin-bottom: 26px; }
.cover-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.cover .notesbox { margin-bottom: 30px; }
.cover-right { position: relative; }
.heronote {
  position: absolute;
  left: 0;
  top: 3%;
  max-width: 190px;
  transform: rotate(-2deg);
}
.figcap {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-top: 12px;
}
.cover-right .legend { margin-top: 12px; }
@media (max-width: 940px) {
  .cover { grid-template-columns: minmax(0, 1fr); }
}

/* drawing index */
.dindex {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.dindex caption {
  caption-side: top; text-align: left;
  font-size: 10.5px; font-weight: 500; letter-spacing: 0.2em;
  color: var(--ink); padding-bottom: 8px;
}
.dindex td {
  padding: 7px 10px 7px 0;
  border-bottom: 1px dashed rgba(43, 46, 51, 0.3);
  color: var(--ink-2);
  white-space: nowrap;
}
.dindex td:nth-child(2) { width: 100%; white-space: normal; color: var(--ink); }
.dindex td:last-child { text-align: right; color: var(--ink-3); }
.dindex a { color: var(--blue); font-weight: 500; }
.dindex.deftable td:first-child { color: var(--blue); font-weight: 500; padding-right: 18px; }
.dindex.deftable td:last-child { text-align: left; color: var(--ink-2); white-space: normal; width: 100%; }

/* survey */
.fschedule .quote { display: block; }
.surveystamp { position: absolute; left: 3%; bottom: 9%; }
figure.draw-scope { position: relative; margin: 0; }

/* keynotes */
.keynotes { list-style: none; display: grid; gap: 14px; margin: 22px 0 30px; }
.keynotes li { display: flex; gap: 14px; font-size: 15px; line-height: 1.55; max-width: 60ch; }
.keynotes .hex {
  flex-shrink: 0;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  color: var(--blue);
  border: 1.3px solid var(--blue);
  width: 34px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 2px;
  margin-top: 2px;
  background: rgba(242, 240, 232, 0.8);
}

/* flow strip */
.flowwrap { overflow-x: auto; border: 1px solid rgba(43,46,51,0.25); background: rgba(242,240,232,0.5); padding: 18px 10px 6px; }
.flowstrip { min-width: 1050px; }

/* detail panel */
.detailpanel {
  border: 1px solid var(--ink);
  padding: 46px 18px 18px;
  background: rgba(242, 240, 232, 0.65);
  position: relative;
}
.dmark {
  position: absolute; top: 14px; left: 16px;
  width: 52px; height: 52px; border-radius: 50%;
  border: 1.4px solid var(--ink);
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--ink);
  background: var(--vellum);
}
.dmark span { display: block; line-height: 1.2; }
.dmark .dsheet { border-top: 1px solid var(--ink); font-size: 9px; padding-top: 2px; color: var(--ink-2); }

/* plates grid */
.plates {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(22px, 3vw, 40px);
  margin-top: 18px;
}
@media (max-width: 940px) { .plates { grid-template-columns: minmax(0, 1fr); } }

/* run log */
.runlog { padding: 18px 20px 20px; }
.runlog-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.rl-eyebrow { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.18em; color: var(--ink-2); margin-bottom: 6px; }
.rl-title { font-family: var(--cond); font-weight: 600; font-size: 25px; text-transform: uppercase; letter-spacing: 0.02em; line-height: 1.05; margin-bottom: 6px; }
.rl-ask { font-size: 13.5px; color: var(--ink-2); font-style: italic; }
.rl-cost { text-align: right; flex-shrink: 0; }
.rl-cost-label { display: block; font-family: var(--mono); font-size: 9px; letter-spacing: 0.18em; color: var(--ink-2); }
.rl-cost-val { font-family: var(--mono); font-size: 27px; font-weight: 500; color: var(--ink); }
.rl-stages {
  list-style: none;
  display: flex; flex-wrap: wrap;
  gap: 4px 18px;
  margin: 16px 0;
  padding: 10px 0;
  border-top: 1px solid rgba(43,46,51,0.25);
  border-bottom: 1px solid rgba(43,46,51,0.25);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  color: var(--ink-2);
}
.rl-stages li { display: inline-flex; align-items: center; gap: 7px; }
.rl-stages i {
  width: 11px; height: 11px; border: 1.3px solid var(--ink-2); border-radius: 50%;
  display: inline-block; position: relative;
}
.rl-stages .done { color: var(--blue); }
.rl-stages .done i { border-color: var(--blue); background: var(--blue); box-shadow: inset 0 0 0 2px var(--vellum); }
.rl-stages .now { color: var(--red); }
.rl-stages .now i { border-color: var(--red); }
.rl-stages .now i::after {
  content: ""; position: absolute; inset: 2px; border-radius: 50%; background: var(--red);
  animation: nowpulse 1.8s ease-in-out infinite;
}
@keyframes nowpulse { 0%,100% { opacity: 0.25; } 50% { opacity: 1; } }
.no-motion .rl-stages .now i::after { animation: none; opacity: 1; }
.rl-events { list-style: none; display: grid; gap: 9px; margin-bottom: 16px; }
.rl-events li { display: flex; gap: 12px; font-size: 13.5px; line-height: 1.5; color: var(--ink); }
.rl-events .t { font-family: var(--mono); font-size: 11px; color: var(--ink-3); padding-top: 2px; flex-shrink: 0; }
.rl-touches { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; }
.rl-touches td { border-top: 1px dashed rgba(43,46,51,0.3); padding: 7px 4px; color: var(--ink-2); }
.rl-touches td:last-child { text-align: right; color: var(--ink); font-weight: 500; }
.rl-touches .never { color: var(--red); }

/* PR panel */
.prpanel { padding: 18px 20px 22px; }
.pr-plain { list-style: none; display: grid; gap: 9px; margin: 14px 0 18px; }
.pr-plain li { display: flex; gap: 12px; font-size: 14px; line-height: 1.5; }
.pr-plain b { font-family: var(--mono); font-size: 11px; color: var(--blue); font-weight: 500; padding-top: 2px; }
.pr-proof {
  display: flex; flex-wrap: wrap; gap: 10px 22px;
  padding: 12px 0;
  border-top: 1px solid rgba(43,46,51,0.25);
  border-bottom: 1px solid rgba(43,46,51,0.25);
  margin-bottom: 14px;
}
.pr-proof span { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; color: var(--ink-2); text-transform: uppercase; display: inline-flex; align-items: baseline; gap: 6px; }
.pr-proof b { font-size: 19px; color: var(--ink); font-weight: 500; }
.pr-risk { font-size: 13.5px; line-height: 1.55; color: var(--ink); margin-bottom: 10px; }
.pr-risk .risklab { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; color: var(--blue); font-weight: 500; }
.pr-found { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; line-height: 1.7; color: var(--ink-2); margin-bottom: 18px; text-transform: uppercase; }
.pr-sealrow { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.pr-sealrow .btn { font-size: 11.5px; padding: 12px 20px; }

/* cert plate */
.certplate {
  position: relative;
  margin-top: 26px;
  border: 1.6px solid var(--ink);
  outline: 1px solid rgba(43,46,51,0.4);
  outline-offset: 5px;
  background: var(--vellum-2);
  padding: 26px 28px 24px;
}
.certplate .screw {
  position: absolute; width: 11px; height: 11px; border-radius: 50%;
  border: 1.2px solid var(--ink); background: var(--vellum-3);
}
.certplate .screw::after {
  content: ""; position: absolute; left: 1px; right: 1px; top: 50%;
  border-top: 1px solid var(--ink); transform: rotate(38deg);
}
.screw.s1 { top: 7px; left: 7px; } .screw.s2 { top: 7px; right: 7px; }
.screw.s3 { bottom: 7px; left: 7px; } .screw.s4 { bottom: 7px; right: 7px; }
.cp-head { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.26em; text-align: center; color: var(--ink); }
.cp-app { font-family: var(--mono); font-size: 12px; text-align: center; color: var(--ink-2); margin: 6px 0 4px; }
.cp-mid { display: flex; align-items: center; justify-content: center; gap: 34px; flex-wrap: wrap; padding: 12px 0 4px; }
.cp-level { display: flex; align-items: center; gap: 14px; }
.cp-l {
  font-family: var(--cond); font-weight: 600; font-size: 74px; line-height: 1;
  color: var(--blue);
}
.cp-l-sub { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--ink); line-height: 1.6; }
.certplate svg.cp-gauge { width: 190px; flex-shrink: 0; }
.cp-metric {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-align: center;
  color: var(--ink-2); border-top: 1px solid rgba(43,46,51,0.3); padding-top: 12px; margin-top: 6px;
}
.cp-stamps { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-top: 16px; }
.cp-stamps .stamp { font-size: 9.5px; padding: 5px 10px 6px; }

/* pricing */
.pcards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.5vw, 30px);
  align-items: stretch;
}
@media (max-width: 940px) { .pcards { grid-template-columns: minmax(0, 1fr); max-width: 480px; } }
.pcard {
  border: 1px solid var(--ink);
  background: rgba(242, 240, 232, 0.75);
  padding: 24px 24px 26px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 5px 5px 0 rgba(43, 46, 51, 0.1);
}
.pcard.featured { border: 1.6px solid var(--blue); box-shadow: 6px 6px 0 rgba(29, 95, 168, 0.18); }
.pc-flag {
  position: absolute; top: -11px; left: 20px;
  font-family: var(--mono); font-size: 9px; font-weight: 500; letter-spacing: 0.18em;
  background: var(--blue); color: #fff; padding: 4px 10px;
}
.pc-name { font-family: var(--cond); font-weight: 600; font-size: 27px; letter-spacing: 0.04em; }
.pc-for { font-size: 13.5px; color: var(--ink-2); margin: 2px 0 18px; }
.pc-price { font-family: var(--mono); font-size: 38px; font-weight: 500; color: var(--ink); line-height: 1; }
.pc-price span { font-size: 14px; color: var(--ink-2); font-weight: 400; }
.pc-price.small-p { font-size: 28px; padding-top: 6px; }
.pc-meta { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--blue); margin: 8px 0 18px; }
.pcard ul { list-style: none; display: grid; gap: 8px; font-size: 14px; color: var(--ink); margin-bottom: 24px; }
.pcard ul li::before { content: "— "; color: var(--ink-3); }
.pcard .btn { margin-top: auto; text-align: center; }

/* step cards */
.stepcards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 22px);
}
@media (max-width: 1100px) { .stepcards { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 700px) { .stepcards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .stepcards { grid-template-columns: minmax(0, 1fr); } }
.stepcard {
  border: 1px solid var(--ink);
  background: rgba(242, 240, 232, 0.7);
  padding: 14px 16px 18px;
}
.sc-no { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.2em; color: var(--blue); font-weight: 500; border-bottom: 1px solid rgba(43,46,51,0.25); padding-bottom: 8px; }
.stepcard svg { margin: 10px 0 4px; }
.sc-title { font-family: var(--cond); font-weight: 600; font-size: 19px; letter-spacing: 0.05em; margin-bottom: 4px; }
.sc-body { font-size: 12.5px; line-height: 1.55; color: var(--ink-2); }

/* closing */
.closing {
  text-align: center;
  padding: clamp(40px, 6vw, 80px) 0 20px;
  display: grid;
  justify-items: center;
  gap: 18px;
}
.closing-title {
  font-family: var(--cond);
  font-weight: 600;
  font-size: clamp(46px, 6vw, 92px);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.closing .stamp { margin-top: 14px; }

/* ==================================================== mobile refinements */
@media (max-width: 700px) {
  .heronote { position: static; max-width: none; transform: rotate(-1.2deg); margin: 14px 0 4px; }
  .surveystamp { position: static; display: inline-block; margin-top: 16px; }
  .pcards { margin-inline: auto; }
  /* schedule tables become stacked cards */
  .tscroll { overflow: visible; }
  .tscroll .dtable { min-width: 0; }
  .dtable thead { display: none; }
  .dtable, .dtable tbody, .dtable tr, .dtable td, .dtable caption { display: block; }
  .dtable tr { border-top: 1px solid rgba(43, 46, 51, 0.35); padding: 13px 14px 15px; }
  .dtable tbody tr:first-child { border-top: 0; }
  .dtable td { border: 0; padding: 3px 0; }
  .dtable .mark { font-size: 12px; }
}
.ladder text { font-size: 11.5px; }

/* plot-head scroll progress */
.plotline {
  position: fixed;
  top: 46px; left: 0;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: var(--blue-2);
  z-index: 59;
  pointer-events: none;
}

/* drawing index hover */
.dindex tbody tr { transition: background 0.15s ease; }
.dindex tbody tr:hover { background: rgba(29, 95, 168, 0.06); }
