:root {
  --page: #ffffff;
  --sidebar: #f7f8fa;
  --section-white: #ffffff;
  --section-gray: #f6f7f9;
  --text: #202124;
  --heading: #111214;
  --muted: #69707a;
  --faint: #9298a1;
  --line: #e4e6ea;
  --line-strong: #d4d7dc;
  --blue: #2356d8;
  --blue-soft: #eef3ff;
  --yellow-soft: #fff8df;
  --green-soft: #edf8f1;
  --code: #f5f6f8;
  --sidebar-width: 284px;
  --topbar-height: 64px;
  --measure: 780px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; background: var(--page); color: var(--text); font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.72; text-rendering: optimizeLegibility; }
body.menu-open { overflow: hidden; }
body.locked { overflow: hidden; }
body.locked > :not(.password-gate):not(script) { visibility: hidden; }
a { color: var(--blue); text-underline-offset: 3px; }
img, video { display: block; max-width: 100%; }
button { font: inherit; }
.password-gate { position: fixed; z-index: 1000; inset: 0; padding: 24px; background: #f7f8fa; display: grid; place-items: center; }
.password-gate[hidden] { display: none; }
.password-card { width: min(100%, 420px); padding: 38px; border: 1px solid var(--line); border-radius: 10px; background: var(--page); box-shadow: 0 16px 50px rgba(22, 30, 50, .08); }
.password-card > img { width: 42px; height: 42px; margin-bottom: 28px; border-radius: 10px; }
.password-label { margin-bottom: 10px; color: var(--blue); font-size: 10px; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
.password-card h1 { margin-bottom: 14px; font-size: 30px; line-height: 1.12; letter-spacing: -.035em; }
.password-card > p:not(.password-label) { margin-bottom: 28px; color: var(--muted); font-size: 13px; }
.password-card label { margin-bottom: 7px; color: var(--muted); display: block; font-size: 11px; font-weight: 650; }
.password-field { display: grid; grid-template-columns: 1fr auto; }
.password-field input { min-width: 0; height: 44px; padding: 0 13px; border: 1px solid var(--line-strong); border-right: 0; border-radius: 6px 0 0 6px; background: var(--page); color: var(--heading); font: inherit; outline: none; }
.password-field input:focus { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.password-field button { height: 44px; padding: 0 18px; border: 1px solid var(--blue); border-radius: 0 6px 6px 0; background: var(--blue); color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; }
.password-field button:hover { background: #1948c4; }
.password-error { min-height: 20px; margin-top: 8px; color: #a63124; display: block; font-size: 11px; }
.password-card.shake { animation: gate-shake .28s ease; }
@keyframes gate-shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.skip-link { position: fixed; z-index: 200; top: 8px; left: 8px; padding: 8px 12px; background: var(--heading); color: #fff; transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.reading-progress { position: fixed; z-index: 150; top: 0; right: 0; left: 0; height: 2px; }
.reading-progress span { display: block; height: 100%; background: var(--blue); transform: scaleX(0); transform-origin: left; }

.topbar { position: fixed; z-index: 100; top: 0; right: 0; left: 0; height: var(--topbar-height); padding: 0 28px 0 22px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(14px); display: flex; align-items: center; justify-content: space-between; }
.brand { min-width: calc(var(--sidebar-width) - 22px); color: var(--heading); display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-size: 14px; font-weight: 700; }
.brand img { width: 29px; height: 29px; border-radius: 7px; }
.brand small { margin-left: 3px; color: var(--faint); font-size: 11px; font-weight: 500; }
.topbar-meta { color: var(--faint); display: flex; gap: 22px; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.contents-button { display: none; }

.docs-layout { min-height: 100vh; padding-top: var(--topbar-height); display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar { position: fixed; z-index: 80; top: var(--topbar-height); bottom: 0; left: 0; width: var(--sidebar-width); padding: 28px 20px 20px 22px; border-right: 1px solid var(--line); background: var(--sidebar); overflow-y: auto; display: flex; flex-direction: column; justify-content: space-between; }
.nav-label { margin: 0 0 15px; color: var(--faint); font-size: 10px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.sidebar ol, .sidebar ul { margin: 0; padding: 0; list-style: none; }
.sidebar > nav > ol > li { margin-bottom: 14px; }
.sidebar a { color: var(--muted); text-decoration: none; }
.sidebar > nav > ol > li > a { min-height: 27px; display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 650; line-height: 1.35; }
.sidebar > nav > ol > li > a span { width: 20px; color: var(--faint); font-size: 9px; font-variant-numeric: tabular-nums; }
.sidebar a:hover, .sidebar a.active { color: var(--blue); }
.sidebar > nav > ol > li > a.active { font-weight: 750; }
.sidebar ul { margin: 6px 0 0 29px; padding-left: 11px; border-left: 1px solid var(--line-strong); }
.sidebar ul li { margin: 5px 0; }
.sidebar ul a { display: block; font-size: 11px; line-height: 1.45; }
.sidebar-footer { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; font-size: 10px; }
.sidebar-footer span { color: var(--faint); }
.sidebar-footer a { color: var(--muted); }

.document { grid-column: 2; min-width: 0; }
.document article { width: min(calc(100% - 80px), var(--measure)); margin: 0 auto; }
.doc-section {
  --section-bg: var(--section-white);
  position: relative;
  padding: 112px 0 44px;
  border-bottom: 1px solid var(--line);
  background: var(--section-bg);
  box-shadow: 0 0 0 100vmax var(--section-bg);
  clip-path: inset(0 -100vmax);
}
.doc-section#solution,
.doc-section#task,
.doc-section#hypotheses { --section-bg: var(--section-gray); }
.doc-section:last-child { border-bottom: 0; }
.intro-section { padding-top: 86px; }
.section-index { margin: 0 0 24px; color: var(--blue); font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { color: var(--heading); }
h1 { margin-bottom: 30px; font-size: clamp(42px, 5.2vw, 68px); font-weight: 620; line-height: 1.05; letter-spacing: -.048em; }
h2 { margin-bottom: 28px; font-size: clamp(34px, 4.1vw, 50px); font-weight: 620; line-height: 1.1; letter-spacing: -.04em; }
h3 { margin: 76px 0 20px; padding-top: 4px; font-size: 24px; font-weight: 680; line-height: 1.25; letter-spacing: -.025em; }
h4 { margin-bottom: 8px; font-size: 16px; line-height: 1.4; }
p { margin-bottom: 20px; }
.dek { margin-bottom: 48px; color: #4f5660; font-size: clamp(19px, 2.2vw, 24px); line-height: 1.55; letter-spacing: -.018em; }
.section-lead { margin-bottom: 52px; color: var(--muted); font-size: 19px; line-height: 1.65; }
strong { color: var(--heading); }

.project-facts { margin: 0 0 48px; border-top: 1px solid var(--line-strong); }
.project-facts div { padding: 12px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 150px 1fr; gap: 22px; }
.project-facts dt { color: var(--muted); font-size: 12px; }
.project-facts dd { margin: 0; color: var(--heading); font-size: 13px; font-weight: 600; }
.box-label { margin-bottom: 15px; color: var(--faint); font-size: 10px; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
.summary-box { margin: 48px 0; padding: 28px 30px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fbfbfc; }
.summary-box ol { margin: 0; padding-left: 22px; }
.summary-box li { margin: 9px 0; padding-left: 5px; }

.callout { margin: 40px 0; padding: 20px 22px; border: 1px solid #cedafb; border-radius: 8px; background: var(--blue-soft); display: grid; grid-template-columns: 26px 1fr; gap: 12px; font-size: 14px; }
.callout-warning { border-color: #eadca6; background: var(--yellow-soft); }
.callout-icon { width: 22px; height: 22px; border: 1px solid #a9bde9; border-radius: 50%; color: var(--blue); display: grid; place-items: center; font-size: 12px; font-weight: 800; line-height: 1; }
.callout-warning .callout-icon { border-color: #d2b85d; color: #806700; }
.callout p { margin: 3px 0 0; color: var(--muted); }
blockquote { margin: 42px 0; padding: 2px 0 2px 25px; border-left: 3px solid var(--blue); }
blockquote p { margin-bottom: 9px; color: var(--heading); font-family: Georgia, serif; font-size: 24px; line-height: 1.45; }
blockquote cite { color: var(--faint); font-size: 11px; font-style: normal; }
.check-list { margin: 0; padding: 0; list-style: none; }
.check-list li { position: relative; margin: 10px 0; padding-left: 29px; }
.check-list li::before { position: absolute; top: 4px; left: 0; width: 17px; height: 17px; border: 1px solid #aabce9; border-radius: 50%; color: var(--blue); content: "✓"; font-size: 10px; font-weight: 800; line-height: 16px; text-align: center; }
.two-column-list { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.two-column-list > div { padding: 23px 25px; border: 1px solid var(--line); border-radius: 7px; background: #fbfbfc; }
.two-column-list ul { margin: 0; padding-left: 19px; }
.two-column-list li { margin: 6px 0; color: var(--muted); font-size: 14px; }

.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 28px 0 48px; background: var(--line); border: 1px solid var(--line); }
.method-grid article { min-height: 190px; padding: 23px; background: var(--page); }
.method-grid span, .insight-list > li > span, .principle-list article > span { color: var(--blue); font-size: 10px; font-weight: 750; }
.method-grid h4 { margin: 44px 0 7px; }
.method-grid p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.media-block { margin: 42px 0 52px; }
.media-surface { position: relative; min-height: 390px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background-color: #f3f4f6; background-image: linear-gradient(#e6e8eb 1px, transparent 1px), linear-gradient(90deg, #e6e8eb 1px, transparent 1px); background-size: 32px 32px; }
.media-surface.ratio-landscape { aspect-ratio: 16/10; min-height: 0; }
.media-surface.ratio-portrait { aspect-ratio: 4/5; min-height: 0; }
.media-surface img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.media-placeholder { position: absolute; inset: 0; padding: 24px; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.media-placeholder strong { font-size: 14px; }
.media-placeholder span { margin-top: 4px; color: var(--faint); font-size: 10px; }
[data-media].is-loaded + .media-placeholder { display: none; }
.media-block figcaption { padding-top: 11px; color: var(--muted); display: grid; grid-template-columns: 55px 1fr auto; gap: 12px; font-size: 11px; line-height: 1.5; }
.media-block figcaption > span { color: var(--faint); text-transform: uppercase; }
.media-block figcaption p { margin: 0; }
.media-block figcaption a { white-space: nowrap; }
.media-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.media-pair .media-block figcaption { grid-template-columns: 24px 1fr; }
.media-pair .media-block figcaption a { display: none; }

.evidence-table { margin: 35px 0 52px; overflow-x: auto; border: 1px solid var(--line); border-radius: 7px; }
table { width: 100%; min-width: 670px; border-collapse: collapse; font-size: 12px; line-height: 1.5; }
th, td { padding: 14px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th:last-child, td:last-child { border-right: 0; }
tbody tr:last-child td { border-bottom: 0; }
th { background: #f7f8fa; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.insight-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.insight-list li { padding: 25px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 48px 1fr; gap: 14px; }
.insight-list h4 { margin: 0 0 6px; font-size: 18px; }
.insight-list p { margin: 0; color: var(--muted); font-size: 14px; }
.reference-card { margin: 36px 0; padding: 18px 20px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--heading); display: grid; grid-template-columns: 30px 1fr auto; gap: 13px; align-items: center; text-decoration: none; transition: border-color .18s ease, background .18s ease; }
.reference-card:hover { border-color: #9eb3ec; background: var(--blue-soft); }
.reference-icon { width: 28px; height: 28px; border: 1px solid var(--line-strong); border-radius: 5px; display: grid; place-items: center; font-size: 12px; }
.reference-card small { color: var(--faint); display: block; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.reference-card strong { display: block; font-size: 13px; }
.reference-domain { color: var(--faint); font-size: 10px; }

.hypothesis-card { margin: 36px 0 54px; padding: 28px 30px; border-left: 3px solid var(--blue); background: #f7f9ff; }
.hypothesis-card p:last-child { margin: 0; color: var(--heading); font-size: 19px; line-height: 1.65; }
mark { padding: 1px 3px; background: #dfe8ff; color: inherit; }
.tag { padding: 3px 7px; border-radius: 99px; font-size: 9px; font-weight: 700; }
.tag.high { background: #ffe9e6; color: #9b2d1c; }
.tag.medium { background: var(--yellow-soft); color: #7b650c; }
.decision-log { border-top: 1px solid var(--line-strong); }
.decision-log article { padding: 21px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 72px 1fr auto; gap: 18px; align-items: start; }
.decision-log time { color: var(--faint); font-size: 10px; }
.decision-log h4 { margin: 0 0 5px; }
.decision-log p { margin: 0; color: var(--muted); font-size: 13px; }
.decision-log article > span { padding: 3px 7px; border: 1px solid var(--line); border-radius: 3px; color: var(--faint); font-size: 9px; text-transform: uppercase; }

.principle-list { border-top: 1px solid var(--line-strong); }
.principle-list article { padding: 24px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 48px 1fr; }
.principle-list h4 { margin: 0 0 5px; font-size: 18px; }
.principle-list p { margin: 0; color: var(--muted); font-size: 14px; }
.architecture { margin: 36px 0 52px; padding: 30px; border: 1px solid var(--line); border-radius: 7px; background: #fbfbfc; }
.architecture-root { width: 130px; margin: 0 auto 42px; padding: 12px; border: 1px solid #afbfec; border-radius: 5px; background: var(--blue-soft); color: var(--blue); font-size: 13px; font-weight: 750; text-align: center; }
.architecture-branches { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.architecture-branches::before { position: absolute; top: -22px; right: 16%; left: 16%; height: 22px; border: 1px solid var(--line-strong); border-bottom: 0; content: ""; }
.architecture-branches > div { position: relative; padding: 15px; border: 1px solid var(--line); border-radius: 5px; background: var(--page); text-align: center; }
.architecture-branches > div::before { position: absolute; top: -23px; left: 50%; width: 1px; height: 22px; background: var(--line-strong); content: ""; }
.architecture-branches strong, .architecture-branches span { display: block; }
.architecture-branches strong { margin-bottom: 11px; font-size: 12px; }
.architecture-branches span { padding: 5px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.implementation-list { margin-top: 34px; border-top: 1px solid var(--line-strong); }
.implementation-list > div { padding: 18px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 120px 1fr; gap: 22px; }
.implementation-list strong { font-size: 13px; }
.implementation-list p { margin: 0; color: var(--muted); font-size: 13px; }

.video-block { position: relative; aspect-ratio: 16/9; margin-top: 28px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #eef0f3; }
.video-block video { width: 100%; height: 100%; object-fit: cover; }
.video-placeholder { position: absolute; inset: 0; background: #f2f3f5; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.video-block.has-video .video-placeholder { display: none; }
.video-placeholder .play { width: 50px; height: 50px; margin-bottom: 15px; padding-left: 3px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--blue); display: grid; place-items: center; font-size: 12px; }
.video-placeholder strong { font-size: 13px; }
.video-placeholder small { margin-top: 4px; color: var(--faint); font-size: 10px; }
.media-note { margin-top: 10px; color: var(--faint); font-size: 10px; }
.link-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 36px 0; }
.link-grid .reference-card { margin: 0; grid-template-columns: 30px 1fr; }
.next-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-strong); }
.next-list li { padding: 19px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 45px 1fr; }
.next-list span { color: var(--blue); font-size: 10px; font-weight: 750; }
.next-list p { margin: 0; font-size: 14px; }
.case-footer { margin-top: 120px; padding: 56px 0 36px; border-top: 2px solid var(--heading); }
.case-footer > p { color: var(--blue); font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.case-footer h2 { max-width: 720px; font-size: clamp(32px, 4vw, 46px); }
.case-footer > div { margin-top: 60px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); display: flex; justify-content: space-between; font-size: 11px; }

@media (max-width: 900px) {
  .topbar { padding: 0 18px; }
  .brand { min-width: 0; }
  .brand small, .topbar-meta { display: none; }
  .contents-button { padding: 6px 0; border: 0; background: transparent; color: var(--heading); display: flex; align-items: center; gap: 8px; font-size: 12px; cursor: pointer; }
  .contents-button span:last-child { font-size: 16px; transition: transform .2s ease; }
  .contents-button[aria-expanded="true"] span:last-child { transform: rotate(45deg); }
  .docs-layout { display: block; }
  .sidebar { z-index: 90; top: var(--topbar-height); width: 100%; padding: 30px 24px; border-right: 0; transform: translateX(-100%); transition: transform .24s ease; }
  .sidebar.is-open { transform: none; }
  .sidebar > nav > ol > li { margin-bottom: 16px; }
  .sidebar > nav > ol > li > a { font-size: 15px; }
  .sidebar ul a { font-size: 12px; }
  .document { width: 100%; }
  .document article { width: min(calc(100% - 48px), var(--measure)); }
}

@media (max-width: 600px) {
  body { font-size: 15px; line-height: 1.68; }
  .document article { width: calc(100% - 32px); }
  .password-card { padding: 28px 22px; }
  .doc-section { padding-top: 84px; }
  .intro-section { padding-top: 62px; }
  h1 { font-size: 42px; }
  h2 { font-size: 34px; }
  h3 { margin-top: 62px; font-size: 22px; }
  .project-facts div { grid-template-columns: 100px 1fr; gap: 14px; }
  .summary-box { padding: 22px; }
  .two-column-list, .method-grid, .media-pair, .link-grid { grid-template-columns: 1fr; }
  .media-surface { min-height: 300px; }
  .media-block figcaption { grid-template-columns: 42px 1fr; }
  .media-block figcaption a { display: none; }
  .decision-log article { grid-template-columns: 55px 1fr; gap: 12px; }
  .decision-log article > span { display: none; }
  .architecture { padding: 18px 12px; overflow-x: auto; }
  .architecture-branches { min-width: 520px; }
  .implementation-list > div { grid-template-columns: 90px 1fr; }
  .video-block { aspect-ratio: 4/5; }
  .case-footer > div { flex-direction: column; gap: 5px; }
}

@media print {
  .topbar, .sidebar, .reading-progress { display: none; }
  .docs-layout, .document { display: block; }
  .document article { width: 100%; max-width: 760px; }
  .doc-section { break-before: page; padding-top: 40px; }
  .intro-section { break-before: auto; }
  a { color: inherit; }
}

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