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

:root {
  color-scheme: light;
  --guide-muted: #505052;
  --guide-wash: #f7f7f9;
  --guide-accent: #4d3e93;
  --guide-lavender: #e9e5fa;
  --guide-confirm: #245a2b;
}

body {
  margin: 0;
  background: var(--lp-white);
  color: var(--lp-ink);
  font: 400 1rem/1.6 var(--lp-font);
}

img { display: block; max-width: 100%; }
p, figure, h1, h2, h3, dd { margin: 0; }
a { color: inherit; text-underline-offset: 0.19em; overflow-wrap: anywhere; }
a:focus-visible { outline: 2px solid var(--guide-accent); outline-offset: 4px; }
h1, h2, h3 { font-weight: 500; line-height: 1.08; }
h1 { font-size: clamp(2.8rem, 6.4vw, 5.6rem); letter-spacing: -0.062em; max-width: 9.5ch; }
h2 { font-size: clamp(2.05rem, 4.1vw, 3.5rem); letter-spacing: -0.052em; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); letter-spacing: -0.035em; }
strong, th { font-weight: 600; }

.skip-link {
  position: absolute;
  z-index: 4;
  top: 0.5rem;
  left: 0.5rem;
  transform: translateY(calc(-100% - 1rem));
  background: var(--lp-ink);
  color: var(--lp-white);
  padding: 0.5rem 0.75rem;
}
.skip-link:focus { transform: none; }

.wrap { width: min(calc(100% - 3rem), 72rem); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--lp-ink-12); }
@media (min-width: 721px) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 3;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  section[id] { scroll-margin-top: 4rem; }
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; padding-block: 1rem; }
.brand { flex: none; }
.brand img { width: 100px; height: auto; }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem clamp(1rem, 3vw, 2.25rem); }
nav a { color: var(--guide-muted); font-size: 0.875rem; font-weight: 500; text-decoration: none; }
nav a:hover { color: var(--lp-ink); text-decoration: underline; }

.hero {
  padding-block: clamp(2.5rem, 6.6vw, 6.25rem) clamp(2.75rem, 5vw, 4.5rem);
  background: radial-gradient(ellipse at 85% 0%, var(--lp-mesh-mist), transparent 57%), var(--lp-white);
}
.hero-grid, .split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(1.5rem, 5vw, 4.5rem); }
.hero-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
.section-label { color: var(--guide-accent); font-size: 0.875rem; font-weight: 600; margin-bottom: 0.875rem; }
.section-label.role {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  background: var(--guide-lavender);
  border-radius: var(--lp-r-pill);
}
.intro { max-width: 35ch; margin-top: 1.5rem; font-size: clamp(1.08rem, 2vw, 1.25rem); color: var(--guide-muted); }
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 1.75rem;
  padding: 0.65rem 1.15rem;
  background: var(--lp-ink);
  color: var(--lp-white);
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--lp-r-pill);
}
.button:hover { background: #323232; }
.button span { color: var(--lp-acid); }
.hero-image { overflow: hidden; border-radius: var(--lp-r-card); background: var(--guide-lavender); }
.hero-image img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.responsibilities {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem clamp(1.5rem, 5vw, 4.5rem);
  margin: clamp(2.5rem, 6vw, 4.5rem) 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--lp-ink-12);
}
.responsibilities dt { font-size: 1.125rem; font-weight: 600; }
.responsibilities dd { color: var(--guide-muted); margin-top: 0.4rem; max-width: 49ch; }

.section { padding-block: clamp(2.75rem, 6vw, 5.5rem); }
.section-wash { background: var(--guide-wash); }
.flow-figure { margin-block: 2rem; }
.flow-figure > figcaption { font-weight: 600; margin-bottom: 0.65rem; }
.start-flow { list-style: none; margin: 0; padding: 0; }
.start-flow li + li::before {
  position: absolute;
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-right: 1.5px solid var(--guide-accent);
  border-top: 1.5px solid var(--guide-accent);
  top: calc(50% - 0.275rem);
  left: -1.2rem;
  transform: rotate(45deg);
}

.diagram { margin-block: 1.5rem; }
.diagram > figcaption:last-child { margin-top: 0.65rem; color: var(--guide-muted); font-size: 0.875rem; }
.dg-scroll { overflow-x: auto; }
.dg-scroll:focus-visible { outline: 2px solid var(--guide-accent); outline-offset: 4px; }
.dg { display: block; width: 100%; height: auto; color: var(--lp-ink); font-family: var(--lp-font); }
.dg-wide { min-width: 44rem; }
.dg-ln { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.dg-surface { fill: var(--lp-white); stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.dg-outline { fill: none; stroke: currentColor; stroke-width: 1.5; }
.dg-rail { fill: none; stroke: var(--lp-ink-30); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.dg-pad { fill: none; stroke: var(--lp-ink-12); stroke-width: 1.5; }
.dg-ink { fill: currentColor; }
.dg-ghost { fill: var(--lp-ink-12); }
.dg-white { fill: var(--lp-white); }
.dg-wash { fill: var(--guide-wash); }
.dg-acid { fill: var(--lp-acid); }
.dg-soft { fill: var(--guide-lavender); }
.dg-flow { fill: none; stroke: var(--guide-accent); stroke-width: 1.5; stroke-linecap: round; }
.dg-dash { stroke-dasharray: 4 5; }
.dg-thick { stroke-width: 3; }
.dg-flow-fill { fill: var(--guide-accent); }
.dg text { fill: currentColor; font-size: 13px; }
.dg .dg-lbl { font-weight: 600; }
.dg .dg-small { font-size: 12px; }
.dg .dg-sub { fill: var(--guide-muted); font-size: 12px; }
.dg .dg-edge { fill: var(--guide-accent); font-size: 11.5px; font-weight: 600; }
.dg .dg-tiny { font-size: 10px; font-weight: 600; }
.dg .dg-ok { fill: var(--guide-confirm); font-size: 11.5px; font-weight: 500; }
.dg .dg-badge-t { fill: var(--lp-white); font-size: 11px; font-weight: 600; }

.body-copy, .instructions, .audience-grid p { max-width: 58ch; }
.instructions { margin: 1rem 0 0; padding-inline-start: 1.45rem; }
.instructions li + li { margin-top: 0.5rem; }
.instructions li::marker { font-weight: 600; color: var(--guide-accent); }
.illustration {
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: var(--lp-r-card);
  background: var(--lp-white);
  border: 1px solid var(--lp-ink-12);
}
.sound-label { display: block; margin-bottom: 0.6rem; font-weight: 600; }
.device {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  max-width: 23rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--lp-ink-12);
  border-radius: var(--lp-r-item);
}
.device span { color: var(--guide-muted); }
.meter { display: flex; gap: clamp(0.12rem, 0.55vw, 0.4rem); margin-block: 1rem 0.75rem; }
.meter span { flex: 1; height: 0.65rem; background: #e9e9eb; border-radius: 0.15rem; }
.meter span:nth-child(-n+10) { background: var(--lp-acid); }
.sound-pass { color: var(--guide-confirm); font-weight: 500; }
.sound-pass span { margin-right: 0.25rem; }
.sound-check figcaption, .audience-example figcaption { margin-top: 0.65rem; color: var(--guide-muted); font-size: 0.875rem; }

.start-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.25rem; margin-top: 2rem; }
.start-flow li { position: relative; padding-top: 1rem; border-top: 2px solid var(--guide-lavender); }
.start-flow li:last-child { border-color: var(--lp-acid); }
.start-flow li + li::before { top: 1.45rem; left: -1.4rem; }
.phase { font-size: 0.875rem; font-weight: 600; color: var(--guide-accent); margin-bottom: 0.55rem; }
.start-flow h3 { margin-bottom: 0.65rem; }
.start-flow h3 + p { color: var(--guide-muted); }
.running-title { margin-top: 2.5rem; }
.running { max-width: 68ch; margin: 0.85rem 0 0; padding-inline-start: 1.2rem; color: var(--guide-muted); }
.running li + li { margin-top: 0.5rem; }
.running li::marker { color: var(--guide-accent); }
.running strong { color: var(--lp-ink); }
.note { max-width: 58ch; margin-top: 1rem; color: var(--guide-muted); font-size: 0.875rem; }
.trouble-lead, .lead { margin-top: 1rem; color: var(--guide-muted); }
.laptop-split { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); margin-top: 1.5rem; }
.laptop-split .checklist { margin-top: 0; }
.laptop-figure { margin-block: 0; }
.checklist { max-width: 68ch; margin-top: 1.5rem; }
.path { color: var(--lp-ink); font-weight: 500; }
.checklist li + li { margin-top: 0.7rem; }
.os-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 3vw, 2rem); margin-top: 2rem; }
.os-card { padding: clamp(1.1rem, 3vw, 1.75rem); background: var(--guide-wash); border-radius: var(--lp-r-card); }
.os-card dl { margin: 0.9rem 0 0; }
.os-card dt { font-weight: 600; margin-top: 0.8rem; }
.os-card dd { color: var(--guide-muted); }

.audience-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); margin-top: 1.75rem; }
.script-label { margin-top: 1.4rem; font-weight: 600; }
blockquote {
  margin: 0.45rem 0 0;
  padding-inline-start: 1rem;
  border-inline-start: 3px solid var(--guide-accent);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.5;
}
.audience-slide {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(6.25rem, 1fr);
  align-items: center;
  gap: clamp(0.7rem, 2vw, 1.4rem);
  padding: clamp(1rem, 4vw, 2rem);
  background: var(--lp-ink);
  border-radius: var(--lp-r-card);
  color: var(--lp-white);
}
.sample-title { margin-bottom: 0.5rem; font-size: clamp(1.25rem, 2.5vw, 2rem); line-height: 1.1; font-weight: 500; letter-spacing: -0.04em; }
.sample-code { margin-top: 0.75rem; color: var(--lp-acid); font-weight: 600; }
.sample-field { color: #d8d8da; font-size: 0.875rem; font-weight: 400; }
.qr-slot {
  display: grid;
  place-items: center;
  text-align: center;
  aspect-ratio: 1;
  background: var(--lp-white);
  color: var(--guide-muted);
  border-radius: 0.55rem;
  padding: 0.55rem;
  font-size: 0.875rem;
}

table { width: 100%; margin-top: 1.75rem; border-collapse: collapse; text-align: left; }
th, td { padding: 0.85rem 1rem 0.85rem 0; border-bottom: 1px solid var(--lp-ink-12); vertical-align: top; }
thead { color: var(--guide-accent); font-size: 0.875rem; }
tbody th { width: 32%; }
.help { margin-top: 1.25rem; color: var(--guide-muted); }

@media (max-width: 720px) {
  .wrap { width: calc(100% - 2rem); }
  .header-inner { flex-wrap: wrap; }
  .hero-grid, .split, .responsibilities, .start-flow, .os-grid { grid-template-columns: 1fr; }
  .hero-image { max-width: 38rem; }
  .start-flow { gap: 1.25rem; }
  .start-flow li + li::before { display: none; }
}

@media print {
  .site-header nav, .skip-link, .button { display: none; }
  .site-header { position: static; }
  .dg-wide { min-width: 0; }
  .section, .hero { padding-block: 1.4rem; }
  .hero-image, .flow-figure, .sound-check, .audience-example, .diagram, .running li, .checklist li, .os-card, tr { break-inside: avoid; }
  .audience-slide, .meter, .dg, .section-label.role { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
