:root {
  --hg-obsidian: #000507;
  --hg-charcoal: #061117;
  --hg-slate: #0b2029;
  --hg-panel: #06151c;
  --hg-panel-deep: #02090d;
  --hg-line: #29424d;
  --hg-line-bright: #48606a;
  --hg-silver: #d7dde0;
  --hg-silver-muted: #84959c;
  --hg-ivory: #f5f5f1;
  --hg-emerald: #00d9b4;
  --hg-emerald-bright: #00f0c7;
  --hg-emerald-deep: #007e6c;
  --hg-gold: #e1b84f;
  --hg-red: #ff5b50;
  --hg-blue: #178ce8;
  --hg-panel-shadow: 0 22px 54px rgba(0, 0, 0, .62), inset 0 1px rgba(255, 255, 255, .035);
  --hg-text: #edf2f3;
  --hg-muted: #82939b;
  --hg-surface: linear-gradient(145deg, rgba(8, 26, 34, .985), rgba(2, 9, 13, .99));
  --hg-surface-soft: #041015;
}

html[data-theme="light"] {
  --hg-obsidian: #dce5e5;
  --hg-charcoal: #e9efee;
  --hg-slate: #f7f8f5;
  --hg-panel: #f8faf8;
  --hg-panel-deep: #e6edeb;
  --hg-line: #9eb1b5;
  --hg-line-bright: #667d84;
  --hg-silver: #20363d;
  --hg-silver-muted: #60767d;
  --hg-ivory: #fffef9;
  --hg-emerald: #008f79;
  --hg-emerald-bright: #00a98f;
  --hg-emerald-deep: #006f60;
  --hg-gold: #9f761b;
  --hg-red: #c53d34;
  --hg-blue: #116fae;
  --hg-panel-shadow: 0 16px 38px rgba(33, 55, 61, .14), inset 0 1px #fff;
  --hg-text: #152c33;
  --hg-muted: #60767d;
  --hg-surface: linear-gradient(145deg, rgba(255, 255, 251, .99), rgba(232, 239, 237, .99));
  --hg-surface-soft: #edf3f1;
}

html, body { min-height: 100%; }
body { font-family: Bahnschrift, "Arial Narrow", Inter, "Segoe UI", sans-serif; }
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: .09;
  background: repeating-linear-gradient(180deg, transparent 0 3px, rgba(255,255,255,.035) 4px);
  mix-blend-mode: soft-light;
}

/* Shared approved brand assets */
.brand-emblem-image { width: 106px; height: 116px; object-fit: contain; filter: drop-shadow(0 12px 12px #000) drop-shadow(0 0 14px rgba(0,217,180,.23)); }
.command-wordmark { min-width: 315px; padding-bottom: 12px !important; }
.command-wordmark > img { display: block; width: 315px; height: 43px; object-fit: contain; object-position: left center; filter: drop-shadow(0 4px 6px rgba(0,0,0,.62)); }
.command-wordmark > small { bottom: -1px !important; letter-spacing: .27em !important; color: #758991 !important; }
.premium-brand .brand-mark { display: none !important; }
.brand-wordmark-image { display:block; width:176px; height:27px; object-fit:contain; object-position:left center; filter:drop-shadow(0 4px 7px rgba(0,0,0,.6)); }
.premium-logo-lockup { display:flex !important; align-items:center; gap:13px !important; font-size:0 !important; }
.operator-wordmark-image { display:block; width:164px; height:25px; object-fit:contain; object-position:left center; filter:drop-shadow(0 4px 7px rgba(0,0,0,.65)); }
.paper-header .brand-lockup > div { display:flex !important; flex-direction:column; align-items:flex-start; justify-content:center; }
.paper-header .brand-lockup strong { margin:4px 0 0 1px !important; }
.shell .brand { min-width:280px; }
.shell .brand .operator-wordmark-image { width:172px; }
.shell .brand small { margin-left:4px; }
.admin-shell > .topbar > .admin-brand-lockup { display:flex !important; align-items:center; gap:13px; width:auto; }
.admin-shell > .topbar > .admin-brand-lockup::before { content:none !important; display:none !important; }
.admin-emblem-image { width:54px; height:62px; object-fit:contain; filter:drop-shadow(0 7px 10px #000) drop-shadow(0 0 9px rgba(0,217,180,.12)); }
.admin-brand-lockup > div { display:grid; grid-template-columns:1fr !important; grid-template-rows:auto auto; align-content:center; gap:3px; }
.admin-shell > .topbar > .admin-brand-lockup h1 { margin:0 !important; color:var(--hg-muted) !important; font-size:10px !important; font-weight:500 !important; letter-spacing:.18em !important; text-transform:uppercase; }
.admin-shell > .topbar > .admin-brand-lockup h1 { grid-column:1 !important; grid-row:2 !important; }

/* App chrome */
.premium-body { background: #000 !important; color: var(--hg-text) !important; }
.premium-body::before { opacity: .72 !important; background-size: auto, 48px 48px, 48px 48px !important; }
.premium-shell {
  border-color: var(--hg-line-bright) !important;
  background: var(--hg-obsidian) !important;
  box-shadow: 0 55px 180px rgba(0,0,0,.85), 0 0 0 1px rgba(0,217,180,.045), inset 0 1px rgba(255,255,255,.08) !important;
}
.premium-sidebar { background: linear-gradient(180deg,#06151c,#01080c 74%,#041016) !important; border-color: #1b333d !important; }
.premium-brand { height: 192px !important; gap: 7px !important; }
.premium-brand .brand-name { color: #eef2f2; text-shadow: 0 1px #fff3, 0 4px 12px #000; }
.premium-sidebar .nav-link { transition: color .22s ease, background .22s ease, border-color .22s ease !important; }
.premium-sidebar .nav-link:hover,.premium-sidebar .nav-link.active { color: var(--hg-emerald-bright) !important; background: linear-gradient(90deg,rgba(0,217,180,.11),rgba(0,217,180,.018)) !important; }
.command-header { border-color: #1c343e !important; }

/* Premium double-frame surface used by every section */
.console-panel,.premium-bot-grid .bot-card,.activity-grid .activity-card,.view-kpi-strip,.appearance-panel,
.paper-shell .panel,.paper-shell .bot-card,.summary-grid,.historical-card,
.shell .panel,.shell .chart-panel,.shell .control-deck,.shell .login-card,
.admin-shell .section-block,.admin-shell .metric-card,.admin-shell .admin-login,
.product,.audit-card,.price-grid article,.shield-card,.final-cta {
  color: var(--hg-text) !important;
  border: 1px solid var(--hg-line) !important;
  background: var(--hg-surface) !important;
  box-shadow: var(--hg-panel-shadow) !important;
}
.console-panel::before,.premium-bot-grid .bot-card::before,.activity-grid .activity-card::before,
.paper-shell .panel::before,.paper-shell .bot-card::before,.shell .panel::before,.shell .chart-panel::before,
.admin-shell .section-block::before,.admin-shell .metric-card::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(255,255,255,.035);
  border-radius: 3px;
  pointer-events: none;
}
.console-panel::after,.premium-bot-grid .bot-card::after,.paper-shell .panel::after,.shell .panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg,rgba(255,255,255,.055),transparent 14%,transparent 84%,rgba(0,217,180,.035));
}
.view-heading { border-color: var(--hg-line) !important; }
.view-heading h1,.settings-card h2,.appearance-panel h2 { color: var(--hg-text) !important; }
.view-heading p,.settings-card > p,.appearance-panel p { color: var(--hg-muted) !important; }
.view-kpi-strip { background: var(--hg-surface-soft) !important; }
.view-kpi-strip > div { border-color: var(--hg-line) !important; }
.eyebrow,.console-label,.kicker { color: var(--hg-silver) !important; }
.positive-text,.capital-return b,.capital-return span { color: var(--hg-emerald) !important; }
.negative-text,.risk-value { color: var(--hg-red) !important; }
.gold-text { color: var(--hg-gold) !important; }

/* Approved raster instruments */
.premium-raster { overflow: visible !important; background: transparent !important; }
.premium-raster > img { position: relative; z-index: 2; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 16px rgba(0,217,180,.12)); }
.sentinel-radar.premium-raster { border: 0 !important; box-shadow: none !important; width: 137px !important; height: 137px !important; right: 12px !important; top: 13px !important; }
.sentinel-radar.premium-raster::before,.sentinel-radar.premium-raster::after,.sentinel-radar.premium-raster > i,.sentinel-radar.premium-raster > span { display: none !important; }
.shield-hologram.premium-raster { border: 0 !important; box-shadow: none !important; width: 150px !important; height: 150px !important; right: 13px !important; top: 12px !important; }
.shield-hologram.premium-raster::before,.shield-hologram.premium-raster::after { display: none !important; }
.shield-hologram.premium-raster img { filter: drop-shadow(0 0 18px rgba(225,184,79,.18)); }
.protection-orbit.premium-raster { border: 0 !important; box-shadow: none !important; width: 230px !important; height: 230px !important; }
.protection-orbit.premium-raster::before,.protection-orbit.premium-raster::after { display: none !important; }
.protection-orbit.premium-raster img { width: 100%; height: 100%; object-fit: contain; }
.gold-orbit.premium-raster img { filter: drop-shadow(0 0 24px rgba(225,184,79,.2)); }

/* Strategy and data sections */
.premium-bot-grid .bot-card { position: relative; overflow: hidden; min-height: 440px; }
.premium-bot-grid .bot-card:hover { transform: translateY(-3px); border-color: var(--hg-line-bright) !important; }
.premium-bot-grid .bot-card.selected { border-color: rgba(0,217,180,.6) !important; box-shadow: inset 0 0 38px rgba(0,217,180,.055), var(--hg-panel-shadow) !important; }
.premium-bot-grid .bot-icon { border-color: var(--hg-line-bright) !important; background: radial-gradient(circle,#12333b,#041116) !important; color: var(--hg-emerald-bright) !important; box-shadow: inset 0 0 18px rgba(0,217,180,.08),0 0 18px rgba(0,217,180,.05); }
.performance-gridlines,.chart-wrap,.chart-stage { border: 1px solid var(--hg-line); background-color: var(--hg-panel-deep) !important; }
.journal-console { background-image: var(--hg-surface) !important; }
.journal-head,.journal-console .trade-row,.performance-summary dl div,.sentinel-command dl div,.shield-command dl div { border-color: var(--hg-line) !important; }
.journal-filters button { border-color: var(--hg-line) !important; background: var(--hg-panel-deep) !important; color: var(--hg-muted) !important; }
.journal-filters button.active { border-color: rgba(0,217,180,.55) !important; background: rgba(0,217,180,.08) !important; color: var(--hg-emerald) !important; }
.sentinel-command h2 { color: var(--hg-emerald) !important; }
.shield-command { border-color: rgba(225,184,79,.5) !important; background: radial-gradient(circle at 50% 24%,rgba(225,184,79,.09),transparent 36%),linear-gradient(145deg,#17140b,#05090b) !important; }
.shield-command h2,.shield-command dd { color: var(--hg-gold) !important; }

/* Settings theme selector */
.appearance-panel { position: relative; display: grid; grid-template-columns:minmax(260px,.8fr) minmax(460px,1.2fr); align-items:center; gap:36px; margin-top:10px; min-height:170px; padding:28px 32px !important; overflow:hidden; }
.appearance-panel h2 { margin: 13px 0 7px; font-size: 22px; font-weight: 500; letter-spacing: .06em; }
.appearance-panel p { max-width: 520px; margin: 0; font-size: 10px; line-height: 1.65; }
.theme-selector { position:relative; z-index:2; display:grid; grid-template-columns:repeat(3,1fr); gap:9px; }
.theme-selector button { display:flex; align-items:center; gap:11px; min-height:78px; padding:12px; border:1px solid var(--hg-line); border-radius:5px; background:var(--hg-panel-deep); color:var(--hg-text); cursor:pointer; text-align:left; transition:.2s ease; }
.theme-selector button:hover { transform:translateY(-2px); border-color:var(--hg-line-bright); }
.theme-selector button.active { border-color:var(--hg-emerald); box-shadow:inset 0 0 22px rgba(0,217,180,.08),0 0 16px rgba(0,217,180,.06); }
.theme-selector span,.theme-selector b,.theme-selector small { display:block; }
.theme-selector b { font-size:10px; letter-spacing:.11em; text-transform:uppercase; }
.theme-selector small { margin-top:5px; color:var(--hg-muted); font-size:10px; line-height:1.35; }
.theme-preview { flex:none; width:39px; height:49px; border:1px solid #526871; border-radius:3px; box-shadow:inset 0 0 0 4px rgba(255,255,255,.025); }
.dark-preview { background:linear-gradient(135deg,#071820 50%,#00b99a 51% 54%,#02080c 55%); }
.light-preview { background:linear-gradient(135deg,#fffef9 50%,#008f79 51% 54%,#dfe8e6 55%); }
.system-preview { background:linear-gradient(135deg,#071820 0 48%,#00b99a 49% 52%,#fffef9 53%); }

/* Shared operator pages */
.paper-shell,.shell,.admin-shell { color:var(--hg-text); }
.paper-header,.topbar { border-color:var(--hg-line) !important; }
.brand-lockup .brand-mark,.topbar .brand > span,.admin-shell > .topbar > div:first-child::before { background-image:url('/app/hedgeron-emblem-premium.webp') !important; background-color:transparent !important; background-size:contain !important; background-repeat:no-repeat !important; background-position:center !important; color:transparent !important; clip-path:none !important; }
.paper-shell .brand-lockup .brand-mark { width:58px !important; height:66px !important; }
.topbar .brand > span { width:50px !important; height:58px !important; border:0 !important; }
.paper-header,.topbar { background:linear-gradient(180deg,rgba(5,17,23,.97),rgba(2,8,12,.97)) !important; box-shadow:0 12px 34px rgba(0,0,0,.26); }
.paper-header nav a,.paper-header nav button,.topbar nav a,.topbar nav button { border-color:var(--hg-line) !important; background:linear-gradient(180deg,#0b2029,#041015) !important; color:var(--hg-silver) !important; }
.summary-metric,.paper-shell .bot-card,.historical-card { background:var(--hg-surface) !important; }
.event-row,.health-row,.trade-row { border-color:var(--hg-line) !important; }
.mode-lock { border-color:rgba(0,217,180,.35) !important; background:rgba(0,217,180,.055) !important; }

/* Landing shares the same materials */
.nav-shell,.landing-shell > header { border-color:var(--hg-line) !important; }
.logo > span { background:url('/app/hedgeron-emblem-premium.webp') center/contain no-repeat !important; color:transparent !important; border-radius:0 !important; }
.hero h1,.section h2,.final-cta h2 { color:var(--hg-text) !important; }
.hero h1 em,.kicker,.tag { color:var(--hg-emerald) !important; }
.button.primary { background:linear-gradient(90deg,#42f3d3,#00b99a) !important; color:#02110f !important; border-color:#54f6dc !important; }
.shield-card .shield-mark { background:url('/app/shield-premium.webp') center/contain no-repeat !important; color:transparent !important; clip-path:none !important; }
.nav-shell .premium-logo-lockup > span,body > footer .premium-logo-lockup > span { flex:none; }
.hero-visual .shield-card { border-radius:10px !important; background:radial-gradient(circle at 50% 28%,rgba(0,217,180,.08),transparent 34%),linear-gradient(145deg,#071820,#02090d) !important; }
.hero-visual .shield-card::before { content:""; position:absolute; inset:5px; border:1px solid rgba(255,255,255,.04); pointer-events:none; }
.product,.audit-card,.price-grid article,.final-cta,.steps article,.float-card { border-radius:7px !important; }

/* Premium light theme: dark brand chrome + executive ivory workspace */
html[data-theme="light"] body:not(.premium-body) { background:radial-gradient(circle at 78% -12%,rgba(0,143,121,.11),transparent 32%),linear-gradient(rgba(27,55,62,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(27,55,62,.035) 1px,transparent 1px),#e4ebea !important; background-size:auto,48px 48px,48px 48px,auto !important; color:var(--hg-text) !important; }
html[data-theme="light"] body:has(.nav-shell) { background:radial-gradient(circle at 76% 8%,rgba(0,143,121,.12),transparent 30%),linear-gradient(rgba(27,55,62,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(27,55,62,.035) 1px,transparent 1px),#e4ebea !important; background-size:auto,48px 48px,48px 48px,auto !important; color:#152c33 !important; }
html[data-theme="light"] body { --bg:#e4ebea; --panel:#f8faf8; --panel2:#edf3f1; --line:#a8b8bb; --text:#152c33; --muted:#60767d; --emerald:#008f79; --silver:#445d65; --amber:#9f761b; --red:#c53d34; }
html[data-theme="light"] .premium-body { background:#d6dfdf !important; }
html[data-theme="light"] .premium-shell { background:#e7eeee !important; box-shadow:0 38px 110px rgba(34,55,61,.28) !important; }
html[data-theme="light"] .premium-sidebar { background:linear-gradient(180deg,#071820,#02090d) !important; }
html[data-theme="light"] .command-header { margin:0 -14px; padding:0 14px; background:linear-gradient(180deg,#071820,#02090d); }
html[data-theme="light"] .selected-engine b,html[data-theme="light"] .command-header { color:#edf2f3; }
html[data-theme="light"] .console-panel::before,html[data-theme="light"] .premium-bot-grid .bot-card::before { border-color:rgba(15,47,56,.055); }
html[data-theme="light"] .console-panel::after { background:linear-gradient(115deg,rgba(255,255,255,.65),transparent 15%,transparent 84%,rgba(0,143,121,.045)); }
html[data-theme="light"] .capital-value { color:#183139 !important; text-shadow:0 1px #fff !important; }
html[data-theme="light"] .shield-console,html[data-theme="light"] .shield-command { color:#392e18 !important; border-color:rgba(159,118,27,.45) !important; background:radial-gradient(circle at 82% 52%,rgba(159,118,27,.09),transparent 35%),linear-gradient(145deg,#fffdf3,#ebe4cf) !important; }
html[data-theme="light"] .theme-selector button { background:#eef3f1; }
html[data-theme="light"] .performance-gridlines,html[data-theme="light"] .chart-wrap,html[data-theme="light"] .chart-stage { background-color:#f7faf8 !important; }
html[data-theme="light"] dialog { background:linear-gradient(145deg,#fffef9,#e9efed) !important; color:#152c33 !important; border-color:#93a8ad !important; }
html[data-theme="light"] input,html[data-theme="light"] select { background:#fffef9 !important; color:#152c33 !important; border-color:#9fb1b5 !important; }
html[data-theme="light"] .paper-header,html[data-theme="light"] .topbar,html[data-theme="light"] .nav-shell { background:linear-gradient(180deg,#071820,#02090d) !important; color:#edf2f3 !important; }
html[data-theme="light"] .hero { background:linear-gradient(180deg,rgba(255,255,251,.54),rgba(228,235,234,.12)) !important; }
html[data-theme="light"] .hero-copy > p,html[data-theme="light"] .section-intro > p,html[data-theme="light"] .shield-copy p,html[data-theme="light"] .product > p,html[data-theme="light"] .footnote { color:#60767d !important; }
html[data-theme="light"] .tag,html[data-theme="light"] .trust-line,html[data-theme="light"] .strip { color:#526b72 !important; }
html[data-theme="light"] .strip,html[data-theme="light"] .shield-section { border-color:#a8b8bb !important; }
html[data-theme="light"] .shield-section { background:radial-gradient(circle at 20% 45%,rgba(0,143,121,.11),transparent 30%),rgba(255,255,251,.34) !important; }
html[data-theme="light"] .paper-header nav a,html[data-theme="light"] .paper-header nav button,html[data-theme="light"] .topbar nav a,html[data-theme="light"] .topbar nav button,html[data-theme="light"] .nav-shell nav a,html[data-theme="light"] .nav-shell .theme-switch,html[data-theme="light"] .nav-shell .button.ghost { color:#c7d2d5 !important; background:#041015 !important; border-color:#29424d !important; }
html[data-theme="light"] .login-panel,html[data-theme="light"] .login-card,html[data-theme="light"] .admin-login { background:linear-gradient(145deg,#fffef9,#e9efed) !important; border-color:#9eb1b5 !important; color:#152c33 !important; }
html[data-theme="light"] .summary-grid,html[data-theme="light"] .historical-notice { background:#edf3f1 !important; border-color:#9eb1b5 !important; }
html[data-theme="light"] .event-row,html[data-theme="light"] .health-row,html[data-theme="light"] .protection-item { border-color:#b9c7c9 !important; }
html[data-theme="light"] .grid-core { background:radial-gradient(circle at 85% 50%,rgba(0,143,121,.12),transparent 34%),#eef4f2 !important; border-color:#a8b8bb !important; }
html[data-theme="light"] .brand-wordmark-image,html[data-theme="light"] .operator-wordmark-image { filter:drop-shadow(0 4px 7px rgba(0,0,0,.5)); }

@media (max-width:1220px) {
  .command-wordmark { min-width:245px; }
  .command-wordmark > img { width:245px; height:37px; }
  .appearance-panel { grid-template-columns:1fr; }
}
@media (max-width:760px) {
  .premium-sidebar .premium-brand,.premium-sidebar .side-bottom { display:none !important; }
  .premium-sidebar nav { position:absolute; inset:0; height:63px; }
  .premium-sidebar .nav-link:nth-child(6) { display:none !important; }
  .premium-sidebar .nav-link:nth-child(7) { display:flex !important; }
  .command-wordmark { min-width:180px; }
  .command-wordmark > img { width:180px; height:29px; }
  .appearance-panel { padding:22px 18px !important; }
  .theme-selector { grid-template-columns:1fr; }
  .theme-selector button { min-height:65px; }
  .brand-emblem-image { width:54px; height:60px; }
}

@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation-duration:.001ms !important; animation-iteration-count:1 !important; scroll-behavior:auto !important; }
}
