/* HEDGERON executive polish v4
   Loaded last on commercial/review surfaces. The locked desktop Master is not
   linked to this file; only its separately defined mobile navigation changed. */

/* Branded first paint: review visitors never see a transient sign-in form. */
html.review-auth-pending body[data-surface="cabinet"],
html.review-auth-pending body[data-surface="partner"]{overflow:hidden!important}
html.review-auth-pending body[data-surface="cabinet"]>#clientAccess,
html.review-auth-pending body[data-surface="cabinet"]>#clientShell,
html.review-auth-pending body[data-surface="partner"]>.partner-shell{visibility:hidden!important}
html.review-auth-pending body[data-surface="cabinet"]:before,
html.review-auth-pending body[data-surface="partner"]:before{content:"";position:fixed;z-index:9998;inset:0;background:url('/app/hedgeron-wordmark-premium.png') center calc(50% - 18px)/min(360px,62vw) auto no-repeat,radial-gradient(circle at 50% 42%,rgba(21,226,190,.10),transparent 27%),linear-gradient(145deg,#06151b,#010609 72%)}
html.review-auth-pending body[data-surface="cabinet"]:after,
html.review-auth-pending body[data-surface="partner"]:after{content:"SECURE REVIEW SESSION";position:fixed;z-index:9999;left:50%;top:calc(50% + 34px);transform:translateX(-50%);color:#71e9d5;font:650 10px/1.2 Inter,Arial,sans-serif;letter-spacing:.24em;white-space:nowrap;text-shadow:0 0 18px rgba(30,236,201,.45);animation:hedgeronBoot 1.25s ease-in-out infinite alternate}
@keyframes hedgeronBoot{from{opacity:.42}to{opacity:1}}

/* Mobile command navigation — five primary destinations plus a complete menu. */
.mobile-command-menu{display:none}
@media(max-width:760px){
  body[data-surface="cabinet"] .premium-sidebar nav{grid-template-columns:repeat(6,1fr)!important}
  .mobile-command-menu{position:relative;display:block;color:#91a5aa}
  .mobile-command-menu summary{position:relative;height:100%;min-height:56px;display:flex;align-items:center;justify-content:center;list-style:none;cursor:pointer}
  .mobile-command-menu summary::-webkit-details-marker{display:none}
  .mobile-command-menu summary svg{width:21px;height:21px;fill:currentColor;stroke:none}
  .mobile-command-menu summary>span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .mobile-command-menu[open] summary{color:#41efd1;background:linear-gradient(180deg,rgba(27,231,196,.08),transparent)}
  .mobile-command-menu>div{position:fixed;z-index:120;right:8px;bottom:76px;width:min(292px,calc(100vw - 16px));padding:7px;border:1px solid rgba(84,233,207,.42);border-radius:7px;background:linear-gradient(145deg,rgba(7,27,34,.99),rgba(2,10,14,.995));box-shadow:0 30px 90px rgba(0,0,0,.82),inset 0 1px rgba(255,255,255,.06)}
  body[data-surface="cabinet"] .premium-sidebar .mobile-command-menu>div>a{display:flex!important;position:relative!important;min-height:50px!important;padding:0 14px!important;gap:12px!important;justify-content:flex-start!important;border:0!important;border-bottom:1px solid rgba(92,132,141,.22)!important;background:transparent!important;color:#c9d4d6!important;font-size:10px!important;letter-spacing:.09em!important;text-decoration:none!important}
  body[data-surface="cabinet"] .premium-sidebar .mobile-command-menu>div>a>span{display:inline!important;position:static!important;width:auto!important;height:auto!important;overflow:visible!important;clip:auto!important;color:inherit!important;font:inherit!important;letter-spacing:inherit!important}
  body[data-surface="cabinet"] .premium-sidebar .mobile-command-menu>div>a:last-child{border-bottom:0!important}
  .mobile-command-menu>div>a svg{width:19px;height:19px;fill:none;stroke:#42e8ca;stroke-width:1.45}
}

/* Legibility gate: every visible operational label is at least 10 px. */
body[data-surface="cabinet"] :is(
  .command-wordmark small,.selected-engine small,.running-lock b,.running-lock span,.last-sync small,.last-sync b,
  .command-header .secondary,.console-label,.eyebrow,.financial-console span,.sentinel-console header span,
  .shield-console header small,.sentinel-console dt,.sentinel-console dd,.shield-console dt,.shield-console dd,
  .cycle-stats span,.cycle-labels span,.position-console dt,.position-console dd,.recent-console header a,
  .trade-row,.view-heading p,.view-kpi-strip span,.premium-bot-grid .bot-state,.premium-bot-grid h3 small,
  .premium-bot-grid dt,.performance-summary dt,.activity-title span,.client-grid-head,.client-mark,
  .activity-card dt,
  .client-ladder span,.shield-line,.journal-filters button,.journal-head,.protection-ready,
  .sentinel-command dt,.sentinel-command dd,.shield-command dt,.shield-command dd,.settings-card>p,
  .settings-card .calculator label,.membership-plans span,.command-main>footer,.command-main>footer span,
  .theme-selector small,.subscription-state,.empty-state,.system-state strong,.system-state small
){font-size:10px!important;line-height:1.38!important}

body[data-surface="cabinet"] :is(
  .premium-user b,.premium-user strong,.cycle-console>p,.cycle-labels,.chart-key,.chart-period,
  .chart-period b,.chart-footer,.chart-footer span,.shield-console p
){font-size:10px!important;line-height:1.38!important}

@media(min-width:761px){
  body[data-surface="cabinet"] .shield-console{padding-right:190px!important}
  body[data-surface="cabinet"] .shield-console dl{width:100%;max-width:205px}
  body[data-surface="cabinet"] .shield-console p{max-width:205px}
}

body[data-surface="paper"] :is(
  .paper-header .brand-lockup strong,.mode-lock b,.mode-lock span,.paper-header nav a,.paper-header nav button,
  .kicker,.view-tabs button,.view-tabs span,.scope-tabs button,.summary-metric span,.bot-title span,.state,
  .bot-values span,.shield-line,.legend,.protection-item strong,.pill,.protection-item p,.event-row,
  .health-row,.historical-notice,.historical-card>p,.period header,.period dt,.grid-meta,.chart-summary
){font-size:10px!important;line-height:1.38!important}
body[data-surface="paper"] .grid-core svg text{font-size:10px!important}

body[data-surface="landing"] :is(
  .nav-shell nav a,.nav-shell>.button,.theme-switch b,.tag,
  .shield-top span,.shield-top b,.signal span,.signal b,
  .float-card span,.float-card small,.strip small,.kicker,
  .verification-ribbon,.product-head small,.product dt,.capital span,
  .footnote,.footnote a,.steps p,.steps article>span,
  .audit-numbers span,.gate,.gate span,.gate b,
  .price-grid article>small,.price-grid article>span,.price-grid strong i,
  .commercial-footer-links a,.commercial-footer-links span
){font-size:10px!important;line-height:1.35!important}
body[data-surface="landing"]>footer,
body[data-surface="landing"]>footer p{font-size:10px!important;line-height:1.5!important}

/* The light canvas deliberately keeps the premium dark navigation bar. */
html.light body[data-surface="landing"] .theme-switch{
  color:#dce7e9!important;
  background:rgba(3,16,22,.78)!important;
  border-color:rgba(107,145,151,.48)!important;
  box-shadow:inset 0 1px rgba(255,255,255,.07),0 8px 24px rgba(0,0,0,.18)!important
}
html.light body[data-surface="landing"] .theme-switch b{
  color:#dce7e9!important;
  text-shadow:0 1px 0 #000,0 0 14px rgba(220,231,233,.18)!important
}
html.light body[data-surface="landing"] .theme-switch span{
  color:#39e8d1!important;
  filter:drop-shadow(0 0 7px rgba(57,232,209,.42))
}

/* Obsidian material system: restrained depth, bright foil edges, emerald glass. */
:root:not(.light) body[data-surface="cabinet"],
:root:not(.light) body[data-surface="paper"],
:root:not(.light) body[data-surface="partner"]{background-color:#01070a!important;background-image:radial-gradient(ellipse at 78% -8%,rgba(27,219,187,.10),transparent 31%),radial-gradient(ellipse at 12% 108%,rgba(14,107,104,.08),transparent 34%),linear-gradient(rgba(92,146,151,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(92,146,151,.022) 1px,transparent 1px)!important;background-size:auto,auto,48px 48px,48px 48px!important}

:root:not(.light) body[data-surface="cabinet"] .console-panel,
:root:not(.light) body[data-surface="paper"] :is(.bot-card,.panel,.historical-card),
:root:not(.light) body[data-surface="partner"] :is(.partner-kpi,.partner-panel,.tier-card,.partner-program-proof article){border-color:rgba(111,158,166,.35)!important;background:radial-gradient(circle at 88% 0,rgba(34,227,194,.055),transparent 28%),linear-gradient(145deg,rgba(8,27,35,.985),rgba(2,10,14,.995))!important;box-shadow:inset 0 1px rgba(230,249,249,.065),inset 1px 0 rgba(129,184,191,.025),0 18px 52px rgba(0,0,0,.46)!important}

:root:not(.light) body[data-surface="cabinet"] .console-panel:after,
:root:not(.light) body[data-surface="paper"] :is(.bot-card,.panel):after{content:"";position:absolute;inset:4px;border:1px solid rgba(216,245,244,.025);border-radius:3px;pointer-events:none}

:root:not(.light) body[data-surface="cabinet"] .console-panel:hover,
:root:not(.light) body[data-surface="paper"] :is(.bot-card,.panel):hover{border-color:rgba(88,217,196,.48)!important;box-shadow:inset 0 1px rgba(236,255,255,.09),0 22px 58px rgba(0,0,0,.52),0 0 26px rgba(19,217,183,.035)!important}

body[data-surface="cabinet"] :is(.capital-value,.financial-console b,.performance-summary dd),
body[data-surface="paper"] :is(.summary-metric strong,.bot-values strong),
body[data-surface="partner"] :is(.partner-kpi strong,.partner-hero strong){font-variant-numeric:tabular-nums lining-nums;text-rendering:geometricPrecision}

:root:not(.light) body[data-surface="cabinet"] :is(.capital-value,.view-heading h1),
:root:not(.light) body[data-surface="paper"] :is(.panel h2,.bot-title strong),
:root:not(.light) body[data-surface="partner"] :is(h1,h2,.partner-kpi strong){text-shadow:0 1px rgba(255,255,255,.08),0 8px 28px rgba(0,0,0,.48)}

/* Client-specific hierarchy and precision. */
:root:not(.light) body[data-surface="cabinet"] .command-header{background:linear-gradient(180deg,rgba(5,20,27,.92),rgba(2,10,14,.72));box-shadow:0 12px 36px rgba(0,0,0,.18)}
:root:not(.light) body[data-surface="cabinet"] .premium-sidebar{background:radial-gradient(circle at 50% 6%,rgba(32,232,198,.07),transparent 18%),linear-gradient(180deg,#06161d,#02090d 72%)!important;box-shadow:18px 0 48px rgba(0,0,0,.24)}
:root:not(.light) body[data-surface="cabinet"] .capital-console:before{background:linear-gradient(112deg,rgba(255,255,255,.05),transparent 19%),radial-gradient(circle at 82% 45%,rgba(35,224,193,.075),transparent 26%)}
:root:not(.light) body[data-surface="cabinet"] .capital-value{background:linear-gradient(180deg,#fff 8%,#d8e0e2 43%,#8d9ca1 58%,#f4f7f7 76%,#aab7ba);-webkit-background-clip:text;background-clip:text;color:transparent!important;filter:drop-shadow(0 5px 10px rgba(0,0,0,.5))}
:root:not(.light) body[data-surface="cabinet"] .asset-crystal{filter:drop-shadow(0 0 14px rgba(29,237,204,.34)) saturate(1.18)}
:root:not(.light) body[data-surface="cabinet"] .performance-chart{background-color:#031116!important;background-image:linear-gradient(rgba(47,231,202,.045) 1px,transparent 1px),linear-gradient(90deg,rgba(47,231,202,.038) 1px,transparent 1px),radial-gradient(ellipse at 72% 18%,rgba(27,218,186,.06),transparent 38%)!important}
:root:not(.light) body[data-surface="cabinet"] .shield-console{border-color:rgba(181,140,46,.48)!important;background:radial-gradient(circle at 83% 48%,rgba(221,171,53,.12),transparent 27%),linear-gradient(145deg,#15150d,#050b0e 70%)!important}

/* Paper becomes an operator-grade instrument, not a generic metrics page. */
:root:not(.light) body[data-surface="paper"] .paper-header{padding-inline:2px;background:linear-gradient(180deg,rgba(7,23,30,.88),rgba(2,9,13,.35));box-shadow:0 16px 44px rgba(0,0,0,.22)}
:root:not(.light) body[data-surface="paper"] .summary-grid{border-color:rgba(104,153,161,.38)!important;background:linear-gradient(145deg,#071a21,#030b0f)!important;box-shadow:0 20px 60px rgba(0,0,0,.38),inset 0 1px rgba(255,255,255,.06)!important}
:root:not(.light) body[data-surface="paper"] .summary-metric{background:radial-gradient(circle at 80% 0,rgba(33,230,196,.07),transparent 35%),linear-gradient(180deg,rgba(8,29,37,.95),rgba(3,13,17,.98))!important}
:root:not(.light) body[data-surface="paper"] .summary-metric strong{background:linear-gradient(180deg,#f9ffff,#aebcc0 72%,#f4fafa);-webkit-background-clip:text;background-clip:text;color:transparent}
:root:not(.light) body[data-surface="paper"] .summary-metric strong.positive{background:linear-gradient(180deg,#8cffe9,#16dab7 72%,#b3fff1);-webkit-background-clip:text;background-clip:text;color:transparent!important;filter:drop-shadow(0 0 8px rgba(36,232,198,.18))}
:root:not(.light) body[data-surface="paper"] .chart-wrap{box-shadow:inset 0 0 70px rgba(0,0,0,.34),0 1px rgba(255,255,255,.025)}
body[data-surface="paper"] .pnl-breakdown{display:flex;flex-wrap:wrap;gap:7px 16px;margin:14px 0 2px;padding:10px 12px;border:1px solid rgba(91,129,137,.2);border-radius:3px;background:rgba(2,12,16,.46)}
body[data-surface="paper"] .pnl-breakdown span{color:#82959b;font-size:11.5px;letter-spacing:.035em}
body[data-surface="paper"] .pnl-breakdown b{margin-left:5px;color:#d7e0e2;font-variant-numeric:tabular-nums lining-nums}
body[data-surface="paper"] .pnl-breakdown b.positive{color:#35e3c2}
body[data-surface="paper"] .pnl-breakdown b.warning{color:#e9b95d}
html[data-theme="light"] body[data-surface="paper"] .pnl-breakdown{border-color:rgba(40,76,83,.24);background:rgba(231,239,238,.82)}
html[data-theme="light"] body[data-surface="paper"] .pnl-breakdown span{color:#4d6268}
html[data-theme="light"] body[data-surface="paper"] .pnl-breakdown b{color:#173038}

/* Partner surface inherits the same physical materials and stronger hierarchy. */
:root:not(.light) body[data-surface="partner"] .partner-header{background:linear-gradient(180deg,rgba(6,22,29,.96),rgba(2,9,13,.78));box-shadow:0 16px 50px rgba(0,0,0,.28)}
:root:not(.light) body[data-surface="partner"] .partner-dashboard:before{content:"";position:fixed;z-index:-1;right:-8vw;top:18vh;width:44vw;height:44vw;border-radius:50%;background:radial-gradient(circle,rgba(31,229,196,.07),transparent 64%);pointer-events:none}
:root:not(.light) body[data-surface="partner"] .partner-review{border-color:rgba(60,231,201,.42);background:linear-gradient(90deg,rgba(10,48,45,.78),rgba(4,19,24,.72));box-shadow:inset 0 1px rgba(255,255,255,.05),0 12px 32px rgba(0,0,0,.22)}

/* Telegram is presented as a security channel, not as a social widget. */
body[data-surface="cabinet"] .telegram-panel{display:grid;grid-template-columns:minmax(260px,.72fr) minmax(430px,1.28fr);gap:42px;min-height:360px;margin-top:10px;padding:34px!important}
.telegram-copy h2{margin:18px 0 12px;font-size:28px;letter-spacing:.025em}.telegram-copy>p{max-width:470px;color:#8ca0a6;font-size:12px;line-height:1.7}
.telegram-security{display:flex;flex-wrap:wrap;gap:7px;margin-top:28px}.telegram-security span{padding:7px 9px;border:1px solid rgba(74,209,186,.25);border-radius:3px;color:#7ecfbe;background:rgba(18,106,92,.07);font-size:10px;letter-spacing:.09em}
.telegram-control{display:grid;align-content:start;gap:16px}.telegram-state{display:flex;align-items:center;gap:12px;padding:15px 16px;border:1px solid rgba(101,148,157,.34);border-radius:5px;background:linear-gradient(135deg,rgba(7,26,33,.82),rgba(3,12,16,.94))}.telegram-state>i{width:10px;height:10px;border-radius:50%;background:#59696d;box-shadow:0 0 0 5px rgba(114,134,138,.08)}.telegram-state>i.active{background:#27e1bd;box-shadow:0 0 0 5px rgba(39,225,189,.09),0 0 17px rgba(39,225,189,.7)}.telegram-state>span{display:grid;gap:4px}.telegram-state small{color:#7e9197;font-size:10px;letter-spacing:.12em}.telegram-state strong{color:#dce6e7;font-size:12px;letter-spacing:.035em}.telegram-state>b{margin-left:auto;color:#35e3c2;font-size:10px;letter-spacing:.12em}
#telegramPreferences{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}#telegramPreferences label{display:flex;align-items:center;gap:9px;min-height:38px;padding:8px 10px;border:1px solid rgba(88,128,137,.22);border-radius:4px;color:#aab9bc;background:rgba(3,15,20,.55);font-size:10px;letter-spacing:.025em}#telegramPreferences input{width:14px;height:14px;margin:0;accent-color:#25dab8}#telegramPreferences button{grid-column:1/-1;min-height:39px}
.telegram-actions{display:flex;gap:8px}.telegram-actions button{min-height:40px}.telegram-actions .danger-action:not(:disabled){border-color:rgba(255,103,93,.32)!important;color:#dd8f89!important}.telegram-actions button:disabled,#telegramPreferences :disabled{opacity:.38;cursor:not-allowed}
.telegram-deliveries{border-top:1px solid rgba(91,133,141,.24)}.telegram-deliveries>div{display:grid;grid-template-columns:1fr auto auto;gap:13px;padding:8px 2px;border-bottom:1px solid rgba(91,133,141,.16);font-size:10px}.telegram-deliveries span{color:#a7b6b9}.telegram-deliveries time{color:#72868b}.telegram-deliveries p{margin:10px 0;color:#71858a;font-size:10px}
:root.light body[data-surface="cabinet"] .telegram-panel{background:linear-gradient(145deg,#fff,#edf4f3)!important}:root.light .telegram-copy>p,:root.light .telegram-state strong,:root.light #telegramPreferences label{color:#31484c}:root.light .telegram-state,:root.light #telegramPreferences label{background:rgba(240,248,247,.9)}

@media(prefers-reduced-motion:reduce){html.review-auth-pending body:after{animation:none}.console-panel,.bot-card,.panel{transition:none!important}}

@media(max-width:760px){
  html.review-auth-pending body[data-surface="cabinet"]:before,
  html.review-auth-pending body[data-surface="partner"]:before{background-size:min(280px,72vw),auto,auto}
  body[data-surface="cabinet"] .command-main>footer{font-size:10px!important}
  body[data-surface="paper"] .paper-shell{padding-bottom:34px}
  body[data-surface="cabinet"] .telegram-panel{grid-template-columns:1fr;gap:22px;min-height:0;padding:23px!important}
  #telegramPreferences{grid-template-columns:1fr}.telegram-actions{display:grid;grid-template-columns:1fr 1fr}.telegram-actions .danger-action{grid-column:1/-1}
}
