body.docs { background: var(--paper); display: flex; flex-direction: column; min-height: 100vh; }
body.docs > .wrap, body.docs > main { flex: 1; }

.docs-head { background: var(--navy); color: var(--ink-on-navy); }
.docs-head .wrap { display: flex; align-items: center; gap: 32px; min-height: 72px; }
.docs-head .logo { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.docs-head .logo a { display: flex; text-decoration: none; }
.docs-head .logo img { width: 124px; }
.docs-head .logo span { padding-left: 14px; border-left: 1.5px solid var(--border-on-navy); font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink-on-navy); }
.audience { display: flex; gap: 4px; margin-left: auto; }
.audience a { position: relative; padding: 24px 14px; color: var(--muted-on-navy); font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; }
.audience a:hover, .audience a[aria-current] { color: var(--surface); }
.audience a[aria-current]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--teal); }

.docs-grid { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: clamp(32px, 4vw, 64px); padding-top: 48px; padding-bottom: var(--section); }

.rail-nav { position: sticky; top: 24px; align-self: start; }
.rail-nav .all { display: none; }
.rail { list-style: none; margin: 0; padding: 0 0 0 22px; border-left: 2px solid #DAD6CC; }
.rail > li { position: relative; padding: 0 0 22px; }
.rail > li:last-child { padding-bottom: 0; }
.rail .stage { font-size: 12px; line-height: 16px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; color: var(--ink-muted); }
.rail ol { list-style: none; margin: 6px 0 0; padding: 0; font-size: 14px; line-height: 20px; }
.rail ol a { display: block; padding: 4px 0; color: var(--ink); text-decoration: none; }
.rail ol a:hover { color: var(--deep-teal); text-decoration: underline; }
.rail .now::before { content: ""; position: absolute; left: -24px; top: 0; bottom: 14px; width: 4px; border-radius: 2px; background: var(--amber); }
.rail .now:last-child::before { bottom: 0; }
.rail .now .stage { color: #8A5300; }
.rail a[aria-current] { font-weight: 700; color: var(--ink); }

.chapter { max-width: 760px; }
.crumb { font-size: 14px; color: var(--ink-muted); }
.crumb a { color: var(--ink-muted); }
.chapter h1, .docs-index h1 { margin-top: 10px; font-size: clamp(2rem, 1.5rem + 2vw, 3rem); line-height: 1.08; letter-spacing: -0.03em; }
.intro { margin-top: 20px; font-size: 18px; line-height: 30px; max-width: 62ch; }
.chapter h2 { margin-top: 64px; font-size: 26px; line-height: 32px; letter-spacing: -0.018em; }
.chapter h3 { margin-top: 36px; font-size: 19px; line-height: 26px; letter-spacing: -0.01em; }
.chapter p, .chapter ul, .chapter > ol { max-width: 68ch; margin: 14px 0 0; }
.chapter ul { padding-left: 22px; }
.chapter ul li + li, .chapter > ol:not(.steps) li + li { margin-top: 6px; }
.chapter ul li::marker { color: var(--deep-teal); }
.chapter h2 + p, .chapter h3 + p { margin-top: 12px; }
.chapter strong { font-weight: 700; }
.ui { font-weight: 600; }
.chapter table { width: 100%; margin-top: 18px; border-collapse: collapse; font-size: 15px; line-height: 22px; font-variant-numeric: tabular-nums; }
.chapter th, .chapter td { text-align: left; vertical-align: top; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--border); }
.chapter thead th { font-size: 12px; line-height: 16px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); border-bottom: 2px solid var(--navy); }
.table-scroll { overflow-x: auto; }

.chapter ol.steps { list-style: none; padding: 0; counter-reset: st; max-width: none; }
.steps > li { counter-increment: st; position: relative; padding-left: 52px; margin-top: 28px; max-width: 68ch; }
.steps > li::before {
  content: counter(st); position: absolute; left: 0; top: -3px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--navy); color: var(--surface); font-weight: 700; font-size: 16px; line-height: 34px; text-align: center; font-variant-numeric: tabular-nums;
}

.shot { margin: 20px 0 0; border: 1.5px dashed #9AA3B5; border-radius: 14px; background: var(--surface); display: grid; place-content: center; gap: 6px; padding: 24px; text-align: center; min-height: 180px; max-width: 68ch; }
.shot b { font-size: 15px; line-height: 22px; font-weight: 600; }
.shot small { font-size: 12px; line-height: 16px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); font-weight: 700; }
.shot.phone { width: 220px; min-height: 400px; border-radius: 34px; }
.steps .shot, .steps .docs-shot { margin-top: 16px; }
.docs-shot { margin: 20px 0 0; max-width: 68ch; }
.docs-shot img { display: block; max-width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); }
.docs-shot.phone img { border-radius: 28px; }

.note { margin-top: 28px; padding: 18px 20px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); max-width: 68ch; }
.note b { display: block; margin-bottom: 4px; }
.note.warn { background: #FDEEE8; border-color: #F3C9B9; }
.note.warn b { color: #A4361B; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 80px; padding-top: 24px; border-top: 2px solid var(--navy); }
.pager a { display: block; padding: 16px 18px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--border); color: var(--ink); text-decoration: none; }
.pager a:hover { border-color: var(--deep-teal); }
.pager small { display: block; font-size: 13px; color: var(--ink-muted); }
.pager b { font-size: 17px; }
.pager .next { grid-column: 2; text-align: right; }

.docs-index { padding-top: 56px; padding-bottom: var(--section); }
.journey { list-style: none; margin: 48px 0 0; padding: 0; }
.journey > li { display: grid; grid-template-columns: 150px minmax(0, 1fr); }
.journey > li:not(:has(.stage)) { grid-template-columns: minmax(0, 1fr); }
.journey .stage { padding: 18px 24px 0 0; text-align: right; font-size: 12px; line-height: 16px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; color: #8A5300; }
.journey ol { list-style: none; margin: 0; padding: 0 0 20px 28px; border-left: 2px solid #DAD6CC; max-width: 760px; }
.journey > li:last-child ol { padding-bottom: 0; }
.journey ol a { display: block; padding: 14px 0; border-bottom: 1px solid var(--border); color: var(--ink); text-decoration: none; }
.journey ol a b { display: block; font-size: 18px; line-height: 26px; font-weight: 700; letter-spacing: -0.01em; }
.journey ol a span { display: block; margin-top: 2px; color: var(--ink-muted); font-size: 15px; line-height: 22px; }
.journey ol a:hover b { color: var(--deep-teal); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }

.docs-hero { background: var(--navy); color: var(--ink-on-navy); padding: 40px 0 72px; }
.docs-hero h1 { font-size: clamp(2.5rem, 1.6rem + 3.4vw, 4.25rem); line-height: 1; letter-spacing: -0.035em; color: var(--surface); }
.docs-hero .intro { color: var(--muted-on-navy); max-width: 54ch; }
.audience-part { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 48px; padding: 56px 0; border-bottom: 2px solid var(--navy); }
.audience-part:last-child { border-bottom: 0; }
.audience-part h2 { font-size: 28px; line-height: 34px; letter-spacing: -0.02em; }
.audience-part h2 a { color: var(--ink); text-decoration: none; }
.audience-part h2 a:hover { color: var(--deep-teal); text-decoration: underline; }
.audience-part > div p { margin-top: 10px; color: var(--ink-muted); }
.audience-part .journey { margin-top: 0; }
.docs-hero + .docs-index { padding-top: 0; }

.docs-foot { background: var(--navy); color: var(--muted-on-navy); font-size: 14px; }
.docs-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; padding-bottom: 24px; }
.docs-foot a { color: var(--ink-on-navy); }

@media (max-width: 900px) {
  .docs-grid { grid-template-columns: 1fr; padding-top: 28px; gap: 28px; }
  .rail-nav { position: static; display: flex; flex-direction: column; gap: 10px; }
  .rail-nav .all { display: block; order: 2; font-size: 14px; font-weight: 600; }
  .rail > li:not(.now):not(:only-child) { display: none; }
  .rail .now::before { bottom: 0; }
  .rail > li { padding-bottom: 0; }
  .audience-part { grid-template-columns: 1fr; gap: 24px; padding: 40px 0; }
  .journey > li { grid-template-columns: minmax(0, 1fr); }
  .journey .stage { text-align: left; padding: 20px 0 6px; }
  .journey ol { padding-left: 20px; }
}
@media (max-width: 640px) {
  .docs-head .wrap { flex-wrap: wrap; gap: 0; min-height: 0; padding-top: 14px; }
  .docs-head .logo img { width: 104px; }
  .docs-head .logo span { font-size: 17px; }
  .audience { width: 100%; margin: 6px 0 0 -10px; overflow-x: auto; }
  .audience a { padding: 14px 10px; }
  .audience a[aria-current]::after { left: 10px; right: 10px; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: 1; }
  .steps > li { padding-left: 46px; }
  .chapter table { font-size: 14px; }
}
