/* ==========================================================================
   OneMCP design system — "Glacier"
   Structure and components ported from the Geist / vercel-ui language
   (github.com/imMatheus/vercel-ui, MIT) to plain CSS. Brand palette:
   glacier blue, navy, lemon, white.

   Loaded by every page: <link rel="stylesheet" href="/assets/ds.css" />
   Behaviour (theme toggle, mobile menu, tabs, copy buttons): /assets/site.js

   INDEX
   1 tokens        2 base           3 layout         4 site nav + footer
   5 buttons       6 forms          7 cards + bento  8 badges, dots, kbd
   9 notes         10 code/snippet  11 tabs          12 tables
   13 overlays     14 feedback      15 prose         16 marketing blocks
   17 app shell    18 utilities
   ========================================================================== */

/* 1 — TOKENS ------------------------------------------------------------- */
:root {
  /* brand ramps */
  --glacier-50: #f4fafd;  --glacier-100: #e6f3f9; --glacier-200: #cfe8f3;
  --glacier-300: #b3dcec; --glacier-400: #8cc8e0; --glacier-500: #5fafd0;
  --glacier-600: #3a8fb5;
  --navy-500: #2b5aa3; --navy-600: #1c4480; --navy-700: #12305a;
  --navy-800: #0b1f3a; --navy-900: #071527;
  --lemon-200: #fff7ad; --lemon-300: #fff27a; --lemon-400: #ffe94a;
  --lemon-500: #f5d90a; --lemon-600: #c9af00;

  /* semantic — light theme */
  --bg: #ffffff;
  --bg-2: var(--glacier-50);
  --surface: #ffffff;
  --surface-2: var(--glacier-100);
  --surface-3: var(--glacier-200);
  --fg: var(--navy-800);
  --fg-2: #3d5170;
  --fg-3: #6b7d97;
  --border: rgba(11, 31, 58, 0.12);
  --border-strong: rgba(11, 31, 58, 0.24);
  --link: #14609c;
  --primary: var(--navy-800);
  --primary-hover: var(--navy-700);
  --primary-fg: #ffffff;
  --accent: var(--lemon-400);
  --accent-hover: var(--lemon-500);
  --accent-fg: var(--navy-800);
  --highlight: var(--glacier-300);
  --success: #1a8a55; --success-bg: #e5f6ee;
  --warning: #a66b00; --warning-bg: #fff6d6;
  --danger: #cc3333;  --danger-bg: #fdeaea;
  --info: #14609c;    --info-bg: var(--glacier-100);
  --nav-bg: rgba(255, 255, 255, 0.82);
  --code-bg: var(--glacier-50);
  --overlay: rgba(7, 21, 39, 0.45);
  --grid-line: rgba(11, 31, 58, 0.06);

  --shadow-sm: 0 1px 2px rgba(11, 31, 58, 0.06);
  --shadow-md: 0 2px 4px rgba(11, 31, 58, 0.05), 0 8px 16px -6px rgba(11, 31, 58, 0.1);
  --shadow-lg: 0 2px 4px rgba(11, 31, 58, 0.04), 0 12px 24px -6px rgba(11, 31, 58, 0.1), 0 28px 48px -12px rgba(11, 31, 58, 0.14);
  --ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--glacier-500);

  --font-sans: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px; --r-full: 999px;
  --nav-h: 64px;
  --container: 1200px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}

/* dark theme: explicit choice … */
:root[data-theme="dark"] {
  --bg: var(--navy-900);
  --bg-2: #091a31;
  --surface: var(--navy-800);
  --surface-2: #102a4d;
  --surface-3: var(--navy-700);
  --fg: #f2f8fc;
  --fg-2: #b9cde0;
  --fg-3: #7f97b3;
  --border: rgba(179, 220, 236, 0.14);
  --border-strong: rgba(179, 220, 236, 0.28);
  --link: var(--glacier-400);
  --primary: var(--lemon-400);
  --primary-hover: var(--lemon-300);
  --primary-fg: var(--navy-900);
  --highlight: var(--glacier-400);
  --success: #4fd392; --success-bg: rgba(79, 211, 146, 0.12);
  --warning: #ffc857; --warning-bg: rgba(255, 200, 87, 0.12);
  --danger: #ff7b7b;  --danger-bg: rgba(255, 123, 123, 0.12);
  --info: var(--glacier-400); --info-bg: rgba(140, 200, 224, 0.12);
  --nav-bg: rgba(7, 21, 39, 0.8);
  --code-bg: #091a31;
  --overlay: rgba(2, 8, 16, 0.65);
  --grid-line: rgba(179, 220, 236, 0.06);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.25), 0 8px 16px -6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.25), 0 12px 24px -6px rgba(0, 0, 0, 0.45), 0 28px 48px -12px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}
/* … or the system's, when the visitor never chose (same values, no JS needed) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--navy-900); --bg-2: #091a31; --surface: var(--navy-800);
    --surface-2: #102a4d; --surface-3: var(--navy-700);
    --fg: #f2f8fc; --fg-2: #b9cde0; --fg-3: #7f97b3;
    --border: rgba(179, 220, 236, 0.14); --border-strong: rgba(179, 220, 236, 0.28);
    --link: var(--glacier-400);
    --primary: var(--lemon-400); --primary-hover: var(--lemon-300); --primary-fg: var(--navy-900);
    --highlight: var(--glacier-400);
    --success: #4fd392; --success-bg: rgba(79, 211, 146, 0.12);
    --warning: #ffc857; --warning-bg: rgba(255, 200, 87, 0.12);
    --danger: #ff7b7b;  --danger-bg: rgba(255, 123, 123, 0.12);
    --info: var(--glacier-400); --info-bg: rgba(140, 200, 224, 0.12);
    --nav-bg: rgba(7, 21, 39, 0.8); --code-bg: #091a31;
    --overlay: rgba(2, 8, 16, 0.65); --grid-line: rgba(179, 220, 236, 0.06);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.25), 0 8px 16px -6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.25), 0 12px 24px -6px rgba(0, 0, 0, 0.45), 0 28px 48px -12px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

/* 2 — BASE --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans); font-size: 16px; line-height: 1.6;
  color: var(--fg); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100vh; overflow-x: hidden;
}
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.03em; font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.25rem); letter-spacing: -0.045em; font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.125rem; letter-spacing: -0.015em; }
h4 { font-size: 0.95rem; letter-spacing: -0.01em; }
p { text-wrap: pretty; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img, svg, video { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
code, kbd, pre, samp { font-family: var(--font-mono); font-size: 0.875em; }
:not(pre) > code {
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 0.1em 0.4em; border-radius: var(--r-sm); font-size: 0.82em;
}
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
::selection { background: var(--lemon-300); color: var(--navy-900); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-sm); }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* 3 — LAYOUT ------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.container-narrow { max-width: 760px; }
.container-wide { max-width: 1360px; }
.section { padding-block: clamp(64px, 9vw, 120px); border-top: 1px solid var(--border); }
.section-alt { background: var(--bg-2); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--fg-2); font-size: 1.125rem; margin-top: 16px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px;
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-3);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; background: var(--accent); border: 1px solid var(--border-strong); border-radius: 2px; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--fg-2); max-width: 62ch; }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-between { justify-content: space-between; }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .container { padding-inline: 16px; }
}

/* 4 — SITE NAV + FOOTER -------------------------------------------------- */
.site-nav {
  position: sticky; top: 0; z-index: 100; height: var(--nav-h);
  display: flex; align-items: center; gap: 32px; padding-inline: 24px;
  background: var(--nav-bg); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.03em; color: var(--fg); }
.nav-logo:hover { text-decoration: none; }
.nav-logo-mark {
  width: 26px; height: 26px; border-radius: 7px; background: var(--navy-800); color: var(--lemon-400);
  display: grid; place-items: center; font-size: 0.8rem; font-weight: 800; border: 1px solid var(--border-strong);
}
.nav-links { display: flex; align-items: center; gap: 4px; flex: 1; }
.nav-links a { color: var(--fg-2); font-size: 0.875rem; padding: 6px 10px; border-radius: var(--r-full); transition: color 0.15s, background 0.15s; }
.nav-links a:hover, .nav-links a.active { color: var(--fg); background: var(--surface-2); text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.nav-actions > a:not(.btn) { color: var(--fg-2); font-size: 0.875rem; padding: 6px 10px; }
.icon-btn {
  width: 32px; height: 32px; display: inline-grid; place-items: center; cursor: pointer;
  background: transparent; border: 1px solid var(--border); border-radius: var(--r-full); color: var(--fg-2);
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--fg); }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
.burger { display: none; }
/* language switcher is built by /i18n.js with inline styles — align it */
.lang-switch-btn { border-color: var(--border) !important; border-radius: var(--r-full) !important; font-size: 0.8125rem !important; padding: 5px 12px !important; color: var(--fg-2) !important; height: 32px; }
.lang-switch-menu { background: var(--surface) !important; border-color: var(--border) !important; box-shadow: var(--shadow-lg) !important; border-radius: var(--r-lg) !important; }
.lang-switch-menu a { color: var(--fg) !important; }
.lang-switch-menu a:hover { background: var(--surface-2); text-decoration: none; }
@media (max-width: 1080px) {
  .site-nav { gap: 12px; padding-inline: 16px; }
  .burger { display: inline-grid; }
  .nav-links {
    display: none; position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px;
    background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg);
  }
  .site-nav.open .nav-links { display: flex; }
  .nav-links a { padding: 12px 8px; border-radius: var(--r-md); font-size: 1rem; border-bottom: 1px solid var(--border); }
  .nav-actions .nav-secondary { display: none; }
}

.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); padding-block: 56px 32px; font-size: 0.875rem; color: var(--fg-2); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.footer-col h4 { font-size: 0.8125rem; color: var(--fg); margin-bottom: 12px; font-weight: 500; }
.footer-col a { display: block; color: var(--fg-2); padding: 4px 0; }
.footer-col a:hover { color: var(--fg); text-decoration: none; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--fg-3); font-size: 0.8125rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* 5 — BUTTONS ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--r-md);
  font-size: 0.875rem; font-weight: 500; line-height: 1; white-space: nowrap; cursor: pointer;
  border: 1px solid transparent; background: transparent; color: var(--fg);
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s var(--ease), box-shadow 0.15s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--primary); color: var(--primary-fg); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--primary-fg); }
.btn-accent { background: var(--accent); color: var(--accent-fg); border-color: rgba(11, 31, 58, 0.18); box-shadow: 0 1px 0 rgba(11, 31, 58, 0.12); }
.btn-accent:hover { background: var(--accent-hover); color: var(--accent-fg); }
.btn-secondary { background: var(--surface); border-color: var(--border-strong); color: var(--fg); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-ghost { color: var(--fg-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--fg); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { filter: brightness(0.93); }
.btn-danger-outline { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.btn-danger-outline:hover { background: var(--danger-bg); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 0.8125rem; border-radius: var(--r-sm); }
.btn-lg { height: 48px; padding: 0 22px; font-size: 1rem; border-radius: var(--r-lg); }
.btn-block { width: 100%; }
.btn-pill { border-radius: var(--r-full); }
.btn svg { width: 16px; height: 16px; flex: none; }

/* 6 — FORMS -------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: 0.8125rem; font-weight: 500; color: var(--fg-2); }
.hint { font-size: 0.8125rem; color: var(--fg-3); }
.input, .select, .textarea {
  width: 100%; height: 40px; padding: 0 12px; border-radius: var(--r-md);
  background: var(--surface); color: var(--fg); border: 1px solid var(--border-strong);
  font-size: 0.875rem; transition: border-color 0.15s, box-shadow 0.15s; outline: none;
}
.textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--fg-3); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--glacier-500); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--glacier-600); box-shadow: 0 0 0 3px color-mix(in srgb, var(--glacier-400) 40%, transparent); }
.input-lg { height: 48px; font-size: 1rem; border-radius: var(--r-lg); padding: 0 16px; }
.input-mono { font-family: var(--font-mono); font-size: 0.8125rem; }
.input.is-error { border-color: var(--danger); }
.select {
  appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b7d97' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; min-width: 0; }
.checkbox, .radio { width: 16px; height: 16px; accent-color: var(--navy-600); }
.switch { position: relative; display: inline-block; width: 36px; height: 20px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--surface-3); border: 1px solid var(--border-strong); border-radius: var(--r-full); transition: background 0.15s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform 0.18s var(--ease); }
.switch input:checked + span { background: var(--navy-600); border-color: var(--navy-600); }
.switch input:checked + span::after { transform: translateX(16px); }
/* six-box one-time code */
.otp { display: flex; gap: 8px; justify-content: center; }
.otp input {
  width: 46px; height: 54px; text-align: center; font-family: var(--font-mono); font-size: 1.375rem; font-weight: 600;
  background: var(--surface); color: var(--fg); border: 1px solid var(--border-strong); border-radius: var(--r-md); outline: none;
}
.otp input:focus { border-color: var(--glacier-600); box-shadow: 0 0 0 3px color-mix(in srgb, var(--glacier-400) 40%, transparent); }

/* 7 — CARDS + BENTO ------------------------------------------------------ */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px; }
.card-hover { transition: border-color 0.15s, box-shadow 0.2s, transform 0.2s var(--ease); }
.card-hover:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-2px); text-decoration: none; }
.card-flat { background: var(--bg-2); }
.card-navy { background: var(--navy-800); color: #f2f8fc; border-color: var(--navy-700); }
.card-navy p { color: #b9cde0; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.card-title { font-size: 1rem; font-weight: 600; letter-spacing: -0.015em; }
.card-desc { font-size: 0.875rem; color: var(--fg-2); }
.card-footer { margin: 24px -24px -24px; padding: 14px 24px; border-top: 1px solid var(--border); background: var(--bg-2); border-radius: 0 0 var(--r-lg) var(--r-lg); font-size: 0.8125rem; color: var(--fg-2); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); color: var(--fg); margin-bottom: 16px; }
.card-icon img, .card-icon svg { width: 22px; height: 22px; }
/* bento: cells share hairlines, the Vercel grid look */
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--r-xl); overflow: hidden; background: var(--border); gap: 1px; }
.bento.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bento.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bento-cell { background: var(--surface); padding: 28px; transition: background 0.15s; }
a.bento-cell { color: inherit; }
a.bento-cell:hover, .bento-cell.is-hover:hover { background: var(--bg-2); text-decoration: none; }
.bento-cell h3 { margin-bottom: 8px; }
.bento-cell p { color: var(--fg-2); font-size: 0.9375rem; }
.bento-cell.span-2 { grid-column: span 2; }
@media (max-width: 960px) { .bento, .bento.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .bento, .bento.cols-2, .bento.cols-4 { grid-template-columns: minmax(0, 1fr); } .bento-cell.span-2 { grid-column: auto; } }

/* 8 — BADGES, DOTS, KBD -------------------------------------------------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: var(--r-full); font-size: 0.75rem; font-weight: 500; white-space: nowrap; background: var(--surface-2); color: var(--fg-2); border: 1px solid var(--border); }
.badge-glacier { background: var(--glacier-200); color: var(--navy-800); border-color: transparent; }
.badge-lemon { background: var(--lemon-400); color: var(--navy-800); border-color: rgba(11, 31, 58, 0.14); }
.badge-navy { background: var(--navy-800); color: #fff; border-color: var(--navy-700); }
.badge-success { background: var(--success-bg); color: var(--success); border-color: transparent; }
.badge-warning { background: var(--warning-bg); color: var(--warning); border-color: transparent; }
.badge-danger { background: var(--danger-bg); color: var(--danger); border-color: transparent; }
.badge-outline { background: transparent; }
.status-dot { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8125rem; color: var(--fg-2); }
.status-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--fg-3); flex: none; }
.status-dot.ok::before { background: var(--success); box-shadow: 0 0 0 3px var(--success-bg); }
.status-dot.warn::before { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-bg); }
.status-dot.down::before { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-bg); }
.status-dot.pulse::before { animation: ds-pulse 2s infinite; }
@keyframes ds-pulse { 50% { opacity: 0.45; } }
.kbd { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; font-family: var(--font-mono); font-size: 0.75rem; color: var(--fg-2); background: var(--surface); border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: var(--r-sm); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--glacier-300); color: var(--navy-800); font-weight: 600; font-size: 0.8125rem; flex: none; }

/* 9 — NOTES -------------------------------------------------------------- */
.note { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--bg-2); font-size: 0.875rem; color: var(--fg-2); }
.note strong { color: var(--fg); }
.note-info { background: var(--info-bg); border-color: color-mix(in srgb, var(--info) 28%, transparent); }
.note-success { background: var(--success-bg); border-color: color-mix(in srgb, var(--success) 30%, transparent); }
.note-warning { background: var(--warning-bg); border-color: color-mix(in srgb, var(--warning) 32%, transparent); }
.note-danger { background: var(--danger-bg); border-color: color-mix(in srgb, var(--danger) 32%, transparent); }
.note-lemon { background: var(--lemon-200); border-color: var(--lemon-500); color: var(--navy-800); }
.note-lemon strong { color: var(--navy-900); }

/* 10 — CODE / SNIPPET ---------------------------------------------------- */
.snippet { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 6px 0 14px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-md); font-family: var(--font-mono); font-size: 0.8125rem; max-width: 100%; }
.snippet code { flex: 1; overflow-x: auto; white-space: nowrap; background: none; border: 0; padding: 0; font-size: inherit; scrollbar-width: none; }
.snippet code::before { content: "$ "; color: var(--fg-3); user-select: none; }
.snippet.no-prompt code::before { content: none; }
.copy-btn { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--fg-3); cursor: pointer; }
.copy-btn:hover { background: var(--surface-2); color: var(--fg); }
.copy-btn.copied { color: var(--success); }
.code-block { position: relative; background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.code-block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 40px; padding: 0 8px 0 16px; border-bottom: 1px solid var(--border); font-family: var(--font-mono); font-size: 0.75rem; color: var(--fg-3); background: var(--surface); }
.code-block pre, pre.code { margin: 0; padding: 16px; overflow-x: auto; font-size: 0.8125rem; line-height: 1.65; color: var(--fg); tab-size: 2; }
pre.code { background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--r-lg); }
.code-block > .copy-btn { position: absolute; top: 8px; right: 8px; background: var(--surface); border: 1px solid var(--border); }
.tok-key { color: var(--navy-500); } .tok-str { color: var(--success); } .tok-com { color: var(--fg-3); font-style: italic; } .tok-num { color: var(--warning); }
:root[data-theme="dark"] .tok-key { color: var(--glacier-400); }

/* 11 — TABS -------------------------------------------------------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tab { flex: none; padding: 10px 12px; font-size: 0.875rem; color: var(--fg-3); background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; transition: color 0.15s; white-space: nowrap; }
.tab:hover { color: var(--fg); }
.tab.active, .tab[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--fg); font-weight: 500; }
.tab-panel { display: none; padding-top: 24px; }
.tab-panel.active { display: block; }
/* segmented control */
.segmented { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); }
.segmented button, .segmented a { height: 30px; padding: 0 12px; border: 0; border-radius: 5px; background: transparent; font-size: 0.8125rem; color: var(--fg-2); cursor: pointer; display: inline-flex; align-items: center; }
.segmented .active { background: var(--surface); color: var(--fg); box-shadow: var(--shadow-sm); font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 30px; padding: 0 12px; border-radius: var(--r-full); border: 1px solid var(--border-strong); background: var(--surface); color: var(--fg-2); font-size: 0.8125rem; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: all 0.15s; }
.chip:hover { background: var(--surface-2); color: var(--fg); }
.chip.active { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
:root[data-theme="dark"] .chip.active { background: var(--glacier-300); border-color: var(--glacier-300); color: var(--navy-900); }

/* 12 — TABLES ------------------------------------------------------------ */
.table-wrap { border: 1px solid var(--border); border-radius: var(--r-lg); overflow-x: auto; background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table th { text-align: start; font-weight: 500; font-size: 0.75rem; color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.05em; padding: 10px 16px; background: var(--bg-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--bg-2); }
.table .num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.table .col-highlight { background: color-mix(in srgb, var(--lemon-300) 26%, transparent); }

/* 13 — OVERLAYS ---------------------------------------------------------- */
.modal-overlay { position: fixed; inset: 0; z-index: 300; display: none; align-items: center; justify-content: center; padding: 16px; background: var(--overlay); backdrop-filter: blur(4px); }
.modal-overlay.open, .modal-overlay.active, .modal-overlay.show { display: flex; }
.modal { width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); padding: 24px; animation: ds-pop 0.18s var(--ease); }
.modal-lg { max-width: 720px; }
.modal h3 { font-size: 1.25rem; margin-bottom: 8px; }
.modal p { color: var(--fg-2); font-size: 0.9375rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
@keyframes ds-pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
.menu { position: absolute; z-index: 200; min-width: 180px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); display: none; }
.menu.open { display: block; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: var(--r-sm); font-size: 0.875rem; color: var(--fg); cursor: pointer; text-align: start; }
.menu-item:hover { background: var(--surface-2); text-decoration: none; }
.menu-item.danger { color: var(--danger); }
.menu-sep { height: 1px; background: var(--border); margin: 6px -6px; }
[data-tip] { position: relative; }
[data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); padding: 5px 10px; background: var(--navy-800); color: #fff; font-size: 0.75rem; font-weight: 400; border-radius: var(--r-sm); white-space: nowrap; z-index: 250; pointer-events: none; box-shadow: var(--shadow-md); }
.toast-stack { position: fixed; right: 24px; bottom: 24px; z-index: 400; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 12px; min-width: 260px; max-width: 420px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); font-size: 0.875rem; animation: ds-pop 0.2s var(--ease); }
.toast-success { border-inline-start: 3px solid var(--success); }
.toast-error { border-inline-start: 3px solid var(--danger); }

/* 14 — FEEDBACK ---------------------------------------------------------- */
.progress { height: 8px; background: var(--surface-3); border-radius: var(--r-full); overflow: hidden; }
.progress-bar, .progress-fill { height: 100%; width: 0; background: var(--navy-600); border-radius: inherit; transition: width 0.5s var(--ease); }
:root[data-theme="dark"] .progress-bar, :root[data-theme="dark"] .progress-fill { background: var(--glacier-400); }
.progress-bar.warn, .progress-fill.warn { background: var(--warning); }
.progress-bar.danger, .progress-fill.danger { background: var(--danger); }
.spinner { width: 16px; height: 16px; border: 2px solid var(--border-strong); border-top-color: var(--fg); border-radius: 50%; animation: ds-spin 0.7s linear infinite; display: inline-block; }
@keyframes ds-spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: ds-shimmer 1.4s ease infinite; border-radius: var(--r-sm); min-height: 1em; }
@keyframes ds-shimmer { from { background-position: 100% 50%; } to { background-position: 0 50%; } }
.empty-state { text-align: center; padding: 48px 24px; border: 1px dashed var(--border-strong); border-radius: var(--r-lg); color: var(--fg-2); }
.empty-state h3 { color: var(--fg); margin-bottom: 6px; }
.stat-label { font-size: 0.8125rem; color: var(--fg-3); }
.stat-value { font-size: 2rem; font-weight: 600; letter-spacing: -0.04em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 0.8125rem; color: var(--fg-2); }
details.accordion { border-bottom: 1px solid var(--border); }
details.accordion summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; cursor: pointer; font-weight: 500; list-style: none; }
details.accordion summary::-webkit-details-marker { display: none; }
details.accordion summary::after { content: "+"; font-family: var(--font-mono); font-size: 1.25rem; color: var(--fg-3); transition: transform 0.2s var(--ease); flex: none; }
details.accordion[open] summary::after { transform: rotate(45deg); }
details.accordion > *:not(summary) { color: var(--fg-2); padding-bottom: 18px; max-width: 70ch; }

/* 15 — PROSE (docs, legal, blog articles) -------------------------------- */
.prose { font-size: 1rem; line-height: 1.75; color: var(--fg-2); max-width: 72ch; }
.prose > * + * { margin-top: 1.1em; }
.prose h1 { font-size: clamp(2rem, 4vw, 2.75rem); color: var(--fg); margin-bottom: 0.5em; }
.prose h2 { font-size: 1.5rem; color: var(--fg); margin-top: 2.4em; padding-top: 1.2em; border-top: 1px solid var(--border); }
.prose h3 { font-size: 1.125rem; color: var(--fg); margin-top: 1.8em; }
.prose strong { color: var(--fg); font-weight: 600; }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--link) 40%, transparent); }
.prose ul, .prose ol { padding-inline-start: 1.4em; }
.prose li + li { margin-top: 0.4em; }
.prose blockquote { border-inline-start: 3px solid var(--accent); padding-block: 4px; padding-inline: 16px 0; color: var(--fg); }
.prose pre { background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; overflow-x: auto; font-size: 0.8125rem; line-height: 1.65; color: var(--fg); }
.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.875rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: start; padding: 10px 14px; border: 1px solid var(--border); }
.prose th { background: var(--bg-2); color: var(--fg); font-weight: 500; }
.prose img { border-radius: var(--r-lg); border: 1px solid var(--border); }

/* 16 — MARKETING BLOCKS -------------------------------------------------- */
.hero { position: relative; padding-block: clamp(56px, 9vw, 112px) clamp(48px, 7vw, 88px); text-align: center; overflow: hidden; }
.hero::before { /* blueprint grid fading out, glacier wash at the top */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 50% 0%, color-mix(in srgb, var(--glacier-300) 55%, transparent), transparent 70%),
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 48px 48px;
  -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent);
}
:root[data-theme="dark"] .hero::before { background:
    radial-gradient(ellipse 70% 55% at 50% 0%, rgba(58, 143, 181, 0.28), transparent 70%),
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 48px 48px; }
.hero h1 { max-width: 16ch; margin-inline: auto; }
.hero .lead { margin: 24px auto 0; }
.hero-cta { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 6px; margin-bottom: 24px; border: 1px solid var(--border-strong); border-radius: var(--r-full); background: var(--surface); font-size: 0.8125rem; color: var(--fg-2); box-shadow: var(--shadow-sm); }
.hero-badge b { background: var(--lemon-400); color: var(--navy-800); font-weight: 600; font-size: 0.6875rem; padding: 2px 8px; border-radius: var(--r-full); text-transform: uppercase; letter-spacing: 0.04em; }
/* highlighter-pen emphasis for one phrase in a heading */
.mark { background: linear-gradient(transparent 58%, var(--lemon-400) 58%, var(--lemon-400) 92%, transparent 92%); color: inherit; font-style: normal; padding-inline: 0.08em; }
:root[data-theme="dark"] .mark { background: none; color: var(--lemon-400); }
.text-glacier { color: var(--glacier-600); font-style: normal; }
:root[data-theme="dark"] .text-glacier { color: var(--glacier-400); }
.logo-cloud { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.logo-tile { width: 48px; height: 48px; display: grid; place-items: center; background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.logo-tile img { width: 26px; height: 26px; object-fit: contain; }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--border); gap: 1px; overflow: hidden; }
.stats-row > div { background: var(--surface); padding: 24px; text-align: center; }
.steps { counter-reset: step; display: grid; gap: 24px; }
.step { counter-increment: step; position: relative; padding-inline-start: 52px; }
.step::before { content: counter(step); position: absolute; inset-inline-start: 0; top: 0; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--navy-800); color: var(--lemon-400); font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 600; }
.step h3 { margin-bottom: 6px; }
.step p { color: var(--fg-2); }
.pricing-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.price-card { display: flex; flex-direction: column; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 24px; position: relative; }
.price-card.featured { background: var(--navy-800); color: #f2f8fc; border-color: var(--navy-800); box-shadow: var(--shadow-lg); }
.price-card.featured .price-desc, .price-card.featured li { color: #b9cde0; }
.price-card.featured .btn { background: var(--lemon-400); color: var(--navy-800); border-color: var(--lemon-400); }
.price-card.featured .price-flag { position: absolute; top: -11px; inset-inline-start: 24px; }
.price-name { font-size: 0.875rem; font-weight: 500; }
.price-amount { font-size: 2.5rem; font-weight: 700; letter-spacing: -0.05em; line-height: 1; }
.price-amount small { font-size: 0.875rem; font-weight: 400; letter-spacing: 0; color: var(--fg-3); }
.price-card.featured .price-amount small { color: #b9cde0; }
.price-desc { font-size: 0.875rem; color: var(--fg-2); }
.price-card ul { list-style: none; padding: 0; display: grid; gap: 10px; font-size: 0.875rem; color: var(--fg-2); flex: 1; }
.price-card li { display: flex; gap: 10px; align-items: flex-start; }
.price-card li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 3px; border-radius: 50%; background: var(--glacier-300) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%230b1f3a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.5 8.2 2.3 2.3 4.7-5'/%3E%3C/svg%3E") center / 12px no-repeat; }
@media (max-width: 1080px) { .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .pricing-grid { grid-template-columns: minmax(0, 1fr); } }
.cta-band { background: var(--navy-800); color: #f2f8fc; border-radius: var(--r-xl); padding: clamp(40px, 6vw, 72px) 24px; text-align: center; position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 60% 80% at 50% 120%, rgba(140, 200, 224, 0.35), transparent 70%); }
.cta-band > * { position: relative; }
.cta-band p { color: #b9cde0; margin: 16px auto 28px; max-width: 52ch; }
.cta-band .btn-primary { background: var(--lemon-400); color: var(--navy-800); border-color: var(--lemon-400); }
.cta-band .btn-secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.3); }

/* 17 — APP SHELL (dashboard, keys) --------------------------------------- */
.app-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: calc(100vh - var(--nav-h)); }
.app-sidebar { position: sticky; top: var(--nav-h); align-self: start; height: calc(100vh - var(--nav-h)); overflow-y: auto; padding: 20px 12px; border-right: 1px solid var(--border); background: var(--bg-2); display: flex; flex-direction: column; gap: 2px; }
.app-sidebar-label { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-3); padding: 14px 10px 6px; font-weight: 500; }
.app-nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-md); font-size: 0.875rem; color: var(--fg-2); cursor: pointer; border: 0; background: none; width: 100%; text-align: left; }
.app-nav-item:hover { background: var(--surface-2); color: var(--fg); text-decoration: none; }
.app-nav-item.active { background: var(--surface); color: var(--fg); font-weight: 500; box-shadow: inset 0 0 0 1px var(--border), var(--shadow-sm); }
.app-nav-item svg { width: 16px; height: 16px; flex: none; color: var(--fg-3); }
.app-nav-item.active svg { color: var(--fg); }
.app-main { padding: 32px clamp(16px, 4vw, 48px) 80px; min-width: 0; }
.app-main > * { max-width: 1080px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 24px; margin-bottom: 32px; border-bottom: 1px solid var(--border); }
.page-header h1 { font-size: 1.75rem; letter-spacing: -0.035em; }
.page-header p { color: var(--fg-2); font-size: 0.9375rem; margin-top: 4px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); margin-bottom: 24px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 24px; border-bottom: 1px solid var(--border); }
.panel-head h2 { font-size: 1rem; letter-spacing: -0.015em; }
.panel-head p { font-size: 0.8125rem; color: var(--fg-2); margin-top: 2px; }
.panel-body { padding: 24px; }
.panel-foot { padding: 14px 24px; border-top: 1px solid var(--border); background: var(--bg-2); border-radius: 0 0 var(--r-lg) var(--r-lg); font-size: 0.8125rem; color: var(--fg-2); }
.list-row { display: flex; align-items: center; gap: 16px; padding: 14px 24px; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: var(--bg-2); }
.list-row-main { flex: 1; min-width: 0; }
.list-row-title { font-size: 0.875rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row-meta { font-size: 0.8125rem; color: var(--fg-3); }
.auth-wrap { min-height: calc(100vh - var(--nav-h)); display: grid; place-items: center; padding: 32px 16px; background: var(--bg-2); }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); padding: 32px; }
.auth-card h1 { font-size: 1.5rem; letter-spacing: -0.03em; margin-bottom: 6px; }
@media (max-width: 860px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .app-sidebar { position: static; height: auto; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: 8px 12px; }
  .app-sidebar-label { display: none; }
  .app-nav-item { width: auto; white-space: nowrap; }
}

/* 18 — UTILITIES --------------------------------------------------------- */
.text-center { text-align: center; } .text-right { text-align: right; }
.muted { color: var(--fg-2); } .subtle { color: var(--fg-3); }
.mono { font-family: var(--font-mono); } .small { font-size: 0.8125rem; } .xs { font-size: 0.75rem; }
.bold { font-weight: 600; } .nowrap { white-space: nowrap; } .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; } .mt-6 { margin-top: 48px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; }
.flex-1 { flex: 1; min-width: 0; } .w-full { width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* nav: "Mon espace" is a button on wide screens and a menu entry on small ones */
.nav-mobile-only { display: none; }
@media (max-width: 1080px) { .nav-links a.nav-mobile-only { display: block; } }
@media (max-width: 520px) { .site-nav [data-lang-switch] { display: none; } }

/* Cookie banner — injected by a Google Tag Manager tag with its own styles
   (not in this repo), so the brand colours are forced from here. */
#onemcp-banner { background: var(--navy-800) !important; color: #f2f8fc !important; border-top: 1px solid var(--navy-700) !important; font-family: var(--font-sans) !important; }
#onemcp-banner a { color: var(--glacier-300) !important; }
#onemcp-btn-accept { background: var(--lemon-400) !important; color: var(--navy-800) !important; border: 1px solid var(--lemon-400) !important; border-radius: var(--r-md) !important; font-weight: 500 !important; }
#onemcp-btn-refuse { background: transparent !important; color: #f2f8fc !important; border: 1px solid rgba(255, 255, 255, 0.3) !important; border-radius: var(--r-md) !important; }

/* These brand marks ship as white artwork; tiles are white in both themes. */
.logo-tile img[src$="/cursor.svg"], .logo-tile img[src$="/windsurf.svg"] { filter: invert(1); }

/* Same dark-only overrides for visitors whose system is dark and who never
   chose a theme (no data-theme yet on first paint). */
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
:root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
:root:not([data-theme="light"]) .tok-key { color: var(--glacier-400); }
:root:not([data-theme="light"]) .chip.active { background: var(--glacier-300); border-color: var(--glacier-300); color: var(--navy-900); }
:root:not([data-theme="light"]) .progress-bar, :root:not([data-theme="light"]) .progress-fill { background: var(--glacier-400); }
:root:not([data-theme="light"]) .mark { background: none; color: var(--lemon-400); }
:root:not([data-theme="light"]) .text-glacier { color: var(--glacier-400); }
:root:not([data-theme="light"]) .hero::before { background:
    radial-gradient(ellipse 70% 55% at 50% 0%, rgba(58, 143, 181, 0.28), transparent 70%),
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 48px 48px; }
}

/* Toast details (dashboard, admin) */
.toast { position: relative; padding-right: 40px; }
.toast-info { border-left: 3px solid var(--info); }
.toast-icon { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 0.75rem; font-weight: 700; background: var(--info-bg); color: var(--info); }
.toast-success .toast-icon { background: var(--success-bg); color: var(--success); }
.toast-error .toast-icon { background: var(--danger-bg); color: var(--danger); }
.toast-msg { flex: 1; line-height: 1.45; }
.toast-close { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border: 0; border-radius: var(--r-sm); background: none; color: var(--fg-3); cursor: pointer; font-size: 1rem; line-height: 1; }
.toast-close:hover { background: var(--surface-2); color: var(--fg); }
@media (max-width: 640px) { .toast-stack { left: 16px; right: 16px; bottom: 16px; } .toast { min-width: 0; max-width: none; } }
