/* Calm, readable console surfaces. Brand and personal appearance tokens stay authoritative. */
:root {
  --radius: 20px;
  --shadow: 0 3px 16px rgb(0 0 0 / .025), 0 1px 2px rgb(0 0 0 / .015);
  --ui-fast: 160ms;
  --ui-enter: 240ms;
  --ui-ease: cubic-bezier(.2, .7, .2, 1);
  --nav-bg: var(--card);
  --nav-ink: var(--ink);
  --nav-muted: var(--muted);
  --nav-active: var(--accent-soft);
  --nav-active-ink: var(--accent-text, var(--accent));
}
:root:not([data-custom-colors=true]):not([data-mode=dark]) {
  --bg: #f5f5f7;
  --soft: #f5f6f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #e5e5e8;
}
:root[data-mode=dark] {
  --shadow: 0 4px 22px rgb(0 0 0 / .12);
}
:root[data-custom-colors=true] {
  --nav-bg: var(--sidebar);
  --nav-ink: var(--sidebar-ink, var(--ink));
  --nav-muted: var(--sidebar-muted);
  --nav-active: color-mix(in srgb, var(--sidebar) 88%, var(--sidebar-ink, white));
  --nav-active-ink: var(--sidebar-active-ink, var(--accent-bright));
}
body { line-height: 1.5; letter-spacing: -.012em; }
button, input, textarea, select { letter-spacing: inherit; }
button, a, input, select, textarea { scroll-margin: 84px; }
h1, h2, h3, .stat-value { text-wrap: balance; }
button:disabled { cursor: not-allowed; }
button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent-text, var(--accent));
  outline-offset: 4px;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}

/* A quiet, consistent navigation frame. */
.sidebar {
  width: 248px;
  padding: 30px 18px 20px;
  background: var(--nav-bg);
  border-right: 1px solid var(--line);
  color: var(--nav-ink);
  scrollbar-width: thin;
}
.sidebar .brand { font-size: 20px; letter-spacing: -.7px; gap: 12px; padding: 0 8px; }
.sidebar .brand-mark { width: 38px; height: 38px; border-radius: 12px; background: var(--nav-active); color: var(--nav-active-ink); }
.sidebar .brand small { font-size: 11px; color: var(--nav-muted); letter-spacing: .02em; }
.workspace-label { margin: 34px 12px 13px; font-size: 11px; color: var(--nav-muted); letter-spacing: .03em; }
.workspace-label span { font-size: 8px; color: var(--nav-muted); border-color: color-mix(in srgb, var(--nav-muted) 22%, transparent); }
.sidebar nav { gap: 4px; }
.sidebar nav a { height: 43px; border-radius: 11px; padding: 0 13px; font-size: 13px; font-weight: 450; gap: 12px; color: var(--nav-muted); transition: color var(--ui-fast), background-color var(--ui-fast); }
.sidebar nav svg { width: 18px; height: 18px; }
.sidebar nav a:hover { background: color-mix(in srgb, var(--nav-muted) 8%, transparent); color: var(--nav-ink); }
.sidebar nav a.active { background: var(--nav-active); color: var(--nav-active-ink); font-weight: 600; }
.nav-count { font-size: 10px; padding: 1px 7px; border: 0; border-radius: 6px; color: var(--nav-active-ink); background: color-mix(in srgb, var(--nav-active-ink) 10%, transparent); }
.nav-heading { color: var(--nav-muted); font-size: 11px; padding: 23px 13px 9px; letter-spacing: 0; }
.sidebar-bottom { padding-top: 30px; }
.sidebar-health { border: 0; background: color-mix(in srgb, var(--nav-muted) 6%, transparent); border-radius: 12px; color: var(--nav-ink); font-size: 11px; margin-bottom: 18px; }
.sidebar-health small, .account small { color: var(--nav-muted); line-height: 1.6; }
.account { border-color: color-mix(in srgb, var(--nav-muted) 20%, transparent); padding: 19px 7px 0; }
.account strong { font-size: 12px; }
.account .avatar { width: 34px; height: 34px; color: var(--nav-active-ink); background: var(--nav-active); }
.account .icon-button { color: var(--nav-muted); }
.account .icon-button:hover { color: var(--nav-ink); background: color-mix(in srgb, var(--nav-muted) 12%, transparent); }
.sidebar-version-indicator { border-color: color-mix(in srgb, var(--nav-active-ink) 18%, transparent); background: var(--nav-active); color: var(--nav-active-ink); border-radius: 11px; font-size: 11px; }
.sidebar-version-indicator.version-warning { color: var(--warning); background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 25%, transparent); }
.main-shell { margin-left: 248px; }
.topbar { height: 68px; padding: 0 42px; position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--card) 88%, transparent); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.topbar-left { font-size: 12px; gap: 12px; }
.topbar-left strong { color: var(--ink); font-weight: 500; }
.topbar-right { gap: 16px; }
.sync-status { font-size: 11px; }
.topbar .icon-button { width: 36px; height: 36px; }
main { max-width: 1680px; padding: 42px 42px 38px; }
.page-heading { margin-bottom: 34px; gap: 26px; align-items: center; }
.page-heading h1 { font-size: clamp(30px, 2.8vw, 40px); line-height: 1.2; letter-spacing: -.045em; font-weight: 650; }
.page-heading .eyebrow { margin-bottom: 11px; font-size: 10px; letter-spacing: .13em; font-weight: 550; }
.page-heading p { font-size: 14px; line-height: 1.75; margin-top: 13px; max-width: 740px; }
.page-heading > .button { margin-top: 0; }
.heading-actions { max-width: none; flex-wrap: wrap; gap: 10px; }
.page-footnote { font-size: 11px; margin-top: 28px; }

/* Shared controls keep their existing color and danger semantics. */
.button { border-radius: 11px; min-height: 40px; padding: 10px 17px; font-size: 13px; font-weight: 550; line-height: 1.4; transition: background-color var(--ui-fast), border-color var(--ui-fast), color var(--ui-fast), box-shadow var(--ui-fast), transform var(--ui-fast) var(--ui-ease); }
.button.primary { border-radius: 999px; padding-inline: 20px; box-shadow: none; }
.secondary { background: var(--card); border-color: var(--line); color: var(--ink); }
.secondary:hover { background: var(--soft); border-color: color-mix(in srgb, var(--line) 60%, var(--muted)); }
.small-button { min-height: 34px; font-size: 12px; padding: 7px 12px; }
.icon-button { border-radius: 10px; transition: color var(--ui-fast), background-color var(--ui-fast), transform var(--ui-fast) var(--ui-ease); }
.icon-button:hover { background: var(--soft); }
.text-link { font-size: 13px; font-weight: 500; gap: 7px; }
.chip { padding: 6px 9px; font-size: 11px; font-weight: 550; border-radius: 7px; line-height: 1.15; }
.protocol-chip { font-size: 10px; padding: 5px 7px; border-radius: 6px; }
.notice { font-size: 13px; line-height: 1.75; border-radius: 13px; padding: 18px 20px; }
.form-error { font-size: 12px; line-height: 1.7; border-radius: 10px; border-color: color-mix(in srgb, var(--danger) 28%, transparent); }
.field-help, .policy-note, .muted { font-size: 12px; line-height: 1.8; }
.policy-note { border-radius: 12px; }
input, select, textarea { min-height: 42px; border-radius: 11px; padding: 11px 13px; font-size: 14px; transition: border-color var(--ui-fast), background-color var(--ui-fast), box-shadow var(--ui-fast); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input[type=checkbox], input[type=radio] { min-height: 0; accent-color: var(--accent); }
input[type=color] { min-height: 0; padding: 3px; }
input[type=range] { min-height: 0; padding: 0; }
label, .editor-fields label, .product-field { color: var(--ink); font-size: 13px; font-weight: 550; }
.checkbox-label { line-height: 1.7; }
.checkbox-label small { font-size: 11px; }
.form-row { gap: 20px; }
.product-form { gap: 19px; }
.product-field input, .product-field select, .product-secret input { padding: 11px 13px; border-radius: 11px; font-size: 14px; }

/* Content has enough room to scan without turning a dashboard into a poster. */
.card { border-color: var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-heading { padding: 26px 26px 21px; gap: 18px; }
.card-heading h2 { font-size: 17px; letter-spacing: -.025em; font-weight: 600; }
.card-heading p { font-size: 12px; line-height: 1.7; margin-top: 8px; }
.card-heading > div { min-width: 0; }
.stats-grid { gap: 18px; margin-bottom: 26px; }
.stat-card { padding: 24px; }
.stat-card-heading { gap: 12px; margin-bottom: 20px; }
.stat-card-heading span { font-size: 12px; }
.stat-icon { height: 33px; width: 33px; border: 0; border-radius: 10px; }
.stat-value { font-size: 34px; font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 13px; }
.stat-bottom { font-size: 11px; line-height: 1.6; flex-wrap: wrap; }
.stat-bottom .chip { font-size: 10px; }
.overview-grid { gap: 26px; margin-bottom: 26px; }
.chart-legend { font-size: 11px; line-height: 1.6; flex-wrap: wrap; }
.traffic-chart { height: 200px; margin: 8px 26px 0; }
.traffic-foot { padding: 21px 26px 25px; gap: 28px; }
.traffic-foot span, .traffic-foot > small { font-size: 11px; }
.traffic-foot strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.chart-empty, .chart-empty small { font-size: 12px; }
.network-flow { padding-top: 30px; padding-bottom: 30px; }
.flow-node strong { font-size: 22px; font-weight: 600; }
.flow-node small { font-size: 11px; }
.network-health { font-size: 12px; border-radius: 11px; line-height: 1.7; }
.network-card > .text-link { font-size: 12px; }
.compact-summary { font-size: 12px; gap: 24px; line-height: 1.6; flex-wrap: wrap; margin-bottom: 25px; }
.nodes-grid, .product-grid { gap: 24px; }
.node-card, .product-card { padding: 26px; }
.node-card h2 { font-size: 18px; margin-top: 20px; letter-spacing: -.025em; }
.node-card-address { font-size: 12px; }
.node-card-metrics { padding: 19px 0; gap: 16px; }
.node-card-metrics span, .node-card-bottom small { font-size: 11px; }
.node-card-metrics strong { font-size: 14px; color: var(--ink); font-variant-numeric: tabular-nums; }
.node-card .node-actions .small-button { font-size: 11px; padding: 7px 10px; min-height: 34px; }
.node-actions .icon-button, .row-actions .icon-button { width: 32px; height: 32px; }
.product-card .card-heading { padding: 0; margin-bottom: 24px; }
.product-list-row { font-size: 13px; gap: 18px; padding: 17px 0; line-height: 1.6; }
.product-list-row small { font-size: 12px; }
.product-secret { background: var(--soft); border-radius: 14px; }
.empty-state { padding: 52px 28px; gap: 13px; }
.empty-state h3 { font-size: 17px; font-weight: 550; color: var(--ink); }
.empty-state p { font-size: 13px; }
.empty-state .button { min-height: 40px; font-size: 13px; }
.settings-list dt, .settings-list dd, .setup-steps p, .deployment-note p, .card-actions small { font-size: 12px; line-height: 1.8; }
.setup-steps h3, .deployment-note h2 { font-size: 15px; }
.card-actions .button { font-size: 12px; min-height: 40px; }

/* Tables remain horizontally scrollable; compact density is still explicit. */
table { font-size: 13px; }
th { font-size: 11px; letter-spacing: .015em; padding: 14px 24px; background: var(--soft); font-weight: 500; }
td { padding: 20px 24px; }
td strong { font-size: 13px; font-weight: 550; line-height: 1.6; }
td small { font-size: 11px; line-height: 1.6; }
.rules-table td { padding-top: 20px; padding-bottom: 20px; }
.rules-table[data-density=compact] td { padding-top: 11px; padding-bottom: 11px; }
.route-cell, .bytes-cell, .audit-action, .audit-detail { font-size: 12px; line-height: 1.7; }
.status-cell { min-width: 155px; }
.status-cell small { font-size: 11px; line-height: 1.6; }
tbody tr { transition: background-color var(--ui-fast); }
tbody tr:hover { background: color-mix(in srgb, var(--soft) 65%, var(--card)); }
.toolbar { padding: 23px 26px; gap: 20px; }
.search-field { border-radius: 11px; width: 350px; }
.search-field input { font-size: 13px; padding-block: 10px; min-height: 40px; }
.toolbar-filters { gap: 12px; }
.toolbar-filters select { width: 140px; font-size: 12px; padding: 10px 12px; }
.toolbar .muted { font-size: 11px; }
#rule-workbench { padding: 18px 26px; gap: 16px; background: color-mix(in srgb, var(--soft) 65%, var(--card)); }
.workbench-actions { gap: 9px; }
.workbench-actions .button { min-height: 36px; padding: 8px 12px; font-size: 12px; }
.workbench-summary { font-size: 12px; }

/* All newer workspaces use the same type and control scale. */
.settings-nav, .client-support-nav { padding: 6px; border-radius: 14px; gap: 5px; margin-bottom: 28px; background: var(--card); }
.settings-nav-link, .client-support-nav .button { padding: 11px 17px; border-radius: 9px; font-size: 13px; font-weight: 500; }
.settings-nav-link[aria-current=page], .client-support-nav [aria-current=page] { box-shadow: none; background: var(--accent-soft); color: var(--accent-text, var(--accent)); }
.settings-guide-card { padding: 30px; }
.settings-guide-card h2 { font-size: 20px; }
.settings-guide-card p { font-size: 13px; }
.settings-channel-card .product-form { padding: 0 26px 26px; }
.settings-inline-links { gap: 24px; }
.client-support-card, .client-api-card, .client-subscription-card { padding: 28px; }
.client-support-card h2, .client-api-heading h2, .subscription-heading h2 { font-size: 20px; font-weight: 600; letter-spacing: -.025em; }
.client-support-preview, .client-support-body, .client-api-help { font-size: 13px; }
.client-support-toolbar .field-help, .subscription-toolbar .field-help { font-size: 13px; }
.client-support-actions .button, .client-support-card > .button, .client-support-pagination > .button, .client-api-actions .button, .client-api-heading .button, .subscription-actions .button { min-height: 38px; font-size: 12px; padding: 9px 14px; }
.client-support-message { border-radius: 14px; padding: 20px; }
.client-support-message-meta { font-size: 11px; }
.client-api-record { padding-top: 23px; margin-top: 23px; }
.client-api-heading h3 { font-size: 15px; }
.client-api-secret, .subscription-masked { padding: 17px; border-radius: 12px; font-size: 12px; }
.client-support-field, .client-api-field, .subscription-field, .workbench-field { gap: 9px; margin-block: 20px; }
.client-api-scopes, .subscription-sources, .node-grants, .advanced-fields { border-radius: 12px; }
.monitoring-summary, .probe-history-status, .probe-chart-help { font-size: 12px; }
.resource-history-summary span, .probe-history-summary span { font-size: 11px; }
.resource-history-summary strong, .probe-history-summary strong { font-size: 13px; }
.probe-legend-item { font-size: 11px; border-radius: 9px; }
.rule-copy-actions .button { font-size: 11px; padding: 7px 10px; min-height: 32px; }
.rule-detail-tabs button { font-size: 13px; padding-block: 12px; }
.detail-metric > span { font-size: 12px; }
.detail-metric strong { font-size: 20px; }
.detail-metric small { font-size: 11px; }
.node-address-group strong, .node-address-group small { font-size: 11px; }

/* Dialog motion is brief; no looping or data-refresh animations. */
.editor-dialog, .confirm-dialog, .token-dialog, .appearance-dialog, .rule-detail-dialog, .tls-guide-dialog {
  border-radius: 22px;
  border-color: var(--line);
  box-shadow: 0 24px 100px rgb(0 0 0 / .16), 0 4px 18px rgb(0 0 0 / .06);
}
:is(dialog, .editor-dialog, .confirm-dialog, .token-dialog, .appearance-dialog, .rule-detail-dialog, .tls-guide-dialog)::backdrop { background: rgb(20 22 26 / .3); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); }
.dialog-heading { padding: 25px 28px 22px; }
.dialog-heading h2 { font-size: 21px; line-height: 1.4; letter-spacing: -.03em; font-weight: 600; }
.dialog-heading .button { min-height: 36px; padding: 8px 12px; font-size: 12px; }
.editor-fields { padding: 26px 28px; }
.dialog-footer { gap: 12px; padding: 20px 28px; background: color-mix(in srgb, var(--soft) 45%, var(--card)); }
.dialog-footer .button { min-height: 40px; font-size: 13px; min-width: 86px; }
.confirm-dialog > p { padding: 26px 28px; font-size: 14px; }
.toast { border-radius: 14px; padding: 14px 19px; font-size: 13px; line-height: 1.6; box-shadow: 0 12px 36px rgb(0 0 0 / .12); }

/* The sign-in surface shares the same typography and form rhythm. */
.login-screen { background: var(--bg); }
.login-story { padding: 52px; background: var(--sidebar); }
.login-intro h1 { font-size: clamp(36px, 4.1vw, 62px); line-height: 1.15; letter-spacing: -.055em; }
.login-intro p { font-size: 15px; line-height: 1.9; max-width: 360px; }
.login-form-wrap { padding: 52px; }
.login-form { width: min(390px, 100%); }
.login-form h2 { font-size: 32px; font-weight: 600; letter-spacing: -.04em; }
.login-form > p { font-size: 14px; line-height: 1.8; margin-top: 12px; }
.login-form input { min-height: 48px; font-size: 15px; border-radius: 12px; }
.login-form label { font-size: 13px; }
.login-form .button { min-height: 46px; font-size: 14px; }
.login-note { font-size: 12px; line-height: 1.9; }

/* A restrained light accent: static atmosphere and feedback only on interaction. */
main { background-image: radial-gradient(ellipse 600px 340px at 88% 0, color-mix(in srgb, var(--accent) 5%, transparent), transparent 75%); background-repeat: no-repeat; }
.button.primary { background-image: linear-gradient(120deg, rgb(255 255 255 / .12), transparent 60%); }
.entry-editor { border-color: var(--line); background: var(--card); }
.entry-editor-item { border-color: var(--line); background: color-mix(in srgb, var(--soft) 45%, var(--card)); }
.service-chip { color: var(--accent-text, var(--accent)); }

@media (hover: hover) and (pointer: fine) {
  .button:not(:disabled):hover { transform: translateY(-1px); }
  .button.primary:not(:disabled):hover { box-shadow: 0 4px 16px color-mix(in srgb, var(--accent) 22%, transparent); }
  .button:not(:disabled):active, .icon-button:not(:disabled):active { transform: translateY(0) scale(.98); }
  .client-support-nav .button:hover { transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .view:not([hidden]) { animation: halo-view-enter var(--ui-enter) var(--ui-ease) both; }
  dialog[open] { animation: halo-dialog-enter 200ms var(--ui-ease) both; }
  dialog[open]::backdrop { animation: halo-backdrop-enter 180ms ease-out both; }
}
@keyframes halo-view-enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes halo-dialog-enter { from { opacity: 0; transform: translateY(7px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes halo-backdrop-enter { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 1250px) {
  .sidebar { width: 228px; padding-inline: 15px; }
  .sidebar .brand { font-size: 18px; }
  .main-shell { margin-left: 228px; }
  main { padding: 34px 28px; }
  .topbar { padding-inline: 28px; }
  .stat-card { padding: 21px; }
  .stat-value { font-size: 30px; }
  .overview-grid, .nodes-grid, .product-grid { gap: 20px; }
  .traffic-foot { gap: 20px; flex-wrap: wrap; }
  .toolbar { flex-wrap: wrap; }
}
@media (min-width: 761px) and (max-width: 1000px) {
  .sidebar { width: 218px; padding-inline: 12px; }
  .main-shell { margin-left: 218px; }
  .sidebar nav a { font-size: 12px; padding-inline: 11px; gap: 10px; }
  .sidebar .brand { font-size: 17px; }
  main { padding: 30px 24px; }
  .topbar { padding-inline: 24px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-grid { grid-template-columns: 1fr; }
  .page-heading { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .sidebar { width: min(280px, calc(100vw - 48px)); padding: 26px 18px 22px; transition: transform var(--ui-enter) var(--ui-ease); box-shadow: 12px 0 45px rgb(0 0 0 / .08); }
  .sidebar .brand { font-size: 20px; }
  .sidebar nav a { height: 44px; font-size: 13px; }
  .sidebar .brand small { font-size: 11px; }
  .main-shell { margin-left: 0; }
  .topbar { height: 64px; padding: 0 18px; gap: 9px; }
  .topbar-left, .topbar-right { gap: 8px; }
  .topbar-left { font-size: 12px; }
  .topbar .icon-button, .topbar-right .icon-button { height: 40px; width: 40px; }
  .sync-status { font-size: 10px; }
  main { padding: 29px 18px 32px; }
  .page-heading { margin-bottom: 27px; gap: 18px; flex-wrap: wrap; align-items: flex-start; }
  .page-heading h1 { font-size: 31px; letter-spacing: -.045em; }
  .page-heading .eyebrow { font-size: 9px; letter-spacing: .1em; }
  .page-heading p { max-width: none; font-size: 13px; margin-top: 11px; }
  .page-heading > .button { margin-top: 0; min-height: 44px; font-size: 13px; padding: 11px 17px; }
  .heading-actions { width: 100%; justify-content: flex-start; }
  .heading-actions .button { min-height: 40px; font-size: 12px; }
  .stats-grid { gap: 13px; margin-bottom: 20px; }
  .stat-card { padding: 19px 17px; }
  .stat-card-heading { gap: 8px; margin-bottom: 17px; }
  .stat-card-heading span { font-size: 11px; }
  .stat-value { font-size: 29px; }
  .stat-bottom { font-size: 10px; gap: 6px; }
  .stat-bottom .chip { font-size: 9px; }
  .stat-icon { width: 28px; height: 28px; }
  .card { border-radius: 17px; }
  .card-heading { padding: 22px 20px 18px; flex-wrap: wrap; }
  .card-heading h2 { font-size: 17px; }
  .card-heading p { font-size: 12px; }
  .node-card, .product-card, .client-support-card, .client-api-card, .client-subscription-card { padding: 22px 20px; }
  .product-card .card-heading { padding: 0; }
  .nodes-grid, .product-grid { gap: 18px; }
  .traffic-chart { height: 190px; margin-inline: 20px; }
  .traffic-foot { padding: 20px; }
  .traffic-foot > small { max-width: 150px; font-size: 10px; }
  .chart-legend { font-size: 10px; gap: 12px; }
  .network-flow { padding-inline: 22px; }
  .toolbar, #rule-workbench { padding: 18px 20px; }
  .toolbar-filters { flex-wrap: wrap; gap: 10px; }
  .toolbar .search-field { width: 100%; max-width: none; }
  .toolbar-filters select { min-height: 44px; }
  .workbench-actions .button { min-height: 40px; }
  td, th { padding-inline: 20px; }
  .row-actions .icon-button, .node-actions .icon-button { min-height: 40px; min-width: 40px; }
  .client-support-actions .button, .client-support-pagination > .button, .client-api-actions .button, .subscription-actions .button { min-height: 44px; font-size: 12px; }
  input, select, textarea, .product-field input, .product-field select { font-size: 16px; min-height: 46px; }
  input[type=checkbox], input[type=radio], input[type=color], input[type=range] { min-height: 0; }
  .search-field input { font-size: 16px; min-height: 44px; }
  .button { min-height: 44px; }
  .settings-nav-link, .client-support-nav .button { padding: 12px 16px; min-height: 44px; font-size: 13px; }
  .settings-guide-card { padding: 24px; }
  .editor-dialog, .confirm-dialog, .token-dialog, .appearance-dialog, .rule-detail-dialog, .tls-guide-dialog { border-radius: 20px; max-width: calc(100vw - 24px); max-height: calc(100dvh - 28px); }
  .dialog-heading { padding: 22px; }
  .dialog-heading h2 { font-size: 20px; }
  .editor-fields { padding: 22px; }
  .dialog-footer { padding: 18px 22px; gap: 10px; flex-wrap: wrap; }
  .dialog-footer .button, .appearance-dialog .dialog-footer .button, .rule-detail-dialog .dialog-footer .button { min-height: 44px; font-size: 12px; }
  .client-support-message { padding: 17px; }
  .client-support-heading { gap: 13px; }
  .client-support-card h2, .client-api-heading h2, .subscription-heading h2 { font-size: 19px; }
  .login-form-wrap { padding: 36px 24px; }
  .login-form { width: min(390px, 100%); }
  .login-form h2 { font-size: 30px; }
  .login-form input { font-size: 16px; }
  .login-note { font-size: 12px; }
}
@media (max-width: 400px) {
  main { padding-inline: 14px; }
  .topbar { padding-inline: 12px; }
  .topbar-right { gap: 5px; }
  .topbar .icon-button, .topbar-right .icon-button { width: 36px; }
  .stat-card { padding: 17px 14px; }
  .stat-value { font-size: 26px; }
  .stat-icon { width: 25px; height: 25px; }
  .page-heading h1 { font-size: 29px; }
  .card-heading, .toolbar, #rule-workbench { padding-inline: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
