/* Shared reading layout for Help, setup, build-agent, policy and the not-found page. */
.read-surface { min-height: 100vh; margin: 0; padding-bottom: 5rem; color: var(--ds-text); font: var(--ds-fs-md)/1.65 var(--ds-font); }
.read-surface *, .read-surface *::before, .read-surface *::after { box-sizing: border-box; }
.read-shell { padding-block: var(--ds-space-6) var(--ds-space-7); }
.read-surface .ds-page-header { max-width: 72ch; padding-block: var(--ds-space-7) var(--ds-space-5); }
.read-surface .ds-page-header :is(h1, .ds-title) { max-width: 19ch; padding-block: .1em; font-size: var(--ds-fs-page); line-height: 1; }
.read-surface .ds-lede { max-width: 65ch; }
.read-layout { display: grid; grid-template-columns: minmax(10rem, 12rem) minmax(0, 70ch); align-items: start; gap: clamp(var(--ds-space-5), 5vw, var(--ds-space-7)); }
.read-toc { position: sticky; top: 76px; align-self: start; border-top: 1px solid var(--ds-line); }
.read-toc-title { margin: 0; padding-block: var(--ds-space-3); color: var(--ds-text-muted); font: 700 var(--ds-fs-sm)/1.3 var(--ds-font); }
.read-toc a { display: flex; align-items: center; min-height: 44px; border-top: 1px solid var(--ds-line); color: var(--ds-text-muted); text-decoration: none; }
.read-toc a:hover, .read-toc a:focus-visible { color: var(--ds-cyan); text-decoration: underline; text-underline-offset: .2em; }
.read-toc a:focus-visible, .read-article a:focus-visible { outline: 3px solid var(--ds-cyan); outline-offset: 3px; }
.read-article { min-width: 0; max-width: 70ch; }
.read-section { padding-block: var(--ds-space-5); border-top: 1px solid var(--ds-line); scroll-margin-top: 84px; }
.read-heading, .player-policy-page .player-policy-section h2 { margin: 0 0 var(--ds-space-3); color: var(--ds-text); font: 800 var(--ds-fs-xl)/1.1 var(--ds-font-display); letter-spacing: .02em; text-transform: uppercase; text-wrap: balance; }
.read-section p { margin: var(--ds-space-3) 0 0; }
.read-section ul, .read-section ol { display: grid; gap: var(--ds-space-3); margin: var(--ds-space-4) 0 0; padding-left: 1.4rem; }
.read-section li { padding-left: var(--ds-space-1); }
.read-article a:not(.ds-btn) { color: var(--ds-cyan); text-decoration: underline; text-underline-offset: .2em; }
.read-article a:not(.ds-btn):hover { color: var(--ds-text); }
.read-article code { padding: 0 .25em; background: var(--ds-surface-2); color: var(--ds-text); font: .92em/1.4 var(--ds-font-mono); overflow-wrap: anywhere; }
.read-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-space-2) var(--ds-space-4); margin-top: var(--ds-space-5); }
.read-actions .ds-btn { text-decoration: none; }
.read-actions .ds-link { display: inline-flex; align-items: center; min-height: 44px; }
.help-steps li::marker { color: var(--ds-cyan); font-weight: 700; }
.setup-raw-link { margin-top: var(--ds-space-3); }
.setup-raw-link a { display: inline-flex; align-items: center; min-height: 44px; }
.not-found-page .ds-page-header { padding-block: clamp(6rem, 18vh, 11rem); }
.not-found-page .ds-title { max-width: 14ch; }

.player-policy-page { overflow-wrap: anywhere; }
.player-policy-page .read-layout { grid-template-columns: minmax(10rem, 12rem) minmax(0, 70ch); }
.player-policy-page .read-article { line-height: 1.65; }
.player-policy-section ul { gap: var(--ds-space-2); }
.player-policy-header { margin: 0; }
.player-policy-footer { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ds-space-2) var(--ds-space-3); padding-top: var(--ds-space-4); border-top: 1px solid var(--ds-line); color: var(--ds-text-muted); }
.player-policy-page .player-policy-footer a { display: inline-flex; align-items: center; min-height: 44px; }

@media (max-width: 900px) {
  .read-layout { display: block; }
  .read-toc { position: static; display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--ds-space-4); margin-bottom: var(--ds-space-4); border-bottom: 1px solid var(--ds-line); }
  .read-toc-title { flex: 0 0 100%; padding-block: var(--ds-space-2); }
  .read-toc a { min-height: 44px; border-top: 0; }
}

@media (max-width: 720px) {
  .read-shell { padding-block: var(--ds-space-4) var(--ds-space-7); }
  .read-surface .ds-page-header { padding-block: var(--ds-space-5) var(--ds-space-4); }
  .read-surface .ds-page-header :is(h1, .ds-title) { max-width: 16ch; font-size: var(--ds-fs-xl); line-height: 1.05; }
  .read-section { padding-block: var(--ds-space-4); }
  .not-found-page .ds-page-header { padding-block: 5rem; }
}
