/* ==========================================================================
   Public status page (redesign v1.17.x) — /status, /status/history, /status/incidents/{id},
   /status/subscribe, /status/unsubscribe. Self-contained: only the status views load this file,
   and every rule is scoped under body.sp, so nothing else in the panel is affected.
   Look: the CLAUDE.md design system (OLED default, indigo accent) + the new store's type and cards.
   Themes: body.theme-oled (default) / .theme-dark / .theme-light — same classes as the panel.
   ========================================================================== */

body.sp {
    --bg: #000;
    --surface: rgba(255, 255, 255, .025);
    --surface-2: rgba(255, 255, 255, .05);
    --border: rgba(255, 255, 255, .09);
    --border-2: rgba(255, 255, 255, .16);
    --text: #fff;
    --text-2: rgba(255, 255, 255, .74);
    --text-3: rgba(255, 255, 255, .58);
    --accent: #6366f1;
    --accent-soft: #818cf8;
    --focus: #a5b4fc;
    --sheen: 255, 255, 255;
    /* status colours: fill (bars, dots) + readable text on this canvas */
    --ok: #34d399;    --ok-t: #34d399;
    --info: #818cf8;  --info-t: #a5b4fc;
    --warn: #fbbf24;  --warn-t: #fbbf24;
    --orange: #fb923c; --orange-t: #fdba74;
    --bad: #f87171;   --bad-t: #fca5a5;
    --nd: rgba(255, 255, 255, .13);
    --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 20px 40px -28px rgba(0, 0, 0, .9);
    --radius: 18px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
}
body.sp.theme-dark { --bg: #0a0a0f; }
body.sp.theme-light {
    --bg: #f7f4ec;
    --surface: #fff;
    --surface-2: #f4f1e8;
    --border: rgba(15, 23, 42, .10);
    --border-2: rgba(15, 23, 42, .18);
    --text: #0f1222;
    --text-2: #3f4654;
    --text-3: #5b6170;
    --accent: #4f46e5;
    --accent-soft: #4f46e5;
    --focus: #4f46e5;
    --sheen: 15, 23, 42;
    --ok: #059669;    --ok-t: #047857;
    --info: #4f46e5;  --info-t: #4338ca;
    --warn: #d97706;  --warn-t: #92400e;
    --orange: #ea580c; --orange-t: #9a3412;
    --bad: #dc2626;   --bad-t: #b91c1c;
    --nd: rgba(15, 23, 42, .12);
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px -24px rgba(15, 23, 42, .35);
}

body.sp *, body.sp *::before, body.sp *::after { box-sizing: border-box; }
body.sp h1, body.sp h2, body.sp h3, body.sp p, body.sp ol, body.sp ul, body.sp dl, body.sp dd { margin: 0; padding: 0; }
body.sp ol, body.sp ul { list-style: none; }
body.sp a { color: var(--accent-soft); text-decoration: none; }
body.sp.theme-light a { color: var(--accent); }
body.sp a:hover { text-decoration: underline; text-underline-offset: 3px; }
body.sp svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
body.sp :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
body.sp main:focus { outline: none; }

.sp .sp-wrap { width: min(1080px, 100% - 2.5rem); margin-inline: auto; }
.sp .sp-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sp .sp-muted { color: var(--text-3); }
.sp .sp-skip { position: absolute; left: 1rem; top: -3rem; z-index: 50; padding: .55rem .9rem; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 700; }
.sp .sp-skip:focus { top: .75rem; }

/* ── top bar ── */
.sp .sp-top { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px); }
.sp .sp-top-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.sp .sp-brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--text) !important; text-decoration: none !important; min-width: 0; }
.sp .sp-brand img { width: 32px; height: 32px; object-fit: contain; }
.sp.theme-light .sp-brand img, .sp.theme-light .sp-foot-brand img { filter: invert(1); }
.sp .sp-brand-name { font-weight: 800; letter-spacing: -.01em; font-size: 1.05rem; }
.sp .sp-brand-tag { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); padding: .18rem .5rem; border-radius: 999px; border: 1px solid var(--border-2); }
.sp .sp-nav { display: flex; align-items: center; gap: .35rem; }
.sp .sp-nav-link { padding: .45rem .7rem; border-radius: 10px; color: var(--text-2) !important; font-weight: 700; font-size: .9rem; text-decoration: none !important; }
.sp .sp-nav-link:hover { background: var(--surface-2); color: var(--text) !important; }
.sp .sp-nav-link.is-active { color: var(--text) !important; background: var(--surface-2); }
.sp .sp-theme svg { width: 18px; height: 18px; }
.sp .sp-theme { margin-left: .2rem; }

/* ── buttons / pills / chips ── */
.sp .sp-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 42px; padding: .55rem 1rem; border-radius: 12px; border: 1px solid transparent; background: var(--accent); color: #fff !important; font: inherit; font-weight: 700; font-size: .92rem; text-decoration: none !important; cursor: pointer; transition: filter .15s, background .15s; }
.sp .sp-btn:hover { filter: brightness(1.1); }
.sp .sp-btn svg { width: 17px; height: 17px; }
.sp .sp-btn-sm { min-height: 38px; padding: .4rem .8rem; font-size: .88rem; border-radius: 10px; background: transparent; color: var(--text) !important; border-color: var(--border-2); }
.sp .sp-btn-sm:hover, .sp .sp-btn-sm.is-active { background: var(--surface-2); filter: none; }
.sp .sp-btn-ghost { background: transparent; color: var(--text) !important; border-color: var(--border-2); }
.sp .sp-btn-ghost:hover { background: var(--surface-2); filter: none; }
.sp .sp-btn-danger { background: var(--bad); color: #fff !important; }
.sp.theme-oled .sp-btn-danger, .sp.theme-dark .sp-btn-danger { background: #dc2626; }

.sp .sp-pill { --c: var(--ok); --ct: var(--ok-t); display: inline-flex; align-items: center; gap: .4rem; flex: none; padding: .22rem .62rem; border-radius: 999px; font-size: .78rem; font-weight: 700; line-height: 1.4; white-space: nowrap; color: var(--ct); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 32%, transparent); }
.sp .sp-pill.is-quiet { color: var(--text-2); background: var(--surface-2); border-color: var(--border); }
.sp .sp-pill-sm { font-size: .7rem; padding: .1rem .5rem; }
.sp .sp-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }

.sp .sp-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .85rem; }
.sp .sp-chips li { font-size: .78rem; font-weight: 700; color: var(--text-2); padding: .2rem .6rem; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); }

.sp .sp-link { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; font-size: .9rem; }
.sp .sp-meta { font-size: .82rem; color: var(--text-3); }

/* ── layout ── */
.sp .sp-main { flex: 1; padding: 2rem 0 4rem; }
.sp .sp-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.sp .sp-section { margin-top: 2.5rem; }
.sp .sp-section-head { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem 1rem; margin-bottom: 1rem; }
.sp .sp-section-head h2 { font-size: 1.2rem; font-weight: 800; letter-spacing: -.01em; }
.sp .sp-section-note { font-size: .85rem; }
.sp .sp-count { min-width: 1.6rem; padding: .05rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 700; text-align: center; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); }
.sp .sp-stack { display: grid; gap: .9rem; }
.sp .sp-empty { display: flex; align-items: center; gap: .8rem; padding: 1.15rem 1.25rem; color: var(--text-2); }
.sp .sp-empty svg { width: 24px; height: 24px; color: var(--ok); }
.sp .sp-empty b { color: var(--text); }

/* ── hero ── */
.sp .sp-hero { --c: var(--ok); position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem 2rem; flex-wrap: wrap; padding: 2rem 2.1rem; border-radius: 24px; border: 1px solid color-mix(in srgb, var(--c) 30%, var(--border)); background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--c) 16%, transparent), transparent 55%), var(--surface); box-shadow: var(--shadow); }
.sp .sp-hero::after { content: ""; position: absolute; inset: auto -10% -60% auto; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c) 10%, transparent), transparent 70%); pointer-events: none; }
.sp .sp-hero-main { position: relative; z-index: 1; display: flex; align-items: center; gap: 1.25rem; min-width: 0; flex: 1 1 420px; }
.sp .sp-hero-side { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-end; gap: .45rem; text-align: right; }
.sp .sp-orb { position: relative; flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, transparent); }
.sp .sp-orb::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--c) 45%, transparent); animation: sp-ring 2.8s ease-out infinite; }
.sp .sp-orb span { width: 20px; height: 20px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 22%, transparent), 0 0 26px color-mix(in srgb, var(--c) 70%, transparent); }
@keyframes sp-ring { 0% { transform: scale(.7); opacity: .9; } 80%, 100% { transform: scale(1.35); opacity: 0; } }
.sp .sp-eyebrow { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ct, var(--text-3)); margin-bottom: .2rem; }
.sp .sp-hero h1 { font-size: clamp(1.55rem, 1.1rem + 1.8vw, 2.25rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.15; }
.sp .sp-hero-sub { margin-top: .35rem; color: var(--text-2); max-width: 56ch; }
.sp .sp-updated { font-size: .88rem; color: var(--text-2); display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: .1rem .4rem; }
.sp .sp-updated time { font-weight: 700; color: var(--text); }
.sp .sp-abs { flex-basis: 100%; font-size: .8rem; color: var(--text-3); }
.sp .sp-refresh-note { font-size: .78rem; color: var(--text-3); margin-bottom: .35rem; }
.sp .sp-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); align-self: center; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
body.sp.is-refreshing .sp-live-dot { background: var(--accent-soft); }

/* ── incident / maintenance cards ── */
.sp .sp-inc { position: relative; padding: 1.2rem 1.35rem 1.15rem 1.6rem; overflow: hidden; }
.sp .sp-inc::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.sp .sp-inc-top { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .6rem; }
.sp .sp-inc-top .sp-meta { margin-left: auto; }
.sp .sp-inc-title { margin-top: .7rem; font-size: 1.12rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.35; }
.sp .sp-inc-title a { color: var(--text) !important; }
.sp .sp-latest { margin-top: .7rem; padding: .75rem .9rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.sp .sp-latest-h { font-size: .8rem; color: var(--text-3); margin-bottom: .2rem; }
.sp .sp-latest-h b { color: var(--ct); }
.sp .sp-desc { margin-top: .6rem; color: var(--text-2); }
.sp .sp-window { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .5rem 1.25rem; margin-top: .75rem; }
.sp .sp-window dt { font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.sp .sp-window dd { font-weight: 700; }
.sp .sp-inc > .sp-link { margin-top: .9rem; }
.sp .sp-more { margin-top: .85rem; }
.sp .sp-more summary { cursor: pointer; display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; font-size: .88rem; color: var(--text); list-style: none; padding: .3rem 0; }
.sp .sp-more summary::-webkit-details-marker { display: none; }
.sp .sp-more summary::before { content: ""; width: .5rem; height: .5rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; margin-right: .2rem; }
.sp .sp-more[open] summary::before { transform: rotate(45deg); }

/* timelines (active card + incident page) */
.sp .sp-timeline { position: relative; margin-top: .6rem; padding-left: 1.4rem; }
.sp .sp-timeline::before { content: ""; position: absolute; left: .4rem; top: .45rem; bottom: .45rem; width: 2px; background: var(--border); border-radius: 2px; }
.sp .sp-timeline li { position: relative; padding: 0 0 1rem; color: var(--text-2); }
.sp .sp-timeline li:last-child { padding-bottom: 0; }
.sp .sp-timeline li::before { content: ""; position: absolute; left: -1.27rem; top: .38rem; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--text-3); }
.sp .sp-timeline li.tl-investigating::before { border-color: var(--bad); }
.sp .sp-timeline li.tl-identified::before { border-color: var(--orange); }
.sp .sp-timeline li.tl-monitoring::before { border-color: var(--info); }
.sp .sp-timeline li.tl-resolved::before { border-color: var(--ok); background: var(--ok); }
.sp .sp-timeline li.tl-scheduled::before { border-color: var(--info); }
.sp .sp-tl-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .6rem; margin-bottom: .15rem; }
.sp .sp-tl-h b { color: var(--text); }
.sp .sp-tl-h time { font-size: .8rem; color: var(--text-3); }

/* ── components ── */
.sp .sp-legend { display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin-left: auto; font-size: .78rem; color: var(--text-3); }
.sp .sp-legend li { display: inline-flex; align-items: center; gap: .35rem; }
.sp .sp-legend i { width: 9px; height: 9px; border-radius: 3px; }
.sp .sp-groups { display: grid; gap: 1rem; }
.sp .sp-group { --c: var(--ok); overflow: hidden; }
.sp .sp-group-head { display: flex; align-items: center; gap: .85rem; padding: 1rem 1.25rem; cursor: pointer; list-style: none; user-select: none; }
.sp .sp-group-head::-webkit-details-marker { display: none; }
.sp .sp-group-head:hover { background: var(--surface-2); }
.sp .sp-group[open] > .sp-group-head { border-bottom: 1px solid var(--border); }
.sp .sp-chev { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--text-3); background: var(--surface-2); }
.sp .sp-chev svg { width: 16px; height: 16px; transition: transform .18s; }
.sp .sp-group[open] .sp-chev svg { transform: rotate(90deg); }
.sp .sp-group-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sp .sp-group-name b { font-size: 1.02rem; font-weight: 800; letter-spacing: -.01em; }
.sp .sp-group-name small { font-size: .8rem; color: var(--text-3); }
.sp .sp-comps > li { padding: 1rem 1.25rem 1.05rem; }
.sp .sp-comps > li + li { border-top: 1px solid var(--border); }
.sp .sp-comp-row { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; margin-bottom: .7rem; }
.sp .sp-comp-name { min-width: 0; display: flex; flex-direction: column; }
.sp .sp-comp-name b { font-weight: 700; }
.sp .sp-comp-name small { font-size: .82rem; color: var(--text-3); }
.sp .sp-comp-msg { margin-top: .3rem; font-size: .82rem; color: var(--ct); overflow-wrap: anywhere; }

/* the 90-day strip: always fits its card (no horizontal page scroll), bars stay rounded */
.sp .sp-bars { display: grid; grid-template-columns: repeat(90, minmax(0, 1fr)); gap: 3px; height: 34px; touch-action: pan-y; }
.sp .sp-bars .b { display: block; height: 100%; min-width: 0; border-radius: 3px; background: var(--ok); opacity: .92; transition: opacity .12s, transform .12s; cursor: default; }
.sp .sp-bars .b:hover, .sp .sp-bars .b.is-active, .sp .sp-bars .b:focus-visible { opacity: 1; transform: scaleY(1.12); }
.sp .sp-bars .b:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-radius: 3px; }
.sp .u-ok { background: var(--ok) !important; }
.sp .u-warn { background: var(--warn) !important; }
.sp .u-orange { background: var(--orange) !important; }
.sp .u-bad { background: var(--bad) !important; }
.sp .u-nd { background: var(--nd) !important; }
.sp .sp-bars .b.u-nd { opacity: 1; }
/* a day with a posted incident gets an amber cap, even when uptime stayed green */
.sp .sp-bars .b.has-inc { box-shadow: inset 0 4px 0 var(--warn); }
.sp .sp-bars .b.has-inc.u-warn { box-shadow: inset 0 4px 0 var(--bad); }
.sp .sp-bars-foot { display: flex; align-items: center; gap: .75rem; margin-top: .45rem; font-size: .74rem; color: var(--text-3); }
.sp .sp-bars-foot::before, .sp .sp-bars-foot::after { content: none; }
.sp .sp-bars-foot span:nth-child(2) { flex: 1; text-align: center; position: relative; }
.sp .sp-bars-pct { font-weight: 700; color: var(--text-2); }

/* tooltip (one element, positioned by status-page.js) */
.sp .sp-tip { position: fixed; z-index: 60; max-width: min(280px, calc(100vw - 16px)); padding: .6rem .75rem; border-radius: 12px; background: #111218; color: #fff; border: 1px solid rgba(255, 255, 255, .14); box-shadow: 0 14px 34px -12px rgba(0, 0, 0, .8); font-size: .8rem; line-height: 1.45; pointer-events: none; }
.sp.theme-light .sp-tip { background: #fff; color: #0f1222; border-color: rgba(15, 23, 42, .14); box-shadow: 0 14px 34px -14px rgba(15, 23, 42, .4); }
.sp .sp-tip b { display: block; font-size: .82rem; }
.sp .sp-tip .t-u { display: flex; align-items: center; gap: .4rem; margin-top: .1rem; }
.sp .sp-tip .t-u i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.sp .sp-tip ul { margin-top: .35rem; padding-top: .35rem; border-top: 1px solid rgba(var(--sheen), .12); }
.sp .sp-tip li { position: relative; padding-left: .8rem; }
.sp .sp-tip li::before { content: ""; position: absolute; left: 0; top: .5rem; width: 5px; height: 5px; border-radius: 50%; background: var(--warn); }
.sp .sp-tip .t-none { margin-top: .2rem; opacity: .7; }

/* ── past incidents ── */
.sp .sp-past { display: grid; gap: 1.4rem; }
.sp .sp-past-date { font-size: .82rem; font-weight: 700; letter-spacing: .02em; color: var(--text-3); margin-bottom: .55rem; }
.sp .sp-past-list { display: grid; gap: .6rem; }
.sp .sp-past-item { position: relative; display: flex; gap: .85rem; padding: .9rem 1.1rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.sp .sp-past-dot { flex: none; width: 10px; height: 10px; margin-top: .45rem; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent); }
.sp .sp-past-body { min-width: 0; flex: 1; }
.sp .sp-past-row { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; }
.sp .sp-past-row a { font-weight: 700; color: var(--text) !important; overflow-wrap: anywhere; }
.sp .sp-past-msg { margin-top: .2rem; font-size: .88rem; color: var(--text-2); overflow-wrap: anywhere; }
.sp .sp-past-item .sp-meta { margin-top: .25rem; }
.sp .sp-history-link { margin-top: 1.1rem; }
.sp .sp-open { color: var(--warn-t); font-weight: 700; }

/* history page */
.sp .sp-page-head { margin-bottom: 1.75rem; }
.sp .sp-page-head h1 { font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2rem); font-weight: 800; letter-spacing: -.02em; }
.sp .sp-page-head p { color: var(--text-2); margin-top: .3rem; }
.sp .sp-back { display: inline-flex; align-items: center; gap: .35rem; font-size: .88rem; font-weight: 700; margin-bottom: 1rem; color: var(--text-2) !important; }
.sp .sp-back:hover { color: var(--text) !important; }
.sp .sp-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; margin-top: 2rem; }
.sp .sp-pager a, .sp .sp-pager span { min-width: 40px; min-height: 40px; display: inline-grid; place-items: center; padding: 0 .75rem; border-radius: 10px; font-weight: 700; font-size: .88rem; border: 1px solid var(--border); background: var(--surface); color: var(--text-2) !important; text-decoration: none !important; }
.sp .sp-pager a:hover { border-color: var(--border-2); color: var(--text) !important; }
.sp .sp-pager .is-current { background: var(--accent); border-color: var(--accent); color: #fff !important; }

/* incident detail */
.sp .sp-detail { --c: var(--warn); padding: 1.6rem 1.75rem; border-color: color-mix(in srgb, var(--c) 30%, var(--border)); background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--c) 12%, transparent), transparent 55%), var(--surface); }
.sp .sp-detail h1 { margin-top: .75rem; font-size: clamp(1.4rem, 1.05rem + 1.4vw, 1.9rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; overflow-wrap: anywhere; }
.sp .sp-detail .sp-desc { font-size: 1rem; }
.sp .sp-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; margin-top: 1.25rem; }
.sp .sp-facts > div { padding: .7rem .85rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.sp .sp-facts dt { font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.sp .sp-facts dd { margin-top: .1rem; font-weight: 700; }
.sp .sp-card.sp-pad { padding: 1.35rem 1.5rem; }
.sp .sp-cta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding: 1.35rem 1.5rem; }
.sp .sp-cta h2 { font-size: 1.05rem; font-weight: 800; }
.sp .sp-cta p { color: var(--text-2); font-size: .92rem; }

/* subscribe / unsubscribe */
.sp .sp-narrow { max-width: 560px; margin-inline: auto; }
.sp .sp-form { padding: 1.5rem; }
.sp .sp-form label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: .4rem; }
.sp .sp-input { width: 100%; min-height: 46px; padding: .65rem .85rem; border-radius: 12px; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text); font: inherit; }
.sp .sp-input::placeholder { color: var(--text-3); }
.sp .sp-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.sp .sp-form .sp-btn { width: 100%; margin-top: .9rem; }
.sp .sp-hint { margin-top: .9rem; font-size: .84rem; color: var(--text-3); text-align: center; }
.sp .sp-alert { display: flex; gap: .65rem; align-items: flex-start; padding: .85rem 1rem; border-radius: 12px; margin-bottom: 1rem; font-size: .92rem; color: var(--ct); background: color-mix(in srgb, var(--c) 12%, transparent); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.sp .sp-alert svg { width: 20px; height: 20px; margin-top: .05rem; }
.sp .sp-msg { padding: 2rem 1.5rem; text-align: center; }
.sp .sp-msg-icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 1rem; border-radius: 50%; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.sp .sp-msg-icon svg { width: 26px; height: 26px; }
.sp .sp-msg h1 { font-size: 1.3rem; font-weight: 800; }
.sp .sp-msg p { color: var(--text-2); margin: .4rem 0 1.25rem; }
.sp .sp-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }
.sp .sp-benefits { display: grid; gap: .5rem; margin: 0 0 1.25rem; color: var(--text-2); font-size: .92rem; }
.sp .sp-benefits li { display: flex; gap: .55rem; align-items: flex-start; }
.sp .sp-benefits svg { width: 18px; height: 18px; color: var(--ok); margin-top: .15rem; }

/* ── footer ── */
.sp .sp-foot { border-top: 1px solid var(--border); padding: 1.6rem 0 calc(1.6rem + env(safe-area-inset-bottom)); font-size: .85rem; color: var(--text-3); }
.sp .sp-foot-in { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem 2rem; }
.sp .sp-foot-brand { display: flex; align-items: center; gap: .6rem; }
.sp .sp-foot-brand img { width: 24px; height: 24px; object-fit: contain; opacity: .85; }
.sp .sp-foot-links { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; }
.sp .sp-foot-links a { display: inline-flex; align-items: center; gap: .3rem; color: var(--text-2) !important; }
.sp .sp-foot-links a:hover { color: var(--text) !important; }

/* ── responsive ── */
@media (max-width: 768px) {
    .sp .sp-wrap { width: min(1080px, 100% - 1.75rem); }
    .sp .sp-top-in { min-height: 58px; }
    .sp .sp-brand-name { display: none; }
    .sp .sp-nav-link { padding: .45rem .55rem; }
    .sp .sp-main { padding-top: 1.25rem; }
    .sp .sp-hero { padding: 1.4rem 1.25rem; border-radius: 20px; }
    .sp .sp-hero-main { flex-basis: 100%; align-items: flex-start; gap: 1rem; }
    .sp .sp-orb { width: 44px; height: 44px; margin-top: .2rem; }
    .sp .sp-orb span { width: 16px; height: 16px; }
    .sp .sp-hero-side { align-items: stretch; text-align: left; flex-basis: 100%; }
    .sp .sp-updated { justify-content: flex-start; }
    .sp .sp-section { margin-top: 2rem; }
    .sp .sp-legend { margin-left: 0; flex-basis: 100%; }
    .sp .sp-inc { padding: 1.05rem 1rem 1rem 1.25rem; }
    .sp .sp-inc-top .sp-meta { margin-left: 0; flex-basis: 100%; }
    .sp .sp-group-head { padding: .9rem 1rem; gap: .7rem; }
    .sp .sp-comps > li { padding: .9rem 1rem; }
    .sp .sp-bars { gap: 1px; height: 30px; }
    .sp .sp-bars .b { border-radius: 2px; }
    .sp .sp-detail { padding: 1.25rem 1.1rem; }
    .sp .sp-foot-in { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
    .sp .sp-nav { gap: .15rem; }
    .sp .sp-btn-sm span { display: none; }
    .sp .sp-btn-sm { width: 38px; padding: 0; }
    .sp .sp-group-name small { font-size: .76rem; }
    .sp .sp-group-head .sp-pill { padding: .2rem .5rem; }
    .sp .sp-comp-row { flex-wrap: wrap; }
}
@media (max-width: 360px) {
    .sp .sp-brand-tag { display: none; }
    .sp .sp-group-head .sp-pill { font-size: 0; gap: 0; padding: .35rem; }
}

@media (prefers-reduced-motion: reduce) {
    .sp *, .sp *::before, .sp *::after { animation: none !important; transition: none !important; }
    .sp .sp-bars .b:hover, .sp .sp-bars .b.is-active, .sp .sp-bars .b:focus-visible { transform: none; }
}

@media (forced-colors: active) {
    .sp .sp-bars .b { forced-color-adjust: none; }
    .sp .sp-pill, .sp .sp-card { border: 1px solid CanvasText; }
}

@media print {
    .sp .sp-top, .sp .sp-btn, .sp .sp-foot-links, .sp .sp-tip { display: none !important; }
    body.sp { background: #fff; color: #000; }
}

/* status tones last, so they win over the per-block --c defaults above (hero / group / detail). */
.sp .tone-ok { --c: var(--ok); --ct: var(--ok-t); }
.sp .tone-info { --c: var(--info); --ct: var(--info-t); }
.sp .tone-warn { --c: var(--warn); --ct: var(--warn-t); }
.sp .tone-orange { --c: var(--orange); --ct: var(--orange-t); }
.sp .tone-bad { --c: var(--bad); --ct: var(--bad-t); }
