/*
 * Grax — full-window Obsidian Glass settings application
 * Visual layer only. Existing controller IDs and settings behavior are preserved.
 */

@font-face {
  font-family: "InterVariable";
  src: url("assets/fonts/inter-latin-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --black: #020202;
  --obsidian: #050505;
  --charcoal: #0a0a0a;
  --panel: rgba(8, 10, 11, 0.62);
  --panel-strong: rgba(7, 9, 10, 0.82);
  --cyan: #65f7ff;
  --cyan-hot: #a3feff;
  --cyan-dim: rgba(101, 247, 255, 0.12);
  --cyan-line: rgba(101, 247, 255, 0.26);
  --text: #f7fbfc;
  --muted: rgba(230, 241, 244, 0.58);
  --faint: rgba(230, 241, 244, 0.34);
  --danger: #ff607a;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.18, 1.35, 0.28, 1);
  --sidebar: 284px;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-width: 320px; min-height: 100%; margin: 0; }
html { scroll-behavior: smooth; }
body {
  min-height: 100dvh;
  overflow: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 82% 7%, rgba(51, 208, 220, 0.15), transparent 30%),
    radial-gradient(circle at 18% 92%, rgba(21, 96, 104, 0.14), transparent 34%),
    linear-gradient(145deg, #020202 0%, #050505 48%, #0a0a0a 100%);
  font-family: "InterVariable", Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}
button, input, a { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { display: block; }

/* Grax cyber-scroll system — shared by the full canvas, domain lists, and diagnostics. */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 255, 230, 0.72) rgba(2, 2, 2, 0.34);
}

*::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

*::-webkit-scrollbar-track {
  background: rgba(2, 2, 2, 0.40);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  min-height: 42px;
  border: 1px solid rgba(2, 2, 2, 0.78);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(183, 255, 255, 0.96), #00ffe6 48%, rgba(0, 200, 210, 0.82));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 0 12px rgba(0, 255, 230, 0.24);
}

*::-webkit-scrollbar-thumb:hover {
  background:
    linear-gradient(180deg, #ffffff, #00ffe6 44%, #4be8f2);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.26),
    0 0 16px rgba(0, 255, 230, 0.40);
}

*::-webkit-scrollbar-corner {
  background: transparent;
}
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 1px solid rgba(101, 247, 255, 0.9);
  outline-offset: 4px;
  box-shadow: 0 0 0 5px rgba(101, 247, 255, 0.075);
}
button:disabled { cursor: default; opacity: .62; }

.ambient {
  position: fixed;
  z-index: -3;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(72px);
  mix-blend-mode: screen;
}
.ambient-a { top: -20%; right: -8%; width: 44vw; height: 44vw; background: rgba(101,247,255,.10); }
.ambient-b { bottom: -25%; left: 15%; width: 50vw; height: 50vw; background: rgba(24,117,126,.09); }
.ambient-c { top: 36%; left: 42%; width: 28vw; height: 28vw; background: rgba(157,254,255,.045); }
.grain {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: .026;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.88' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.92'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

.app-shell {
  width: 100%;
  height: 100dvh;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  background: rgba(2, 2, 2, .35);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
}

.sidebar {
  position: relative;
  min-width: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 30px 22px 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), transparent 18%),
    linear-gradient(160deg, rgba(10,10,10,.88), rgba(2,2,2,.78));
  border-right: 1px solid rgba(101,247,255,.11);
  box-shadow: 20px 0 70px rgba(0,0,0,.28), inset -1px 0 0 rgba(255,255,255,.018);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
}
.sidebar::after {
  content: "";
  position: absolute;
  top: 0;
  right: -1px;
  width: 1px;
  height: 34%;
  background: linear-gradient(180deg, rgba(101,247,255,.55), transparent);
  box-shadow: 0 0 22px rgba(101,247,255,.28);
  opacity: .55;
}

.brand { display: inline-flex; align-items: center; gap: 13px; width: max-content; }
.grax-logo {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 48px;
  height: 48px;
  isolation: isolate;
  line-height: 0;
}
.grax-logo__glyph {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  shape-rendering: geometricPrecision;
  transform: translateZ(0);
  filter:
    drop-shadow(0 0 7px rgba(0, 255, 230, 0.46))
    drop-shadow(0 0 18px rgba(0, 255, 230, 0.14));
  transition: filter .32s var(--ease), opacity .32s var(--ease), transform .32s var(--ease);
}


.grax-logo__orbit {
  fill: none;
  stroke: rgba(0, 255, 230, 0.34);
  stroke-width: 0.95;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 58 22 6 18;
  stroke-dashoffset: 0;
  opacity: 0.78;
  filter: drop-shadow(0 0 4px rgba(0, 255, 230, 0.30));
  animation: grax-orbit-flow 10s linear infinite;
}

@keyframes grax-orbit-flow {
  to {
    stroke-dashoffset: -104;
  }
}

.grax-logo__outer,
.grax-logo__inner,
.grax-logo__facets,
.grax-logo__bar {
  fill: none;
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-miterlimit: 14;
  vector-effect: non-scaling-stroke;
}

.grax-logo__outer {
  stroke: #00ffe6;
  stroke-width: 3.35;
}

.grax-logo__inner {
  stroke: rgba(0, 255, 230, 0.43);
  stroke-width: 1.45;
}

.grax-logo__facets {
  stroke: rgba(183, 255, 255, 0.34);
  stroke-width: 1.05;
}

.grax-logo__bar {
  stroke: #b7ffff;
  stroke-width: 2.05;
}

.grax-logo__core {
  fill: #00ffe6;
  filter: drop-shadow(0 0 5px rgba(0, 255, 230, 0.72));
}

.brand:hover .grax-logo__glyph {
  transform: translateZ(0) scale(1.025);
  filter:
    drop-shadow(0 0 8px rgba(0, 255, 230, 0.64))
    drop-shadow(0 0 22px rgba(0, 255, 230, 0.22));
}
.brand-name { font-size: 17px; font-weight: 820; letter-spacing: .22em; }

.nav-rail { display: grid; gap: 8px; margin-top: 54px; }
.nav {
  position: relative;
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 15px;
  border-radius: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -.01em;
  transition: color .28s var(--ease), background .28s var(--ease), transform .28s var(--ease), box-shadow .28s var(--ease);
}
.nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.nav:hover { color: var(--text); background: rgba(255,255,255,.028); transform: translateX(2px); }
.nav.is-active {
  color: var(--text);
  background: linear-gradient(90deg, rgba(101,247,255,.095), rgba(101,247,255,.022));
  box-shadow: inset 0 0 0 1px rgba(101,247,255,.18), inset 14px 0 28px rgba(101,247,255,.025), 0 0 24px rgba(101,247,255,.035);
}
.nav.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  width: 2px;
  height: 22px;
  border-radius: 99px;
  background: var(--cyan);
  box-shadow: 0 0 15px rgba(101,247,255,.78);
}
.sidebar-footer { margin-top: auto; }
.engine-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(101,247,255,.055);
  box-shadow: inset 0 0 0 1px rgba(101,247,255,.14), 0 0 24px rgba(101,247,255,.025);
  color: rgba(246,251,252,.72);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.engine-dot { width: 6px; height: 6px; border-radius: 99px; background: var(--cyan); box-shadow: 0 0 12px rgba(101,247,255,.88); }
.sidebar-footer p { margin: 14px 2px 0; color: var(--faint); font-size: 10.5px; line-height: 1.55; }

.main-canvas {
  min-width: 0;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background:
    linear-gradient(160deg, rgba(255,255,255,.016), transparent 26%),
    radial-gradient(circle at 86% -5%, rgba(101,247,255,.06), transparent 34%);
}
.canvas-header {
  min-height: 126px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
  padding: 26px clamp(30px, 4vw, 68px) 24px;
  border-bottom: 1px solid rgba(255,255,255,.045);
  background: rgba(2,2,2,.28);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
}
.section-kicker { color: var(--cyan); font-size: 9px; font-weight: 780; letter-spacing: .19em; text-transform: uppercase; }
.canvas-header h1 { margin: 8px 0 0; font-size: clamp(25px, 2.5vw, 38px); line-height: 1; letter-spacing: -.055em; font-weight: 760; }
.canvas-header p { margin: 9px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.5; }

.master-switch {
  flex: 0 0 auto;
  min-width: 228px;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 0;
  border-radius: 20px;
  padding: 11px 13px 11px 17px;
  cursor: pointer;
  background: rgba(255,255,255,.024);
  box-shadow: inset 0 0 0 1px rgba(101,247,255,.13), inset 0 1px 0 rgba(255,255,255,.05), 0 18px 45px rgba(0,0,0,.16);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), filter .3s var(--ease);
}
.master-switch:hover:not(:disabled) { transform: translateY(-1px); box-shadow: inset 0 0 0 1px rgba(101,247,255,.25), 0 0 30px rgba(101,247,255,.05); }
.master-switch-copy { display: grid; text-align: left; }
.master-switch-label { color: var(--faint); font-size: 9px; font-weight: 760; letter-spacing: .18em; text-transform: uppercase; }
.master-switch-value { margin-top: 4px; font-size: 16px; font-weight: 760; }
.master-switch-track { position: relative; width: 72px; height: 32px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.038); box-shadow: inset 0 0 0 1px rgba(101,247,255,.17), inset 0 0 16px rgba(0,0,0,.58); }
.master-switch-energy { position: absolute; inset: -8px; transform: translateX(-72%); background: linear-gradient(90deg, transparent, rgba(101,247,255,.54), transparent); filter: blur(7px); }
.master-switch-thumb { position: absolute; top: 5px; left: 5px; width: 22px; height: 22px; border-radius: 99px; background: rgba(246,251,252,.88); box-shadow: 0 0 18px rgba(101,247,255,.25); transition: left .46s var(--spring), background .3s var(--ease), box-shadow .3s var(--ease); }
.thumb-core { position: absolute; inset: 7px; border-radius: inherit; background: var(--cyan); box-shadow: 0 0 14px rgba(101,247,255,.9); }
.master-switch[aria-checked="true"] .master-switch-thumb { left: 45px; background: var(--cyan-hot); box-shadow: 0 0 24px rgba(101,247,255,.66); }
.master-switch[aria-checked="false"] { filter: saturate(.55); }

.canvas-scroll {
  min-height: 0;
  overflow: auto;
  padding: 0 clamp(30px, 4vw, 68px) 70px;
  scroll-padding-top: 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(101,247,255,.20) transparent;
}
.canvas-scroll::-webkit-scrollbar { width: 9px; }
.canvas-scroll::-webkit-scrollbar-thumb { background: rgba(101,247,255,.15); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; }

.workspace-section {
  position: relative;
  padding: 42px 0 46px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.workspace-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 84px;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  box-shadow: 0 0 16px rgba(101,247,255,.35);
  opacity: .45;
}
.overview-section { display: grid; grid-template-columns: minmax(230px, .75fr) minmax(560px, 1.6fr); gap: clamp(38px, 6vw, 92px); align-items: end; min-height: 270px; }
.overview-copy h2, .section-heading h2 { margin: 8px 0 0; font-size: clamp(24px, 2.2vw, 34px); line-height: 1; letter-spacing: -.05em; font-weight: 740; }
.overview-copy p, .section-heading p { max-width: 520px; margin: 11px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.62; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: rgba(101,247,255,.08); border-radius: 22px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(101,247,255,.09), 0 24px 70px rgba(0,0,0,.18); }
.metric { min-width: 0; padding: 23px 20px 21px; background: rgba(5,7,8,.70); backdrop-filter: blur(25px) saturate(180%); -webkit-backdrop-filter: blur(25px) saturate(180%); }
.metric span { display: block; color: var(--faint); font-size: 9px; font-weight: 760; letter-spacing: .16em; text-transform: uppercase; }
.metric strong { display: block; margin-top: 10px; font-size: clamp(24px, 2.3vw, 34px); letter-spacing: -.055em; font-weight: 780; }
.metric small { display: block; margin-top: 7px; color: var(--muted); font-size: 10.5px; line-height: 1.35; }

.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 26px; }
.live-chip { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 31px; padding: 0 12px; border-radius: 999px; background: rgba(101,247,255,.055); color: rgba(246,251,252,.7); box-shadow: inset 0 0 0 1px rgba(101,247,255,.12); font-size: 10px; font-weight: 680; }
.settings-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.setting-row {
  min-height: 92px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 20px 20px 20px 22px;
  border-radius: 20px;
  background: rgba(7,9,10,.55);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.045), inset 0 1px 0 rgba(255,255,255,.035);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  transition: transform .28s var(--ease), background .28s var(--ease), box-shadow .28s var(--ease);
}
.setting-row:hover { transform: translateY(-1px); background: rgba(9,12,13,.72); box-shadow: inset 0 0 0 1px rgba(101,247,255,.10), 0 18px 42px rgba(0,0,0,.13); }
.setting-copy strong { display: block; font-size: 13px; font-weight: 720; }
.setting-copy p { margin: 6px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.45; }
.toggle { width: 48px; height: 28px; border: 0; border-radius: 999px; padding: 0; cursor: pointer; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07); transition: background .3s var(--ease), box-shadow .3s var(--ease); }
.toggle span { display: block; width: 18px; height: 18px; margin-left: 5px; border-radius: 99px; background: rgba(246,251,252,.82); box-shadow: 0 6px 14px rgba(0,0,0,.4); transition: transform .42s var(--spring), background .3s var(--ease), box-shadow .3s var(--ease); }
.toggle[aria-checked="true"] { background: rgba(101,247,255,.10); box-shadow: inset 0 0 0 1px rgba(101,247,255,.24), 0 0 18px rgba(101,247,255,.05); }
.toggle[aria-checked="true"] span { transform: translateX(20px); background: var(--cyan); box-shadow: 0 0 15px rgba(101,247,255,.55); }

.policy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.policy-pane { min-height: 280px; padding: 24px; border-radius: 22px; background: rgba(7,9,10,.55); box-shadow: inset 0 0 0 1px rgba(255,255,255,.045), inset 0 1px 0 rgba(255,255,255,.03); backdrop-filter: blur(25px) saturate(180%); -webkit-backdrop-filter: blur(25px) saturate(180%); }
.policy-label { color: var(--cyan); font-size: 9px; font-weight: 760; letter-spacing: .17em; text-transform: uppercase; }
.policy-heading h3 { margin: 7px 0 0; font-size: 18px; letter-spacing: -.035em; }
.domain-form { margin-top: 22px; }
.domain-form label { display: block; margin-bottom: 8px; color: var(--faint); font-size: 9px; font-weight: 760; letter-spacing: .16em; text-transform: uppercase; }
.input-group { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
.input-group input { min-width: 0; height: 43px; border: 0; border-radius: 14px; padding: 0 14px; color: var(--text); background: rgba(255,255,255,.035); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); outline: 0; }
.input-group input::placeholder { color: rgba(230,241,244,.26); }
.input-group input:focus { box-shadow: inset 0 0 0 1px rgba(101,247,255,.28), 0 0 22px rgba(101,247,255,.045); }
.input-group button, .secondary { min-height: 43px; border: 0; border-radius: 14px; padding: 0 16px; cursor: pointer; color: var(--text); background: rgba(101,247,255,.065); box-shadow: inset 0 0 0 1px rgba(101,247,255,.16); font-size: 11px; font-weight: 700; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease); }
.input-group button:hover, .secondary:hover { transform: translateY(-1px); background: rgba(101,247,255,.10); box-shadow: inset 0 0 0 1px rgba(101,247,255,.28), 0 0 22px rgba(101,247,255,.045); }
.domain-list { display: grid; gap: 8px; margin-top: 18px; max-height: 310px; overflow: auto; }
.domain-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 42px; padding: 0 11px 0 13px; border-radius: 13px; background: rgba(255,255,255,.025); }
.domain-item span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(246,251,252,.75); font-size: 11.5px; }
.domain-item button { border: 0; background: transparent; color: var(--cyan); cursor: pointer; font-size: 10px; font-weight: 700; }
.empty { margin: 18px 0 0; color: var(--faint); font-size: 11px; }

.diagnostics-heading { align-items: center; }
.actions { display: flex; gap: 9px; }
#diagnosticGrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0; overflow: hidden; border-radius: 20px; background: rgba(101,247,255,.075); box-shadow: inset 0 0 0 1px rgba(101,247,255,.08); }
#diagnosticGrid > div { min-width: 0; padding: 18px 20px; background: rgba(6,8,9,.76); }
#diagnosticGrid dt { color: var(--faint); font-size: 9px; font-weight: 760; letter-spacing: .15em; text-transform: uppercase; }
#diagnosticGrid dd { margin: 8px 0 0; overflow: hidden; text-overflow: ellipsis; color: rgba(246,251,252,.82); font-size: 12px; }
details { margin-top: 14px; border-radius: 17px; background: rgba(255,255,255,.022); box-shadow: inset 0 0 0 1px rgba(255,255,255,.04); }
summary { cursor: pointer; padding: 16px 18px; color: rgba(246,251,252,.7); font-size: 11px; font-weight: 680; }
pre { margin: 0; max-height: 340px; overflow: auto; padding: 0 18px 18px; color: rgba(210,236,239,.65); font: 10.5px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word; }

.toast { position: fixed; z-index: 80; right: 24px; bottom: 24px; min-width: 260px; max-width: min(420px, calc(100vw - 48px)); min-height: 48px; display: flex; align-items: center; padding: 12px 15px; border-radius: 16px; background: rgba(7,8,9,.82); color: var(--text); backdrop-filter: blur(25px) saturate(180%); -webkit-backdrop-filter: blur(25px) saturate(180%); box-shadow: inset 0 0 0 1px rgba(101,247,255,.18), 0 22px 58px rgba(0,0,0,.55); opacity: 0; transform: translateY(12px) scale(.98); pointer-events: none; transition: opacity .26s var(--ease), transform .26s var(--ease); font-size: 11.5px; }
.toast.show { opacity: 1; transform: translateY(0) scale(1); }
.toast.error { box-shadow: inset 0 0 0 1px rgba(255,96,122,.32), 0 22px 58px rgba(0,0,0,.55); }
.app-shell[aria-busy="true"] { cursor: progress; }

@media (max-width: 1160px) {
  :root { --sidebar: 242px; }
  .overview-section { grid-template-columns: 1fr; align-items: start; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-list { grid-template-columns: 1fr; }
  #diagnosticGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  body { overflow: auto; }
  .app-shell { height: auto; min-height: 100dvh; grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; z-index: 20; width: 100%; height: auto; min-height: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 20px; padding: 14px 18px; border-right: 0; border-bottom: 1px solid rgba(101,247,255,.11); }
  .sidebar::after { top: auto; right: auto; bottom: -1px; left: 0; width: 34%; height: 1px; background: linear-gradient(90deg, rgba(101,247,255,.55), transparent); }
  .grax-logo { width: 40px; height: 40px; }
  .nav-rail { display: flex; justify-content: flex-end; gap: 6px; margin: 0; overflow: auto; }
  .nav { min-height: 40px; padding: 0 12px; }
  .nav svg { display: none; }
  .sidebar-footer { display: none; }
  .main-canvas { height: auto; min-height: calc(100dvh - 69px); }
  .canvas-header { padding: 24px 22px; }
  .canvas-scroll { overflow: visible; padding: 0 22px 50px; }
  .policy-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .canvas-header { align-items: flex-start; flex-direction: column; }
  .master-switch { width: 100%; }
  .metrics-grid, #diagnosticGrid { grid-template-columns: 1fr; }
  .section-heading, .diagnostics-heading { align-items: flex-start; flex-direction: column; }
  .actions { width: 100%; }
  .actions .secondary { flex: 1; }
  .nav span { font-size: 11px; }
  .brand-name { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
