@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,600;12..96,700;12..96,800&display=swap');
/* ==========================================================================
   Hiaron API — Design System v4  "Aurora Glass"
   Windows 11 (Mica / Fluent)  ×  One UI 8 (squircles, floating bars)
   ×  Material 3 Expressive (shape morphing, spring physics, bold type)
   --------------------------------------------------------------------------
   Layers
     00  Tokens, reset, typography, utilities
     01  App shell & navigation
     02  Controls: buttons, forms, selects, switches, chips, tabs
     03  Surfaces: cards, KPIs, charts, tables, code
     04  Overlays: modal, toast, full-screen result view
     05  Pages: docs, auth, profile, settings, admin, landing, status
     06  Motion: entrance, scroll-driven, view transitions
     07  Responsive + reduced motion
   Notes
     • Token NAMES (--md-*, --accent-bg, --radius-*, --shadow-*) are stable on
       purpose: theme-engine.js writes to them at runtime so accent colour,
       font and shape presets (Settings) keep working everywhere.
     • Every surface colour is derived from --md-primary with color-mix(), so
       changing the accent re-tints the whole UI (dynamic colour).
   ========================================================================== */


:root {
  color-scheme: light dark;

  /* ---- Brand colour roles ---- */
  --md-primary: light-dark(#2D5BFF, #A3B8FF);
  --md-on-primary: light-dark(#FFFFFF, #0A1766);
  --md-secondary: light-dark(#7A4DFF, #CDBEFF);
  --md-on-secondary: light-dark(#FFFFFF, #25106B);
  --md-tertiary: light-dark(#00A67E, #4FE0B5);
  --md-on-tertiary: light-dark(#FFFFFF, #00382A);
  --md-warning: light-dark(#E58A00, #FFC857);
  --md-success: var(--md-tertiary);
  --md-error: light-dark(#E5384F, #FF8A9A);
  --md-on-error: #FFFFFF;
  --tint: var(--md-primary);

  /* ---- Surfaces: neutral ramp tinted by the accent (dynamic colour) ---- */
  --md-surface: color-mix(in oklab, var(--tint) 5%, light-dark(#F2F4FB, #0D0E14));
  --md-surface-dim: color-mix(in oklab, var(--tint) 6%, light-dark(#E4E7F2, #08090D));
  --md-surface-container-lowest: color-mix(in oklab, var(--tint) 1.5%, light-dark(#FFFFFF, #0A0B10));
  --md-surface-container-low: color-mix(in oklab, var(--tint) 2.5%, light-dark(#FBFCFF, #13141B));
  --md-surface-container: color-mix(in oklab, var(--tint) 4%, light-dark(#F5F7FD, #181A22));
  --md-surface-container-high: color-mix(in oklab, var(--tint) 6.5%, light-dark(#ECEFF9, #20222C));
  --md-surface-container-highest: color-mix(in oklab, var(--tint) 9%, light-dark(#E2E6F3, #292B37));
  --md-on-surface: light-dark(#12141D, #ECEEF8);
  --md-on-surface-variant: light-dark(#555A6E, #A0A5BC);
  --md-outline: light-dark(#C3C8DA, #3B3E50);
  --md-outline-variant: light-dark(#DFE3EF, #272A3A);

  /* ---- Containers derived from the accent ---- */
  --md-primary-container: color-mix(in oklab, var(--md-primary) 17%, var(--md-surface-container-low));
  --md-on-primary-container: light-dark(color-mix(in oklab, var(--md-primary) 80%, #000), color-mix(in oklab, var(--md-primary) 72%, #fff));
  --md-secondary-container: color-mix(in oklab, var(--md-primary) 11%, var(--md-surface-container-high));
  --md-tertiary-container: color-mix(in oklab, var(--md-tertiary) 19%, var(--md-surface-container-low));
  --md-error-container: color-mix(in oklab, var(--md-error) 15%, var(--md-surface-container-low));
  --md-on-error-container: light-dark(#8E1228, #FFCDD4);

  /* Glass surfaces */
  --card: color-mix(in oklab, var(--md-surface-container-low) 82%, transparent);
  --card-solid: var(--md-surface-container-low);
  --glass: color-mix(in oklab, var(--md-surface-container-lowest) 66%, transparent);
  --glass-strong: color-mix(in oklab, var(--md-surface-container-lowest) 84%, transparent);
  --stroke: color-mix(in oklab, var(--md-on-surface) 9%, transparent);
  --stroke-strong: color-mix(in oklab, var(--md-on-surface) 16%, transparent);

  /* ---- Accent paint (buttons, active states, brand marks). Solid or gradient;
          the Appearance engine overrides this inline. ---- */
  --accent-bg: linear-gradient(135deg, #2D5BFF 0%, #6C4DFF 100%);
  --grad: var(--accent-bg);
  --grad-soft: linear-gradient(135deg,
      color-mix(in oklab, var(--md-primary) 18%, transparent),
      color-mix(in oklab, var(--md-secondary) 14%, transparent));
  --glow: color-mix(in oklab, var(--md-primary) 46%, transparent);
  --ring: color-mix(in oklab, var(--md-primary) 26%, transparent);

  /* ---- Type ---- */
  --font-body: 'Inter', 'Segoe UI Variable Text', 'Segoe UI', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Segoe UI Variable Display', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', 'SFMono-Regular', Menlo, Consolas, monospace;

  /* ---- Shape (overridden by Settings → Design style) ---- */
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-xl: 34px;
  --radius-full: 999px;
  --corner: squircle;

  /* ---- Depth (Fluent layered shadows, accent-tinted) ---- */
  --shadow-color: light-dark(#1B2250, #000000);
  --shadow-1: 0 1px 2px color-mix(in oklab, var(--shadow-color) 8%, transparent),
              0 2px 6px -2px color-mix(in oklab, var(--shadow-color) 6%, transparent);
  --shadow-2: 0 10px 28px -10px color-mix(in oklab, var(--shadow-color) 22%, transparent),
              0 2px 8px -2px color-mix(in oklab, var(--shadow-color) 10%, transparent);
  --shadow-3: 0 32px 72px -20px color-mix(in oklab, var(--shadow-color) 40%, transparent),
              0 10px 24px -8px color-mix(in oklab, var(--shadow-color) 22%, transparent);
  --hairline: inset 0 1px 0 light-dark(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.07));

  /* ---- Layout ---- */
  --nav-width: 276px;
  --header-height: 64px;

  /* ---- Motion: M3 emphasized curves + real spring physics ---- */
  --dur-fast: 150ms;
  --dur-med: 320ms;
  --dur-slow: 560ms;
  --dur-xslow: 900ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --ease-out: cubic-bezier(0.05, 0.7, 0.1, 1);
  --ease-in: cubic-bezier(0.3, 0, 0.8, 0.15);
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --spring-soft: cubic-bezier(0.22, 0.95, 0.3, 1);
  --spring-snappy: cubic-bezier(0.3, 1.25, 0.5, 1);
  --spring-bouncy: cubic-bezier(0.34, 1.7, 0.64, 1);
  /* legacy names, still referenced by older markup */
  --motion-fast: var(--dur-fast);
  --motion-medium: var(--dur-med);
  --motion-slow: var(--dur-slow);
  --easing: var(--ease);
  --easing-spring: var(--spring);

  /* Morphing shapes (same vertex count → clip-path can interpolate) */
  --shape-circle: polygon(50.0% 0.0%,54.9% 0.2%,59.8% 1.0%,64.5% 2.2%,69.1% 3.8%,73.6% 5.9%,77.8% 8.4%,81.7% 11.3%,85.4% 14.6%,88.7% 18.3%,91.6% 22.2%,94.1% 26.4%,96.2% 30.9%,97.8% 35.5%,99.0% 40.2%,99.8% 45.1%,100.0% 50.0%,99.8% 54.9%,99.0% 59.8%,97.8% 64.5%,96.2% 69.1%,94.1% 73.6%,91.6% 77.8%,88.7% 81.7%,85.4% 85.4%,81.7% 88.7%,77.8% 91.6%,73.6% 94.1%,69.1% 96.2%,64.5% 97.8%,59.8% 99.0%,54.9% 99.8%,50.0% 100.0%,45.1% 99.8%,40.2% 99.0%,35.5% 97.8%,30.9% 96.2%,26.4% 94.1%,22.2% 91.6%,18.3% 88.7%,14.6% 85.4%,11.3% 81.7%,8.4% 77.8%,5.9% 73.6%,3.8% 69.1%,2.2% 64.5%,1.0% 59.8%,0.2% 54.9%,0.0% 50.0%,0.2% 45.1%,1.0% 40.2%,2.2% 35.5%,3.8% 30.9%,5.9% 26.4%,8.4% 22.2%,11.3% 18.3%,14.6% 14.6%,18.3% 11.3%,22.2% 8.4%,26.4% 5.9%,30.9% 3.8%,35.5% 2.2%,40.2% 1.0%,45.1% 0.2%);
  --shape-cookie: polygon(50.0% 0.0%,54.8% 1.4%,59.0% 4.9%,62.5% 8.7%,66.1% 11.2%,70.4% 11.9%,75.6% 11.8%,81.0% 12.3%,85.4% 14.6%,87.7% 19.0%,88.2% 24.4%,88.1% 29.6%,88.8% 33.9%,91.3% 37.5%,95.1% 41.0%,98.6% 45.2%,100.0% 50.0%,98.6% 54.8%,95.1% 59.0%,91.3% 62.5%,88.8% 66.1%,88.1% 70.4%,88.2% 75.6%,87.7% 81.0%,85.4% 85.4%,81.0% 87.7%,75.6% 88.2%,70.4% 88.1%,66.1% 88.8%,62.5% 91.3%,59.0% 95.1%,54.8% 98.6%,50.0% 100.0%,45.2% 98.6%,41.0% 95.1%,37.5% 91.3%,33.9% 88.8%,29.6% 88.1%,24.4% 88.2%,19.0% 87.7%,14.6% 85.4%,12.3% 81.0%,11.8% 75.6%,11.9% 70.4%,11.2% 66.1%,8.7% 62.5%,4.9% 59.0%,1.4% 54.8%,0.0% 50.0%,1.4% 45.2%,4.9% 41.0%,8.7% 37.5%,11.2% 33.9%,11.9% 29.6%,11.8% 24.4%,12.3% 19.0%,14.6% 14.6%,19.0% 12.3%,24.4% 11.8%,29.6% 11.9%,33.9% 11.2%,37.5% 8.7%,41.0% 4.9%,45.2% 1.4%);
  --shape-flower: polygon(50.0% 14.0%,53.6% 13.0%,57.9% 10.5%,62.9% 7.5%,68.3% 5.7%,73.5% 6.0%,77.5% 8.9%,79.7% 13.8%,80.4% 19.6%,80.2% 25.2%,80.4% 29.7%,81.9% 33.0%,85.2% 35.4%,89.8% 37.9%,94.8% 41.1%,98.6% 45.2%,100.0% 50.0%,98.6% 54.8%,94.8% 58.9%,89.8% 62.1%,85.2% 64.6%,81.9% 67.0%,80.4% 70.3%,80.2% 74.8%,80.4% 80.4%,79.7% 86.2%,77.5% 91.1%,73.5% 94.0%,68.3% 94.3%,62.9% 92.5%,57.9% 89.5%,53.6% 87.0%,50.0% 86.0%,46.4% 87.0%,42.1% 89.5%,37.1% 92.5%,31.7% 94.3%,26.5% 94.0%,22.5% 91.1%,20.3% 86.2%,19.6% 80.4%,19.8% 74.8%,19.6% 70.3%,18.1% 67.0%,14.8% 64.6%,10.2% 62.1%,5.2% 58.9%,1.4% 54.8%,0.0% 50.0%,1.4% 45.2%,5.2% 41.1%,10.2% 37.9%,14.8% 35.4%,18.1% 33.0%,19.6% 29.7%,19.8% 25.2%,19.6% 19.6%,20.3% 13.8%,22.5% 8.9%,26.5% 6.0%,31.7% 5.7%,37.1% 7.5%,42.1% 10.5%,46.4% 13.0%);
  --shape-clover: polygon(50.0% 0.0%,54.9% 0.7%,59.4% 2.7%,63.4% 5.7%,66.8% 9.3%,69.7% 13.2%,72.1% 16.9%,74.4% 20.3%,76.9% 23.1%,79.7% 25.6%,83.1% 27.9%,86.8% 30.3%,90.7% 33.2%,94.3% 36.6%,97.3% 40.6%,99.3% 45.1%,100.0% 50.0%,99.3% 54.9%,97.3% 59.4%,94.3% 63.4%,90.7% 66.8%,86.8% 69.7%,83.1% 72.1%,79.7% 74.4%,76.9% 76.9%,74.4% 79.7%,72.1% 83.1%,69.7% 86.8%,66.8% 90.7%,63.4% 94.3%,59.4% 97.3%,54.9% 99.3%,50.0% 100.0%,45.1% 99.3%,40.6% 97.3%,36.6% 94.3%,33.2% 90.7%,30.3% 86.8%,27.9% 83.1%,25.6% 79.7%,23.1% 76.9%,20.3% 74.4%,16.9% 72.1%,13.2% 69.7%,9.3% 66.8%,5.7% 63.4%,2.7% 59.4%,0.7% 54.9%,0.0% 50.0%,0.7% 45.1%,2.7% 40.6%,5.7% 36.6%,9.3% 33.2%,13.2% 30.3%,16.9% 27.9%,20.3% 25.6%,23.1% 23.1%,25.6% 20.3%,27.9% 16.9%,30.3% 13.2%,33.2% 9.3%,36.6% 5.7%,40.6% 2.7%,45.1% 0.7%);
  --shape-squircle: polygon(50.0% 8.3%,54.1% 8.3%,58.3% 8.3%,62.6% 8.4%,67.2% 8.5%,71.9% 9.0%,76.8% 9.9%,81.4% 11.7%,85.4% 14.6%,88.3% 18.6%,90.1% 23.2%,91.0% 28.1%,91.5% 32.8%,91.6% 37.4%,91.7% 41.7%,91.7% 45.9%,91.7% 50.0%,91.7% 54.1%,91.7% 58.3%,91.6% 62.6%,91.5% 67.2%,91.0% 71.9%,90.1% 76.8%,88.3% 81.4%,85.4% 85.4%,81.4% 88.3%,76.8% 90.1%,71.9% 91.0%,67.2% 91.5%,62.6% 91.6%,58.3% 91.7%,54.1% 91.7%,50.0% 91.7%,45.9% 91.7%,41.7% 91.7%,37.4% 91.6%,32.8% 91.5%,28.1% 91.0%,23.2% 90.1%,18.6% 88.3%,14.6% 85.4%,11.7% 81.4%,9.9% 76.8%,9.0% 71.9%,8.5% 67.2%,8.4% 62.6%,8.3% 58.3%,8.3% 54.1%,8.3% 50.0%,8.3% 45.9%,8.3% 41.7%,8.4% 37.4%,8.5% 32.8%,9.0% 28.1%,9.9% 23.2%,11.7% 18.6%,14.6% 14.6%,18.6% 11.7%,23.2% 9.9%,28.1% 9.0%,32.8% 8.5%,37.4% 8.4%,41.7% 8.3%,45.9% 8.3%);

  /* Code surfaces */
  --code-bg: light-dark(#0F1220, #07080D);
  --code-border: light-dark(#252A44, #1B1E2E);
  --code-fg: #DDE2F7;
  --code-muted: #7C86AE;

  /* legacy glass tokens kept so older inline styles never resolve to nothing */
  --glass-blur-light: blur(10px);
  --glass-blur: blur(18px) saturate(160%);
  --glass-blur-strong: blur(28px) saturate(180%);
  --glass-highlight: var(--hairline);
  --glass-highlight-strong: var(--hairline);
}

@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --spring: linear(0, 0.046, 0.159, 0.307, 0.465, 0.618, 0.752, 0.863, 0.95, 1.012, 1.052, 1.074, 1.083, 1.082, 1.074, 1.062, 1.049, 1.036, 1.024, 1.014, 1.006, 1, 0.997, 0.994, 0.993, 0.993, 0.994, 0.994, 0.996, 0.997, 0.998, 0.999, 0.999, 1, 1, 1, 1.001, 1.001, 1.001, 1, 1);
    --spring-soft: linear(0, 0.053, 0.167, 0.301, 0.431, 0.547, 0.645, 0.726, 0.791, 0.841, 0.881, 0.911, 0.934, 0.951, 0.964, 0.973, 0.981, 0.986, 0.99, 0.992, 0.995, 0.996, 0.997, 0.998, 0.999, 0.999, 0.999, 0.999, 1, 1, 1);
    --spring-snappy: linear(0, 0.144, 0.408, 0.653, 0.829, 0.937, 0.993, 1.015, 1.02, 1.017, 1.011, 1.007, 1.003, 1.001, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
    --spring-bouncy: linear(0, 0.038, 0.138, 0.275, 0.43, 0.588, 0.737, 0.867, 0.974, 1.055, 1.112, 1.147, 1.162, 1.161, 1.149, 1.129, 1.104, 1.078, 1.053, 1.031, 1.011, 0.996, 0.985, 0.978, 0.974, 0.973, 0.975, 0.977, 0.981, 0.985, 0.99, 0.993, 0.997, 1, 1.002, 1.003, 1.004, 1.004, 1.004, 1.004, 1.003, 1.003, 1.002, 1.001, 1.001, 1, 1, 1, 1);
  }
}

/* Dark-mode accent paint (images can't use light-dark(), so it is switched here) */
:root[data-theme='dark'] { color-scheme: dark; --accent-bg: linear-gradient(135deg, #8EA8FF 0%, #B79CFF 100%); }
:root[data-theme='light'] { color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) { --accent-bg: linear-gradient(135deg, #8EA8FF 0%, #B79CFF 100%); }
}

/* ==========================================================================
   Reset & base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  background: var(--md-surface);
  scrollbar-gutter: stable;
}
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--md-on-surface);
  background: transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'cv11', 'ss03', 'calt';
  position: relative;
  overflow-x: clip;
}

/* Mica: static accent-tinted wallpaper (one cheap fixed layer, never repaints). */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(38% 34% at 12% 10%, color-mix(in oklab, var(--md-primary) 24%, transparent), transparent 70%),
    radial-gradient(34% 30% at 90% 8%, color-mix(in oklab, var(--md-secondary) 20%, transparent), transparent 70%),
    radial-gradient(36% 34% at 80% 100%, color-mix(in oklab, var(--md-tertiary) 14%, transparent), transparent 70%);
}

img, svg { max-width: 100%; }
img { display: block; }
a { color: inherit; text-decoration: none; }
a:hover, a:focus, a:active, a:visited { text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
::selection { background: color-mix(in oklab, var(--md-primary) 32%, transparent); }

h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.025em; line-height: 1.15; margin: 0; }
p { margin: 0; }
code, kbd, samp, pre { font-family: var(--font-mono); }
code {
  font-size: 0.86em;
  padding: 0.16em 0.5em;
  border-radius: 8px;
  background: var(--md-surface-container-high);
  border: 1px solid var(--stroke);
  color: var(--md-on-surface);
}
hr { border: 0; height: 1px; background: var(--stroke); margin: 20px 0; }
table { border-collapse: collapse; }

:focus-visible {
  outline: 2.5px solid var(--md-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Windows-11 style slim scrollbars that widen on hover */
* { scrollbar-width: thin; scrollbar-color: color-mix(in oklab, var(--md-on-surface) 28%, transparent) transparent; }
*::-webkit-scrollbar { width: 12px; height: 12px; }
*::-webkit-scrollbar-thumb {
  background: color-mix(in oklab, var(--md-on-surface) 26%, transparent);
  border-radius: 10px; border: 4px solid transparent; background-clip: content-box;
  transition: border-width var(--dur-fast) var(--ease);
}
*::-webkit-scrollbar-thumb:hover { border-width: 2px; background-color: color-mix(in oklab, var(--md-on-surface) 44%, transparent); }
*::-webkit-scrollbar-track { background: transparent; }

.skip-link {
  position: fixed; left: 16px; top: -72px; z-index: 5000;
  padding: 12px 20px; border-radius: var(--radius-full);
  background: var(--accent-bg); color: var(--md-on-primary); font-weight: 700;
  box-shadow: var(--shadow-2);
  transition: top var(--dur-med) var(--spring);
}
.skip-link:focus { top: 16px; }

/* ---- Icons (Font Awesome glyphs) ---- */
.icon { font-size: 16px; line-height: 1; user-select: none; flex-shrink: 0; }
.icon-sm { font-size: 14px; }
.icon-lg { font-size: 26px; }

/* ---- Utilities ---- */
.muted { color: var(--md-on-surface-variant); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.fw-600 { font-weight: 600; }
.mono { font-family: var(--font-mono); }
.row { display: flex; align-items: center; gap: 10px; }
.row-wrap { flex-wrap: wrap; }
.row-between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grow { flex: 1 1 0; min-width: 0; }
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; } .mt-4 { margin-top: 28px; }
.mb-1 { margin-bottom: 6px; } .mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 18px; } .mb-4 { margin-bottom: 28px; }
.ml-auto { margin-left: auto; }
.btn-row { display: flex; gap: 10px; }
.btn-row > .btn { flex: 1 1 0; }
.is-hidden { display: none !important; }
.grad {
  background: linear-gradient(100deg, var(--md-primary), var(--md-secondary) 55%, color-mix(in oklab, var(--md-secondary) 60%, #ff5fa2));
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
@keyframes grad-flow { to { background-position: 100% 0; } }

/* Squircle corners (One UI) as progressive enhancement; falls back to round */
@supports (corner-shape: squircle) {
  .card, .kpi, .dash-card, .chart-section, .activity-card, .modal-overlay .modal, .toast, .lp-feature, .lp-step,
  .lp-code, .lp-cta-panel, .status-panel, .dash-head, .bottom-nav, .nav-rail, .custom-select-menu,
  input:not([type='checkbox']):not([type='file']), textarea, .custom-select-trigger { corner-shape: var(--corner); }
}

/* ==========================================================================
   01 — App shell & navigation
   ========================================================================== */
.app-shell {
  display: grid;
  grid-template-columns: var(--nav-width) minmax(0, 1fr);
  min-height: 100dvh;
  align-items: start;
}
.main-content { min-width: 0; }

/* ---- Brand ---- */
.brand { display: flex; align-items: center; gap: 12px; padding: 8px 10px 20px; }
.brand-mark {
  position: relative;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  flex-shrink: 0;
  color: var(--md-on-primary);
  background: var(--accent-bg);
  clip-path: var(--shape-cookie);
  overflow: hidden;
  transition: clip-path var(--dur-slow) var(--spring), transform var(--dur-slow) var(--spring);
}
.brand-mark::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.38), transparent 52%);
}
.brand-mark .icon { font-size: 18px; color: inherit; position: relative; z-index: 1; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand:hover .brand-mark { clip-path: var(--shape-flower); transform: rotate(18deg) scale(1.06); }
.brand:hover .brand-mark .icon { animation: icon-counter 0.6s var(--spring) both; }
@keyframes icon-counter { from { transform: rotate(-18deg); } to { transform: none; } }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-title { font-family: var(--font-display); font-weight: 800; font-size: 18px; letter-spacing: -0.035em; }
.brand-subtitle { font-size: 11.5px; color: var(--md-on-surface-variant); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Sidebar (Windows 11 NavigationView, floating like One UI) ---- */
.nav-rail {
  position: sticky; top: 14px; align-self: start;
  height: calc(100dvh - 28px);
  margin: 14px 0 14px 14px;
  padding: 16px 12px 14px;
  display: flex; flex-direction: column; gap: 6px;
  border-radius: var(--radius-xl);
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-2), var(--hairline);
  overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain;
  z-index: 20;
}
.nav-rail > * { flex-shrink: 0; }
.nav-list { position: relative; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.nav-list::before {
  content: 'Menu';
  padding: 4px 14px 8px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--md-on-surface-variant); opacity: 0.7;
}
.nav-item, .nav-external {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 14px;
  width: 100%; min-height: 46px;
  padding: 0 14px;
  border-radius: min(var(--radius-full), var(--radius-md));
  border: 0; background: transparent;
  color: var(--md-on-surface-variant);
  font-size: 14.5px; font-weight: 550; letter-spacing: -0.01em;
  text-align: left;
  isolation: isolate; overflow: hidden;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-med) var(--spring);
}
.nav-item .icon, .nav-external .icon {
  width: 22px; text-align: center; font-size: 16px;
  transition: transform var(--dur-slow) var(--spring-bouncy), color var(--dur-fast) var(--ease);
}
.nav-item span, .nav-external span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.nav-item img[data-account-avatar] { width: 22px !important; height: 22px !important; border-radius: 50% !important; }
.nav-item:hover, .nav-external:hover { background: color-mix(in oklab, var(--md-on-surface) 6.5%, transparent); color: var(--md-on-surface); }
.nav-item:hover .icon, .nav-external:hover .icon { transform: scale(1.18) rotate(-6deg); color: var(--md-primary); }
.nav-item:active, .nav-external:active { transform: scale(0.965); }
.nav-item.active { color: var(--md-on-surface); font-weight: 700; background: color-mix(in oklab, var(--md-primary) 15%, transparent); }
.nav-item.active .icon { color: var(--md-primary); animation: icon-pop 0.75s var(--spring-bouncy) both; }
.nav-item.nav-hold-preview { color: inherit; }
@keyframes icon-pop { 0% { transform: scale(0.5) rotate(-24deg); } 100% { transform: none; } }

/* Sliding selection pill (positioned by motion.js) */
.nav-indicator {
  position: absolute; left: 0; top: 0; z-index: 0;
  width: 0; height: 0;
  border-radius: min(var(--radius-full), var(--radius-md));
  background: color-mix(in oklab, var(--md-primary) 16%, var(--md-surface-container-lowest));
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--md-primary) 26%, transparent), 0 8px 22px -10px var(--glow);
  pointer-events: none; opacity: 0;
  transition: transform var(--dur-slow) var(--spring), width var(--dur-slow) var(--spring), height var(--dur-slow) var(--spring), opacity var(--dur-med) var(--ease);
  will-change: transform;
}
.nav-indicator.ready { opacity: 1; }
.nav-indicator.instant { transition: none; }
.nav-list > .nav-indicator::before, .nav-rail .nav-indicator::before {
  content: ''; position: absolute; left: 7px; top: 50%; width: 4px; height: 20px; margin-top: -10px;
  border-radius: 4px; background: var(--accent-bg);
}
.nav-list.has-indicator .nav-item.active,
.bottom-nav.has-indicator .bottom-nav-item.active { background: transparent; }

.nav-footer {
  margin-top: auto; padding-top: 12px;
  display: flex; flex-direction: column; gap: 6px;
  border-top: 1px solid var(--stroke);
}
.nav-external {
  background: color-mix(in oklab, var(--md-on-surface) 5%, transparent);
  cursor: pointer;
}

/* ---- Mobile top bar ---- */
.top-bar {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; z-index: 1200;
  height: calc(var(--header-height) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 14px 0;
  align-items: center; justify-content: space-between; gap: 8px;
  background: color-mix(in oklab, var(--md-surface) 62%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: background var(--dur-med) var(--ease), border-color var(--dur-med) var(--ease), box-shadow var(--dur-med) var(--ease);
}
body.is-scrolled .top-bar {
  background: color-mix(in oklab, var(--md-surface) 82%, transparent);
  border-bottom-color: var(--stroke);
  box-shadow: 0 10px 30px -18px color-mix(in oklab, var(--shadow-color) 50%, transparent);
}
.top-bar .brand { padding: 0; gap: 10px; }
.top-bar .brand-mark { width: 34px !important; height: 34px !important; }
.top-bar .brand-title { font-size: 16px; }

.icon-button {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-grid; place-items: center;
  width: 42px; height: 42px; min-width: 42px;
  border-radius: min(var(--radius-full), 16px);
  border: 1px solid transparent;
  background: transparent;
  color: var(--md-on-surface-variant);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease),
              transform var(--dur-med) var(--spring), border-radius var(--dur-med) var(--spring);
}
.icon-button .icon { transition: transform var(--dur-med) var(--spring-bouncy); }
.icon-button:hover { background: color-mix(in oklab, var(--md-on-surface) 8%, transparent); color: var(--md-on-surface); }
.icon-button:hover .icon { transform: scale(1.14) rotate(-6deg); }
.icon-button:active { transform: scale(0.88); border-radius: 12px; }
.top-bar .icon-button {
  border-color: var(--stroke);
  background: var(--glass-strong);
  border-radius: 50%;
}
.top-bar .icon-button:active { border-radius: 50%; }
[data-theme-toggle] .icon { transition: transform var(--dur-slow) var(--spring-bouncy); }
[data-theme-toggle]:hover [data-theme-icon] { transform: rotate(32deg) scale(1.15); }

/* ---- Drawer (legacy markup; mobile uses bottom nav) ---- */
.drawer-scrim {
  display: none; position: fixed; inset: 0; z-index: 60;
  background: rgba(8, 10, 24, 0.5);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity var(--dur-med) var(--ease);
}
.drawer-scrim.open { display: block; opacity: 1; }
.drawer {
  position: fixed; top: 10px; left: 10px; bottom: 10px; z-index: 70;
  width: 84%; max-width: 320px; padding: 18px 14px;
  display: flex; flex-direction: column; gap: 6px;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--stroke); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-3);
  transform: translateX(-112%);
  transition: transform var(--dur-slow) var(--spring);
}
.drawer.open { transform: none; }

/* ---- Floating bottom navigation (One UI 8 style capsule) ---- */
.bottom-nav {
  display: none;
  position: fixed; z-index: 1200;
  left: 14px; right: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  max-width: 560px; margin-inline: auto;
  padding: 6px;
  align-items: center; justify-content: space-around; gap: 2px;
  border-radius: min(var(--radius-xl), 34px);
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-3), var(--hairline);
  isolation: isolate;
}
.bottom-nav-item {
  position: relative; z-index: 1;
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 9px 2px 8px;
  border: 0; background: none;
  border-radius: min(var(--radius-lg), 26px);
  color: var(--md-on-surface-variant);
  font-size: 10.5px; font-weight: 600; letter-spacing: 0;
  overflow: hidden; isolation: isolate;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), transform var(--dur-med) var(--spring);
}
.bottom-nav-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.bottom-nav-item .icon { font-size: 18px; transition: transform var(--dur-slow) var(--spring-bouncy); }
.bottom-nav-item img[data-account-avatar] { width: 22px !important; height: 22px !important; }
.bottom-nav-item:active { transform: scale(0.9); }
.bottom-nav-item.active { color: var(--md-primary); font-weight: 750; background: color-mix(in oklab, var(--md-primary) 15%, transparent); }
.bottom-nav-item.active .icon { animation: icon-pop 0.75s var(--spring-bouncy) both; }
.bottom-nav .nav-indicator { border-radius: min(var(--radius-lg), 26px); background: color-mix(in oklab, var(--md-primary) 17%, var(--md-surface-container-lowest)); }
.bottom-nav .nav-indicator::before { display: none; }

/* hold-and-slide bubble (see shared.js initNavHoldSlider) */
.nav-hold-bubble {
  position: absolute; left: 50%; top: 50%; z-index: 5;
  width: 56px; height: 56px; border-radius: 22px;
  background: color-mix(in oklab, var(--md-primary) 20%, transparent);
  border: 1px solid color-mix(in oklab, var(--md-primary) 45%, transparent);
  box-shadow: 0 12px 30px -8px var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  transform: translate(-50%, -50%) scale(0.4);
  opacity: 0; pointer-events: none;
  transition: left var(--dur-med) var(--spring), top var(--dur-med) var(--spring),
              width var(--dur-med) var(--spring), height var(--dur-med) var(--spring),
              transform var(--dur-med) var(--spring-bouncy), opacity var(--dur-fast) var(--ease);
}
.nav-hold-bubble.visible { opacity: 1; transform: translate(-50%, -50%) scale(1.04); }
.bottom-nav.holding, .nav-rail.holding { touch-action: none; }
.bottom-nav-item.nav-hold-preview, .nav-item.nav-hold-preview { color: var(--md-primary); }
.nav-rail .nav-hold-bubble { display: none !important; }

/* ---- Simple top navbar (profile / admin) — Windows 11 command bar ---- */
.simple-topbar {
  position: sticky; top: 12px; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  margin: 12px clamp(12px, 3vw, 40px) 0;
  padding: 10px 14px 10px 18px;
  border-radius: var(--radius-xl);
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-2), var(--hairline);
  transition: box-shadow var(--dur-med) var(--ease), background var(--dur-med) var(--ease);
}
body.is-scrolled .simple-topbar { box-shadow: var(--shadow-3), var(--hairline); background: var(--glass-strong); }
.simple-topbar nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.simple-topbar .btn-outlined { background: transparent; border-color: transparent; box-shadow: none; color: var(--md-on-surface-variant); }
.simple-topbar .btn-outlined:hover { background: color-mix(in oklab, var(--md-on-surface) 8%, transparent); color: var(--md-on-surface); border-color: transparent; }
.auth-brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 800; font-size: 17px; letter-spacing: -0.035em; }
.auth-brand > .icon, .auth-brand > [data-brand-icon] {
  width: 36px; height: 36px; display: inline-grid !important; place-items: center;
  background: var(--accent-bg); color: var(--md-on-primary); font-size: 15px;
  clip-path: var(--shape-cookie); vertical-align: middle; overflow: hidden;
}
.auth-brand [data-brand-icon] .icon { color: inherit; font-size: 15px; }

/* ---- Page frame ---- */
.page {
  width: 100%; max-width: 1240px; margin: 0 auto;
  padding: 40px clamp(18px, 4vw, 56px) 96px;
}
.page-header {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  margin-bottom: 30px;
}
.eyebrow-free-title, .page-header h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.4vw, 50px); font-weight: 800; letter-spacing: -0.045em; line-height: 1.04;
}
.page-header h2 { font-size: 26px; letter-spacing: -0.035em; }
.page-header p { margin-top: 10px; font-size: 15.5px; color: var(--md-on-surface-variant); max-width: 62ch; }
.header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.footer-note { margin-top: 56px; text-align: center; font-size: 12.5px; color: var(--md-on-surface-variant); }
.section-title {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-size: 16.5px; font-weight: 750; letter-spacing: -0.025em;
  margin: 0 0 6px;
}
.section-title > .icon {
  width: 34px; height: 34px; display: grid; place-items: center; font-size: 14px;
  border-radius: 12px;
  background: var(--md-primary-container); color: var(--md-on-primary-container);
  transition: transform var(--dur-slow) var(--spring-bouncy), border-radius var(--dur-slow) var(--spring);
}
.card:hover > .section-title > .icon { transform: rotate(-8deg) scale(1.08); border-radius: 50%; }
.section-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-title-row .section-title { margin: 0; }
.section-desc { font-size: 13.5px; color: var(--md-on-surface-variant); margin: 0 0 16px; }
.section-desc:first-child { margin-top: 0; }

/* ==========================================================================
   02 — Controls
   ========================================================================== */

/* ---- Ripple + pointer-light helpers (driven by motion.js) ---- */
.ripple {
  position: absolute; z-index: 0; border-radius: 50%; pointer-events: none;
  background: currentColor; opacity: 0.24;
  transform: translate(-50%, -50%) scale(0);
  animation: ripple 0.75s var(--ease-out) forwards;
}
@keyframes ripple { 70% { opacity: 0.14; } to { transform: translate(-50%, -50%) scale(1); opacity: 0; } }

/* ---- Buttons ---- */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 44px; padding: 0 22px;
  border-radius: min(var(--radius-full), 22px);
  border: 1px solid transparent;
  font-size: 14.5px; font-weight: 650; letter-spacing: -0.01em;
  line-height: 1; white-space: nowrap;
  user-select: none;
  transition: transform var(--dur-med) var(--spring), border-radius var(--dur-med) var(--spring),
              box-shadow var(--dur-med) var(--ease), background-color var(--dur-fast) var(--ease),
              background-position var(--dur-slow) var(--ease), border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease), filter var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
}
.btn .icon, .btn .icon-sm { font-size: 14.5px; transition: transform var(--dur-med) var(--spring-bouncy); }
.btn:hover { transform: translateY(-2px); }
.btn:hover .icon { transform: scale(1.18) rotate(-6deg); }
.btn:active { transform: translateY(0) scale(0.955); border-radius: min(var(--radius-full), 14px); transition-duration: 90ms; }
.btn:disabled, .btn[aria-disabled='true'] { opacity: 0.5; cursor: not-allowed; pointer-events: none; filter: saturate(0.5); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 13.5px; gap: 7px; border-radius: min(var(--radius-full), 18px); }
.btn-sm:active { border-radius: min(var(--radius-full), 11px); }
.btn-block { width: 100%; height: 48px; }
.btn-block.btn-sm { height: 40px; }
.btn-block + .btn-block { margin-top: 10px; }

.btn-filled {
  color: var(--md-on-primary);
  background: var(--accent-bg);
  background-size: 170% 170%; background-position: 0% 50%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), 0 1px 2px rgba(10, 16, 48, 0.2), 0 10px 22px -10px var(--glow);
}
.btn-filled::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(112deg, transparent 32%, rgba(255, 255, 255, 0.34) 50%, transparent 68%);
  transform: translateX(-130%);
  transition: transform 0.9s var(--ease-out);
}
.btn-filled:hover { background-position: 100% 50%; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 1px 2px rgba(10, 16, 48, 0.2), 0 16px 30px -10px var(--glow); }
.btn-filled:hover::before { transform: translateX(130%); }

.btn-filled-danger {
  color: #fff;
  background: linear-gradient(135deg, #F2475E, #D22D52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 10px 22px -10px color-mix(in oklab, #E5384F 70%, transparent);
}
.btn-filled-danger:hover { filter: brightness(1.06) saturate(1.05); }

.btn-tonal {
  color: var(--md-on-primary-container);
  background: color-mix(in oklab, var(--md-primary) 15%, var(--md-surface-container-high));
  border-color: color-mix(in oklab, var(--md-primary) 14%, transparent);
}
.btn-tonal:hover { background: color-mix(in oklab, var(--md-primary) 24%, var(--md-surface-container-high)); }

.btn-outlined {
  color: var(--md-on-surface);
  background: var(--glass);
  border-color: var(--stroke-strong);
  box-shadow: var(--shadow-1), var(--hairline);
}
.btn-outlined:hover { border-color: color-mix(in oklab, var(--md-primary) 55%, transparent); background: color-mix(in oklab, var(--md-primary) 9%, var(--glass-strong)); box-shadow: var(--shadow-2), var(--hairline); }

.btn-link {
  background: none; border: 0; padding: 0; height: auto;
  color: var(--md-primary); font-size: 13px; font-weight: 650;
  cursor: pointer; border-radius: 6px;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat; background-position: 0 100%; background-size: 0 1.5px;
  transition: background-size var(--dur-med) var(--ease-out), opacity var(--dur-fast) var(--ease);
}
.btn-link:hover { background-size: 100% 1.5px; }

.btn-light { background: #fff; color: #17205E; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.45); }
.btn-light:hover { background: #F4F6FF; }
.btn-ghost-light { background: rgba(255, 255, 255, 0.14); color: #fff; border-color: rgba(255, 255, 255, 0.36);  }
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.24); }

.btn-google {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; height: 50px;
  border-radius: min(var(--radius-full), 25px);
  border: 1px solid var(--stroke-strong);
  background: var(--glass-strong);
  color: var(--md-on-surface);
  font-size: 14.5px; font-weight: 650;
  box-shadow: var(--shadow-1), var(--hairline);
  transition: transform var(--dur-med) var(--spring), border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), box-shadow var(--dur-med) var(--ease), border-radius var(--dur-med) var(--spring);
}
.btn-google:hover { border-color: color-mix(in oklab, var(--md-primary) 55%, transparent); background: color-mix(in oklab, var(--md-primary) 8%, var(--glass-strong)); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.btn-google:active { transform: scale(0.965); border-radius: min(var(--radius-full), 15px); }
.btn-google .fa-google { background: conic-gradient(from -45deg, #EA4335 0 25%, #FBBC05 0 50%, #34A853 0 75%, #4285F4 0); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; font-size: 17px; }
.btn-google + .btn-google { margin-top: 10px; }

/* ---- Spinner (rounded arc that breathes while it spins) ---- */
.spinner {
  display: inline-block; width: 16px; height: 16px; flex-shrink: 0;
  border-radius: 50%; vertical-align: -3px;
  background: conic-gradient(from 0deg, transparent 0 8%, currentColor 92%, transparent 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.4px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2.4px), #000 calc(100% - 2px));
  animation: spinner-spin 0.9s cubic-bezier(0.55, 0.15, 0.45, 0.85) infinite;
}
.spinner-sm { width: 14px; height: 14px; }
.spinner-lg { width: 32px; height: 32px; -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3.4px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3.4px), #000 calc(100% - 3px)); }
@keyframes spinner-spin { to { transform: rotate(360deg); } }
.fa-spin { animation-duration: 0.9s; }

/* ---- Form fields ---- */
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.form-field, .field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field { margin-bottom: 14px; animation: field-in var(--dur-slow) var(--spring) both; }
.field.is-hidden { display: none; }
@keyframes field-in { from { opacity: 0; transform: translateY(-8px) scale(0.98); } to { opacity: 1; transform: none; } }
.form-field > label, .field > label {
  font-size: 13px; font-weight: 650; letter-spacing: -0.005em;
  color: var(--md-on-surface);
  transition: color var(--dur-fast) var(--ease), transform var(--dur-med) var(--spring);
}
.form-field:focus-within > label, .field:focus-within > label { color: var(--md-primary); transform: translateX(2px); }

input[type='text'], input[type='email'], input[type='password'], input[type='number'],
input[type='search'], input[type='url'], input[type='tel'], input[type='datetime-local'],
input:not([type]), textarea, select {
  width: 100%;
  height: 50px; padding: 0 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--stroke-strong);
  background-color: color-mix(in oklab, var(--md-surface-container-lowest) 70%, transparent);
  background-image: linear-gradient(90deg, var(--md-primary), var(--md-secondary));
  background-repeat: no-repeat; background-position: 50% 100%; background-size: 0% 3px;
  color: var(--md-on-surface);
  font-size: 14.5px;
  outline: none;
  box-shadow: inset 0 1px 2px color-mix(in oklab, var(--shadow-color) 6%, transparent);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-med) var(--ease),
              background-color var(--dur-fast) var(--ease), background-size var(--dur-slow) var(--spring);
}
textarea { height: auto; padding: 14px 16px; line-height: 1.5; resize: vertical; }
input::placeholder, textarea::placeholder { color: color-mix(in oklab, var(--md-on-surface-variant) 65%, transparent); transition: opacity var(--dur-med) var(--ease), transform var(--dur-med) var(--spring); }
input:focus::placeholder, textarea:focus::placeholder { opacity: 0.4; transform: translateX(4px); }
input:hover, textarea:hover { border-color: color-mix(in oklab, var(--md-primary) 38%, var(--stroke-strong)); }
input:focus, textarea:focus {
  border-color: color-mix(in oklab, var(--md-primary) 70%, transparent);
  background-color: var(--md-surface-container-lowest);
  background-size: 100% 3px;
  box-shadow: 0 0 0 5px var(--ring), 0 12px 28px -14px var(--glow);
}
input:disabled, textarea:disabled { opacity: 0.55; cursor: not-allowed; }
input[type='datetime-local'] { font-family: inherit; }
input[type='datetime-local']::-webkit-calendar-picker-indicator { opacity: 0.6; cursor: pointer; filter: light-dark(none, invert(1)); }
input[type='number']::-webkit-inner-spin-button { opacity: 0.4; }

/* docs "Try API" inputs read as code */
.field input, .field textarea { font-family: var(--font-mono); font-size: 13px; height: 44px; }
.field input[type='file'] { height: auto; padding: 8px 10px; font-family: var(--font-body); cursor: pointer; }
.field input[type='file']::file-selector-button, input[type='file']::file-selector-button {
  margin-right: 12px; padding: 8px 14px;
  border: 1px solid var(--stroke-strong); border-radius: var(--radius-full);
  background: var(--glass-strong); color: var(--md-on-surface);
  font-size: 12.5px; font-weight: 650; cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.field input[type='file']::file-selector-button:hover { border-color: var(--md-primary); background: var(--md-primary-container); }

.inline-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.inline-form .form-field { flex: 1 1 160px; }
.inline-form .btn { flex-shrink: 0; }
.inline-form .btn-block { width: 100%; }
.inline-form .form-field input { height: 46px; }

.form-error {
  display: none;
  align-items: flex-start; gap: 10px;
  padding: 12px 16px; margin-bottom: 4px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in oklab, var(--md-error) 32%, transparent);
  background: var(--md-error-container);
  color: var(--md-on-error-container);
  font-size: 13px; font-weight: 550; line-height: 1.45;
}
.form-error::before { content: '\f06a'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 14px; margin-top: 1px; color: var(--md-error); }
.form-error.visible { display: flex; animation: shake-in 0.6s var(--spring) both; }
p.form-error.visible { display: flex; margin: 0; }
@keyframes shake-in {
  0% { opacity: 0; transform: translateY(-8px) scale(0.97); }
  35% { opacity: 1; transform: translateX(7px); }
  55% { transform: translateX(-5px); }
  75% { transform: translateX(3px); }
  100% { transform: none; }
}
.form-hint {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--stroke);
  background: var(--md-surface-container-high);
  color: var(--md-on-surface-variant);
  font-size: 13px; line-height: 1.5;
}
.form-hint.error { background: var(--md-error-container); color: var(--md-on-error-container); border-color: color-mix(in oklab, var(--md-error) 32%, transparent); }
.form-hint.success { background: var(--md-tertiary-container); color: var(--md-tertiary); border-color: color-mix(in oklab, var(--md-tertiary) 32%, transparent); }
.recaptcha-box { display: flex; justify-content: center; max-width: 100%; overflow-x: auto; }
.divider-row { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--md-on-surface-variant); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.divider-row::before, .divider-row::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--stroke-strong), transparent); }

/* password reveal (added by enhance.js) */
.input-wrap { position: relative; display: block; }
.input-wrap input { padding-right: 52px; }
.input-wrap .input-toggle {
  position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent;
  color: var(--md-on-surface-variant); display: grid; place-items: center;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-med) var(--spring);
}
.input-wrap .input-toggle:hover { background: color-mix(in oklab, var(--md-on-surface) 9%, transparent); color: var(--md-on-surface); }
.input-wrap .input-toggle:active { transform: translateY(-50%) scale(0.85); }

/* ---- Search field ---- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.search-field {
  flex: 1 1 300px; min-width: 0;
  display: flex; align-items: center; gap: 12px;
  height: 54px; padding: 0 20px;
  border-radius: min(var(--radius-full), 27px);
  background: var(--glass-strong);
  border: 1px solid var(--stroke-strong);
  box-shadow: var(--shadow-1), var(--hairline);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-med) var(--ease), transform var(--dur-med) var(--spring), background var(--dur-fast) var(--ease);
}
.search-field:hover { border-color: color-mix(in oklab, var(--md-primary) 40%, var(--stroke-strong)); }
.search-field:focus-within { border-color: color-mix(in oklab, var(--md-primary) 70%, transparent); box-shadow: 0 0 0 5px var(--ring), var(--shadow-2); transform: translateY(-1px) scale(1.008); background: var(--md-surface-container-lowest); }
.search-field .icon { color: var(--md-on-surface-variant); font-size: 15px; transition: transform var(--dur-slow) var(--spring-bouncy), color var(--dur-fast) var(--ease); }
.search-field:focus-within .icon { color: var(--md-primary); transform: scale(1.2) rotate(-12deg); }
.search-field input {
  flex: 1; height: 100%; padding: 0; border: 0; background: transparent; box-shadow: none; border-radius: 0;
  font-size: 15px;
}
.search-field input:focus { box-shadow: none; background: transparent; }

/* ---- Chips (filters) ---- */
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  position: relative; overflow: hidden; isolation: isolate;
  height: 40px; padding: 0 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: min(var(--radius-full), 20px);
  border: 1px solid var(--stroke-strong);
  background: var(--glass-strong);
  color: var(--md-on-surface-variant);
  font-size: 13.5px; font-weight: 650; white-space: nowrap;
  box-shadow: var(--shadow-1);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease),
              transform var(--dur-med) var(--spring), box-shadow var(--dur-med) var(--ease), border-radius var(--dur-med) var(--spring);
}
.chip:hover { color: var(--md-on-surface); border-color: color-mix(in oklab, var(--md-primary) 45%, var(--stroke-strong)); transform: translateY(-2px); }
.chip:active { transform: scale(0.93); border-radius: min(var(--radius-full), 12px); }
.chip[aria-pressed='true'], .chip.active, .chip.selected {
  color: var(--md-on-primary); border-color: transparent;
  background: var(--accent-bg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 10px 22px -10px var(--glow);
  animation: chip-pop 0.55s var(--spring-bouncy);
}
@keyframes chip-pop { 0% { transform: scale(0.88); } 100% { transform: none; } }
[data-category-tabs] { margin-bottom: 24px; }

/* Segmented control (method filter + tabs) with a sliding thumb */
.toolbar .chip-group, .tabs {
  position: relative;
  gap: 2px; padding: 5px; flex-wrap: nowrap;
  border-radius: min(var(--radius-full), 24px);
  background: color-mix(in oklab, var(--md-on-surface) 6%, var(--md-surface-container));
  border: 1px solid var(--stroke);
  box-shadow: inset 0 1px 3px color-mix(in oklab, var(--shadow-color) 8%, transparent);
}
.toolbar .chip-group .chip {
  position: relative; z-index: 1;
  flex: 1 0 auto; height: 42px; min-width: 64px; padding: 0 16px; white-space: nowrap; border: 0; background: transparent; box-shadow: none; animation: none;
  border-radius: min(var(--radius-full), 19px);
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.02em;
}
.toolbar .chip-group .chip:hover { transform: none; background: color-mix(in oklab, var(--md-on-surface) 6%, transparent); }
.toolbar .chip-group .chip[aria-pressed='true'] { background: var(--card-solid); color: var(--md-primary); box-shadow: var(--shadow-1), 0 0 0 1px var(--stroke); }
.seg-thumb {
  position: absolute; left: 0; top: 0; z-index: 0; width: 0; height: 0;
  border-radius: min(var(--radius-full), 19px);
  background: var(--card-solid);
  box-shadow: var(--shadow-2), 0 0 0 1px var(--stroke), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  pointer-events: none; opacity: 0;
  transition: transform var(--dur-slow) var(--spring), width var(--dur-slow) var(--spring), height var(--dur-slow) var(--spring), opacity var(--dur-med) var(--ease);
}
.seg-thumb.ready { opacity: 1; }
.seg-thumb.instant { transition: none; }
.has-thumb > .chip[aria-pressed='true'], .has-thumb > .tab-btn.active { background: transparent !important; box-shadow: none !important; }

/* ---- Tabs ---- */
.tabs { display: inline-flex; flex-wrap: nowrap; margin-bottom: 14px; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  position: relative; z-index: 1; overflow: hidden; isolation: isolate;
  flex: 0 0 auto; height: 38px; padding: 0 18px; white-space: nowrap;
  border: 0; border-radius: min(var(--radius-full), 17px);
  background: transparent; color: var(--md-on-surface-variant);
  font-size: 13.5px; font-weight: 650;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), transform var(--dur-med) var(--spring);
}
.tab-btn:hover { color: var(--md-on-surface); }
.tab-btn:active { transform: scale(0.94); }
.tab-btn.active { background: var(--card-solid); color: var(--md-primary); box-shadow: var(--shadow-1), 0 0 0 1px var(--stroke); }
[data-tab-panel][hidden] { display: none; }
[data-tab-panel]:not([hidden]) { animation: panel-in var(--dur-slow) var(--spring) both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---- Custom select ---- */
.custom-select { position: relative; width: 100%; }
.custom-select-trigger {
  width: 100%; height: 50px; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--stroke-strong);
  background-color: color-mix(in oklab, var(--md-surface-container-lowest) 70%, transparent);
  color: var(--md-on-surface);
  font-size: 14.5px; text-align: left;
  box-shadow: inset 0 1px 2px color-mix(in oklab, var(--shadow-color) 6%, transparent);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-med) var(--ease), background-color var(--dur-fast) var(--ease), transform var(--dur-med) var(--spring);
}
.custom-select-trigger:hover { border-color: color-mix(in oklab, var(--md-primary) 38%, var(--stroke-strong)); }
.custom-select-trigger:active { transform: scale(0.99); }
.custom-select-trigger:focus-visible, .custom-select[data-open='true'] .custom-select-trigger {
  border-color: color-mix(in oklab, var(--md-primary) 70%, transparent); background-color: var(--md-surface-container-lowest);
  box-shadow: 0 0 0 5px var(--ring); outline: none;
}
.custom-select-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.custom-select-trigger .icon { font-size: 12px; color: var(--md-on-surface-variant); transition: transform var(--dur-slow) var(--spring); }
.custom-select[data-open='true'] .custom-select-trigger .icon { transform: rotate(180deg); color: var(--md-primary); }
.field .custom-select-trigger { height: 44px; font-family: var(--font-mono); font-size: 13px; }

.custom-select-menu {
  position: fixed; z-index: 999999;
  display: flex; flex-direction: column; gap: 2px;
  max-height: 260px; overflow-y: auto; padding: 8px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--stroke-strong);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  box-shadow: var(--shadow-3), var(--hairline);
  opacity: 0; pointer-events: none;
  transform: translateY(-10px) scale(0.94); transform-origin: top center;
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-med) var(--spring);
}
.custom-select-menu.open { opacity: 1; transform: none; pointer-events: auto; }
.select-click-catcher { position: fixed; inset: 0; z-index: 999998; background: transparent; }
.custom-select-option {
  position: relative; overflow: hidden; isolation: isolate;
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--md-on-surface);
  font-size: 14px; text-align: left;
  transition: background var(--dur-fast) var(--ease), transform var(--dur-med) var(--spring), padding var(--dur-med) var(--spring);
}
.custom-select-menu.open .custom-select-option { animation: option-in var(--dur-slow) var(--spring) both; }
.custom-select-menu.open .custom-select-option:nth-child(2) { animation-delay: 20ms; }
.custom-select-menu.open .custom-select-option:nth-child(3) { animation-delay: 40ms; }
.custom-select-menu.open .custom-select-option:nth-child(4) { animation-delay: 60ms; }
.custom-select-menu.open .custom-select-option:nth-child(5) { animation-delay: 80ms; }
.custom-select-menu.open .custom-select-option:nth-child(n+6) { animation-delay: 100ms; }
@keyframes option-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.custom-select-option:hover, .custom-select-option:focus-visible { background: color-mix(in oklab, var(--md-on-surface) 8%, transparent); outline: none; padding-left: 18px; }
.custom-select-option.active { color: var(--md-on-primary-container); font-weight: 700; background: var(--md-primary-container); }
.custom-select-option .icon { font-size: 12px; animation: icon-pop 0.6s var(--spring-bouncy) both; }

/* ---- Switch (M3 Expressive: thumb grows when on, stretches while pressed) ---- */
.switch { position: relative; display: inline-block; width: 56px; height: 32px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; }
.switch-track {
  position: absolute; inset: 0; border-radius: var(--radius-full);
  background: var(--md-surface-container-highest);
  box-shadow: inset 0 0 0 2px var(--md-outline);
  transition: background var(--dur-med) var(--ease), box-shadow var(--dur-med) var(--ease);
}
.switch-thumb {
  position: absolute; top: 50%; left: 8px; width: 16px; height: 16px; margin-top: -8px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--md-outline);
  transition: left var(--dur-slow) var(--spring), width var(--dur-slow) var(--spring), height var(--dur-slow) var(--spring),
              margin-top var(--dur-slow) var(--spring), background var(--dur-med) var(--ease), box-shadow var(--dur-med) var(--ease);
}
.switch-thumb::after {
  content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 11px; line-height: 1;
  color: var(--md-primary); opacity: 0; transform: scale(0) rotate(-40deg);
  transition: opacity var(--dur-med) var(--ease), transform var(--dur-slow) var(--spring-bouncy);
}
.switch:hover .switch-thumb { box-shadow: 0 0 0 8px color-mix(in oklab, var(--md-on-surface) 8%, transparent); }
.switch input:checked + .switch-track { background: var(--accent-bg); box-shadow: 0 8px 20px -8px var(--glow); }
.switch input:checked + .switch-track .switch-thumb { left: 28px; width: 24px; height: 24px; margin-top: -12px; background: #fff; box-shadow: 0 2px 8px rgba(10, 16, 40, 0.35); }
.switch input:checked + .switch-track .switch-thumb::after { opacity: 1; transform: none; }
.switch:active .switch-thumb { width: 30px !important; height: 28px !important; margin-top: -14px !important; }
.switch input:checked:active + .switch-track .switch-thumb { left: 22px !important; }
.switch input:focus-visible + .switch-track { outline: 2.5px solid var(--md-primary); outline-offset: 3px; }

/* ---- Checkbox ---- */
.checkbox-custom {
  appearance: none; -webkit-appearance: none;
  width: 24px; height: 24px; min-width: 24px; margin: 0; padding: 0;
  display: inline-grid; place-items: center;
  border-radius: 8px; border: 2px solid var(--md-outline);
  background: transparent; box-shadow: none; flex-shrink: 0;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-med) var(--spring), border-radius var(--dur-med) var(--spring);
}
.checkbox-custom:hover { border-color: var(--md-primary); transform: scale(1.1); }
.checkbox-custom:active { transform: scale(0.88); border-radius: 12px; }
.checkbox-custom:checked { background: var(--accent-bg); border-color: transparent; animation: check-pop 0.5s var(--spring-bouncy); }
.checkbox-custom:checked::after { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 12px; line-height: 1; color: var(--md-on-primary); animation: check-draw 0.45s var(--spring-bouncy) both; }
@keyframes check-pop { 0% { transform: scale(0.8); } 100% { transform: none; } }
@keyframes check-draw { from { transform: scale(0) rotate(-45deg); } to { transform: none; } }
.checkbox-custom:focus-visible { outline: 2.5px solid var(--md-primary); outline-offset: 3px; box-shadow: none; }
.checkbox-row { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; padding-bottom: 10px; cursor: pointer; }
.checkbox-row label { cursor: pointer; }
.check-line { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; cursor: pointer; }

/* ---- File upload ---- */
.file-upload { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.file-upload-input { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; white-space: nowrap; }
.file-upload-name { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--md-on-surface-variant); }

/* ---- Badges ---- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 750; letter-spacing: 0.05em; text-transform: uppercase; line-height: 1.2;
  border: 1px solid transparent;
  transition: transform var(--dur-med) var(--spring);
}
.badge:hover { transform: scale(1.06); }
.badge-premium { background: linear-gradient(135deg, color-mix(in oklab, #FFB020 28%, transparent), color-mix(in oklab, #FF7A1A 22%, transparent)); color: light-dark(#A35200, #FFD27A); border-color: color-mix(in oklab, #FFB020 38%, transparent); }
.badge-admin { background: var(--md-primary-container); color: var(--md-on-primary-container); border-color: color-mix(in oklab, var(--md-primary) 30%, transparent); }
.badge-free { background: var(--md-surface-container-high); color: var(--md-on-surface-variant); border-color: var(--stroke); }
.badge-banned { background: var(--md-error-container); color: var(--md-on-error-container); border-color: color-mix(in oklab, var(--md-error) 30%, transparent); }
.badge-active { background: var(--md-tertiary-container); color: var(--md-tertiary); border-color: color-mix(in oklab, var(--md-tertiary) 30%, transparent); }

.method-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 56px;
  padding: 6px 12px; border-radius: min(var(--radius-sm), 12px);
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; letter-spacing: 0.05em;
  border: 1px solid transparent;
}
.method-badge.get { background: var(--md-tertiary-container); color: var(--md-tertiary); border-color: color-mix(in oklab, var(--md-tertiary) 30%, transparent); }
.method-badge.post { background: var(--md-primary-container); color: var(--md-on-primary-container); border-color: color-mix(in oklab, var(--md-primary) 30%, transparent); }
.category-badge { padding: 4px 12px; border-radius: var(--radius-full); font-size: 11px; font-weight: 650; color: var(--md-on-surface-variant); background: var(--md-surface-container-high); }
.status-chip { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: var(--radius-full); font-family: var(--font-mono); font-size: 12px; font-weight: 700; background: var(--md-surface-container-high); }
.status-chip.ok { background: var(--md-tertiary-container); color: var(--md-tertiary); }
.status-chip.err { background: var(--md-error-container); color: var(--md-error); }

/* ---- Avatar ---- */
.avatar {
  position: relative;
  width: 88px; height: 88px; flex-shrink: 0; overflow: hidden;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--md-surface-container-high); color: var(--md-on-surface-variant);
  font-size: 30px;
  border: 4px solid var(--card-solid);
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--md-primary) 45%, transparent), var(--shadow-2);
  transition: transform var(--dur-slow) var(--spring), box-shadow var(--dur-med) var(--ease);
}
.avatar:hover { transform: scale(1.06) rotate(-3deg); box-shadow: 0 0 0 3px var(--md-primary), 0 14px 32px -10px var(--glow); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 38px; height: 38px; font-size: 15px; border-width: 2px; }

/* ---- Swatches & option rows (Settings) ---- */
.swatch-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.swatch {
  position: relative; aspect-ratio: 1; min-width: 0; border: 0; padding: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.28), 0 0 0 1px var(--stroke), var(--shadow-1);
  color: #fff; font-size: 14px;
  transition: transform var(--dur-slow) var(--spring-bouncy), box-shadow var(--dur-med) var(--ease), border-radius var(--dur-slow) var(--spring);
}
.swatch .icon { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45)); animation: icon-pop 0.6s var(--spring-bouncy) both; }
.swatch:hover { transform: scale(1.16) rotate(-8deg); border-radius: 38%; }
.swatch:active { transform: scale(0.9); }
.swatch[aria-pressed='true'] { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.4), 0 0 0 3px var(--card-solid), 0 0 0 5.5px var(--md-on-surface); transform: scale(1.04); border-radius: 36%; }
.option-list { display: flex; flex-direction: column; gap: 8px; }
.option-row {
  position: relative; overflow: hidden; isolation: isolate;
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 15px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--stroke);
  background: color-mix(in oklab, var(--md-surface-container) 70%, transparent);
  color: var(--md-on-surface);
  font-size: 14px; font-weight: 650; text-align: left;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-med) var(--spring), box-shadow var(--dur-med) var(--ease);
}
.option-row .row { gap: 12px; }
.option-row:hover { border-color: color-mix(in oklab, var(--md-primary) 40%, var(--stroke)); background: var(--md-surface-container-high); transform: translateX(4px); }
.option-row:active { transform: scale(0.985); }
.option-row.active { border-color: color-mix(in oklab, var(--md-primary) 55%, transparent); background: var(--md-primary-container); color: var(--md-on-primary-container); box-shadow: 0 10px 24px -14px var(--glow); }
.option-row .icon { transition: transform var(--dur-slow) var(--spring-bouncy); }
.option-row.active .icon { animation: icon-pop 0.6s var(--spring-bouncy) both; }
.option-row .chev { opacity: 0.45; transition: transform var(--dur-med) var(--spring), opacity var(--dur-fast) var(--ease); }
.option-row:hover .chev { transform: translateX(5px); opacity: 0.9; }

/* ==========================================================================
   03 — Surfaces
   ========================================================================== */

/* ---- Cards ---- */
.card, .activity-card, .chart-section, .endpoint-card, .kpi, .dash-card, .docs-card, .table-wrap {
  position: relative;
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1), var(--hairline);
}
.card { padding: 26px; margin-bottom: 18px; transition: box-shadow var(--dur-med) var(--ease), border-color var(--dur-med) var(--ease), transform var(--dur-slow) var(--spring); }
.card:last-child { margin-bottom: 0; }
.stat-grid .card, .admin-grid .card { margin-bottom: 0; }
.card-title { font-family: var(--font-display); font-size: 17px; font-weight: 750; letter-spacing: -0.025em; }

/* hover: border picks up the accent (cheap — colour only) */
.card:hover, .kpi:hover, .dash-card:hover, .chart-section:hover, .activity-card:hover, .endpoint-card:hover { border-color: color-mix(in oklab, var(--md-primary) 30%, var(--stroke)); }

button.notification-row, .notification-row {
  width: 100%; text-align: left; display: flex; align-items: center; gap: 16px;
  padding: 16px 20px; margin-bottom: 12px; overflow: hidden; isolation: isolate;
  transition: transform var(--dur-slow) var(--spring), border-color var(--dur-fast) var(--ease), box-shadow var(--dur-med) var(--ease);
}
button.notification-row:hover { transform: translateY(-3px) scale(1.006); box-shadow: var(--shadow-2), var(--hairline); }
button.notification-row:active { transform: scale(0.985); }

/* ---- Skeleton ---- */
.skeleton {
  position: relative; overflow: hidden; isolation: isolate;
  background: color-mix(in oklab, var(--md-on-surface) 8%, transparent); border-radius: var(--radius-sm);
}
.skeleton::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--md-primary) 16%, light-dark(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.07))), transparent);
  animation: skeleton-shimmer 1.6s var(--ease) infinite;
}
@keyframes skeleton-shimmer { 100% { transform: translateX(100%); } }
.skeleton-line { height: 13px; margin-bottom: 10px; border-radius: 8px; }
.skeleton-line.short { width: 40%; } .skeleton-line.medium { width: 65%; } .skeleton-line.long { width: 90%; }
.skeleton-block { border-radius: var(--radius-lg); }
.skeleton-row { display: flex; align-items: center; gap: 16px; }
.skeleton-avatar { width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0; }

/* ---- Empty state ---- */
.empty-state {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 72px 24px; text-align: center; color: var(--md-on-surface-variant);
  border: 2px dashed var(--stroke-strong); border-radius: var(--radius-lg);
  background: color-mix(in oklab, var(--card) 60%, transparent);
}
.empty-state > .icon {
  width: 72px; height: 72px; display: grid; place-items: center; margin-bottom: 8px;
  clip-path: var(--shape-cookie); font-size: 26px;
  background: var(--md-primary-container); color: var(--md-on-primary-container);
  
}
.empty-state p { font-size: 14.5px; max-width: 40ch; }
@keyframes float-y { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes shape-cycle {
  0%, 100% { clip-path: var(--shape-cookie); } 33% { clip-path: var(--shape-flower); } 66% { clip-path: var(--shape-clover); }
}

/* ---- Status ---- */
.status-card { display: flex; align-items: center; gap: 14px; }
.status-dot {
  position: relative; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
  background: var(--md-success);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--md-success) 24%, transparent);
}
.status-dot:not(.is-down):not(.is-checking)::after, .lp-badge .dot:not(.down)::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--md-success); opacity: 0;
  animation: pulse-ring 2.2s var(--ease-out) infinite;
}
@keyframes pulse-ring { 0% { transform: scale(0.5); opacity: 0.8; } 80%, 100% { transform: scale(2); opacity: 0; } }
.status-dot.is-down { background: var(--md-error); box-shadow: 0 0 0 4px color-mix(in oklab, var(--md-error) 24%, transparent); }
.status-dot.is-checking { background: var(--md-warning); box-shadow: 0 0 0 4px color-mix(in oklab, var(--md-warning) 24%, transparent); animation: blink-soft 1.2s ease-in-out infinite; }
@keyframes blink-soft { 50% { opacity: 0.4; } }
.status-text-label { font-size: 12px; color: var(--md-on-surface-variant); }
.status-text-value { font-weight: 700; font-size: 15px; }
.status-pill {
  display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 18px 0 16px;
  border-radius: var(--radius-full);
  border: 1px solid color-mix(in oklab, var(--md-success) 32%, var(--stroke));
  background: color-mix(in oklab, var(--md-success) 8%, var(--glass-strong));
  box-shadow: var(--shadow-1), var(--hairline);
  font-size: 13px; font-weight: 650;
  transition: transform var(--dur-med) var(--spring);
}
.status-pill:hover { transform: scale(1.05); }

/* ---- Legacy stat cards ---- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card { display: flex; align-items: center; gap: 14px; }
.stat-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: var(--radius-md); background: var(--md-primary-container); color: var(--md-on-primary-container); flex-shrink: 0; }
.stat-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat-value { font-family: var(--font-display); font-size: 24px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
.stat-label { font-size: 12.5px; color: var(--md-on-surface-variant); }
.stat-value-ip { font-size: 18px; overflow-wrap: anywhere; }

/* ==========================================================================
   Dashboard
   ========================================================================== */
.dash { max-width: 1240px; }
.dash-head {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 38px 40px; margin-bottom: 20px;
  border-radius: var(--radius-xl);
  border: 1px solid color-mix(in oklab, var(--md-primary) 28%, var(--stroke));
  background:
    linear-gradient(135deg, color-mix(in oklab, var(--md-primary) 22%, var(--card-solid)) 0%, color-mix(in oklab, var(--md-secondary) 16%, var(--card-solid)) 100%);
  box-shadow: var(--shadow-2), var(--hairline);
}
.dash-head::before, .dash-head::after {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  background: var(--accent-bg);
}
.dash-head::before { width: 280px; height: 280px; right: -70px; top: -110px; opacity: 0.3; clip-path: var(--shape-flower); }
.dash-head::after { width: 190px; height: 190px; right: 150px; bottom: -110px; opacity: 0.16; clip-path: var(--shape-clover); }
@keyframes shape-morph {
  0% { clip-path: var(--shape-cookie); transform: rotate(0deg); }
  25% { clip-path: var(--shape-flower); }
  50% { clip-path: var(--shape-clover); transform: rotate(180deg); }
  75% { clip-path: var(--shape-squircle); }
  100% { clip-path: var(--shape-cookie); transform: rotate(360deg); }
}
.dash-title { font-size: clamp(28px, 3.6vw, 42px); font-weight: 800; letter-spacing: -0.045em; line-height: 1.08; }
.dash-title [data-greeting-name] { background: var(--accent-bg); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.dash-sub { margin-top: 10px; font-size: 15px; color: var(--md-on-surface-variant); max-width: 52ch; }
.dash-head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.kpi {
  overflow: hidden; min-width: 0; padding: 22px 24px;
  transition: transform var(--dur-slow) var(--spring), box-shadow var(--dur-med) var(--ease), border-color var(--dur-med) var(--ease);
}
.kpi > .kpi-top, .kpi > .kpi-value, .kpi > .kpi-foot { position: relative; z-index: 1; }
.kpi::before {
  content: ''; position: absolute; right: -50px; top: -50px; width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--ic, var(--md-primary)) 26%, transparent), transparent);
  opacity: 0.55; transition: opacity var(--dur-med) var(--ease), transform var(--dur-slow) var(--spring); pointer-events: none;
}
.kpi:hover { transform: translateY(-5px); box-shadow: var(--shadow-2), var(--hairline); }
.kpi:hover::before { opacity: 1; transform: scale(1.4); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.kpi-label { font-size: 13.5px; font-weight: 650; color: var(--md-on-surface-variant); }
.kpi-ic {
  width: 44px; height: 44px; display: grid; place-items: center;
  clip-path: var(--shape-cookie);
  color: var(--ic, var(--md-primary));
  background: color-mix(in oklab, var(--ic, var(--md-primary)) 18%, transparent);
  transition: clip-path var(--dur-xslow) var(--spring), transform var(--dur-xslow) var(--spring);
}
.kpi:hover .kpi-ic { clip-path: var(--shape-flower); transform: rotate(24deg) scale(1.1); }
.kpi:hover .kpi-ic .icon { animation: icon-counter 0.8s var(--spring) both; }
.kpi-ic .icon { font-size: 17px; }
.c-blue { --ic: #4C6BFF; } .c-emerald { --ic: #12B886; } .c-violet { --ic: #8B5CF6; }
.c-amber { --ic: #F59F00; } .c-rose { --ic: #F43F7F; } .c-sky { --ic: #1BA8F0; }
.kpi-value { font-family: var(--font-display); font-size: 38px; font-weight: 800; letter-spacing: -0.05em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.kpi-value-ip, .kpi-value.kpi-value-ip { font-family: var(--font-mono); font-size: 16px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.45; overflow-wrap: anywhere; padding-top: 8px; }
.kpi-foot { margin-top: 8px; font-size: 12.5px; color: var(--md-on-surface-variant); }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.dash-card { padding: 26px; display: flex; flex-direction: column; min-width: 0; }
.dash-card-title { font-family: var(--font-display); font-size: 17px; font-weight: 750; letter-spacing: -0.03em; }
.dash-card-sub { margin-top: 5px; font-size: 13px; color: var(--md-on-surface-variant); }

/* ---- Live chart ---- */
.chart-section { padding: 26px; }
.dash-chart { min-width: 0; overflow: hidden; margin: 0; }
.chart-header { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 18px; }
.chart-readout { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.chart-value { display: block; font-family: var(--font-display); font-size: 32px; font-weight: 800; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; line-height: 1; }
.chart-trend { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: var(--radius-full); font-size: 12px; font-weight: 700; }
.chart-trend:empty { display: none; }
.chart-trend.up { color: var(--md-tertiary); background: var(--md-tertiary-container); }
.chart-trend.down { color: var(--md-error); background: var(--md-error-container); }
.chart-trend.flat { color: var(--md-on-surface-variant); background: var(--md-surface-container-high); }
.live-chart { position: relative; height: 230px; border-radius: var(--radius-md); }
.live-chart svg { width: 100%; height: 100%; overflow: visible; }
.chart-point { fill: var(--md-primary); stroke: var(--card-solid); stroke-width: 2; cursor: pointer; transition: r var(--dur-med) var(--spring-bouncy), fill var(--dur-fast) var(--ease); }
.chart-point:hover, .chart-point:focus-visible { r: 7; outline: none; }
.chart-point.active { fill: var(--md-on-surface); r: 7; }
.chart-segment { stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.chart-segment-up { stroke: var(--md-tertiary); }
.chart-segment-down { stroke: var(--md-error); }
.chart-segment-flat { stroke: color-mix(in oklab, var(--md-primary) 70%, var(--md-outline)); }
.chart-point-up { fill: var(--md-tertiary); }
.chart-point-down { fill: var(--md-error); }
.chart-point-flat { fill: var(--md-primary); stroke: var(--card-solid); }
.live-chart:not(.drawn) .chart-segment { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw-line 1.5s var(--ease-out) forwards; animation-delay: calc(var(--seg, 0) * 10ms); }
.live-chart:not(.drawn) [data-chart-area] { animation: fade-in 1.4s 0.35s var(--ease) both; }
.live-chart:not(.drawn) .chart-point { opacity: 0; animation: point-in 0.6s var(--spring-bouncy) forwards; animation-delay: calc(var(--pt, 0) * 14ms + 0.9s); transform-box: fill-box; transform-origin: center; }
@keyframes draw-line { to { stroke-dashoffset: 0; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes point-in { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: none; } }
.live-chart-axis { display: flex; justify-content: space-between; gap: 4px; margin-top: 10px; padding: 0 2px; }
.live-chart-axis span { font-family: var(--font-mono); font-size: 10.5px; color: var(--md-on-surface-variant); white-space: nowrap; }
.chart-popup {
  position: absolute; z-index: 20; min-width: 138px; padding: 11px 14px;
  border-radius: var(--radius-md); border: 1px solid var(--stroke-strong);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  box-shadow: var(--shadow-3);
  font-size: 12.5px; line-height: 1.5; pointer-events: none; opacity: 0;
  transform: translate(-50%, -100%) translateY(-4px) scale(0.7); transform-origin: 50% 100%;
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-med) var(--spring-bouncy);
}
.chart-popup.visible { opacity: 1; transform: translate(-50%, -100%) translateY(-14px) scale(1); }
.chart-popup-time { display: block; font-weight: 700; margin-bottom: 2px; }
.chart-popup-value { display: block; font-family: var(--font-mono); color: var(--md-primary); font-weight: 700; }
.live-chart-empty {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: var(--md-on-surface-variant); font-size: 13px;
}
.live-chart-empty .icon { color: var(--md-primary); opacity: 0.8; }
@keyframes wave-pulse { 0%, 100% { transform: scaleY(0.7); opacity: 0.5; } 50% { transform: scaleY(1.25); opacity: 1; } }
.live-chart.has-data .live-chart-empty { display: none; }

/* ---- Quick start ---- */
.quick { gap: 0; }
.quick-label { margin: 20px 0 8px; font-size: 11.5px; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; color: var(--md-on-surface-variant); }
.quick-copy {
  display: flex; align-items: center; gap: 4px; min-width: 0;
  padding: 5px 5px 5px 16px;
  border-radius: var(--radius-md);
  background: var(--code-bg); border: 1px solid var(--code-border);
}
.quick-copy code { flex: 1; min-width: 0; padding: 0; border: 0; background: none; color: var(--code-fg); font-size: 12.5px; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.quick-copy code::-webkit-scrollbar { display: none; }
.quick-copy .icon-button { width: 36px; height: 36px; min-width: 36px; color: var(--code-muted); }
.quick-copy .icon-button:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.quick-links { margin-top: auto; padding-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.quick-link {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border-radius: var(--radius-md); border: 1px solid var(--stroke); background: color-mix(in oklab, var(--md-surface-container) 75%, transparent);
  font-size: 13.5px; font-weight: 650;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform var(--dur-med) var(--spring);
}
.quick-link .icon:first-child { color: var(--md-primary); }
.quick-link .icon:last-child { margin-left: auto; color: var(--md-on-surface-variant); transition: transform var(--dur-med) var(--spring), color var(--dur-fast) var(--ease); }
.quick-link:hover { border-color: color-mix(in oklab, var(--md-primary) 40%, var(--stroke)); background: var(--md-primary-container); transform: translateX(4px); }
.quick-link:hover .icon:last-child { transform: translateX(5px); color: var(--md-primary); }
.quick-link:active { transform: scale(0.98); }

/* ---- Activity ---- */
.activity-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.activity-card { padding: 24px 26px; }
.activity-header { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.activity-icon { width: 42px; height: 42px; min-width: 42px; display: grid; place-items: center; border-radius: 14px; font-size: 16px; }
.activity-icon.success { color: var(--md-tertiary); background: var(--md-tertiary-container); }
.activity-icon.error { color: var(--md-error); background: var(--md-error-container); }
.activity-title { font-family: var(--font-display); font-size: 16px; font-weight: 750; letter-spacing: -0.025em; }
.activity-subtitle { margin: 2px 0 0; font-size: 12.5px; color: var(--md-on-surface-variant); }
.activity-list { display: flex; flex-direction: column; gap: 8px; }
.activity-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-radius: var(--radius-md);
  background: color-mix(in oklab, var(--md-surface-container) 75%, transparent); border: 1px solid var(--stroke);
  transition: border-color var(--dur-fast) var(--ease), transform var(--dur-med) var(--spring), background var(--dur-fast) var(--ease);
}
.activity-row:hover { border-color: color-mix(in oklab, var(--md-primary) 38%, var(--stroke)); transform: translateX(4px); background: var(--md-surface-container-high); }
.activity-endpoint { font-family: var(--font-mono); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-count { flex-shrink: 0; padding: 3px 11px; border-radius: var(--radius-full); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--md-surface-container-highest); color: var(--md-on-surface-variant); }
.activity-empty { padding: 24px 14px; text-align: center; font-size: 13px; color: var(--md-on-surface-variant); border-radius: var(--radius-md); border: 2px dashed var(--stroke-strong); }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; padding: 0; }
.data-table, .param-table { width: 100%; font-size: 13.5px; border-collapse: separate; border-spacing: 0; }
.data-table th, .param-table th {
  padding: 14px 18px; text-align: left; white-space: nowrap;
  font-size: 11px; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--md-on-surface-variant);
  background: color-mix(in oklab, var(--md-on-surface) 4%, transparent);
  border-bottom: 1px solid var(--stroke);
}
.data-table td, .param-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--stroke); }
.data-table td { white-space: nowrap; }
.data-table tbody tr, .param-table tbody tr { transition: background var(--dur-fast) var(--ease); }
.data-table tbody tr:hover, .param-table tbody tr:hover { background: color-mix(in oklab, var(--md-primary) 7%, transparent); }
.data-table tbody tr:last-child td, .param-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { animation: row-in var(--dur-slow) var(--spring) both; }
.data-table tbody tr:nth-child(2) { animation-delay: 30ms; } .data-table tbody tr:nth-child(3) { animation-delay: 60ms; }
.data-table tbody tr:nth-child(4) { animation-delay: 90ms; } .data-table tbody tr:nth-child(5) { animation-delay: 120ms; }
.data-table tbody tr:nth-child(n+6) { animation-delay: 150ms; }
@keyframes row-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.param-table td:first-child { font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; width: 38%; }
.param-table.kv td:first-child { font-family: var(--font-body); font-size: 13.5px; font-weight: 600; color: var(--md-on-surface-variant); }
.param-table.kv { border: 1px solid var(--stroke); border-radius: var(--radius-md); overflow: hidden; }
.data-table td[colspan] { text-align: center; padding: 40px; color: var(--md-on-surface-variant); }

/* ---- Code ---- */
.code-block {
  position: relative;
  border-radius: var(--radius-md);
  background: var(--code-bg); border: 1px solid var(--code-border);
  color: var(--code-fg);
  font-family: var(--font-mono); font-size: 12.8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), var(--shadow-1);
}
.code-block-scroll { margin: 0; padding: 18px 56px 18px 20px; overflow-x: auto; white-space: pre; line-height: 1.75; color: var(--code-fg); font-family: var(--font-mono); }
pre.code-block-scroll[data-try-response-text] { white-space: pre-wrap; word-break: break-word; overflow-x: hidden; overflow-y: auto; max-height: 60vh; }
.code-block .icon-button { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; min-width: 36px; color: var(--code-muted); }
.code-block .icon-button:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.modal-body .code-block { margin: 0; }

.key-display {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  padding: 11px 11px 11px 18px;
  border-radius: var(--radius-md); border: 1px solid var(--stroke);
  background: color-mix(in oklab, var(--md-surface-container) 80%, transparent);
  font-family: var(--font-mono); font-size: 13px; overflow-x: auto;
  transition: border-color var(--dur-fast) var(--ease);
}
.key-display:hover { border-color: color-mix(in oklab, var(--md-primary) 40%, var(--stroke)); }
.key-display > span:first-child { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.key-display + .key-display { margin-top: 8px; }
.backup-codes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; font-family: var(--font-mono); font-size: 14px; }
.backup-codes-grid span { padding: 11px; text-align: center; border-radius: var(--radius-sm); background: var(--md-surface-container-high); border: 1px solid var(--stroke); letter-spacing: 0.05em; }
.twofa-qr { display: flex; justify-content: center; width: fit-content; margin: 0 auto; padding: 18px; border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-2); }

.docs-section-title { margin: 24px 0 12px; font-size: 11.5px; font-weight: 750; letter-spacing: 0.12em; text-transform: uppercase; color: var(--md-on-surface-variant); }
.docs-section-title:first-child { margin-top: 0; }

/* ==========================================================================
   04 — Overlays
   ========================================================================== */

/* ---- Modal ---- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1300;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(8, 10, 28, 0);
  -webkit-backdrop-filter: blur(0px); backdrop-filter: blur(0px);
  transition: background var(--dur-med) var(--ease), backdrop-filter var(--dur-med) var(--ease), -webkit-backdrop-filter var(--dur-med) var(--ease);
}
.modal-overlay.visible {
  background: rgba(8, 10, 28, 0.5);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
}
.modal-overlay .modal {
  position: relative;
  width: 100%; max-width: 480px; max-height: 86vh;
  display: flex; flex-direction: column;
  border-radius: var(--radius-xl);
  border: 1px solid var(--stroke-strong);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  box-shadow: var(--shadow-3), var(--hairline);
  opacity: 0; transform: translateY(36px) scale(0.88);
  transition: transform var(--dur-med) var(--ease-in), opacity var(--dur-fast) var(--ease-in);
  overflow: hidden;
}
.modal-overlay.visible .modal { opacity: 1; transform: none; transition: transform var(--dur-slow) var(--spring), opacity var(--dur-med) var(--ease-out); }
.modal-overlay .modal::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 120px; pointer-events: none;
  background: radial-gradient(60% 100% at 50% 0%, color-mix(in oklab, var(--md-primary) 16%, transparent), transparent);
}
.modal-header { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 22px 6px 28px; flex-shrink: 0; }
.modal-header-info h3 { font-size: 20px; font-weight: 800; letter-spacing: -0.035em; }
.modal-body { position: relative; padding: 12px 28px 10px; overflow-y: auto; font-size: 14px; }
.modal-footer { position: relative; display: flex; justify-content: flex-end; gap: 10px; padding: 18px 28px 26px; flex-shrink: 0; }
.modal-footer:empty { display: none; }
.modal-footer > .btn:only-child { flex: 1; }
.modal-overlay.visible .modal-footer > .btn { animation: rise-in var(--dur-slow) var(--spring) both; animation-delay: 140ms; }
.modal-overlay.visible .modal-footer > .btn:nth-child(2) { animation-delay: 200ms; }

/* ---- Toast ---- */
.toast-container {
  position: fixed; top: 22px; right: 22px; z-index: 1500;
  display: flex; flex-direction: column; gap: 12px;
  width: min(392px, calc(100vw - 44px)); pointer-events: none;
}
.toast {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 13px;
  padding: 14px 14px 16px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--stroke-strong);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  box-shadow: var(--shadow-3), var(--hairline);
  font-size: 13.5px; font-weight: 600;
  opacity: 0; transform: translateX(60px) scale(0.86); transform-origin: right center; pointer-events: auto;
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-med) var(--ease-in);
}
.toast.visible { opacity: 1; transform: none; transition: opacity var(--dur-med) var(--ease-out), transform var(--dur-slow) var(--spring-bouncy); }
.toast.leaving { opacity: 0; transform: translateX(40px) scale(0.92); transition: opacity var(--dur-fast) var(--ease-in), transform var(--dur-med) var(--ease-in); }
.toast::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--md-tertiary); transform-origin: left center;
  animation: toast-progress 3.2s linear forwards;
}
.toast:hover::after { animation-play-state: paused; }
@keyframes toast-progress { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.toast > .icon {
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 11px;
  background: var(--md-tertiary-container); color: var(--md-tertiary); font-size: 13px;
  animation: icon-pop 0.7s var(--spring-bouncy) 0.1s both;
}
.toast .fa-triangle-exclamation, .toast .fa-xmark-circle, .toast .fa-circle-exclamation, .toast .fa-circle-xmark { background: var(--md-error-container); color: var(--md-error); }
.toast:has(.fa-triangle-exclamation, .fa-xmark-circle, .fa-circle-exclamation, .fa-circle-xmark)::after { background: var(--md-error); }
.toast .fa-key, .toast .fa-circle-info { background: var(--md-primary-container); color: var(--md-primary); }
.toast:has(.fa-key, .fa-circle-info)::after { background: var(--md-primary); }
.toast span { flex: 1; line-height: 1.4; }
.toast-close { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 50%; background: none; color: var(--md-on-surface-variant); transition: background var(--dur-fast) var(--ease), transform var(--dur-med) var(--spring); }
.toast-close:hover { background: color-mix(in oklab, var(--md-on-surface) 10%, transparent); color: var(--md-on-surface); transform: rotate(90deg); }

/* ---- Full-screen Try API result ---- */
.try-fullscreen {
  position: fixed; inset: 0; z-index: 1400;
  display: flex; flex-direction: column;
  background: var(--md-surface);
  opacity: 0; transform: translateY(8%) scale(0.98);
  transition: opacity var(--dur-fast) var(--ease-in), transform var(--dur-med) var(--ease-in);
}
.try-fullscreen::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 40% at 20% 0%, color-mix(in oklab, var(--md-primary) 20%, transparent), transparent 70%),
    radial-gradient(50% 40% at 90% 0%, color-mix(in oklab, var(--md-secondary) 16%, transparent), transparent 70%);
}
.try-fullscreen.visible { opacity: 1; transform: none; transition: opacity var(--dur-med) var(--ease-out), transform var(--dur-slow) var(--spring); }
.try-fs-header {
  display: flex; align-items: center; gap: 12px; flex-shrink: 0;
  padding: calc(14px + env(safe-area-inset-top, 0px)) clamp(16px, 4vw, 40px) 14px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--stroke);
}
.try-fs-header .icon-button { border: 1px solid var(--stroke-strong); background: var(--glass-strong); border-radius: 50%; }
.try-fs-header-info { flex: 1; min-width: 0; }
.try-fs-header-info h2 { font-size: 18px; font-weight: 800; letter-spacing: -0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.try-result-meta { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 12px; color: var(--md-on-surface-variant); }
.try-fs-body { flex: 1; overflow-y: auto; width: 100%; max-width: 920px; margin: 0 auto; padding: 26px clamp(16px, 4vw, 40px) calc(56px + env(safe-area-inset-bottom, 0px)); }
.try-fs-body > * { animation: rise-in var(--dur-slow) var(--spring) both; }
.try-fs-body > :nth-child(2) { animation-delay: 40ms; } .try-fs-body > :nth-child(3) { animation-delay: 80ms; }
.try-fs-body > :nth-child(4) { animation-delay: 120ms; } .try-fs-body > :nth-child(5) { animation-delay: 160ms; }
.try-fs-body > :nth-child(n+6) { animation-delay: 200ms; }
.try-panel { margin-top: 24px; padding-top: 22px; border-top: 2px dashed var(--stroke-strong); }
.try-panel > .btn { width: 100%; }
.try-result { display: none; margin-top: 12px; }
.try-result.visible { display: block; }

/* ==========================================================================
   05 — Pages
   ========================================================================== */

/* ---- Docs ---- */
.docs-card { margin-bottom: 12px; overflow: hidden; transition: border-color var(--dur-med) var(--ease), box-shadow var(--dur-med) var(--ease), transform var(--dur-slow) var(--spring); }
.docs-card:hover { border-color: color-mix(in oklab, var(--md-primary) 32%, var(--stroke)); }
.docs-card.expanded { border-color: color-mix(in oklab, var(--md-primary) 50%, var(--stroke)); box-shadow: var(--shadow-2), var(--hairline); }
.docs-card-head {
  position: relative; overflow: hidden; isolation: isolate;
  width: 100%; display: flex; align-items: center; gap: 14px;
  padding: 17px 22px; border: 0; background: transparent; text-align: left; color: inherit;
  transition: background var(--dur-fast) var(--ease), transform var(--dur-med) var(--spring);
}
.docs-card-head:hover { background: color-mix(in oklab, var(--md-primary) 6%, transparent); }
.docs-card-head:active { transform: scale(0.992); }
.docs-card-head h3 { flex: 1; min-width: 0; font-family: var(--font-display); font-size: 16px; font-weight: 700; letter-spacing: -0.025em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.category-icon {
  width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 12px; font-size: 12.5px;
  background: var(--md-surface-container-high); color: var(--md-on-surface-variant);
  transition: clip-path var(--dur-slow) var(--spring), background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-slow) var(--spring);
}
.docs-card.expanded .category-icon { background: var(--md-primary-container); color: var(--md-on-primary-container); }
.docs-card-chevron { color: var(--md-on-surface-variant); transition: transform var(--dur-slow) var(--spring), color var(--dur-fast) var(--ease); }
.docs-card.expanded .docs-card-chevron { transform: rotate(180deg); color: var(--md-primary); }

/* Smooth accordion: 0fr → 1fr grid row animates the real content height */
.docs-card-body {
  display: grid; grid-template-rows: 0fr; visibility: hidden;
  transition: grid-template-rows var(--dur-slow) var(--spring-soft), visibility 0s linear var(--dur-slow);
}
.docs-card.expanded .docs-card-body { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows 0.7s var(--spring-soft), visibility 0s; }
.docs-card-body-inner { overflow: hidden; min-height: 0; }
.docs-card-body-pad {
  padding: 6px 26px 28px; border-top: 1px solid var(--stroke);
  background: color-mix(in oklab, var(--md-surface-container) 50%, transparent);
  opacity: 0; transform: translateY(-10px);
  transition: opacity var(--dur-med) var(--ease), transform var(--dur-slow) var(--spring);
}
.docs-card.expanded .docs-card-body-pad { opacity: 1; transform: none; transition-delay: 90ms; }
.docs-card-body-pad > .endpoint-desc { padding-top: 20px; }
.docs-card-body .param-table { border: 1px solid var(--stroke); border-radius: var(--radius-md); overflow: hidden; background: var(--card-solid); }
.endpoint-desc { font-size: 14px; line-height: 1.65; color: var(--md-on-surface-variant); }
.endpoint-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.endpoint-card { padding: 22px; display: flex; flex-direction: column; gap: 12px; transition: transform var(--dur-slow) var(--spring), box-shadow var(--dur-med) var(--ease); }
.endpoint-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2), var(--hairline); }
.endpoint-top { display: flex; align-items: center; gap: 8px; }
.endpoint-name { font-size: 16px; font-weight: 700; }
.endpoint-path { padding: 10px 14px; border-radius: var(--radius-sm); overflow-x: auto; white-space: nowrap; font-family: var(--font-mono); font-size: 12.5px; color: var(--md-on-surface-variant); background: var(--md-surface-container-high); }
.endpoint-actions { display: flex; gap: 8px; }

/* ---- Notifications ---- */
.notif-icon {
  width: 54px; height: 54px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 18px;
  background: var(--md-primary-container); color: var(--md-on-primary-container); font-size: 19px;
}
.notif-thumb { width: 54px; height: 54px; border-radius: var(--radius-md); object-fit: cover; flex-shrink: 0; }

/* ---- Auth (login / register) ---- */
.auth-wrap { min-height: 100dvh; display: block; }
.auth-split { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); }
.auth-visual {
  position: relative; overflow: hidden; isolation: isolate; color: #fff;
  padding: 36px 26px 64px; text-align: left;
  background:
    radial-gradient(60% 80% at 100% 0%, rgba(255, 105, 180, 0.55), transparent 65%),
    radial-gradient(60% 70% at 0% 100%, rgba(34, 211, 238, 0.45), transparent 65%),
    linear-gradient(145deg, #1A2BC9 0%, #4A2BE0 48%, #8A2BE2 100%);
}
.auth-visual::before, .auth-visual::after {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  background: rgba(255, 255, 255, 0.14);
}
.auth-visual::before { width: 340px; height: 340px; right: -110px; top: -120px; clip-path: var(--shape-flower); }
.auth-visual::after { width: 260px; height: 260px; left: -90px; bottom: -110px; background: rgba(255, 255, 255, 0.1); clip-path: var(--shape-clover); }
.auth-visual-content { position: relative; display: flex; flex-direction: column; gap: 6px; max-width: 480px; }
.auth-visual-mark {
  width: 52px; height: 52px; margin-bottom: 16px; display: grid; place-items: center; font-size: 22px;
  clip-path: var(--shape-cookie); color: #fff;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
  overflow: hidden;
  transition: clip-path var(--dur-slow) var(--spring), transform var(--dur-slow) var(--spring);
}
.auth-visual-mark:hover { clip-path: var(--shape-flower); transform: rotate(20deg) scale(1.08); }
.auth-visual-mark img { width: 100%; height: 100%; object-fit: cover; }
.auth-visual h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.045em; }
.auth-visual p { font-size: 14.5px; opacity: 0.88; }
.auth-visual-headline { display: none; }
.auth-visual-features, .auth-visual-card { display: none; }
.auth-card {
  position: relative; width: 100%; display: flex; flex-direction: column; justify-content: center; align-items: stretch;
  margin-top: -32px; padding: 40px 24px 52px;
  border-radius: 34px 34px 0 0;
  background: var(--md-surface);
  box-shadow: 0 -20px 50px -24px rgba(20, 20, 80, 0.4);
}
.auth-card > * { width: 100%; max-width: 420px; margin-left: auto; margin-right: auto; }
.auth-title { font-size: 32px; font-weight: 800; letter-spacing: -0.045em; line-height: 1.1; }
.auth-subtitle { margin: 10px auto 28px; font-size: 14.5px; color: var(--md-on-surface-variant); }
.auth-switch { margin-top: 26px; text-align: center; font-size: 14px; color: var(--md-on-surface-variant); }
.auth-switch a { color: var(--md-primary); font-weight: 700; background-image: linear-gradient(currentColor, currentColor); background-repeat: no-repeat; background-position: 0 100%; background-size: 0 2px; transition: background-size var(--dur-med) var(--ease-out); }
.auth-switch a:hover { background-size: 100% 2px; }
.auth-card .form-error { margin-bottom: 14px; }
.auth-secure { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 22px; font-size: 12px; color: var(--md-on-surface-variant); }

@media (min-width: 960px) {
  .auth-split { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); padding: 14px; gap: 14px; }
  .auth-visual {
    position: sticky; top: 14px; height: calc(100dvh - 28px); padding: 56px clamp(40px, 5vw, 80px);
    display: flex; align-items: center; border-radius: var(--radius-xl);
    box-shadow: var(--shadow-3);
  }
  .auth-visual-content { gap: 0; max-width: 520px; }
  .auth-visual-mark { width: 68px; height: 68px; font-size: 28px; margin-bottom: 30px; }
  .auth-visual h2 { font-size: 46px; line-height: 1.03; letter-spacing: -0.055em; margin-bottom: 14px; }
  .auth-visual p { font-size: 17px; line-height: 1.55; max-width: 38ch; }
  .auth-visual-features { display: flex; flex-direction: column; gap: 12px; margin: 38px 0 0; padding: 0; list-style: none; }
  .auth-visual-features li {
    display: flex; align-items: center; gap: 14px; width: fit-content; padding: 8px 20px 8px 8px;
    font-size: 14.5px; font-weight: 600; border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.2);
    
    animation: rise-in var(--dur-slow) var(--spring) both;
    transition: transform var(--dur-med) var(--spring), background var(--dur-fast) var(--ease);
  }
  .auth-visual-features li:nth-child(1) { animation-delay: 350ms; } .auth-visual-features li:nth-child(2) { animation-delay: 440ms; } .auth-visual-features li:nth-child(3) { animation-delay: 530ms; }
  .auth-visual-features li:hover { transform: translateX(8px); background: rgba(255, 255, 255, 0.2); }
  .auth-visual-features .icon {
    width: 34px; height: 34px; display: grid; place-items: center; font-size: 13px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
  }
  .auth-visual-card {
    display: block; margin-top: 38px; padding: 18px 20px; border-radius: var(--radius-lg);
    background: rgba(8, 10, 40, 0.42); border: 1px solid rgba(255, 255, 255, 0.2);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    font-family: var(--font-mono); font-size: 12.5px; line-height: 1.8; color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 28px 56px -18px rgba(0, 0, 0, 0.5);
  }
  .auth-visual-card .ok { color: #7EF0C0; } .auth-visual-card .dim { color: rgba(255, 255, 255, 0.55); }
  .auth-card { margin-top: 0; border-radius: var(--radius-xl); padding: 56px clamp(32px, 5vw, 88px); min-height: calc(100dvh - 28px); background: transparent; box-shadow: none; }
}

/* ---- Profile ---- */
.profile-header {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: flex-end; gap: 22px; flex-wrap: wrap;
  padding: 124px 32px 28px; margin-bottom: 18px;
}
.profile-header::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 112px; z-index: -1;
  background:
    radial-gradient(40% 120% at 90% 0%, rgba(255, 255, 255, 0.4), transparent 70%),
    var(--accent-bg);
}
.profile-header::after { opacity: 0 !important; }
@keyframes banner-flow { to { background-position: 0 0, 100% 100%; } }
.profile-header .avatar { width: 100px; height: 100px; margin-top: -54px; position: relative; z-index: 1; font-size: 34px; }
.profile-meta { flex: 1; min-width: 200px; padding-bottom: 2px; }
.profile-meta h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.045em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-meta p { margin-top: 2px; font-size: 14px; color: var(--md-on-surface-variant); }
.profile-meta #bio-line { color: var(--md-on-surface); margin-top: 10px; max-width: 60ch; }
.profile-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.profile-badges:empty { display: none; }
.profile-header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; align-self: flex-start; margin-top: -106px; position: relative; z-index: 1; }
.profile-header-actions .icon-button { background: rgba(255, 255, 255, 0.24); color: #fff; border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 50%;  }
.profile-header-actions .icon-button:hover { background: rgba(255, 255, 255, 0.4); color: #fff; }
.profile-cards { display: grid; gap: 18px; }
.profile-cards > .card { margin: 0 !important; }
.profile-sep { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--stroke); }
.card .section-title + .section-desc { margin-top: 6px; }

/* ---- Admin ---- */
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.admin-section { margin: 44px 0 20px; }
.admin-section:first-child { margin-top: 0; }
.admin-stack { display: grid; gap: 18px; margin-bottom: 18px; }
.admin-stack > .card { margin: 0 !important; }
.admin-note {
  display: flex; align-items: flex-start; gap: 10px; padding: 13px 16px; margin-bottom: 14px;
  border-radius: var(--radius-md); background: var(--md-surface-container); border: 1px solid var(--stroke);
  font-size: 13px; color: var(--md-on-surface-variant);
}
.admin-access { display: flex; flex-direction: column; align-items: center; }

/* ---- Settings ---- */
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.settings-grid > .card { margin: 0; }
.settings-grid .span-2 { grid-column: 1 / -1; }
.settings-label { font-size: 11.5px; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; color: var(--md-on-surface-variant); margin-bottom: 14px; }

/* ==========================================================================
   Landing page
   ========================================================================== */
.lp-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 32px); }
.lp-nav { position: sticky; top: 12px; z-index: 100; padding: 0 12px; }
.lp-nav .lp-nav-inner {
  height: 66px; max-width: 1200px; padding: 0 12px 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-radius: min(var(--radius-full), 33px);
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-2), var(--hairline);
  transition: box-shadow var(--dur-med) var(--ease), background var(--dur-med) var(--ease);
}
body.is-scrolled .lp-nav .lp-nav-inner { box-shadow: var(--shadow-3), var(--hairline); background: var(--glass-strong); }
.lp-nav .brand { padding: 0; }
.lp-links { display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: var(--radius-full); background: color-mix(in oklab, var(--md-on-surface) 5%, transparent); }
.lp-link { position: relative; overflow: hidden; padding: 9px 18px; border-radius: var(--radius-full); font-size: 14px; font-weight: 600; color: var(--md-on-surface-variant); transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-med) var(--spring); }
.lp-link:hover { background: var(--card-solid); color: var(--md-on-surface); box-shadow: var(--shadow-1); transform: translateY(-1px); }
.lp-actions { display: flex; align-items: center; gap: 8px; }

.lp-hero { position: relative; padding: 76px 0 56px; isolation: isolate; }
.lp-hero::before { content: ''; position: absolute; inset: -40px -10% 0; z-index: -1; pointer-events: none;
  background: radial-gradient(40% 55% at 8% 20%, color-mix(in oklab, var(--md-primary) 34%, transparent), transparent 70%),
              radial-gradient(38% 50% at 92% 30%, color-mix(in oklab, var(--md-secondary) 30%, transparent), transparent 70%); }
.lp-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.lp-badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px 8px 14px;
  border-radius: var(--radius-full);
  border: 1px solid color-mix(in oklab, var(--md-primary) 30%, var(--stroke));
  background: var(--glass-strong);
  
  box-shadow: var(--shadow-1), var(--hairline);
  font-size: 13px; font-weight: 650; color: var(--md-on-surface-variant);
}
.lp-badge .dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--md-success); box-shadow: 0 0 0 4px color-mix(in oklab, var(--md-success) 25%, transparent); }
.lp-badge .dot.down { background: var(--md-error); box-shadow: 0 0 0 4px color-mix(in oklab, var(--md-error) 25%, transparent); }
.lp-title { max-width: 13ch; margin: 24px 0 20px; font-size: clamp(44px, 7.2vw, 88px); font-weight: 800; line-height: 1; letter-spacing: -0.06em; text-wrap: balance; }
.lp-sub { max-width: 50ch; margin: 0 0 34px; font-size: clamp(16px, 1.8vw, 19px); line-height: 1.65; color: var(--md-on-surface-variant); text-wrap: pretty; }
.lp-cta { display: flex; justify-content: flex-start; gap: 12px; flex-wrap: wrap; }
.lp-cta .btn { height: 54px; padding: 0 30px; font-size: 15.5px; border-radius: min(var(--radius-full), 27px); }
.lp-cta .btn:active { border-radius: min(var(--radius-full), 16px); }

.lp-code {
  position: relative; max-width: none; margin: 0; text-align: left;
  border-radius: var(--radius-xl); overflow: hidden;
  background: var(--code-bg); border: 1px solid var(--code-border);
  box-shadow: 0 50px 90px -30px color-mix(in oklab, var(--md-primary) 65%, transparent), 0 14px 34px -14px rgba(8, 12, 40, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: transform var(--dur-slow) var(--spring);
}
.lp-code::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 50% at 80% 0%, color-mix(in oklab, var(--md-primary) 24%, transparent), transparent 70%);
}
.lp-code-bar { display: flex; align-items: center; gap: 8px; padding: 15px 20px; border-bottom: 1px solid var(--code-border); background: rgba(255, 255, 255, 0.03); font-size: 12px; color: var(--code-muted); }
.lp-code-bar i.d { width: 12px; height: 12px; border-radius: 50%; display: inline-block; background: var(--code-border); transition: transform var(--dur-med) var(--spring-bouncy); }
.lp-code:hover .lp-code-bar i.d { transform: scale(1.25); }
.lp-code-bar i.d:nth-child(1) { background: #FF5F57; } .lp-code-bar i.d:nth-child(2) { background: #FEBC2E; } .lp-code-bar i.d:nth-child(3) { background: #28C840; }
.lp-code-bar span { margin: 0 auto 0 8px; font-family: var(--font-mono); }
.lp-code pre { margin: 0; padding: 24px 28px; overflow-x: auto; font-size: 13.5px; line-height: 1.9; color: var(--code-fg); animation: type-reveal 2.4s steps(9, end) 0.5s both; }
@keyframes type-reveal { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.lp-code .c { color: #6C79A6; } .lp-code .k { color: #6EE7B7; } .lp-code .s { color: #8FD3FF; }

.lp-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 64px;
  border-radius: var(--radius-xl); overflow: hidden;
  border: 1px solid var(--stroke); background: var(--glass);
  box-shadow: var(--shadow-2), var(--hairline);
}
.lp-stat { position: relative; padding: 30px 28px; text-align: left; border-right: 1px solid var(--stroke); transition: background var(--dur-med) var(--ease); }
.lp-stat:hover { background: color-mix(in oklab, var(--md-primary) 7%, transparent); }
.lp-stat:last-child { border-right: 0; }
.lp-stat b { display: block; font-family: var(--font-display); font-size: clamp(28px, 3.4vw, 44px); font-weight: 800; letter-spacing: -0.05em; line-height: 1.05; font-variant-numeric: tabular-nums; background: var(--accent-bg); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.lp-stat span { display: block; margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--md-on-surface-variant); }

.lp-section { padding: 96px 0; position: relative; }
.lp-section h2 { max-width: 20ch; margin: 0 auto 14px; text-align: center; font-size: clamp(32px, 4.8vw, 54px); font-weight: 800; letter-spacing: -0.055em; line-height: 1.04; text-wrap: balance; }
.lp-section .lead { max-width: 56ch; margin: 0 auto 56px; text-align: center; font-size: 17px; line-height: 1.6; color: var(--md-on-surface-variant); }

.lp-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.lp-feature {
  position: relative; overflow: hidden; grid-column: span 2; padding: 30px;
  border-radius: var(--radius-xl); border: 1px solid var(--stroke);
  background: linear-gradient(160deg, color-mix(in oklab, var(--ic, var(--md-primary)) 13%, var(--card-solid)), var(--card));
  box-shadow: var(--shadow-1), var(--hairline);
  transition: transform var(--dur-slow) var(--spring), box-shadow var(--dur-med) var(--ease), border-color var(--dur-med) var(--ease);
  transform-style: preserve-3d;
}
.lp-feature:nth-child(1), .lp-feature:nth-child(4) { grid-column: span 4; }
.lp-feature:nth-child(5), .lp-feature:nth-child(6) { grid-column: span 3; }
.lp-feature::before {
  content: ''; position: absolute; right: -70px; bottom: -70px; width: 220px; height: 220px; z-index: 0;
  background: color-mix(in oklab, var(--ic, var(--md-primary)) 22%, transparent); clip-path: var(--shape-flower);
  opacity: 0.7; pointer-events: none;
  transition: transform var(--dur-xslow) var(--spring), opacity var(--dur-med) var(--ease);
}
@keyframes spin-slow { to { rotate: 360deg; } }
.lp-feature > * { position: relative; z-index: 1; }
.lp-feature:hover { transform: translateY(-6px); box-shadow: var(--shadow-3), var(--hairline); border-color: color-mix(in oklab, var(--ic, var(--md-primary)) 45%, var(--stroke)); }
.lp-feature:hover::before { transform: scale(1.4); opacity: 1; }
.lp-feature .ic {
  width: 56px; height: 56px; margin-bottom: 24px; display: grid; place-items: center;
  clip-path: var(--shape-cookie); font-size: 21px;
  color: #fff; background: var(--ic, var(--md-primary));
  transition: clip-path var(--dur-xslow) var(--spring), transform var(--dur-xslow) var(--spring);
}
.lp-feature:hover .ic { clip-path: var(--shape-flower); transform: rotate(22deg) scale(1.1); }
.lp-feature:hover .ic i { animation: icon-counter 0.8s var(--spring) both; }
.lp-feature h3 { margin-bottom: 8px; font-size: 20px; font-weight: 800; letter-spacing: -0.035em; }
.lp-feature p { font-size: 14.5px; line-height: 1.65; color: var(--md-on-surface-variant); max-width: 46ch; }

.lp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.lp-step {
  position: relative; overflow: hidden; padding: 32px; border-radius: var(--radius-xl); border: 1px solid var(--stroke); background: var(--card);
  box-shadow: var(--shadow-1), var(--hairline); counter-increment: step;
  transition: transform var(--dur-slow) var(--spring), box-shadow var(--dur-med) var(--ease);
}
.lp-step:hover { transform: translateY(-6px); box-shadow: var(--shadow-3), var(--hairline); }
.lp-step::before {
  content: counter(step, decimal-leading-zero); display: block; margin-bottom: 18px;
  font-family: var(--font-display); font-size: 64px; font-weight: 800; letter-spacing: -0.06em; line-height: 0.9;
  background: var(--accent-bg); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  transition: transform var(--dur-slow) var(--spring); transform-origin: left bottom;
}
.lp-step:hover::before { transform: scale(1.12) rotate(-3deg); }
.lp-step h3 { margin-bottom: 8px; font-size: 20px; font-weight: 800; letter-spacing: -0.035em; }
.lp-step p { font-size: 14.5px; line-height: 1.65; color: var(--md-on-surface-variant); }
.lp-step code { font-size: 12.5px; }

.lp-band { border-block: 1px solid var(--stroke); background: color-mix(in oklab, var(--md-primary) 5%, color-mix(in oklab, var(--card) 60%, transparent)); }
.lp-cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: 920px; margin: 0 auto; }
.lp-cat {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; gap: 12px; padding: 12px 20px;
  border-radius: min(var(--radius-full), 24px); border: 1px solid var(--stroke); background: var(--glass-strong);
  box-shadow: var(--shadow-1), var(--hairline); font-size: 15px; font-weight: 650; text-transform: capitalize;
  transition: transform var(--dur-slow) var(--spring), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), box-shadow var(--dur-med) var(--ease), border-radius var(--dur-med) var(--spring);
}
.lp-cat small { min-width: 28px; padding: 2px 9px; border-radius: var(--radius-full); text-align: center; font-size: 12px; font-weight: 750; color: var(--md-on-primary-container); background: var(--md-primary-container); }
.lp-cat:hover { transform: translateY(-4px) scale(1.05); border-color: var(--md-primary); color: var(--md-primary); box-shadow: var(--shadow-2); }
.lp-cat:active { transform: scale(0.95); border-radius: min(var(--radius-full), 14px); }

.lp-final { padding-top: 88px; padding-bottom: 88px; }
.lp-cta-panel {
  position: relative; overflow: hidden; isolation: isolate; text-align: center; color: #fff;
  padding: clamp(56px, 8vw, 104px) 28px; border-radius: min(var(--radius-xl), 44px);
  background:
    radial-gradient(50% 70% at 90% 0%, rgba(255, 105, 180, 0.6), transparent 70%),
    radial-gradient(50% 80% at 0% 100%, rgba(34, 211, 238, 0.5), transparent 70%),
    linear-gradient(135deg, #2540F0 0%, #5B33F0 52%, #8A33E8 100%);
  box-shadow: 0 60px 100px -36px color-mix(in oklab, var(--md-primary) 70%, transparent);
}
.lp-cta-panel::before, .lp-cta-panel::after { content: ''; position: absolute; z-index: -1; pointer-events: none; background: rgba(255, 255, 255, 0.13); }
.lp-cta-panel::before { width: 360px; height: 360px; right: -90px; top: -130px; clip-path: var(--shape-flower); }
.lp-cta-panel::after { width: 280px; height: 280px; left: -80px; bottom: -120px; clip-path: var(--shape-clover); }
.lp-cta-panel h2 { color: #fff; margin-bottom: 14px; }
.lp-cta-panel .lead { color: rgba(255, 255, 255, 0.86); margin-bottom: 34px; }
.lp-cta-panel .lp-cta { justify-content: center; }

.lp-footer { padding: 40px 0 52px; border-top: 1px solid var(--stroke); font-size: 13.5px; color: var(--md-on-surface-variant); }
.lp-footer .lp-container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.lp-footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.lp-footer a { font-weight: 600; transition: color var(--dur-fast) var(--ease); }
.lp-footer a:hover { color: var(--md-primary); }

/* ---- Status pages (404 / maintenance) ---- */
.status-page { position: relative; min-height: 100dvh; display: grid; place-items: center; padding: 32px 20px; text-align: center; overflow: hidden; isolation: isolate; }
.status-page::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(40% 45% at 15% 15%, color-mix(in oklab, var(--md-primary) 32%, transparent), transparent 70%),
              radial-gradient(40% 45% at 85% 85%, color-mix(in oklab, var(--md-secondary) 28%, transparent), transparent 70%); }
.status-card-wrap { width: 100%; max-width: 540px; }
.status-panel {
  padding: 52px 40px; border-radius: var(--radius-xl); border: 1px solid var(--stroke-strong);
  background: var(--glass); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  box-shadow: var(--shadow-3), var(--hairline);
}
.status-panel .brand-mark { width: 68px; height: 68px; margin: 0 auto 26px;  }
.status-panel .brand-mark .icon { font-size: 27px; }
.status-code { font-family: var(--font-display); font-size: clamp(88px, 18vw, 136px); font-weight: 800; line-height: 0.95; letter-spacing: -0.08em; margin-bottom: 12px; background: var(--accent-bg); background-size: 200% 200%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.status-panel h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.045em; margin-bottom: 10px; }
.status-panel p { font-size: 15px; line-height: 1.65; color: var(--md-on-surface-variant); margin-bottom: 30px; }
.status-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.status-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 4px; padding: 13px 18px; border-radius: var(--radius-md); border: 1px solid var(--stroke); background: var(--md-surface-container); font-size: 13px; text-align: left; color: var(--md-on-surface-variant); }
.status-note .icon { margin-top: 2px; color: var(--md-primary); }
.maint-badge { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 7px 16px; border-radius: var(--radius-full); font-size: 12px; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; color: var(--md-warning); background: color-mix(in oklab, var(--md-warning) 15%, transparent); border: 1px solid color-mix(in oklab, var(--md-warning) 32%, transparent); }

/* ---- Small shared bits ---- */
img[data-account-avatar] { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.notif-skel { width: 54px; height: 54px; border-radius: 18px; }
.docs-skel { padding: 18px 22px; margin-bottom: 12px; }
.skel-badge { width: 56px; height: 28px; border-radius: 10px; flex-shrink: 0; }
.skel-chev { width: 18px; height: 18px; border-radius: 6px; }
.btn-download { width: 100%; margin-top: 24px; }
.notif-cover { width: 100%; border-radius: var(--radius-md); margin-bottom: 14px; }
.notif-date { font-size: 11.5px; color: var(--md-on-surface-variant); margin: 0 0 10px; }
.notif-text { font-size: 14px; line-height: 1.65; white-space: pre-wrap; margin-bottom: 14px; }
.notif-body { min-width: 0; flex: 1; }
.notif-title { font-family: var(--font-display); font-weight: 750; font-size: 15.5px; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-desc { font-size: 13px; color: var(--md-on-surface-variant); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.notif-body .notif-date { margin: 4px 0 0; }
.notif-chev { color: var(--md-on-surface-variant); flex-shrink: 0; transition: transform var(--dur-med) var(--spring); }
.notification-row:hover .notif-chev { transform: translateX(5px); }
.h-120 { height: 120px; } .h-90 { height: 90px; }
.ok-line { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 13.5px; font-weight: 650; color: var(--md-tertiary); }
#loading-state .card { margin-bottom: 16px; }
#loading-state.empty-state { margin-top: 40px; }
.try-fs-body .btn-download { margin-top: 28px; }
.card > .form-field + .form-field, .profile-sep > .form-field + .form-field, .card > .form-field + .btn, .profile-sep > .form-field + .btn { margin-top: 14px; }
.card > .auth-form + .key-display, .card > .btn-row, .card > .form-hint { margin-top: 14px; }
.card > .form-hint:first-of-type { margin-bottom: 14px; }
.card > .btn-block + .btn-block { margin-top: 10px; }
.admin-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ==========================================================================
   06 — Motion: entrance, scroll-driven reveal, view transitions
   Pure CSS (no JS dependency → no flash of hidden content).
   ========================================================================== */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes rise-soft {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes slide-in-left { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@keyframes pop-in { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }

/* Shell pieces */

/* Page content: each top-level block rises in with a spring stagger */
.page > *, .auth-card > *, .status-panel > * { animation: rise-in var(--dur-slow) var(--spring) both; }
.page > :nth-child(1), .auth-card > :nth-child(1) { animation-delay: 60ms; }
.page > :nth-child(2), .auth-card > :nth-child(2) { animation-delay: 120ms; }
.page > :nth-child(3), .auth-card > :nth-child(3) { animation-delay: 180ms; }
.page > :nth-child(4), .auth-card > :nth-child(4) { animation-delay: 240ms; }
.page > :nth-child(5), .auth-card > :nth-child(5) { animation-delay: 290ms; }
.page > :nth-child(n+6), .auth-card > :nth-child(n+6) { animation-delay: 340ms; }
.status-panel > :nth-child(1) { animation-delay: 80ms; } .status-panel > :nth-child(2) { animation-delay: 160ms; }
.status-panel > :nth-child(3) { animation-delay: 240ms; } .status-panel > :nth-child(4) { animation-delay: 300ms; }
.status-panel > :nth-child(n+5) { animation-delay: 360ms; }
.status-panel { animation: pop-in var(--dur-xslow) var(--spring) both; }

/* Staggered children inside grids / lists (also fires for JS-rendered rows) */
:is(.kpi-grid, .dash-grid, .activity-grid, .settings-grid, .admin-grid, .admin-stack, .profile-cards, .lp-grid, .lp-steps,
    .endpoint-grid, .option-list, .activity-list, .lp-stats, .lp-cats, .lp-hero-grid) > * {
  animation: rise-in var(--dur-slow) var(--spring) both;
  animation-delay: calc(var(--i, 0) * 55ms + 120ms);
}
:is([data-notifications-list]) > * {
  animation: rise-soft var(--dur-slow) var(--spring) both;
  animation-delay: calc(var(--i, 0) * 28ms);
}
.swatch-grid > * { animation: pop-in var(--dur-slow) var(--spring-bouncy) both; animation-delay: calc(var(--i, 0) * 30ms); }
.chip-group[data-category-tabs] > * { animation: pop-in var(--dur-slow) var(--spring-bouncy) both; animation-delay: calc(var(--i, 0) * 25ms); }
:is(.kpi-grid, .dash-grid, .activity-grid, .settings-grid, .admin-grid, .admin-stack, .profile-cards, .lp-grid, .lp-steps,
    .endpoint-grid, .option-list, .activity-list, .lp-stats, .lp-cats, [data-docs-list], [data-notifications-list],
    .swatch-grid, .chip-group[data-category-tabs]) > :nth-child(1) { --i: 0; }
:is(.kpi-grid, .dash-grid, .activity-grid, .settings-grid, .admin-grid, .admin-stack, .profile-cards, .lp-grid, .lp-steps,
    .endpoint-grid, .option-list, .activity-list, .lp-stats, .lp-cats, [data-docs-list], [data-notifications-list],
    .swatch-grid, .chip-group[data-category-tabs]) > :nth-child(2) { --i: 1; }
:is(.kpi-grid, .dash-grid, .activity-grid, .settings-grid, .admin-grid, .admin-stack, .profile-cards, .lp-grid, .lp-steps,
    .endpoint-grid, .option-list, .activity-list, .lp-stats, .lp-cats, [data-docs-list], [data-notifications-list],
    .swatch-grid, .chip-group[data-category-tabs]) > :nth-child(3) { --i: 2; }
:is(.kpi-grid, .dash-grid, .activity-grid, .settings-grid, .admin-grid, .admin-stack, .profile-cards, .lp-grid, .lp-steps,
    .endpoint-grid, .option-list, .activity-list, .lp-stats, .lp-cats, [data-docs-list], [data-notifications-list],
    .swatch-grid, .chip-group[data-category-tabs]) > :nth-child(4) { --i: 3; }
:is(.kpi-grid, .dash-grid, .activity-grid, .settings-grid, .admin-grid, .admin-stack, .profile-cards, .lp-grid, .lp-steps,
    .endpoint-grid, .option-list, .activity-list, .lp-stats, .lp-cats, [data-docs-list], [data-notifications-list],
    .swatch-grid, .chip-group[data-category-tabs]) > :nth-child(5) { --i: 4; }
:is(.kpi-grid, .dash-grid, .activity-grid, .settings-grid, .admin-grid, .admin-stack, .profile-cards, .lp-grid, .lp-steps,
    .endpoint-grid, .option-list, .activity-list, .lp-stats, .lp-cats, [data-docs-list], [data-notifications-list],
    .swatch-grid, .chip-group[data-category-tabs]) > :nth-child(6) { --i: 5; }
:is(.kpi-grid, .dash-grid, .activity-grid, .settings-grid, .admin-grid, .admin-stack, .profile-cards, .lp-grid, .lp-steps,
    .endpoint-grid, .option-list, .activity-list, .lp-stats, .lp-cats, [data-docs-list], [data-notifications-list],
    .swatch-grid, .chip-group[data-category-tabs]) > :nth-child(7) { --i: 6; }
:is(.kpi-grid, .dash-grid, .activity-grid, .settings-grid, .admin-grid, .admin-stack, .profile-cards, .lp-grid, .lp-steps,
    .endpoint-grid, .option-list, .activity-list, .lp-stats, .lp-cats, [data-docs-list], [data-notifications-list],
    .swatch-grid, .chip-group[data-category-tabs]) > :nth-child(n+8) { --i: 7; }

/* Cheap long-list rendering: off-screen docs cards are skipped by the browser */
.docs-card { content-visibility: auto; contain-intrinsic-size: auto 70px; }
.lp-section, .lp-footer { content-visibility: auto; contain-intrinsic-size: auto 700px; }

/* Theme switch: circular reveal from the toggle button (set by motion.js) */
html.theme-vt::view-transition-old(root), html.theme-vt::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html.theme-vt::view-transition-old(root) { z-index: 1; }
html.theme-vt::view-transition-new(root) { z-index: 2; }


/* ---- Docs / Status / Admin ---- */
/* ==========================================================================
   Docs
   ========================================================================== */
.docs-card { border-radius: var(--pro-r-lg); }
.docs-card-head { padding: 14px 18px; gap: 12px; }
.docs-card-head:hover { background: color-mix(in oklab, var(--md-on-surface) 4%, transparent); }
.docs-card-head:active { transform: none; }
.docs-card.expanded { box-shadow: none; border-color: var(--stroke-strong); }
.category-icon { width: 30px; height: 30px; border-radius: 8px; }
.docs-card-head h3.docs-name {
  flex: 1; min-width: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px;
  overflow: visible; white-space: normal; font-size: 15.5px;
}
.docs-name-text { min-width: 0; overflow-wrap: anywhere; }
.docs-card-body-pad { background: transparent; }

/* Status pill: dot + label, colour carries the state */
.status-pill {
  --sc: var(--md-on-surface-variant);
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  padding: 2px 9px 2px 7px; border-radius: 999px;
  font-family: var(--font-body); font-size: 12px; font-weight: 650; letter-spacing: 0; line-height: 1.4; white-space: nowrap;
  color: var(--sc);
  background: color-mix(in oklab, var(--sc) 12%, transparent);
  border: 1px solid color-mix(in oklab, var(--sc) 28%, transparent);
}
.status-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sc); flex: none; }
.status-pill.s-operational { --sc: light-dark(#0B7A5C, #4FE0B5); }
.status-pill.s-error { --sc: light-dark(#C42A40, #FF8A9A); }
.status-pill.s-maintenance { --sc: light-dark(#9A5B00, #FFC857); }
.status-pill.s-unknown, .status-pill.s-checking { --sc: var(--md-on-surface-variant); }
.status-pill.s-checking .dot { animation: dot-fade 1.1s ease-in-out infinite alternate; }
@keyframes dot-fade { from { opacity: 0.25; } to { opacity: 1; } }

.status-bar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px;
  margin-bottom: 14px; padding: 10px 14px;
  border: 1px solid var(--stroke); border-radius: var(--pro-r-md); background: var(--card-solid);
}
.status-bar[hidden] { display: none; }
.status-bar-counts { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; color: var(--md-on-surface-variant); }
.status-bar-counts b { color: var(--md-on-surface); font-weight: 650; font-variant-numeric: tabular-nums; }

.status-detail {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 16px; padding: 10px 12px;
  border: 1px solid var(--stroke); border-radius: var(--pro-r-md); background: var(--card-solid);
  font-size: 13px; color: var(--md-on-surface-variant);
}
.status-detail-text { flex: 1 1 200px; min-width: 0; }
.status-recheck {
  display: inline-grid; place-items: center; width: 30px; height: 30px; margin-left: auto; border-radius: 8px;
  border: 1px solid var(--stroke); background: transparent; color: var(--md-on-surface-variant);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.status-recheck:hover { background: color-mix(in oklab, var(--md-on-surface) 7%, transparent); color: var(--md-on-surface); }
.status-recheck.spinning .icon { animation: spinner-spin 0.8s linear infinite; }

/* ---- Fix: chips and tabs must never clip their text ---- */
.chip, .tab-btn { flex: 0 0 auto; white-space: nowrap; }
[data-category-tabs] { display: flex; flex-wrap: wrap; width: auto; }
[data-category-tabs] .chip { flex: 0 0 auto; width: auto; min-width: max-content; }

/* ==========================================================================
   Admin
   ========================================================================== */
.manage-card { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 28px; padding: 22px; margin-bottom: 16px; align-items: start; }
.manage-form, .manage-list { min-width: 0; }
.manage-list { padding-left: 28px; border-left: 1px solid var(--stroke); }
.manage-list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.manage-list-head h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 650; }
.count-pill {
  display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px;
  font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums;
  background: var(--md-surface-container-highest); color: var(--md-on-surface-variant);
}
.manage-card .table-wrap { max-height: 320px; overflow: auto; }
.data-table.compact th, .data-table.compact td { padding: 10px 14px; }
.data-table.compact td[colspan], .data-table td.empty, .data-table .empty-row td { padding: 26px 14px; font-size: 13px; text-align: center; color: var(--md-on-surface-variant); }
.data-table .col-action { text-align: right; width: 1%; }
.cell-strong { font-weight: 600; }
.cell-date { white-space: nowrap !important; }
.cell-muted { color: var(--md-on-surface-variant); }
.cell-path { font-size: 12px; background: none; border: 0; padding: 0; color: var(--md-on-surface-variant); }
.cell-note { margin-top: 4px; font-size: 12px; white-space: normal; max-width: 34ch; }
.key-mask { cursor: pointer; font-size: 12.5px; user-select: all; }
.key-mask.revealed { word-break: break-all; white-space: normal; }
.verified-mark { color: var(--md-primary); font-size: 12px; vertical-align: -1px; }
.endpoint-admin { padding: 20px; }
.endpoint-admin .inline-form { margin-bottom: 14px; }
.endpoint-admin .table-wrap { max-height: 480px; overflow: auto; }
.data-table.compact td { white-space: normal; }
.data-table.compact td.col-action { white-space: nowrap; }

@media (max-width: 960px) {
  .manage-card { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .manage-list { padding-left: 0; padding-top: 20px; border-left: 0; border-top: 1px solid var(--stroke); }
}

.docs-card-head { padding: 14px 20px; }
.docs-card-body-pad { padding-inline: 24px; }
.table-wrap { overflow: hidden auto; }
.data-table th:first-child, .data-table td:first-child { padding-left: 22px; }
.search-field input { text-overflow: ellipsis; }
@media (max-width: 720px) { .data-table.compact .hide-sm { display: none; } .search-field input { font-size: 14px; } }
.docs-card-head > .status-pill { margin-left: auto; }
.docs-card-head > .docs-name { flex: 1 1 auto; }
@media (max-width: 520px) { .docs-card-head > .status-pill { font-size: 11.5px; padding: 2px 8px 2px 6px; } }
.docs-card-head > .status-pill { min-width: 112px; justify-content: center; }
@media (max-width: 520px) { .docs-card-head > .status-pill { min-width: 100px; } }

/* Status bar: filter chips + meta */
.status-bar { gap: 10px 16px; }
.status-bar-counts { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 auto; justify-content: flex-end; }
.status-filter {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--stroke); background: transparent; color: var(--md-on-surface-variant);
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.status-filter b { color: var(--md-on-surface); font-variant-numeric: tabular-nums; }
.status-filter:hover { background: color-mix(in oklab, var(--md-on-surface) 6%, transparent); }
.status-filter[aria-pressed='true'] { background: color-mix(in oklab, var(--md-primary) 14%, transparent); border-color: color-mix(in oklab, var(--md-primary) 45%, transparent); color: var(--md-on-surface); }
.status-bar-meta { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--md-on-surface-variant); }
.status-bar-meta em { font-style: normal; color: light-dark(#C42A40, #FF8A9A); }
.status-refresh {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--stroke); background: transparent; color: var(--md-on-surface-variant);
}
.status-refresh:hover { background: color-mix(in oklab, var(--md-on-surface) 7%, transparent); color: var(--md-on-surface); }
@media (max-width: 640px) { .status-bar-counts { justify-content: flex-start; flex-basis: 100%; order: 3; } }

/* ---- profile: compact header ---- */
.profile-header{padding:84px 28px 24px}
.profile-header::before{height:72px}
.profile-header .avatar,.profile-header .avatar-lg{width:72px;height:72px;font-size:28px;margin-top:-40px;border-width:3px;transition:none}
.profile-header .avatar:hover{transform:none}
.profile-meta h1,.profile-meta #display-name{font-size:20px;line-height:1.25;font-weight:650;letter-spacing:-.01em}
#username-line{display:inline-flex;align-items:center;gap:5px;font-size:14px}
.verified-badge{color:var(--md-primary,#1a73e8);flex:none}
.profile-header-actions{margin-top:-64px}
@media (max-width:640px){.profile-header{padding:76px 18px 20px}.profile-header .avatar{width:64px;height:64px;margin-top:-36px}.profile-meta h1{font-size:18px}}

/* ==========================================================================
   07 — Responsive + reduced motion
   ========================================================================== */
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 960px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .nav-rail { display: none; }
  .top-bar { display: flex; }
  .bottom-nav { display: flex; }
  .simple-topbar { display: none; }
  .drawer, .drawer-scrim { display: none !important; }
  [data-drawer-open] { display: none; }
  .page { padding: calc(var(--header-height) + env(safe-area-inset-top, 0px) + 22px) 16px calc(92px + env(safe-area-inset-bottom, 0px)); }
  body:not(:has(.top-bar)) .page { padding-top: 24px; }
  .page-header { flex-direction: column; align-items: stretch; gap: 16px; }
  .admin-grid, .admin-grid-3 { grid-template-columns: minmax(0, 1fr); }
  .toast-container { top: calc(var(--header-height) + 12px); }
  .lp-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .lp-grid { grid-template-columns: repeat(2, 1fr); }
  .lp-feature, .lp-feature:nth-child(n) { grid-column: span 1; }
  .lp-feature:nth-child(1) { grid-column: span 2; }
}
@media (max-width: 1200px) and (min-width: 961px) { .admin-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

@media (max-width: 860px) {
  .lp-links { display: none; }
  .lp-stats { grid-template-columns: repeat(2, 1fr); }
  .lp-stat:nth-child(2) { border-right: 0; }
  .lp-stat:nth-child(-n + 2) { border-bottom: 1px solid var(--stroke); }
  .lp-steps { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 720px) {
  .activity-grid { grid-template-columns: minmax(0, 1fr); }
  .dash-head { padding: 28px 24px; }
}

@media (max-width: 640px) {
  .lp-hero { padding: 48px 0 40px; }
  .lp-section { padding: 64px 0; }
  .lp-grid { grid-template-columns: 1fr; }
  .lp-feature, .lp-feature:nth-child(n) { grid-column: span 1; }
  .lp-code pre { padding: 18px; font-size: 12.5px; }
  .lp-actions .btn-outlined { display: none; }
  .lp-footer .lp-container { flex-direction: column; align-items: flex-start; }
  .lp-cta .btn { flex: 1 1 100%; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar .chip-group { width: 100%; }
  .toolbar .chip-group:not([data-category-tabs]) .chip { flex: 1 1 auto; }
  [data-category-tabs] { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding: 4px 16px 10px; scrollbar-width: none; }
  [data-category-tabs]::-webkit-scrollbar { display: none; }
  .docs-card-head { padding: 15px 16px; gap: 10px; }
  .docs-card-body-pad { padding: 2px 16px 22px; }
  .card { padding: 22px; }
  .profile-header { padding: 116px 22px 24px; }
  .modal-header { padding: 22px 16px 2px 24px; } .modal-body { padding: 10px 24px 6px; } .modal-footer { padding: 16px 24px calc(22px + env(safe-area-inset-bottom, 0px)); }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal-overlay .modal { max-width: none; border-radius: var(--radius-xl) var(--radius-xl) 0 0; transform: translateY(100%); }
  .modal-overlay.visible .modal { transform: none; }
  .modal-overlay .modal::after { content: ''; position: absolute; top: 9px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 5px; background: var(--stroke-strong); }
  .status-panel { padding: 40px 24px; }
  .try-fs-body { padding-top: 18px; }
  .search-field { flex: 0 0 auto; width: 100%; }
}

@media (max-width: 520px) {
  .tabs { display: flex; width: 100%; padding: 4px; }
  .tab-btn { flex: 1 1 auto; padding: 0 9px; font-size: 13px; }
  .kpi-grid { gap: 12px; }
  .kpi { padding: 18px; }
  .kpi-value { font-size: 30px; } .kpi-value.kpi-value-ip { font-size: 13px; }
  .kpi-top { margin-bottom: 12px; }
  .dash-head-actions .btn-outlined { display: none; }
  .chart-header { gap: 10px; }
  .live-chart { height: 196px; }
  .endpoint-grid { grid-template-columns: 1fr; }
  .toast-container { left: 12px; right: 12px; width: auto; }
  .btn-row { flex-direction: column; }
  .btn-row > .btn { flex: 0 0 auto; width: 100%; }
  .category-icon { display: none; }
  .docs-card-head { padding: 13px 14px; gap: 10px; }
  .status-bar { padding: 9px 12px; }
  .swatch-grid { gap: 10px; }
}

@media (min-width: 641px) { .swatch-grid { grid-template-columns: repeat(auto-fill, 46px); justify-content: start; } }

@media (hover: none) {
  .card:hover::after, .kpi:hover::after { opacity: 0; }
  .btn:hover, .chip:hover, .kpi:hover, .lp-feature:hover, .lp-step:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  body::before, body::after { animation: none; }
}

@media print {
  body::before, body::after, .nav-rail, .top-bar, .bottom-nav, .simple-topbar { display: none !important; }
  .app-shell { display: block; }
}



/* ==========================================================================
   HIARON API — Design System "Lumen"
   Loaded AFTER style.css. Re-skins every page through the stable token names
   (--md-*, --accent-bg, --radius-*), then layers refined components,
   motion and the new landing page (hl-*) on top.
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  color-scheme: light dark;

  --hx-violet: #6D5EF5;
  --hx-violet-2: #8B5CF6;
  --hx-magenta: #D14BF0;
  --hx-cyan: #22C7E8;
  --hx-pink: #FF6AA8;

  --md-primary: light-dark(#5B4BE8, #A99DFF);
  --md-on-primary: light-dark(#FFFFFF, #170F52);
  --md-secondary: light-dark(#A23FE0, #D9B3FF);
  --md-on-secondary: light-dark(#FFFFFF, #2F0A52);
  --md-tertiary: light-dark(#0794B3, #5BDDF5);
  --md-on-tertiary: light-dark(#FFFFFF, #00323D);
  --md-success: light-dark(#0E9F6E, #4ADE9F);
  --md-warning: light-dark(#D97706, #FBBF24);
  --md-error: light-dark(#E0364F, #FF8A9A);
  --tint: var(--md-primary);

  --md-surface: light-dark(#FBF8FF, #0B0914);
  --md-surface-dim: light-dark(#F1EBFB, #07060E);
  --md-surface-container-lowest: light-dark(#FFFFFF, #0E0B19);
  --md-surface-container-low: light-dark(#FFFFFF, #130F21);
  --md-surface-container: light-dark(#F6F1FF, #181328);
  --md-surface-container-high: light-dark(#EEE7FB, #201A33);
  --md-surface-container-highest: light-dark(#E6DEF7, #2A2340);
  --md-on-surface: light-dark(#150F2E, #F1EEFC);
  --md-on-surface-variant: light-dark(#5E5878, #A8A2C4);
  --md-outline: light-dark(#CFC7E6, #3A3256);
  --md-outline-variant: light-dark(#E4DDF3, #2A2342);

  --card: light-dark(rgba(255, 255, 255, .94), rgba(24, 19, 40, .92));
  --card-solid: light-dark(#FFFFFF, #151026);
  --glass: light-dark(rgba(255, 255, 255, .72), rgba(19, 15, 33, .7));
  --glass-strong: light-dark(rgba(255, 255, 255, .88), rgba(19, 15, 33, .88));
  --stroke: light-dark(rgba(60, 40, 140, .10), rgba(190, 175, 255, .11));
  --stroke-strong: light-dark(rgba(60, 40, 140, .18), rgba(190, 175, 255, .2));

  --accent-bg: linear-gradient(135deg, #6D5EF5 0%, #9B5CF6 55%, #D14BF0 100%);
  --grad: var(--accent-bg);
  --glow: rgba(109, 94, 245, .45);
  --ring: rgba(109, 94, 245, .28);

  --font-display: 'Bricolage Grotesque', 'Plus Jakarta Sans', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius-sm: 12px; --radius-md: 16px; --radius-lg: 22px; --radius-xl: 30px;
  --pro-r-sm: 12px; --pro-r-md: 16px; --pro-r-lg: 22px;
  --shadow-color: light-dark(#2A1B7A, #000000);
  --shadow-1: 0 1px 2px rgba(42, 27, 122, .06), 0 2px 8px -2px rgba(42, 27, 122, .06);
  --shadow-2: 0 14px 34px -14px rgba(42, 27, 122, .22), 0 2px 8px -2px rgba(42, 27, 122, .08);
  --shadow-3: 0 40px 80px -28px rgba(42, 27, 122, .38), 0 10px 26px -10px rgba(42, 27, 122, .18);

  --code-bg: light-dark(#14102B, #0A0817);
  --code-border: light-dark(#2B2450, #231D3F);
  --nav-width: 264px;

  --hx-ease: cubic-bezier(.22, 1, .36, 1);
  --hx-spring: cubic-bezier(.34, 1.45, .64, 1);
}
:root[data-theme='dark'] { color-scheme: dark; --accent-bg: linear-gradient(135deg, #7C6CFF 0%, #A86BFF 55%, #E060F5 100%); --glow: rgba(140, 120, 255, .5); }
:root[data-theme='light'] { color-scheme: light; }
:root[data-theme='dark'] { --shadow-2: 0 18px 40px -16px rgba(0, 0, 0, .7), 0 2px 8px -2px rgba(0, 0, 0, .4); --shadow-3: 0 50px 90px -30px rgba(0, 0, 0, .85), 0 10px 26px -10px rgba(0, 0, 0, .5); }

::selection { background: color-mix(in oklab, var(--hx-violet) 30%, transparent); }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { font-family: var(--font-body); background: var(--md-surface); color: var(--md-on-surface); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, .brand-title, .dash-title, .auth-title { font-family: var(--font-display); letter-spacing: -.035em; }

/* Ambient aurora behind every app page */
body:not(.lp)::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(48% 42% at 8% -6%, color-mix(in oklab, var(--hx-violet) 20%, transparent), transparent 70%),
    radial-gradient(40% 40% at 100% 4%, color-mix(in oklab, var(--hx-magenta) 14%, transparent), transparent 70%),
    radial-gradient(40% 38% at 70% 108%, color-mix(in oklab, var(--hx-cyan) 12%, transparent), transparent 70%);
}
body { background-image: none; }

/* Scroll progress */
.hx-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 1000; transform-origin: 0 50%; transform: scaleX(0); background: var(--accent-bg); pointer-events: none; }

/* --------------------------------------------------------------------------
   2. Brand mark — logo image, rounded, no more cookie morph
   -------------------------------------------------------------------------- */
.brand-mark { clip-path: none !important; border-radius: 13px; width: 40px; height: 40px; background: var(--md-surface-container-lowest); box-shadow: 0 0 0 1px var(--stroke-strong), 0 8px 20px -8px var(--glow); }
.brand-mark::after { display: none; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; padding: 0; border-radius: inherit; }
.brand:hover .brand-mark { clip-path: none !important; transform: rotate(-6deg) scale(1.06); }
.brand-title { font-weight: 700; font-size: 18px; letter-spacing: -.04em; }
.auth-visual-mark { clip-path: none !important; border-radius: 16px; background: rgba(255, 255, 255, .95); }
.auth-visual-mark img { object-fit: contain; }

/* --------------------------------------------------------------------------
   3. App shell
   -------------------------------------------------------------------------- */
.nav-rail { background: var(--glass); border: 1px solid var(--stroke); border-radius: 26px; box-shadow: var(--shadow-2); -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%); }
.nav-item { border-radius: 14px; font-weight: 600; transition: background .25s var(--hx-ease), color .25s var(--hx-ease), transform .35s var(--hx-spring); }
.nav-item:hover { background: color-mix(in oklab, var(--hx-violet) 9%, transparent); transform: translateX(3px); }
.nav-item.active { color: var(--md-primary); }
.nav-indicator { background: linear-gradient(135deg, color-mix(in oklab, var(--hx-violet) 18%, transparent), color-mix(in oklab, var(--hx-magenta) 10%, transparent)); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--hx-violet) 30%, transparent), 0 10px 26px -12px var(--glow); }
.top-bar, .bottom-nav { background: var(--glass-strong); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%); border-color: var(--stroke); }
.page { animation: hx-page-in .7s var(--hx-ease) both; }
@keyframes hx-page-in { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* --------------------------------------------------------------------------
   4. Controls
   -------------------------------------------------------------------------- */
.btn { position: relative; overflow: hidden; font-weight: 650; letter-spacing: -.01em; border-radius: 14px; transition: transform .35s var(--hx-spring), box-shadow .3s var(--hx-ease), background .25s var(--hx-ease), border-color .25s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn-filled { color: #fff; background: var(--accent-bg); background-size: 160% 160%; border: 0; box-shadow: 0 10px 24px -10px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .35); transition: transform .35s var(--hx-spring), box-shadow .3s var(--hx-ease), background-position .6s var(--hx-ease); }
.btn-filled:hover { background-position: 100% 50%; box-shadow: 0 18px 34px -12px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .4); }
.btn-filled::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%); transform: translateX(-120%); transition: transform .8s var(--hx-ease); pointer-events: none; }
.btn-filled:hover::after { transform: translateX(120%); }
.btn-outlined { background: var(--card-solid); border: 1px solid var(--stroke-strong); color: var(--md-on-surface); }
.btn-outlined:hover { border-color: color-mix(in oklab, var(--hx-violet) 50%, var(--stroke-strong)); box-shadow: 0 10px 24px -14px var(--glow); }
.icon-button { border-radius: 12px; transition: background .25s, transform .35s var(--hx-spring); }
.icon-button:hover { transform: scale(1.08); background: color-mix(in oklab, var(--hx-violet) 12%, transparent); }

input, select, textarea, .form-field input, .search-field input { transition: border-color .25s var(--hx-ease), box-shadow .25s var(--hx-ease), background .25s; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus, .search-field:focus-within, .field:focus-within { border-color: var(--hx-violet) !important; box-shadow: 0 0 0 4px var(--ring) !important; outline: none; }
.chip, .tab-btn { transition: background .25s var(--hx-ease), color .25s, transform .3s var(--hx-spring), border-color .25s; }
.chip:hover { transform: translateY(-1px); }
.chip.active, .chip[aria-pressed='true'], .chip.is-active { background: var(--accent-bg); color: #fff; border-color: transparent; box-shadow: 0 8px 18px -8px var(--glow); }

/* --------------------------------------------------------------------------
   5. Surfaces: cards get border light that follows the cursor
   -------------------------------------------------------------------------- */
.card, .kpi, .dash-card, .chart-section, .activity-card, .docs-card, .status-panel, .dash-head, .auth-card, .manage-card, .endpoint-admin {
  position: relative; background: var(--card); border: 1px solid var(--stroke); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  transition: transform .45s var(--hx-ease), box-shadow .45s var(--hx-ease), border-color .3s;
}
.kpi:hover, .dash-card:hover, .docs-card:hover, .card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: color-mix(in oklab, var(--hx-violet) 30%, var(--stroke)); }
.docs-card.expanded:hover { transform: none; }
.kpi::before, .dash-card::before, .hl-card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), color-mix(in oklab, var(--hx-violet) 16%, transparent), transparent 60%);
}
.kpi:hover::before, .dash-card:hover::before, .hl-card:hover::before { opacity: 1; }
.dash-title { font-weight: 700; letter-spacing: -.04em; }
.data-table th { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--md-on-surface-variant); background: color-mix(in oklab, var(--hx-violet) 5%, transparent); }
.data-table tbody tr { transition: background .2s; }
.data-table tbody tr:hover { background: color-mix(in oklab, var(--hx-violet) 6%, transparent); }
.modal-overlay .modal, .toast { border-radius: 22px; box-shadow: var(--shadow-3); }
.toast { animation: hx-toast .5s var(--hx-spring) both; }
@keyframes hx-toast { from { opacity: 0; transform: translateY(16px) scale(.94); } to { opacity: 1; transform: none; } }

/* Auth */
.auth-visual { background:
  radial-gradient(60% 70% at 100% 0%, rgba(255, 106, 168, .55), transparent 65%),
  radial-gradient(60% 70% at 0% 100%, rgba(34, 199, 232, .42), transparent 65%),
  linear-gradient(150deg, #2B1BB8 0%, #5B33E8 50%, #A23FE0 100%); background-size: 140% 140%; animation: hx-drift 14s ease-in-out infinite alternate; }
@keyframes hx-drift { to { background-position: 100% 100%; } }
.auth-visual::before, .auth-visual::after { clip-path: none !important; border-radius: 50%; animation: hx-float 9s ease-in-out infinite; }
.auth-visual::after { animation-delay: -4s; }
.auth-card { animation: hx-page-in .8s var(--hx-ease) both; }
.btn-google { border-radius: 14px; transition: transform .3s var(--hx-spring), box-shadow .3s, border-color .3s; }
.btn-google:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
@keyframes hx-float { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(0, -22px, 0); } }

/* --------------------------------------------------------------------------
   6. Scroll-reveal utility (driven by hiaron.js)
   -------------------------------------------------------------------------- */
.hx-reveal { opacity: 0; transform: translateY(26px); filter: blur(5px); transition: opacity .9s var(--hx-ease), transform .9s var(--hx-ease), filter .9s var(--hx-ease); transition-delay: calc(var(--d, 0) * 70ms); }
.hx-reveal.in { opacity: 1; transform: none; filter: none; }
.hx-reveal[data-reveal='left'] { transform: translateX(-34px); }
.hx-reveal[data-reveal='right'] { transform: translateX(34px); }
.hx-reveal[data-reveal='zoom'] { transform: scale(.92); }
.hx-reveal.in[data-reveal] { transform: none; }

/* ==========================================================================
   7. LANDING (hl-*)
   ========================================================================== */
html:has(body.lp) { overflow-x: clip; }
body.lp { background: var(--md-surface); overflow-x: clip; }
.hl-code { max-width: 100%; box-sizing: border-box; }
body.lp::before { display: none; }
.hl-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 32px); }

/* background layers */
.hl-bg { position: absolute; inset: 0 0 auto 0; height: 980px; z-index: -1; overflow: hidden; pointer-events: none; }
.hl-bg::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(color-mix(in oklab, var(--md-on-surface) 18%, transparent) 1px, transparent 1.2px); background-size: 28px 28px; -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, #000, transparent 75%); mask-image: radial-gradient(70% 60% at 50% 30%, #000, transparent 75%); opacity: .5; }
.hl-blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; will-change: transform; }
.hl-blob.b1 { width: 560px; height: 560px; left: -140px; top: -160px; background: var(--hx-violet); animation: hl-blob 18s ease-in-out infinite alternate; }
.hl-blob.b2 { width: 480px; height: 480px; right: -120px; top: -60px; background: var(--hx-magenta); opacity: .38; animation: hl-blob 22s ease-in-out -6s infinite alternate-reverse; }
.hl-blob.b3 { width: 420px; height: 420px; left: 38%; top: 260px; background: var(--hx-cyan); opacity: .28; animation: hl-blob 26s ease-in-out -12s infinite alternate; }
@keyframes hl-blob { 0% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(70px, 50px, 0) scale(1.15); } 100% { transform: translate3d(-40px, 90px, 0) scale(.95); } }

/* nav */
.hl-nav { position: fixed; top: 14px; left: 0; right: 0; z-index: 500; display: flex; justify-content: center; padding: 0 14px; pointer-events: none; }
.hl-nav-inner { pointer-events: auto; width: min(100%, 1040px); height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 10px 0 14px; border-radius: 999px; background: var(--glass); border: 1px solid var(--stroke); box-shadow: var(--shadow-2); -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%); transition: width .6s var(--hx-ease), background .3s, box-shadow .3s, transform .5s var(--hx-ease); animation: hl-drop .9s var(--hx-ease) both; }
body.is-scrolled .hl-nav-inner { width: min(100%, 880px); background: var(--glass-strong); box-shadow: var(--shadow-3); }
@keyframes hl-drop { from { opacity: 0; transform: translateY(-30px) scale(.96); } to { opacity: 1; transform: none; } }
.hl-nav .brand { padding: 0; gap: 10px; }
.hl-links { display: flex; gap: 2px; }
.hl-link { position: relative; padding: 9px 15px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--md-on-surface-variant); transition: color .25s, background .25s; }
.hl-link:hover { color: var(--md-on-surface); background: color-mix(in oklab, var(--hx-violet) 10%, transparent); }
.hl-actions { display: flex; align-items: center; gap: 8px; }
.hl-actions .btn { height: 42px; padding: 0 18px; border-radius: 999px; font-size: 14px; }

/* hero */
.hl-hero { position: relative; padding: 168px 0 70px; text-align: center; }
.hl-badge { display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px 7px 12px; border-radius: 999px; background: var(--card-solid); border: 1px solid var(--stroke-strong); box-shadow: var(--shadow-1); font-size: 13px; font-weight: 600; color: var(--md-on-surface-variant); }
.hl-badge .dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--md-success); }
.hl-badge .dot::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--md-success); opacity: 0; animation: hl-ping 2s ease-out infinite; }
.hl-badge .dot.down { background: var(--md-error); } .hl-badge .dot.down::after { border-color: var(--md-error); }
@keyframes hl-ping { 0% { transform: scale(.5); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }
.hl-title { margin: 26px auto 22px; max-width: 14ch; font-size: clamp(46px, 9vw, 108px); font-weight: 800; line-height: .96; letter-spacing: -.055em; text-wrap: balance; }
.hl-title .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.hl-title .w > span { display: inline-block; transform: translateY(110%) rotate(4deg); animation: hl-word 1s var(--hx-ease) forwards; animation-delay: calc(var(--i) * 90ms + 200ms); }
@keyframes hl-word { to { transform: none; } }
.hl-grad { background: linear-gradient(100deg, var(--hx-violet), var(--hx-magenta), var(--hx-pink), var(--hx-violet)); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; animation: hl-shimmer 6s linear infinite; }
@keyframes hl-shimmer { to { background-position: 250% 0; } }
.hl-sub { max-width: 56ch; margin: 0 auto 36px; font-size: clamp(16px, 2vw, 20px); line-height: 1.65; color: var(--md-on-surface-variant); text-wrap: pretty; }
.hl-cta { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.hl-cta .btn { height: 56px; padding: 0 30px; font-size: 16px; border-radius: 18px; }
.hl-fade { opacity: 0; transform: translateY(18px); animation: hl-fade 1s var(--hx-ease) forwards; animation-delay: calc(var(--d, 0) * 1ms); }
@keyframes hl-fade { to { opacity: 1; transform: none; } }

/* hero visual: terminal + floating chips */
.hl-stage { position: relative; margin: 70px auto 0; max-width: 780px; perspective: 1400px; }
.hl-term { position: relative; text-align: left; border-radius: 24px; background: var(--code-bg); border: 1px solid var(--code-border); box-shadow: 0 60px 100px -40px var(--glow), 0 24px 50px -24px rgba(10, 6, 40, .6), inset 0 1px 0 rgba(255, 255, 255, .08); transform-style: preserve-3d; transition: transform .25s ease-out; will-change: transform; overflow: hidden; }
.hl-term::before { content: ''; position: absolute; inset: 0; background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 0%), rgba(139, 92, 246, .22), transparent 60%); pointer-events: none; }
.hl-term-bar { display: flex; align-items: center; gap: 7px; padding: 14px 18px; border-bottom: 1px solid var(--code-border); color: #8C84B8; font: 500 12.5px var(--font-mono); }
.hl-term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #FF5F57; } .hl-term-bar i:nth-child(2) { background: #FEBC2E; } .hl-term-bar i:nth-child(3) { background: #28C840; }
.hl-term-bar span { margin-left: 10px; }
.hl-term pre { margin: 0; padding: 22px 24px 26px; min-height: 196px; font: 500 14.5px/1.75 var(--font-mono); color: #DCD7F8; white-space: pre-wrap; word-break: break-all; }
.hl-term .c { color: #6F68A0; } .hl-term .k { color: #B79CFF; } .hl-term .s { color: #7BE4C0; } .hl-term .n { color: #FFB86B; }
.hl-caret { display: inline-block; width: 8px; height: 1.1em; margin-left: 2px; vertical-align: -.18em; background: #B79CFF; animation: hl-blink 1s steps(1) infinite; }
@keyframes hl-blink { 50% { opacity: 0; } }
.hl-chip { position: absolute; display: inline-flex; align-items: center; gap: 9px; padding: 10px 16px; border-radius: 16px; background: var(--glass-strong); border: 1px solid var(--stroke-strong); box-shadow: var(--shadow-3); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); font-size: 13px; font-weight: 650; animation: hl-bob 6s ease-in-out infinite; }
.hl-chip i { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: #fff; font-size: 13px; background: var(--accent-bg); }
.hl-chip.c1 { left: -38px; top: 14%; } .hl-chip.c2 { right: -34px; top: 44%; animation-delay: -2s; } .hl-chip.c3 { left: 8%; bottom: -26px; animation-delay: -4s; }
.hl-chip.c2 i { background: linear-gradient(135deg, #0E9F6E, #22C7E8); } .hl-chip.c3 i { background: linear-gradient(135deg, #FF6AA8, #D14BF0); }
@keyframes hl-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* stats */
.hl-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 90px auto 0; max-width: 980px; }
.hl-stat { padding: 22px 18px; border-radius: 22px; background: var(--card); border: 1px solid var(--stroke); text-align: center; transition: transform .45s var(--hx-spring), box-shadow .4s; }
.hl-stat:hover { transform: translateY(-5px); box-shadow: var(--shadow-2); }
.hl-stat b { display: block; font: 800 clamp(26px, 4vw, 38px)/1.1 var(--font-display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; background: var(--accent-bg); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hl-stat span { display: block; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--md-on-surface-variant); }

/* marquee */
.hl-marquee { margin-top: 70px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.hl-track { display: flex; gap: 12px; width: max-content; animation: hl-marquee 38s linear infinite; }
.hl-marquee:hover .hl-track { animation-play-state: paused; }
.hl-track .lp-cat, .hl-pill { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 999px; background: var(--card-solid); border: 1px solid var(--stroke); font-size: 14px; font-weight: 650; white-space: nowrap; color: var(--md-on-surface); transition: transform .3s var(--hx-spring), border-color .3s; }
.hl-track .lp-cat:hover, .hl-pill:hover { transform: translateY(-3px); border-color: var(--hx-violet); }
.lp-cat small, .hl-pill small { padding: 2px 8px; border-radius: 999px; font-size: 11.5px; background: color-mix(in oklab, var(--hx-violet) 14%, transparent); color: var(--md-primary); }
@keyframes hl-marquee { to { transform: translateX(-50%); } }

/* sections */
.hl-section { position: relative; padding: 120px 0 20px; }
.hl-eyebrow { display: inline-block; margin-bottom: 14px; font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--md-primary); }
.hl-h2 { max-width: 18ch; margin: 0 0 16px; font-size: clamp(32px, 5.4vw, 58px); font-weight: 800; line-height: 1.02; letter-spacing: -.05em; text-wrap: balance; }
.hl-lead { max-width: 54ch; margin: 0; font-size: 18px; line-height: 1.65; color: var(--md-on-surface-variant); }
.hl-head { margin-bottom: 54px; }

/* bento */
.hl-bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.hl-card { position: relative; overflow: hidden; padding: 28px; border-radius: 28px; background: var(--card); border: 1px solid var(--stroke); box-shadow: var(--shadow-1); transition: transform .5s var(--hx-ease), box-shadow .5s var(--hx-ease), border-color .3s; isolation: isolate; }
.hl-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-3); border-color: color-mix(in oklab, var(--hx-violet) 35%, var(--stroke)); }
.hl-card .ic { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 22px; border-radius: 17px; font-size: 21px; color: #fff; background: var(--accent-bg); box-shadow: 0 14px 28px -12px var(--glow); transition: transform .5s var(--hx-spring); }
.hl-card:hover .ic { transform: rotate(-8deg) scale(1.12); }
.hl-card h3 { margin: 0 0 10px; font-size: 22px; font-weight: 700; letter-spacing: -.035em; }
.hl-card p { margin: 0; font-size: 15.5px; line-height: 1.65; color: var(--md-on-surface-variant); }
.hl-card code { padding: 2px 7px; border-radius: 7px; font: 500 .88em var(--font-mono); background: color-mix(in oklab, var(--hx-violet) 12%, transparent); color: var(--md-primary); }
.hl-card.s2 { grid-column: span 2; } .hl-card.s3 { grid-column: span 3; } .hl-card.s4 { grid-column: span 4; }
.hl-card.big { background: linear-gradient(150deg, #2B1BB8, #6D3CF0 55%, #B040E0); color: #fff; border-color: transparent; }
.hl-card.big p { color: rgba(255, 255, 255, .82); } .hl-card.big .ic { background: rgba(255, 255, 255, .2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4); }
.hl-card.big::after { content: ''; position: absolute; z-index: -1; right: -80px; bottom: -100px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .28), transparent 65%); animation: hl-float 8s ease-in-out infinite; }
@keyframes hl-float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-30px, -24px); } }
.hl-meter { display: flex; align-items: flex-end; gap: 6px; height: 64px; margin-top: 22px; }
.hl-meter i { flex: 1; border-radius: 6px 6px 3px 3px; background: rgba(255, 255, 255, .5); transform-origin: bottom; animation: hl-bar 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * 140ms); }
@keyframes hl-bar { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }

/* steps */
.hl-steps { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.hl-steps::before { content: ''; position: absolute; left: 8%; right: 8%; top: 38px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--hx-violet), var(--hx-magenta), var(--hx-cyan)); transform: scaleX(var(--p, 0)); transform-origin: 0 50%; opacity: .55; }
.hl-step { position: relative; padding: 28px; border-radius: 26px; background: var(--card); border: 1px solid var(--stroke); }
.hl-step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 20px; border-radius: 50%; font: 800 22px var(--font-display); color: #fff; background: var(--accent-bg); box-shadow: 0 0 0 8px var(--md-surface), 0 14px 28px -10px var(--glow); position: relative; z-index: 1; }
.hl-step h3 { margin: 0 0 8px; font-size: 21px; font-weight: 700; } .hl-step p { margin: 0; line-height: 1.65; color: var(--md-on-surface-variant); }

/* code showcase */
.hl-showcase > * { min-width: 0; }
.hl-showcase { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: center; }
.hl-tabs { display: inline-flex; gap: 4px; padding: 5px; margin-bottom: 16px; border-radius: 14px; background: var(--md-surface-container-high); }
.hl-tab { padding: 8px 16px; border: 0; border-radius: 10px; font: 650 13px var(--font-body); color: var(--md-on-surface-variant); background: transparent; cursor: pointer; transition: background .25s, color .25s, box-shadow .25s; }
.hl-tab.on { background: var(--card-solid); color: var(--md-on-surface); box-shadow: var(--shadow-1); }
.hl-code { margin: 0; padding: 24px 26px; border-radius: 24px; background: var(--code-bg); border: 1px solid var(--code-border); color: #DCD7F8; font: 500 13.5px/1.75 var(--font-mono); overflow: auto; box-shadow: var(--shadow-3); min-height: 230px; animation: hx-page-in .5s var(--hx-ease) both; }
.hl-list { display: grid; gap: 14px; margin: 28px 0 0; padding: 0; list-style: none; }
.hl-list li { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; }
.hl-list i { flex: none; width: 24px; height: 24px; display: grid; place-items: center; margin-top: 1px; border-radius: 50%; font-size: 11px; color: #fff; background: var(--accent-bg); }

/* categories */
.hl-cats { display: flex; flex-wrap: wrap; gap: 10px; }
.hl-cats .lp-cat { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; background: var(--card-solid); border: 1px solid var(--stroke); font-weight: 650; transition: transform .35s var(--hx-spring), box-shadow .3s, border-color .3s; }
.hl-cats .lp-cat:hover { transform: translateY(-4px) scale(1.04); border-color: var(--hx-violet); box-shadow: 0 14px 28px -14px var(--glow); }

/* final CTA */
.hl-final { position: relative; overflow: hidden; margin: 120px 0 0; padding: clamp(48px, 8vw, 96px) 28px; text-align: center; border-radius: 40px; color: #fff; isolation: isolate; background: linear-gradient(135deg, #2B1BB8, #6D3CF0 50%, #C03FE0); background-size: 160% 160%; animation: hx-drift 12s ease-in-out infinite alternate; }
.hl-final::before, .hl-final::after { content: ''; position: absolute; z-index: -1; border-radius: 50%; filter: blur(50px); animation: hl-blob 14s ease-in-out infinite alternate; }
.hl-final::before { width: 380px; height: 380px; left: -100px; top: -140px; background: rgba(34, 199, 232, .55); }
.hl-final::after { width: 340px; height: 340px; right: -80px; bottom: -140px; background: rgba(255, 106, 168, .55); animation-delay: -6s; }
.hl-final h2 { margin: 0 auto 14px; max-width: 16ch; font-size: clamp(34px, 6vw, 64px); font-weight: 800; line-height: 1.02; letter-spacing: -.05em; color: #fff; }
.hl-final p { max-width: 46ch; margin: 0 auto 32px; font-size: 18px; color: rgba(255, 255, 255, .85); }
.hl-final .btn { height: 56px; padding: 0 30px; border-radius: 18px; font-size: 16px; }
.hl-final .btn-light { background: #fff; color: #2B1BB8; border: 0; } .hl-final .btn-ghost { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .35); }

/* footer */
.hl-footer { margin-top: 90px; padding: 40px 0 46px; border-top: 1px solid var(--stroke); }
.hl-footer .hl-wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; color: var(--md-on-surface-variant); font-size: 14px; }
.hl-footer nav { display: flex; gap: 22px; } .hl-footer a:hover { color: var(--md-primary); }
.hl-footer .brand { padding: 0; }

/* responsive */
@media (max-width: 900px) {
  .hl-links { display: none; }
  .hl-bento { grid-template-columns: repeat(2, 1fr); } .hl-card.s2, .hl-card.s3, .hl-card.s4 { grid-column: span 2; }
  .hl-card.s2:not(.s4) { grid-column: span 1; }
  .hl-steps { grid-template-columns: 1fr; } .hl-steps::before { display: none; }
  .hl-showcase { grid-template-columns: minmax(0, 1fr); } .hl-stats { grid-template-columns: repeat(2, 1fr); }
  .hl-chip { display: none; }
}
@media (max-width: 560px) {
  .hl-hero { padding-top: 132px; } .hl-actions .btn-outlined { display: none; }
  .hl-bento { grid-template-columns: 1fr; } .hl-card.s2, .hl-card.s3, .hl-card.s4 { grid-column: auto; }
  .hl-term pre { font-size: 12.5px; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .hx-reveal, .hl-fade, .hl-title .w > span { opacity: 1 !important; transform: none !important; filter: none !important; }
}
