/* Elf of Doom on the RTX Spark — ODS with its Aurora Lake theme: the wallpaper under one
   frosted shell, glass panels, and the dashboard's own sidebar and Workbench pane.
   Values come from the dashboard (wallpaper-themes.css, pixel-workspace.css, ods-logo.css,
   rtx-spark-tag.css, the Portal Workbench and pixel-preview-viewport.css). */
@font-face { font-family:Inter; font-style:normal; font-weight:100 900; font-display:swap; src:url('fonts/inter-latin.woff2') format('woff2'); }
@font-face { font-family:'JetBrains Mono'; font-style:normal; font-weight:400 700; font-display:swap; src:url('fonts/jetbrains-mono-latin.woff2') format('woff2'); }
@font-face { font-family:Yellowtail; font-style:normal; font-weight:400; font-display:block; src:url('fonts/yellowtail-regular.ttf') format('truetype'); }

:root {
  --panel:#111820b8;
  --card:#17212abe;
  --border:#ffffff20;
  --text:#e4e7eb;
  --text-2:#cdd3db;
  --muted:#b3bdc7;
  --nav:#a7aab0;
  --nav-hot:#f0f2f5;
  --nav-hot-bg:#ffffff12;
  --glass:blur(26px) saturate(110%);
  --neon:#38b6ff;
  --neon-soft:#8fdcff;
  --nav-width:248px;
  color-scheme:dark;
}
* { box-sizing:border-box; }
html, body { margin:0; height:100%; }
body {
  background:linear-gradient(#080c1266,#080c1280),url('aurora-lake.jpg') center / cover fixed,#0b1018;
  color:var(--text);
  font:13px/1.5 Inter,system-ui,-apple-system,'Segoe UI',sans-serif;
  -webkit-font-smoothing:antialiased;
  isolation:isolate;
}
/* One frosted shell over the whole wallpaper; the sidebar sits on it with no slab of its own. */
body::before {
  content:''; position:fixed; inset:0; z-index:-1; pointer-events:none;
  background:#0b101880;
  backdrop-filter:blur(32px) saturate(115%);
  -webkit-backdrop-filter:blur(32px) saturate(115%);
}
a { color:inherit; }
button { font:inherit; color:inherit; background:none; border:0; cursor:pointer; }
svg.i { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; flex-shrink:0; }
:focus-visible { outline:2px solid #999fa9; outline-offset:3px; }
.sr-only { position:absolute; width:1px; height:1px; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

/* ---- sidebar (the ODS rail, with the RTX Spark edition tag) ---- */
.sidebar { position:fixed; inset:0 auto 0 0; width:var(--nav-width); display:flex; flex-direction:column; padding:16px 10px; overflow-y:auto; scrollbar-width:none; }
.brand { position:relative; display:flex; justify-content:center; text-decoration:none; padding:0 0 56px; }
.mark {
  width:184px; height:104px;
  -webkit-mask:url('ods-mark-mask.png') center / contain no-repeat;
  mask:url('ods-mark-mask.png') center / contain no-repeat;
  background:linear-gradient(145deg,rgb(228 231 235 / .64),rgb(228 231 235 / .22) 48%,rgb(228 231 235 / .46));
  backdrop-filter:blur(9px) saturate(125%);
  -webkit-backdrop-filter:blur(9px) saturate(125%);
}
.rtx-tag { position:absolute; left:50%; top:100px; transform:translateX(-50%); pointer-events:none; }
.rtx-tag svg { display:block; overflow:visible; }
.neon {
  font-family:Yellowtail,cursive; font-size:36px;
  fill:#f2fbff; stroke:#f2fbff; stroke-width:.4;
  filter:drop-shadow(0 0 1px #fff) drop-shadow(0 0 3px #8fdcff) drop-shadow(0 0 6px #38b6ff)
    drop-shadow(0 0 9px #0b84ff) drop-shadow(0 0 12px rgb(0 80 255 / .7));
}
.neon.swash { fill:none; stroke-width:2.2; stroke-linecap:round; }
.nav { display:flex; flex-direction:column; }
.nav-item {
  width:100%; display:flex; align-items:center; gap:11px; padding:9px 12px; margin:2px 0;
  border-radius:7px; color:var(--nav); font-size:13px; text-align:left; text-decoration:none;
}
.nav-item:hover, .nav-item.is-active { color:var(--nav-hot); background:var(--nav-hot-bg); }
.nav-item .out { margin-left:auto; width:13px; height:13px; opacity:.55; }
.nav-sep { height:1px; background:var(--border); margin:10px 12px; }
.spark-stats { margin:22px 2px 0; padding:12px 14px; border:1px solid #38b6ff38; border-radius:10px; background:#38b6ff0d; }
.ss-head { display:flex; align-items:center; gap:7px; margin-bottom:2px; font-size:11px; font-weight:500; color:var(--neon-soft); }
.ss-sub { margin:0 0 9px 13px; font-size:11px; color:var(--muted); }
.ss-dot { width:6px; height:6px; border-radius:50%; background:var(--neon); box-shadow:0 0 6px var(--neon); }
.spark-stats dl { display:flex; flex-direction:column; gap:5px; margin:0; font-size:12px; line-height:1.35; }
.ss-row { display:flex; justify-content:space-between; align-items:baseline; gap:10px; white-space:nowrap; }
.spark-stats dt { color:var(--muted); }
.spark-stats dd { margin:0; color:var(--text); font-variant-numeric:tabular-nums; }
.sidebar-foot { margin-top:auto; padding:14px 10px 4px; font-size:11px; color:#a9b2ba; line-height:1.5; }
.sidebar-foot b { display:block; color:var(--text-2); font-weight:500; }

/* ---- stage and the Workbench pane ---- */
.stage { margin-left:var(--nav-width); height:100vh; height:100dvh; padding:8px 8px 8px 0; display:flex; }
.panel {
  flex:1; min-width:0; display:flex; flex-direction:column;
  background:var(--panel); border-radius:18px; overflow:hidden;
  backdrop-filter:var(--glass); -webkit-backdrop-filter:var(--glass);
}
.panel[hidden] { display:none; }
.panel-head {
  flex-shrink:0; min-height:42px; display:flex; align-items:center; justify-content:space-between; gap:8px;
  padding:4px 8px; border-bottom:1px solid rgb(46 46 50 / .5);
}
.panel-head :focus-visible { outline-color:var(--muted); outline-offset:-2px; }
.tabs { display:flex; align-items:center; gap:4px; min-width:0; }
.tab { display:flex; align-items:center; gap:8px; padding:7px 9px; border-radius:8px; color:var(--muted); font-size:12px; white-space:nowrap; }
.tab.is-active { color:var(--text); }
.tab svg.i { width:13px; height:13px; }
.path { margin-left:4px; color:#a9b2ba; font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.actions { display:flex; align-items:center; gap:3px; }
.icon-btn { display:grid; place-items:center; width:28px; height:28px; border-radius:6px; color:var(--muted); text-decoration:none; }
.icon-btn svg.i { width:14px; height:14px; }
/* The expand button swaps to "exit" while the whole page is full screen. */
.icon-btn svg.i-min, .is-full .icon-btn svg.i-max { display:none; }
.is-full .icon-btn svg.i-min { display:block; }
.icon-btn:hover { color:var(--text); background:rgb(228 231 235 / .05); }
.icon-btn[hidden] { display:none; }
.viewport { position:relative; flex:1; min-height:0; background:#000; }
.viewport iframe { position:absolute; inset:0; width:100%; height:100%; border:0; display:block; }
.note { flex-shrink:0; margin:0; padding:6px 8px; font-size:12px; line-height:1.4; color:var(--text-2); background:#131415; border-top:1px solid #2e2e32; }
.note b { color:var(--text); font-weight:500; }
.kbd-hint { display:none; }
.phone-card { display:none; }
.journey-toggle { display:none; }
@media (pointer:coarse) { .kbd-hint { display:inline; } }

/* ---- scrolling content ---- */
.scroll { flex:1; min-height:0; overflow:auto; padding:28px 32px 48px; scrollbar-width:thin; scrollbar-color:rgb(228 231 235 / .28) transparent; }
.scroll:focus-visible { outline-offset:-2px; }
@supports selector(::-webkit-scrollbar) {
  .scroll { scrollbar-color:auto; }
  .scroll::-webkit-scrollbar { width:6px; height:6px; }
  .scroll::-webkit-scrollbar-track, .scroll::-webkit-scrollbar-corner { background:transparent; }
  .scroll::-webkit-scrollbar-thumb { background:rgb(228 231 235 / .28); border-radius:999px; }
  .scroll::-webkit-scrollbar-button { display:none; }
}
.lede { max-width:760px; margin:0 0 24px; }
.lede h1 { margin:0 0 8px; font-size:20px; font-weight:600; }
.lede p { margin:0; color:var(--text-2); font-size:14px; }
.eyebrow { display:inline-flex; align-items:center; gap:7px; margin-bottom:10px; color:var(--neon-soft); font-size:12px; font-weight:500; }
h2 { margin:32px 0 12px; font-size:14px; font-weight:600; color:var(--text); }
.small { font-size:12px; color:#a9b2ba; }

/* stat cards (dashboard style) */
.cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:12px; }
.card { background:var(--card); border:1px solid var(--border); border-radius:12px; padding:16px; }
.card .k { display:flex; align-items:center; gap:8px; color:var(--text-2); font-size:12px; }
.card .v { margin-top:10px; font-size:26px; font-weight:600; letter-spacing:-.02em; font-variant-numeric:tabular-nums; }
.card .v small { font-size:13px; font-weight:500; color:var(--text-2); letter-spacing:0; }
.card .s { margin-top:4px; color:#a9b2ba; font-size:12px; }
.card.hot .v { color:#f2fbff; text-shadow:0 0 18px rgb(56 182 255 / .45); }

.chart { margin-top:12px; background:var(--card); border:1px solid var(--border); border-radius:12px; padding:14px 16px 10px; }
.chart svg { display:block; width:100%; height:auto; }
.legend { display:flex; flex-wrap:wrap; gap:16px; margin-top:6px; font-size:12px; color:var(--text-2); }
.legend i { display:inline-block; width:10px; height:3px; border-radius:2px; margin-right:6px; vertical-align:middle; }

.specs { display:grid; grid-template-columns:max-content 1fr; gap:8px 20px; margin:0; font-size:13px; }
.specs dt { color:#a9b2ba; }
.specs dd { margin:0; color:var(--text); }

/* the build: a Portal-style transcript */
.summary { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:8px; }
.pill { display:inline-flex; align-items:center; gap:7px; padding:6px 11px; border:1px solid var(--border); border-radius:999px; background:var(--card); font-size:12px; color:var(--text-2); }
.pill b { color:var(--text); font-weight:600; font-variant-numeric:tabular-nums; }
.session { margin-top:30px; }
.session-head { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 12px; margin-bottom:12px; }
.session-head h2 { margin:0; }
.turns { list-style:none; margin:0; padding:0; }
.turn { display:grid; grid-template-columns:28px 1fr; gap:12px; padding:14px 0; border-top:1px solid #ffffff12; }
.avatar { width:28px; height:28px; border-radius:50%; display:grid; place-items:center; background:#ffffff14; color:var(--text-2); font-size:11px; font-weight:600; }
.bubble { max-width:760px; margin:0; padding:10px 13px; border-radius:12px; background:var(--card); border:1px solid #ffffff14; color:var(--text); font-size:14px; white-space:pre-wrap; overflow-wrap:anywhere; }
.meta { max-width:760px; display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-top:8px; font-size:12px; color:#a9b2ba; }
.meta .add { color:#6fcf8f; } .meta .del { color:#e67a7a; }
.meta .tag { padding:1px 7px; border-radius:6px; background:#ffffff14; color:var(--text-2); }
.did { margin-top:6px; max-width:760px; color:var(--text-2); font-size:13px; }
.copy { margin-left:auto; display:inline-flex; align-items:center; gap:5px; color:#a9b2ba; font-size:12px; padding:2px 6px; border-radius:6px; }
.copy:hover { color:var(--nav-hot); background:var(--nav-hot-bg); }
.callout { margin-top:28px; max-width:760px; padding:16px 18px; border:1px solid rgb(56 182 255 / .35); border-radius:12px; background:rgb(56 182 255 / .06); color:var(--text-2); }
.callout b { color:var(--text); }
.btn { display:inline-flex; align-items:center; gap:8px; margin-top:12px; padding:8px 14px; border-radius:8px; background:#ffffff14; color:var(--nav-hot); text-decoration:none; font-size:13px; font-weight:500; }
.btn:hover { background:#ffffff22; }

/* ---- phones: the ODS collapsed rail ---- */
@media (max-width:639px) {
  /* Phones: one labeled page to scroll, instead of the icon rail and tabs. */
  .sidebar { position:static; width:auto; padding:22px 16px 6px; align-items:stretch; overflow:visible; }
  .brand { padding:0 0 52px; }
  .nav { flex-direction:row; gap:8px; }
  .nav button.nav-item, .nav-sep, .sidebar .spark-stats, .sidebar-foot { display:none; }
  .nav a.nav-item { flex:1; justify-content:center; gap:7px; margin:0; padding:10px 8px; border:1px solid var(--border);
    border-radius:10px; background:#ffffff0d; color:var(--text); font-size:13px; }
  .nav a.nav-item .out { display:none; }
  .nav a.nav-item span { white-space:nowrap; }
  .stage { margin-left:0; height:auto; padding:10px 10px 28px; flex-direction:column; gap:12px; }
  .panel, .panel[hidden] { display:flex; flex:none; border-radius:14px; overflow:visible; }
  .panel-head { display:none; }
  .scroll { overflow:visible; padding:22px 16px 28px; }
  .kbd-hint { display:inline; }
  /* The game needs a keyboard: phones get a card and the Spark readings instead of the game. */
  #tab-play .viewport, #tab-play .note { display:none; }
  .phone-card { display:block; padding:16px 16px 10px; }
  .phone-card img { display:block; width:100%; height:auto; border-radius:10px; box-shadow:0 0 0 1px #8fdcff40, 0 10px 30px #0008; }
  .phone-card p { margin:14px 2px; font-size:14px; line-height:1.45; color:var(--text-2); }
  .phone-card p b { color:var(--text); font-weight:600; }
  #phone-stats .spark-stats { display:block; margin:0 0 6px; }
  /* The prompt journey is long: collapsed behind a button until asked for. */
  .journey-toggle { display:block; width:100%; margin:4px 0 18px; padding:11px 12px; border:1px solid #8fdcff55;
    border-radius:10px; background:#38b6ff14; color:var(--neon-soft); font-size:14px; font-weight:500; }
  .journey:not(.open) { display:none; }
}
@media (forced-colors:active) {
  .neon { forced-color-adjust:none; fill:CanvasText; stroke:CanvasText; filter:none; }
  .neon.swash { fill:none; }
  .mark { forced-color-adjust:none; background:CanvasText; }
  .nav-item.is-active { outline:2px solid Highlight; outline-offset:-2px; }
}
@media (prefers-reduced-motion:reduce) { * { scroll-behavior:auto !important; } }
/* Without blur (setting or browser), the glass becomes the dashboard's solid fallback. */
@media (prefers-reduced-transparency:reduce) {
  body::before { background:#13181ff2; backdrop-filter:none; -webkit-backdrop-filter:none; }
  .panel { background:#13181f; backdrop-filter:none; -webkit-backdrop-filter:none; }
  .mark { background:rgb(228 231 235); backdrop-filter:none; -webkit-backdrop-filter:none; }
}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {
  body::before { background:#13181ff2; }
  .panel { background:#13181f; }
}
.card .v small { white-space:nowrap; }
