:root {
  --focus-outline: #15803d;
  --status-color: var(--ink-muted);
  --dialog-shade: rgb(13 25 18 / .46);
}

.view.active { flex: none; }
.view.active ~ .global-footer-wrap { margin-top: 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 5px 12px; color: var(--ink-secondary); }
.footer-links a { display: inline-flex; align-items: center; min-height: 30px; }
.footer-links a:hover { color: var(--brand-hover); }
.catalog-price-note { color: var(--ink-secondary); margin: 2px 0 10px; }
.catalog-offsale { color: var(--ink-muted); font-size: 13px; }
.catalog-info-card { cursor: default; }
.support-admin-item { padding: 12px 0; border-bottom: 1px solid var(--border-subtle); }
.support-message { margin: 8px 0; white-space: pre-wrap; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--ink-secondary);
}
.theme-toggle button { display: grid; place-items: center; width: 38px; height: 36px; border-radius: 999px; }
.theme-toggle button[aria-pressed="true"] { background: var(--bg-surface); color: var(--brand); box-shadow: var(--shadow-card); }
.theme-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline-color: var(--focus-outline); }

.policy-link, .help-article a { color: var(--brand); text-decoration: underline; text-underline-offset: .22em; }
.help-shell { gap: 14px; padding-block: 20px 12px; }
.help-navigation { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.help-navigation a { min-height: 40px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 8px; color: var(--ink-secondary); }
.help-navigation a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-hover); font-weight: 700; }
.help-article { max-width: 780px; padding: clamp(18px, 4vw, 36px); color: var(--ink-secondary); }
.help-article h1 { color: var(--ink-primary); font-size: clamp(24px, 3vw, 34px); letter-spacing: -.02em; }
.help-article h2 { margin: 23px 0 6px; font-size: 17px; color: var(--ink-primary); scroll-margin-top: 118px; }
.help-article p { max-width: 64ch; font-size: 15px; line-height: 1.75; }
.privacy-request-form { display: grid; gap: 7px; max-width: 380px; margin-top: 14px; }
.privacy-request-form button { width: fit-content; margin-top: 6px; }
.privacy-request-form .input { width: 100%; }
.privacy-admin { padding: 18px 20px; }
.privacy-admin p { color: var(--ink-secondary); overflow-wrap: anywhere; }
#adminPrivacyList { margin-top: 12px; }
.privacy-admin-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-subtle); }
.privacy-admin-row button { flex: none; }

[data-health="operational"] { --status-color: var(--st-done-tx); }
[data-health="degraded_performance"], [data-health="under_maintenance"] { --status-color: var(--st-proc-tx); }
[data-health="partial_outage"], [data-health="major_outage"] { --status-color: var(--st-err-tx); }
.gpt-status-pill { min-height: 34px; gap: 6px; }
.service-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--status-color); }
.status-label, .status-component-list strong { color: var(--status-color); }
.status-label { font-size: 11px; }
.status-dialog {
  position: fixed;
  inset: 0;
  width: min(430px, calc(100vw - 28px));
  max-height: min(75dvh, 610px);
  margin: auto;
  padding: 18px;
  overflow: auto;
  border: 1px solid var(--border-default);
  border-radius: 16px;
  background: var(--bg-surface);
  color: var(--ink-primary);
  box-shadow: var(--shadow-card-hover);
}
.status-dialog::backdrop { background: var(--dialog-shade); }
.status-dialog-head, .status-dialog-actions, .status-component-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.status-dialog-head h2 { font-size: 19px; }
.status-dialog-head p { font-size: 12px; color: var(--ink-secondary); margin-top: 3px; }
.status-component-list { list-style: none; margin: 13px 0; }
.status-component-list li { padding: 7px 0; border-bottom: 1px solid var(--border-subtle); }
.status-dialog-actions { margin-top: 12px; }

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg-canvas: #101612;
  --bg-surface: #17221c;
  --bg-subtle: #202e26;
  --bg-inset: #131d17;
  --border-subtle: #2a3930;
  --border-default: #3a4e41;
  --border-strong: #597361;
  --border-brand: #396e51;
  --ink-primary: #eef5ee;
  --ink-secondary: #bdcebf;
  --ink-muted: #9eb4a3;
  --brand: #64d395;
  --brand-hover: #8ae2ae;
  --brand-soft: #1c3829;
  --brand-ring: rgb(100 211 149 / .22);
  --brand-disabled: #445b4d;
  --st-proc-bg: #3b2d18; --st-proc-bd: #69512f; --st-proc-tx: #f2c77e; --st-proc-dot: #f0ad5d;
  --st-done-bg: #1c3929; --st-done-bd: #35644a; --st-done-tx: #8be6a8; --st-done-dot: #70d790;
  --st-pend-bg: #28372e; --st-pend-bd: #3c5144; --st-pend-tx: #c4d5c7; --st-pend-dot: #a9bbaa;
  --st-err-bg: #442b29; --st-err-bd: #754340; --st-err-tx: #ffb2a8; --st-err-dot: #ff8e81;
  --focus-outline: #80dea3;
  --shadow-card: 0 4px 17px rgb(0 0 0 / .15);
  --shadow-card-hover: 0 12px 25px rgb(0 0 0 / .26);
  --shadow-btn: 0 2px 7px rgb(0 0 0 / .18);
  --dialog-shade: rgb(0 0 0 / .64);
  --dark-image-scrim: linear-gradient(90deg, rgb(10 24 17 / .96) 0%, rgb(10 24 17 / .84) 37%, rgb(10 24 17 / .43) 100%);
}
[data-theme="dark"] body { background-image: radial-gradient(ellipse at 50% 0, #18291e, transparent 68%), radial-gradient(#283a2e 0.8px, transparent 0.8px); }
[data-theme="dark"] .site-header { background: rgb(16 22 18 / .93); border-color: var(--border-subtle); }
[data-theme="dark"] :is(.nav-pill-group,.segmented,.btn-secondary,.back-pill,.pay-chip,.react-pill,.gpt-status-pill,.mf-num) { background: var(--bg-subtle); color: var(--ink-primary); }
[data-theme="dark"] :is(.nav-pill-item.active,.card,.gpt-card,.inplace-card,.mini-state-card,.order-status-card,.kpi-card,.table-wrap,.fulfill-drawer,.tier-edit-card,.coupon-row,.seg-btn.active,.btn-tbl-ghost,.live-bottom-bar,.pay-steps-row,.hero-showcase,.lookup-live-hud,.hero-slide,.showcase-slide,.input,.textarea,.modal-card) { background: var(--bg-surface); color: var(--ink-primary); }
[data-theme="dark"] :is(.hero-scrim,.lookup-scrim) { background: var(--dark-image-scrim); }
[data-theme="dark"] :is(.hero-banner,.lookup-hero) { background-color: var(--bg-inset); border-color: var(--border-default); }
[data-theme="dark"] :is(.hero-left h1,.lookup-hero-left h1,.hero-left p,.lookup-hero-left p,.kv-val,.card-name,.regular-price) { color: var(--ink-primary); }
[data-theme="dark"] :is(.hero-eyebrow,.lookup-eyebrow,.go-pill,.official-tag,.slide-demo-pill,.hud-box,.q-chip,.order-id-box) { color: var(--ink-secondary); background: var(--bg-subtle); border-color: var(--border-default); }
[data-theme="dark"] :is(.card-bottom,.inplace-card,.pay-steps-row,.live-bottom-bar) { border-color: var(--border-default); }
[data-theme="dark"] :is(.btn-primary,.btn-tbl,.mf-step.step-lit .mf-num) { background: var(--brand); color: var(--bg-canvas); }
[data-theme="dark"] :is(.btn-primary:disabled,.btn-tbl:disabled) { background: var(--brand-disabled); color: var(--ink-primary); }
[data-theme="dark"] :is(.row-selected,.q-chip.active,.mf-step.step-lit) { background: var(--brand-soft); color: var(--brand-hover); }
[data-theme="dark"] :is(.discount-price strong,.coupon-status,.coupon-box span,#saving) { color: var(--brand-hover); }
[data-theme="dark"] :is(.discount-price del,.coupon-box small) { color: var(--ink-secondary); }
[data-theme="dark"] :is(.discount-label,.notice-chip,.feature-chip) { background: var(--brand-soft); color: var(--brand-hover); }
[data-theme="dark"] .coupon-box .bad { color: var(--st-err-tx); }
[data-theme="dark"] :is(.st-plus,.st-pro5) { background: var(--brand-soft); border-color: var(--border-brand); }
[data-theme="dark"] :is(.st-plus .msg-ai,.st-pro5 .reason-box,.st-plus .model-chip,.st-pro5 .model-chip,#visibleCount) { background: var(--bg-inset); border-color: var(--border-default); color: var(--ink-primary); }
[data-theme="dark"] :is(.st-plus .mini-win-bar,.st-pro5 .mini-win-bar,.st-pro5 .reason-top) { color: var(--brand-hover); }
[data-theme="dark"] .st-pro5 .meter-track { background: var(--bg-subtle); }

@media(max-width: 760px) {
  #publicHeader { height: auto; }
  #publicHeader .header-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; padding-block: 6px; }
  #publicHeader .header-left { display: contents; }
  #publicHeader .header-left .brand { grid-row: 1; grid-column: 1; width: fit-content; }
  #publicHeader .header-left nav { grid-row: 2; grid-column: 1 / -1; width: fit-content; max-width: 100%; }
  #publicHeader .header-actions { grid-row: 1; grid-column: 2; gap: 4px; }
  .theme-toggle button { width: 42px; height: 39px; }
  .status-dialog { margin: auto auto 12px; }
  .privacy-admin-row { align-items: flex-start; }
}
