/* Kaptain Stream: the shared shell for read-only pages (What's New, Status). Tokens follow DESIGN.md: obsidian, glass hairlines, one mint accent. */
/* The shared stylesheet makes html and body scroll containers, which breaks position: sticky. Clip sideways instead. */
html:has(body.hs-page), body.hs-page { overflow: visible; overflow-x: clip; }
html:has(body.hs-page) { scrollbar-gutter: stable; }
.hs-page {
  --hs-bg: #08090d; --hs-card: rgba(21,25,35,.75); --hs-border: rgba(255,255,255,.08); --hs-border-hi: rgba(255,255,255,.18);
  --hs-accent: #00f5a0; --hs-accent-text: #6dfac4;
  --hs-text: hsl(0,0%,98%); --hs-text-2: hsl(240,5%,75%); --hs-text-3: hsl(240,5%,62%);
  --hs-ok: hsl(142,70%,45%); --hs-warn: hsl(38,90%,50%); --hs-bad: hsl(0,75%,62%);
  --hs-ease: cubic-bezier(.2,0,0,1); --hs-hdr: 56px;
  margin: 0; background: var(--hs-bg); color: var(--hs-text); font-family: Inter, system-ui, sans-serif; line-height: 1.5;
}
html[data-theme="light"] .hs-page {
  --hs-bg: #f6f7f9; --hs-card: #fff; --hs-border: rgba(10,14,22,.12); --hs-border-hi: rgba(10,14,22,.28);
  --hs-accent-text: #00805a; --hs-text: #0b0d12; --hs-text-2: #3b4252; --hs-text-3: #596175;
  --hs-ok: hsl(142,70%,28%); --hs-warn: hsl(32,90%,34%); --hs-bad: hsl(0,70%,42%);
}
.hs-page ::selection { background: rgba(0,245,160,.3); color: inherit; }
.hs-page :focus-visible { outline: 2px solid var(--hs-accent-text); outline-offset: 3px; border-radius: 6px; }

.hs-main { max-width: 960px; margin: 0 auto; padding: calc(var(--hs-hdr) + 28px) 20px 96px; }
.hs-head h1 { font-family: Outfit, Inter, sans-serif; font-weight: 800; font-size: clamp(1.7rem, 3.2vw, 2.3rem); line-height: 1.1; margin: 0 0 8px; text-wrap: balance; }
.hs-lede { color: var(--hs-text-2); margin: 0; max-width: 62ch; }
.hs-updated { color: var(--hs-text-3); margin: 6px 0 0; font-size: .88rem; font-variant-numeric: tabular-nums; }
.hs-updated:empty { display: none; }

/* Contents beside the reading column on wide screens, a native disclosure on phones. */
.hs-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 28px; }
.hs-body { min-width: 0; max-width: 72ch; }
.hs-toc { border: 1px solid var(--hs-border); border-radius: 12px; background: var(--hs-card); }
.hs-toc summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 14px; font-weight: 600; color: var(--hs-text-2); cursor: pointer; list-style: none; }
.hs-toc summary::-webkit-details-marker { display: none; }
/* A drawn chevron (1.8px stroke) says it opens, and turns when it is open. */
.hs-toc summary::after { content: ''; flex: none; width: 16px; height: 16px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform .2s var(--hs-ease); }
.hs-toc[open] summary::after { transform: rotate(180deg); }
.hs-toc ol { list-style: none; margin: 0; padding: 0 6px 8px; }
.hs-toc a { display: flex; align-items: center; min-height: 44px; padding: 0 8px; border-radius: 8px; color: var(--hs-text-2); text-decoration: none; }
.hs-toc a:hover { color: var(--hs-text); background: rgba(255,255,255,.04); }
.hs-toc li[hidden] { display: none; }
@media (min-width: 900px) {
  .hs-layout { grid-template-columns: 200px minmax(0, 1fr); gap: 40px; }
  .hs-toc { position: sticky; top: calc(var(--hs-hdr) + 20px); align-self: start; border: 0; background: none; }
  .hs-toc summary { pointer-events: none; padding-left: 8px; color: var(--hs-text-3); font-size: .88rem; }
  .hs-toc summary::after { display: none; }
  .hs-toc ol { padding: 0; }
}

/* Plain text links inside reading copy keep an underline so they read as links without colour. */
.hs-body p a { color: var(--hs-accent-text); text-underline-offset: 3px; }

/* A quiet button: 44px, hairline border. Never mint, the page has no single primary action. */
.hs-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--hs-border-hi); background: rgba(255,255,255,.03); color: var(--hs-text); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.hs-btn:hover { border-color: var(--hs-accent-text); }

.hs-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hs-noscript { margin: 16px 0 0; padding: 14px 18px; border: 1px solid var(--hs-border); border-radius: 12px; color: var(--hs-text-2); }

@media (max-width: 520px) {
  .hs-main { padding-left: 16px; padding-right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .hs-page *, .hs-page *::before, .hs-page *::after { transition: none !important; animation: none !important; }
}
