/* Workspace refinement: light, depth and explicit routes. All 3D is decorative. */
:root { --refined-specular: #e8fff04d; --refined-shadow: #00000050; }
[data-theme="light"] { --refined-specular: #ffffffcc; --refined-shadow: #16402a1a; }
.app-nav-item { font-size: 13px; }
.app-topbar { gap: 18px; }
.app-topbar .ui-search { flex: 1 1 220px; max-width: 290px; }
.btn { font-size: 12px; min-height: 42px; }
.btn:active { box-shadow: inset 0 2px 7px #0002; }
a:focus-visible,button:focus-visible,summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.premium-hero { grid-template-columns: minmax(0,1fr) 370px; min-height: 290px; gap: 28px; padding: 36px 40px; background: radial-gradient(ellipse at var(--surface-x,85%) var(--surface-y,15%),var(--accent-bg),transparent 65%),var(--premium-surface); box-shadow: inset 0 1px var(--refined-specular),0 22px 60px #00000010; }
.premium-hero::before { left: 40px; width: 45%; background: linear-gradient(90deg,transparent,var(--refined-specular),transparent); }
.premium-hero .dash-greet { font-size: clamp(30px,3.3vw,44px); }
.premium-hero .dash-phrase { font-size: 13px; }
.premium-eyebrow { letter-spacing: .2em; }
.premium-hero .dash-actions { gap: 10px; }
.premium-scene { --prism-size: 124px; --prism-half: 62px; height: 242px; perspective: 820px; }
.premium-scene-rig { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(var(--scene-y,0deg)) rotateY(var(--scene-x,0deg)); transition: transform 700ms cubic-bezier(.18,.65,.2,1); }
.premium-scene-aura { position: absolute; inset: -12% -5% 2%; background: radial-gradient(ellipse,var(--accent-bg),transparent 68%); transform: translateZ(-90px); }
.premium-scene-shadow { position: absolute; left: 22%; right: 22%; top: 79%; height: 22px; background: radial-gradient(ellipse,var(--refined-shadow),transparent 68%); transform: rotateX(62deg) translateZ(-60px); animation: premium-ground-breathe 8s ease-in-out infinite; }
.premium-scene-grid { opacity: .28; transform: rotateX(72deg) rotateZ(-20deg) translateZ(-30px); }
.premium-sculpture { transform: translate(-50%,-50%) translateZ(12px); }
.premium-sculpture-float { animation-duration: 8s; }
.premium-prism { animation-duration: 36s; }
.premium-face { border-radius: 18px; border-color: #c7ffe49c; background: linear-gradient(135deg,#e8fff03d,transparent 35%,#89dbae0d 58%,#d4ffe72b); box-shadow: inset 1px 1px 1px #e8fff055,inset -1px -1px 1px #7cbd9540,inset 0 0 26px #b6ffde0a; }
.premium-face::after { inset: 11px; border-radius: 10px; border-color: #d6ffe621; background: linear-gradient(160deg,#f0fff00d,transparent 45%); }
.premium-face-front { background: linear-gradient(145deg,#e8fff052,transparent 32%,#72bf910a 60%,#d4ffe735); }
.premium-core { width: 54px; height: 54px; background: radial-gradient(circle at 32% 25%,#fff 0%,#defde9 10%,#9ddbb8 30%,#4c8267 58%,#153c2b 90%); box-shadow: 0 0 48px #a4e9c930,inset -9px -10px 16px #0a261e77; }
.premium-core::after { content: ''; position: absolute; inset: 7px 10px 30px; border-radius: 50%; background: linear-gradient(120deg,#ffffff85,transparent); transform: rotate(-25deg); }
.premium-orbit { width: 270px; height: 270px; margin: -135px 0 0 -135px; border-color: var(--accent-border); }
.premium-orbit-two { width: 235px; height: 235px; margin: -117.5px 0 0 -117.5px; border-color: var(--premium-hairline); }
.premium-orbit::after { display: none; }
.premium-satellite { position: absolute; inset: -1px; border-radius: inherit; animation: premium-satellite-turn 19s linear infinite; }
.premium-satellite::after { content: ''; position: absolute; left: 50%; top: -3px; width: 7px; height: 7px; border-radius: 50%; background: radial-gradient(circle at 30% 25%,#fff,#a4e9c9 45%,#326347); box-shadow: 0 0 12px var(--accent-border); }
.premium-orbit-two .premium-satellite { animation-direction: reverse; animation-duration: 27s; }
.premium-orbit-two .premium-satellite::after { width: 5px; height: 5px; top: -2px; }
.premium-scene-caption { font-size: 7px; letter-spacing: .14em; }
[data-theme="light"] .premium-face { border-color: #468f6977; box-shadow: inset 1px 1px 1px #ffffffaa,inset -1px -1px 1px #467b5522; background: linear-gradient(135deg,#ffffffbb,#68ab8412 48%,#8fcfa14d); }

/* A stable pearl at the centre; orbit planes rotate independently in true 3D. */
.ai-visual-hero { grid-template-columns: minmax(0,1fr) 370px; }
.ai-visual-hero .ai-neural-scene { height: 286px; }
.ai-neural-halo { background: radial-gradient(ellipse,var(--accent-bg),transparent 68%); transform: translateZ(-85px); }
.ai-neural-floor { opacity: .25; transform: rotateX(72deg) rotateZ(-12deg) translateZ(-40px); }
.ai-neural-sphere { width: 194px; height: 194px; margin: -97px 0 0 -97px; animation-duration: 34s; }
.ai-neural-ring { border-color: var(--accent-border); opacity: .9; box-shadow: inset 1px 0 #e8fff02b,0 0 20px var(--accent-bg); }
.ai-neural-ring.ring-a { border-color: var(--accent); opacity: .6; }
.ai-neural-ring.ring-d { width: 260px; height: 260px; margin: -33px; opacity: .65; }
.ai-neural-ring.ring-e { transform: rotateX(42deg) rotateY(38deg); opacity: .4; }
.ai-neural-ring.ring-f { transform: rotateX(-42deg) rotateY(-38deg); opacity: .4; }
.ai-neural-ring.ring-e::after,.ai-neural-ring.ring-f::after { display: none; }
.ai-neural-core { inset: auto; top: 47%; left: 50%; width: 104px; height: 104px; margin: -52px 0 0 -52px; transform: translateZ(28px); background: radial-gradient(circle at 32% 24%,#fff 0%,#defde9 10%,#a8e7c2 28%,#4c8267 58%,#173d31 88%); box-shadow: 0 0 65px #a4e9c925,inset -14px -16px 28px #0a1c1588; animation: refined-pearl-float 8s ease-in-out infinite; }
.ai-neural-core::after { inset: 10px 20px 65px; border: 0; background: linear-gradient(130deg,#fff8,transparent); transform: rotate(-25deg); }
.ai-neural-label { transform: none; font-size: 10px; background: var(--premium-glass); box-shadow: inset 0 1px var(--refined-specular),0 8px 24px #00000014; }
.ai-neural-label span { font-size: 9px; }
.ai-neural-caption { font-size: 8px; letter-spacing: .12em; }
.label-hal { left: 0; }.label-system { left: 9%; }
.ai-visual-links { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-top: 25px; }
.ai-visual-links a { min-width: 0; padding: 13px 12px; gap: 9px; justify-content: flex-start; font-size: 11px; line-height: 1.35; }
.ai-visual-links a > .ui-icon { flex-shrink: 0; width: 17px; height: 17px; }
.ai-visual-links a > span { min-width: 0; }
.ai-visual-links small { display: block; color: var(--text-soft); font-size: 9px; font-weight: 400; margin-top: 5px; line-height: 1.5; }
.ai-visual-links a[aria-current="page"] { box-shadow: inset 0 1px var(--accent-border); }

/* Visible routes explain what each destination is for. */
.premium-wayfinding { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: -4px 0 24px; }
.premium-wayfinding a,.premium-command-results a { display: flex; align-items: center; min-width: 0; gap: 12px; color: var(--text); text-decoration: none; }
.premium-wayfinding a { padding: 16px; border: 1px solid var(--premium-hairline); border-radius: 14px; background: var(--premium-surface); transition: border-color 200ms,background 200ms,box-shadow 200ms; }
.premium-wayfinding a:hover { border-color: var(--accent-border); box-shadow: inset 0 1px var(--refined-specular),0 8px 18px #00000012; }
.premium-route-icon { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border: 1px solid var(--premium-hairline); background: var(--accent-bg); color: var(--accent); border-radius: 10px; }
.premium-route-icon .ui-icon { width: 16px; height: 16px; }
.premium-wayfinding a > span:not(.premium-route-icon),.premium-command-results a > span:not(.premium-route-icon) { flex: 1; min-width: 0; }
.premium-wayfinding strong,.premium-command-results strong { font-size: 12px; font-weight: 550; display: block; }
.premium-wayfinding small,.premium-command-results small { display: block; font-size: 10px; color: var(--text-soft); margin-top: 5px; line-height: 1.5; }
.premium-route-arrow { flex-shrink: 0; width: 14px; height: 14px; color: var(--text-soft); transition: transform 200ms; }
.premium-wayfinding a:hover .premium-route-arrow { transform: translateX(3px); color: var(--accent); }
:is(.dash-kpi,.team-card,.pw-project-card,.cap-card,.ai-agent-card,.telemetry-card)[data-premium-tilt] { position: relative; background: radial-gradient(ellipse at var(--surface-x,50%) var(--surface-y,0%),var(--accent-bg),transparent 70%),var(--premium-surface); transform: perspective(1000px) rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg)); transition: transform 350ms var(--premium-ease),border-color 200ms,box-shadow 200ms; }
:is(.dash-kpi,.team-card,.pw-project-card,.cap-card,.ai-agent-card,.telemetry-card)[data-premium-tilt]:hover { border-color: var(--accent-border); box-shadow: inset 0 1px var(--refined-specular),0 12px 28px #00000018; }
.dash-kpi { border-color: var(--premium-hairline); }
.dash-kpi-label { font-size: 11px; }
.dash-kpi-foot { font-size: 11px; }
.dash-kpi-value:focus-visible { border-radius: 5px; }
.data-table tbody tr:hover .row-link-anchor { color: var(--accent); }

/* Native modal handles focus containment and Escape without replacing search. */
.premium-command-trigger { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 8px 10px; border: 1px solid var(--premium-hairline); border-radius: 10px; background: var(--bg-elevated); color: var(--text-muted); font: 11px var(--font-ui); cursor: pointer; white-space: nowrap; }
.premium-command-trigger[hidden] { display: none; }
.premium-command-trigger > .ui-icon { width: 15px; height: 15px; }
.premium-command-trigger:hover { border-color: var(--accent-border); color: var(--accent); }
kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; padding: 3px 5px; border: 1px solid var(--premium-hairline); border-radius: 5px; background: var(--bg-sunken); color: var(--text-soft); font: 9px var(--font-ui); }
.premium-command-dialog { --command-top: clamp(16px,12vh,100px); width: min(590px,calc(100vw - 32px)); max-height: min(740px,calc(100dvh - var(--command-top) - var(--command-top))); top: var(--command-top); bottom: auto; padding: 0; margin: 0 auto; border: 1px solid var(--border-strong); border-radius: 22px; background: var(--bg-elevated); color: var(--text); box-shadow: 0 35px 100px #0008,inset 0 1px var(--refined-specular); overflow: auto; overscroll-behavior: contain; }
.premium-command-dialog::backdrop { background: #06100fb3; backdrop-filter: blur(10px); }
.premium-command-dialog[open] { animation: refined-command-in 260ms var(--premium-ease) both; }
.premium-command-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 26px 26px 20px; }
.premium-command-head .premium-eyebrow { font-size: 8px; margin-bottom: 10px; }
.premium-command-head h2 { font-size: 24px; font-weight: 550; letter-spacing: -.04em; margin: 0; }
.premium-command-search { display: flex; align-items: center; gap: 12px; margin: 0 26px 16px; padding: 4px 12px; border: 1px solid var(--accent-border); border-radius: 12px; background: var(--bg-sunken); }
.premium-command-search > .ui-icon { flex-shrink: 0; color: var(--accent); width: 17px; height: 17px; }
.premium-command-search input { flex: 1; width: 100%; min-width: 0; min-height: 46px; border: 0; background: transparent; color: var(--text); font-size: 13px; padding: 7px 0; outline: none; box-shadow: none; }
.premium-command-search:focus-within { box-shadow: 0 0 0 3px var(--accent-bg); }
.premium-command-search input:focus-visible { box-shadow: none; }
.premium-command-results { padding: 0 16px 12px; }
.premium-command-caption { display: flex; justify-content: space-between; padding: 0 10px; font-size: 10px; color: var(--text-soft); margin: 0 0 8px; }
.premium-command-results nav { display: grid; gap: 3px; }
.premium-command-results a { padding: 9px 10px; border: 1px solid transparent; border-radius: 11px; min-height: 54px; }
.premium-command-results a:hover,.premium-command-results a:focus-visible { background: var(--accent-bg); border-color: var(--accent-border); outline-offset: 0; }
.premium-command-results a[hidden],.premium-command-empty[hidden] { display: none; }
.premium-command-results small { margin-top: 3px; font-size: 10px; }
.premium-command-empty { color: var(--text-muted); padding: 24px 10px; font-size: 12px; line-height: 1.6; }
.premium-command-global { display: flex; align-items: center; gap: 10px; padding: 17px 26px; color: var(--accent); border-top: 1px solid var(--premium-hairline); text-decoration: none; font-size: 12px; }
.premium-command-global .premium-route-arrow { margin-left: auto; }
.premium-command-global > span { min-width: 0; overflow-wrap: anywhere; }
.premium-command-foot { display: flex; gap: 16px; flex-wrap: wrap; padding: 12px 26px; background: var(--bg-sunken); color: var(--text-soft); font-size: 9px; border-top: 1px solid var(--premium-hairline); }

@keyframes premium-satellite-turn { to { transform: rotateZ(360deg); } }
@keyframes premium-ground-breathe { 0%,100% { opacity: .6; scale: 1; } 50% { opacity: .4; scale: .85; } }
@keyframes refined-pearl-float { 0%,100% { transform: translateZ(28px) translateY(0); } 50% { transform: translateZ(28px) translateY(-7px); } }
@keyframes refined-command-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
[data-motion="paused"] .premium-scene-rig { transform: none; }
[data-scene-paused="true"] *::before,[data-scene-paused="true"] *::after { animation-play-state: paused !important; }
[data-motion="paused"] .premium-command-dialog { animation: none; }
@media (max-width:1200px) {
  .premium-hero,.ai-visual-hero { grid-template-columns: minmax(0,1fr) 290px; padding: 28px; gap: 20px; }
  .ai-visual-links { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ai-visual-links a:last-child { grid-column: 1 / -1; }
  .premium-command-trigger kbd { display: none; }
  .premium-wayfinding a { padding: 13px; gap: 9px; }
  .premium-wayfinding .premium-route-arrow { display: none; }
}
@media (max-width:860px) {
  .premium-hero,.ai-visual-hero { grid-template-columns: minmax(0,1fr) 250px; }
  .premium-scene { --prism-size: 104px; --prism-half: 52px; }
  .premium-orbit { width: 225px; height: 225px; margin: -112.5px 0 0 -112.5px; }
  .premium-orbit-two { width: 196px; height: 196px; margin: -98px 0 0 -98px; }
  .premium-command-trigger { width: 38px; min-width: 38px; padding: 8px; }
  .premium-command-trigger span { display: none; }
}
@media (max-width:600px) {
  .app-topbar { gap: 7px; }
  .app-topbar .ui-search { min-width: 0; flex: 1; }
  .premium-command-trigger { width: 32px; min-width: 32px; padding: 6px; }
  .premium-hero,.ai-visual-hero { grid-template-columns: minmax(0,1fr); gap: 8px; padding: 24px; min-height: 0; }
  .premium-hero .dash-greet { font-size: 30px; }
  .premium-hero .premium-scene { height: 184px; margin-top: 14px; }
  .ai-visual-hero .ai-neural-scene { height: 230px; }
  .ai-neural-sphere { width: 150px; height: 150px; margin: -75px 0 0 -75px; }
  .ai-neural-ring.ring-d { width: 202px; height: 202px; margin: -26px; }
  .ai-neural-core { width: 82px; height: 82px; margin: -41px 0 0 -41px; }
  .ai-neural-core::after { inset: 8px 15px 50px; }
  .label-system { left: 4%; }
  .ai-visual-links { gap: 8px; margin-top: 20px; }
  .ai-visual-links a { padding: 12px 10px; }
  .ai-visual-links small { font-size: 9px; }
  .premium-wayfinding { grid-template-columns: minmax(0,1fr); gap: 8px; margin-bottom: 18px; }
  .premium-wayfinding a { padding: 12px 14px; gap: 12px; }
  .premium-wayfinding .premium-route-arrow { display: block; }
  .premium-wayfinding small { margin-top: 3px; }
  .dash-kpi-label,.dash-kpi-foot { font-size: 10px; }
  .premium-command-dialog { --command-top: 12px; border-radius: 18px; max-height: calc(100dvh - 24px); }
  .premium-command-head { padding: 22px 20px 18px; }
  .premium-command-head h2 { font-size: 22px; }
  .premium-command-search { margin-inline: 20px; padding-inline: 10px; gap: 8px; }
  .premium-command-search input { font-size: 12px; }
  .premium-command-global { padding-inline: 20px; }
  .premium-command-foot { padding-inline: 20px; gap: 10px; }
}
@media (prefers-reduced-motion:reduce) {
  .premium-scene-rig { transform: none !important; transition: none !important; }
  .premium-satellite,.premium-scene-shadow,.ai-neural-core,.premium-command-dialog { animation: none !important; }
  .premium-route-arrow { transition: none; }
}
