/* ==========================================================================
   Uno Space — Fluent 2 inspired design system
   Neutral surfaces, Mica/Acrylic materials, Fluent elevation, radii and motion.
   ========================================================================== */

/* ---------- Tokens: light (default) ---------- */
:root {
  color-scheme: light;
  --bg: #f3f3f3;
  --mica-tint-1: rgba(15, 108, 189, 0.07);
  --mica-tint-2: rgba(135, 100, 184, 0.06);
  --surface: #ffffff;
  --surface-2: #fafafa;
  --surface-3: #f5f5f5;
  --surface-alt: #f0f0f0;
  --subtle: rgba(0, 0, 0, 0.04);
  --subtle-2: rgba(0, 0, 0, 0.065);
  --stroke: rgba(0, 0, 0, 0.08);
  --stroke-2: rgba(0, 0, 0, 0.14);
  --stroke-strong: #d1d1d1;
  --stroke-control: rgba(0, 0, 0, 0.0578);
  --stroke-control-bottom: rgba(0, 0, 0, 0.1622);
  --fg: #1a1a1a;
  --fg-2: #424242;
  --fg-3: #616161;
  --fg-4: #767676;
  --brand: #0f6cbd;
  --brand-hover: #115ea3;
  --brand-pressed: #0e4775;
  --brand-fg: #0f6cbd;
  --brand-subtle: #ebf3fc;
  --brand-stroke: #b4d6fa;
  --on-brand: #ffffff;
  --success: #107c10;
  --acrylic: rgba(249, 249, 249, 0.78);
  --acrylic-strong: rgba(252, 252, 252, 0.9);
  --code-bg: #fbfbfb;
  --shadow-2: 0 0 2px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.14);
  --shadow-4: 0 0 2px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.14);
  --shadow-8: 0 0 2px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.14);
  --shadow-16: 0 0 2px rgba(0, 0, 0, 0.12), 0 8px 16px rgba(0, 0, 0, 0.14);
  --shadow-28: 0 0 8px rgba(0, 0, 0, 0.12), 0 14px 28px rgba(0, 0, 0, 0.14);
  --shadow-64: 0 0 8px rgba(0, 0, 0, 0.12), 0 32px 64px rgba(0, 0, 0, 0.14);
  --app-mix: #000;
  --app-mix-pct: 8%;

  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 8px;
  --r-xl: 12px;
  --font: 'Segoe UI Variable Text', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif;
  --display: 'Segoe UI Variable Display', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif;
  --mono: 'Cascadia Code', 'Cascadia Mono', Consolas, ui-monospace, SFMono-Regular, Menlo, monospace;
  --maxw: 1200px;
  --nav-h: 56px;
  --ease: cubic-bezier(0, 0, 0, 1);          /* Fluent decelerate */
  --ease-std: cubic-bezier(0.33, 0, 0.67, 1); /* Fluent easy-ease */
  --dur: 200ms;

  --a1: var(--brand);
  --a2: #62abf5;
  --app-ink: color-mix(in srgb, var(--a1) calc(100% - var(--app-mix-pct)), var(--app-mix));
}

/* ---------- Tokens: dark ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #1c1c1c;
    --mica-tint-1: rgba(71, 158, 245, 0.07);
    --mica-tint-2: rgba(135, 100, 184, 0.07);
    --surface: #2b2b2b;
    --surface-2: #323232;
    --surface-3: #262626;
    --surface-alt: #202020;
    --subtle: rgba(255, 255, 255, 0.06);
    --subtle-2: rgba(255, 255, 255, 0.09);
    --stroke: rgba(255, 255, 255, 0.08);
    --stroke-2: rgba(255, 255, 255, 0.14);
    --stroke-strong: #666666;
    --stroke-control: rgba(255, 255, 255, 0.07);
    --stroke-control-bottom: rgba(255, 255, 255, 0.035);
    --fg: #ffffff;
    --fg-2: #d6d6d6;
    --fg-3: #adadad;
    --fg-4: #8f8f8f;
    --brand: #115ea3;
    --brand-hover: #0f6cbd;
    --brand-pressed: #0c3b5e;
    --brand-fg: #479ef5;
    --brand-subtle: rgba(71, 158, 245, 0.12);
    --brand-stroke: rgba(71, 158, 245, 0.35);
    --success: #54b054;
    --acrylic: rgba(38, 38, 38, 0.78);
    --acrylic-strong: rgba(44, 44, 44, 0.92);
    --code-bg: #1f1f1f;
    --shadow-2: 0 0 2px rgba(0, 0, 0, 0.24), 0 1px 2px rgba(0, 0, 0, 0.28);
    --shadow-4: 0 0 2px rgba(0, 0, 0, 0.24), 0 2px 4px rgba(0, 0, 0, 0.28);
    --shadow-8: 0 0 2px rgba(0, 0, 0, 0.24), 0 4px 8px rgba(0, 0, 0, 0.28);
    --shadow-16: 0 0 2px rgba(0, 0, 0, 0.24), 0 8px 16px rgba(0, 0, 0, 0.28);
    --shadow-28: 0 0 8px rgba(0, 0, 0, 0.24), 0 14px 28px rgba(0, 0, 0, 0.28);
    --shadow-64: 0 0 8px rgba(0, 0, 0, 0.24), 0 32px 64px rgba(0, 0, 0, 0.28);
    --app-mix: #fff;
    --app-mix-pct: 30%;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1c1c1c;
  --mica-tint-1: rgba(71, 158, 245, 0.07);
  --mica-tint-2: rgba(135, 100, 184, 0.07);
  --surface: #2b2b2b;
  --surface-2: #323232;
  --surface-3: #262626;
  --surface-alt: #202020;
  --subtle: rgba(255, 255, 255, 0.06);
  --subtle-2: rgba(255, 255, 255, 0.09);
  --stroke: rgba(255, 255, 255, 0.08);
  --stroke-2: rgba(255, 255, 255, 0.14);
  --stroke-strong: #666666;
  --stroke-control: rgba(255, 255, 255, 0.07);
  --stroke-control-bottom: rgba(255, 255, 255, 0.035);
  --fg: #ffffff;
  --fg-2: #d6d6d6;
  --fg-3: #adadad;
  --fg-4: #8f8f8f;
  --brand: #115ea3;
  --brand-hover: #0f6cbd;
  --brand-pressed: #0c3b5e;
  --brand-fg: #479ef5;
  --brand-subtle: rgba(71, 158, 245, 0.12);
  --brand-stroke: rgba(71, 158, 245, 0.35);
  --success: #54b054;
  --acrylic: rgba(38, 38, 38, 0.78);
  --acrylic-strong: rgba(44, 44, 44, 0.92);
  --code-bg: #1f1f1f;
  --shadow-2: 0 0 2px rgba(0, 0, 0, 0.24), 0 1px 2px rgba(0, 0, 0, 0.28);
  --shadow-4: 0 0 2px rgba(0, 0, 0, 0.24), 0 2px 4px rgba(0, 0, 0, 0.28);
  --shadow-8: 0 0 2px rgba(0, 0, 0, 0.24), 0 4px 8px rgba(0, 0, 0, 0.28);
  --shadow-16: 0 0 2px rgba(0, 0, 0, 0.24), 0 8px 16px rgba(0, 0, 0, 0.28);
  --shadow-28: 0 0 8px rgba(0, 0, 0, 0.24), 0 14px 28px rgba(0, 0, 0, 0.28);
  --shadow-64: 0 0 8px rgba(0, 0, 0, 0.24), 0 32px 64px rgba(0, 0, 0, 0.28);
  --app-mix: #fff;
  --app-mix-pct: 30%;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 64px); -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow-x: clip; min-height: 100vh; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 0.5em; }
code, kbd, pre { font-family: var(--mono); }
::selection { background: color-mix(in srgb, var(--brand) 30%, transparent); }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; border-radius: var(--r-sm); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(var(--maxw), 100% - 32px); margin-inline: auto; }
.grad-text, .accent-text { color: var(--fg-3); }
.brand .grad-text { font-weight: 400; }
.muted { color: var(--fg-3); }
.dim { color: var(--fg-4); }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.ico { flex: none; }

/* Acrylic: translucent, blurred material reserved for transient / overlay surfaces. */
.nav.scrolled, .mega, .subnav, .pg-bar, .pg-cover > div, .toast {
  background-color: var(--acrylic);
  -webkit-backdrop-filter: blur(30px) saturate(125%);
  backdrop-filter: blur(30px) saturate(125%);
}

/* ---------- Navigation ---------- */
.nav { position: fixed; inset: 0 0 auto; height: var(--nav-h); z-index: 50; display: flex; align-items: center; border-bottom: 1px solid transparent; transition: background-color var(--dur) var(--ease-std), border-color var(--dur); }
.nav.scrolled { border-color: var(--stroke); }
.nav .wrap { display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 17px; }
.brand-mark { width: 28px; height: 28px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15)); }
.nav-links { display: flex; gap: 2px; margin-left: auto; align-items: center; }
.nav-links > a, .nav-links > .menu > button { height: 32px; padding: 0 12px; border-radius: var(--r-sm); color: var(--fg-2); font: 400 14px var(--font); background: none; border: 0; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; transition: background-color var(--dur); }
.nav-links > a:hover, .nav-links > .menu > button:hover { background: var(--subtle); color: var(--fg); }
.nav-links > a.active { color: var(--fg); font-weight: 600; position: relative; }
.nav-links > a.active::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -12px; height: 3px; border-radius: 3px; background: var(--brand-fg); }
.nav-cta { margin-left: 8px; }
.menu { position: relative; }
.menu > button .ico { transform: rotate(90deg); transition: transform var(--dur) var(--ease); }
.menu.open > button .ico { transform: rotate(-90deg); }
.mega { position: absolute; top: calc(100% + 8px); right: -140px; width: min(720px, 92vw); padding: 6px; border-radius: var(--r-lg); border: 1px solid var(--stroke); box-shadow: var(--shadow-16);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity 150ms var(--ease), transform 250ms var(--ease), visibility 150ms; }
.menu:hover .mega, .menu:focus-within .mega, .menu.open .mega { opacity: 1; visibility: visible; transform: none; }
.mega a { display: flex; gap: 12px; align-items: center; padding: 8px 10px; border-radius: var(--r-sm); transition: background-color var(--dur); }
.mega a:hover { background: var(--subtle); }
.mega b { display: block; font-size: 14px; font-weight: 600; }
.mega small { display: block; color: var(--fg-3); font-size: 12px; line-height: 1.3; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; color: var(--fg); padding: 6px; cursor: pointer; border-radius: var(--r-sm); }
.nav-toggle:hover { background: var(--subtle); }
.theme-toggle .ico:last-child { display: none; }
:root[data-theme="dark"] .theme-toggle .ico:first-child { display: none; }
:root[data-theme="dark"] .theme-toggle .ico:last-child { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .ico:first-child { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .ico:last-child { display: block; }
}
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav-links { position: fixed; inset: var(--nav-h) 0 auto; flex-direction: column; align-items: stretch; background: var(--acrylic-strong); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); padding: 8px 16px 16px; border-bottom: 1px solid var(--stroke); box-shadow: var(--shadow-16); transform: translateY(calc(-100% - var(--nav-h))); visibility: hidden; pointer-events: none; transition: transform 300ms var(--ease), visibility 0s linear 300ms; max-height: calc(100vh - var(--nav-h)); overflow: auto; }
  .nav.open .nav-links { transform: none; visibility: visible; pointer-events: auto; transition: transform 300ms var(--ease), visibility 0s; }
  .nav-links > a.active::after { display: none; }
  .mega { position: static; width: auto; grid-template-columns: 1fr 1fr; opacity: 1; visibility: visible; transform: none; box-shadow: none; display: none; margin: 4px 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border: 0; }
  .menu.open .mega { display: grid; }
  .nav-cta { margin: 8px 0 0; }
  .theme-toggle { align-self: flex-start; }
}

/* ---------- Buttons, badges, pills ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: var(--r-md); font: 600 15px/1 var(--font); cursor: pointer; white-space: nowrap; position: relative;
  color: var(--fg); background: var(--surface); border: 1px solid var(--stroke-control); border-bottom-color: var(--stroke-control-bottom); box-shadow: var(--shadow-2);
  transition: background-color var(--dur), border-color var(--dur), color var(--dur); }
.btn:hover { background: var(--surface-2); }
.btn:active { background: var(--surface-3); color: var(--fg-2); box-shadow: none; }
.btn-primary { color: var(--on-brand); background: var(--brand); border-color: transparent; border-bottom-color: rgba(0, 0, 0, 0.25); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-primary:active { background: var(--brand-pressed); color: rgba(255, 255, 255, 0.85); }
.btn-subtle { background: transparent; border-color: transparent; box-shadow: none; }
.btn-subtle:hover { background: var(--subtle); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 14px; border-radius: var(--r-sm); }
.btn-icon { width: 32px; height: 32px; padding: 0; border-radius: var(--r-sm); }
.btn.is-on { background: var(--brand-subtle); color: var(--brand-fg); border-color: var(--brand-stroke); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 999px; font: 400 14px var(--font); color: var(--fg-2); background: var(--surface); border: 1px solid var(--stroke-2); white-space: nowrap; }
button.chip { cursor: pointer; transition: background-color var(--dur), border-color var(--dur), color var(--dur); }
button.chip:hover { background: var(--surface-2); color: var(--fg); }
button.chip.is-on { color: var(--brand-fg); background: var(--brand-subtle); border-color: var(--brand-stroke); font-weight: 600; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--brand)); }
select.chip { appearance: none; padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 17px) 14px, calc(100% - 12px) 14px; background-size: 5px 5px; background-repeat: no-repeat; cursor: pointer; }
.badge { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: var(--r-sm); font: 600 11.5px/1 var(--font); background: var(--subtle); color: var(--fg-2); border: 1px solid var(--stroke); white-space: nowrap; }
.eyebrow { display: block; font: 600 14px/1.4 var(--font); color: var(--brand-fg); margin-bottom: 8px; }
kbd { display: inline-block; padding: 1px 6px; min-width: 22px; text-align: center; border-radius: var(--r-sm); font: 600 11.5px/1.6 var(--font); background: var(--surface); border: 1px solid var(--stroke-2); border-bottom-width: 2px; color: var(--fg-2); }

/* ---------- Layout primitives ---------- */
section { position: relative; }
.section { padding: 96px 0; }
.section-sm { padding: 56px 0; }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.2; }
.section-head p { font-size: 17px; color: var(--fg-3); margin: 0; }
.divider { height: 1px; background: var(--stroke); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } .section { padding: 64px 0; } }

/* Entrance motion: short, decelerating, small distance. */
[data-reveal] { opacity: 0; transform: translateY(12px); transition: opacity 400ms var(--ease), transform 500ms var(--ease); transition-delay: calc(var(--d, 0) * 50ms); }
[data-reveal="left"] { transform: translateX(-12px); }
[data-reveal="right"] { transform: translateX(12px); }
[data-reveal].in { opacity: 1; transform: none; }

/* ---------- Cards ---------- */
.card { position: relative; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--stroke); box-shadow: var(--shadow-2); padding: 24px; overflow: hidden; }
a.card, .hl .card, .doc, .pkg { transition: box-shadow var(--dur) var(--ease), background-color var(--dur); }
a.card:hover, .hl .card:hover { box-shadow: var(--shadow-8); }
.card h3 { font-size: 18px; margin-bottom: 6px; }
.card p { color: var(--fg-3); font-size: 15px; margin: 0; }
.ico-orb { width: 40px; height: 40px; border-radius: var(--r-lg); display: grid; place-items: center; margin-bottom: 16px; color: var(--app-ink); background: color-mix(in srgb, var(--a1) 12%, transparent); }

/* App icon tile (Fluent-style app icon). */
.planet { --s: 40px; width: var(--s); height: var(--s); flex: none; border-radius: 24%; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--a2) 0%, var(--a1) 70%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 1px 2px rgba(0, 0, 0, 0.18); }
.planet .ico { width: 54%; height: 54%; }
.planet.lg { --s: 72px; border-radius: 18px; }
.planet.xl { --s: 88px; border-radius: 20px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), var(--shadow-8); }

/* ==========================================================================
   HOME
   ========================================================================== */
.hero { min-height: 88vh; display: flex; align-items: center; padding: calc(var(--nav-h) + 48px) 0 56px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(38px, 4.8vw, 60px); line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 20px; }
.hero h1 .line { display: block; }
.hero h1 .line > span { display: inline-block; opacity: 0; transform: translateY(10px); animation: enter 600ms var(--ease) forwards; animation-delay: calc(var(--i) * 80ms + 80ms); }
.hero h1 .grad-text { color: var(--brand-fg); }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.hero .lede { font-size: clamp(16px, 1.4vw, 18px); color: var(--fg-3); max-width: 560px; margin-bottom: 32px; opacity: 0; animation: enter 600ms var(--ease) 320ms forwards; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; opacity: 0; animation: enter 600ms var(--ease) 400ms forwards; }
.hero .pill { display: inline-flex; gap: 10px; align-items: center; height: 28px; padding: 0 12px 0 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--stroke); box-shadow: var(--shadow-2); font-size: 13px; color: var(--fg-3); margin-bottom: 24px; opacity: 0; animation: enter 600ms var(--ease) forwards; }
.hero .pill b { height: 20px; display: inline-flex; align-items: center; padding: 0 8px; border-radius: 999px; background: var(--brand-subtle); color: var(--brand-fg); font-weight: 600; font-size: 12px; }
.orbit-stage { position: relative; aspect-ratio: 1; width: min(100%, 560px); justify-self: center; opacity: 0; animation: fade 900ms var(--ease) 200ms forwards; }
@keyframes fade { to { opacity: 1; } }
#orbit { position: absolute; inset: -6%; width: 112%; height: 112%; }
.orbit-label { position: absolute; pointer-events: none; transform: translate(-50%, calc(-100% - 10px)); padding: 6px 10px; border-radius: var(--r-md); background: var(--acrylic-strong); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--stroke); box-shadow: var(--shadow-8); font-size: 13px; font-weight: 600; white-space: nowrap; opacity: 0; transition: opacity 120ms; z-index: 3; }
.orbit-label small { display: block; font-weight: 400; color: var(--fg-3); font-size: 12px; }
.orbit-label.on { opacity: 1; }
@media (max-width: 980px) { .hero { min-height: 0; } .hero .wrap { grid-template-columns: 1fr; } .orbit-stage { max-width: 460px; } }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--r-lg); box-shadow: var(--shadow-2); overflow: hidden; }
.stat { padding: 22px 20px; position: relative; }
.stat + .stat { border-left: 1px solid var(--stroke); }
.stat b { display: block; font: 600 clamp(26px, 2.6vw, 34px)/1.1 var(--display); margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.stat span { color: var(--fg-3); font-size: 13.5px; line-height: 1.35; display: block; }
@media (max-width: 1000px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .stat:nth-child(3n + 1) { border-left: 0; } .stat:nth-child(n + 4) { border-top: 1px solid var(--stroke); } }
@media (max-width: 560px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stat { border-left: 0 !important; } .stat:nth-child(even) { border-left: 1px solid var(--stroke) !important; } .stat:nth-child(n + 3) { border-top: 1px solid var(--stroke); } }

/* App grid */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 24px; }
.search { position: relative; margin-left: auto; }
.search input { width: 280px; max-width: 100%; height: 32px; padding: 0 12px 0 36px; border-radius: var(--r-sm); border: 1px solid var(--stroke-control); border-bottom: 1px solid var(--stroke-strong); background: var(--surface); color: var(--fg); font: 14px var(--font); outline: none; }
.search input::placeholder { color: var(--fg-4); }
.search input:focus { border-bottom: 2px solid var(--brand-fg); }
.search .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--fg-3); }
@media (max-width: 700px) { .search { margin-left: 0; width: 100%; } .search input { width: 100%; } }
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
@media (max-width: 400px) { .apps { grid-template-columns: 1fr; } }
.app-card { position: relative; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--stroke); box-shadow: var(--shadow-2); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow 250ms var(--ease), transform 250ms var(--ease), opacity 400ms var(--ease); }
.app-card:hover { box-shadow: var(--shadow-16); transform: translateY(-2px); }
.app-card:active { box-shadow: var(--shadow-4); transform: none; }
.app-card.hide { display: none; }
.app-card .shot { position: relative; aspect-ratio: 16 / 9.5; overflow: hidden; background: var(--surface-3); border-bottom: 1px solid var(--stroke); }
.app-card .shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform 400ms var(--ease); }
.app-card:hover .shot img { transform: scale(1.02); }
.app-card .body { padding: 0 20px 18px; margin-top: -26px; position: relative; z-index: 2; display: flex; flex-direction: column; flex: 1; }
.app-card .head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 10px; }
.app-card .head > div { padding-top: 30px; min-width: 0; }
.app-card .planet { --s: 52px; border-radius: 12px; box-shadow: 0 0 0 3px var(--surface), var(--shadow-4); }
.app-card h3 { font-size: 19px; margin: 0; }
.app-card .cat { font-size: 12.5px; color: var(--fg-3); }
.app-card p { color: var(--fg-2); font-size: 14.5px; margin: 0 0 16px; flex: 1; }
.app-card .meta { display: flex; gap: 14px; font-size: 13px; color: var(--fg-3); border-top: 1px solid var(--stroke); padding-top: 12px; align-items: center; font-variant-numeric: tabular-nums; }
.app-card .meta b { color: var(--fg); font-weight: 600; }
.app-card .meta .go { margin-left: auto; color: var(--brand-fg); display: inline-flex; transition: transform var(--dur) var(--ease); }
.app-card:hover .meta .go { transform: translateX(3px); }
.app-card > a.cover { position: absolute; inset: 0; z-index: 4; border-radius: inherit; }
.app-card .live { position: absolute; top: 10px; right: 10px; z-index: 5; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: var(--r-sm); background: var(--acrylic-strong); border: 1px solid var(--stroke); font: 600 11.5px var(--font); color: var(--success); box-shadow: var(--shadow-2); }
.live-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--success); }

/* Stack diagram */
.stack { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
@media (max-width: 960px) { .stack { grid-template-columns: 1fr; } }
.stack h2 { font-size: clamp(28px, 3.2vw, 40px); }
.stack-layers { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--r-lg); box-shadow: var(--shadow-4); overflow: hidden; }
.layer { position: relative; padding: 16px 20px; display: flex; align-items: center; gap: 16px; transition: background-color var(--dur); }
.layer + .layer { border-top: 1px solid var(--stroke); }
.layer:hover { background: var(--surface-2); }
.layer > .ico { color: var(--c); width: 40px; height: 40px; padding: 9px; border-radius: var(--r-lg); background: color-mix(in srgb, var(--c) 12%, transparent); }
.layer b { font: 600 16px var(--display); display: block; }
.layer span { color: var(--fg-3); font-size: 13.5px; }
.layer .tagline { margin-left: auto; font: 600 11.5px var(--font); color: var(--fg-3); padding: 2px 8px; border-radius: var(--r-sm); border: 1px solid var(--stroke); background: var(--surface-3); white-space: nowrap; }
.targets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.target { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 14px 8px; border-radius: var(--r-lg); border: 1px solid var(--stroke); background: var(--surface); box-shadow: var(--shadow-2); font-size: 13px; color: var(--fg-2); }
.target .ico { color: var(--brand-fg); }

/* Charts */
.chart-card { padding: 24px; }
.chart-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.hbar { display: grid; grid-template-columns: 150px 1fr 70px; gap: 14px; align-items: center; padding: 5px 6px; margin: 0 -6px; border-radius: var(--r-sm); font-size: 14px; transition: background-color var(--dur); }
.hbar:hover { background: var(--subtle); }
.hbar .name { display: flex; align-items: center; gap: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar .name i { width: 10px; height: 10px; border-radius: 2px; background: var(--a1); flex: none; }
.hbar .track { height: 8px; border-radius: 4px; background: var(--subtle); overflow: hidden; }
.hbar .fill { height: 100%; width: calc(var(--v) * 100%); border-radius: inherit; background: var(--a1); transform-origin: left; transform: scaleX(0); transition: transform 700ms var(--ease), width 500ms var(--ease); transition-delay: calc(var(--i) * 25ms); }
.in .hbar .fill { transform: scaleX(1); }
.hbar .val { text-align: right; color: var(--fg-3); font-size: 13px; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .hbar { grid-template-columns: 100px 1fr 56px; font-size: 12.5px; } }
.donut-wrap { display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: center; }
@media (max-width: 560px) { .donut-wrap { grid-template-columns: 1fr; justify-items: center; } }
.donut { width: 200px; height: 200px; }
.donut circle.seg { fill: none; stroke-width: 20; transition: stroke-dashoffset 1s var(--ease), stroke-width var(--dur); transform: rotate(-90deg); transform-origin: 50% 50%; }
.donut circle.seg:hover { stroke-width: 24; }
.donut .donut-num { fill: var(--fg); font: 600 40px var(--display); }
.donut .donut-cap { fill: var(--fg-3); font: 400 13px var(--font); }
.legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.legend li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--fg-2); }
.legend li i { width: 10px; height: 10px; border-radius: 2px; background: var(--c); }
.legend li b { margin-left: auto; color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; }
.layers-chart { display: flex; flex-direction: column; gap: 12px; }
.lc-row { display: grid; grid-template-columns: 110px 1fr 36px; gap: 12px; align-items: center; font-size: 14px; }
.lc-row .segs { display: flex; height: 20px; border-radius: var(--r-sm); overflow: hidden; gap: 2px; }
.lc-row .segs span { flex: var(--n) 0 0; background: var(--lc); transform: scaleY(0); transform-origin: bottom; transition: transform 500ms var(--ease), opacity var(--dur); transition-delay: calc(var(--i) * 20ms); }
.lc-row .segs span:nth-child(even) { opacity: 0.7; }
.lc-row .segs:hover span { opacity: 0.35; }
.lc-row .segs span:hover { opacity: 1; }
.in .lc-row .segs span { transform: none; }
.lc-row b { font-weight: 600; text-align: right; color: var(--fg-2); font-variant-numeric: tabular-nums; }
.matrix { overflow-x: auto; }
.matrix table { border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 760px; width: 100%; }
.matrix th, .matrix td { padding: 7px 6px; text-align: center; border-bottom: 1px solid var(--stroke); }
.matrix th:first-child, .matrix td:first-child { text-align: left; white-space: nowrap; position: sticky; left: 0; background: var(--surface); z-index: 1; font-family: var(--mono); font-size: 12.5px; color: var(--fg-2); }
.matrix thead th { font-weight: 400; color: var(--fg-3); height: 116px; vertical-align: bottom; }
.matrix thead th span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
.matrix .m { width: 12px; height: 12px; border-radius: 50%; margin: auto; background: var(--a1); transform: scale(0); transition: transform 400ms var(--ease); transition-delay: calc(var(--i) * 8ms); }
.in .matrix .m { transform: scale(1); }
.matrix tr:hover td { background: var(--surface-2); }

/* Pattern (architecture) */
.pattern { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 900px) { .pattern { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 480px) { .pattern { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pat { padding: 16px 12px; border-radius: var(--r-lg); border: 1px solid var(--stroke); background: var(--surface); box-shadow: var(--shadow-2); text-align: center; position: relative; }
.pat .ico { display: block; margin: 0 auto 10px; color: var(--c); width: 36px; height: 36px; padding: 8px; border-radius: var(--r-lg); background: color-mix(in srgb, var(--c) 12%, transparent); }
.pat b { display: block; font: 600 14.5px var(--display); }
.pat small { color: var(--fg-3); font-size: 12px; line-height: 1.35; display: block; margin-top: 2px; }
.pat .n { position: absolute; top: 8px; left: 10px; font: 600 11px var(--font); color: var(--fg-4); }

/* CTA */
.cta { text-align: center; padding: 64px 28px; border-radius: var(--r-xl); border: 1px solid var(--stroke); box-shadow: var(--shadow-4);
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand-fg) 6%, var(--surface)), var(--surface)); }
.cta h2 { font-size: clamp(28px, 3.6vw, 44px); }
.cta h2 .grad-text { color: var(--brand-fg); }
.cta p { color: var(--fg-3); max-width: 600px; margin: 0 auto 28px; font-size: 17px; }
.cta .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ==========================================================================
   PROJECT PAGE
   ========================================================================== */
.p-hero { padding: calc(var(--nav-h) + 40px) 0 32px; }
.crumbs { display: flex; gap: 8px; align-items: center; color: var(--fg-3); font-size: 14px; margin-bottom: 28px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--fg); text-decoration: underline; }
.p-hero .top { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: end; }
@media (max-width: 960px) { .p-hero .top { grid-template-columns: 1fr; } }
.p-hero .title { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.p-hero h1 { font-size: clamp(36px, 4.4vw, 52px); margin: 0; }
.p-hero .tagline { font-size: clamp(18px, 1.8vw, 22px); font-family: var(--display); font-weight: 400; line-height: 1.35; margin-bottom: 14px; color: var(--fg-2); }
.p-hero .summary { color: var(--fg-3); font-size: 16px; max-width: 680px; }
.p-hero .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.p-hero .facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fact { padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--stroke); box-shadow: var(--shadow-2); }
.fact b { display: block; font: 600 28px/1.1 var(--display); margin-bottom: 6px; color: var(--app-ink); font-variant-numeric: tabular-nums; }
.fact span { font-size: 13px; color: var(--fg-3); line-height: 1.35; display: block; }
/* Screenshot presented in a Windows 11-style window */
.frame { margin-top: 48px; border-radius: var(--r-lg); border: 1px solid var(--stroke-2); background: var(--surface-alt); overflow: hidden; box-shadow: var(--shadow-64); transform-origin: top center; transform: scale(var(--sc, 0.97)); transition: transform 120ms linear; }
.frame-bar { height: 36px; display: flex; align-items: center; gap: 10px; padding: 0 0 0 12px; border-bottom: 1px solid var(--stroke); }
.frame-bar .planet { --s: 16px; border-radius: 4px; box-shadow: none; }
.frame-bar .win-title { line-height: 1; font-size: 12.5px; color: var(--fg-2); }
.frame-bar .url { flex: 1; max-width: 460px; margin: 0 auto; height: 24px; line-height: 24px; padding: 0 12px; border-radius: 999px; background: var(--subtle); font-size: 12px; color: var(--fg-3); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frame-bar .caps { display: flex; height: 100%; }
.frame-bar .caps svg { width: 46px; height: 100%; padding: 13px 18px; fill: none; stroke: var(--fg-2); stroke-width: 1; }
.frame img { width: 100%; }
@media (max-width: 640px) { .frame-bar .win-title, .frame-bar .caps svg:nth-child(-n + 2) { display: none; } }

.subnav { position: sticky; top: var(--nav-h); z-index: 30; border-block: 1px solid var(--stroke); }
.subnav .wrap { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; align-items: center; height: 48px; }
.subnav .wrap::-webkit-scrollbar { display: none; }
.subnav a { height: 32px; display: inline-flex; align-items: center; padding: 0 12px; font-size: 14px; color: var(--fg-2); white-space: nowrap; position: relative; border-radius: var(--r-sm); transition: background-color var(--dur), color var(--dur); }
.subnav a::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -8px; height: 3px; border-radius: 3px; background: var(--app-ink); transform: scaleX(0); transition: transform 250ms var(--ease); }
.subnav a:hover { background: var(--subtle); color: var(--fg); }
.subnav a.on { color: var(--fg); font-weight: 600; }
.subnav a.on::after { transform: scaleX(1); }
.subnav .planet { --s: 22px; border-radius: 6px; margin-right: 8px; }
.subnav .spacer { margin-left: auto; }

/* Feature tour — NavigationView-style list */
.features { display: grid; grid-template-columns: 260px 1fr; gap: 28px; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr; } }
.f-tabs { display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 860px) { .f-tabs { flex-direction: row; overflow-x: auto; padding-bottom: 6px; } }
.f-tab { position: relative; text-align: left; height: 40px; padding: 0 12px 0 16px; border-radius: var(--r-sm); background: none; border: 0; color: var(--fg-2); font: 400 14.5px var(--font); cursor: pointer; display: flex; justify-content: space-between; gap: 10px; align-items: center; white-space: nowrap; transition: background-color var(--dur); }
.f-tab:hover { background: var(--subtle); color: var(--fg); }
.f-tab.on { background: var(--subtle-2); color: var(--fg); font-weight: 600; }
.f-tab.on::before { content: ''; position: absolute; left: 0; top: 50%; width: 3px; height: 16px; margin-top: -8px; border-radius: 3px; background: var(--app-ink); animation: indicator 250ms var(--ease); }
@keyframes indicator { from { transform: scaleY(0); } }
.f-tab .count { font: 600 11.5px var(--font); min-width: 22px; height: 20px; display: inline-grid; place-items: center; padding: 0 6px; border-radius: 999px; background: var(--subtle); color: var(--fg-3); }
.f-tab.on .count { background: color-mix(in srgb, var(--a1) 14%, transparent); color: var(--app-ink); }
.f-panel { display: none; }
.f-panel.on { display: block; animation: enter 300ms var(--ease); }
.f-panel h3 { font-size: 24px; margin-bottom: 16px; }
.f-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 640px) { .f-list { grid-template-columns: 1fr; } }
.f-list li { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--stroke); box-shadow: var(--shadow-2); font-size: 14.5px; color: var(--fg-2); animation: enter 350ms var(--ease) both; animation-delay: calc(var(--i) * 30ms); }
.f-list li .ico { color: var(--app-ink); margin-top: 1px; }

/* Playground */
.pg { border-radius: var(--r-xl); border: 1px solid var(--stroke-2); background: var(--surface); overflow: hidden; box-shadow: var(--shadow-28); }
.pg-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--stroke); flex-wrap: wrap; }
.pg-bar .url { flex: 1; min-width: 160px; height: 32px; line-height: 30px; padding: 0 12px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--stroke-control); border-bottom-color: var(--stroke-strong); font-size: 13px; color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-bar .grp { display: flex; gap: 2px; }
.pg-bar .grp .btn { background: transparent; border-color: transparent; box-shadow: none; color: var(--fg-2); }
.pg-bar .grp .btn:hover { background: var(--subtle); color: var(--fg); }
.pg-bar .grp .btn.is-on { background: var(--subtle-2); color: var(--fg); }
.pg-body { display: grid; grid-template-columns: 1fr 320px; min-height: 720px; }
@media (max-width: 1100px) { .pg-body { grid-template-columns: 1fr; } }
.pg-stage { position: relative; background: var(--surface-3); display: flex; justify-content: center; align-items: stretch; min-height: 720px; overflow: hidden; }
.pg-device { width: 100%; transition: width 400ms var(--ease), margin 400ms var(--ease), border-radius 400ms var(--ease); position: relative; background: var(--surface); overflow: hidden; }
.pg-device.tablet { width: 820px; max-width: calc(100% - 40px); margin: 20px 0; border-radius: var(--r-xl); border: 1px solid var(--stroke-2); box-shadow: var(--shadow-16); }
.pg-device.phone { width: 400px; max-width: calc(100% - 40px); margin: 20px 0; border-radius: 24px; border: 1px solid var(--stroke-2); box-shadow: var(--shadow-16); }
.pg-device iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.pg-cover { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; text-align: center; padding: 28px; isolation: isolate; background: color-mix(in srgb, var(--bg) 30%, transparent); }
.pg-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top left; z-index: -1; }
.pg-cover > div { max-width: min(520px, 100%); min-width: 0; padding: 28px 28px 24px; border-radius: var(--r-lg); border: 1px solid var(--stroke); box-shadow: var(--shadow-64); }
.pg-cover h3 { font-size: 22px; margin-bottom: 8px; }
.pg-cover p { color: var(--fg-2); font-size: 15px; margin: 0 auto 18px; }
.pg-cover .chip { white-space: normal; text-align: left; height: auto; min-height: 28px; padding: 4px 12px; font-size: 12.5px; color: var(--fg-3); background: var(--subtle); border-color: var(--stroke); }
.pg-cover .play { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; color: var(--on-brand); background: var(--brand); border: 0; cursor: pointer; box-shadow: var(--shadow-8); transition: background-color var(--dur), transform var(--dur) var(--ease); }
.pg-cover .play:hover { background: var(--brand-hover); transform: scale(1.04); }
.pg-cover .play:active { background: var(--brand-pressed); transform: scale(0.98); }
.pg-cover .play .ico { width: 22px; height: 22px; margin-left: 3px; }
.pg-loading { position: absolute; inset: 0; z-index: 1; display: none; place-items: center; background: var(--surface-3); color: var(--fg-3); font-size: 13px; text-align: center; }
.pg.loading .pg-loading { display: grid; }
.pg-loading .ring { width: 32px; height: 32px; margin: 0 auto 14px; border-radius: 50%; border: 3px solid var(--subtle-2); border-top-color: var(--brand-fg); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pg-side { border-left: 1px solid var(--stroke); padding: 20px; display: flex; flex-direction: column; gap: 20px; max-height: 720px; overflow: auto; background: var(--surface); }
@media (max-width: 1100px) { .pg-side { border-left: 0; border-top: 1px solid var(--stroke); max-height: none; } }
.pg-side h4, #hub-tour h4 { font: 600 14px var(--font); color: var(--fg); margin: 0 0 10px; display: flex; justify-content: space-between; align-items: center; }
.tour-count { font-weight: 400; color: var(--fg-3); font-size: 13px; }
.progress { height: 3px; border-radius: 2px; background: var(--subtle-2); overflow: hidden; margin-bottom: 12px; }
.progress i { display: block; height: 100%; width: 0; background: var(--brand-fg); border-radius: inherit; transition: width 400ms var(--ease); }
.tour { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.tour li { border-radius: var(--r-sm); transition: background-color var(--dur); }
.tour li:hover { background: var(--subtle); }
.tour label { display: grid; grid-template-columns: 20px 1fr; gap: 10px; padding: 10px 8px; cursor: pointer; }
.tour input { appearance: none; width: 18px; height: 18px; border-radius: var(--r-sm); border: 1px solid var(--fg-3); margin: 2px 0 0; display: grid; place-items: center; cursor: pointer; background: var(--surface); transition: background-color 100ms, border-color 100ms; }
.tour input:hover { border-color: var(--fg-2); }
.tour input:checked { background: var(--brand); border-color: var(--brand); }
.tour input:checked::after { content: ''; width: 9px; height: 5px; border: 1.6px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.tour b { font-size: 14px; font-weight: 600; display: block; }
.tour span { font-size: 13px; color: var(--fg-3); line-height: 1.45; display: block; margin-top: 2px; }
.tour li.done b { color: var(--fg-3); text-decoration: line-through; }
.keys { display: grid; }
.keys div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--fg-2); align-items: center; padding: 7px 0; border-bottom: 1px solid var(--stroke); }
.keys div:last-child { border-bottom: 0; }
.keys div span:last-child { text-align: right; flex: none; }
.keys kbd { font-size: 11px; }
.pg-note { font-size: 12.5px; color: var(--fg-3); display: flex; gap: 8px; margin: 12px 0 0; }
.pg-note .ico { margin-top: 2px; }
.pg:fullscreen { border-radius: 0; }
.pg:fullscreen .pg-body, .pg:fullscreen .pg-stage { min-height: calc(100vh - 50px); }

/* Packages */
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.pkg { padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.pkg:hover { box-shadow: var(--shadow-8); }
.pkg .row { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.pkg h3 { font: 600 14.5px var(--mono); margin: 0; word-break: break-word; }
.pkg h3 .ns { color: var(--fg-4); font-weight: 400; }
.pkg p { font-size: 14px; flex: 1; color: var(--fg-2); }
.pkg .tags { display: flex; gap: 4px; flex-wrap: wrap; }
.pkg .nums { display: flex; gap: 14px; font-size: 12.5px; color: var(--fg-3); border-top: 1px solid var(--stroke); padding-top: 10px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.pkg .nums b { color: var(--fg); font-weight: 600; }
.pkg .deps { font: 12px var(--mono); color: var(--fg-4); }
.pkg .deps span { color: var(--fg-2); }
.layer-pill { --lc-ink: color-mix(in srgb, var(--lc) calc(100% - var(--app-mix-pct)), var(--app-mix)); display: inline-flex; align-items: center; height: 20px; font: 600 11.5px var(--font); padding: 0 8px; border-radius: var(--r-sm); color: var(--lc-ink); background: color-mix(in srgb, var(--lc) 12%, transparent); white-space: nowrap; }
.pkg.hot { box-shadow: 0 0 0 2px var(--app-ink), var(--shadow-8); }

/* Dependency graph */
.graph-card { padding: 16px; overflow-x: auto; }
.graph { width: 100%; min-width: 720px; height: auto; display: block; }
.graph .edge { fill: none; stroke: var(--stroke-strong); stroke-width: 1.2; transition: stroke var(--dur), opacity var(--dur), stroke-width var(--dur); }
.graph .edge.flow { stroke: var(--brand-fg); stroke-dasharray: 4 6; animation: flow 1.4s linear infinite; opacity: 0.8; }
@keyframes flow { to { stroke-dashoffset: -20; } }
.graph .node rect:not(.bar) { fill: var(--surface); stroke: var(--stroke-2); stroke-width: 1; transition: fill var(--dur), stroke var(--dur); }
.graph .node rect.bar { stroke: none; opacity: 0.85; }
.graph .node text { fill: var(--fg); font: 600 12.5px var(--font); pointer-events: none; }
.graph .node text.sub { fill: var(--fg-3); font-weight: 400; font-size: 10.5px; }
.graph .node { cursor: pointer; transition: opacity var(--dur); }
.graph .node:hover rect:not(.bar), .graph .node.on rect:not(.bar) { stroke: var(--app-ink); stroke-width: 1.5; fill: var(--surface-2); }
.graph.focus .node:not(.on):not(.rel) { opacity: 0.3; }
.graph.focus .edge:not(.rel) { opacity: 0.12; }
.graph.focus .edge.rel { stroke: var(--app-ink); stroke-width: 2; opacity: 1; }
.graph .node.rel rect:not(.bar) { stroke: color-mix(in srgb, var(--app-ink) 60%, transparent); }
.graph .lvl-line { stroke: var(--stroke); stroke-dasharray: 2 6; }
.graph-hint { font-size: 13px; color: var(--fg-3); margin-top: 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Architecture stack */
.arch { display: flex; flex-direction: column-reverse; gap: 8px; }
.arch-layer { display: grid; grid-template-columns: 200px 1fr; gap: 20px; padding: 18px 20px; border-radius: var(--r-lg); border: 1px solid var(--stroke); background: var(--surface); box-shadow: var(--shadow-2); align-items: center; position: relative; overflow: hidden; }
.arch-layer::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--app-ink); opacity: calc(0.35 + var(--i) * 0.15); }
@media (max-width: 700px) { .arch-layer { grid-template-columns: 1fr; } }
.arch-layer b { font: 600 17px var(--display); display: flex; gap: 10px; align-items: center; }
.arch-layer b small { font: 600 11.5px var(--font); color: var(--app-ink); background: color-mix(in srgb, var(--a1) 12%, transparent); padding: 1px 6px; border-radius: var(--r-sm); }
.arch-layer p { margin: 0 0 10px; color: var(--fg-3); font-size: 14.5px; }
.arch-layer .pk { display: flex; gap: 4px; flex-wrap: wrap; }
.arch-layer .pk code { font-size: 12px; padding: 2px 8px; border-radius: var(--r-sm); background: var(--surface-3); border: 1px solid var(--stroke); color: var(--fg-2); }

/* Code */
.code { border-radius: var(--r-lg); border: 1px solid var(--stroke); background: var(--code-bg); box-shadow: var(--shadow-2); overflow: hidden; }
.code-head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-bottom: 1px solid var(--stroke); background: var(--surface); font-size: 13px; color: var(--fg-2); }
.code-head .badge { text-transform: uppercase; }
.code-head .btn { margin-left: auto; height: 28px; font-size: 13px; }
.code pre { margin: 0; padding: 18px 20px; overflow-x: auto; font-size: 13.5px; line-height: 1.65; color: var(--fg); tab-size: 4; }
/* VS Code Light+ */
.t-kw { color: #0000ff; } .t-type { color: #267f99; } .t-fn { color: #795e26; } .t-str { color: #a31515; } .t-num { color: #098658; } .t-com { color: #008000; } .t-var, .t-flag { color: #001080; } .t-key { color: #0451a5; } .t-tag { color: #800000; }
/* VS Code Dark+ */
:root[data-theme="dark"] .t-kw { color: #569cd6; } :root[data-theme="dark"] .t-type { color: #4ec9b0; } :root[data-theme="dark"] .t-fn { color: #dcdcaa; } :root[data-theme="dark"] .t-str { color: #ce9178; } :root[data-theme="dark"] .t-num { color: #b5cea8; } :root[data-theme="dark"] .t-com { color: #6a9955; } :root[data-theme="dark"] .t-var, :root[data-theme="dark"] .t-flag, :root[data-theme="dark"] .t-key { color: #9cdcfe; } :root[data-theme="dark"] .t-tag { color: #569cd6; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .t-kw { color: #569cd6; } :root:not([data-theme="light"]) .t-type { color: #4ec9b0; } :root:not([data-theme="light"]) .t-fn { color: #dcdcaa; } :root:not([data-theme="light"]) .t-str { color: #ce9178; } :root:not([data-theme="light"]) .t-num { color: #b5cea8; } :root:not([data-theme="light"]) .t-com { color: #6a9955; } :root:not([data-theme="light"]) .t-var, :root:not([data-theme="light"]) .t-flag, :root:not([data-theme="light"]) .t-key { color: #9cdcfe; } :root:not([data-theme="light"]) .t-tag { color: #569cd6; }
}
.code-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.code-pane { display: none; } .code-pane.on { display: block; animation: enter 250ms var(--ease); }

/* Formats / boundaries / docs / toolchain */
.formats { display: flex; gap: 8px; flex-wrap: wrap; }
.format { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: var(--r-lg); border: 1px solid var(--stroke); background: var(--surface); box-shadow: var(--shadow-2); min-width: 140px; }
.format b { font: 600 14.5px var(--mono); }
.format span { font-size: 12.5px; color: var(--fg-3); text-transform: capitalize; }
.list-clean { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.list-clean li { display: flex; gap: 12px; font-size: 14.5px; color: var(--fg-2); padding: 12px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--stroke); box-shadow: var(--shadow-2); }
.list-clean li .ico { color: var(--fg-3); margin-top: 3px; }
.docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.doc { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-lg); border: 1px solid var(--stroke); background: var(--surface); box-shadow: var(--shadow-2); }
.doc:hover { box-shadow: var(--shadow-8); }
.doc .ico { color: var(--app-ink); margin-top: 2px; }
.doc b { display: block; font-size: 14.5px; font-weight: 600; }
.doc span { font-size: 13px; color: var(--fg-3); line-height: 1.4; display: block; }
.tc { display: grid; border-radius: var(--r-lg); border: 1px solid var(--stroke); background: var(--surface); box-shadow: var(--shadow-2); overflow: hidden; }
.tc div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; font-size: 14px; }
.tc div + div { border-top: 1px solid var(--stroke); }
.tc div span:first-child { color: var(--fg-2); }
.tc div span:last-child { font-family: var(--mono); font-size: 13px; color: var(--fg); text-align: right; }
.pipeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.stage { position: relative; padding: 14px 16px; border-radius: var(--r-lg); border: 1px solid var(--stroke); background: var(--surface); box-shadow: var(--shadow-2); transition: box-shadow var(--dur) var(--ease); }
a.stage:hover { box-shadow: var(--shadow-8); }
.stage b { display: flex; gap: 8px; align-items: center; font-size: 14.5px; }
.stage b .ico { color: var(--fg-3); }
.stage code { font-size: 12px; color: var(--fg-3); }
.stage img { margin-top: 10px; height: 20px; width: auto; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pager a { padding: 20px 22px; border-radius: var(--r-lg); border: 1px solid var(--stroke); background: var(--surface); box-shadow: var(--shadow-2); display: flex; align-items: center; gap: 14px; transition: box-shadow var(--dur) var(--ease); }
.pager a:hover { box-shadow: var(--shadow-8); }
.pager a > .ico { color: var(--fg-3); }
.pager a.next { justify-content: flex-end; text-align: right; }
.pager small { display: block; color: var(--fg-3); font-size: 12.5px; }
.pager b { font: 600 19px var(--display); }
@media (max-width: 640px) { .pager { grid-template-columns: 1fr; } }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
h3.sub { font: 600 16px var(--display); color: var(--fg); margin: 0 0 12px; }

/* ==========================================================================
   PLAYGROUND HUB / PACKAGES / COMPARE
   ========================================================================== */
.page-hero { padding: calc(var(--nav-h) + 56px) 0 36px; }
.page-hero h1 { font-size: clamp(34px, 4.4vw, 52px); letter-spacing: -0.015em; }
.page-hero h1 .grad-text { color: var(--brand-fg); }
.page-hero p { font-size: 17px; color: var(--fg-3); max-width: 720px; }
.hub { display: grid; grid-template-columns: 240px 1fr; gap: 16px; }
@media (max-width: 1000px) { .hub { grid-template-columns: 1fr; } }
.hub-list { display: flex; flex-direction: column; gap: 2px; max-height: 860px; overflow: auto; padding: 4px; }
@media (max-width: 1000px) { .hub-list { flex-direction: row; overflow-x: auto; max-height: none; padding-bottom: 6px; } }
.hub-list button { position: relative; display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 10px 0 14px; border-radius: var(--r-sm); border: 0; background: none; color: var(--fg-2); font: 400 14.5px var(--font); cursor: pointer; text-align: left; transition: background-color var(--dur); white-space: nowrap; }
.hub-list button .planet { --s: 28px; border-radius: 7px; }
.hub-list button:hover { background: var(--subtle); color: var(--fg); }
.hub-list button.on { background: var(--subtle-2); color: var(--fg); font-weight: 600; }
.hub-list button.on::before { content: ''; position: absolute; left: 3px; top: 50%; width: 3px; height: 16px; margin-top: -8px; border-radius: 3px; background: var(--brand-fg); }
.hub .pg-body { grid-template-columns: 1fr; }
.hub .pg-stage { min-height: 760px; }

.ptable { width: 100%; border-collapse: collapse; font-size: 14px; }
.ptable-wrap { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--stroke); background: var(--surface); box-shadow: var(--shadow-2); }
.ptable th { text-align: left; font: 600 13px var(--font); color: var(--fg-2); padding: 12px 16px; border-bottom: 1px solid var(--stroke-2); cursor: pointer; white-space: nowrap; user-select: none; position: sticky; top: 0; background: var(--surface); }
.ptable th:hover { background: var(--surface-2); color: var(--fg); }
.ptable th.sorted { color: var(--fg); }
.ptable th.sorted::after { content: ' ↓'; color: var(--brand-fg); }
.ptable th.sorted.asc::after { content: ' ↑'; }
.ptable td { padding: 10px 16px; border-bottom: 1px solid var(--stroke); white-space: nowrap; }
.ptable tbody tr:last-child td { border-bottom: 0; }
.ptable tbody tr { transition: background-color var(--dur); }
.ptable tbody tr:hover { background: var(--surface-2); }
.ptable .app { display: flex; gap: 12px; align-items: center; font-weight: 600; }
.ptable .app:hover { color: var(--brand-fg); }
.ptable .app .planet { --s: 26px; border-radius: 7px; }
.cell-bar { display: flex; align-items: center; gap: 10px; font-size: 13px; font-variant-numeric: tabular-nums; }
.cell-bar i { display: block; height: 6px; border-radius: 3px; width: calc(var(--v) * 100px); min-width: 2px; background: var(--a1); opacity: 0.85; }
.bubble-chart { width: 100%; height: auto; }
.bubble-chart .bub { transition: transform var(--dur) var(--ease); transform-box: fill-box; transform-origin: center; cursor: pointer; }
.bubble-chart .bub circle { stroke: var(--surface); stroke-width: 2; }
.bubble-chart .bub:hover { transform: scale(1.1); }
.bubble-chart text { fill: var(--fg); font: 600 12.5px var(--font); pointer-events: none; }
.bubble-chart .axis { stroke: var(--stroke-2); }
.bubble-chart .tick { fill: var(--fg-3); font: 400 12px var(--font); }

/* Footer */
.footer { padding: 56px 0 40px; border-top: 1px solid var(--stroke); margin-top: 48px; color: var(--fg-3); font-size: 14px; background: var(--surface-3); }
.footer .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 36px; margin-bottom: 40px; }
@media (max-width: 800px) { .footer .cols { grid-template-columns: 1fr 1fr; } }
.footer h4 { font: 600 14px var(--font); color: var(--fg); margin-bottom: 12px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer a:hover { color: var(--fg); text-decoration: underline; }
.footer .brand { color: var(--fg); }
.footer .brand:hover { text-decoration: none; }
.footer .base { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-top: 1px solid var(--stroke); padding-top: 20px; font-size: 13px; color: var(--fg-4); }

/* Back to top */
.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--stroke); background: var(--acrylic-strong); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: var(--shadow-8); color: var(--fg); display: grid; place-items: center; cursor: pointer; opacity: 0; transform: translateY(12px); transition: opacity var(--dur) var(--ease), transform 300ms var(--ease), background-color var(--dur); }
.to-top:hover { background: var(--surface-2); }
.to-top.on { opacity: 1; transform: none; }
.to-top svg.ring { position: absolute; inset: -1px; transform: rotate(-90deg); }
.to-top svg.ring circle { fill: none; stroke: var(--brand-fg); stroke-width: 2; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); padding: 10px 16px; border-radius: var(--r-lg); border: 1px solid var(--stroke); box-shadow: var(--shadow-16); font-size: 14px; opacity: 0; transition: opacity var(--dur) var(--ease), transform 300ms var(--ease); z-index: 60; pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* Phones: let grid children shrink */
.hero .wrap > *, .p-hero .top > *, .hub > *, .stack > *, .features > *, .split > *, .donut-wrap > * { min-width: 0; }
@media (max-width: 560px) {
  .fact { padding: 14px; }
  .fact b { font-size: 24px; }
  .p-hero .title { gap: 14px; }
  .planet.xl { --s: 64px; border-radius: 16px; }
  .pg-cover { padding: 12px; }
  .pg-cover > div { padding: 20px 16px; }
  .pg-stage, .pg-body { min-height: 560px; }
  .targets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  [data-reveal], .hero h1 .line > span, .hero .lede, .hero .actions, .hero .pill, .orbit-stage { opacity: 1; transform: none; }
}

/* ==========================================================================
   FLUENT MATERIALS LAYER
   Wallpaper (GPU bloom) → Mica/Acrylic surfaces → Reveal light → depth & motion
   ========================================================================== */
:root {
  --bloom-base: #edf1fa;
  --bloom-1: #4f9ff0;
  --bloom-2: #8c7cf0;
  --bloom-3: #f28ad0;
  --bloom-4: #50d0c8;
  --bloom-intensity: 0.62;
  --bg: #edf1fa;
  --glass: rgba(255, 255, 255, 0.64);
  --glass-hover: rgba(255, 255, 255, 0.8);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --glass-sheen: rgba(255, 255, 255, 0.55);
  --glass-stroke: rgba(255, 255, 255, 0.75);
  --glass-edge: 0 0 0 1px rgba(0, 0, 0, 0.055);
  --reveal-fill: rgba(255, 255, 255, 0.55);
  --reveal-border: rgba(255, 255, 255, 1);
  --mica: rgba(243, 245, 250, 0.86);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --hero-grad: linear-gradient(95deg, #0f6cbd 0%, #6b4fd9 45%, #c2379f 100%);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bloom-base: #0a0c16; --bloom-1: #1466c8; --bloom-2: #5a3fd0; --bloom-3: #b0348c; --bloom-4: #0a8f8a; --bloom-intensity: 0.85;
    --bg: #0a0c16;
    --glass: rgba(30, 32, 44, 0.56); --glass-hover: rgba(40, 42, 56, 0.68); --glass-strong: rgba(34, 36, 48, 0.86);
    --glass-sheen: rgba(255, 255, 255, 0.06); --glass-stroke: rgba(255, 255, 255, 0.1); --glass-edge: 0 0 0 1px rgba(0, 0, 0, 0.25);
    --reveal-fill: rgba(255, 255, 255, 0.07); --reveal-border: rgba(255, 255, 255, 0.55); --mica: rgba(16, 18, 28, 0.82);
    --hero-grad: linear-gradient(95deg, #5caeff 0%, #a78bfa 45%, #f472c6 100%);
    --acrylic: rgba(26, 28, 40, 0.7); --acrylic-strong: rgba(30, 32, 44, 0.88);
  }
}
:root[data-theme="dark"] {
  --bloom-base: #0a0c16; --bloom-1: #1466c8; --bloom-2: #5a3fd0; --bloom-3: #b0348c; --bloom-4: #0a8f8a; --bloom-intensity: 0.85;
  --bg: #0a0c16;
  --glass: rgba(30, 32, 44, 0.56); --glass-hover: rgba(40, 42, 56, 0.68); --glass-strong: rgba(34, 36, 48, 0.86);
  --glass-sheen: rgba(255, 255, 255, 0.06); --glass-stroke: rgba(255, 255, 255, 0.1); --glass-edge: 0 0 0 1px rgba(0, 0, 0, 0.25);
  --reveal-fill: rgba(255, 255, 255, 0.07); --reveal-border: rgba(255, 255, 255, 0.55); --mica: rgba(16, 18, 28, 0.82);
  --hero-grad: linear-gradient(95deg, #5caeff 0%, #a78bfa 45%, #f472c6 100%);
  --acrylic: rgba(26, 28, 40, 0.7); --acrylic-strong: rgba(30, 32, 44, 0.88);
}
/* App pages tint the wallpaper with the app's own colours. */
body[style*="--a1"] { --bloom-1: var(--a1); --bloom-2: var(--a2); }

/* Wallpaper: CSS gradient fallback, replaced by the GPU canvas once its first frame lands. */
.wallpaper { position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(60vmax 45vmax at 78% 18%, color-mix(in srgb, var(--bloom-2) 55%, transparent), transparent 70%),
    radial-gradient(55vmax 40vmax at 12% 4%, color-mix(in srgb, var(--bloom-1) 50%, transparent), transparent 70%),
    radial-gradient(50vmax 40vmax at 90% 80%, color-mix(in srgb, var(--bloom-3) 35%, transparent), transparent 70%),
    radial-gradient(50vmax 40vmax at 5% 85%, color-mix(in srgb, var(--bloom-4) 35%, transparent), transparent 70%),
    var(--bloom-base); }
#wallpaper { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; pointer-events: none; opacity: 0; transition: opacity 600ms var(--ease); }
#wallpaper.on { opacity: 1; }
body { background: var(--bloom-base); }

/* Acrylic cards: tint + luminosity sheen + grain + glass edge. The wallpaper is already soft,
   so no backdrop blur is needed here — keeps scrolling at full frame rate. */
.card, .app-card, .stats, .stack-layers, .target, .pat, .fact, .f-list li, .format, .list-clean li, .doc, .tc, .stage, .pager a, .arch-layer, .ptable-wrap, .hero .pill, .chip, .search input, .btn:not(.btn-primary):not(.btn-subtle), .f-tab.on, .hub-list button.on {
  background:
    radial-gradient(420px circle at var(--mx, -999px) var(--my, -999px), var(--reveal-fill), transparent 65%),
    linear-gradient(180deg, var(--glass-sheen), transparent 42%),
    var(--grain),
    var(--glass);
  border-color: var(--glass-stroke);
}
.card, .app-card, .stats, .stack-layers, .target, .pat, .fact, .f-list li, .format, .list-clean li, .doc, .tc, .stage, .pager a, .arch-layer, .ptable-wrap {
  box-shadow: var(--glass-edge), var(--shadow-4);
}
.card:hover, .app-card:hover, .doc:hover, .stage:hover, .pager a:hover, .pkg:hover, .fact:hover {
  background:
    radial-gradient(420px circle at var(--mx, -999px) var(--my, -999px), var(--reveal-fill), transparent 65%),
    linear-gradient(180deg, var(--glass-sheen), transparent 42%),
    var(--grain),
    var(--glass-hover);
}
.app-card:hover { box-shadow: var(--glass-edge), var(--shadow-28); transform: translateY(-3px); }
a.card:hover, .hl .card:hover, .doc:hover, .pkg:hover, a.stage:hover, .pager a:hover { box-shadow: var(--glass-edge), var(--shadow-16); }
button.chip.is-on { background: var(--brand-subtle); }
.btn:not(.btn-primary):not(.btn-subtle):hover { background: var(--glass-hover); }

/* Reveal highlight: a pointer-following light on the border (Fluent). */
.card, .app-card, .fact, .f-list li, .pat, .target, .format, .doc, .stage, .pager a, .list-clean li, .arch-layer, .btn, .chip { position: relative; }
.card::after, .app-card::after, .fact::after, .f-list li::after, .pat::after, .target::after, .format::after, .doc::after, .stage::after, .pager a::after, .list-clean li::after, .arch-layer::after, .btn::after, button.chip::after {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 6;
  background: radial-gradient(160px circle at var(--mx, -999px) var(--my, -999px), var(--reveal-border), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  opacity: 0; transition: opacity 250ms var(--ease);
}
.card:hover::after, .app-card:hover::after, .fact:hover::after, .f-list li:hover::after, .pat:hover::after, .target:hover::after, .format:hover::after, .doc:hover::after, .stage:hover::after, .pager a:hover::after, .list-clean li:hover::after, .arch-layer:hover::after, .btn:hover::after, button.chip:hover::after { opacity: 1; }
.btn-primary::after { --reveal-border: rgba(255, 255, 255, 0.8); }

/* Mica for large, long-lived chrome */
.footer { background: var(--grain), var(--mica); border-top-color: var(--glass-stroke); }
.pg { background: var(--glass-strong); border-color: var(--glass-stroke); }
.pg-side { background: transparent; }
.code { background: var(--code-bg); }
.matrix th:first-child, .matrix td:first-child, .ptable th { background: var(--glass-strong); }

/* Glossy, 3D-leaning app icons (Fluent colour iconography). */
.planet {
  background:
    radial-gradient(120% 80% at 28% 6%, rgba(255, 255, 255, 0.5), transparent 52%),
    linear-gradient(150deg, var(--a2) 0%, var(--a1) 62%, color-mix(in srgb, var(--a1) 78%, #000) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -3px 6px rgba(0, 0, 0, 0.16), 0 6px 16px -6px color-mix(in srgb, var(--a1) 70%, transparent), 0 1px 2px rgba(0, 0, 0, 0.2);
}
.planet .ico { filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25)); }
.planet.xl { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -4px 10px rgba(0, 0, 0, 0.18), 0 18px 40px -12px color-mix(in srgb, var(--a1) 75%, transparent), 0 2px 4px rgba(0, 0, 0, 0.2); }
.app-card .planet { box-shadow: 0 0 0 3px var(--glass-strong), inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 10px 20px -8px color-mix(in srgb, var(--a1) 70%, transparent); }
.ico-orb { color: #fff; background: radial-gradient(120% 80% at 28% 6%, rgba(255, 255, 255, 0.45), transparent 52%), linear-gradient(150deg, var(--a2), var(--a1) 70%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 8px 18px -8px color-mix(in srgb, var(--a1) 70%, transparent); }
.layer > .ico, .pat .ico { color: #fff; background: linear-gradient(150deg, color-mix(in srgb, var(--c) 60%, #fff), var(--c) 70%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 6px 14px -6px var(--c); }

/* Hero: gradient headline, floating acrylic cards with depth. */
.hero { min-height: 100vh; min-height: 100svh; }
.hero h1 .grad-text { background: var(--hero-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cta h2 .grad-text, .page-hero h1 .grad-text { background: var(--hero-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.float-card { position: absolute; z-index: 2; display: flex; gap: 10px; align-items: center; padding: 10px 14px 10px 10px; border-radius: var(--r-xl);
  background: linear-gradient(180deg, var(--glass-sheen), transparent 50%), var(--acrylic);
  -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--glass-stroke); box-shadow: var(--glass-edge), var(--shadow-16); font-size: 13px; pointer-events: none;
  translate: var(--px, 0) var(--py, 0); animation: floaty 7s ease-in-out infinite; transition: translate 600ms var(--ease); }
.float-card b { display: block; font-size: 14px; }
.float-card small { display: block; color: var(--fg-3); font-size: 12px; }
.fc-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: radial-gradient(120% 80% at 28% 6%, rgba(255, 255, 255, 0.45), transparent 52%), linear-gradient(150deg, var(--a2), var(--a1) 70%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.fc1 { left: -6%; top: 8%; }
.fc2 { right: -4%; top: 48%; animation-delay: -2.5s; }
.fc3 { left: 6%; bottom: 4%; animation-delay: -4.5s; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (max-width: 980px) { .fc1 { left: 0; } .fc2 { right: 0; } }
@media (max-width: 520px) { .float-card { display: none; } }

/* Scroll-driven motion (off the main thread where supported). */
@supports (animation-timeline: scroll()) {
  .hero .wrap > div:first-child { animation: heroDrift linear both; animation-timeline: scroll(root); animation-range: 0 100vh; }
  @keyframes heroDrift { to { transform: translateY(-80px); opacity: 0.2; } }
  .frame { animation: frameIn linear both; animation-timeline: view(); animation-range: entry 0% cover 35%; }
  @keyframes frameIn { from { transform: perspective(1400px) rotateX(10deg) scale(0.93); } to { transform: none; } }
}

/* Cross-document View Transitions: the app icon and screenshot morph between pages. */
@view-transition { navigation: auto; }
::view-transition-group(*) { animation-duration: 380ms; animation-timing-function: cubic-bezier(0.1, 0.9, 0.2, 1); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 220ms; }
.nav { view-transition-name: site-nav; }

/* Long lists render lazily. */
.pkg-section { content-visibility: auto; contain-intrinsic-size: auto 640px; }

@media (prefers-reduced-motion: reduce) {
  .float-card { animation: none; }
  .hero .wrap > div:first-child, .frame { animation: none !important; }
  @view-transition { navigation: none; }
}
/* Re-resolve the app ink wherever an element carries its own accent. */
[style*="--a1"] { --app-ink: color-mix(in srgb, var(--a1) calc(100% - var(--app-mix-pct)), var(--app-mix)); }
.p-hero .summary, .hero .lede { color: var(--fg-2); }
/* App pages speak in the app's colour. */
body[style*="--a1"] .btn-primary, body[style*="--a1"] .pg-cover .play, body[style*="--a1"] .tour input:checked { background: color-mix(in srgb, var(--a1) 84%, #000); border-color: transparent; }
body[style*="--a1"] .btn-primary:hover, body[style*="--a1"] .pg-cover .play:hover { background: color-mix(in srgb, var(--a1) 72%, #000); }
body[style*="--a1"] .progress i, body[style*="--a1"] .eyebrow { background-color: transparent; }
body[style*="--a1"] .progress i { background: var(--app-ink); }
body[style*="--a1"] .eyebrow { color: var(--app-ink); }
.accent-text { background: linear-gradient(95deg, var(--app-ink), color-mix(in srgb, var(--app-ink) 55%, #6b4fd9)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .pill b { white-space: nowrap; flex: none; }
@media (max-width: 520px) { .hero .pill { height: auto; min-height: 28px; padding: 4px 12px 4px 4px; line-height: 1.3; } }

/* ==========================================================================
   NUGET — install card, package browser (summary, key types, usage) and badges
   ========================================================================== */
.ng-hero, .ng-panel, .ng-notes, .ng-strip, .ng-item.on {
  background:
    radial-gradient(420px circle at var(--mx, -999px) var(--my, -999px), var(--reveal-fill), transparent 65%),
    linear-gradient(180deg, var(--glass-sheen), transparent 42%),
    var(--grain),
    var(--glass);
  border: 1px solid var(--glass-stroke);
  box-shadow: var(--glass-edge), var(--shadow-4);
}
.ng-ico { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #004880, #0f6cbd 55%, #62abf5); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 4px 12px rgba(15, 108, 189, 0.28); }
[style*="--a1"] .ng-ico { background: linear-gradient(135deg, color-mix(in srgb, var(--a1) 70%, #000), var(--a1) 55%, var(--a2)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 4px 12px color-mix(in srgb, var(--a1) 30%, transparent); }

.ng-hero { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); gap: 24px; border-radius: var(--r-xl); padding: 24px; }
@media (max-width: 960px) { .ng-hero { grid-template-columns: 1fr; } }
.ng-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-content: start; }
.ng-facts > div { padding: 16px 18px; border-radius: var(--r-lg); background: var(--subtle); border: 1px solid var(--stroke); min-width: 0; }
.ng-facts b { display: block; font: 600 clamp(22px, 2.2vw, 28px)/1.15 var(--display); margin-bottom: 4px; overflow-wrap: anywhere; }
.ng-facts b.mono { font: 600 clamp(16px, 1.6vw, 20px)/1.4 var(--mono); color: var(--app-ink); }
.ng-facts span { font-size: 13px; color: var(--fg-3); }
.ng-cmds { min-width: 0; }
.ng-cmds .code-tabs { margin-bottom: 10px; }
.ng-cmds pre { max-height: 260px; }
.ng-foot { margin: 12px 2px 0; font-size: 13px; color: var(--fg-3); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ng-foot a { color: var(--app-ink); font-weight: 600; }

.ng-notes { margin-top: 16px; border-radius: var(--r-lg); padding: 16px 20px; font-size: 14.5px; color: var(--fg-2); display: grid; gap: 10px; }
.ng-notes p { margin: 0; }
.ng-notes a, .ng-panel p a, .ng-keys a, .ng-ul a { color: var(--app-ink); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.ng-chain { margin: 0; padding: 12px 16px; border-radius: var(--r-md); background: var(--code-bg); border: 1px solid var(--stroke); font: 13px/1.7 var(--mono); overflow-x: auto; color: var(--fg); }

.ng-browser { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; margin-top: 22px; align-items: start; }
.ng-list { position: sticky; top: calc(var(--nav-h) + 64px); display: flex; flex-direction: column; gap: 2px; }
.ng-item { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 8px 12px; border-radius: var(--r-md); border: 1px solid transparent; background: none; color: var(--fg-2); font: inherit; cursor: pointer; transition: background-color var(--dur); }
.ng-item:hover { background: var(--subtle); color: var(--fg); }
.ng-item i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--lc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lc) 18%, transparent); }
.ng-item span { display: grid; min-width: 0; }
.ng-item b { font: 500 14px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ng-item small { font-size: 12px; color: var(--fg-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ng-item.on { color: var(--fg); }
.ng-item.on b { font-weight: 600; }
.ng-item.on::before { content: ''; position: absolute; left: -1px; top: 50%; width: 3px; height: 18px; margin-top: -9px; border-radius: 3px; background: var(--app-ink); animation: indicator 250ms var(--ease); }
@media (max-width: 900px) {
  .ng-browser { grid-template-columns: 1fr; }
  .ng-list { position: static; flex-direction: row; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
  .ng-item { width: auto; flex: none; }
  .ng-item.on::before { left: 12px; right: 12px; top: auto; bottom: -1px; width: auto; height: 3px; margin: 0; }
}

.ng-panel { display: none; border-radius: var(--r-xl); padding: 24px; min-width: 0; scroll-margin-top: 24px; }
.ng-panel.on { display: block; animation: enter 300ms var(--ease); }
.ng-top { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.ng-top > div:nth-child(2) { flex: 1; min-width: 220px; }
.ng-top h3 { margin: 2px 0 8px; font: 600 clamp(18px, 2vw, 22px)/1.25 var(--mono); overflow-wrap: anywhere; }
.ng-top h3 .ns { color: var(--fg-4); font-weight: 400; }
.ng-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.ng-links { display: flex; gap: 6px; flex-wrap: wrap; }
.badge.warn { color: #8a3707; background: #fdf1e7; border-color: #f4c9a4; }
:root[data-theme="dark"] .badge.warn { color: #f5b88a; background: rgba(202, 80, 16, 0.18); border-color: rgba(245, 184, 138, 0.3); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge.warn { color: #f5b88a; background: rgba(202, 80, 16, 0.18); border-color: rgba(245, 184, 138, 0.3); } }
.ng-sum { margin: 16px 0 0; font-size: 15px; line-height: 1.6; color: var(--fg-2); }
.ng-install { margin-top: 16px; }
.ng-install pre, .ng-cmds [data-pane="cli"] pre { padding: 12px 18px; }
.ng-rel { display: flex; gap: 8px 22px; flex-wrap: wrap; margin-top: 14px; font-size: 13px; }
.ng-rel span { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ng-rel small { color: var(--fg-4); font-size: 12px; margin-right: 2px; }
.ng-rel a { font: 500 12.5px var(--mono); padding: 2px 8px; border-radius: var(--r-sm); background: var(--subtle); border: 1px solid var(--stroke); color: var(--fg); }
.ng-rel a:hover { background: var(--subtle-2); color: var(--app-ink); }
.ng-rel em { color: var(--fg-3); }
.ng-panel h4 { margin: 24px 0 10px; font: 600 15px var(--font); color: var(--fg); }
.ng-panel h4 small { font-weight: 400; color: var(--fg-3); margin-left: 6px; }
.ng-keys { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 700px) { .ng-keys { grid-template-columns: 1fr; } }
.ng-keys li { padding: 10px 14px; border-radius: var(--r-md); background: var(--subtle); border: 1px solid var(--stroke); font-size: 13.5px; line-height: 1.5; color: var(--fg-2); overflow-wrap: anywhere; }
.ng-keys li > code:first-child { color: var(--app-ink); font-weight: 600; }
.ng-content { display: grid; gap: 12px; }
.ng-content p, .ng-content .ng-ul { margin: 0; font-size: 14.5px; color: var(--fg-2); }
.ng-content h4 { margin: 8px 0 0; }
.ng-ul { padding-left: 20px; display: grid; gap: 4px; }
.ng-panel code, .ng-notes code, .ng-hero p code { font-size: 0.92em; }
.ng-content pre { max-height: 520px; }

/* Package cards: NuGet version badge and usage affordance. */
.nuget-badge { gap: 4px; color: var(--app-ink); background: color-mix(in srgb, var(--a1) 10%, transparent); border-color: color-mix(in srgb, var(--a1) 25%, transparent); font-family: var(--mono); font-weight: 500; }
.pkg .nums .go { margin-left: auto; display: inline-flex; gap: 4px; align-items: center; color: var(--app-ink); font-weight: 600; }
.pkg:hover .nums .go svg { transform: translateX(2px); }
.pkg .nums .go svg { transition: transform var(--dur) var(--ease); }

/* Package explorer: NuGet strip. */
.ng-strip { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 20px; border-radius: var(--r-xl); margin-bottom: 26px; }
.ng-strip > div { display: grid; flex: 1; min-width: 220px; }
.ng-strip b { font: 600 17px var(--display); }
.ng-strip > div span { font-size: 13px; color: var(--fg-3); }
.ng-strip-cmd { font: 13px var(--mono); padding: 8px 12px; border-radius: var(--r-md); background: var(--code-bg); border: 1px solid var(--stroke); white-space: nowrap; }
@media (max-width: 560px) { .ng-strip-cmd { white-space: normal; overflow-wrap: anywhere; } }

/* The nav call-to-action is a primary button, not a nav link. */
.nav-links > a.nav-cta, .nav-links > a.nav-cta:hover { color: var(--on-brand); }
.nav-links > a.nav-cta { background: var(--brand); }
.nav-links > a.nav-cta:hover { background: var(--brand-hover); }
body[style*="--a1"] .nav-links > a.nav-cta { background: color-mix(in srgb, var(--a1) 84%, #000); }
body[style*="--a1"] .nav-links > a.nav-cta:hover { background: color-mix(in srgb, var(--a1) 72%, #000); }
.ng-panels, .ng-list { min-width: 0; }
