/* =============================================================================
   LMS LICENSE SELLER V3 — RESPONSIVE FRONTEND
   Shared visual styles only. Existing routes, forms and JS states are retained.
   ============================================================================= */

:root {
  --brand-primary: #1d4ed8;
  --brand-secondary: #0f766e;
  --bg: #f4f7fb;
  --bg-elevated: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-inset: #e9eff6;
  --surface-border: #e0e7f0;
  --surface-border-strong: #bfccd9;
  --text: #17243b;
  --text-muted: #52637b;
  --text-faint: #58697f;
  --text-inverse: #ffffff;
  --link: var(--brand-primary);
  --success: #147448;
  --success-bg: #e9f7ef;
  --warning: #915207;
  --warning-bg: #fff5df;
  --danger: #b4233b;
  --danger-bg: #fff0f2;
  --info: #2453b8;
  --info-bg: #edf3ff;
  --neutral: #52637b;
  --neutral-bg: #edf1f6;
  --focus-ring: 0 0 0 4px rgba(29, 78, 216, 0.16);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-xs: 0 2px 4px rgba(21, 38, 68, 0.025);
  --shadow-sm: 0 4px 16px rgba(21, 38, 68, 0.045);
  --shadow-md: 0 14px 36px rgba(21, 38, 68, 0.08);
  --shadow-lg: 0 24px 64px rgba(10, 27, 53, 0.18);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 48px;
  --space-12: 64px;
  --font-sans: system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sidebar-width: 272px;
  --header-height: 76px;
  --gutter: 28px;
  --transition: 180ms ease;
  --sidebar-bg: #10213b;
  --sidebar-text: #e9f0fc;
  --sidebar-muted: #adbed7;
  --sidebar-line: rgba(199, 217, 247, 0.12);
  --sidebar-active: rgba(255, 255, 255, 0.1);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c1525;
  --bg-elevated: #132037;
  --bg-subtle: #182840;
  --bg-inset: #1e304a;
  --surface-border: #2a3b55;
  --surface-border-strong: #445976;
  --text: #eff4fd;
  --text-muted: #bac8de;
  --text-faint: #94a8c3;
  --text-inverse: #0c1525;
  --link: #a7c4ff;
  --success: #70dfac;
  --success-bg: #123a2c;
  --warning: #ffd18a;
  --warning-bg: #392d1c;
  --danger: #ffa2b2;
  --danger-bg: #3e2030;
  --info: #aac9ff;
  --info-bg: #1c3155;
  --neutral: #bac8de;
  --neutral-bg: #23334b;
  --focus-ring: 0 0 0 4px rgba(135, 176, 255, 0.22);
  --shadow-xs: 0 2px 4px rgba(0, 0, 0, 0.12);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.14);
  --shadow-md: 0 14px 36px rgba(0, 0, 0, 0.22);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.42);
  --sidebar-bg: #0a1322;
}

/* Base and accessibility */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 110px; }
body {
  margin: 0;
  min-width: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
[hidden], .hidden { display: none !important; }
h1, h2, h3, h4, h5 {
  margin: 0 0 var(--space-3);
  line-height: 1.2;
  font-weight: 750;
  letter-spacing: -0.035em;
  overflow-wrap: break-word;
}
h1 { font-size: clamp(1.85rem, 1.2rem + 2vw, 3rem); }
h2 { font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.95rem); }
h3 { font-size: 1.125rem; letter-spacing: -0.02em; }
h4 { font-size: 1rem; letter-spacing: -0.015em; }
p { margin: 0 0 var(--space-4); }
a { color: var(--link); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button, a, label { -webkit-tap-highlight-color: transparent; }
img, svg { max-width: 100%; height: auto; }
img { vertical-align: middle; }
svg { vertical-align: middle; }
hr { border: 0; border-top: 1px solid var(--surface-border); margin: var(--space-6) 0; }
small { font-size: 0.83rem; }
code, kbd, samp, pre { font-family: var(--font-mono); }
code, kbd, samp { font-size: 0.87em; }
pre { max-width: 100%; overflow-x: auto; overflow-wrap: anywhere; }
fieldset { min-width: 0; }
::selection { background: #c9dcff; color: #17243b; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 4px; border-radius: 6px; }
.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;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 2000;
  background: var(--brand-primary); color: #fff;
  padding: 12px 20px; border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; }

/* Page widths and reusable layouts */
.container {
  width: 100%; max-width: 1280px; margin-inline: auto;
  padding-inline: var(--gutter);
}
.container-narrow { max-width: 800px; }
.container-wide { max-width: 1560px; }
#main-content:not(.container) {
  width: 100%; max-width: 1280px;
  margin-inline: auto; padding: 40px var(--gutter) 0;
}
#main-content:not(.container) > .page-head { margin-bottom: 32px; }
#main-content:not(.container) > .card + .grid { margin-top: 28px; }
#main-content:not(.container) > .page-head h1 { font-size: clamp(1.9rem, 1.4rem + 1.7vw, 2.9rem); }
.stack > * + * { margin-top: var(--space-5); }
.stack-sm > * + * { margin-top: var(--space-2); }
.stack-lg > * + * { margin-top: var(--space-8); }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.grid-sidebar { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.grid > *, .grid-sidebar > *, .hero-grid > *, .footer-grid > *,
.support-shell > *, .support-layout > *, .card-header > *, .page-head > * { min-width: 0; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; min-width: 0; }
.row > * { min-width: 0; }
.row-between { justify-content: space-between; }
.row-end { justify-content: flex-end; }
.row-tight { gap: 8px; }
.spacer { flex: 1 1 auto; }

/* Surfaces */
.card {
  min-width: 0;
  background: var(--bg-elevated); color: var(--text);
  border: 1px solid var(--surface-border); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow-sm);
}
.card-flush { padding: 0; overflow: hidden; }
.card-tight { padding: 18px; }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 20px 24px; border-bottom: 1px solid var(--surface-border);
}
.card-header h2, .card-header h3 { margin: 0; font-size: 1.1rem; letter-spacing: -0.02em; }
.card-body { padding: 24px; }
.card-body-tight { padding: 18px; }
.card-footer {
  padding: 18px 24px;
  border-top: 1px solid var(--surface-border); background: var(--bg-subtle);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
/* Templates use both padded cards and cards with header/body sections. */
.card > .card-header { margin: -24px -24px 0; }
.card > .card-body { padding: 24px 0; }
.card > .card-body:last-child { padding-bottom: 0; }
.card > .card-footer { margin: 0 -24px -24px; }
.card-tight > .card-header { margin: -18px -18px 0; padding: 18px; }
.card-tight > .card-footer { margin: 0 -18px -18px; padding: 18px; }
.card > .card-header + .table-wrap,
.card > .card-header + .record-list,
.card > .card-header + .grid,
.card > .card-header + .stack { margin-top: 20px; }
.card-flush > .card-header { margin: 0; }
.card-flush > .card-body { padding: 24px; }
.card-flush > .card-footer { margin: 0; }
.card-flush > .card-header + .table-wrap,
.card-flush > .card-header + .record-list,
.card-flush > .card-header + .grid,
.card-flush > .card-header + .stack { margin-top: 0; }
.card-flush > .table-wrap { border: 0; border-radius: 0; }
.panel {
  min-width: 0; background: var(--bg-subtle);
  border: 1px solid var(--surface-border); border-radius: var(--radius);
  padding: 20px;
}
.surface-inset { background: var(--bg-inset); border-radius: var(--radius); padding: 20px; overflow-wrap: anywhere; }

/* Public and customer headers */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--bg-elevated);
  background: color-mix(in srgb, var(--bg-elevated) 94%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--surface-border);
}
.site-header-inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-height); }
.brand {
  display: flex; align-items: center; gap: 12px;
  min-width: 0; font-weight: 750; color: var(--text); text-decoration: none;
}
.brand:hover { color: var(--text); text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px; flex: 0 0 auto;
  display: grid; place-items: center; border-radius: 13px;
  background: linear-gradient(145deg, var(--brand-primary), var(--brand-secondary));
  color: #fff; font-size: 19px; font-weight: 800;
  box-shadow: 0 5px 12px rgba(20, 54, 110, 0.16);
}
.brand-text { display: flex; flex-direction: column; gap: 4px; line-height: 1.2; min-width: 0; }
.brand-text strong {
  display: block; max-width: 210px;
  font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-text span {
  font-size: 10px; font-weight: 650; letter-spacing: 0.12em;
  color: var(--text-faint); text-transform: uppercase;
}
.site-nav { display: none; align-items: center; gap: 2px; flex-shrink: 0; }
.site-nav a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 11px; border-radius: 10px;
  color: var(--text-muted); font-size: 13px; font-weight: 600; white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}
.site-nav a:hover { color: var(--text); background: var(--bg-subtle); text-decoration: none; }
.site-nav a[aria-current="page"], .site-nav a.is-active { color: var(--link); background: var(--info-bg); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.header-actions form { margin: 0; }
.header-actions .btn { font-size: 13px; }
.mobile-nav-toggle { display: inline-flex; }
.mobile-nav {
  display: none; border-top: 1px solid var(--surface-border);
  background: var(--bg-elevated); padding: 12px 0 16px;
  max-height: min(70vh, 520px); overflow-y: auto;
}
.mobile-nav.is-open { display: block; }
.mobile-nav a {
  display: flex; align-items: center; min-height: 46px; padding: 11px 14px;
  border-radius: 10px; color: var(--text); font-size: 14px; font-weight: 600;
}
.mobile-nav a:hover, .mobile-nav a[aria-current="page"] { background: var(--info-bg); color: var(--link); text-decoration: none; }

/* Buttons and touch targets */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 0; min-height: 46px; padding: 11px 19px;
  border: 1px solid var(--surface-border-strong); border-radius: 12px;
  background: var(--bg-subtle); color: var(--text);
  font: 650 14px/1.4 var(--font-sans);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition), color var(--transition);
}
.btn:hover { background: var(--bg-inset); border-color: var(--surface-border-strong); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn svg { flex: 0 0 auto; }
.btn-primary {
  background: var(--brand-primary); border-color: var(--brand-primary); color: #fff;
  box-shadow: 0 3px 8px rgba(24, 69, 154, 0.16);
}
.btn-primary:hover {
  background: var(--brand-primary);
  background: color-mix(in srgb, var(--brand-primary) 87%, #10213b);
  border-color: var(--brand-primary); color: #fff;
  box-shadow: 0 5px 14px rgba(24, 69, 154, 0.22);
}
.btn-secondary { background: var(--brand-secondary); border-color: var(--brand-secondary); color: #fff; }
.btn-secondary:hover {
  background: var(--brand-secondary);
  background: color-mix(in srgb, var(--brand-secondary) 87%, #10213b);
  border-color: var(--brand-secondary); color: #fff;
}
.btn-danger { background: #b4233b; border-color: #b4233b; color: #fff; }
.btn-danger:hover { background: #911a2e; border-color: #911a2e; color: #fff; }
.btn-ghost { background: var(--bg-elevated); border-color: var(--surface-border); color: var(--text); }
.btn-ghost:hover { background: var(--bg-subtle); color: var(--text); }
.btn-link { background: transparent; border-color: transparent; color: var(--link); padding: 8px 4px; box-shadow: none; }
.btn-link:hover { background: transparent; border-color: transparent; color: var(--link); text-decoration: underline; }
.btn-sm { min-height: 40px; padding: 8px 13px; font-size: 13px; border-radius: 10px; }
.btn-lg { min-height: 54px; padding: 15px 24px; font-size: 15px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-icon { position: relative; min-height: 44px; width: 44px; min-width: 44px; padding: 0; flex: 0 0 auto; }
.btn-group { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }

/* Badges, notices and validation */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 7px;
  background: var(--neutral-bg); color: var(--neutral);
  font-size: 11px; font-weight: 700; line-height: 1.45;
  letter-spacing: 0.015em; white-space: nowrap;
}
.badge.is-success { background: var(--success-bg); color: var(--success); }
.badge.is-warning { background: var(--warning-bg); color: var(--warning); }
.badge.is-danger { background: var(--danger-bg); color: var(--danger); }
.badge.is-info { background: var(--info-bg); color: var(--info); }
.badge.is-neutral { background: var(--neutral-bg); color: var(--neutral); }
.badge-lg { padding: 8px 13px; font-size: 12px; }
.badge-save { background: #147448; color: #fff; }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.alert {
  display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap;
  padding: 16px 18px; border: 1px solid var(--surface-border); border-radius: var(--radius);
  background: var(--bg-subtle); font-size: 14px; margin-bottom: 20px;
  overflow-wrap: anywhere;
}
.alert > * { min-width: 0; }
.alert > svg { flex: 0 0 auto; }
.alert-success { background: var(--success-bg); border-color: var(--success); border-color: color-mix(in srgb, var(--success) 23%, var(--success-bg)); color: var(--success); }
.alert-warning { background: var(--warning-bg); border-color: var(--warning); border-color: color-mix(in srgb, var(--warning) 23%, var(--warning-bg)); color: var(--warning); }
.alert-danger { background: var(--danger-bg); border-color: var(--danger); border-color: color-mix(in srgb, var(--danger) 23%, var(--danger-bg)); color: var(--danger); }
.alert-info { background: var(--info-bg); border-color: var(--info); border-color: color-mix(in srgb, var(--info) 23%, var(--info-bg)); color: var(--info); }
.alert strong { color: inherit; }
.alert a { color: inherit; text-decoration: underline; }

/* Form fields */
.field { min-width: 0; margin-bottom: 20px; }
.field:last-child { margin-bottom: 0; }
.label, label.field-label { display: block; font-weight: 650; font-size: 13px; margin-bottom: 8px; color: var(--text); }
.label .req { color: var(--danger); margin-left: 2px; }
.help { display: block; color: var(--text-muted); font-size: 12px; margin-top: 7px; line-height: 1.65; overflow-wrap: anywhere; }
.input, .select, .textarea {
  width: 100%; min-width: 0; min-height: 48px; padding: 12px 14px;
  background: var(--bg-elevated); color: var(--text);
  border: 1px solid var(--surface-border-strong); border-radius: 12px;
  font-family: inherit; font-size: 15px; line-height: 1.45;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  appearance: none;
}
.textarea { min-height: 132px; resize: vertical; line-height: 1.65; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-faint); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--link); box-shadow: var(--focus-ring); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.input::placeholder, .textarea::placeholder { color: var(--text-faint); opacity: 1; }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--bg-inset); color: var(--text-muted); cursor: not-allowed; }
.input[type="file"] { padding: 7px; line-height: 30px; }
.input[type="file"]::file-selector-button {
  font: inherit; font-size: 13px; font-weight: 600;
  padding: 7px 12px; margin-right: 12px;
  border: 0; border-radius: 7px; background: var(--bg-inset); color: var(--text); cursor: pointer;
}
.input[type="color"] { cursor: pointer; }
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2352637b' 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 14px center; padding-right: 42px;
}
html[data-theme="dark"] .select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23bac8de' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
.input-group { display: flex; gap: 10px; flex-wrap: wrap; min-width: 0; }
.input-group .input { flex: 1 1 180px; }
.input-prefix { position: relative; min-width: 0; }
.input-prefix > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-weight: 650; pointer-events: none; }
.input-prefix .input { padding-left: 32px; }
.field-error { display: block; color: var(--danger); font-size: 12px; margin-top: 7px; font-weight: 600; }
.field .row > .input.flex-1 { width: 0; flex: 1 1 120px; }
.check { display: flex; gap: 11px; align-items: flex-start; padding: 10px 0; cursor: pointer; min-height: 44px; }
.check input[type="checkbox"], .check input[type="radio"] { width: 19px; height: 19px; margin: 3px 0 0; flex: 0 0 auto; accent-color: var(--brand-primary); cursor: pointer; }
.check-text { min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.check-text small { display: block; color: var(--text-muted); margin-top: 3px; }
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; min-height: 44px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track { width: 46px; height: 26px; flex: 0 0 auto; border-radius: 999px; background: var(--surface-border-strong); position: relative; transition: background var(--transition); }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform var(--transition); box-shadow: var(--shadow-xs); }
.switch input:checked + .switch-track { background: var(--brand-primary); }
.switch input:checked + .switch-track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--link); outline-offset: 4px; }

/* Plan, duration and payment choices */
.option-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.option-grid-wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.option-card {
  position: relative; display: block; min-width: 0; min-height: 44px; cursor: pointer;
  background: var(--bg-elevated); border: 2px solid var(--surface-border);
  border-radius: var(--radius); padding: 20px;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
  overflow-wrap: anywhere;
}
.option-card:hover { border-color: var(--surface-border-strong); background: var(--bg-subtle); }
.option-card input { position: absolute; opacity: 0; pointer-events: none; }
.option-card.is-selected, .option-card:has(input:checked) {
  border-color: var(--link);
  background: var(--info-bg); box-shadow: var(--focus-ring);
}
.option-card:focus-within { outline: 2px solid var(--link); outline-offset: 3px; }
.option-card input:focus-visible ~ .option-body { outline: 2px solid var(--link); outline-offset: 4px; border-radius: 6px; }
.option-card.is-disabled { opacity: 0.55; cursor: not-allowed; }
.option-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; font-size: 14px; }
.option-meta { display: block; color: var(--text-muted); font-size: 12px; margin-top: 6px; }
.option-price { display: block; font-weight: 750; font-size: 20px; letter-spacing: -0.025em; margin-top: 12px; font-variant-numeric: tabular-nums; }
.option-price small { display: block; font-weight: 500; font-size: 12px; letter-spacing: 0; color: var(--text-muted); margin-top: 3px; }
.option-price del { color: var(--text-faint); font-weight: 500; font-size: 13px; margin-right: 6px; }
.combo { position: relative; min-width: 0; }
.combo-list {
  position: absolute; z-index: 40; top: calc(100% + 8px); left: 0; right: 0;
  max-height: 280px; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg-elevated); border: 1px solid var(--surface-border);
  border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 6px;
}
.combo-item {
  display: block; width: 100%; min-height: 44px; text-align: left; padding: 12px;
  border: 0; border-radius: 9px; background: transparent; color: var(--text);
  cursor: pointer; font: inherit; font-size: 14px; overflow-wrap: anywhere;
}
.combo-item:hover, .combo-item.is-active { background: var(--info-bg); }
.combo-item strong { display: block; font-weight: 650; }
.combo-item span { color: var(--text-muted); font-size: 12px; }
.combo-empty { padding: 14px; color: var(--text-muted); font-size: 13px; }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; max-width: 100%; background: var(--bg-inset); border-radius: 13px; }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; width: 0; height: 0; }
.segmented span { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 9px 13px; border-radius: 10px; font-size: 13px; font-weight: 650; color: var(--text-muted); transition: background var(--transition), color var(--transition); }
.segmented input:checked + span { background: var(--bg-elevated); color: var(--link); box-shadow: var(--shadow-xs); }
.segmented input:focus-visible + span { outline: 2px solid var(--link); outline-offset: 2px; }
.price-toggle { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--bg-inset); border-radius: 13px; }
.price-toggle button { min-height: 44px; padding: 10px 18px; border: 0; border-radius: 10px; background: transparent; color: var(--text-muted); font: 650 13px/1.5 var(--font-sans); cursor: pointer; }
.price-toggle button.is-active { background: var(--bg-elevated); color: var(--link); box-shadow: var(--shadow-xs); }

/* Tables and their mobile card equivalents */
.table-wrap {
  width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--surface-border); border-radius: var(--radius);
  background: var(--bg-elevated);
}
table.table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 560px; }
table.table th, table.table td { padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--surface-border); vertical-align: middle; }
table.table th { position: sticky; top: 0; z-index: 1; background: var(--bg-subtle); color: var(--text-muted); font-weight: 700; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
table.table tbody tr:last-child td { border-bottom: 0; }
table.table tbody tr:hover { background: var(--bg-subtle); }
table.table td.is-numeric, table.table th.is-numeric { text-align: right; font-variant-numeric: tabular-nums; }
table.table td.is-actions { white-space: nowrap; }
table.table td .text-small, table.table td .text-xs { line-height: 1.5; }
table.table.table-compact th, table.table.table-compact td { padding: 12px 14px; }
.record-list { display: grid; gap: 12px; }
.notification-list, .scroll-list,
.admin-content .record-list, .admin-content .table-wrap,
.portal-main .table-wrap, .portal-main .record-list {
  max-height: 560px; max-height: min(560px, 65dvh); overflow: auto;
  overscroll-behavior: contain; scrollbar-width: thin;
}
.notification-list, .scroll-list, .admin-content .record-list, .portal-main .record-list { align-content: start; }
.notification-list form, [data-notification-panel] .card-header form { margin: 0; }
.license-countdown { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.record-card {
  min-width: 0; background: var(--bg-elevated); border: 1px solid var(--surface-border);
  border-radius: var(--radius); padding: 18px; overflow-wrap: anywhere;
}
.record-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.record-head > * { min-width: 0; }
.record-card dl { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 8px 14px; margin: 16px 0 0; font-size: 13px; }
.record-card dt { color: var(--text-muted); }
.record-card dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.record-card .btn-group, .record-card > .row { margin-top: 14px; }

/* Dashboard metrics and charts */
.stat-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.stat {
  position: relative; min-width: 0; padding: 22px;
  background: var(--bg-elevated); border: 1px solid var(--surface-border);
  border-radius: 18px; box-shadow: var(--shadow-xs);
}
.stat::before { content: ""; display: block; width: 24px; height: 3px; margin-bottom: 18px; background: var(--brand-primary); border-radius: 8px; }
.stat:nth-child(2n)::before { background: var(--brand-secondary); }
.stat.is-success::before { background: var(--success); }
.stat.is-warning::before { background: var(--warning); }
.stat.is-danger::before { background: var(--danger); }
.stat-label { font-size: 11px; line-height: 1.5; color: var(--text-muted); font-weight: 650; letter-spacing: 0.015em; }
.stat-value { font-size: clamp(1.45rem, 1.15rem + 1.1vw, 2rem); line-height: 1.3; font-weight: 750; letter-spacing: -0.04em; margin-top: 8px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat-meta { font-size: 12px; color: var(--text-faint); margin-top: 8px; line-height: 1.5; overflow-wrap: anywhere; }
.stat.is-success .stat-value { color: var(--success); }
.stat.is-warning .stat-value { color: var(--warning); }
.stat.is-danger .stat-value { color: var(--danger); }
.chart { width: 100%; height: 220px; display: block; overflow: hidden; }
.chart-bar { fill: var(--brand-primary); }
.chart-bar-alt { fill: var(--brand-secondary); }
.chart-grid-line { stroke: var(--surface-border); stroke-width: 1; }
.chart-label { fill: var(--text-faint); font-size: 10px; font-family: var(--font-sans); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; color: var(--text-muted); }
.legend-swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 6px; }
.bar-track { height: 8px; background: var(--bg-inset); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--brand-primary); border-radius: 999px; }
.spark { display: flex; align-items: flex-end; gap: 4px; height: 100px; width: 100%; padding-top: 8px; }
.spark-bar { flex: 1 1 0; min-width: 2px; max-width: 28px; border-radius: 4px 4px 0 0; }
.progress-bar { height: 7px; background: var(--bg-inset); border-radius: 999px; overflow: hidden; }
.progress-bar > span { display: block; height: 100%; background: var(--brand-primary); }

/* Checkout steps */
.stepper {
  display: flex; align-items: center; gap: 8px;
  max-width: 100%; overflow-x: auto; padding: 12px 0 18px; margin-bottom: 20px;
  -webkit-overflow-scrolling: touch;
}
.stepper-item { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; padding-right: 8px; }
.stepper-num { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 auto; border-radius: 10px; background: var(--bg-inset); color: var(--text-muted); font-size: 13px; font-weight: 750; }
.stepper-item.is-current .stepper-num { background: var(--brand-primary); color: #fff; }
.stepper-item.is-done .stepper-num { background: #147448; color: #fff; }
.stepper-label { font-size: 12px; font-weight: 650; color: var(--text-muted); white-space: nowrap; }
.stepper-item.is-current .stepper-label, .stepper-item.is-done .stepper-label { color: var(--text); }
.stepper-connector { width: 18px; height: 1px; background: var(--surface-border-strong); flex: 0 0 auto; }

/* Administration shell */
.admin-shell { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.admin-sidebar {
  display: none; flex-direction: column; position: sticky; top: 0;
  height: 100vh; height: 100dvh; overflow: hidden; overscroll-behavior: contain;
  background: var(--sidebar-bg); color: var(--sidebar-text);
  border-right: 1px solid var(--sidebar-line); scrollbar-width: thin;
  scrollbar-color: #435775 var(--sidebar-bg);
}
.admin-sidebar .brand, .admin-sidebar .brand:hover { color: var(--sidebar-text); }
.admin-sidebar .brand-text strong { max-width: 176px; font-size: 13px; }
.admin-sidebar .brand-text span { color: var(--sidebar-muted); letter-spacing: 0.08em; }
.admin-sidebar .brand-mark { width: 38px; height: 38px; border-radius: 11px; }
.admin-sidebar-head {
  position: sticky; top: 0; z-index: 2;
  background: var(--sidebar-bg); padding: 24px 20px;
  padding-top: max(24px, env(safe-area-inset-top, 0px));
  border-bottom: 1px solid var(--sidebar-line);
  flex: 0 0 auto;
}
.admin-sidebar > nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-bottom: 20px; }
.nav-group { padding: 22px 14px 0; }
.nav-group-title { padding: 0 12px 10px; color: var(--sidebar-muted); font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: 0.14em; }
.nav-link {
  display: flex; align-items: center; gap: 12px; min-height: 46px; margin-bottom: 4px;
  padding: 11px 12px; border-radius: 11px; border: 1px solid transparent;
  color: var(--sidebar-muted); font-size: 13px; line-height: 1.5; font-weight: 550;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.nav-link:hover { background: var(--sidebar-active); color: #fff; text-decoration: none; }
.nav-link.is-active { background: var(--sidebar-active); border-color: var(--sidebar-line); color: #fff; font-weight: 700; box-shadow: inset 3px 0 0 #9abcff; }
.nav-link svg { flex: 0 0 auto; opacity: 0.9; }
.nav-link > span:not(.nav-badge) { min-width: 0; overflow-wrap: anywhere; }
.nav-badge { margin-left: auto; padding: 2px 6px; min-width: 19px; border-radius: 6px; background: #b4233b; color: #fff; font-size: 10px; line-height: 1.4; font-weight: 750; text-align: center; flex: 0 0 auto; }
.btn-icon .nav-badge { position: absolute; top: -5px; right: -5px; margin: 0; }
.admin-sidebar-foot { flex: 0 0 auto; position: sticky; bottom: 0; z-index: 2; margin-top: auto; padding: 20px; padding-bottom: max(20px, env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--sidebar-line); background: var(--sidebar-bg); }
.admin-sidebar-foot .text-muted, .admin-sidebar-foot .text-faint { color: var(--sidebar-muted); }
.admin-sidebar-foot a { color: var(--sidebar-text); }
.admin-sidebar-foot .btn { background: var(--sidebar-active); border-color: var(--sidebar-line); color: var(--sidebar-text); }
.admin-sidebar-foot .btn:hover { background: rgba(255, 255, 255, 0.16); }
.admin-sidebar-foot form { margin: 0; }
.admin-shell.sidebar-open .admin-sidebar {
  display: flex; position: fixed; inset: 0 auto 0 0;
  width: min(86vw, var(--sidebar-width)); z-index: 300; box-shadow: var(--shadow-lg);
}
.admin-main { min-width: 0; display: flex; flex-direction: column; }
.admin-topbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  position: sticky; top: 0; z-index: 50; min-height: var(--header-height);
  padding: 14px 28px; border-bottom: 1px solid var(--surface-border);
  background: var(--bg-elevated);
  background: color-mix(in srgb, var(--bg-elevated) 96%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.admin-topbar > .flex-1 { font-size: 14px; }
.admin-topbar > .flex-1 strong { display: block; overflow-wrap: anywhere; }
.admin-topbar form[role="search"] { margin: 0; width: clamp(180px, 24vw, 340px); }
.admin-topbar form .input { min-height: 44px; background-color: var(--bg-subtle); font-size: 13px; }
.admin-content { min-width: 0; width: 100%; max-width: 1680px; margin-inline: auto; padding: 32px 28px 56px; flex: 1 1 auto; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; overflow-wrap: anywhere; }
.page-head > div:first-child { flex: 1 1 240px; }
.page-head h1 { margin: 0; font-size: clamp(1.55rem, 1.1rem + 1.1vw, 2.15rem); }
.page-head p { margin: 8px 0 0; color: var(--text-muted); font-size: 14px; max-width: 80ch; }
.page-head > .btn-group { flex: 0 1 auto; }
.sidebar-scrim { position: fixed; inset: 0; z-index: 290; background: rgba(4, 14, 30, 0.6); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }

/* Customer navigation */
.mobile-tabbar {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  position: fixed; bottom: max(12px, env(safe-area-inset-bottom, 0px)); left: 50%; z-index: 55;
  transform: translateX(-50%); width: min(640px, calc(100% - 24px));
  padding: 6px 8px; border: 1px solid var(--surface-border); border-radius: 22px;
  background: var(--bg-elevated); box-shadow: 0 8px 32px rgba(4, 14, 30, 0.18);
}
.mobile-tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 8px 2px; border-radius: 12px; color: var(--text-muted); font-size: 10px; line-height: 1.4; font-weight: 650; min-height: 52px; min-width: 0; text-decoration: none; }
.mobile-tabbar a.is-active { color: var(--link); background: var(--info-bg); }
.mobile-tabbar svg { flex: 0 0 auto; }
.quick-nav-icon { display: flex; align-items: center; justify-content: center; }
.mobile-tabbar .quick-nav-buy { color: var(--link); padding-block: 0; font-weight: 750; }
.quick-nav-buy .quick-nav-icon { width: 44px; height: 44px; margin-top: -12px; border-radius: 15px; background: var(--brand-primary); color: #fff; box-shadow: 0 4px 12px rgba(29, 78, 216, 0.25); }
main.container { padding-bottom: 112px; }
.mobile-tabbar ~ .toast-region { bottom: calc(104px + env(safe-area-inset-bottom, 0px)); }

/* One set of editable fields on every screen avoids hidden mobile values. */
.plan-limits-table input[type="text"], .plan-limits-table input[type="number"] { min-width: 110px; }
@media (max-width: 859px) {
  .plan-limits-table, .plan-limits-table tbody { display: block; min-width: 0; }
  .plan-limits-table thead { display: none; }
  .plan-limits-table tr { display: block; padding: 16px; border-bottom: 1px solid var(--surface-border); }
  .plan-limits-table td { display: block; padding: 6px 0; border: 0; min-width: 0; }
  .plan-limits-table td[data-limit-label]::before { content: attr(data-limit-label); display: block; color: var(--text-muted); font-size: 11px; margin-bottom: 4px; }
  .plan-limits-table input[type="text"], .plan-limits-table input[type="number"] { width: 100%; }
}

/* Homepage and public content */
.hero {
  position: relative; isolation: isolate; overflow: hidden; padding: 56px 44px;
  background: #10213b;
  background: radial-gradient(ellipse at 100% 0%, #264872 0%, transparent 58%), linear-gradient(125deg, #10213b, #132a4a);
  color: #fff; border: 1px solid #244267; border-radius: var(--radius-xl);
  box-shadow: 0 16px 40px rgba(11, 31, 58, 0.1);
}
.hero::before { content: ""; position: absolute; z-index: -1; width: 380px; height: 380px; top: -270px; right: 15%; border: 1px solid rgba(226, 237, 255, 0.13); border-radius: 50%; pointer-events: none; }
.hero-grid { display: grid; gap: 36px; align-items: center; }
.hero h1 { max-width: 15ch; font-size: clamp(2.05rem, 1.1rem + 3.3vw, 3.65rem); line-height: 1.08; letter-spacing: -0.05em; margin-bottom: 20px; }
.hero-lead { font-size: 15px; line-height: 1.85; color: #c3d2e8; max-width: 53ch; }
.hero > .hero-grid > div:first-child > .badge { background: rgba(182, 208, 255, 0.14); color: #e0ebff; border: 1px solid rgba(182, 208, 255, 0.2); border-radius: 999px; padding: 7px 13px; font-size: 11px; letter-spacing: 0.05em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero .hero-actions .btn-primary { background: var(--brand-primary); border-color: rgba(255, 255, 255, 0.2); }
.hero .hero-actions .btn-primary:hover { background: color-mix(in srgb, var(--brand-primary) 86%, #fff); }
.hero .hero-actions .btn-secondary { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.3); color: #fff; }
.hero .hero-actions .btn-secondary:hover { background: rgba(255, 255, 255, 0.16); }
.hero-trust { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 28px; font-size: 12px; color: #c3d2e8; }
.hero-trust span { display: inline-flex; align-items: center; gap: 6px; }
.hero-trust .badge { padding: 5px 8px; background: rgba(255, 255, 255, 0.07); color: #c3d2e8; font-size: 10px; font-weight: 550; white-space: normal; }
.hero .card { border-color: transparent; border-radius: 22px; box-shadow: 0 18px 36px rgba(0, 0, 0, 0.14); }
.hero .card-header h2 { font-size: 1.2rem; }
.hero .plan-benefits { margin-top: 0; gap: 18px; }
.hero .plan-benefits li { font-size: 14px; }
.hero .plan-benefits svg { color: var(--success); }
.section { padding: 56px 0; }
.section-alt { padding: 32px; margin-block: 16px; background: var(--bg-inset); border: 1px solid var(--surface-border); border-radius: 24px; }
.section-head { max-width: 68ch; margin-bottom: 32px; }
.section-head h2 { margin-bottom: 14px; }
.section-head p { color: var(--text-muted); }
.hero + .section-alt { margin-top: 24px; }
.section-alt .stat { box-shadow: none; }
.section-alt > .stat-grid .stat::before { display: none; }
.section-alt > .stat-grid .stat-value { margin-top: 0; margin-bottom: 8px; }
.plan-card { position: relative; display: flex; flex-direction: column; height: 100%; padding: 28px; border-radius: 20px; }
.plan-card > header { padding-bottom: 18px; border-bottom: 1px solid var(--surface-border); }
.plan-card h3 { font-size: 1.2rem; }
.plan-card.is-featured { border: 2px solid var(--brand-primary); box-shadow: var(--shadow-md); }
.plan-ribbon { position: absolute; top: -13px; right: 18px; padding: 6px 12px; border-radius: 8px; background: var(--brand-primary); color: #fff; font-size: 10px; font-weight: 750; letter-spacing: 0.07em; text-transform: uppercase; }
.plan-price { margin: 24px 0 8px; font-size: clamp(1.85rem, 1.4rem + 1.1vw, 2.6rem); line-height: 1.3; font-weight: 800; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.plan-price-period { display: inline-block; font-size: 12px; font-weight: 500; color: var(--text-muted); letter-spacing: 0; }
.plan-benefits { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 12px; }
.plan-benefits li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.65; }
.plan-benefits li > span { min-width: 0; overflow-wrap: anywhere; }
.plan-benefits svg { flex: 0 0 auto; margin-top: 3px; color: var(--success); }
.plan-benefits .not-included, .plan-benefits .is-muted { color: var(--text-faint); }
.plan-benefits .not-included span, .plan-benefits .is-muted span { text-decoration: line-through; text-decoration-color: var(--surface-border-strong); }
.plan-benefits .not-included svg, .plan-benefits .is-muted svg { color: var(--text-faint); }
ol.plan-benefits { list-style: decimal; }
ol.plan-benefits li { display: list-item; padding-left: 4px; }
.plan-card > footer { margin-top: auto; padding-top: 28px; }
.plan-card > .stack-sm { padding: 16px; background: var(--bg-subtle); border-radius: 12px; }
.feature-card { height: 100%; min-width: 0; padding: 26px; background: var(--bg-elevated); border: 1px solid var(--surface-border); border-radius: 20px; }
.feature-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--info-bg); color: var(--link); margin-bottom: 22px; }
.feature-card h3 { margin-bottom: 12px; }
.feature-card p { font-size: 14px; }
.faq-item { border: 1px solid var(--surface-border); border-radius: 14px; background: var(--bg-elevated); margin-bottom: 10px; overflow: hidden; }
.faq-item summary { display: flex; justify-content: space-between; gap: 16px; align-items: center; min-height: 56px; padding: 20px; font-size: 14px; font-weight: 650; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--link); flex-shrink: 0; font-weight: 500; }
.faq-item[open] { border-color: var(--surface-border-strong); }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding: 0 20px 20px; color: var(--text-muted); font-size: 14px; line-height: 1.8; }
.site-footer { margin-top: 64px; padding: 56px 0 28px; background: var(--bg-elevated); border-top: 1px solid var(--surface-border); }
.footer-grid { display: grid; gap: 36px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.footer-grid h4 { margin-bottom: 16px; font-size: 13px; }
.footer-links { display: grid; gap: 4px; list-style: none; margin: 0; padding: 0; font-size: 13px; }
.footer-links a { display: inline-block; color: var(--text-muted); padding-block: 6px; }
.footer-links a:hover { color: var(--link); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--surface-border); color: var(--text-faint); font-size: 12px; }

/* Login, signup and password screens */
.auth-shell {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: center;
  width: 100%; max-width: 1140px; margin-inline: auto; min-height: 100vh;
  min-height: 100svh; padding: 48px var(--gutter);
}
.auth-card { min-width: 0; width: 100%; max-width: 520px; margin-inline: auto; padding: 32px; background: var(--bg-elevated); border: 1px solid var(--surface-border); border-radius: 24px; box-shadow: var(--shadow-md); }
.auth-card h1 { font-size: clamp(1.6rem, 1.4rem + 0.6vw, 2.1rem); }
.auth-card:only-child { grid-column: 1 / -1; }
.auth-card > .card { padding: 0; border: 0; border-radius: 0; box-shadow: none; }
.auth-card > .card > .card-header { margin: 0; }
.auth-alt {
  min-width: 0; width: 100%; max-width: 520px; margin-inline: auto;
  padding: 36px; background: #10213b;
  background: radial-gradient(ellipse at 100% 0%, #264872, transparent 75%), #10213b;
  color: #eef4ff; border: 1px solid #264267; border-radius: 24px;
  font-size: 14px; line-height: 1.8; text-align: left;
}
.auth-alt h2 { font-size: 1.5rem; color: #fff; }
.auth-alt .plan-benefits { gap: 18px; }
.auth-alt .plan-benefits li { font-size: 13px; }
.auth-alt .plan-benefits svg { color: #87ddb9; }
.auth-alt .help, .auth-alt .text-muted, .auth-alt .text-faint { color: #c3d2e8; }
.auth-alt .surface-inset { background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.14); }
.auth-alt a:not(.btn) { color: #b8d0ff; }

/* Support conversations */
.support-shell, .support-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.case-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 62vh; overflow-y: auto; }
.case-list a { display: block; padding: 14px; border-radius: 12px; border: 1px solid transparent; background: var(--bg-elevated); color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.case-list a:hover { background: var(--bg-subtle); text-decoration: none; }
.case-list a.is-current { border-color: var(--brand-primary); background: var(--info-bg); }
.case-meta { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); margin-top: 8px; }
.unread-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.thread, .support-thread { display: flex; flex-direction: column; gap: 16px; max-height: 56vh; max-height: 56dvh; overflow-y: auto; overscroll-behavior: contain; padding: 8px 4px; min-width: 0; }
.support-thread { min-height: 180px; }
.bubble { min-width: 0; max-width: min(88%, 560px); padding: 14px 18px; border-radius: 16px; background: var(--bg-subtle); font-size: 14px; }
.bubble.from-customer { align-self: flex-start; border-bottom-left-radius: 5px; }
.bubble.from-staff { align-self: flex-end; background: var(--info-bg); border-bottom-right-radius: 5px; }
.bubble.is-internal { border: 1px dashed var(--warning); background: var(--warning-bg); }
.bubble-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; font-size: 11px; color: var(--text-muted); }
.bubble-body { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.context-panel { min-width: 0; padding: 22px; background: var(--bg-elevated); border: 1px solid var(--surface-border); border-radius: 18px; }
.context-panel .kv { grid-template-columns: minmax(0, 1fr); gap: 3px; }
.context-panel dt { font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); }
.context-panel dd { margin: 4px 0 16px; font-weight: 600; font-size: 13px; overflow-wrap: anywhere; }
.support-status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint); }
.status-dot.is-online { background: var(--success); box-shadow: 0 0 0 4px var(--success-bg); }
.status-dot.is-offline { background: var(--warning); }

/* Copy fields and system requirements */
.copy-field { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 48px; background: var(--bg-subtle); border: 1px solid var(--surface-border); border-radius: 12px; padding: 7px 7px 7px 14px; }
.copy-field code { flex: 1 1 auto; min-width: 0; overflow-x: auto; white-space: nowrap; font-size: 12px; }
.copy-field > span { flex: 1 1 auto; min-width: 0; }
.copy-field .btn { flex: 0 0 auto; min-height: 36px; padding: 7px 12px; font-size: 12px; }
.req-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.req-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; border: 1px solid var(--surface-border); background: var(--bg-subtle); font-size: 13px; overflow-wrap: anywhere; }
.req-item > span:last-child { min-width: 0; }
.req-item.is-pass { border-color: var(--success); border-color: color-mix(in srgb, var(--success) 26%, var(--surface-border)); }
.req-item.is-fail { border-color: var(--danger); background: var(--danger-bg); }
.req-item.is-warn { border-color: var(--warning); border-color: color-mix(in srgb, var(--warning) 30%, var(--surface-border)); }
.req-icon { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 1px; }
.req-icon.is-pass { color: var(--success); }
.req-icon.is-fail { color: var(--danger); }
.req-icon.is-warn { color: var(--warning); }

/* Toasts, modals and loading states */
.toast-region {
  position: fixed; z-index: 1000; bottom: max(20px, env(safe-area-inset-bottom, 0px)); right: 20px; left: 20px;
  display: flex; flex-direction: column; gap: 12px; align-items: stretch; pointer-events: none;
}
.toast { display: flex; gap: 12px; align-items: flex-start; padding: 18px; pointer-events: auto; background: var(--bg-elevated); color: var(--text); border: 1px solid var(--surface-border); border-left: 4px solid var(--brand-primary); border-radius: 14px; box-shadow: var(--shadow-lg); font-size: 14px; animation: toast-in 180ms ease-out; }
.toast.is-success { border-left-color: var(--success); }
.toast.is-error { border-left-color: var(--danger); }
.toast.is-warning { border-left-color: var(--warning); }
.toast-body { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.toast-close { display: grid; place-items: center; width: 32px; min-height: 32px; flex: 0 0 auto; margin: -6px -6px -6px 0; background: transparent; border: 0; border-radius: 8px; color: var(--text-muted); cursor: pointer; font-size: 22px; line-height: 1; }
.toast-close:hover { background: var(--bg-subtle); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.modal-backdrop { display: grid; place-items: center; position: fixed; inset: 0; z-index: 900; padding: 24px; overflow-y: auto; background: rgba(4, 14, 30, 0.65); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.modal { min-width: 0; width: 100%; max-width: 540px; max-height: 90vh; max-height: 90dvh; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--surface-border); border-radius: 24px; background: var(--bg-elevated); color: var(--text); box-shadow: var(--shadow-lg); }
.modal-lg { max-width: 800px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--surface-border); }
.modal-header h3 { min-width: 0; margin: 0; font-size: 1.2rem; }
.modal-body { padding: 24px; overflow-wrap: anywhere; }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding: 20px 24px; border-top: 1px solid var(--surface-border); background: var(--bg-subtle); }
.modal-close { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 auto; margin: -6px -8px -6px 0; padding: 0; background: transparent; border: 0; border-radius: 10px; font-size: 26px; line-height: 1; color: var(--text-muted); cursor: pointer; }
.modal-close:hover { background: var(--bg-subtle); }
.skeleton { background: linear-gradient(90deg, var(--bg-inset) 25%, var(--bg-subtle) 37%, var(--bg-inset) 63%); background-size: 400% 100%; animation: skeleton 1.3s ease-in-out infinite; border-radius: 8px; }
@keyframes skeleton { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.skeleton-line { height: 12px; margin-bottom: 10px; }
.skeleton-line:last-child { width: 60%; }
.spinner { width: 17px; height: 17px; flex: 0 0 auto; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin 620ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); overflow-wrap: anywhere; }
.empty-state-icon { display: grid; place-items: center; width: 64px; height: 64px; padding: 12px; margin: 0 auto 20px; background: var(--bg-inset); border-radius: 18px; color: var(--text-faint); }
.empty-state h3 { color: var(--text); }
.empty-state p { max-width: 48ch; margin-inline: auto; font-size: 14px; }
.pagination { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: center; margin-top: 24px; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 8px 12px; border-radius: 11px; border: 1px solid var(--surface-border); background: var(--bg-elevated); color: var(--text); font-size: 13px; font-weight: 650; }
.pagination a:hover { background: var(--bg-subtle); text-decoration: none; }
.pagination .is-current { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }
.pagination .is-disabled { opacity: 0.45; pointer-events: none; }
.impersonation-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; position: sticky; top: 0; z-index: 200; padding: 12px var(--gutter); background: #854b0b; color: #fff; font-size: 13px; font-weight: 550; box-shadow: var(--shadow-sm); }
.impersonation-banner strong { font-weight: 750; }
.impersonation-banner form { margin: 0; }
.impersonation-banner .btn { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.35); color: #fff; }
.impersonation-banner .btn:hover { background: rgba(255, 255, 255, 0.22); }

/* Utility classes used by existing templates */
.text-muted { color: var(--text-muted); }
.text-faint { color: var(--text-faint); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-small { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mono { font-family: var(--font-mono); font-size: 0.92em; }
.break { word-break: break-word; overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
.is-numeric, .num { font-variant-numeric: tabular-nums; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.ml-2 { margin-left: var(--space-2); }
.ml-auto { margin-left: auto; }
.flex-1 { flex: 1 1 auto; min-width: 0; }
.w-full { width: 100%; }
.max-60 { max-width: 60ch; }
.divide { border-top: 1px solid var(--surface-border); margin: 20px 0; padding-top: 16px; }
.kv { display: grid; grid-template-columns: minmax(0, 130px) minmax(0, 1fr); gap: 12px 20px; font-size: 13px; }
.kv dt { color: var(--text-muted); font-weight: 500; overflow-wrap: anywhere; }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.plain-list { list-style: none; margin: 0; padding: 0; }

/* Desktop */
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 40px; }
  .auth-shell { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 48px; }
  .auth-alt { padding: 40px; }
}
@media (min-width: 1024px) {
  .admin-shell { grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
  .admin-sidebar { display: flex; }
  .admin-shell.sidebar-open .admin-sidebar { position: sticky; inset: auto; width: auto; box-shadow: none; }
  .admin-topbar [data-sidebar-toggle], .sidebar-scrim, .mobile-tabbar { display: none; }
  main.container { padding-bottom: 24px; }
  .mobile-tabbar ~ .toast-region { bottom: 20px; }
  .grid-sidebar { grid-template-columns: minmax(0, 1fr) 320px; }
  .grid-sidebar-left { grid-template-columns: 280px minmax(0, 1fr); }
  .site-nav[aria-label="Customer navigation"] { display: flex; }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  .site-header-inner:has(.site-nav[aria-label="Customer navigation"]) { flex-wrap: wrap; gap: 12px 20px; padding-top: 16px; }
  .site-nav[aria-label="Customer navigation"] { order: 3; flex-basis: 100%; justify-content: center; padding-bottom: 12px; }
}
@media (min-width: 1280px) {
  .site-nav { display: flex; }
  .mobile-nav-toggle, .mobile-nav.is-open { display: none; }
  .support-layout { grid-template-columns: minmax(0, 1fr) 310px; }
  .support-shell { grid-template-columns: 260px minmax(0, 1fr) 280px; }
}
@media (min-width: 1440px) {
  .admin-content { padding: 40px 40px 64px; }
  .admin-topbar { padding-inline: 40px; }
  .hero { padding: 68px 52px; }
}

/* Tablet and smaller desktops */
@media (max-width: 1023px) {
  body.sidebar-visible { overflow: hidden; }
  .input, .select, .textarea { font-size: 16px; }
  .admin-topbar form .input { font-size: 16px; }
  .btn-sm { min-height: 44px; }
  .admin-content { padding: 28px var(--gutter) 48px; }
  .admin-topbar { padding-inline: var(--gutter); }
  .mobile-nav[aria-label="Customer navigation"] { display: block; padding: 8px 0; max-height: none; }
  .mobile-nav[aria-label="Customer navigation"] > .container { display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .mobile-nav[aria-label="Customer navigation"] a { flex: 0 0 auto; font-size: 12px; min-height: 40px; padding: 8px 12px; background: var(--bg-subtle); white-space: nowrap; }
  .mobile-nav[aria-label="Customer navigation"] a:nth-child(-n+5) { display: none; }
}
@media (min-width: 860px) { .record-list-mobile-only { display: none; } }
@media (max-width: 859px) { .table-mobile-hide { display: none; } }
@media (min-width: 620px) { .toast-region { left: auto; width: 380px; } }

/* Phones */
@media (max-width: 767px) {
  :root { --gutter: 18px; --header-height: 68px; }
  html { scroll-padding-top: 170px; }
  .site-header-inner { flex-wrap: wrap; gap: 12px; min-height: 0; padding-top: 14px; padding-bottom: 12px; }
  .site-header-inner > .brand { flex: 1 1 100%; }
  .site-header-inner .brand-text strong { max-width: calc(100vw - 98px); }
  .header-actions { width: 100%; margin-left: 0; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
  .header-actions .btn-sm { min-height: 44px; padding: 10px 12px; font-size: 12px; }
  .header-actions .btn-icon { min-height: 44px; }
  #main-content:not(.container) { padding-top: 24px; }
  #main-content:not(.container) > .page-head { margin-bottom: 24px; }
  .hero { padding: 32px 24px; border-radius: 22px; }
  .hero-grid { gap: 28px; }
  .hero h1 { max-width: 20ch; font-size: clamp(2rem, 1.2rem + 3.8vw, 2.7rem); }
  .hero-lead { font-size: 14px; line-height: 1.8; }
  .hero-actions .btn { flex: 1 1 190px; }
  .hero-trust { margin-top: 24px; }
  .section { padding: 36px 0; }
  .section-alt { padding: 20px; border-radius: 20px; }
  .section-head { margin-bottom: 24px; }
  .grid, .grid-sidebar, .support-layout, .support-shell { gap: 18px; }
  .grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
  .stat-grid { gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 18px; border-radius: 15px; }
  .stat::before { margin-bottom: 14px; }
  .stat-value { font-size: 1.5rem; }
  .stat-meta { font-size: 11px; }
  .page-head { gap: 16px; margin-bottom: 24px; }
  .page-head > .btn-group { width: 100%; }
  .page-head > .btn-group .btn { flex: 1 1 140px; }
  .btn { min-height: 46px; white-space: normal; text-align: center; }
  .btn-sm { min-height: 44px; }
  .btn-lg { min-height: 52px; padding-inline: 18px; }
  .badge { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  .input, .select, .textarea { font-size: 16px; }
  .option-card { padding: 18px; }
  .segmented { width: 100%; }
  .segmented label { flex: 1 1 auto; }
  .segmented span { width: 100%; min-height: 44px; }
  .auth-shell { min-height: 100svh; padding: 28px var(--gutter); gap: 24px; }
  .auth-card { padding: 24px; border-radius: 20px; }
  .auth-alt { padding: 28px; border-radius: 20px; }
  .auth-card .row-between > .btn-link { padding-left: 0; }
  .admin-topbar { gap: 8px; padding-block: 12px; }
  .admin-topbar > .flex-1 { flex-basis: 80px; font-size: 13px; }
  .admin-topbar form[role="search"] { order: 10; width: 100%; }
  .admin-topbar form[role="search"] .input { min-width: 0 !important; font-size: 16px; }
  .admin-topbar .btn-icon { width: 44px; min-width: 44px; }
  .admin-content { padding-top: 24px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .site-footer { margin-top: 40px; padding-top: 36px; }
  .footer-bottom { margin-top: 28px; padding-top: 20px; }
  .footer-links a { min-height: 40px; padding-block: 10px; }
  .copy-field .btn { min-height: 44px; }
  .bubble { max-width: 95%; font-size: 14px; padding: 14px; }
  .thread, .support-thread { max-height: 52dvh; }
  .alert { padding: 14px 16px; }
  .toast-region { right: 12px; left: 12px; width: auto; }
  .toast { padding: 16px; }
  .toast-close { min-height: 44px; width: 44px; margin: -8px -10px -8px 0; }
}
@media (max-width: 640px) {
  .card { padding: 20px; border-radius: 18px; }
  .card-tight { padding: 16px; }
  .card-header { gap: 12px; padding: 18px 20px; }
  .card-body { padding: 20px; }
  .card-body-tight { padding: 16px; }
  .card-footer { padding: 16px 20px; }
  .card > .card-header { margin: -20px -20px 0; }
  .card > .card-body { padding: 20px 0; }
  .card > .card-body:last-child { padding-bottom: 0; }
  .card > .card-footer { margin: 0 -20px -20px; }
  .card-flush { padding: 0; }
  .card-flush > .card-header { margin: 0; }
  .card-flush > .card-body { padding: 20px; }
  .card-flush > .card-footer { margin: 0; }
  .card-tight > .card-header { margin: -16px -16px 0; padding: 16px; }
  .card-tight > .card-footer { margin: 0 -16px -16px; padding: 16px; }
  .auth-card > .card { padding: 0; }
  .auth-card > .card > .card-header { margin: 0; }
  .plan-card { padding: 24px; }
  .hero .card { border-radius: 18px; }
  .hero .plan-benefits { gap: 14px; }
  .stepper { gap: 6px; padding-top: 4px; }
  .stepper-label { display: none; }
  .stepper-item { padding-right: 0; }
  .stepper-connector { width: 10px; }
  .kv { grid-template-columns: minmax(0, 100px) minmax(0, 1fr); gap: 10px 14px; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal { max-width: none; max-height: 94vh; max-height: 94dvh; border-radius: 22px 22px 0 0; }
  .modal-header, .modal-body, .modal-footer { padding: 18px 20px; }
  .modal-footer { padding-bottom: max(20px, env(safe-area-inset-bottom, 0px)); }
  .modal-footer .btn { flex: 1 1 120px; }
}
@media (max-width: 479px) {
  .hero { padding: 28px 20px; }
  .hero h1 { font-size: 2.05rem; }
  .hero > .hero-grid > .card { padding: 18px; }
  .hero > .hero-grid > .card > .card-header { margin: -18px -18px 0; padding: 16px 18px; }
  .hero > .hero-grid > .card > .card-body { padding-top: 18px; }
  .section-alt { padding: 16px; }
  .section-alt > .stat-grid .stat { padding: 16px 12px; }
  .auth-card { padding: 22px; }
  .auth-alt { padding: 24px; }
  .record-card { padding: 16px; }
  .record-card dl { grid-template-columns: minmax(0, 95px) minmax(0, 1fr); gap: 8px 12px; }
  .input-group .btn { flex: 1 1 auto; }
  .card-footer > .btn-group .btn { flex: 1 1 140px; }
}
@media (max-width: 359px) {
  :root { --gutter: 12px; }
  .header-actions .btn-sm { padding-inline: 9px; }
  .header-actions { gap: 5px; }
  .hero { padding: 24px 16px; }
  .hero h1 { font-size: 1.85rem; }
  .auth-card { padding: 18px; }
  .stat { padding: 16px 12px; }
  .stat-value { font-size: 1.35rem; }
  .admin-topbar > .flex-1 { flex-basis: 50px; }
  .kv { grid-template-columns: minmax(0, 82px) minmax(0, 1fr); gap: 10px 12px; }
  .mobile-tabbar { padding-inline: 4px; }
  .mobile-tabbar a { font-size: 9px; }
}

/* Motion preferences and printing */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .mobile-tabbar, .admin-sidebar, .admin-topbar,
  .btn, .no-print, .toast-region, .impersonation-banner, .sidebar-scrim { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .admin-shell { display: block; min-height: 0; }
  .card, .panel, .stat { background: #fff; color: #000; border: 1px solid #999; box-shadow: none; break-inside: avoid; }
  .admin-content, .container, #main-content:not(.container) { width: 100%; padding: 0; max-width: none; }
  main.container { padding-bottom: 0; }
  .table-mobile-hide { display: block !important; }
  .record-list-mobile-only { display: none !important; }
  .table-wrap, .notification-list, .scroll-list, .admin-content .record-list, .admin-content .table-wrap, .portal-main .record-list, .portal-main .table-wrap { max-height: none; overflow: visible; }
  table.table { min-width: 0; font-size: 10pt; }
  table.table th { position: static; }
  a { color: #000; text-decoration: none; }
  .auth-shell { display: block; min-height: 0; padding: 0; }
}

/* License creation and checkout controls. */
.license-paid-fields { border: 0; margin: 0; padding: 0; min-width: 0; }
.copy-field code { min-width: 0; overflow-wrap: anywhere; user-select: all; }
.checkout-total { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px; border-radius: 12px; background: var(--info-bg); }
.checkout-total strong { font-size: 1.3rem; white-space: nowrap; }
.checkout-summary[aria-busy="true"] [data-summary-total] { opacity: .55; }
@media (min-width: 1024px) {
  .site-nav { display: flex; }
  .mobile-nav-toggle, .mobile-nav, .mobile-nav.is-open { display: none; }
  .checkout-summary, .upgrade-summary { position: sticky; top: 100px; }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  .site-header-inner { flex-wrap: wrap; gap: 12px 20px; padding-block: 14px; }
  .site-header-inner .site-nav { order: 3; flex-basis: 100%; justify-content: center; }
}
@media (max-width: 1023px) {
  .site-header .site-header-inner { flex-wrap: nowrap; min-height: 68px; gap: 12px; padding-block: 12px; }
  .site-header .site-header-inner > .brand { flex: 1 1 auto; min-width: 0; }
  .site-header .brand-text { min-width: 0; }
  .site-header .brand-text strong { max-width: calc(100vw - 178px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .site-header .header-actions { width: auto; margin-left: auto; flex-wrap: nowrap; gap: 6px; }
  .site-header .header-actions > :not([data-theme-toggle]):not([data-mobile-nav-toggle]) { display: none; }
  .site-header .site-nav { display: none; }
  .site-header .mobile-nav { display: none; max-height: 70vh; overflow-y: auto; padding-block: 8px; }
  .site-header .mobile-nav.is-open { display: block; }
  .site-header .mobile-nav > .container { display: block; overflow: visible; }
  .site-header .mobile-nav a, .site-header .mobile-nav a:nth-child(-n+5) { display: block; background: transparent; font-size: 14px; min-height: 44px; white-space: normal; }
  .site-header .mobile-nav form { margin: 8px 0; }
  .site-header .mobile-nav-toggle { display: inline-flex; }
  .admin-topbar [data-theme-toggle] { margin-left: auto; }
}
