/* Geist and Geist Mono (SIL Open Font License), served from this site.
   Variable fonts split by script like Google Fonts does; a browser only
   downloads the subsets a page actually uses. */
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/static/fonts/geist-v5-latin.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: 'Geist'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/static/fonts/geist-v5-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/static/fonts/geist-v5-vietnamese.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/static/fonts/geist-v5-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/static/fonts/geist-v5-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url(/static/fonts/geist-mono-v6-latin.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: 'Geist Mono'; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url(/static/fonts/geist-mono-v6-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --r-xs: 6px; --r-sm: 8px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px; --r-full: 999px;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px;
  --s8: 32px; --s10: 40px; --s12: 48px; --s16: 64px; --s20: 80px; --s24: 96px;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --wrap: 1200px;
}

:root, [data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a090c;
  --bg-2: #0f0e12;
  --surface: #141318;
  --surface-2: #1b1a20;
  --surface-3: #24222a;
  --line: rgba(255, 255, 255, .075);
  --line-2: rgba(255, 255, 255, .12);
  --text: #f4f2f6;
  --text-2: #b4afbb;
  --text-3: #8b8692;
  --ok: #4ade80;   --ok-soft: rgba(74, 222, 128, .12);
  --warn: #fbbf24; --warn-soft: rgba(251, 191, 36, .12);
  --bad: #f87171;  --bad-soft: rgba(248, 113, 113, .12);
  --info: #7cb4ff; --info-soft: rgba(124, 180, 255, .12);
  --accent: #dc2626;
  --on-accent: #ffffff;
  --accent-text: #ff6b6b;
  --accent-soft: rgba(239, 68, 68, .13);
  --accent-line: rgba(239, 68, 68, .4);
  --accent-2: #fca5a5;
  --overlay: rgba(5, 4, 7, .7);
  --shadow: 0 1px 0 rgba(255, 255, 255, .035) inset, 0 16px 40px -20px rgba(0, 0, 0, .7);
  --shadow-lg: 0 24px 64px -16px rgba(0, 0, 0, .75);
}
[data-theme="light"] {
  color-scheme: light;
  --bg: #fbfafc;
  --bg-2: #f4f2f6;
  --surface: #ffffff;
  --surface-2: #f6f4f8;
  --surface-3: #ece9f0;
  --line: rgba(24, 18, 32, .09);
  --line-2: rgba(24, 18, 32, .15);
  --text: #17141c;
  --text-2: #534e5c;
  --text-3: #6b6674;
  --ok: #15803d;   --ok-soft: #dcfce7;
  --warn: #92400e; --warn-soft: #fef3c7;
  --bad: #b91c1c;  --bad-soft: #fee2e2;
  --info: #1d4ed8; --info-soft: #dbeafe;
  --accent: #dc2626;
  --on-accent: #ffffff;
  --accent-text: #b91c1c;
  --accent-soft: #fee2e2;
  --accent-line: #fca5a5;
  --accent-2: #fca5a5;
  --overlay: rgba(24, 18, 32, .45);
  --shadow: 0 1px 2px rgba(24, 18, 32, .05), 0 16px 40px -22px rgba(24, 18, 32, .22);
  --shadow-lg: 0 24px 64px -20px rgba(24, 18, 32, .3);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }
h1, h2, h3, h4 { font-weight: 620; letter-spacing: -.025em; line-height: 1.2; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; border-radius: var(--r-xs); }
::selection { background: var(--accent); color: var(--on-accent); }
[hidden] { display: none !important; }

.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; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--s8); }
.mono { font-family: var(--mono); font-feature-settings: 'zero' 1; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
code, kbd { font-family: var(--mono); font-size: .88em; padding: 1px 6px; border-radius: var(--r-xs); background: var(--surface-3); color: var(--text); }

.btn {
  --h: 42px;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  height: var(--h); padding: 0 var(--s5);
  border: 1px solid transparent; border-radius: var(--r-md);
  font-weight: 560; font-size: 14.5px; letter-spacing: -.005em; line-height: 1; white-space: nowrap;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), filter .15s, transform .15s var(--ease);
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover:not(:disabled) { filter: brightness(1.1); }
.btn-ghost { border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); }
.btn-quiet { color: var(--text-2); padding: 0 var(--s3); }
.btn-quiet:hover:not(:disabled) { color: var(--text); background: var(--surface-2); }
.btn-danger { background: var(--bad-soft); color: var(--bad); }
.btn-danger:hover:not(:disabled) { filter: brightness(1.15); }
.btn-lg { --h: 52px; padding: 0 var(--s6); font-size: 15.5px; border-radius: var(--r-lg); }
.btn-sm { --h: 34px; padding: 0 var(--s3); font-size: 13.5px; border-radius: var(--r-sm); }
.btn-block { width: 100%; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-color: var(--on-accent) var(--on-accent) transparent transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: var(--r-md); border: 1px solid var(--line); color: var(--text-2); transition: background-color .15s, color .15s; }
.icon-btn:hover { color: var(--text); background: var(--surface-2); }

.link { color: var(--accent-text); font-weight: 540; display: inline-flex; align-items: center; gap: 6px; }
.link:hover { text-decoration: underline; text-underline-offset: 4px; }
.link .i { transition: transform .15s var(--ease); }
.link:hover .i { transform: translateX(3px); }

.theme-toggle .sun { display: none; }
[data-theme="light"] .theme-toggle .sun { display: block; }
[data-theme="light"] .theme-toggle .moon { display: none; }

.field { display: grid; gap: 6px; }
.field + .field { margin-top: var(--s4); }
.label { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); font-size: 13px; font-weight: 520; color: var(--text-2); }
.label a { color: var(--accent-text); font-weight: 500; }
.label a:hover { text-decoration: underline; text-underline-offset: 3px; }
.hint { font-size: 13px; color: var(--text-3); }
.input, .select, .textarea {
  width: 100%; height: 44px; padding: 0 var(--s3);
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-md);
  color: var(--text); font-size: 15px; outline: none;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.textarea { height: auto; min-height: 96px; padding: var(--s3); resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent-text); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.is-invalid { border-color: var(--bad); }
.select {
  appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b8692' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
.input-wrap { position: relative; }
.input-wrap > .i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-wrap > .input { padding-left: 40px; }
.input-wrap > .trail { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); height: 32px; padding: 0 var(--s2); display: inline-flex; align-items: center; gap: 6px; border-radius: var(--r-sm); color: var(--text-2); font-size: 13px; }
.input-wrap > .trail:hover { background: var(--surface-3); color: var(--text); }
.input-wrap > .input:has(+ .trail) { padding-right: 84px; }

.switch { display: inline-flex; align-items: center; gap: var(--s2); font-size: 14px; color: var(--text-2); cursor: pointer; user-select: none; }
.switch input { appearance: none; width: 36px; height: 22px; flex: none; border-radius: var(--r-full); background: var(--surface-3); border: 1px solid var(--line-2); position: relative; cursor: pointer; transition: background-color .15s; }
.switch input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-2); transition: transform .2s var(--ease), background-color .2s; }
.switch input:checked { background: var(--accent); border-color: var(--accent); }
.switch input:checked::after { transform: translateX(14px); background: var(--on-accent); }

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r-md); background: var(--surface-2); }
.seg > button { height: 30px; padding: 0 var(--s3); border-radius: 7px; font-size: 13px; font-weight: 540; color: var(--text-2); transition: background-color .15s, color .15s; }
.seg > button:hover { color: var(--text); }
.seg > button.active, .seg > button[aria-pressed="true"], .seg > button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

.tabs { display: flex; gap: var(--s6); border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs > a, .tabs > button { position: relative; display: inline-flex; align-items: center; gap: var(--s2); padding: var(--s3) 0; font-size: 14.5px; font-weight: 540; color: var(--text-2); white-space: nowrap; }
.tabs > a:hover, .tabs > button:hover { color: var(--text); }
.tabs > .active, .tabs > [aria-current="page"], .tabs > [aria-selected="true"] { color: var(--text); }
.tabs > .active::after, .tabs > [aria-current="page"]::after, .tabs > [aria-selected="true"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow); }
.panel { padding: var(--s6); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s5); }
.panel-head h2, .panel-head h3 { font-size: 16px; font-weight: 600; letter-spacing: -.015em; }
.panel-head p { margin-top: 2px; font-size: 13px; color: var(--text-3); }

.tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: var(--r-full); font-size: 12px; font-weight: 560; line-height: 1; white-space: nowrap; background: var(--surface-3); color: var(--text-2); }
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.tag.info { background: var(--info-soft); color: var(--info); }
.tag.accent { background: var(--accent-soft); color: var(--accent-text); }

.alert { display: flex; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r-md); font-size: 14px; line-height: 1.5; background: var(--surface-2); color: var(--text-2); }
.alert .i { margin-top: 3px; }
.alert-error { background: var(--bad-soft); color: var(--bad); }
.alert-success { background: var(--ok-soft); color: var(--ok); }
.alert-warning { background: var(--warn-soft); color: var(--warn); }
.alert-info { background: var(--info-soft); color: var(--info); }


.tbl th { text-align: left; font-size: 12.5px; font-weight: 520; color: var(--text-3); padding: 0 var(--s3) var(--s3); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: var(--s3); border-bottom: 1px solid var(--line); font-size: 14px; color: var(--text-2); font-variant-numeric: tabular-nums; vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--surface-2); }
.tbl .r { text-align: right; }
.tbl .strong { color: var(--text); font-weight: 560; }

.modal-backdrop { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: var(--s4); background: var(--overlay); backdrop-filter: blur(4px); }
.modal { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: var(--s6); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); }

.toast-stack { position: fixed; z-index: 100; right: var(--s5); bottom: var(--s5); display: flex; flex-direction: column; gap: var(--s2); width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); font-size: 14px; color: var(--text); }

.skeleton { border-radius: var(--r-sm); background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.not-found { min-height: 100vh; min-height: 100dvh; padding: var(--s8) var(--s5); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.not-found .logo { margin-bottom: var(--s10); }
.not-found .eyebrow { font-family: var(--mono); font-size: 13px; color: var(--accent-text); }
.not-found h1 { margin-top: var(--s2); font-size: clamp(30px, 4vw, 40px); letter-spacing: -.035em; font-weight: 640; }
.not-found p:not(.eyebrow) { margin-top: var(--s3); color: var(--text-2); }
.not-found-actions { margin-top: var(--s6); display: flex; justify-content: center; gap: var(--s2); flex-wrap: wrap; }

.crumbs { display: flex; flex-wrap: wrap; gap: var(--s2); font-size: 13px; color: var(--text-3); }
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current="page"] { color: var(--text-2); }

.logo { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; letter-spacing: -.02em; color: var(--text); }
.logo img { width: 26px; height: 26px; border-radius: 7px; }
.logo b { font-weight: 650; }
.logo b span { color: var(--text-3); font-weight: 500; }

.site-head { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px); }
.site-head .wrap { height: 64px; display: flex; align-items: center; gap: var(--s8); }
.site-nav { display: flex; gap: var(--s1); }
.site-nav a { height: 36px; padding: 0 var(--s3); display: inline-flex; align-items: center; color: var(--text-2); font-size: 14px; font-weight: 500; }
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.site-actions { margin-left: auto; display: flex; align-items: center; gap: var(--s2); }
.nav-toggle { display: none; }
.site-head .site-menu { display: grid; height: auto; gap: 0; padding-top: var(--s2); padding-bottom: var(--s4); border-top: 1px solid var(--line); }
.site-menu a { padding: var(--s3) 0; font-size: 15px; font-weight: 500; color: var(--text-2); border-bottom: 1px solid var(--line); }
.site-menu a:last-child { border-bottom: 0; }
.site-menu a:hover { color: var(--text); }

.site-foot { margin-top: var(--s24); padding: var(--s12) 0 var(--s10); border-top: 1px solid var(--line); font-size: 14px; color: var(--text-2); }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: var(--s8); }
.foot-grid h2 { font-size: 13px; font-weight: 600; letter-spacing: 0; color: var(--text); margin-bottom: var(--s3); }
.foot-grid li + li { margin-top: var(--s2); }
.foot-grid a:hover { color: var(--text); }
.foot-soon { display: inline-flex; align-items: center; gap: var(--s2); }
.foot-soon .tag { height: 20px; padding: 0 7px; font-size: 11px; }
.foot-blurb { max-width: 42ch; margin-top: var(--s3); color: var(--text-3); font-size: 14px; line-height: 1.6; }
.foot-base { margin-top: var(--s10); padding-top: var(--s5); border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: var(--s4); color: var(--text-3); font-size: 13px; }
.foot-legal { display: flex; flex-wrap: wrap; gap: var(--s4); }
.foot-legal a:hover { color: var(--text); }
.foot-help { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); transition: color .15s; }
.foot-help .i { width: 16px; height: 16px; }
.foot-help:hover { color: var(--text); }

/* Touch screens: iOS Safari zooms into any field under 16px when it is
   tapped, and small text links need a 24px-tall hit area. */
@media (pointer: coarse) {
  .input, .select, .textarea { font-size: 16px; }
  .crumbs a, .foot-grid a, .foot-legal a, .label a { display: inline-block; padding: 4px 0; }
  .foot-grid li + li { margin-top: 0; }
}

@media (max-width: 900px) {
  .wrap { padding: 0 var(--s5); }
  .site-nav { display: none; }
  .nav-toggle { display: grid; }
  .site-head .wrap { gap: var(--s4); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 901px) {
  .site-menu { display: none !important; }
}
@media (max-width: 560px) {
  .site-actions .btn-quiet { display: none; }
  .site-head .wrap { gap: var(--s3); }
  .site-actions { gap: 6px; }
  .site-actions .btn-primary { --h: 36px; padding: 0 var(--s3); font-size: 13.5px; }
  .logo b span { display: none; }
  .foot-grid { grid-template-columns: 1fr; }
  .foot-base { flex-direction: column; }
}

@view-transition { navigation: auto; }
.site-head { view-transition-name: site-head; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .16s; }

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