/* Self-hosted variable fonts (latin). No external font requests; works under a strict CSP. */
@font-face{font-family:'Inter';font-style:normal;font-weight:100 900;font-display:swap;src:url(../xmat-fonts/Inter-latin-var.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:100 800;font-display:swap;src:url(../xmat-fonts/JetBrainsMono-latin-var.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

/* XMT design tokens. One neutral ramp, one accent (Xiaomi orange). */
:root{
  --bg:#0b0b0c;
  --surface:#121214;
  --raised:#1a1a1d;
  --line:rgba(255,255,255,.09);
  --line-strong:rgba(255,255,255,.16);

  --text:#f5f5f6;
  --text-2:#b6b6bd;
  --muted:#8a8a93;

  --accent:#ff6900;
  --accent-hover:#ff7f26;
  --accent-ink:#0b0b0c;

  --danger:#ff8a80;
  --danger-bg:rgba(255,92,80,.10);
  --danger-line:rgba(255,92,80,.35);
  --ok:#6fcf97;
  --ok-bg:rgba(111,207,151,.10);
  --ok-line:rgba(111,207,151,.30);

  --font:'Inter',system-ui,-apple-system,'Segoe UI',Roboto,Arial,sans-serif;
  --mono:'JetBrains Mono',ui-monospace,SFMono-Regular,Consolas,'Liberation Mono',monospace;

  --r-control:8px;
  --r-card:12px;
  --r-panel:16px;

  --ease:cubic-bezier(.2,.7,.2,1);
  --t-fast:.12s;
  --t-base:.2s;

  /* Legacy hero accents, sampled from the original index.php. Owner-approved exceptions, see CLAUDE.md. */
  --hero-eyebrow:#8fcbdf;
  --hero-eyebrow-line:linear-gradient(90deg,#26aff3,#8adeff);
  --hero-white:#fff;
  --hero-silver:#dbe3ea;
  --hero-silver-grad:linear-gradient(180deg,#fff 10%,#e2e8ee 42%,#8896a3 53%,#d5e1e9 80%);
  --hero-gold:#ff9d33;
  --hero-gold-grad:linear-gradient(135deg,#ffd296,#ffad48 35%,#ff871a 65%,#dc660b);
  --hero-rule:linear-gradient(90deg,#ff941c,#f8c078 35%,#42bced 75%,transparent);
  --card-line:rgba(255,155,54,.333);
  --glow-orange:255,138,22;
  --glow-blue:38,173,249;
  --shine:linear-gradient(110deg,transparent 38%,rgba(216,233,255,.125) 45%,rgba(255,255,255,.4) 50%,rgba(216,233,255,.125) 55%,transparent 62%);
  /* Button system: one height, one radius, one weight. */
  --btn-h:44px;
  --btn-h-dense:36px;
  --btn-r:var(--r-control);
  --btn-fw:600;
  --btn-fs:15px;
  --btn-fs-dense:13px;
  --btn-px:18px;
  --btn-gap:8px;
  --accent-active:#e66000;
  --btn-disabled:.5;
  --focus-ring:2px solid var(--accent);
  --focus-offset:2px;
  --t-feedback:.15s;
  --t-reveal:.4s;
  --tg-bg:rgba(18,48,66,.33);
  --tg-bg-hover:rgba(18,48,66,.6);
  --tg-line:rgba(50,159,214,.36);
  --tg-line-hover:#65cfff;
  --tg-text:#dbeef8;
  --tg-icon:#65cfff;
  --tg-r:10px;
  --glass:rgba(18,48,66,.33);
  --glass-line:rgba(50,159,214,.22);
  --grid-line:rgba(143,203,223,.05);
  --accent-rgb:255,105,0;
  --footer-grey:#b9c6d2;
  --brand-line:#a0adbd;
  --navy-0:#07090c;
  --navy-1:#0b1118;
}

/* Focus ring baseline for every interactive element (zero specificity, page rules may refine it). */
:where(a,button,input,select,textarea,summary,[tabindex]):focus-visible{outline:var(--focus-ring);outline-offset:var(--focus-offset)}
/* Busy state (assets/xmat/busy.js): small spinner, label "Please wait…". */
.xmt-spin{display:inline-block;width:14px;height:14px;margin-right:8px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;vertical-align:-2px;animation:xmt-spin .7s linear infinite}
@keyframes xmt-spin{to{transform:rotate(360deg)}}
button.is-busy:disabled{opacity:.85!important;cursor:progress}
@keyframes xmt-menu-in{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.xmt-spin{animation:none}}

/* Lucide icons (ISC), inline SVG sprite. Usage: <svg class="xmt-icon" aria-hidden="true"><use href="#i-name"></use></svg> */
.xmt-icon{width:1em;height:1em;flex:none;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round;vertical-align:-.125em}

/* Page shell: a full-height column. Short pages keep the footer at the bottom of the screen,
   long pages push it after the content. 100dvh follows the mobile address bar; 100vh is the fallback. */
body.xmt-public-page{display:flex;flex-direction:column;min-height:100vh;min-height:100dvh}
body.xmt-public-page>main,body.xmt-public-page>.container{flex:1 0 auto}
body.xmt-public-page>footer{flex:none;margin-top:auto}
