/* Design tokens — :root matches light; dark overrides in html[data-theme="dark"] */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-elevated: #ffffff;
  --surface: #f4f4f5;
  --border: #e4e4e7;
  --text: #171717;
  --text-secondary: #737373;
  --text-muted: var(--text-secondary);
  --accent: #171717;
  --accent-soft: rgba(23, 23, 23, 0.08);
  --on-accent: #ffffff;
  --text-display: #171717;
  --hero-dot-idle: #b8b8b8;
  --media-placeholder: #d4d4d8;
  --mix-bright: #ffffff;
  --modal-backdrop: rgba(0, 0, 0, 0.78);
  --shadow-modal: 0 24px 80px rgba(0, 0, 0, 0.55);
  --shadow-modal-lg: 0 28px 100px rgba(0, 0, 0, 0.6);
  --font-sans: "Outfit", system-ui, sans-serif;
  --font-display: var(--font-sans);
  --font-caveat: "Caveat", cursive;
  --font-sf: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Segoe UI", system-ui, sans-serif;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-image: 16px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  /* Vertical gap between stacked main sections (sum of adjacent paddings) */
  --space-section-gap: 120px;
  --max: 72rem;
  /* Dialog shell: same as .build-modal border-box width */
  --modal-max-width: 80rem;
  /*
    Elevated panel inside modals — matches .build-modal content box
    (dialog min(100vw - 2rem, 80rem) minus horizontal padding on the dialog).
  */
  --modal-panel-width: min(
    calc(100vw - 2rem - 2 * var(--space-md)),
    calc(var(--modal-max-width) - 2 * var(--space-md))
  );
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --bg-elevated: #ffffff;
  --surface: #f4f4f5;
  --border: #e4e4e7;
  --text: #171717;
  --text-secondary: #737373;
  --text-muted: var(--text-secondary);
  --text-display: #171717;
  --accent: #171717;
  --accent-soft: rgba(23, 23, 23, 0.08);
  --on-accent: #ffffff;
  --hero-dot-idle: #b8b8b8;
  --media-placeholder: #d4d4d8;
  --mix-bright: #ffffff;
  --modal-backdrop: rgba(15, 15, 15, 0.42);
  --shadow-modal: 0 20px 64px rgba(0, 0, 0, 0.1);
  --shadow-modal-lg: 0 24px 72px rgba(0, 0, 0, 0.12);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171717;
  --bg-elevated: #171717;
  --surface: #171717;
  --border: #262626;
  --text: #ffffff;
  --text-secondary: #aeaeae;
  --text-muted: var(--text-secondary);
  --accent: #ffffff;
  --accent-soft: rgba(255, 255, 255, 0.1);
  --on-accent: #0a0a0a;
  --text-display: #ffffff;
  --hero-dot-idle: #4a4a4a;
  --media-placeholder: #2c2c2c;
  --mix-bright: #ffffff;
  --modal-backdrop: rgba(0, 0, 0, 0.78);
  --shadow-modal: 0 24px 80px rgba(0, 0, 0, 0.55);
  --shadow-modal-lg: 0 28px 100px rgba(0, 0, 0, 0.6);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--space-md);
  background-color: var(--bg);
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  border-radius: var(--radius-image);
}

/* Prevent background scroll while a modal dialog is open */
html.scroll-locked {
  overflow: hidden;
}

html.scroll-locked body {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: var(--space-sm) var(--space-md);
  background: var(--accent);
  color: var(--on-accent);
  z-index: 100;
}

.skip-link:focus {
  left: var(--space-sm);
  top: var(--space-sm);
}

.shell {
  width: min(100% - var(--space-md) * 2, var(--max));
  margin-inline: auto;
}

/* Hero top bar — logo + theme only, no chrome */
.hero .site-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  width: min(100% - var(--space-md) * 2, var(--max));
  margin: 0 auto;
  padding: 0;
  border: none;
  background: none;
  box-sizing: border-box;
  pointer-events: auto;
}

.logo {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
  text-decoration: none;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  white-space: nowrap;
  transition: color 0.2s var(--ease);
  flex-shrink: 0;
}

.logo:hover {
  color: var(--accent);
}

/* Single control: matches .detail-back — border only, no fill */
.theme-toggle {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.theme-toggle svg {
  display: block;
  width: 22px;
  height: 22px;
}

/* Hero — full viewport on small screens; 70% viewport from tablet/desktop up; never shorter than 750px */
.hero {
  --hero-fold-line: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 750px;
  height: 100svh;
  height: 100dvh;
  padding-top: 40px;
  padding-bottom: 0;
  margin-top: 0;
  overflow: visible;
  box-sizing: border-box;
  position: relative;
  z-index: 0;
  background-color: var(--bg);
}

@media (min-width: 768px) {
  .hero {
    height: 70svh;
    height: 70dvh;
  }
}

/* Dot field — idle motion via CSS; cursor brightness / nudge via JS */
.hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-dot {
  position: absolute;
  width: 2px;
  height: 2px;
  margin-left: -1px;
  margin-top: -1px;
  will-change: transform;
}

.hero-dot-inner {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: var(--hero-dot-idle);
  animation: hero-dot-idle 15s ease-in-out infinite;
}

@keyframes hero-dot-idle {
  0%,
  100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(3px, -3.8px);
  }
  50% {
    transform: translate(-2.6px, 2.6px);
  }
  75% {
    transform: translate(3.4px, 1.3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-dot-inner {
    animation: none;
  }
}

.hero-inner {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: none;
  margin-inline: 0;
  overflow-x: visible;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

.hero-layout {
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100% - var(--space-md) * 2, var(--max));
  margin-inline: auto;
  overflow: visible;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  width: 100%;
  padding: var(--space-md);
  overflow: visible;
  box-sizing: border-box;
}

.hero-copy {
  width: 100%;
  max-width: min(100%, var(--max));
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

@media (max-width: 767px) {
  .hero-content {
    padding: var(--space-md) var(--space-sm);
  }
}

.hero-fold-line {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  width: 100%;
  height: 0;
  border: 0;
  border-top: var(--hero-fold-line);
  margin: 0;
}

.hero-title {
  container-type: inline-size;
  margin: 0 0 var(--space-lg);
  width: 100%;
  max-width: none;
  line-height: 1.05;
  text-align: center;
  color: var(--text-display);
}

.hero-title-line {
  display: block;
}

.hero-title-line--caveat {
  font-family: var(--font-caveat);
  font-size: clamp(1.75rem, 4.2vw, 2.65rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: var(--text-display);
}

.hero-title-line--caveat.hero-title-line--from-intent {
  font-size: clamp(2.75rem, 5.2vw, 5.75rem);
  font-size: clamp(2.75rem, 4.65cqw, 5.75rem);
  font-weight: 700;
  line-height: 1.05;
}

.hero-title-line--caveat.hero-title-line--from-intent {
  color: var(--text-secondary);
}

.hero-title-line--caveat.hero-title-line--from-intent em {
  position: relative;
  display: inline-block;
  padding-bottom: 0.06em;
  font-style: normal;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

/* Hand-drawn curve under “intent” — primary text color */
.hero-title-line--caveat.hero-title-line--from-intent em::after {
  content: "";
  position: absolute;
  left: -0.05em;
  right: -0.08em;
  bottom: 0.19em;
  height: 0.42em;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20240%2026%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M6%2011%20Q120%2019%20234%2011%22%20stroke%3D%22%23171717%22%20stroke-width%3D%2210%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: center bottom;
  transform: scaleY(-1);
  transform-origin: center bottom;
  pointer-events: none;
}

html[data-theme="dark"] .hero-title-line--caveat.hero-title-line--from-intent em::after {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20240%2026%22%20fill%3D%22none%22%3E%3Cpath%20d%3D%22M6%2011%20Q120%2019%20234%2011%22%20stroke%3D%22%23ffffff%22%20stroke-width%3D%2210%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");
}

.hero-title-line--sf {
  display: flex;
  justify-content: center;
  align-items: baseline;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin-top: 0.06em;
  padding-inline: var(--space-xs);
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  overflow: visible;
  font-family: var(--font-sf);
  font-size: clamp(3.25rem, 14.5vw, 8.5rem);
  font-size: clamp(3.25rem, min(14.5vw, 12.25cqw), 8.5rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 0.94;
  color: var(--text-display);
}

.hero-sf-row {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  flex-shrink: 0;
  max-width: none;
  white-space: nowrap;
  overflow: visible;
}

.hero-sf-row .hero-sf-to,
.hero-sf-row .hero-typewriter {
  flex-shrink: 0;
}

.hero-sf-to {
  letter-spacing: normal;
}

.hero-title > .hero-title-line--caveat {
  position: relative;
  z-index: 0;
}

@media (min-width: 480px) {
  .hero-title-line--caveat {
    white-space: nowrap;
  }
}

@media (max-width: 479px) {
  .hero-title-line--caveat.hero-title-line--from-intent {
    font-size: clamp(2.65rem, 18vw, 4.25rem);
  }

  .hero-title-line--sf {
    font-size: clamp(2.75rem, 11vw, 4.5rem);
  }
}

.hero-title-line--caveat:not(.hero-title-line--from-intent) em {
  font-family: inherit;
  font-style: normal;
  font-weight: 600;
  color: var(--text-display);
}

.hero-typewriter {
  position: relative;
  display: inline-block;
  vertical-align: baseline;
  max-width: none;
  margin-left: 0.22em;
  overflow: visible;
}

.hero-typewriter-word {
  color: var(--accent);
  font-weight: 900;
  display: inline-block;
  padding-right: 0.1em;
  white-space: nowrap;
}

.hero-typewriter-cursor {
  position: absolute;
  left: calc(100% + 0.12em);
  bottom: 0.12em;
  display: block;
  width: 0.52em;
  min-width: 12px;
  height: 0.11em;
  min-height: 3px;
  border-radius: 1px;
  background-color: var(--accent);
  animation: hero-typewriter-blink 1s steps(1, end) infinite;
  pointer-events: none;
}

@keyframes hero-typewriter-blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-typewriter-cursor {
    animation: none;
    opacity: 1;
  }
}

.hero-copy .hero-lede {
  max-width: min(40rem, 100%);
  margin: var(--space-lg) 0 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.hero-arrow {
  margin-top: var(--space-lg);
  color: var(--text);
  display: flex;
  justify-content: center;
  align-items: center;
  line-height: 0;
  text-decoration: none;
  transition: opacity 0.2s var(--ease);
}

.hero-arrow:hover {
  opacity: 0.82;
}

.hero-arrow:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

/* icons/arrow-down.svg — primary color via mask */
.hero-arrow-icon {
  display: block;
  width: 24px;
  height: 24px;
  background-color: var(--text);
  -webkit-mask: url("../icons/arrow-down.svg") no-repeat center / contain;
  mask: url("../icons/arrow-down.svg") no-repeat center / contain;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  border-radius: 9999px;
  border: 1px solid transparent;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease),
    color 0.2s var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 88%, var(--mix-bright));
  border-color: color-mix(in srgb, var(--accent) 88%, var(--mix-bright));
  color: var(--on-accent);
}

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Sections — 120px between adjacent blocks (60px bottom + 60px top); hero has no section padding */
.section {
  padding-block: calc(var(--space-section-gap) / 2);
  background-color: var(--bg);
}

main > .hero + .section {
  padding-top: var(--space-section-gap);
}

.section-head {
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 0;
  color: var(--text-secondary);
}

/* Work grid */
.work-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 24px;
  align-items: stretch;
}

.work-grid > li {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

@media (min-width: 640px) {
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

/* Case study links: image + title only, no card chrome */
.card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  transition: opacity 0.2s var(--ease);
}

a.card {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

a.card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: var(--radius);
}

.card:hover {
  opacity: 0.86;
}

@media (prefers-reduced-motion: reduce) {
  .card:hover {
    opacity: 1;
  }
}

.card-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  flex-shrink: 0;
  border-radius: var(--radius-image);
  border: 1px solid var(--border);
  background: var(--media-placeholder);
}

.card-media > picture {
  position: absolute;
  inset: 0;
  margin: 0;
  display: block;
}

.card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.card-title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: normal;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, var(--text-secondary) 45%, transparent);
  transition: color 0.2s var(--ease), text-decoration-color 0.2s var(--ease);
}

a.card:hover .card-title,
a.build-card:hover .card-title,
a.card:focus-visible .card-title,
a.build-card:focus-visible .card-title {
  color: var(--accent);
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
}

/* Approach */
.approach {
  background-color: var(--bg-elevated);
}

.build-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 24px;
  align-items: stretch;
}

.build-grid > li {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

@media (min-width: 720px) {
  .build-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (min-width: 1000px) {
  .build-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }
}

/* What I've built: image + title; no card chrome */
.build-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  transition: opacity 0.2s var(--ease);
}

a.build-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button.build-card {
  width: 100%;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  background: transparent;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

button.build-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

a.build-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: var(--radius);
}

a.build-card:hover {
  opacity: 0.86;
}

@media (prefers-reduced-motion: reduce) {
  a.build-card:hover {
    opacity: 1;
  }
}

/* Key strengths — flat cells; four columns on large (8 items → 4+4) */
.strengths-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 24px 24px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .strengths-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .strengths-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 32px 28px;
  }
}

.key-strengths .strength-card-icon {
  display: block;
  line-height: 0;
  margin-bottom: var(--space-sm);
}

/* icons/*.svg — primary via mask, 24×24 */
.key-strengths .strength-card-icon-img {
  display: block;
  width: 24px;
  height: 24px;
  background-color: var(--text);
}

.key-strengths .strength-card-icon-img--drafting-compass {
  -webkit-mask: url("../icons/drafting-compass.svg") no-repeat center / contain;
  mask: url("../icons/drafting-compass.svg") no-repeat center / contain;
}

.key-strengths .strength-card-icon-img--rocket {
  -webkit-mask: url("../icons/rocket.svg") no-repeat center / contain;
  mask: url("../icons/rocket.svg") no-repeat center / contain;
}

.key-strengths .strength-card-icon-img--users {
  -webkit-mask: url("../icons/users.svg") no-repeat center / contain;
  mask: url("../icons/users.svg") no-repeat center / contain;
}

.key-strengths .strength-card-icon-img--compass {
  -webkit-mask: url("../icons/compass.svg") no-repeat center / contain;
  mask: url("../icons/compass.svg") no-repeat center / contain;
}

.key-strengths .strength-card-icon-img--waypoints {
  -webkit-mask: url("../icons/waypoints.svg") no-repeat center / contain;
  mask: url("../icons/waypoints.svg") no-repeat center / contain;
}

.key-strengths .strength-card-icon-img--sprout {
  -webkit-mask: url("../icons/sprout.svg") no-repeat center / contain;
  mask: url("../icons/sprout.svg") no-repeat center / contain;
}

.key-strengths .strength-card-icon-img--cog {
  -webkit-mask: url("../icons/cog.svg") no-repeat center / contain;
  mask: url("../icons/cog.svg") no-repeat center / contain;
}

.key-strengths .strength-card-icon-img--sparkles {
  -webkit-mask: url("../icons/sparkles.svg") no-repeat center / contain;
  mask: url("../icons/sparkles.svg") no-repeat center / contain;
}

.key-strengths .strength-card-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: normal;
  color: var(--text);
}

.key-strengths .strength-card-desc {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-secondary);
}

@keyframes build-modal-backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes build-modal-panel-in {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Build / product detail modal */
.build-modal {
  margin: auto;
  padding: var(--space-md);
  border: none;
  max-width: var(--modal-max-width);
  width: calc(100vw - 2rem);
  max-height: calc(100vh - 2rem);
  background: transparent;
  overflow: visible;
}

.build-modal::backdrop {
  background: var(--modal-backdrop);
}

.build-modal[open]::backdrop {
  animation: build-modal-backdrop-in 0.34s var(--ease) forwards;
}

.build-modal-inner {
  position: relative;
  width: 100%;
  max-width: var(--modal-panel-width);
  margin-inline: auto;
  box-sizing: border-box;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-modal);
  max-height: min(90vh, 960px);
  will-change: opacity, transform;
}

.build-modal[open] .build-modal-inner {
  animation: build-modal-panel-in 0.42s var(--ease) forwards;
}

.build-modal-close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.build-modal-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.build-modal-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.build-modal-split {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 0;
  max-height: inherit;
}

@media (min-width: 768px) {
  .build-modal-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
    min-height: min(72vh, 720px);
  }
}

/* Flat placeholder — swap for a real image later */
.build-modal-media {
  min-width: 0;
  min-height: 16rem;
  width: 100%;
  background: var(--media-placeholder);
  border-radius: var(--radius-image) var(--radius-image) 0 0;
  overflow: hidden;
}

@media (min-width: 768px) {
  .build-modal-media {
    min-height: 0;
    height: 100%;
    align-self: stretch;
    border-radius: var(--radius-image) 0 0 var(--radius-image);
  }
}

.build-modal-main {
  padding: var(--space-lg);
  padding-top: var(--space-xl);
  overflow-y: auto;
  min-height: 0;
  max-height: inherit;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .build-modal-main {
    /* Tighter than mobile; still clears the close control (2.5rem) + top offset */
    padding-top: calc(var(--space-sm) + 2.5rem);
  }
}

.build-modal-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 900;
  margin: 0 0 var(--space-md);
  letter-spacing: -0.02em;
  color: var(--text-display);
  padding-right: 2.5rem;
}

.build-modal-body {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.build-modal-body p {
  margin: 0 0 var(--space-md);
}

.build-modal-body p:last-child {
  margin-bottom: 0;
}

.build-modal-stores {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.build-modal-store {
  margin: 0;
  padding: 0;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
  text-underline-offset: 0.2em;
  background: none;
  border: none;
  cursor: pointer;
  transition: text-decoration-color 0.2s var(--ease), color 0.2s var(--ease);
}

.build-modal-store:hover {
  text-decoration-color: color-mix(in srgb, var(--accent) 75%, transparent);
}

.build-modal-store:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .build-modal[open]::backdrop,
  .build-modal[open] .build-modal-inner {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }

  .build-modal-inner {
    will-change: auto;
  }
}

/* Case study modal — single column, large on desktop, fullscreen on small screens */
@keyframes case-modal-backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes case-modal-panel-in {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.case-modal {
  margin: 0;
  padding: 0;
  border: none;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  background: transparent;
  overflow: hidden;
}

.case-modal::backdrop {
  background: var(--modal-backdrop);
}

.case-modal[open]::backdrop {
  animation: case-modal-backdrop-in 0.34s var(--ease) forwards;
}

.case-modal-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100%;
  max-height: none;
  background: var(--bg-elevated);
  border: none;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  will-change: opacity, transform;
}

.case-modal[open] .case-modal-inner {
  animation: case-modal-panel-in 0.38s var(--ease) forwards;
}

@media (min-width: 768px) {
  /* Only when open — unscoped display:flex would override closed dialog display:none */
  .case-modal[open] {
    margin: 0;
    padding: var(--space-md);
    position: fixed;
    inset: 0;
    width: auto;
    max-width: none;
    height: auto;
    min-height: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .case-modal-inner {
    width: min(100%, var(--modal-panel-width));
    max-width: var(--modal-panel-width);
    min-height: 0;
    max-height: min(
      calc(100dvh - 2 * var(--space-md)),
      1200px
    );
    height: min(
      calc(100dvh - 2 * var(--space-md)),
      1200px
    );
    flex-shrink: 0;
    box-sizing: border-box;
    margin-inline: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-modal-lg);
  }
}

.case-modal-close {
  position: absolute;
  top: max(var(--space-sm), env(safe-area-inset-top));
  right: max(var(--space-sm), env(safe-area-inset-right));
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.case-modal-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.case-modal-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.case-modal-scroll {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.case-modal-header {
  flex-shrink: 0;
  padding: calc(var(--space-lg) + 2rem) var(--space-md) var(--space-md);
  padding-left: max(var(--space-md), env(safe-area-inset-left));
  padding-right: max(var(--space-md), env(safe-area-inset-right));
  border-bottom: 1px solid var(--border);
}

@media (min-width: 768px) {
  .case-modal-header {
    padding: var(--space-md) var(--space-lg);
    padding-top: calc(var(--space-sm) + 2.5rem);
  }
}

.case-modal-title {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 2.8vw, 2.125rem);
  font-weight: 900;
  margin: 0;
  letter-spacing: -0.02em;
  color: var(--text-display);
  padding-right: 2.75rem;
}

.case-modal-sections {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.case-section {
  width: 100%;
  margin: 0;
}

/* One separator: only before a titled text block (the line sits above the heading). */
.case-section--text:has(.case-section-heading) {
  border-top: 1px solid var(--border);
  margin-top: 60px;
  padding-top: 60px;
}

/* Top spacing for the heading is folded into padding-top above; avoid doubling with inner. */
.case-section--text:has(.case-section-heading) .case-section-inner {
  padding-top: 0;
}

.case-modal-sections > .case-section--text:has(.case-section-heading):first-child .case-section-inner,
.detail-page-sections > .case-section--text:has(.case-section-heading):first-child .case-section-inner {
  padding-top: var(--space-lg);
}

/* Detail article: the full-bleed rule in .detail-page-sections::before already separates
   the first section from the page header — don’t double up when that block opens with a title. */
.case-modal-sections > .case-section--text:has(.case-section-heading):first-child,
.detail-page-sections > .case-section--text:has(.case-section-heading):first-child {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.case-section-inner {
  width: 100%;
  max-width: none;
  padding: var(--space-lg) var(--space-md);
  padding-left: max(var(--space-md), env(safe-area-inset-left));
  padding-right: max(var(--space-md), env(safe-area-inset-right));
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .case-section-inner {
    padding: var(--space-lg);
  }
}

.case-section--text .case-section-body {
  max-width: 600px;
  margin-inline: auto;
  text-align: left;
  color: var(--text);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.65;
}

.case-section--text .case-section-body p {
  margin: 0 0 var(--space-md);
}

.case-section--text .case-section-body p:last-child {
  margin-bottom: 0;
}

.case-section-body-list {
  margin: 0 0 var(--space-md);
  padding-left: 1.25em;
  color: var(--text);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.65;
}

.case-section-body-list:last-child {
  margin-bottom: 0;
}

.case-section-body-list li {
  margin-bottom: 0.5em;
}

.case-section-body-list li:last-child {
  margin-bottom: 0;
}

.case-section-heading {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 var(--space-sm);
  letter-spacing: -0.02em;
  color: var(--text);
}

.case-section--text .case-section-heading {
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: normal;
  color: var(--text);
}

.case-section-figure {
  margin: 0;
  width: 100%;
  padding: 0;
}

/* detail-content.js: image.maxWidth (px); centered, capped like the text column */
.case-section--image .case-section-figure.case-section-figure--max {
  max-width: var(--case-figure-max, 600px);
  width: 100%;
  margin-inline: auto;
  box-sizing: border-box;
}

.case-section-figure-caption {
  margin-top: 0.5rem;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-secondary);
}

.case-section-image-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--case-image-row-gap, 16px);
  width: 100%;
  margin: 0;
  padding: 0 0 16px;
  box-sizing: border-box;
}

.case-section-figure--row-cell {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
}

.case-section-figure--row-cell img {
  width: 100%;
  height: auto;
}

@media (max-width: 52rem) {
  .case-section-image-row {
    flex-direction: column;
  }

  .case-section-figure--row-cell {
    flex: none;
    width: 100%;
  }
}

.case-section--image .case-section-figure,
.case-section--video .case-section-figure {
  padding-bottom: 16px;
}

.case-section-figure img,
.case-section-figure .case-section-video {
  display: block;
  max-width: 100%;
  height: auto;
  vertical-align: middle;
  border: 0;
  outline: none;
  box-shadow: none;
}

.case-section-figure img {
  width: 100%;
}

/* Intrinsic size; center when narrower than the content column */
.case-section-figure .case-section-video {
  width: auto;
  margin-inline: auto;
  border-radius: var(--radius-image);
  object-fit: contain;
  background: var(--media-placeholder);
}

.case-section-placeholder {
  width: 100%;
  min-height: 12rem;
  background: var(--media-placeholder);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius-image);
  overflow: hidden;
}

.case-section--image .case-section-inner,
.case-section--video .case-section-inner,
.case-section--imageRow .case-section-inner {
  padding: 0;
}

.case-section--image .case-section-placeholder,
.case-section--video .case-section-placeholder {
  border: none;
  min-height: clamp(12rem, 40vw, 22rem);
}

@media (prefers-reduced-motion: reduce) {
  .case-modal[open]::backdrop,
  .case-modal[open] .case-modal-inner {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }

  .case-modal-inner {
    will-change: auto;
  }
}

/* Testimonials — 2-column masonry (CSS columns; cards avoid column breaks) */
.testimonial-card {
  margin: 0;
  padding: var(--space-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-image);
  display: flex;
  flex-direction: column;
}

.strength-card {
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.testimonial-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  column-count: 1;
  column-gap: 24px;
  column-fill: balance;
}

.testimonial-grid > li {
  break-inside: avoid;
  page-break-inside: avoid;
  -webkit-column-break-inside: avoid;
  margin-bottom: 24px;
}

@media (min-width: 720px) {
  .testimonial-grid {
    column-count: 2;
    column-gap: 24px;
  }

  .testimonial-grid > li {
    margin-bottom: 24px;
  }
}

.testimonial-quote {
  margin: 0;
  padding: 0;
}

.testimonial-quote p {
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
}

.testimonial-quote p + p {
  margin-top: 0.75em;
}

.testimonial-attribution {
  margin-top: var(--space-md);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
}

.testimonial-portrait-wrap {
  flex-shrink: 0;
  display: block;
  line-height: 0;
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--media-placeholder);
}

.testimonial-portrait {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 50%;
}

.testimonial-byline {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.testimonial-name {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

a.testimonial-name {
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, var(--text-secondary) 45%, transparent);
  transition: color 0.2s var(--ease), text-decoration-color 0.2s var(--ease);
}

a.testimonial-name:hover {
  color: var(--accent);
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
}

a.testimonial-name:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.testimonial-role {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--text-secondary);
}

/* About (homepage) */
.about-teaser-grid {
  display: grid;
  gap: var(--space-lg);
  align-items: stretch;
}

@media (min-width: 768px) {
  .about-teaser-grid {
    grid-template-columns: minmax(200px, 320px) minmax(0, 1fr);
    gap: var(--space-xl);
    align-items: stretch;
  }
}

.about-teaser-photo-wrap {
  margin: 0;
  border-radius: var(--radius-image);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  aspect-ratio: 1922 / 2642;
  max-width: 20rem;
}

@media (min-width: 768px) {
  .about-teaser-photo-wrap {
    margin-inline: 0 auto;
    max-width: none;
    width: 100%;
    height: 100%;
    min-height: 0;
    align-self: stretch;
    aspect-ratio: auto;
  }
}

.about-teaser-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-teaser-content {
  min-width: 0;
  width: 100%;
}

.about-body p {
  margin: 0 0 var(--space-md);
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
}

.about-body p:last-child {
  margin-bottom: 0;
}

.about-inline-link {
  font-size: 18px;
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--text-secondary) 45%, transparent);
  text-underline-offset: 0.2em;
  transition: color 0.2s var(--ease), text-decoration-color 0.2s var(--ease);
}

.about-inline-link:hover {
  color: var(--accent);
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
}

.about-inline-link:focus-visible {
  color: var(--accent);
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.about-experience-grid {
  list-style: none;
  margin: var(--space-lg) 0 0;
  padding: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.about-xp-card {
  height: 100%;
  margin: 0;
  padding: var(--space-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-image);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.about-xp-co {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text);
  line-height: 1.35;
}

.about-xp-co .about-inline-link {
  font-weight: 400;
}

.about-xp-role {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.about-xp-meta {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
}

@media (max-width: 480px) {
  .about-xp-card {
    padding: var(--space-sm);
  }
}

/* Connect */
.section.contact {
  padding-block: calc(var(--space-section-gap) / 2);
}

.connect-heading {
  margin: 0 0 16px;
}

.connect-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex-wrap: nowrap;
  gap: 0.5em;
  line-height: 1.6;
  list-style: none;
  margin: 0;
  padding: 0;
}

.connect-links li {
  margin: 0;
}

.connect-links a {
  font-size: 16px;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, var(--text-secondary) 45%, transparent);
  transition: color 0.2s var(--ease), text-decoration-color 0.2s var(--ease);
}

.connect-links a:hover {
  color: var(--accent);
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
}

.connect-links a:focus-visible {
  color: var(--accent);
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Footer */
.site-footer {
  padding-top: var(--space-lg);
  padding-bottom: 40px;
  margin-top: var(--space-md);
}

.footer-inner {
  display: flex;
  justify-content: flex-start;
}

.footer-copy {
  margin: 0;
  font-size: 16px;
  color: var(--text-secondary);
}

/* Everything below the hero: 16px Outfit (sections, footer, modals) */
main > section:not(.hero),
main > section:not(.hero) * {
  font-family: var(--font-sans);
  font-size: 1rem;
}

main > section:not(.hero) h2 {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

main > section:not(.hero) h3 {
  font-weight: 600;
  letter-spacing: normal;
}

main > section:not(.hero) h3.card-title {
  font-size: 18px;
  font-weight: 400;
}

main > section:not(.hero) .testimonial-quote p {
  font-size: 18px;
}

main > section:not(.hero) .about-body p {
  font-size: 18px;
}

main > section:not(.hero) .about-inline-link {
  font-size: 18px;
}

main > section:not(.hero) .about-xp-co .about-inline-link {
  font-size: 16px;
}

main > section:not(.hero) .connect-links a {
  font-size: 16px;
}

main > section:not(.hero) .testimonial-name,
main > section:not(.hero) .testimonial-role {
  font-size: 16px;
}

main > section:not(.hero) .about-xp-co,
main > section:not(.hero) .about-xp-role,
main > section:not(.hero) .about-xp-meta {
  font-size: 14px;
}

.site-footer,
.site-footer * {
  font-family: var(--font-sans);
  font-size: 1rem;
}

.site-footer .footer-copy {
  font-size: 16px;
}

.build-modal,
.build-modal *,
.case-modal,
.case-modal * {
  font-family: var(--font-sans);
  font-size: 1rem;
}

.build-modal-title,
.case-modal-title,
.case-section-heading {
  font-weight: 600;
  letter-spacing: normal;
}

/* Standalone case / build detail pages */
.detail-page-body {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--bg);
  /* Full-bleed separator uses width: 100vw; vw includes scrollbar width and is often
     slightly wider than the layout viewport, which triggers a horizontal scrollbar. */
  overflow-x: hidden;
}

.detail-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-top: 24px;
  box-sizing: border-box;
}

.detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - var(--space-md) * 2, var(--max));
  margin: 0 auto;
  padding: var(--space-sm) 0;
  box-sizing: border-box;
  position: sticky;
  top: 0;
  z-index: 40;
  background-color: var(--bg);
  transition: padding 0.2s var(--ease);
}

/* After scroll: tighter vertical padding so the sticky chrome is not as tall */
.detail-page--scrolled .detail-topbar {
  padding-top: 16px;
  padding-bottom: 12px;
}

.detail-back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.detail-back:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.detail-back:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

html[data-theme="light"] .detail-back {
  background: transparent;
}

.detail-page-main {
  flex: 1;
  width: min(100% - var(--space-md) * 2, var(--max));
  margin: 0 auto;
  padding: 60px 0 var(--space-2xl);
  box-sizing: border-box;
}

.detail-page-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md) var(--space-xl);
  align-items: start;
  margin-bottom: 60px;
}

/* No empty column when subtitle is still hidden or absent */
.detail-page-header:not(:has(.detail-page-lede:not([hidden]))) {
  grid-template-columns: 1fr;
}

.detail-page-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.75rem);
  font-weight: 900;
  margin: 0;
  letter-spacing: -0.02em;
  color: var(--text-display);
  line-height: 1.15;
  max-width: 22em;
}

.detail-page-lede {
  margin: 0;
  max-width: none;
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-secondary);
  white-space: pre-line;
}

@media (max-width: 52rem) {
  .detail-page-header {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

/* Full-bleed separator line; 60px below line before content */
.detail-page-sections,
.detail-build-wrap {
  position: relative;
  border-top: none;
  padding-top: 60px;
}

.detail-page-sections::before,
.detail-build-wrap::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  /* 100dvw avoids classic 100vw including scrollbar width (main overflow fix). Fallback for older engines. */
  width: 100vw;
  width: 100dvw;
  height: 1px;
  background-color: var(--border);
  pointer-events: none;
}

.detail-build-wrap {
  max-width: 42rem;
}

.detail-page-main .detail-build-wrap + .detail-page-sections {
  margin-top: 60px;
}

.detail-page-footer {
  margin-top: auto;
  padding-top: var(--space-xl);
}
