body.stroke { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
.st { flex: 1; }
.st-in { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: clamp(24px, 3vw, 44px); align-items: start; padding-block: clamp(24px, 4vh, 44px) 0; }
/* the Stroke pages' class rows carry an icon, so their sidebar and drawer are 16 px wider (stroke.html's body is .st-iconned);
	OneShot's ShotScript docs sit three rows deep, so its body is .st-wide for the same width ("The shot command" fits) */
@media (min-width: 761px) { .st-iconned .st-in, .st-wide .st-in { grid-template-columns: 288px minmax(0, 1fr); } }
.st-iconned .side-drawer, .st-wide .side-drawer { width: min(336px, calc(100vw - 56px)); }

/* ---------- the sidebar ---------- */
.st-side:not(.side-drawer) { position: sticky; top: 88px; z-index: 2; }
.st-side:not(.side-drawer) .st-side-card { max-height: calc(100vh - 112px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.st-side-card { padding: 8px 8px 10px; border-radius: 24px; background: var(--card); box-shadow: var(--shadow-sm); }
.st-head { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 6px 0 10px; }
.st-mark { flex: none; width: auto; height: 25px; }
.st-brand { flex: 1; min-width: 0; margin: 0; font-weight: 900; font-size: 15px; line-height: 1; letter-spacing: .01em; white-space: nowrap; }
.st-head + .side, .side-hits-box + .side { margin-top: 2px; padding-top: 8px; }
.st-head + .side::before, .side-hits-box + .side::before { content: ""; position: absolute; top: 0; left: 12px; right: 12px; height: 1px; background: color-mix(in srgb, var(--ink) 8%, transparent); }
.st-close { display: none; flex: none; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background-color: var(--paper); color: var(--ink); cursor: pointer; -webkit-tap-highlight-color: transparent;
	transition: background-color .6s var(--ease), color .6s var(--ease), scale .6s var(--ease); }
.st-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
@media (hover: hover) { .st-close:hover { background-color: var(--ink); color: var(--paper); transition-duration: .35s, .35s, .6s; } }
.st-close:active { scale: .9; transition-duration: .35s, .35s, .4s; }
.st-close:focus-visible { outline-offset: 2px; border-radius: 50%; }
.side-drawer .st-side-card { padding: 0; border-radius: 0; background: none; box-shadow: none; }
.side-drawer .st-close { display: grid; }

/* ---------- the page ---------- */
.st-main { display: grid; gap: 14px; min-width: 0; }
.st-page { position: relative; min-height: 280px; --st-pad-x: clamp(28px, 3.4vw, 46px); padding: var(--st-pad-x); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-sm); overflow: clip; --i: 1; }
.st-view { min-width: 0; }
.st-view.st-leaving { position: absolute; pointer-events: none; }
.st-title { margin: 0; font-weight: 900; font-size: clamp(34px, 4vw, 52px); line-height: 1.05; letter-spacing: -.02em; overflow-wrap: anywhere; }
.st-line { margin-top: 14px; font-weight: 600; font-size: 17px; line-height: 1.4; color: var(--muted); }
.st-say { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- the drawer button (narrow screens) ---------- */
.st-open { display: none; align-items: center; gap: 10px; justify-self: start; position: sticky; top: 70px; z-index: 3; height: 46px; padding: 0 20px 0 6px; border: 0; border-radius: 999px; background: var(--card); color: var(--ink); font: inherit; font-weight: 800; font-size: 15px; line-height: 1; white-space: nowrap; cursor: pointer; box-shadow: var(--shadow-sm); overflow: clip; -webkit-tap-highlight-color: transparent; --i: 0;
	transition: translate .6s var(--ease), box-shadow .6s var(--ease), scale .6s var(--ease); }
.st-open-ico { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--paper); }
.st-open-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.st-open-text { padding-block: 4px; }
@media (hover: hover) { .st-open:hover { translate: 0 -2px; box-shadow: var(--shadow-md); transition-duration: .35s, .35s, .6s; } }
.st-open:active { scale: .96; transition-duration: .35s, .35s, .4s; }
.st-open:focus-visible { outline-offset: 3px; border-radius: 999px; }

@media (max-width: 760px) {
	.st-in { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 18px; }
	.st-side:not(.side-drawer) { display: none; }
	.st-open { display: inline-flex; }
	.st-page { min-height: 220px; --st-pad-x: 24px; padding: 26px var(--st-pad-x) 28px; }
}
@media (max-width: 640px) {
	.st-open { top: 66px; }
}

/* ---------- "On this page" (outline.js): a third column right of the card, drawn from 1400 px wide ----------
	At 1400 the card is 757 px (about 790 at 1440); the wrap widens to 1456 so the card keeps its width on bigger screens.
	The column is always there on a wide Stroke page, so the card never changes width when the router swaps pages. */
.st-outline { display: none; }
@media (min-width: 1400px) {
	.st-iconned .st-in { max-width: 1456px; grid-template-columns: 288px minmax(0, 1fr) 184px; }
	.st-outline { display: block; position: sticky; top: 88px; z-index: 1; max-height: calc(100vh - 112px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; opacity: 0; visibility: hidden;
		transition: opacity .35s var(--ease), visibility 0s .35s; }
	.st-outline.on { opacity: 1; visibility: visible; transition: opacity .6s var(--ease); }
}
.st-outline-title { margin: 0 0 8px 14px; font-weight: 800; font-size: 11px; line-height: 1.2; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.st-outline-list { position: relative; margin: 0; padding: 0; list-style: none; }
.st-outline-list::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 2px; border-radius: 2px; background: color-mix(in srgb, var(--ink) 10%, transparent); }
.st-outline-bar { position: absolute; top: 0; left: 0; width: 2px; height: 0; border-radius: 2px; background: var(--ink); pointer-events: none; }
.st-outline-list a { display: block; padding: 5px 6px 5px 14px; font-weight: 700; font-size: 13px; line-height: 1.3; color: var(--muted); text-decoration: none; overflow-wrap: anywhere; transform-origin: left center;
	transition: color .6s var(--ease), scale .6s var(--ease); }
.st-outline-list a.sub { padding-left: 26px; font-size: 12.5px; font-weight: 650; }
.st-outline-list a.on { color: var(--ink); }
@media (hover: hover) { .st-outline-list a:hover { color: var(--ink); transition-duration: .35s; } }
.st-outline-list a:active { scale: .97; transition-duration: .35s, .35s; }
.st-outline-list a:focus-visible { outline-offset: -2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { .st-outline, .st-outline.on { transition: none; } }
