:root {
  --aqua: #e0f6ff;
  --aqua-2: #bfeaf6;
  --ocean: #006994;
  --deep: #003d5b;
  --abyss: #002a40;
  --ink: #062c3d;
  --paper: rgba(245, 252, 255, .9);
  --paper-solid: #f5fcff;
  --line: rgba(0, 78, 112, .24);
  --glow: #70e6d1;
  --focus: #ffbe55;
  --display: "Fraunces", Georgia, serif;
  --body: "Literata", Georgia, serif;
  --label: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 8px;
  --section: clamp(4rem, 8vw, 8rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, var(--aqua) 0%, #bfeaf6 26%, var(--ocean) 68%, var(--deep) 100%);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; }
button, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.c-skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; transform: translateY(-160%); padding: 10px 16px; min-height: 44px; background: var(--abyss); color: white; border-radius: var(--radius); }
.c-skip-link:focus { transform: translateY(0); }
.c-depth { position: fixed; inset: 0; pointer-events: none; z-index: -2; }
.c-depth--far { background: radial-gradient(circle at 14% 13%, rgba(255,255,255,.72), transparent 24%), radial-gradient(circle at 76% 42%, rgba(112,230,209,.18), transparent 25%); filter: blur(20px); }
.c-depth--near { background: radial-gradient(ellipse at 100% 74%, rgba(0,37,59,.35), transparent 46%), radial-gradient(ellipse at 4% 84%, rgba(0,52,78,.28), transparent 44%); filter: blur(42px); }
.c-bubbles { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.c-bubbles i { position: absolute; bottom: -48px; left: 8%; width: 18px; height: 18px; border: 1px solid rgba(255,255,255,.54); border-radius: 50%; opacity: 0; animation: bubble-rise 14s linear infinite; }
.c-bubbles i:nth-child(2) { left: 32%; width: 9px; height: 9px; animation-delay: 3s; animation-duration: 18s; }
.c-bubbles i:nth-child(3) { left: 72%; width: 24px; height: 24px; animation-delay: 6s; animation-duration: 20s; }
.c-bubbles i:nth-child(4) { left: 91%; width: 12px; height: 12px; animation-delay: 9s; animation-duration: 16s; }

.c-site-head { width: min(1280px, calc(100% - 48px)); margin: 0 auto; padding: 24px 0 0; display: grid; grid-template-columns: 280px 1fr; gap: 32px; align-items: center; position: relative; z-index: 5; }
.c-wordmark { min-height: 52px; display: grid; grid-template-columns: 44px 1fr; grid-template-rows: 26px 20px; column-gap: 10px; align-items: center; text-decoration: none; font-family: var(--label); }
.c-wordmark span { grid-row: 1 / 3; display: grid; place-items: center; width: 44px; height: 44px; color: white; background: var(--deep); border-radius: 50% 50% 44% 56%; font: 700 14px/1 var(--mono); letter-spacing: -.04em; }
.c-wordmark b { font-size: 16px; line-height: 1.1; }
.c-wordmark small { font-size: 16px; letter-spacing: .04em; text-transform: uppercase; }
.c-tabs { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px; font-family: var(--label); }
.c-tabs a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 13px; font-size: 16px; font-weight: 600; text-decoration: none; border-radius: 999px; border: 1px solid transparent; transition: transform 300ms, background-color 300ms, border-color 300ms; }
.c-tabs a:hover { transform: scale(1.03); border-color: var(--line); background: rgba(255,255,255,.45); }
.c-tabs a[aria-current="page"] { background: var(--deep); color: white; }

.c-hero { width: min(1280px, calc(100% - 48px)); margin: 0 auto; min-height: 650px; padding: clamp(5rem, 10vw, 9rem) 0 var(--section); display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(420px, .98fr); gap: clamp(3rem, 7vw, 7rem); align-items: center; }
.c-hero__copy { max-width: 700px; }
.c-kicker { margin: 0 0 18px; color: var(--ocean); font: 500 1rem/1.35 var(--label); letter-spacing: .11em; text-transform: uppercase; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.035em; line-height: 1.08; text-wrap: balance; }
h1 { margin: 0; font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { margin: 0 0 24px; font-size: 1.5rem; }
.c-dek { max-width: 64ch; margin: 28px 0; font-size: 1.125rem; line-height: 1.65; }
.c-button, .c-next { display: inline-flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 48px; padding: 11px 18px; background: var(--deep); color: white; border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius); font: 600 16px/1.3 var(--label); text-decoration: none; box-shadow: 0 2px 12px rgba(0,42,64,.14); transition: transform 300ms, box-shadow 300ms; }
.c-button:hover, .c-next:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 8px 24px rgba(0,42,64,.22); }
.c-hero__visual { min-width: 0; }
.c-diagram { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 14px 30px rgba(0,50,76,.12)); }
.c-diagram__current { fill: none; stroke: rgba(0,105,148,.35); stroke-width: 3; }
.c-diagram__current--back { stroke: rgba(255,255,255,.7); stroke-width: 22; }
.c-diagram__line { fill: none; stroke: var(--deep); stroke-width: 2; stroke-dasharray: 5 7; }
.c-diagram__node circle { stroke: rgba(0,74,106,.3); stroke-width: 2; fill: rgba(245,252,255,.92); }
.c-diagram__node--two circle { fill: var(--deep); }
.c-diagram__node text { fill: var(--deep); font: 600 12px/1 var(--label); text-anchor: middle; letter-spacing: .06em; }
.c-diagram__node--two text { fill: white; }
.c-diagram__bubble { fill: rgba(255,255,255,.55); stroke: rgba(0,105,148,.35); }
.c-diagram__bubble--small { fill: rgba(112,230,209,.55); }
.c-wave { height: 80px; margin: -1px 0; overflow: hidden; }
.c-wave svg { display: block; width: 100%; height: 100%; }
.c-wave path { fill: rgba(245,252,255,.2); }

.c-book { width: min(1120px, calc(100% - 48px)); margin: 0 auto; padding: var(--section) 0; }
.c-opener { max-width: 860px; margin: 0 auto var(--section); padding: 30px 34px 34px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 2px 12px rgba(0,42,64,.1); }
.c-opener span { color: var(--ocean); font: 500 .8125rem/1.3 var(--label); letter-spacing: .11em; }
.c-opener p { margin: 14px 0 0; font-size: clamp(1.2rem, 2.2vw, 1.6rem); line-height: 1.5; }
.c-chapter { display: grid; grid-template-columns: 180px minmax(0, 72ch); justify-content: center; gap: clamp(2rem, 7vw, 6rem); align-items: start; padding: var(--section) 0; }
.c-chapter--reverse { grid-template-columns: minmax(0, 72ch) 180px; }
.c-chapter--reverse .c-chapter__index { order: 2; }
.c-chapter__index { position: sticky; top: 32px; display: grid; place-items: center; width: 128px; aspect-ratio: 1; color: rgba(255,255,255,.92); background: rgba(0,75,108,.75); border: 1px solid rgba(255,255,255,.35); border-radius: 58% 42% 46% 54%; font: 700 2.25rem/1 var(--display); box-shadow: 0 2px 12px rgba(0,42,64,.12); }
.c-chapter__body { min-width: 0; max-width: 72ch; padding: 38px 40px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 2px 12px rgba(0,42,64,.12); }
.c-chapter__body p { margin: 0 0 20px; font-size: 1rem; }
.c-chapter__body p:last-child { margin-bottom: 0; }
.c-value { font-family: var(--mono); font-size: .94em; font-weight: 500; letter-spacing: -.02em; white-space: nowrap; }
.c-question-list, .c-check-list { margin: 0; padding: 0; list-style: none; }
.c-question-list li, .c-check-list li { position: relative; min-height: 44px; padding: 9px 0 9px 34px; font-size: 1rem; }
.c-question-list li::before { content: "?"; position: absolute; left: 0; top: 11px; width: 22px; height: 22px; display: grid; place-items: center; color: white; background: var(--ocean); border-radius: 50%; font: 700 12px/1 var(--label); }
.c-check-list li::before { content: "○"; position: absolute; left: 0; color: var(--ocean); font: 700 20px/1.7 var(--label); }
.c-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 28px; }
.c-card-link, .c-source-card { position: relative; min-height: 152px; padding: 22px; display: flex; flex-direction: column; color: var(--ink); background: rgba(255,255,255,.72); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; box-shadow: 0 2px 12px rgba(0,42,64,.07); transition: transform 300ms, background-color 300ms; }
.c-card-link:hover, .c-source-card:hover { transform: translateY(-3px) scale(1.03); background: white; }
.c-card-link strong, .c-source-card strong { font: 700 1.05rem/1.25 var(--display); }
.c-card-link span, .c-source-card span { margin-top: 10px; font-size: 16px; line-height: 1.5; }
.c-card-link b, .c-source-card b { margin-top: auto; align-self: flex-end; font: 600 20px/1 var(--label); }
.c-source-list { display: grid; gap: 12px; }
.c-source-card { min-height: 132px; }

.c-recap { margin: var(--section) auto; max-width: 900px; padding: clamp(2rem, 5vw, 4rem); color: white; background: rgba(0,42,64,.82); border: 1px solid rgba(255,255,255,.24); border-radius: var(--radius); box-shadow: 0 2px 12px rgba(0,42,64,.18); }
.c-recap .c-kicker { color: var(--glow); }
.c-recap h2 { max-width: 28ch; font-size: clamp(1.7rem, 3vw, 2.4rem); }
.c-recap .c-next { margin-top: 18px; color: var(--deep); background: var(--aqua); }
.c-notes { margin: var(--section) 0 0; padding: clamp(2rem, 5vw, 4rem); display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 6vw, 6rem); color: white; background: rgba(0,54,80,.88); border: 1px solid rgba(255,255,255,.2); border-radius: var(--radius); box-shadow: 0 2px 12px rgba(0,42,64,.18); }
.c-notes .c-kicker { color: var(--glow); }
.c-notes p { font-size: 16px; }
.c-notes label { display: block; margin-bottom: 8px; font: 500 .875rem/1.4 var(--label); letter-spacing: .05em; text-transform: uppercase; }
.c-notes textarea { width: 100%; min-height: 120px; resize: vertical; padding: 14px; color: var(--ink); background: var(--paper-solid); border: 1px solid rgba(255,255,255,.5); border-radius: var(--radius); font-size: 16px; line-height: 1.5; }
.c-notes__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.c-notes button { min-height: 44px; padding: 9px 16px; color: var(--deep); background: var(--aqua); border: 1px solid transparent; border-radius: var(--radius); font: 600 16px/1 var(--label); cursor: pointer; }
.c-notes .c-button--quiet { color: white; background: transparent; border-color: rgba(255,255,255,.4); }
.c-notes [role="status"] { min-height: 26px; font-size: 16px; }

.c-footer { position: relative; z-index: 1; padding: 56px max(24px, calc((100% - 1280px) / 2)); color: white; background: var(--abyss); border-top: 1px solid rgba(255,255,255,.2); }
.c-footer__intro { display: grid; grid-template-columns: 250px 1fr; gap: 32px; align-items: start; }
.c-footer__intro b { font: 700 1.15rem/1.3 var(--display); }
.c-footer__intro p { max-width: 72ch; margin: 0; font-size: 16px; }
.c-footer__links { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px 12px; margin: 32px 0; }
.c-footer__links a { min-height: 44px; display: flex; align-items: center; padding: 8px 0; font-size: 16px; }
.c-footer__stamp { margin: 0; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.2); color: #d2edf6; font-size: 16px; }

.c-reveal { animation: reveal 540ms cubic-bezier(.2,.75,.25,1) both; }
.c-hero__visual { animation-delay: 120ms; }
.c-opener { animation-delay: 120ms; }
.c-chapter:nth-of-type(2) { animation-delay: 120ms; }
.c-chapter:nth-of-type(3) { animation-delay: 240ms; }

@keyframes reveal { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bubble-rise { 0% { opacity: 0; transform: translateY(0) scale(.7); } 14% { opacity: .55; } 80% { opacity: .2; } 100% { opacity: 0; transform: translateY(-105vh) scale(1.35); } }
@keyframes page-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } }

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: page-out 300ms ease both; }
::view-transition-new(root) { animation: page-in 300ms ease both; }

@media (max-width: 980px) {
  .c-site-head { grid-template-columns: 1fr; gap: 14px; }
  .c-tabs { justify-content: flex-start; }
  .c-hero { grid-template-columns: 1fr 390px; gap: 24px; }
  .c-card-grid { grid-template-columns: 1fr; }
  .c-footer__links { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 767px) {
  .c-site-head, .c-hero, .c-book { width: min(100% - 32px, 680px); }
  .c-site-head { padding-top: 16px; }
  .c-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .c-tabs a { padding-inline: 8px; text-align: center; }
  .c-hero { min-height: 0; padding: 64px 0 56px; grid-template-columns: 1fr; }
  .c-hero__visual { max-width: 520px; margin: 0 auto; }
  .c-chapter, .c-chapter--reverse { grid-template-columns: 1fr; gap: 18px; padding: 52px 0; }
  .c-chapter--reverse .c-chapter__index { order: 0; }
  .c-chapter__index { position: static; width: 64px; font-size: 1.5rem; }
  .c-chapter__body { padding: 28px 24px; }
  .c-notes { grid-template-columns: 1fr; }
  .c-footer { padding: 48px 16px; }
  .c-footer__intro { grid-template-columns: 1fr; gap: 12px; }
  .c-footer__links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 390px) {
  .c-tabs { grid-template-columns: 1fr 1fr; }
  .c-tabs a { font-size: 16px; }
  .c-opener { padding: 24px; }
  .c-diagram text { font-size: 12px; }
  .c-footer__links { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .01ms !important; }
  .c-bubbles { display: none; }
}
