/* ───────── Docs ───────── */
.docs { display: grid; grid-template-columns: 230px 1fr; gap: 48px; padding: 40px 0 80px; align-items: start; }
.docs__nav { position: sticky; top: 96px; }
.docs__nav details { background: none; box-shadow: none; padding: 0; }
.docs__nav summary { display: none; }
.docs__nav nav { display: grid; gap: 2px; }
.docs__nav nav span { margin: 18px 0 6px; font: 600 12px var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.docs__nav nav span:first-child { margin-top: 0; }
.docs__nav a { padding: 7px 12px; border-radius: 10px; font-size: 14.5px; font-weight: 500; color: var(--ink-2); transition: background-color .2s, color .2s; }
.docs__nav a:hover { color: var(--ink); background: rgba(255,255,255,.7); }
.docs__nav a.is-active { color: #c0396f; background: #fff; box-shadow: var(--shadow-soft); font-weight: 600; }

.docs__body { max-width: 780px; min-width: 0; }
.docs__body section { padding: 8px 0 40px; scroll-margin-top: 90px; border-bottom: 1px solid var(--line); margin-bottom: 36px; }
.docs__body section:last-child { border-bottom: 0; }
.docs__body h1 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 18px; }
.docs__body h2 { font-size: 28px; margin-bottom: 18px; }
.docs__body h3 { font-size: 17px; margin: 26px 0 10px; }
.docs__body p, .docs__body li { color: var(--ink-2); font-size: 16px; }
.docs__body p + p { margin-top: 12px; }
.docs__body ul, .docs__body ol { padding-left: 22px; display: grid; gap: 8px; margin: 12px 0; }
.docs__body b { color: var(--ink); }
.docs__body a { color: #c0396f; font-weight: 600; }
.docs__body code { font: 500 13.5px var(--f-mono); background: #fff; border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; color: var(--ink); word-break: break-word; }
.docs__body .lead { font-size: 18px; color: var(--ink-2); margin-bottom: 14px; }

.callout { padding: 16px 20px; border-radius: 16px; background: #fff4e0; border: 1px solid #ffd9a0; color: #7a4a00; font-size: 15px; margin-bottom: 36px; }
.callout b { color: inherit; }

.steps-list { counter-reset: s; list-style: none; padding: 0 !important; }
.steps-list li { position: relative; padding: 16px 18px 16px 62px; background: #fff; border-radius: 16px; box-shadow: var(--shadow-soft); }
.steps-list li::before { counter-increment: s; content: counter(s); position: absolute; left: 16px; top: 15px; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--grad); color: #fff; font: 600 14px var(--f-display); }

.formula-box { margin: 16px 0; padding: 20px 22px; border-radius: 16px; background: var(--grad-soft); }
.formula-box code { background: none; border: 0; font-size: 16px; padding: 0; }

.t { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border-radius: 16px; box-shadow: var(--shadow-soft); overflow: hidden; margin: 12px 0; font-size: 15px; }
.t th, .t td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
.t tr:last-child td { border-bottom: 0; }
.t th { font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 600; }
.t td:first-child { color: var(--ink); font-weight: 600; }
.t--mono td:last-child { font: 500 13px var(--f-mono); word-break: break-all; }
.t--api td:first-child { font-weight: 500; width: 58%; }
.t--api code { border: 0; padding: 0; background: none; }

.risk-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.risk-list > div { background: #fff; border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow-soft); border-top: 3px solid; border-image: var(--grad) 1; border-image-slice: 1 0 0 0; }
.risk-list h3 { margin: 0 0 6px; font-size: 16px; }
.risk-list p { font-size: 14.5px; }

#faq details { margin-bottom: 10px; }

@media (max-width: 960px) {
  .docs { grid-template-columns: 1fr; gap: 20px; padding-top: 24px; }
  .docs__nav { position: sticky; top: 64px; z-index: 5; }
  .docs__nav details { background: rgba(255,255,255,.92); backdrop-filter: blur(12px); border-radius: 16px; box-shadow: var(--shadow-soft); padding: 0 16px; }
  .docs__nav summary { display: block; padding: 14px 30px 14px 0; font: 600 15px var(--f-body); }
  .docs__nav nav { padding-bottom: 14px; max-height: 60vh; overflow: auto; }
  .risk-list { grid-template-columns: 1fr; }
}
