/* Andrew Byrd — blueprint edition.
   Cyanotype plates for drawings, vellum sheets for reading. */

:root {
  --prussian: #173a73;
  --prussian-deep: #0f2b5a;
  --line: #e6eefa;
  --line-dim: rgba(230, 238, 250, 0.72);
  --line-faint: rgba(230, 238, 250, 0.16);
  --vellum: #e8eef1;
  --vellum-deep: #dce5ea;
  --graph: #d3e0e8;
  --graph-major: #b9cfdb;
  --graphite: #222b33;
  --graphite-soft: #4b5864;
  --pencil: #1f5fbf;
  --redline: #c8202b;

  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --text: "B612", "Segoe UI", system-ui, sans-serif;
  --figures: "B612 Mono", ui-monospace, monospace;

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --measure: 36rem;
  --strip-h: 3.5rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--strip-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--text);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--graphite);
  background: var(--vellum);
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 2px dashed var(--redline);
  outline-offset: 3px;
}

.plate :focus-visible {
  outline-color: var(--line);
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 0.95;
  margin: 0;
  letter-spacing: 0.005em;
}

h2 {
  font-size: clamp(2.5rem, 5.5vw, 4.25rem);
}

h3 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
}

p {
  margin: 0 0 1em;
  max-width: var(--measure);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 50;
  padding: 0.6rem 1rem;
  background: var(--graphite);
  color: var(--vellum);
}

.skip:focus {
  top: 1rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Surfaces ---------- */

.plate {
  color: var(--line);
  background-color: var(--prussian);
  background-image:
    radial-gradient(ellipse 70% 50% at 15% 0%, rgba(255, 255, 255, 0.07), transparent 70%),
    radial-gradient(ellipse 60% 60% at 90% 100%, rgba(5, 18, 48, 0.35), transparent 70%),
    linear-gradient(var(--line-faint) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-faint) 1px, transparent 1px),
    linear-gradient(rgba(230, 238, 250, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230, 238, 250, 0.06) 1px, transparent 1px);
  background-size: auto, auto, 120px 120px, 120px 120px, 24px 24px, 24px 24px;
}

.vellum {
  background-color: var(--vellum);
  background-image:
    linear-gradient(var(--graph-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--graph-major) 1px, transparent 1px),
    linear-gradient(var(--graph) 1px, transparent 1px),
    linear-gradient(90deg, var(--graph) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: -1px -1px;
}

.sheet {
  position: relative;
  padding: clamp(3.5rem, 7vw, 5.5rem) var(--gutter);
}

.vellum.sheet + .vellum.sheet {
  border-top: 2px solid var(--graphite);
}

.sheet-inner {
  max-width: 76rem;
  margin: 0 auto;
}

/* ---------- Title strip (header) ---------- */

.strip {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: stretch;
  height: var(--strip-h);
  background: var(--vellum);
  border-bottom: 2px solid var(--graphite);
}

.strip-name {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 1.1rem;
  border-right: 1px solid var(--graphite);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  text-decoration: none;
  white-space: nowrap;
}

.strip-name svg {
  width: 1.6rem;
  height: 1.6rem;
}

.strip-nav {
  display: flex;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.strip-nav::-webkit-scrollbar {
  display: none;
}

.strip-nav a {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0 1rem;
  border-right: 1px solid var(--graph-major);
  font-size: 0.82rem;
  text-decoration: none;
  white-space: nowrap;
}

.strip-nav a:hover {
  background: var(--vellum-deep);
}

.strip-nav .sheet-no {
  font-family: var(--figures);
  font-size: 0.72rem;
  color: var(--pencil);
}

.strip-nav a[aria-current="true"] {
  box-shadow: inset 0 -3px 0 var(--pencil);
}

.strip-actions {
  display: flex;
  border-left: 1px solid var(--graphite);
}

.strip-actions a {
  display: flex;
  align-items: center;
  padding: 0 1.1rem;
  font-size: 0.82rem;
  text-decoration: none;
  white-space: nowrap;
}

.strip-actions a + a {
  border-left: 1px solid var(--graph-major);
}

.strip-actions .primary {
  background: var(--graphite);
  color: var(--vellum);
}

.strip-actions .primary:hover {
  background: var(--pencil);
}

@media (max-width: 760px) {
  .strip-name span {
    display: none;
  }
  .strip-actions a:not(.primary) {
    display: none;
  }
}

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.2rem;
  border: 1.5px solid currentColor;
  font: inherit;
  font-size: 0.9rem;
  color: inherit;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
}

.btn--solid {
  background: var(--line);
  border-color: var(--line);
  color: var(--prussian);
}

.vellum .btn--solid {
  background: var(--graphite);
  border-color: var(--graphite);
  color: var(--vellum);
}

.btn:hover {
  background: rgba(230, 238, 250, 0.12);
}

.vellum .btn:hover {
  background: var(--vellum-deep);
}

.btn--solid:hover,
.vellum .btn--solid:hover {
  background: var(--pencil);
  border-color: var(--pencil);
  color: #fff;
}

.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.ext::after {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  margin-left: 0.35em;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: translateY(-0.1em);
}

/* ---------- Hero plate ---------- */

.hero {
  position: relative;
  padding: clamp(2rem, 4vw, 3rem) var(--gutter) var(--gutter);
  overflow: hidden;
}

.hero-frame {
  position: relative;
  max-width: 82rem;
  margin: 0 auto;
  border: 2px solid var(--line);
  outline: 1px solid var(--line-dim);
  outline-offset: 6px;
}

.zones {
  position: absolute;
  display: flex;
  justify-content: space-around;
  font-family: var(--figures);
  font-size: 0.66rem;
  color: var(--line-dim);
  pointer-events: none;
}

.zones--top {
  top: -1.55rem;
  left: 0;
  right: 0;
}

.zones--side {
  top: 0;
  bottom: 0;
  left: -1.5rem;
  flex-direction: column;
  align-items: center;
}

.hero-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(1rem, 3vw, 3rem);
  padding: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 4vw, 3.5rem) clamp(1.5rem, 3vw, 2rem);
}

.hero-place {
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  color: var(--line-dim);
}

.hero h1 {
  font-size: clamp(4.5rem, 11.5vw, 10.5rem);
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: -0.005em;
  margin-bottom: 2.6rem;
}

.hero h1 span {
  display: block;
}

.hero-lede {
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
  max-width: 33rem;
  margin-bottom: 2rem;
}

.stack {
  width: 100%;
  overflow: visible;
}

.stack text {
  font-family: var(--text);
  fill: var(--line);
}

.stack .lbl-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 0.01em;
}

.stack .lbl-sub {
  font-size: 11.5px;
  fill: var(--line-dim);
}

.stack .layer {
  transform: translateY(calc(var(--i) * var(--gap, 14px)));
  transition: transform 1.1s cubic-bezier(0.65, 0, 0.2, 1);
}

.stack.is-settled .layer {
  transition-duration: 0.6s;
}

.stack .face {
  fill: var(--prussian);
}

.stack .face--side {
  fill: var(--prussian-deep);
}

/* Title block */

.title-block {
  display: grid;
  grid-template-columns: 2.2fr 1.6fr 1fr 1.4fr 1fr;
  border-top: 2px solid var(--line);
  font-size: 0.78rem;
}

.title-block > div {
  position: relative;
  padding: 0.6rem 0.9rem 0.75rem;
  border-left: 1px solid var(--line-dim);
  min-width: 0;
}

.title-block > div:first-child {
  border-left: 0;
}

.tb-label {
  display: block;
  font-size: 0.68rem;
  color: var(--line-dim);
}

.tb-value {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.1;
}

.tb-check {
  overflow: visible;
}

/* Luna's stamp */

.stamp {
  position: relative;
  z-index: 2;
  display: inline-block;
  margin-top: 0.2rem;
  padding: 0.2rem 0.5rem 0.25rem;
  border: 2px solid var(--redline);
  border-radius: 3px;
  background: none;
  color: #ff5a5f;
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transform: rotate(-6deg);
  cursor: pointer;
  mix-blend-mode: screen;
  border-color: #ff5a5f;
}

.stamp small {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
}

.peek {
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: 4.5rem;
  margin-left: -2.25rem;
  overflow: hidden;
  height: 4rem;
  pointer-events: none;
}

.peek svg {
  transform: translateY(110%);
  transition: transform 0.45s cubic-bezier(0.3, 1.4, 0.5, 1);
}

.tb-check:hover .peek svg,
.stamp:focus-visible + .peek svg,
.tb-check.is-peeking .peek svg {
  transform: translateY(22%);
}

@media (max-width: 980px) {
  .hero-body {
    grid-template-columns: 1fr;
  }
  .stack-wrap {
    max-width: 34rem;
  }
  .title-block {
    grid-template-columns: 1fr 1fr;
  }
  .title-block > div {
    border-top: 1px solid var(--line-dim);
  }
  .title-block > div:nth-child(odd) {
    border-left: 0;
  }
  .title-block > div:first-child {
    grid-column: 1 / -1;
    border-top: 0;
  }
  .title-block > div:nth-child(even) {
    border-left: 0;
  }
  .title-block > div:nth-child(odd):not(:first-child) {
    border-left: 1px solid var(--line-dim);
  }
  .zones--side {
    display: none;
  }
}

/* ---------- Section heads (detail callouts) ---------- */

.sheet-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 1.25rem;
  align-items: start;
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.callout {
  display: grid;
  grid-template-rows: 1fr 1fr;
  width: 4.25rem;
  height: 4.25rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-family: var(--figures);
  font-size: 1rem;
  line-height: 1;
  text-align: center;
  overflow: hidden;
}

.callout span {
  display: flex;
  align-items: center;
  justify-content: center;
}

.callout span:first-child {
  align-items: flex-end;
  padding-bottom: 0.35rem;
  border-bottom: 1.5px solid currentColor;
}

.callout span:last-child {
  align-items: flex-start;
  padding-top: 0.35rem;
  font-size: 0.75rem;
}

.sheet-head h2 {
  padding-bottom: 0.6rem;
  border-bottom: 3px solid currentColor;
  box-shadow: 0 5px 0 -3.5px currentColor;
  margin-bottom: 1.25rem;
  max-width: 22ch;
}

.sheet-head .lede {
  grid-column: 2;
  font-size: 1.08rem;
  max-width: 40rem;
  margin: 0;
}

.vellum .sheet-head {
  color: var(--graphite);
}

.vellum .callout {
  color: var(--pencil);
}

@media (max-width: 640px) {
  .sheet-head {
    grid-template-columns: 1fr;
  }
  .sheet-head .lede {
    grid-column: 1;
  }
  .callout {
    width: 3.4rem;
    height: 3.4rem;
  }
}

/* ---------- Drawings ---------- */

.dwg {
  position: relative;
  margin: 0;
  border: 1.5px solid var(--graphite);
  background: rgba(232, 238, 241, 0.6);
}

.plate .dwg {
  border-color: var(--line);
  background: rgba(15, 43, 90, 0.35);
}

.dwg svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.dwg figcaption {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-top: 1.5px solid currentColor;
  padding: 0.45rem 0.8rem;
  font-size: 0.78rem;
}

.dwg figcaption .detail {
  display: inline-grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-family: var(--figures);
  font-size: 0.72rem;
}

.dwg figcaption .scale {
  margin-left: auto;
  color: var(--graphite-soft);
}

.plate .dwg figcaption .scale {
  color: var(--line-dim);
}

.ink {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ink--thin {
  stroke-width: 1;
}

.ink--dash {
  stroke-dasharray: 5 4;
}

.ink--red {
  stroke: var(--redline);
}

.plate .ink--red {
  stroke: #ff7a7e;
}

.dwg text,
.schematic text,
.lbl {
  font-family: var(--text);
  font-size: 12px;
  fill: currentColor;
}

.dwg text.big {
  font-family: var(--display);
  font-weight: 800;
  font-size: 30px;
}

.dwg text.red,
.schematic text.red {
  fill: var(--redline);
}

.plate .dwg text.red {
  fill: #ff9a9d;
}

.dwg text.head {
  font-family: var(--display);
  font-weight: 800;
  font-size: 18px;
}

.dwg text.dim,
.schematic text.dim {
  font-size: 10.5px;
  opacity: 0.8;
}

.js .draw.is-drawn text.dim {
  opacity: 0.8;
}

.dwg--narrow svg {
  max-width: 19rem;
  margin: 1.5rem auto;
}

/* Self-drafting linework. JS sets pathLength=1 on every .ink in a .draw. */

.js .draw .ink:not(.ink--dash) {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.3s cubic-bezier(0.55, 0.05, 0.25, 1) var(--d, 0s);
}

.js .draw text,
.js .draw .fade {
  opacity: 0;
  transition: opacity 0.6s ease var(--d, 0s);
}

.js .draw .ink--dash {
  opacity: 0;
  transition: opacity 0.6s ease var(--d, 0s);
}

.js .draw.is-drawn .ink:not(.ink--dash) {
  stroke-dashoffset: 0;
}

.js .draw.is-drawn text,
.js .draw.is-drawn .fade,
.js .draw.is-drawn .ink--dash {
  opacity: 1;
}

/* ---------- Spec articles (products) ---------- */

.spec {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 4rem);
  align-items: start;
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  border-top: 1.5px solid var(--graphite);
}

.spec:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.spec--flip .spec-copy {
  order: -1;
}

.spec-copy h3 {
  margin-bottom: 0.9rem;
}

.spec-copy > p {
  font-size: 1.04rem;
}

.spec-table {
  width: 100%;
  max-width: var(--measure);
  margin: 1.5rem 0 1.75rem;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.spec-table th,
.spec-table td {
  padding: 0.55rem 0;
  border-top: 1px solid var(--graph-major);
  vertical-align: top;
  text-align: left;
}

.spec-table tr:last-child th,
.spec-table tr:last-child td {
  border-bottom: 1px solid var(--graph-major);
}

.spec-table th {
  width: 8.5rem;
  padding-right: 1rem;
  font-weight: 400;
  color: var(--graphite-soft);
}

.plate .spec-table th {
  color: var(--line-dim);
}

.plate .spec-table th,
.plate .spec-table td {
  border-color: rgba(230, 238, 250, 0.35);
}

.used-at {
  margin: 0 0 1.75rem;
  padding: 1rem 1.1rem;
  border: 1.5px dashed var(--pencil);
  max-width: var(--measure);
}

.used-at h4 {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--pencil);
}

.used-at ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.2;
}

@media (max-width: 860px) {
  .spec {
    grid-template-columns: 1fr;
  }
  .spec--flip .spec-copy {
    order: 0;
  }
}

/* ---------- Planning Poker demo ---------- */

.poker {
  border: 1.5px solid var(--graphite);
  background: var(--vellum);
}

.poker-story {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  padding: 0.65rem 0.9rem;
  border-bottom: 1.5px solid var(--graphite);
  font-size: 0.84rem;
}

.poker-story strong {
  font-weight: 700;
}

.poker-table {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  padding: 1.5rem 1rem 1rem;
  background:
    radial-gradient(ellipse 80% 70% at 50% 50%, rgba(31, 95, 191, 0.08), transparent 70%);
}

.seat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  color: var(--graphite-soft);
}

.seat--you {
  color: var(--graphite);
  font-weight: 700;
}

.pcard {
  position: relative;
  width: 100%;
  max-width: 4rem;
  aspect-ratio: 5 / 7;
  perspective: 600px;
}

.pcard-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.4, 0.1, 0.2, 1) var(--d, 0s), opacity 0.3s;
}

.pcard-back,
.pcard-front {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--graphite);
  border-radius: 4px;
  backface-visibility: hidden;
}

.pcard-back {
  background:
    repeating-linear-gradient(45deg, var(--pencil) 0 1.5px, transparent 1.5px 7px),
    var(--vellum);
}

.pcard-front {
  background: #f6f9fa;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(1.5rem, 3vw, 2rem);
  transform: rotateY(180deg);
}

.pcard--empty .pcard-inner {
  opacity: 0;
}

.pcard::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1.5px dashed var(--graph-major);
  border-radius: 4px;
}

.poker.is-revealed .pcard-inner {
  transform: rotateY(180deg);
}

.pcard.is-outlier .pcard-front {
  border-color: var(--redline);
  color: var(--redline);
  box-shadow: 0 0 0 3px rgba(200, 32, 43, 0.15);
}

.poker-status {
  min-height: 3.4em;
  margin: 0;
  padding: 0.25rem 1rem 0.9rem;
  font-size: 0.88rem;
  max-width: none;
}

.hand {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 0.9rem 1rem 1rem;
  border-top: 1.5px solid var(--graphite);
}

.hand-label {
  font-size: 0.8rem;
  color: var(--graphite-soft);
  margin-right: 0.25rem;
}

.hand button[data-vote] {
  width: 2.75rem;
  height: 3.6rem;
  border: 1.5px solid var(--graphite);
  border-radius: 4px;
  background: #f6f9fa;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--graphite);
  cursor: pointer;
  transition: transform 0.15s;
}

.hand button[data-vote]:hover {
  transform: translateY(-3px);
}

.hand button[data-vote][aria-pressed="true"] {
  background: var(--graphite);
  color: var(--vellum);
  transform: translateY(-6px);
}

.hand .btn {
  flex: none;
  margin-left: auto;
}

.consensus {
  position: relative;
}

.consensus::after {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: repeating-conic-gradient(var(--redline) 0 3deg, transparent 3deg 30deg);
  -webkit-mask: radial-gradient(circle, transparent 52%, #000 53%, #000 70%, transparent 71%);
  mask: radial-gradient(circle, transparent 52%, #000 53%, #000 70%, transparent 71%);
  animation: burst 0.7s ease-out forwards;
}

@keyframes burst {
  from {
    transform: scale(0.4);
    opacity: 1;
  }
  to {
    transform: scale(1.35);
    opacity: 0;
  }
}

@media (max-width: 480px) {
  .poker-table {
    gap: 0.4rem;
    padding-inline: 0.6rem;
  }
  .hand .btn {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }
}

/* ---------- Notes (Pendo / agents) ---------- */

.notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 2px solid var(--graphite);
  border-left: 1px solid var(--graphite);
}

.note {
  padding: 1.5rem 1.4rem 1.6rem;
  border-right: 1px solid var(--graphite);
  border-bottom: 1px solid var(--graphite);
  background: rgba(232, 238, 241, 0.75);
}

.note-key {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  margin: 0 0 0.9rem -0.25rem;
  color: var(--redline);
  font-family: var(--figures);
  font-size: 0.75rem;
}

.note-key::before {
  content: "";
  position: absolute;
  inset: 0.4rem;
  border: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.note h3 {
  font-size: 1.75rem;
  margin-bottom: 0.7rem;
}

.note p {
  font-size: 0.93rem;
}

.note a {
  font-size: 0.86rem;
}

.note--lead {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 1rem 3rem;
  background: var(--graphite);
  color: var(--vellum);
}

.note--lead h3 {
  font-size: clamp(2rem, 3.5vw, 2.6rem);
}

@media (max-width: 860px) {
  .notes,
  .note--lead {
    grid-template-columns: 1fr;
  }
}

.toolkit {
  margin: 2rem 0 0;
  font-size: 0.9rem;
  color: var(--graphite-soft);
  max-width: none;
}

.toolkit strong {
  color: var(--graphite);
  font-weight: 400;
}

/* Agent schematic */

.schematic {
  margin: 0 0 2.5rem;
  color: var(--graphite);
}

.schematic svg {
  width: 100%;
  height: auto;
}

/* ---------- Experience (dimension timeline) ---------- */

.timeline {
  display: grid;
  /* Column widths are each job's length in months, set by scripts/resume/sync.mjs. */
  grid-template-columns: var(--cols, repeat(5, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  position: relative;
  padding: 3.25rem 0.9rem 0 0.9rem;
  border-left: 1px solid var(--graphite);
}

.timeline li:last-child {
  border-right: 1px dashed var(--graphite);
}

/* dimension line with arrowheads */
.timeline li::before {
  content: "";
  position: absolute;
  top: 1.1rem;
  left: 6px;
  right: 6px;
  border-top: 1px solid var(--graphite);
}

.timeline li::after {
  content: "";
  position: absolute;
  top: calc(1.1rem - 4px);
  left: 0;
  right: 0;
  height: 9px;
  background:
    linear-gradient(to bottom right, transparent 45%, var(--graphite) 46% 54%, transparent 55%) left / 7px 4.5px no-repeat,
    linear-gradient(to top right, transparent 45%, var(--graphite) 46% 54%, transparent 55%) left bottom / 7px 4.5px no-repeat,
    linear-gradient(to bottom left, transparent 45%, var(--graphite) 46% 54%, transparent 55%) right top / 7px 4.5px no-repeat,
    linear-gradient(to top left, transparent 45%, var(--graphite) 46% 54%, transparent 55%) right bottom / 7px 4.5px no-repeat;
}

.span-len {
  position: absolute;
  top: 0.15rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 0.35rem;
  background: var(--vellum);
  font-family: var(--figures);
  font-size: 0.68rem;
  color: var(--pencil);
  white-space: nowrap;
}

.timeline .years {
  display: block;
  font-family: var(--figures);
  font-size: 0.72rem;
  color: var(--graphite-soft);
}

.timeline .co {
  display: block;
  margin: 0.25rem 0 0.35rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1;
}

.timeline .role {
  display: block;
  font-size: 0.82rem;
  line-height: 1.4;
}

.timeline li.is-now .co {
  color: var(--pencil);
}

@media (max-width: 860px) {
  .timeline {
    grid-template-columns: 1fr;
  }
  .timeline li {
    padding: 0.4rem 0 1.6rem 2.2rem;
    border-left: 0;
  }
  .timeline li:last-child {
    border-right: 0;
  }
  .timeline li::before {
    top: 6px;
    bottom: 6px;
    left: 0.7rem;
    right: auto;
    border-top: 0;
    border-left: 1px solid var(--graphite);
  }
  .timeline li::after {
    top: 0;
    bottom: 0;
    left: 0.35rem;
    right: auto;
    width: 0.7rem;
    height: auto;
    background: none;
    border-top: 1px solid var(--graphite);
    border-bottom: 1px solid var(--graphite);
  }
  .span-len {
    position: static;
    transform: none;
    padding: 0;
    background: none;
    margin-right: 0.6rem;
  }
}

.sheet-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 3rem;
}

/* ---------- Off the clock (plate sections) ---------- */

.home-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2rem 4rem;
  align-items: end;
  margin-bottom: clamp(3rem, 7vw, 5rem);
}

.home-intro h2 {
  font-size: clamp(3.2rem, 8vw, 6.5rem);
  font-weight: 900;
  line-height: 0.88;
}

.home-intro p {
  font-size: 1.1rem;
}

@media (max-width: 860px) {
  .home-intro {
    grid-template-columns: 1fr;
  }
}

.plate .spec {
  border-top-color: var(--line);
}

.plate .sheet-head h3 {
  padding-bottom: 0.5rem;
  border-bottom: 3px solid currentColor;
  box-shadow: 0 5px 0 -3.5px currentColor;
  margin-bottom: 1.25rem;
}

.requests {
  width: 100%;
  margin: 1.5rem 0 1.75rem;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.requests caption {
  text-align: left;
  font-size: 0.8rem;
  color: var(--line-dim);
  padding-bottom: 0.5rem;
}

.requests th {
  font-weight: 400;
  text-align: left;
  font-size: 0.75rem;
  color: var(--line-dim);
  padding: 0 0 0.35rem;
}

.requests td {
  padding: 0.6rem 0;
  border-top: 1px solid rgba(230, 238, 250, 0.35);
  vertical-align: top;
}

.requests td:first-child {
  width: 50%;
  padding-right: 1rem;
  font-style: italic;
  color: #ffb3b5;
}

.requests tr:last-child td {
  border-bottom: 1px solid rgba(230, 238, 250, 0.35);
}

.plate .btn--solid {
  color: var(--prussian);
}

/* PC bill of materials */

.bom {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.bom th {
  text-align: left;
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--line-dim);
  padding: 0 0.6rem 0.4rem 0;
}

.bom td {
  padding: 0.5rem 0.6rem 0.5rem 0;
  border-top: 1px solid rgba(230, 238, 250, 0.35);
  vertical-align: top;
}

.bom tbody tr {
  cursor: default;
  transition: background 0.2s;
}

.bom tbody tr.is-active {
  background: rgba(255, 122, 126, 0.16);
}

.bom .key {
  width: 2rem;
  font-family: var(--figures);
  color: #ff9a9d;
}

.bom .part {
  color: var(--line-dim);
  width: 7rem;
}

.pc .part-g {
  transition: transform 0.45s cubic-bezier(0.3, 1.2, 0.5, 1), color 0.2s;
}

.pc .part-g.is-active {
  color: #ff9a9d;
  transform: translate(var(--ex, 0), var(--ey, 0));
}

/* Home lab + Luna row */

.pair {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 4rem);
  padding-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1.5px solid var(--line);
  align-items: start;
}

@media (max-width: 860px) {
  .pair {
    grid-template-columns: 1fr;
  }
}

.luna .dwg {
  max-width: 20rem;
  margin-bottom: 1.5rem;
}

/* ---------- About + contact ---------- */

.about {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
}

.about-copy p {
  font-size: 1.08rem;
}

.principles {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: p;
  border-top: 1.5px solid var(--graphite);
}

.principles li {
  counter-increment: p;
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: 0 0.75rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--graph-major);
  font-size: 0.92rem;
}

.principles li::before {
  content: counter(p);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1.5px solid var(--pencil);
  border-radius: 50%;
  font-family: var(--figures);
  font-size: 0.75rem;
  color: var(--pencil);
}

.principles strong {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
}

.contact-card {
  align-self: start;
  border: 2px solid var(--graphite);
  background: var(--vellum);
}

.contact-card h2 {
  padding: 1.5rem 1.5rem 1.25rem;
  font-size: clamp(2.4rem, 4.5vw, 3.5rem);
}

.contact-card .email {
  display: block;
  padding: 1rem 1.5rem;
  border-top: 2px solid var(--graphite);
  background: var(--graphite);
  color: var(--vellum);
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  text-decoration: none;
}

.contact-card .email:hover {
  background: var(--pencil);
}

.contact-links {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

.contact-links a {
  padding: 0.8rem 1rem;
  border-left: 1px solid var(--graphite);
  font-size: 0.86rem;
  text-decoration: none;
}

.contact-links a:first-child {
  border-left: 0;
}

.contact-links a:hover {
  background: var(--vellum-deep);
}

.revisions {
  width: 100%;
  border-collapse: collapse;
  border-top: 2px solid var(--graphite);
  font-size: 0.74rem;
}

.revisions th,
.revisions td {
  padding: 0.4rem 0.75rem;
  border-top: 1px solid var(--graph-major);
  text-align: left;
  font-weight: 400;
}

.revisions th {
  color: var(--graphite-soft);
}

@media (max-width: 860px) {
  .about {
    grid-template-columns: 1fr;
  }
}

/* ---------- Footer ---------- */

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding: 1.25rem var(--gutter);
  border-top: 2px solid var(--graphite);
  font-size: 0.8rem;
  background: var(--vellum);
}

.foot a {
  text-decoration: none;
}

.foot a:hover {
  text-decoration: underline;
}

/* ---------- Detail pages (resume, case study) ---------- */

.doc {
  max-width: 64rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5rem) var(--gutter);
}

.doc-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem 2rem;
  align-items: end;
  padding-bottom: 1.75rem;
  margin-bottom: 2.5rem;
  border-bottom: 3px solid var(--graphite);
  box-shadow: 0 5px 0 -3.5px var(--graphite);
}

.doc-head h1 {
  font-size: clamp(3.4rem, 9vw, 6.5rem);
  font-weight: 900;
  line-height: 0.85;
}

.doc-head .lede {
  grid-column: 1 / -1;
  font-size: 1.08rem;
  max-width: 44rem;
  margin: 0;
}

.doc-section {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 1rem 2.5rem;
  padding: 2rem 0;
  border-top: 1.5px solid var(--graphite);
}

.doc-section > h2 {
  font-size: 1.9rem;
}

.entry {
  padding-bottom: 1.6rem;
  margin-bottom: 1.6rem;
  border-bottom: 1px solid var(--graph-major);
}

.entry:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.entry-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  align-items: baseline;
}

.entry-head h3 {
  font-size: 1.75rem;
}

.entry-head .when {
  font-family: var(--figures);
  font-size: 0.78rem;
  color: var(--graphite-soft);
}

.entry .title {
  margin: 0.25rem 0 0.6rem;
  font-size: 0.92rem;
  color: var(--pencil);
}

.entry ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.92rem;
}

.entry li {
  margin-bottom: 0.4rem;
  max-width: 44rem;
}

.entry li::marker {
  color: var(--pencil);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--graphite);
  font-size: 0.8rem;
  background: rgba(232, 238, 241, 0.8);
}

@media (max-width: 760px) {
  .doc-head,
  .doc-section {
    grid-template-columns: 1fr;
  }
}

/* Case study */

.case-hero {
  padding: clamp(3rem, 7vw, 5.5rem) var(--gutter) clamp(2.5rem, 5vw, 4rem);
}

.case-hero .sheet-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2rem 4rem;
  align-items: end;
}

.case-hero h1 {
  font-size: clamp(3.4rem, 9vw, 7rem);
  font-weight: 900;
  line-height: 0.85;
  margin-bottom: 1.5rem;
}

.back {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.86rem;
}

.case-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 4rem);
  align-items: start;
}

.case-body p {
  font-size: 1.04rem;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--graphite);
}

.steps li {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 0 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--graph-major);
}

.steps .n {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1.5px solid var(--pencil);
  border-radius: 50%;
  font-family: var(--figures);
  color: var(--pencil);
}

.steps strong {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
}

.steps p {
  margin: 0;
  font-size: 0.94rem;
}

.redline-note {
  margin: 2rem 0 0;
  padding: 1.2rem 1.4rem;
  border: 1.5px solid var(--redline);
  max-width: none;
}

.redline-note h3 {
  font-size: 1.6rem;
  color: var(--redline);
  margin-bottom: 0.6rem;
}

.redline-note p {
  margin: 0;
  font-size: 0.95rem;
}

@media (max-width: 860px) {
  .case-hero .sheet-inner,
  .case-body {
    grid-template-columns: 1fr;
  }
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    animation-duration: 0.01ms !important;
  }
}

/* ---------- Print (resume) ---------- */

@media print {
  .strip,
  .foot,
  .no-print {
    display: none !important;
  }
  body,
  .vellum {
    background: #fff !important;
    font-size: 10pt;
  }
  .doc {
    padding: 0;
    max-width: none;
  }
  .doc-head {
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
  }
  .doc-head h1 {
    font-size: 28pt;
  }
  .doc-head .lede,
  .entry li,
  .entry p {
    font-size: 9.5pt;
    line-height: 1.4;
  }
  .doc-section {
    grid-template-columns: 1fr;
    gap: 0.4rem;
    padding: 0.6rem 0;
  }
  .doc-section > h2 {
    font-size: 15pt;
  }
  .entry {
    margin-bottom: 0.7rem;
    padding-bottom: 0.7rem;
  }
  .entry-head h3 {
    font-size: 13pt;
  }
  .entry .title {
    margin: 0 0 0.3rem;
  }
  .entry li {
    margin-bottom: 0.15rem;
  }
  .chips li {
    font-size: 8.5pt;
    padding: 0.1rem 0.4rem;
  }
  .entry {
    break-inside: avoid;
  }
  a {
    text-decoration: none;
  }
}

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
  .stack .lbl-title {
    font-size: 30px;
    transform: translateY(8px);
  }
  .stack .lbl-detail {
    display: none;
  }
  .poker-story {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .hand-label {
    display: none;
  }
  .hand button[data-vote] {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
  }
}
