/* ScrapeGuys components. Every colour, space and radius is a token from tokens.json.
   Classes are prefixed sg-. Dark is the default theme; set data-theme="light" on <html> for light. */

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-sans); font-size: 14px; line-height: 20px; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:where(a) { color: var(--accent); text-decoration: none; }
:where(a):hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }
:where(a, button, input, select, summary, [tabindex]):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--ion); color: var(--on-ion); }

/* ---------- type helpers ---------- */
.sg-display-xl, .sg-display-lg, .sg-display-md, .sg-display-sm { font-family: var(--font-display); font-weight: 400; margin: 0; color: var(--text); text-wrap: balance; }
.sg-display-xl { font-size: 56px; line-height: 64px; letter-spacing: -0.02em; }
.sg-display-lg { font-size: 40px; line-height: 48px; letter-spacing: -0.02em; }
.sg-display-md { font-size: 28px; line-height: 36px; letter-spacing: -0.015em; }
.sg-display-sm { font-size: 20px; line-height: 28px; letter-spacing: -0.01em; }
.sg-lead { font-size: 18px; line-height: 28px; color: var(--text-muted); margin: 0; max-width: 60ch; }
.sg-muted { color: var(--text-muted); }
.sg-small { font-size: 13px; line-height: 18px; }
.sg-label { font-family: var(--font-mono); font-variation-settings: "wdth" 100; font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.sg-eyebrow { font-family: var(--font-mono); font-variation-settings: "wdth" 100; font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); display: inline-flex; gap: var(--space-3); align-items: center; }
.sg-eyebrow__index::before { content: "[ "; } .sg-eyebrow__index::after { content: " ]"; }
.sg-mono { font-family: var(--font-mono); font-variation-settings: "wdth" 87.5; font-size: 12px; line-height: 18px; }
.sg-inline-code { font-family: var(--font-mono); font-variation-settings: "wdth" 87.5; font-size: 12px; line-height: 18px; background: var(--surface-raised); color: var(--text); border-radius: var(--radius-xs); padding: 1px 6px; }

/* the highlight: the field you selected on the page */
.sg-mark { background: linear-gradient(var(--ion), var(--ion)) 0 58% / 100% 76% no-repeat; color: var(--on-ion); padding: 0 0.16em; border-radius: var(--radius-xs); white-space: nowrap; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* HUD corner brackets: top-left and bottom-right, the two corners of the logo */
.sg-frame { position: relative; }
.sg-frame::before, .sg-frame::after { content: ""; position: absolute; width: var(--bracket); height: var(--bracket); border: 0 solid var(--accent); pointer-events: none; }
.sg-frame::before { left: -1px; top: -1px; border-left-width: 1.5px; border-top-width: 1.5px; }
.sg-frame::after { right: -1px; bottom: -1px; border-right-width: 1.5px; border-bottom-width: 1.5px; }

/* the 24px dot grid, marketing surfaces only */
.sg-grid-bg { background-image: radial-gradient(circle, var(--line) 1px, transparent 1.4px); background-size: var(--grid-pitch) var(--grid-pitch); }

/* status glyphs: shape carries the meaning, colour repeats it */
.sg-glyph { display: inline-block; flex: none; width: 7px; height: 7px; background: currentColor; }
.sg-glyph--warn { width: 9px; height: 8px; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.sg-glyph--danger { transform: rotate(45deg); }
.sg-glyph--idle { background: transparent; border: 1.5px solid currentColor; }

/* ---------- Logo ---------- */
.sg-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--font-display); font-size: 17px; line-height: 1; letter-spacing: -0.01em; text-decoration: none; }
.sg-logo:hover { color: var(--text); text-decoration: none; }
.sg-logo__mark { width: 28px; height: 28px; flex: none; }
.sg-logo__mark .frame { fill: currentColor; } .sg-logo__mark .datum { fill: var(--accent); }
.sg-logo--sm { font-size: 14px; gap: 8px; } .sg-logo--sm .sg-logo__mark { width: 22px; height: 22px; }
.sg-logo--lg { font-size: 26px; gap: 14px; } .sg-logo--lg .sg-logo__mark { width: 44px; height: 44px; }

/* ---------- Button ---------- */
.sg-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); height: var(--control-h); padding: 0 var(--space-4); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: transparent; color: var(--text); font-family: var(--font-mono); font-variation-settings: "wdth" 100; font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; cursor: pointer; text-decoration: none; transition: background-color 120ms, border-color 120ms, color 120ms, box-shadow 120ms; }
.sg-btn:hover { background: var(--surface-raised); border-color: var(--text); color: var(--text); text-decoration: none; }
.sg-btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.sg-btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); box-shadow: var(--shadow-glow); }
.sg-btn--danger { background: var(--danger-fill); border-color: var(--danger-fill); color: var(--on-danger); }
.sg-btn--danger:hover { background: var(--danger-fill); border-color: var(--text); color: var(--on-danger); }
.sg-btn--sm { height: var(--control-h-sm); padding: 0 var(--space-3); font-size: 11px; }
.sg-btn--lg { height: 44px; padding: 0 var(--space-5); }
.sg-btn--block { display: flex; width: 100%; }
.sg-btn:disabled, .sg-btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.sg-btn svg { width: 14px; height: 14px; flex: none; }
.sg-link { color: var(--accent); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0; font: inherit; font-weight: 500; cursor: pointer; }
.sg-link:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }
.sg-link svg { width: 14px; height: 14px; }

/* ---------- Field ---------- */
.sg-field { display: grid; gap: 6px; }
.sg-input, .sg-select { width: 100%; height: var(--control-h); padding: 0 var(--space-3); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-raised); color: var(--text); font: inherit; font-size: 14px; }
.sg-input::placeholder { color: var(--text-muted); }
.sg-input:hover, .sg-select:hover { border-color: var(--text); }
.sg-input:focus-visible, .sg-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.sg-input[aria-invalid="true"] { border-color: var(--danger); }
.sg-select { appearance: none; padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%); background-position: calc(100% - 17px) 15px, calc(100% - 12px) 15px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.sg-field__help { font-size: 13px; line-height: 18px; color: var(--text-muted); }
.sg-field__error { font-size: 13px; line-height: 18px; color: var(--danger); display: flex; align-items: center; gap: var(--space-2); }
.sg-check { display: inline-flex; align-items: flex-start; gap: var(--space-2); font-size: 14px; cursor: pointer; }
.sg-check input { appearance: none; flex: none; width: 16px; height: 16px; margin: 2px 0 0; border: 1px solid var(--line-strong); border-radius: var(--radius-xs); background: var(--surface-raised); cursor: pointer; }
.sg-check input:checked { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px var(--surface-raised); }
/* Forced colors drop the drawn select arrow and the checked fill: hand both back to the browser. */
@media (forced-colors: active) {
  .sg-select { appearance: auto; }
  .sg-check input { appearance: auto; }
}

/* ---------- Chip ---------- */
.sg-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px var(--space-2); border-radius: var(--radius-xs); background: var(--surface-raised); color: var(--text); font-family: var(--font-mono); font-variation-settings: "wdth" 100; font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.sg-chip--ok { background: var(--ok-soft); color: var(--ok); }
.sg-chip--warn { background: var(--warn-soft); color: var(--warn); }
.sg-chip--danger { background: var(--danger-soft); color: var(--danger); }
.sg-chip--accent { background: var(--accent-soft); color: var(--accent); }
.sg-chip--outline { background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--text-muted); }
.sg-tag { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-xs); color: var(--text); font-size: 13px; text-decoration: none; transition: border-color 120ms, color 120ms; }
.sg-tag:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ---------- Panel ---------- */
.sg-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-5); }
.sg-panel__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); }
.sg-panel__title { font-size: 16px; line-height: 24px; font-weight: 600; margin: 0; }
.sg-kv { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-2) var(--space-6); margin: 0; }
.sg-kv dt { color: var(--text-muted); } .sg-kv dd { margin: 0; }

/* ---------- StatTile ---------- */
.sg-stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-4); min-width: 0; }
.sg-stat__value { font-family: var(--font-display); font-size: 22px; line-height: 28px; letter-spacing: -0.01em; margin-top: var(--space-2); white-space: nowrap; }
.sg-stat__value--money { font-family: var(--font-sans); font-weight: 600; letter-spacing: -0.01em; }
.sg-stat__sub { font-size: 13px; line-height: 18px; color: var(--text-muted); margin-top: 2px; }
.sg-stat--lg { padding: var(--space-5) var(--space-6); }
.sg-stat--lg .sg-stat__value { font-size: 40px; line-height: 44px; letter-spacing: -0.02em; margin: 0 0 var(--space-2); }
.sg-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--space-4); }
/* joined strip of readouts for marketing pages */
.sg-stats--strip { gap: 0; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.sg-stats--strip .sg-stat { border: 0; border-right: 1px solid var(--line); border-radius: 0; background: transparent; }
.sg-stats--strip .sg-stat:last-child { border-right: 0; }

/* ---------- Meter ---------- */
.sg-meter__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); }
.sg-meter__pct { font-family: var(--font-display); font-size: 28px; line-height: 36px; letter-spacing: -0.015em; }
.sg-meter__pct small { font-family: var(--font-sans); font-size: 16px; font-weight: 600; letter-spacing: 0; color: var(--text-muted); margin-left: 3px; }
.sg-meter__bar { position: relative; height: 10px; background: var(--surface-raised); -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 6px, transparent 6px 8px); mask-image: repeating-linear-gradient(90deg, #000 0 6px, transparent 6px 8px); }
.sg-meter__fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); }
.sg-meter__reserved { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, var(--chart-4) 0 2px, transparent 2px 4px); }
.sg-meter--warn .sg-meter__fill { background: var(--warn); }
.sg-meter--danger .sg-meter__fill { background: var(--danger); }
.sg-meter__ticks { position: relative; height: 6px; }
.sg-meter__ticks i { position: absolute; top: 0; width: 1px; height: 6px; background: var(--text-muted); }
.sg-meter__foot { display: flex; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-2); font-size: 13px; line-height: 18px; color: var(--text-muted); }

/* ---------- Table ---------- */
.sg-table-wrap { overflow-x: auto; }
.sg-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.sg-table th { font-family: var(--font-mono); font-variation-settings: "wdth" 100; font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); text-align: left; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); white-space: nowrap; }
.sg-table td { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--line); vertical-align: middle; }
.sg-table .num { text-align: right; }
.sg-table tbody tr:hover td { background: var(--surface-raised); }
.sg-table tbody tr[aria-selected="true"] td { background: var(--accent-soft); }
.sg-table tbody tr:last-child td { border-bottom: 0; }

/* ---------- Tabs ---------- */
.sg-tabs { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.sg-tabs button { height: var(--control-h-sm); padding: 0 var(--space-3); border: 0; border-radius: var(--radius-xs); background: transparent; color: var(--text-muted); font-family: var(--font-mono); font-variation-settings: "wdth" 100; font-size: 11px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; }
.sg-tabs button:hover { color: var(--text); }
.sg-tabs button[aria-selected="true"], .sg-tabs button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

/* ---------- Notice ---------- */
.sg-notice { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--accent-soft); color: var(--text); }
.sg-notice > .sg-glyph { margin-top: 7px; color: var(--accent); }
.sg-notice strong { font-weight: 600; }
.sg-notice--ok { background: var(--ok-soft); } .sg-notice--ok > .sg-glyph { color: var(--ok); }
.sg-notice--warn { background: var(--warn-soft); } .sg-notice--warn > .sg-glyph { color: var(--warn); margin-top: 6px; }
.sg-notice--danger { background: var(--danger-soft); } .sg-notice--danger > .sg-glyph { color: var(--danger); }

/* ---------- SideNav (portal shell) ---------- */
.sg-sidenav { display: flex; flex-direction: column; gap: var(--space-1); width: var(--sidebar-w); padding: var(--space-5) var(--space-3); background: var(--surface); border-right: 1px solid var(--line); }
.sg-sidenav__brand { padding: 0 var(--space-2) var(--space-4); }
.sg-sidenav__brand .sg-label { display: block; margin-top: var(--space-2); }
.sg-sidenav a.sg-sidenav__item { display: flex; align-items: center; gap: 10px; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); color: var(--text); text-decoration: none; }
.sg-sidenav__item::before { content: ""; width: 6px; height: 6px; flex: none; background: transparent; }
.sg-sidenav a.sg-sidenav__item:hover { background: var(--surface-raised); color: var(--text); }
.sg-sidenav a.sg-sidenav__item[aria-current="page"] { background: var(--surface-raised); color: var(--accent); font-weight: 600; }
.sg-sidenav__item[aria-current="page"]::before { background: var(--accent); }
.sg-sidenav__item svg { width: 12px; height: 12px; margin-left: auto; color: var(--text-muted); }
.sg-sidenav__who { margin-top: auto; padding: var(--space-4) var(--space-2) 0; border-top: 1px solid var(--line); display: grid; gap: 2px; font-size: 13px; line-height: 18px; word-break: break-all; }
.sg-sidenav__who .sg-btn { margin-top: var(--space-3); }

/* ---------- CopyField ---------- */
.sg-copy { display: flex; align-items: stretch; border: 1px solid var(--code-line); border-radius: var(--radius-sm); background: var(--code-bg); overflow: hidden; }
.sg-copy code { flex: 1; min-width: 0; padding: 9px var(--space-3); font-family: var(--font-mono); font-variation-settings: "wdth" 87.5; font-size: 12px; line-height: 18px; color: var(--code-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; user-select: all; }
.sg-copy button { border: 0; border-left: 1px solid var(--code-line); background: transparent; color: var(--code-key); padding: 0 var(--space-3); font-family: var(--font-mono); font-variation-settings: "wdth" 100; font-size: 11px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer; }
.sg-copy button:hover { background: var(--code-line); }
.sg-copy button:focus-visible { outline: 2px solid var(--code-key); outline-offset: -2px; }

/* ---------- CodeBlock ---------- */
.sg-code { border: 1px solid var(--code-line); border-radius: var(--radius-md); background: var(--code-bg); color: var(--code-text); overflow: hidden; }
.sg-code__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) var(--space-4); border-bottom: 1px solid var(--code-line); font-family: var(--font-mono); font-variation-settings: "wdth" 100; font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--code-muted); }
.sg-code__bar .live { display: inline-flex; align-items: center; gap: 6px; color: var(--code-string); }
.sg-code pre { margin: 0; padding: var(--space-4); overflow-x: auto; font-family: var(--font-mono); font-variation-settings: "wdth" 87.5; font-size: 13px; line-height: 22px; }
.sg-code .c { color: var(--code-muted); } .sg-code .k { color: var(--code-key); } .sg-code .s { color: var(--code-string); } .sg-code .n { color: var(--code-number); }
.sg-endpoint { display: inline-flex; align-items: center; gap: var(--space-3); font-family: var(--font-mono); font-variation-settings: "wdth" 87.5; font-size: 13px; line-height: 22px; }
.sg-endpoint__method { font-variation-settings: "wdth" 100; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; padding: 1px 6px; border-radius: var(--radius-xs); background: var(--accent-soft); color: var(--accent); }
.sg-endpoint__method--post { background: var(--ok-soft); color: var(--ok); }

/* ---------- TopNav (marketing) ---------- */
.sg-topnav { display: flex; align-items: center; gap: var(--space-4); height: 64px; padding: 0 var(--space-6); background: var(--bg); border-bottom: 1px solid var(--line); }
.sg-topnav__links { display: flex; align-items: center; gap: var(--space-1); margin-left: auto; }
.sg-topnav__links a { white-space: nowrap; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); color: var(--text); font-weight: 500; text-decoration: none; }
.sg-topnav__links a:hover { background: var(--surface-raised); color: var(--text); }

/* ---------- Hero (marketing) ---------- */
.sg-hero { padding: var(--space-12) var(--space-6); }
.sg-hero__frame { padding: var(--space-8); max-width: 880px; }
.sg-hero__frame .sg-display-xl { margin-top: var(--space-4); }
.sg-hero__frame .sg-lead { margin-top: var(--space-5); }
.sg-hero__cta { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }
.sg-ticker { display: inline-flex; align-items: center; gap: var(--space-3); max-width: 100%; margin-top: var(--space-6); padding: var(--space-2) var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-muted); font-family: var(--font-mono); font-variation-settings: "wdth" 87.5; font-size: 12px; line-height: 18px; white-space: nowrap; overflow: hidden; }
.sg-ticker b { color: var(--text); font-weight: 500; }
.sg-ticker .sg-glyph { color: var(--ok); }

/* ---------- FeatureCard (marketing) ---------- */
.sg-card { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); transition: border-color 120ms; }
.sg-card:hover { border-color: var(--line-strong); }
.sg-card__top { display: flex; align-items: center; justify-content: space-between; }
.sg-card__icon { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--accent); }
.sg-card__icon svg { width: 18px; height: 18px; }
.sg-card p { margin: 0; color: var(--text-muted); font-size: 16px; line-height: 26px; }
.sg-card__tags { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.sg-ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.sg-ticks li { position: relative; padding-left: 18px; color: var(--text-muted); }
.sg-ticks li::before { content: ""; position: absolute; left: 0; top: 7px; width: 6px; height: 6px; background: var(--accent); }
.sg-ticks li b { color: var(--text); font-weight: 600; }

/* ---------- PlanCard ---------- */
.sg-plan { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.sg-plan--current { border-color: var(--accent); }
.sg-plan__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.sg-plan__price { font-size: 32px; line-height: 40px; font-weight: 600; letter-spacing: -0.02em; }
.sg-plan__price small { font-size: 14px; line-height: 20px; font-weight: 400; letter-spacing: 0; color: var(--text-muted); }
.sg-plan__foot { margin-top: auto; display: grid; gap: var(--space-2); }

/* ---------- Steps ---------- */
.sg-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-6); counter-reset: sg-step; list-style: none; margin: 0; padding: 0; }
.sg-steps li { counter-increment: sg-step; border-top: 1px solid var(--line); padding-top: var(--space-4); position: relative; }
.sg-steps li::before { content: counter(sg-step, decimal-leading-zero); display: block; font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: 0.08em; color: var(--accent); margin-bottom: var(--space-3); }
.sg-steps li::after { content: ""; position: absolute; left: 0; top: -4px; width: 7px; height: 7px; background: var(--accent); }
.sg-steps p { margin: var(--space-2) 0 0; color: var(--text-muted); }

/* ---------- Faq ---------- */
.sg-faq { border-top: 1px solid var(--line); }
.sg-faq details { border-bottom: 1px solid var(--line); }
.sg-faq summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-4) 0; font-size: 16px; line-height: 24px; font-weight: 600; cursor: pointer; list-style: none; }
.sg-faq summary::-webkit-details-marker { display: none; }
.sg-faq summary::after { content: ""; flex: none; width: 11px; height: 11px; background: linear-gradient(var(--accent), var(--accent)) center / 100% 1.5px no-repeat, linear-gradient(var(--accent), var(--accent)) center / 1.5px 100% no-repeat; }
.sg-faq details[open] summary::after { background: linear-gradient(var(--accent), var(--accent)) center / 100% 1.5px no-repeat; }
.sg-faq details > p { margin: 0; padding: 0 var(--space-8) var(--space-5) 0; color: var(--text-muted); font-size: 16px; line-height: 26px; max-width: 70ch; }

/* ---------- CtaBand ---------- */
.sg-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-6); padding: var(--space-12); background-color: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.sg-cta > div:first-child { flex: 1 1 360px; }
.sg-cta p { margin: var(--space-3) 0 0; color: var(--text-muted); font-size: 16px; line-height: 26px; max-width: 52ch; }
.sg-cta__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* ---------- Footer ---------- */
.sg-footer { padding: var(--space-12) var(--space-6) var(--space-6); border-top: 1px solid var(--line); background: var(--bg); }
.sg-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-8); }
.sg-footer__grid p { margin: var(--space-3) 0 0; color: var(--text-muted); font-size: 13px; line-height: 18px; max-width: 36ch; }
.sg-footer ul { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: grid; gap: var(--space-2); }
.sg-footer ul a { color: var(--text); } .sg-footer ul a:hover { color: var(--accent); }
.sg-footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-12); padding-top: var(--space-4); border-top: 1px solid var(--line); color: var(--text-muted); font-size: 12px; line-height: 16px; }

/* ---------- Chart ---------- */
.sg-chart { display: block; width: 100%; height: auto; }
.sg-chart .grid { stroke: var(--line); stroke-width: 1; }
.sg-chart .axis { stroke: var(--line-strong); stroke-width: 1; }
.sg-chart text { fill: var(--text-muted); font-family: var(--font-sans); font-size: 12px; }
.sg-chart .s1 { fill: var(--chart-1); } .sg-chart .s2 { fill: var(--chart-2); } .sg-chart .s3 { fill: var(--chart-3); } .sg-chart .s4 { fill: var(--chart-4); }
.sg-chart .s5 { fill: var(--chart-5); } .sg-chart .s6 { fill: var(--chart-6); } .sg-chart .s7 { fill: var(--chart-7); } .sg-chart .s8 { fill: var(--chart-8); }
/* s1-s6 are safe together. s7 and s8 need the mark labelled: see tokens.json meta.chartContract. */
.sg-chart .stroke1 { stroke: var(--chart-1); fill: none; stroke-width: 1.5; }
.sg-chart .mark { stroke: none; }
.sg-legend { display: flex; flex-wrap: wrap; gap: var(--space-4); font-size: 13px; line-height: 18px; color: var(--text-muted); }
.sg-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sg-legend i { width: 8px; height: 8px; }
.sg-legend .s1 { background: var(--chart-1); } .sg-legend .s2 { background: var(--chart-2); } .sg-legend .s3 { background: var(--chart-3); } .sg-legend .s4 { background: var(--chart-4); }
.sg-legend .s5 { background: var(--chart-5); } .sg-legend .s6 { background: var(--chart-6); } .sg-legend .s7 { background: var(--chart-7); } .sg-legend .s8 { background: var(--chart-8); }

/* ---------- preview scaffolding (not part of the product) ---------- */
.sg-demo { padding: var(--space-5); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); }
.sg-demo--stack { display: grid; gap: var(--space-4); align-items: start; }
.sg-demo--cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-4); align-items: stretch; }
.sg-demo--flush { padding: 0; display: block; }

@media (max-width: 720px) {
  .sg-display-xl { font-size: 32px; line-height: 40px; }
  .sg-display-lg { font-size: 28px; line-height: 36px; }
  .sg-hero { padding: var(--space-8) var(--space-4); } .sg-hero__frame { padding: var(--space-5); }
  .sg-cta { padding: var(--space-6); }
  .sg-footer__grid { grid-template-columns: 1fr 1fr; }
  .sg-stats--strip { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- small multiples: one mini-chart per source, shared y-scale ---------- */
.sg-multiples { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-4); }
.sg-multiple { border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-4); background: var(--surface); min-width: 0; }
.sg-multiple__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-2); }
.sg-multiple__name { font-family: var(--font-mono); font-variation-settings: "wdth" 100; font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.sg-multiple__total { font-family: var(--font-display); font-size: 20px; line-height: 28px; letter-spacing: -0.01em; color: var(--text); }
