/* URLY.UZ web UI — design system from the 2026-10 design handoff (tokens.css, COMPONENTS.md).
   Self-hosted, no external URLs (CSP: style-src 'self'; font-src 'self'). */

/* ---- fonts: Inter (interface), Manrope (display), JetBrains Mono (URLs, code) */
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900; src: url("/assets/fonts/inter-latin-wght-normal.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: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900; src: url("/assets/fonts/inter-latin-ext-wght-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900; src: url("/assets/fonts/inter-cyrillic-wght-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800; src: url("/assets/fonts/manrope-latin-wght-normal.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: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800; src: url("/assets/fonts/manrope-latin-ext-wght-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800; src: url("/assets/fonts/manrope-cyrillic-wght-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 100 800; src: url("/assets/fonts/jetbrains-mono-latin-wght-normal.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-display: swap; font-weight: 100 800; src: url("/assets/fonts/jetbrains-mono-latin-ext-wght-normal.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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 100 800; src: url("/assets/fonts/jetbrains-mono-cyrillic-wght-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

/* ---- tokens (handoff/tokens.css) */
:root {
  --brand-50: #FEF2F2; --brand-100: #FDDCDC; --brand-200: #FAB4B4; --brand-500: #F50909; --brand-600: #D30808; --brand-700: #AD0707;
  --graphite-950: #101213; --graphite-900: #1A1D1E; --graphite-800: #2A2E30; --graphite-700: #3D4245; --graphite-600: #5A6166;
  --graphite-500: #737B81; --graphite-400: #9AA1A6; --graphite-300: #C9CED2; --graphite-200: #E3E6E8; --graphite-100: #F1F3F4; --graphite-50: #F7F8F9;
  --white: #FFFFFF;
  --bg-page: #F7F8F9; --bg-surface: #FFFFFF; --bg-muted: #F1F3F4; --bg-dark: #1A1D1E; --bg-dark-elevated: #2A2E30;
  --text-primary: #1A1D1E; --text-secondary: #5A6166; --text-tertiary: #737B81; --text-disabled: #9AA1A6;
  --text-inverse: #FFFFFF; --text-inverse-muted: #B8BEC2; --text-brand: #D30808; --text-link: #1D4ED8;
  --border-default: #E3E6E8; --border-strong: #C9CED2; --border-dark: #3D4245; --focus-ring: #2563EB;
  --success-600: #15803D; --success-100: #DCFCE7; --success-50: #F0FDF4;
  --warning-600: #B45309; --warning-100: #FEF3C7; --warning-50: #FFFBEB;
  --error-600: #B42318; --error-100: #FEE4E2; --error-50: #FEF3F2;
  --info-600: #1D4ED8; --info-100: #DBEAFE; --info-50: #EFF6FF;
  --chart-1: #F50909; --chart-2: #1A1D1E; --chart-3: #2563EB; --chart-4: #F59E0B; --chart-5: #10B981; --chart-grid: #E3E6E8;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px;
  --space-8: 32px; --space-10: 40px; --space-12: 48px; --space-16: 64px; --space-20: 80px; --space-24: 96px;
  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 16px; --radius-xl: 24px; --radius-pill: 999px;
  --font-display: "Manrope", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --container-max: 1200px;
  --shadow-overlay: 0 8px 24px rgba(26, 29, 30, .12);
  --shadow-card: 0 12px 32px rgba(26, 29, 30, .06);
  --sidebar-w: 256px;
}

/* ---- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg-page); color: var(--text-primary);
  font: 400 15px/1.55 var(--font-body); min-height: 100vh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
main { flex: 1; outline: none; }
img { max-width: 100%; height: auto; }
a { color: var(--text-link); text-decoration: none; text-underline-offset: 2px; }
a:hover { color: var(--info-600); text-decoration: underline; }
.prose a, .help-article a, .legal a, .alert a, .note a { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; color: var(--text-primary); }
h1 { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 1.15rem + 1vw, 2rem); font-weight: 700; }
h3, .h3 { font-family: var(--font-body); font-size: 1rem; font-weight: 600; letter-spacing: 0; }
.h4 { font-family: var(--font-body); font-size: .9375rem; font-weight: 600; letter-spacing: 0; }
p { margin: 0 0 1em; }
code, .mono { font-family: var(--font-mono); font-size: .88em; }
code { background: var(--bg-muted); padding: .1em .4em; border-radius: var(--radius-sm); }
hr { border: 0; border-top: 1px solid var(--border-default); margin: 20px 0; }
.muted { color: var(--text-secondary); }
.small { font-size: .8125rem; }
.break { overflow-wrap: anywhere; }
.sr {
  position: absolute !important; 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: calc(var(--container-max) + 48px); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 808px; }
.skip { position: absolute; left: 12px; top: -48px; background: var(--graphite-900); color: #fff; padding: 8px 14px; border-radius: var(--radius-md); z-index: 50; }
.skip:focus { top: 12px; color: #fff; }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: 4px; }
.i { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: middle; }
.i-sm .i, .i.i-sm { width: 16px; height: 16px; }
::selection { background: var(--brand-100); }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* ---- language selector */
.lang { display: inline-flex; align-items: center; gap: 2px; height: 36px; padding: 0 4px 0 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--bg-surface); color: var(--text-secondary); }
.lang .i { width: 16px; height: 16px; margin-right: 4px; }
.lang a { padding: 4px 6px; border-radius: var(--radius-sm); font-size: .8125rem; font-weight: 600; color: var(--text-tertiary); text-decoration: none; min-width: 30px; text-align: center; line-height: 1.3; }
.lang a:hover { color: var(--text-primary); background: var(--bg-muted); }
.lang a[aria-current="true"] { color: var(--text-primary); background: var(--bg-muted); }
.lang-dark { background: transparent; border-color: var(--border-dark); color: var(--text-inverse-muted); }
.lang-dark a { color: var(--text-inverse-muted); }
.lang-dark a:hover, .lang-dark a[aria-current="true"] { background: var(--bg-dark-elevated); color: #fff; }

/* ---- site header */
.topbar { background: var(--bg-surface); border-bottom: 1px solid var(--border-default); position: sticky; top: 0; z-index: 20; }
.topbar-row { display: flex; align-items: center; gap: 16px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { display: block; height: 28px; width: auto; }
.mainnav { margin: 0 auto; }
.mainnav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.mainnav a { display: inline-flex; align-items: center; gap: 4px; padding: 8px 12px; border-radius: var(--radius-md); color: var(--text-secondary); text-decoration: none; font-size: .875rem; font-weight: 500; white-space: nowrap; }
.mainnav a:hover { background: var(--bg-muted); color: var(--text-primary); }
.mainnav a[aria-current="page"] { background: var(--bg-muted); color: var(--text-primary); }
.topbar-end { display: flex; align-items: center; gap: 8px; flex: none; }
.menu-toggle { display: none; }
.topbar .menu-btn { display: none; }
.who { display: inline-flex; align-items: center; gap: 6px; max-width: 260px; }
.who-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
form.inline { display: inline; margin: 0; }
@media (max-width: 1080px) {
  .topbar-row { flex-wrap: wrap; min-height: 60px; gap: 8px 12px; padding-top: 10px; padding-bottom: 10px; }
  .brand img { height: 24px; width: auto; }
  .topbar-end { margin-left: auto; }
  .topbar .menu-btn { display: inline-flex; }
  .mainnav { order: 3; width: 100%; display: none; margin: 0; }
  .menu-toggle:checked ~ .mainnav { display: block; }
  .mainnav ul { flex-direction: column; padding: 4px 0 8px; }
  .mainnav a { display: flex; padding: 12px; font-size: .9375rem; }
}
@media (max-width: 520px) {
  .topbar-end .btn-tertiary { display: none; }
  .topbar-end .btn { padding: 0 12px; }
}

/* ---- buttons (Button / Primary · Secondary · Tertiary · Destructive · Dark · On dark · Icon) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: var(--radius-md); border: 1px solid transparent;
  font: 600 .875rem/1.2 var(--font-body); text-decoration: none; cursor: pointer; white-space: nowrap;
  background: var(--bg-surface); color: var(--text-primary); border-color: var(--border-strong);
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn:hover { text-decoration: none; }
.btn .i { width: 16px; height: 16px; }
.btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: var(--radius-md); }
.btn:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; opacity: .45; }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: .8125rem; }
.btn-lg { min-height: 48px; padding: 0 22px; font-size: .9375rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--brand-500); color: #fff; border-color: var(--brand-500); }
.btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.btn-primary:active { background: var(--brand-700); border-color: var(--brand-700); }
.btn-accent { background: var(--brand-500); color: #fff; border-color: var(--brand-500); }
.btn-accent:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.btn-ghost { background: var(--bg-surface); color: var(--text-primary); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--bg-muted); color: var(--text-primary); }
.btn-ghost:active { background: var(--graphite-200); }
.btn-tertiary { background: transparent; border-color: transparent; color: var(--text-primary); }
.btn-tertiary:hover { background: var(--bg-muted); color: var(--text-primary); }
.btn-dark { background: var(--graphite-900); border-color: var(--graphite-900); color: #fff; }
.btn-dark:hover { background: var(--graphite-800); border-color: var(--graphite-800); color: #fff; }
.btn-on-dark { background: transparent; color: #fff; border-color: var(--border-dark); }
.btn-on-dark:hover { background: var(--bg-dark-elevated); border-color: var(--graphite-600); color: #fff; }
.btn-danger { background: var(--error-600); border-color: var(--error-600); color: #fff; }
.btn-danger:hover { background: #912018; border-color: #912018; color: #fff; }
.btn-danger-ghost { background: var(--bg-surface); color: var(--error-600); border-color: var(--border-strong); }
.btn-danger-ghost:hover { background: var(--error-50); border-color: var(--error-100); color: var(--error-600); }
.btn-icon { width: 40px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }
.btn-copy, .btn-copy-lg { cursor: pointer; }
.btn-copy { display: inline-flex; align-items: center; gap: 4px; font: 600 .75rem/1 var(--font-body); padding: 4px 8px; border-radius: var(--radius-sm); border: 1px solid var(--border-default); background: var(--bg-surface); color: var(--text-secondary); margin-left: 6px; min-height: 24px; vertical-align: middle; }
.btn-copy:hover { border-color: var(--border-strong); color: var(--text-primary); background: var(--bg-muted); }
.is-done { background: var(--success-50) !important; color: var(--success-600) !important; border-color: var(--success-100) !important; }

/* ---- badges, chips, statuses (Badge: radius-sm, 12px/600) */
.badge { display: inline-flex; align-items: center; gap: 6px; font: 600 .75rem/1.35 var(--font-body); padding: 3px 8px; border-radius: var(--radius-sm); vertical-align: middle; background: var(--bg-muted); color: var(--text-secondary); white-space: nowrap; }
.badge-plan, .badge-brand { background: var(--brand-50); color: var(--text-brand); }
.badge-accent, .badge-soon { background: var(--warning-50); color: var(--warning-600); }
.badge-soon { margin-bottom: 10px; }
.badge-app, .badge-dark, .badge-admin { background: var(--graphite-900); color: #fff; }
.badge-app { margin-left: 6px; }
.badge-success { background: var(--success-50); color: var(--success-600); }
.badge-info { background: var(--info-50); color: var(--info-600); }
.badge-error { background: var(--error-50); color: var(--error-600); }
.status { display: inline-flex; align-items: center; gap: 6px; font: 600 .75rem/1.35 var(--font-body); padding: 3px 8px; border-radius: var(--radius-sm); background: var(--bg-muted); color: var(--text-secondary); white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.status-sm { font-size: .6875rem; padding: 2px 7px; }
.status-active, .status-succeeded, .status-ok, .status-registered, .status-dom-active, .status-paid, .status-approved, .status-resolved, .status-delivered { background: var(--success-50); color: var(--success-600); }
.status-pending_review, .status-created, .status-pending, .status-submitted, .status-past_due, .status-duplicate, .status-dom-pending_dns, .status-paused, .status-held, .status-retrying { background: var(--warning-50); color: var(--warning-600); }
.status-blocked, .status-failed, .status-cancelled, .status-refunded, .status-rejected, .status-suspended, .status-dom-error, .status-disabled, .status-expired { background: var(--error-50); color: var(--error-600); }
.tag, .chip { display: inline-flex; align-items: center; font: 500 .75rem/1.4 var(--font-body); padding: 2px 8px; border-radius: var(--radius-pill); background: var(--bg-muted); color: var(--text-secondary); text-decoration: none; }
.tag:hover { color: var(--text-primary); background: var(--graphite-200); text-decoration: none; }
.tags { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: 6px; vertical-align: middle; }

/* ---- alerts (Alert: tinted fill, 1px tinted border, radius-md) */
.alert { position: relative; border-radius: var(--radius-md); padding: 12px 14px 12px 42px; margin: 0 0 16px; border: 1px solid var(--info-100); background: var(--info-50); color: var(--text-primary); font-size: .875rem; }
.alert::before { content: ""; position: absolute; left: 14px; top: 13px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--info-600); box-sizing: border-box; }
.alert p:last-child { margin-bottom: 0; }
.alert strong:first-child { display: block; margin-bottom: 2px; }
.alert-error { background: var(--error-50); border-color: var(--error-100); }
.alert-error::before { border-color: var(--error-600); }
.alert-warn { background: var(--warning-50); border-color: var(--warning-100); }
.alert-warn::before { border-color: var(--warning-600); border-radius: 3px; transform: rotate(45deg) scale(.8); }
.alert-success { background: var(--success-50); border-color: var(--success-100); }
.alert-success::before { border-color: var(--success-600); }
.flash { position: relative; margin: 16px 0 0; background: var(--graphite-900); color: #fff; border-radius: var(--radius-md); padding: 12px 14px 12px 42px; font-weight: 500; font-size: .875rem; box-shadow: var(--shadow-overlay); }
.flash::before { content: "✓"; position: absolute; left: 14px; top: 11px; width: 18px; height: 18px; border-radius: 50%; background: var(--chart-5); color: var(--graphite-900); font-size: .7rem; font-weight: 800; display: grid; place-items: center; }
.note { background: var(--bg-surface); border: 1px dashed var(--border-strong); border-radius: var(--radius-md); padding: 10px 14px; white-space: pre-line; }

/* ---- forms (Input · Select · Textarea · Checkbox · Radio) */
.field { margin: 0 0 16px; border: 0; padding: 0; min-width: 0; }
fieldset.field > legend { font-weight: 500; font-size: .875rem; margin-bottom: 8px; padding: 0; }
label { display: block; font-weight: 500; font-size: .875rem; margin-bottom: 6px; color: var(--text-primary); }
input[type="text"], input[type="email"], input[type="url"], input[type="password"], input[type="search"], input[type="number"], input[type="tel"], input[type="date"], input[type="datetime-local"], input[type="time"], select, textarea {
  width: 100%; font: 400 .875rem/1.4 var(--font-body); color: var(--text-primary); background: var(--bg-surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-md); padding: 9px 12px; min-height: 40px;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--text-tertiary); }
select { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg' viewBox='0 0 24 24' fill='none' stroke='%235A6166' stroke-width='2' stroke-linecap='round' stroke-linejoin='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; }
select[multiple] { background-image: none; padding-right: 12px; }
textarea { resize: vertical; line-height: 1.5; padding: 10px 12px; }
input:hover, select:hover, textarea:hover { border-color: var(--graphite-400); }
input:focus, select:focus, textarea:focus { border-color: var(--focus-ring); outline: 2px solid rgba(37, 99, 235, .25); outline-offset: 0; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--error-600); }
input[aria-invalid="true"]:focus { outline-color: rgba(180, 35, 24, .2); }
input:disabled, input[readonly], select:disabled, textarea:disabled { background: var(--bg-muted); color: var(--text-secondary); }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; accent-color: var(--brand-500); margin: 0; flex: none; }
input[type="file"] { font: inherit; font-size: .875rem; }
input[type="file"]::file-selector-button { font: 600 .8125rem var(--font-body); padding: 8px 12px; margin-right: 10px; border: 1px solid var(--border-strong); background: var(--bg-surface); border-radius: var(--radius-md); cursor: pointer; }
input[type="color"] { width: 48px; height: 40px; padding: 3px; border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--bg-surface); }
.hint { font-size: .8125rem; color: var(--text-tertiary); margin: 6px 0 0; }
.hint-upgrade { color: var(--warning-600); }
.field-error, .error-text { font-size: .8125rem; color: var(--error-600); margin: 6px 0 0; }
.field-check { display: flex; gap: 10px; align-items: flex-start; }
.field-check input { margin-top: 2px; }
.field-check label { font-weight: 400; }
label.radio { display: flex; align-items: center; gap: 10px; font-weight: 400; margin-bottom: 8px; min-height: 32px; }
.radio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 12px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 16px; }
.prefixed { display: flex; align-items: stretch; }
.prefixed .prefix { display: inline-flex; align-items: center; padding: 0 12px; background: var(--bg-muted); border: 1px solid var(--border-strong); border-right: 0; border-radius: var(--radius-md) 0 0 var(--radius-md); color: var(--text-secondary); font-family: var(--font-mono); font-size: .8125rem; white-space: nowrap; }
.prefixed input { border-radius: 0 var(--radius-md) var(--radius-md) 0; }
details.more { border-top: 1px solid var(--border-default); padding: 14px 0 4px; margin: 4px 0 8px; }
details.more summary { cursor: pointer; font-weight: 600; font-size: .875rem; padding: 4px 0; min-height: 32px; }
details.more[open] summary { margin-bottom: 8px; }
summary { cursor: pointer; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.check { display: flex; align-items: center; gap: 10px; margin: 8px 0; font-weight: 400; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.checks .check { margin: 4px 0; }
.form-inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.form-inline .field { flex: 1 1 220px; margin-bottom: 0; }
.choice-list { display: grid; gap: 8px; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border-default); border-radius: var(--radius-md); cursor: pointer; background: var(--bg-surface); font-weight: 400; }
.choice:hover { border-color: var(--border-strong); }
.choice:has(input:checked) { border-color: var(--brand-500); background: var(--brand-50); box-shadow: 0 0 0 1px var(--brand-500) inset; }
.choice input { margin-top: 2px; }
.choice-body { display: grid; gap: 2px; }
.choice-title { font-weight: 600; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }

/* ---- cards & sections */
.card { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-lg); padding: 20px; }
.card > h2:first-child, .card > .h3:first-child, .card > h3:first-child { margin-top: 0; }
.card h2 { font-family: var(--font-body); font-size: .9375rem; font-weight: 600; letter-spacing: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-head .sub { font-size: .75rem; color: var(--text-tertiary); margin: 2px 0 0; }
.card-link { font-size: .8125rem; font-weight: 500; text-decoration: none; }
.form-card { margin-bottom: 20px; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .cards-3 { grid-template-columns: 1fr; } }
.cards-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card-soon { background: var(--bg-page); border-style: dashed; }
.card-dark { background: var(--bg-dark); border-color: var(--bg-dark); color: var(--text-inverse); }
.card-dark h3, .card-dark h2 { color: #fff; }
.card-dark p { color: var(--text-inverse-muted); }
.feature-ic { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-md); background: var(--brand-50); color: var(--brand-600); margin-bottom: 14px; }
.card-dark .feature-ic { background: var(--bg-dark-elevated); color: #fff; }
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.section-alt { background: var(--bg-surface); border-top: 1px solid var(--border-default); border-bottom: 1px solid var(--border-default); }
.section-muted { background: var(--bg-muted); }
.section-title { margin-bottom: 32px; max-width: 720px; }
.section-title h2 { margin-bottom: 12px; }
.section-title p { color: var(--text-secondary); font-size: 1rem; margin: 0; }
.section-center { text-align: center; margin-left: auto; margin-right: auto; }
.page-head { padding: 56px 0 16px; }
.page-head h1 { margin-bottom: 12px; }
.lead { font-size: 1.0625rem; line-height: 1.6; color: var(--text-secondary); max-width: 46rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: .75rem; font-weight: 600; color: var(--text-brand); margin-bottom: 12px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: var(--radius-sm); background: var(--brand-50); color: var(--text-brand); font-size: .75rem; font-weight: 600; margin-bottom: 20px; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand-500); }
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 24px; } .section { padding: 56px 0; } }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { position: relative; padding: 10px 0 10px 30px; border-bottom: 1px solid var(--border-default); font-size: .9375rem; }
.checklist li:last-child { border-bottom: 0; }
.checklist li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 12px; height: 7px; border-left: 2px solid var(--success-600); border-bottom: 2px solid var(--success-600); transform: rotate(-45deg); }
.ticks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: .875rem; color: var(--text-primary); }
.ticks li { position: relative; padding-left: 22px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 10px; height: 5px; border-left: 2px solid var(--success-600); border-bottom: 2px solid var(--success-600); transform: rotate(-45deg); }
.prose { max-width: 808px; }
.prose h2 { margin-top: 1.8em; font-size: 1.5rem; }
.prose h3 { margin-top: 1.4em; }
.prose p, .prose li { color: var(--text-primary); line-height: 1.7; }
.prose pre { overflow-x: auto; background: var(--bg-surface); border: 1px solid var(--border-default); padding: 12px; border-radius: var(--radius-md); }
.prose img { max-width: 100%; border-radius: var(--radius-md); }
.prose blockquote { margin: 1em 0; padding: 4px 16px; border-left: 3px solid var(--brand-500); color: var(--text-secondary); }

/* ---- hero */
.hero { padding: 72px 0 80px; background: var(--bg-surface); border-bottom: 1px solid var(--border-default); }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.5rem); line-height: 1.08; letter-spacing: -.03em; font-weight: 700; max-width: 14ch; margin-bottom: 20px; }
.hero .lead { font-size: 1.0625rem; max-width: 34rem; }
.shorten-card { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-lg); padding: 12px 14px 12px; margin: 28px 0 20px; max-width: 520px; box-shadow: var(--shadow-card); }
.shorten { display: flex; gap: 8px; margin: 0; }
.shorten-icon { position: relative; flex: 1; }
.shorten-icon .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-tertiary); pointer-events: none; }
.shorten input { min-height: 44px; padding-left: 36px; }
.shorten .btn { min-height: 44px; }
.shorten-card .hint { margin: 10px 2px 0; font-size: .75rem; }
.mock { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-xl); padding: 14px; box-shadow: 0 24px 64px rgba(26, 29, 30, .10); }
.mock-head { display: flex; align-items: center; gap: 10px; padding: 2px 2px 12px; border-bottom: 1px solid var(--border-default); margin-bottom: 12px; }
.mock-head img { height: 18px; width: auto; }
.mock-head span { font-size: .6875rem; color: var(--text-tertiary); }
.mock-head .btn { margin-left: auto; pointer-events: none; }
.mock-tag { display: inline-flex; margin: 0; padding: 2px 8px; border-radius: var(--radius-sm); font-size: .6875rem; font-weight: 600; background: var(--warning-50); color: var(--warning-600); }
.mock-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.mock-tile { border: 1px solid var(--border-default); border-radius: var(--radius-md); padding: 12px; }
.mock-tile small { display: block; font-size: .6875rem; color: var(--text-secondary); margin-bottom: 6px; }
.mock-tile strong { display: block; font: 700 1rem/1.2 var(--font-display); }
.mock-bars { border: 1px solid var(--border-default); border-radius: var(--radius-md); padding: 12px; margin-bottom: 8px; }
.mock-bars small { display: block; font-size: .6875rem; font-weight: 600; margin-bottom: 10px; }
.mock-bars .bars { display: flex; align-items: flex-end; gap: 4px; height: 90px; }
.mock-bars .bars span { flex: 1; background: var(--brand-200); border-radius: 2px 2px 0 0; }
.mock-bars .bars span:last-child { background: var(--brand-500); }
.mock-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border-default); border-radius: var(--radius-md); padding: 10px 12px; margin-top: 8px; }
.mock-row b { display: block; font-size: .75rem; font-weight: 600; }
.mock-url { font-family: var(--font-mono); font-size: .6875rem; color: var(--text-brand); }
.mock-row .status { margin-left: auto; }
.h1 { height: 24%; } .h2 { height: 32%; } .h3b { height: 28%; } .h4b { height: 44%; } .h5 { height: 40%; } .h6 { height: 56%; } .h7 { height: 50%; } .h8 { height: 66%; } .h9 { height: 60%; } .h10 { height: 78%; } .h11 { height: 72%; } .h12 { height: 88%; } .h13 { height: 100%; }
@media (max-width: 960px) {
  .hero { padding: 48px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 520px) {
  .shorten { flex-direction: column; }
}
.trust { background: var(--bg-muted); border-bottom: 1px solid var(--border-default); padding: 24px 0; }
.trust ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.trust li { display: flex; gap: 12px; align-items: flex-start; }
.trust .ic { display: grid; place-items: center; width: 36px; height: 36px; flex: none; background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-md); color: var(--brand-500); }
.trust b { display: block; font-size: .875rem; font-weight: 600; }
.trust span { font-size: .75rem; color: var(--text-secondary); }
@media (max-width: 860px) { .trust ul { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .trust ul { grid-template-columns: 1fr; } }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.steps li { background: var(--bg-surface); border-radius: var(--radius-lg); padding: 24px; border: 1px solid var(--border-default); }
.step-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-500); color: #fff; font-weight: 700; font-size: .8125rem; margin-bottom: 14px; }
.cta-band { background: var(--bg-dark); color: #fff; }
.dark-section + .cta-band { border-top: 1px solid var(--border-dark); }
.cta-band h2 { color: #fff; }
.cta-band p { color: var(--text-inverse-muted); }
.cta-row { display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta-center { text-align: center; max-width: 640px; margin: 0 auto; }
.cta-center .cta-actions { justify-content: center; }
.cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.flow-step { background: var(--bg-surface); border: 1px solid var(--border-default); border-top: 3px solid var(--brand-500); border-radius: var(--radius-lg); padding: 20px; }
.example { margin-top: 20px; }
.dark-section { background: var(--bg-dark); color: #fff; }
.dark-section h2, .dark-section h3 { color: #fff; }
.dark-section p, .dark-section li { color: var(--text-inverse-muted); }
.dark-section .eyebrow { color: var(--brand-200); }

/* ---- pricing (monthly/yearly toggle is CSS-only: radios + sibling selectors) */
.bill-radio { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bill-toggle { display: inline-flex; gap: 2px; border-radius: var(--radius-md); padding: 3px; margin: 0 0 32px; background: var(--bg-muted); }
.bill-toggle label { margin: 0; padding: 6px 14px; border-radius: 7px; cursor: pointer; font-weight: 600; font-size: .8125rem; color: var(--text-secondary); min-height: 34px; display: inline-flex; align-items: center; gap: 8px; }
#bill-m:checked ~ .bill-toggle label[for="bill-m"], #bill-y:checked ~ .bill-toggle label[for="bill-y"] { background: var(--bg-surface); color: var(--text-primary); box-shadow: 0 1px 2px rgba(26, 29, 30, .08); }
#bill-m:focus-visible ~ .bill-toggle label[for="bill-m"], #bill-y:focus-visible ~ .bill-toggle label[for="bill-y"] { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.price-y { display: none; }
#bill-y:checked ~ .plans .price-y { display: block; }
#bill-y:checked ~ .plans .price-m { display: none; }
.plans { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-lg); padding: 24px; }
.plan-featured { border: 2px solid var(--brand-500); box-shadow: var(--shadow-card); }
.plan-flag { position: absolute; top: 20px; right: 20px; }
.plan-name { font: 700 1.25rem/1.2 var(--font-display); margin-bottom: 8px; }
.price { margin: 12px 0 4px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price.price-y { display: none; }
#bill-y:checked ~ .plans .price.price-y { display: flex; }
.price .amount { font: 800 2rem/1.1 var(--font-display); letter-spacing: -.02em; }
.price .per { color: var(--text-secondary); font-size: .8125rem; }
.price-note { font-size: .8125rem; color: var(--text-secondary); min-height: 2.6em; }
.plan > .btn { margin: 8px 0 4px; }
.plan-rows { margin: 16px 0 0; }
.plan-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border-default); font-size: .8125rem; }
.plan-row dt { color: var(--text-secondary); }
.plan-row dd { margin: 0; font-weight: 600; text-align: right; }
.flag-on { color: var(--success-600); }
.flag-off { color: var(--text-disabled); }
.notes { margin-top: 28px; color: var(--text-secondary); font-size: .8125rem; max-width: 820px; }
.plan .btn.price-y { display: none; }
#bill-y:checked ~ .plans .btn.price-y { display: inline-flex; }
#bill-y:checked ~ .plans .btn.price-m { display: none; }
.plan-row-soon dt, .plan-row-soon dd { color: var(--text-tertiary); }
.plan-row-soon .badge-soon { margin: 0 0 0 4px; }

/* ---- tables (Table head: bg-page, 12px/600 secondary; Link row) */
.table-wrap { overflow-x: auto; background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-lg); }
.table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.table th, .table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border-default); vertical-align: middle; }
.table thead th { font-size: .75rem; font-weight: 600; color: var(--text-secondary); background: var(--bg-page); white-space: nowrap; padding-top: 13px; padding-bottom: 13px; }
.table tbody tr:hover td { background: #FBFBFC; }
.table tbody tr:last-child td, .table tbody tr:last-child th { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.row-muted td { color: var(--text-tertiary); }
.short { font-family: var(--font-mono); font-weight: 400; font-size: .8125rem; color: var(--text-brand); text-decoration: none; }
.short:hover { color: var(--brand-700); text-decoration: underline; }
.link-title { display: block; font-weight: 600; color: var(--text-primary); text-decoration: none; }
a.link-title:hover { color: var(--text-primary); text-decoration: underline; }
.dest { display: block; color: var(--text-secondary); font-family: var(--font-mono); font-size: .75rem; overflow-wrap: anywhere; line-height: 1.45; max-width: 320px; }
@media (max-width: 760px) {
  .links-table thead { display: none; }
  .links-table, .links-table tbody, .links-table tr, .links-table td { display: block; width: 100%; }
  .links-table tr { border-bottom: 1px solid var(--border-default); padding: 12px 4px; }
  .links-table td { border: 0; padding: 4px 12px; }
  .links-table td.num { text-align: left; }
  .links-table td[data-label]::before { content: attr(data-label); display: block; font-size: .6875rem; font-weight: 600; color: var(--text-tertiary); }
}

/* ---- app shell: AppSidebar 256 + AppTopbar 64 */
.app-body { background: var(--bg-page); }
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; flex: 1; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 16px 12px; background: var(--bg-surface); border-right: 1px solid var(--border-default); }
.sidebar-logo { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 12px; }
.sidebar-logo img { height: 24px; width: auto; display: block; }
a.ws { color: var(--text-primary); text-decoration: none; }
a.ws:hover { background: var(--bg-page); color: var(--text-primary); }
.ws { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border-default); border-radius: var(--radius-md); background: var(--bg-surface); }
.ws-mark { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: var(--radius-sm); background: var(--graphite-900); color: #fff; font-size: .6875rem; font-weight: 700; }
.ws-text { min-width: 0; flex: 1; line-height: 1.25; }
.ws-text b { display: block; font-size: .8125rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-text small { display: block; font-size: .6875rem; color: var(--text-tertiary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws > .i { width: 14px; height: 14px; color: var(--text-tertiary); }
details.ws-menu { position: relative; }
details.ws-menu > summary { list-style: none; cursor: pointer; }
details.ws-menu > summary::-webkit-details-marker { display: none; }
details.ws-menu > summary:hover .ws { background: var(--bg-page); }
.ws-pop { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-md); box-shadow: var(--shadow-overlay); padding: 6px; }
.ws-pop p { font-size: .6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-tertiary); margin: 4px 8px 6px; }
.ws-pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--radius-sm); background: transparent; font: 500 .8125rem var(--font-body); color: var(--text-primary); cursor: pointer; text-align: left; }
.ws-pop button:hover, .ws-pop button[aria-current="true"] { background: var(--bg-muted); }
.ws-pop .ws-mark { width: 24px; height: 24px; border-radius: 4px; font-size: .625rem; background: var(--graphite-200); color: var(--text-primary); }
.ws-pop button[aria-current="true"] .ws-mark { background: var(--graphite-900); color: #fff; }
.ws-pop button span.grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-pop a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); font-size: .8125rem; color: var(--text-secondary); text-decoration: none; border-top: 1px solid var(--border-default); margin-top: 4px; }
.ws-pop a:hover { background: var(--bg-muted); color: var(--text-primary); }
.side-nav { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; }
.side-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.side-label { font-size: .6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-tertiary); padding: 14px 10px 6px; margin: 0; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-md); color: var(--text-secondary); text-decoration: none; font-size: .875rem; font-weight: 500; }
.side-nav a .i { color: var(--text-tertiary); }
.side-nav a:hover { background: var(--bg-muted); color: var(--text-primary); }
.side-nav a:hover .i { color: var(--text-secondary); }
.side-nav a[aria-current="page"] { background: var(--brand-50); color: var(--text-brand); font-weight: 600; }
.side-nav a[aria-current="page"] .i { color: var(--text-brand); }
.side-nav .count { margin-left: auto; font-size: .75rem; color: var(--text-tertiary); font-weight: 400; }
.side-spacer { flex: 1; }
.side-foot { border-top: 1px solid var(--border-default); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.user-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius-md); }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--brand-100); color: var(--brand-700); font-size: .75rem; font-weight: 600; }
.user-row .ws-text b { font-size: .8125rem; }
.user-row form { margin: 0; }
.app-main { min-width: 0; display: flex; flex-direction: column; }
.app-topbar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 0 24px; background: var(--bg-surface); border-bottom: 1px solid var(--border-default); }
.app-topbar .page-title { font: 700 1.25rem/1.2 var(--font-display); margin: 0; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.app-topbar .tb-end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.tb-search { position: relative; width: 260px; }
.tb-search .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-tertiary); pointer-events: none; }
.tb-search input { padding-left: 36px; }
.app-topbar .tb-mobile-logo { display: none; }
@media (min-width: 961px) {
  .app-body:not(.admin) .app-topbar .page-title { display: none; }
  .tb-search { width: 360px; }
  .app-topbar .tb-end { margin-left: 0; flex: 1; }
  .app-topbar .tb-create { margin-left: auto; }
  .admin .app-topbar .tb-end { flex: 0 0 auto; margin-left: auto; }
}
.app-content { padding: 24px 24px 64px; width: 100%; max-width: 1280px; }
.app-content .flash { margin: 0 0 16px; }
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-open-btn, .nav-close-btn { display: none; }
.nav-scrim { display: none; }
.bottom-nav { display: none; }
@media (max-width: 1080px) {
  .tb-search { display: none; }
}
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: 288px; height: auto; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-overlay); }
  .nav-toggle:checked ~ .app .sidebar { transform: none; }
  .nav-toggle:checked ~ .app .nav-scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(16, 18, 19, .4); }
  .nav-toggle:focus-visible ~ .app .nav-open-btn { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
  .nav-open-btn, .nav-close-btn { display: inline-flex; }
  .app-topbar { padding: 0 16px; min-height: 60px; }
  .app-topbar .page-title { font-size: 1.0625rem; }
  .app-content { padding: 16px 16px 96px; }
  .bottom-nav { display: flex; position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; height: 64px; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: var(--bg-surface); border-top: 1px solid var(--border-default); justify-content: space-around; align-items: center; }
  .bottom-nav a, .bottom-nav label { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 64px; min-height: 44px; justify-content: center; color: var(--text-secondary); text-decoration: none; font-size: .6875rem; font-weight: 500; margin: 0; cursor: pointer; }
  .bottom-nav .i { width: 22px; height: 22px; }
  .bottom-nav a[aria-current="page"] { color: var(--text-brand); font-weight: 600; }
  .bottom-nav .fab { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--brand-500); color: #fff; }
  .bottom-nav .fab .i { width: 20px; height: 20px; }
  .tb-create .lbl { display: none; }
  .tb-create { width: 40px; padding: 0; }
  .app-topbar .lang { display: none; }
}

/* ---- dashboard content */
.dash main { padding: 0; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
@media (max-width: 1180px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.dash-head h1 { margin: 0; font-size: clamp(1.375rem, 1.2rem + .6vw, 1.625rem); overflow-wrap: anywhere; }
.dash-head p { margin: 4px 0 0; }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.search { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.search input { flex: 1 1 240px; }
.search select { width: auto; flex: 0 0 auto; }
.pager { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.empty { text-align: center; padding: 48px 32px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.empty::before { content: ""; width: 48px; height: 48px; border-radius: var(--radius-md); background: var(--bg-muted) url("data:image/svg+xml,%3Csvg xmlns='http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg' viewBox='0 0 24 24' fill='none' stroke='%235A6166' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'/%3E%3C/svg%3E") center / 22px no-repeat; margin-bottom: 8px; }
.empty h2, .empty h3 { font: 700 1.125rem/1.3 var(--font-display); }
.empty p { color: var(--text-secondary); max-width: 420px; }
.usage { padding: 12px 4px 4px; border-top: 1px solid var(--border-default); }
.usage-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font: 600 .75rem/1.3 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--text-tertiary); margin: 0 0 10px; }
.usage-head .badge { text-transform: none; letter-spacing: 0; }
.usage-num { font-size: .8125rem; margin: 0 0 8px; display: flex; justify-content: space-between; gap: 8px; color: var(--text-primary); font-weight: 500; }
.usage-num span:last-child { color: var(--text-secondary); font-weight: 400; white-space: nowrap; }
.usage-num strong { font-weight: 600; color: var(--text-primary); }
.usage-hint { font-size: .75rem; color: var(--text-tertiary); margin: 0 0 4px; line-height: 1.45; }
.usage-hint a { font-weight: 500; }
.meter { height: 6px; border-radius: var(--radius-pill); background: var(--graphite-200); overflow: hidden; margin-bottom: 10px; }
.meter-fill { display: block; height: 100%; background: var(--success-600); border-radius: var(--radius-pill); width: 0; }
.meter-warn { background: var(--warning-600); }
.meter-full { background: var(--brand-500); }
.w0 { width: 1%; } .w1 { width: 10%; } .w2 { width: 20%; } .w3 { width: 30%; } .w4 { width: 40%; } .w5 { width: 50%; }
.w6 { width: 60%; } .w7 { width: 70%; } .w8 { width: 80%; } .w9 { width: 90%; } .w10 { width: 100%; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .8125rem; color: var(--text-tertiary); margin-bottom: 12px; }
.crumbs a { color: var(--text-tertiary); text-decoration: none; }
.crumbs a:hover { color: var(--text-primary); text-decoration: underline; }
.short-box { display: flex; gap: 8px; margin: 0 0 20px; max-width: 640px; }
.short-input { flex: 1; font-family: var(--font-mono) !important; font-size: 1rem !important; color: var(--text-brand) !important; background: var(--bg-surface) !important; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1080px) { .detail-grid { grid-template-columns: 1fr; } }
.kv { margin: 0; }
.kv div { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-default); font-size: .875rem; }
.kv div:last-child { border-bottom: 0; }
.kv dt { color: var(--text-secondary); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .kv div { grid-template-columns: 1fr; gap: 2px; } }
.history { list-style: none; margin: 0; padding: 0; }
.history li { padding: 8px 0 10px 20px; border-left: 2px solid var(--border-default); position: relative; font-size: .875rem; }
.history li::before { content: ""; position: absolute; left: -5px; top: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-500); }
.history p { margin: 0 0 2px; }
.upsell { border-color: var(--warning-100); background: var(--warning-50); margin-bottom: 20px; }
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--border-default); border-radius: var(--radius-md); background: var(--bg-surface); }
.bulk-bar select, .bulk-bar input { min-height: 32px; width: auto; }
.links-table td.sel { width: 40px; }
.tag-filter { max-width: 200px; }
.plain-list { list-style: none; padding: 0; margin: 0 0 12px; }
.plain-list li { padding: 8px 0; border-bottom: 1px solid var(--border-default); font-size: .875rem; }
.plain-list li:last-child { border-bottom: 0; }
.ws-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ws-switch select { min-height: 32px; max-width: 180px; }
.ws-name { margin-right: 8px; }
.narrow-wide { max-width: 860px; }
.lead-sm { color: var(--text-secondary); max-width: 70ch; }
.range-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 0 0 16px; }
.range-form .field { margin-bottom: 0; }
.section-tight { margin-top: 28px; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--border-default); }
.tabs a, .tabs .btn { border: 0; border-radius: 0; background: transparent; color: var(--text-secondary); min-height: 40px; padding: 10px 14px; font-weight: 600; font-size: .875rem; border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.tabs a:hover, .tabs .btn:hover { color: var(--text-primary); background: transparent; }
.tabs a[aria-current="page"], .tabs .btn[aria-current="page"], .tabs .btn-primary { color: var(--text-primary); border-bottom-color: var(--brand-500); background: transparent; }
.pre { white-space: pre-wrap; }

/* ---- stat cards & analytics */
.range-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 16px; }
.range-nav ul { list-style: none; margin: 0; padding: 3px; display: inline-flex; gap: 2px; border-radius: var(--radius-md); background: var(--bg-muted); }
.range-nav li a, .range-locked { display: inline-flex; align-items: center; padding: 6px 12px; font-size: .8125rem; font-weight: 600; text-decoration: none; color: var(--text-secondary); min-height: 32px; border-radius: 7px; }
.range-nav li a:hover { color: var(--text-primary); }
.range-nav li a[aria-current="page"] { background: var(--bg-surface); color: var(--text-primary); box-shadow: 0 1px 2px rgba(26, 29, 30, .08); }
.range-locked { color: var(--text-disabled); cursor: not-allowed; }
.range-nav p { margin: 0; }
.kpis { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.kpi { display: flex; flex-direction: column; gap: 10px; padding: 20px; }
.kpi-label { font-size: .8125rem; color: var(--text-secondary); font-weight: 500; }
.kpi-num { font: 700 2rem/1.1 var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-q, .kpi-f { border-top: 1px solid var(--border-default); }
.method { margin: 0 0 16px; padding: 14px 20px; }
.method summary { font-weight: 600; font-size: .875rem; }
.method ul { margin: 10px 0; padding-left: 20px; font-size: .875rem; color: var(--text-secondary); }
.chart-card { margin: 0 0 16px; }
.legend { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .8125rem; color: var(--text-secondary); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.swatch { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.swatch-q { background: var(--chart-1); }
.swatch-f { background: var(--chart-3); }
.chart { margin: 0; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--chart-grid); stroke-width: 1; }
.chart .baseline { stroke: var(--border-strong); stroke-width: 1; }
.chart .axis { fill: var(--text-tertiary); font-size: 11px; font-family: var(--font-body); }
.chart .seg-q { fill: var(--brand-200); }
.chart .bar:last-of-type .seg-q { fill: var(--brand-500); }
.chart .bar:hover .seg-q { fill: var(--brand-500); }
.chart .seg-f { fill: var(--chart-3); }
.chart .hit { fill: transparent; }
.chart .bar:hover .hit { fill: rgba(26, 29, 30, .04); }
.chart figcaption { margin-top: 6px; }
.table-toggle { margin-top: 12px; }
.table-toggle summary { font-weight: 600; font-size: .8125rem; color: var(--text-link); }
.table-toggle .table-wrap { margin-top: 10px; max-height: 420px; overflow-y: auto; }
.table-wrap.flat { border-radius: var(--radius-md); }
.breakdowns { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin: 16px 0; }
.breakdown { padding: 20px; }
.bd-table th, .bd-table td { padding: 8px 4px; }
.bd-table thead th { background: transparent; padding: 0 4px 8px; }
.bd-table tbody th { font-weight: 500; }
.bd-table th:first-child { width: 100%; }
.bd-table .num { white-space: nowrap; }
.bd-table thead th.num { white-space: normal; }
.bd-table tbody tr:hover td, .bd-table tbody tr:hover th { background: transparent; }
.share { display: block; height: 6px; border-radius: var(--radius-pill); background: var(--graphite-100); margin-top: 6px; overflow: hidden; }
.share-fill { display: block; height: 100%; background: var(--brand-500); border-radius: var(--radius-pill); }

/* ---- QR panel (QR preview) */
.qr-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; margin: 12px 0; }
@media (max-width: 520px) { .qr-grid { grid-template-columns: 1fr; } }
.qr-preview { width: 200px; height: auto; border: 1px solid var(--border-default); border-radius: var(--radius-md); background: #fff; padding: 8px; }
.qr-form select, .qr-form input[type="color"], .qr-form input[type="text"] { width: 100%; min-height: 40px; }
.qr-panel .actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---- admin console */
.admin-stats .card { padding: 20px; }
.stat-num { font: 700 2rem/1.1 var(--font-display); margin: 0 0 4px; letter-spacing: -.02em; }
.sev { display: inline-flex; font-size: .75rem; font-weight: 600; padding: 3px 8px; border-radius: var(--radius-sm); background: var(--bg-muted); color: var(--text-secondary); }
.sev-high, .sev-critical { background: var(--error-50); color: var(--error-600); }
.sev-medium { background: var(--warning-50); color: var(--warning-600); }
.audit-filter { flex-wrap: wrap; align-items: flex-end; }
.audit-filter .field { margin: 0; }
.audit-table code { font-size: .75rem; }
.form-card hr { margin: 18px 0; }
.legal-draft { border: 1px dashed var(--warning-600); background: var(--warning-50); }
.admin .sidebar { background: var(--bg-dark); border-right-color: var(--bg-dark); color: var(--text-inverse); }
.admin .sidebar .side-nav a { color: var(--text-inverse-muted); }
.admin .sidebar .side-nav a .i { color: var(--graphite-400); }
.admin .sidebar .side-nav a:hover { background: var(--bg-dark-elevated); color: #fff; }
.admin .sidebar .side-nav a[aria-current="page"] { background: var(--bg-dark-elevated); color: #fff; }
.admin .sidebar .side-nav a[aria-current="page"] .i { color: var(--brand-500); }
.admin .sidebar .side-label { color: var(--graphite-400); }
.admin .sidebar .ws { background: var(--bg-dark-elevated); border-color: var(--border-dark); }
.admin .sidebar .ws-mark { background: var(--brand-500); }
.admin .sidebar .ws-text small { color: var(--graphite-400); }
.admin .sidebar .side-foot { border-top-color: var(--border-dark); }
.admin .sidebar .user-row .ws-text small { color: var(--graphite-400); }
.admin .sidebar .btn-ghost { background: transparent; color: #fff; border-color: var(--border-dark); }
.admin .sidebar .btn-ghost:hover { background: var(--bg-dark-elevated); }

/* ---- auth (split screen: dark panel + form) */
.auth-body { background: var(--bg-surface); }
.auth-split { display: grid; grid-template-columns: minmax(360px, 560px) minmax(0, 1fr); min-height: 100vh; }
.auth-side { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 56px; color: #fff; background: radial-gradient(120% 80% at 0% 100%, rgba(245, 9, 9, .22), transparent 55%), linear-gradient(160deg, var(--graphite-800), var(--graphite-950) 70%); }
.auth-side::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 40px 40px; pointer-events: none; }
.auth-side > * { position: relative; z-index: 1; }
.logo-plate { display: inline-flex; background: #fff; border-radius: var(--radius-md); padding: 12px 20px; align-self: flex-start; }
.logo-plate img { height: 32px; width: auto; display: block; }
.auth-side-copy { margin-top: auto; margin-bottom: auto; }
.auth-side h2 { color: #fff; font-size: clamp(1.6rem, 1.2rem + 1vw, 2.1rem); max-width: 16ch; }
.auth-side .ticks { flex-direction: column; gap: 14px; font-size: .9375rem; color: var(--text-inverse-muted); margin-top: 20px; }
.auth-side .ticks li::before { border-color: var(--brand-200); }
.auth-side .fine { font-size: .8125rem; color: var(--text-inverse-muted); margin: 0; }
.auth-pane { display: flex; flex-direction: column; padding: 32px 40px; }
.auth-pane-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.auth-pane-top .brand { visibility: hidden; }
.auth { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 0; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card-wide { max-width: 560px; }
.auth-card h1 { font-size: 1.75rem; margin-bottom: 8px; }
.auth-card > p.muted:first-of-type { margin-bottom: 24px; }
.auth-card .btn-primary.btn-block { min-height: 44px; margin-top: 4px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--text-tertiary); font-size: .75rem; margin: 20px 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--border-default); }
.stack-sm { margin-top: 12px; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .8125rem; margin: 4px 0 16px; }
.auth-links a { font-weight: 500; }
@media (max-width: 900px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-pane { padding: 16px 20px 32px; }
  .auth-pane-top .brand { visibility: visible; }
  .auth { align-items: flex-start; padding-top: 32px; }
}
/* auth pages rendered inside the regular site chrome (fallback) */
.site .auth { padding: 48px 16px 64px; }
.site .auth-card { background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-lg); padding: 32px; }

/* ---- code */
pre.code { background: var(--graphite-900); color: #E9ECEE; padding: 16px; border-radius: var(--radius-md); overflow-x: auto; font: .8125rem/1.6 var(--font-mono); }
pre.code code { background: none; padding: 0; color: inherit; font-size: inherit; }
.legal-list li { margin-bottom: 12px; }

/* ---- footer (Site Footer: dark, columns) */
.footer { background: var(--bg-dark); color: var(--text-inverse-muted); padding: 64px 0 32px; margin-top: 0; }
.footer a { color: #fff; text-decoration: none; font-size: .8125rem; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 260px repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-brand .logo-plate { padding: 10px 16px; margin-bottom: 16px; }
.footer-brand .logo-plate img { height: 26px; }
.footer-brand p { font-size: .875rem; line-height: 1.5; margin: 0 0 8px; }
.footer-col h2 { font: 600 .75rem/1.3 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--text-inverse-muted); margin: 0 0 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; border-top: 1px solid var(--border-dark); margin-top: 40px; padding-top: 24px; font-size: .8125rem; }
.footer-bottom p { margin: 0; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } .footer { padding-top: 48px; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---- billing documents */
.doc { background: #fff; color: #111; border: 1px solid var(--border-default); border-radius: var(--radius-lg); padding: 32px; }
.doc-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; border-bottom: 2px solid #111; padding-bottom: 12px; margin-bottom: 16px; }
.doc-head h1 { font-size: 1.4rem; margin: 0 0 4px; }
.doc-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 16px; }
.doc-party { margin-bottom: 12px; }
.doc-party p { margin: 2px 0; }
.doc-page .wrap.narrow { max-width: 1000px; }
.doc-table td, .doc-table th { font-size: .8125rem; padding: 8px 10px; }
.doc-table .num { white-space: nowrap; }
.doc .table-wrap { border-radius: var(--radius-md); }
.doc .kv dd { overflow-wrap: anywhere; }
.doc-table tfoot th { text-align: right; font-weight: 500; }
.doc-warn { color: var(--error-600); font-weight: 600; }
.doc-sign { display: flex; gap: 40px; flex-wrap: wrap; margin-top: 36px; }
.doc-tools { display: flex; gap: 10px; justify-content: space-between; margin: 16px 0; }
.doc-page main { padding: 24px 0 48px; }
@media (max-width: 640px) { .doc-parties { grid-template-columns: 1fr; } .doc { padding: 16px; } }
@media print {
  .topbar, .footer, .no-print, .skip, .sidebar, .app-topbar, .bottom-nav { display: none !important; }
  body, .app-body { background: #fff; }
  .app { display: block; }
  .doc { border: 0; padding: 0; }
  .wrap, .narrow, .app-content { max-width: none; padding: 0; }
  .table-wrap { overflow: visible; }
}

/* ---- help center */
.help-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; }
.help-nav { position: sticky; top: 96px; align-self: start; }
.help-nav ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.help-nav li a { display: block; padding: 8px 12px; border-radius: var(--radius-md); text-decoration: none; color: var(--text-secondary); font-size: .875rem; }
.help-nav li a:hover { background: var(--bg-muted); color: var(--text-primary); }
.help-nav li a[aria-current="page"] { font-weight: 600; background: var(--brand-50); color: var(--text-brand); }
.help-article { max-width: 72ch; }
.help-article section { margin-top: 28px; }
.captcha { margin: 12px 0; }
@media (max-width: 760px) { .help-grid { grid-template-columns: 1fr; } .help-nav { position: static; } }

/* ---- smart routing */
.route-flow { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; counter-reset: step; margin: 16px 0 20px; padding: 0; }
.route-flow li { counter-increment: step; flex: 1 1 200px; padding: 10px 12px; border: 1px solid var(--border-default); border-radius: var(--radius-md); font-size: .8125rem; background: var(--bg-surface); }
.route-flow li::before { content: counter(step) ". "; font-weight: 700; color: var(--text-brand); }
.rules { list-style: none; margin: 0 0 16px; padding: 0; }
.rule { padding: 12px 0; border-bottom: 1px solid var(--border-default); }
.rule:last-child { border-bottom: 0; }
.rule-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.rule-conds { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 6px 0; padding: 0; }
.rule-conds li { padding: 2px 8px; border-radius: var(--radius-pill); background: var(--bg-muted); font-size: .75rem; color: var(--text-secondary); }
.rule .actions { display: flex; flex-wrap: wrap; gap: 6px; }
.add-rule > summary { list-style: none; display: inline-block; cursor: pointer; margin-bottom: 12px; }
.add-rule > summary::-webkit-details-marker { display: none; }
.add-rule fieldset { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.add-rule legend { font-weight: 500; font-size: .875rem; padding: 0; margin-bottom: 4px; }

/* ---- security, webhooks, integrations, blog, status, affiliate */
.codes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px 16px; margin: 0 0 16px; }
.codes code, .mfa-secret, .secret-once { font-family: var(--font-mono); font-size: .875rem; letter-spacing: .04em; }
.mfa-qr { display: block; margin: 8px 0 12px; border: 1px solid var(--border-default); border-radius: var(--radius-md); background: #fff; padding: 8px; }
.secret-once { display: block; word-break: break-all; background: var(--graphite-900); color: #fff; border-radius: var(--radius-md); padding: 12px 14px; margin: 8px 0 12px; }
.links-row { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 0; list-style: none; }
.status-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.status-dot.status-ok { background: var(--success-600); }
.status-dot.status-degraded { background: var(--warning-600); }
.status-dot.status-down { background: var(--error-600); }
.plain { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.tg-login { margin: 16px 0; text-align: center; min-height: 48px; }
.tg-code { font-family: var(--font-mono); word-break: break-all; }
.audit-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 16px; align-items: end; padding: 16px; margin: 0 0 16px; }
.audit-filters .field { margin: 0; }
.audit-filters .filter-actions { display: flex; gap: 8px; flex-wrap: wrap; grid-column: 1 / -1; }
.blog-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin: 24px 0; }
.blog-list .card { padding: 24px; }
.blog-list .card h2 { font: 700 1.125rem/1.3 var(--font-display); }
.blog-list .card h2 a { color: var(--text-primary); text-decoration: none; }
.blog-list .card h2 a:hover { text-decoration: underline; }
.blog-cta { margin-top: 32px; }
.status-overall { font-size: 1.0625rem; font-weight: 600; display: flex; align-items: center; gap: 10px; margin: 16px 0 24px; }
.status-overall .dot { width: 12px; height: 12px; border-radius: 50%; background: currentColor; display: inline-block; }
.status-list { list-style: none; padding: 0; display: grid; gap: 8px; margin: 0 0 16px; }
.status-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 14px 16px; }
.status-name { font-weight: 600; flex: 1 1 220px; }
.status-detail { flex-basis: 100%; }
.status-operational { color: var(--success-600); }
.status-degraded { color: var(--warning-600); }
.status-down { color: var(--error-600); }
.status-unknown { color: var(--text-tertiary); }
.badge.status-operational, .badge.status-degraded, .badge.status-down, .badge.status-unknown { background: transparent; border: 1px solid currentColor; }
.aff-stats { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin: 0 0 16px; }
.aff-stats .card { padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.aff-stats strong { font: 700 1.375rem/1.2 var(--font-display); }

/* ---- utilities */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mb-4 { margin-bottom: 16px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.grow { flex: 1; }
.text-brand { color: var(--text-brand); }
.center { text-align: center; }

/* ---- page containers inside the app shell */
.app-content .wrap { max-width: none; margin: 0; padding: 0; }
.app-content .wrap.narrow { max-width: 880px; }
.app-content .wrap.narrow-wide { max-width: 960px; }
.app-content .page-head { padding: 8px 0 16px; }
.nowrap { white-space: nowrap; }
.cell-link { min-width: 220px; }
.cell-link .link-title { margin-bottom: 2px; }
.short-row { display: inline-flex; align-items: center; gap: 2px; }
.badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.badges .badge-app { margin-left: 0; }
.links-table .tags { margin-left: 0; }
.links-table .num strong { font-weight: 600; }
.btn-copy-icon { border-color: transparent; background: transparent; padding: 3px; min-height: 22px; color: var(--text-tertiary); }
.btn-copy-icon .i { width: 13px; height: 13px; }
.short { white-space: nowrap; }
.ticks-col { flex-direction: column; gap: 10px; margin-top: 16px; }
.dark-section .ticks li { color: #fff; }
.dark-section .ticks li::before { border-color: var(--brand-200); }
pre.code-dark { background: var(--graphite-950); border: 1px solid var(--border-dark); border-radius: var(--radius-lg); padding: 20px; margin: 0; white-space: pre; }
.c-ok { color: var(--chart-5); }
.hero-copy .ticks { margin-top: 4px; }
.mock-head .mock-tag { margin-left: 4px; }
.mock-row > div { min-width: 0; }
.mock-row .mock-url { display: block; }
.page-head-center { text-align: center; }
.page-head-center .lead { margin-left: auto; margin-right: auto; }
.section-tight-top { padding-top: 16px; }
.pricing .bill-toggle { display: flex; width: max-content; max-width: 100%; margin-left: auto; margin-right: auto; }
.pricing .notes { margin-left: auto; margin-right: auto; }
.bill-toggle { border: 0; }
.plan-row dd { display: inline-flex; align-items: baseline; gap: 4px; justify-content: flex-end; }
.plan-row dt { min-width: 0; }
@media (min-width: 961px) {
  .app { background: linear-gradient(to right, var(--bg-surface) calc(var(--sidebar-w) - 1px), var(--border-default) calc(var(--sidebar-w) - 1px), var(--border-default) var(--sidebar-w), var(--bg-page) var(--sidebar-w)); }
  .admin .app { background: linear-gradient(to right, var(--bg-dark) var(--sidebar-w), var(--bg-page) var(--sidebar-w)); }
}
details.more > summary { list-style: none; display: flex; align-items: center; gap: 8px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--text-secondary); border-bottom: 2px solid var(--text-secondary); transform: rotate(-45deg); transition: transform .15s; margin: 0 4px 0 2px; }
details.more[open] > summary::before { transform: rotate(45deg); }
.dash-main > h1, .wrap > h1:first-child { font-size: clamp(1.375rem, 1.2rem + .6vw, 1.625rem); margin-bottom: 20px; }

/* Dashboard page titles share one size; tables never butt into the next card */
.app-content h1 { font-size: clamp(1.375rem, 1.2rem + .6vw, 1.625rem); }
.app-content .table-wrap + .card, .app-content .table-wrap + section, .app-content .table-wrap + form { margin-top: 24px; }
.features-page .page-head + .section, .page-head + .section { padding-top: 24px; }
.page-head h1.mono { font-family: var(--font-mono); font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem); font-weight: 600; letter-spacing: -.01em; }
.auth-pane form + p, .auth-pane .form + p { margin-top: 16px; }
.table-wrap { position: relative; }
.split > *, .hero-grid > * { min-width: 0; }
@media (max-width: 480px) { .mock-head .btn { display: none; } }
.nav-mobile-only { display: none; }
.brand { flex: none; display: inline-flex; }
@media (max-width: 1080px) {
  .nav-mobile-only { display: block; }
  .nav-lang { padding: 8px 12px; }
  .tb-lang, .topbar-end .tb-login { display: none; }
  .topbar-row { flex-wrap: wrap; }
  .topbar-end { margin-left: auto; }
}
@media (max-width: 400px) { .topbar-end .btn-primary { padding: 0 12px; font-size: .8125rem; height: 36px; } }
.links-table .dest { display: inline-block; min-width: 160px; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
