:root {
  --paper: #efebe3;
  --canvas: #f7f4ed;
  --card: #fbf9f4;
  --ink: #1c1914;
  --muted: #6a655c;
  --subtle: #8a8478;
  --line: #d8d0c2;
  --line-strong: #c4baa8;
  --sea: #243d42;
  --sea-deep: #1c2a2e;
  --sea-fg: #f4efe6;
  --sage: #5d6e5e;
  --sage-soft: #dfe6d8;
  --risk: #8f2d2d;
  --warn: #7a5a20;
  --ok: #2a5a45;
  --shadow: 0 1px 0 rgba(28, 25, 20, 0.04), 0 8px 24px -16px rgba(28, 25, 20, 0.18);
  --font-sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-display: "Noto Serif SC", "Songti SC", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --max: 1120px;
  --gutter: 24px;
  --shot-shadow: 0 1px 0 rgba(28, 25, 20, 0.04), 0 10px 28px -14px rgba(28, 42, 46, 0.22);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--sea);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  text-wrap: balance;
  margin: 0 0 0.6em;
}

p {
  text-wrap: pretty;
}

.wrap {
  width: min(var(--max), calc(100% - (var(--gutter) * 2)));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in oklab, var(--paper) 88%, white);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
}

.brand strong {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand span {
  display: block;
  font-size: 11px;
  color: var(--subtle);
}

nav {
  display: flex;
  gap: 22px;
  font-size: 14px;
}

nav a {
  color: var(--muted);
}

nav a:hover,
nav a.active {
  color: var(--ink);
  text-decoration: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  border: 0;
  cursor: pointer;
}

.btn-primary {
  background: var(--sea);
  color: var(--sea-fg);
}

.btn-ghost {
  background: var(--card);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

.hero {
  position: relative;
  min-height: 72vh;
  display: grid;
  align-items: end;
  color: var(--sea-fg);
  overflow: hidden;
}

.hero img.bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(28, 42, 46, 0.18) 0%, rgba(28, 42, 46, 0.82) 100%);
}

.hero .wrap {
  position: relative;
  z-index: 1;
  padding: 80px 0 56px;
}

.kicker {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--subtle);
  font-weight: 500;
  margin-bottom: 8px;
}

.hero .kicker {
  color: color-mix(in oklab, var(--sea-fg) 70%, transparent);
}

.hero h1 {
  font-size: clamp(36px, 5vw, 58px);
  max-width: 16em;
}

.hero p.lead {
  max-width: 40em;
  font-size: 18px;
  color: color-mix(in oklab, var(--sea-fg) 86%, transparent);
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

section {
  padding: 72px 0;
}

.section-head {
  max-width: 40em;
  margin-bottom: 36px;
}

.grid-2 {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr 1fr;
}

.grid-3 {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, 1fr);
}

.card {
  background: var(--card);
  border-radius: 12px;
  padding: 22px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.card h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.muted {
  color: var(--muted);
}

.subtle {
  color: var(--subtle);
  font-size: 13px;
}

ol.questions {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: q;
}

ol.questions li {
  counter-increment: q;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

ol.questions li::before {
  content: counter(q, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--sage);
  padding-top: 4px;
}

.quote {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.45;
  max-width: 22em;
}

.module,
.doc-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
  margin-block: 40px;
}

.shot-stack {
  display: grid;
  gap: 20px;
}

.shot {
  margin: 0;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line-strong, var(--line));
  box-shadow: var(--shot-shadow);
  padding: 8px 8px 0;
}

.shot::before {
  content: "";
  display: block;
  height: 10px;
  margin: 0 4px 8px;
  border-radius: 6px 6px 0 0;
  background:
    radial-gradient(circle at 8px 50%, #c4baa8 3.5px, transparent 4px),
    radial-gradient(circle at 20px 50%, #c4baa8 3.5px, transparent 4px),
    radial-gradient(circle at 32px 50%, #c4baa8 3.5px, transparent 4px);
}

.shot img {
  width: 100%;
  height: auto;
  aspect-ratio: 1280 / 960;
  object-fit: cover;
  object-position: top left;
  border-radius: 6px 6px 0 0;
  cursor: zoom-in;
  display: block;
}

.shot figcaption {
  font-size: 12px;
  color: var(--subtle);
  padding: 10px 8px 12px;
  margin: 0;
}

.shot:hover {
  box-shadow: 0 1px 0 rgba(28, 25, 20, 0.04), 0 12px 32px -14px rgba(28, 42, 46, 0.28);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(28, 42, 46, 0.9);
  cursor: zoom-out;
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: min(1280px, 96vw);
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  background: var(--card);
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  font-size: 22px;
  cursor: pointer;
}

body.lightbox-open {
  overflow: hidden;
}

.module h3 .num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--subtle);
  margin-right: 8px;
}

.flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.flow span {
  background: var(--sea-deep);
  color: var(--sea-fg);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
}

.split-photo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.split-photo img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line);
}

th,
td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 12px;
  color: var(--subtle);
  font-weight: 500;
}

.manual-toc {
  columns: 2;
  gap: 32px;
}

.manual-toc a {
  display: block;
  padding: 4px 0;
  color: var(--ink);
}

.steps {
  padding-left: 18px;
}

.table-scroll {
  overflow-x: auto;
}

footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 48px;
  color: var(--muted);
  font-size: 13px;
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.menu-btn {
  display: none;
  background: none;
  border: 0;
  font-size: 14px;
  color: var(--ink);
}

@media (min-width: 1024px) {
  :root {
    --max: 1120px;
    --gutter: 64px;
  }

  .module {
    grid-template-columns: minmax(260px, 1fr) minmax(280px, 0.92fr);
    gap: 72px;
    align-items: center;
    margin-block: 56px;
  }

  .module.reverse {
    grid-template-columns: minmax(280px, 0.92fr) minmax(260px, 1fr);
  }

  .module.reverse .copy {
    order: 2;
  }

  .doc-block {
    grid-template-columns: minmax(260px, 1fr) minmax(280px, 0.92fr);
    gap: 72px;
    align-items: start;
  }

  .shot {
    max-width: 560px;
    justify-self: end;
  }

  .module.reverse .shot {
    justify-self: start;
  }
}

@media (min-width: 1280px) {
  :root {
    --gutter: 88px;
  }
}

@media (max-width: 1023px) {
  .grid-2,
  .grid-3,
  .split-photo {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 56vh;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero-actions {
    flex-wrap: wrap;
  }

  .quote {
    font-size: 22px;
  }

  section {
    padding: 48px 0;
  }
}

@media (max-width: 767px) {
  nav {
    display: none;
  }

  nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    right: 16px;
    background: var(--card);
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
  }

  .menu-btn {
    display: inline-flex;
  }

  .manual-toc {
    columns: 1;
  }

  :root {
    --gutter: 16px;
  }
}
