.doc .nav .wrap { gap: 20px; }
.doc-hero { position: relative; isolation: isolate; overflow: hidden; padding: 110px 0 120px; background: var(--brand); }
.doc-hero .ripple { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.doc-hero .lead b { color: var(--ink); }
.doc-hero .wrap > * { max-width: 820px; }
.doc-hero .lead { color: rgb(13 14 16 / .78); }

.doc-body { display: grid; grid-template-columns: 200px 1fr; gap: 64px; padding: 72px 0 96px; }
.toc { position: sticky; top: 96px; align-self: start; }
.toc ol { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 2px; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 10px; padding: 6px 0; font-size: 14px; color: var(--ink-3); transition: color .2s; }
.toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--mono); font-size: 11px; padding-top: 2px; }
.toc a:hover, .toc a.is-on { color: var(--ink); }

.doc-content { max-width: 780px; min-width: 0; }
.doc-content section { padding-bottom: 80px; margin-bottom: 72px; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.doc-content section:last-child { border: 0; }
.doc-content h2 { margin: 8px 0 20px; font-size: clamp(32px, 3.6vw, 48px); font-weight: 600; letter-spacing: -.045em; line-height: 1.02; }
.doc-content h3 { margin: 40px 0 14px; font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.doc-content p, .doc-content li { font-size: 16.5px; line-height: 1.65; color: var(--ink-2); }
.doc-content p b, .doc-content li b { color: var(--ink); font-weight: 600; }
.doc-content code { font-family: var(--mono); font-size: .86em; padding: 2px 6px; border-radius: 6px; background: var(--paper-2); }
.doc-content a { text-decoration: underline; text-underline-offset: 3px; }
.note { font-size: 14px !important; color: var(--ink-3) !important; }

.map { margin-top: 28px; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.map-row { display: grid; grid-template-columns: 110px 28px 120px 1fr; align-items: center; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--line); font-size: 15px; color: var(--ink-2); }
.map-head { border: 0; padding-block: 12px; background: var(--paper-2); font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.map .old { text-decoration: line-through; text-decoration-color: rgb(13 14 16 / .35); color: var(--ink-3); }
.map .old.none { text-decoration: none; font-family: var(--mono); font-size: 12px; }
.map .to { color: var(--ink-4); }
.map .new { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); }
.map .new i { width: 10px; height: 10px; border-radius: 0; background: var(--c); }

.cards3, .cards4 { display: grid; gap: 12px; margin: 24px 0; }
.cards3 { grid-template-columns: repeat(3, 1fr); }
.cards4 { grid-template-columns: repeat(4, 1fr); }
.mini { padding: 20px; border-radius: var(--r-lg); background: var(--paper-2); position: relative; overflow: hidden; }
.mini[class*='c-']::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--c); }
.mini h3, .mini h4 { margin: 0 0 4px; font-size: 18px; font-weight: 600; }
.mini ul { margin: 12px 0 0; padding-left: 16px; }
.mini li { font-size: 13.5px !important; line-height: 1.55 !important; }
.mini p { margin: 0; font-size: 14px !important; }
.mini small { display: block; margin-top: 8px; color: var(--ink-3); font-size: 13px; }

.arch { margin: 28px 0 0; padding: 20px; border-radius: var(--r-lg); background: var(--bg); }
.arch svg { width: 100%; height: auto; }
.arch text { font-family: var(--sans); fill: var(--ink); }
.t-name { font-size: 16px; font-weight: 600; }
.t-sub { font-size: 12px; fill: var(--ink-3) !important; }
.t-core { font-size: 17px; font-weight: 600; fill: #fff !important; }
.t-coresub { font-size: 12.5px; fill: rgb(255 255 255 / .7) !important; }
.t-vert { font-size: 13px; font-weight: 600; }
.a-mod rect { fill: var(--c); stroke: var(--ink); stroke-width: 1; }
.a-private rect, rect.a-private { stroke-dasharray: 5 4; }
.a-core { fill: var(--ink); }
.a-data { fill: #fff; stroke: var(--line); }
rect.a-data.a-private { fill: #fff6fb; stroke: var(--ink-3); }
.a-portal { fill: #fff; stroke: var(--ink); stroke-dasharray: 5 4; }
.a-link { stroke: var(--ink); stroke-width: 1.4; fill: none; }
.a-dash { stroke-dasharray: 4 4; }

.decisions { padding-left: 22px; display: grid; gap: 12px; }
.plain { padding-left: 18px; display: grid; gap: 10px; }

.price-table { margin: 26px 0 8px; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.pt-row { display: grid; grid-template-columns: 12px 1fr auto; gap: 14px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); font-size: 15px; }
.pt-row:first-child { border: 0; }
.pt-row i { width: 12px; height: 12px; border-radius: 0; background: var(--c); }
.pt-row small { display: block; color: var(--ink-3); font-size: 12.5px; }
.pt-row .mono { font-size: 14px; }
.pt-row.total { background: var(--ink); color: #fff; }
.pt-row.total small { color: rgb(255 255 255 / .6); }
.pt-row.total i { background: linear-gradient(135deg, var(--c-work), var(--c-eco), var(--c-balance), var(--c-life)); }

.swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 26px 0; }
.sw { display: grid; align-content: end; gap: 2px; height: 120px; padding: 12px; border-radius: var(--r); background: var(--c); font-size: 13px; font-weight: 600; }
.sw code { background: none !important; padding: 0 !important; font-weight: 400; font-size: 11px !important; opacity: .7; }
.sw-ink { background: var(--ink); color: #fff; }
.sw-paper { background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.brand-row { display: grid; grid-template-columns: 140px 1fr; gap: 24px; align-items: center; }
.brand-mark { display: grid; place-items: center; aspect-ratio: 1; border-radius: var(--r-lg); background: var(--bg); }
.brand-mark img { width: 72%; height: auto; }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.two > div { padding: 22px; border-radius: var(--r-lg); background: var(--paper-2); }
.two h3 { margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 0; border: 1.5px solid var(--ink-3); }
.dot.on { background: var(--c-work); border-color: var(--ink); }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checks li { position: relative; padding-left: 22px; font-size: 14px !important; line-height: 1.5 !important; }
.checks li::before { content: '✓'; position: absolute; left: 0; font-weight: 700; color: #3d7a00; }
.checks.todo li::before { content: '○'; color: var(--ink-4); }

.warn { margin-top: 24px; padding: 20px 22px; border-radius: var(--r-lg); background: #fff8e6; border: 1px solid #f3dfa8; font-size: 15.5px; line-height: 1.6; color: var(--ink-2); }
.warn b { color: var(--ink); }

.road { list-style: none; margin: 26px 0 8px; padding: 0; display: grid; gap: 0; border-left: 2px solid var(--line); }
.road li { position: relative; display: grid; gap: 2px; padding: 0 0 26px 26px; }
.road li::before { content: ''; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 0; background: var(--c, var(--ink)); outline: 3px solid #fff; }
.road .mono { font-size: 12px; color: var(--ink-3); }
.road b { font-size: 18px; letter-spacing: -.02em; }
.road p { margin: 0; font-size: 15px !important; }

pre { margin: 20px 0 0; padding: 18px 20px; border-radius: var(--r); background: var(--ink); color: #f3f1ec; overflow-x: auto; }
pre code { background: none !important; padding: 0 !important; font-size: 13.5px !important; color: inherit; }

@media (max-width: 960px) {
  .doc-body { grid-template-columns: 1fr; gap: 24px; }
  .toc { display: none; }
  .cards3, .two { grid-template-columns: 1fr; }
  .cards4 { grid-template-columns: 1fr 1fr; }
  .swatches { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .map-row { grid-template-columns: 80px 16px 1fr; }
  .map-row > span:last-child { grid-column: 1 / -1; font-size: 14px; }
  .map-head > span:last-child { display: none; }
  .brand-row { grid-template-columns: 1fr; }
  .doc .nav .label { display: none; }
}

.swatches { grid-template-columns: repeat(7, 1fr); }
.logo-show { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.logo-on-brand { background: var(--brand); }
.logo-on-color { background: var(--c-work); }
.logo-on { display: grid; place-items: center; padding: 40px 28px; border-radius: var(--r-lg); }
.logo-on img { width: 100%; max-width: 260px; height: auto; }
.logo-on-paper { background: var(--bg); }
.logo-on-ink { background: var(--ink); }
@media (max-width: 960px) { .swatches { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 640px) { .logo-show { grid-template-columns: 1fr; } }

.brand-row-text { grid-template-columns: 1fr; }
