/* =====================================================================
   Baadal "Monsoon" theme (2026-11)
   Loaded after all other stylesheets: refines the tokens of baadal3.css,
   adds a dark mode (html[data-theme="dark"], chosen by the toggle or the
   system setting), self-hosted fonts, the home page, the command palette
   and a few motion details. Remove its <link> in layout.html to go back.
   ===================================================================== */

@font-face {
  font-family: "Inter Var";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Bricolage";
  src: url("../fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono Var";
  src: url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 800; font-style: normal; font-display: swap;
}

/* ---------- Tokens: light ---------- */
:root {
  --font-sans: "Inter Var", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Bricolage", "Inter Var", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono Var", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --bg: #f4f5fb;
  --surface: #ffffff;
  --surface-muted: #f7f8fc;
  --surface-raised: #ffffff;
  --border: #e5e7f0;
  --border-strong: #d3d7e4;
  --text: #0f1222;
  --text-muted: #5d6479;
  --text-subtle: #959cb0;

  --primary: #5547f5;
  --primary-hover: #4537e0;
  --primary-soft: #efedff;
  --primary-text: #3b2fc9;
  --accent: #14b8d4;

  --grad-brand: linear-gradient(135deg, #6d5dfc 0%, #8b5cf6 48%, #22c3ee 100%);
  --grad-button: linear-gradient(135deg, #5f4ff7 0%, #7c4ef0 100%);
  --grad-button-hover: linear-gradient(135deg, #5241ec 0%, #6d3fe6 100%);
  --glow: 0 10px 30px -10px rgba(103, 80, 246, 0.55);

  --success-soft: #dcfce7; --success-text: #166534;
  --warning-soft: #fef3c7; --warning-text: #92400e;
  --danger-soft: #fee2e2;  --danger-text: #991b1b;
  --info-soft: #e0e9ff;    --info-text: #1e40af;
  --neutral-soft: #eef0f5; --neutral-text: #475067;
  --orange-soft: #ffedd5;  --orange-text: #9a3412;

  --sidebar-bg: #0b0e1d;
  --sidebar-text: #c3c8da;
  --sidebar-muted: #6b7290;
  --sidebar-hover: rgba(160, 170, 220, 0.10);
  --sidebar-active: rgba(124, 108, 255, 0.18);

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 18, 34, 0.05);
  --shadow: 0 1px 2px rgba(15, 18, 34, 0.04), 0 4px 14px -6px rgba(15, 18, 34, 0.08);
  --shadow-lg: 0 24px 48px -18px rgba(15, 18, 34, 0.22);
  --topbar-bg: rgba(255, 255, 255, 0.72);
  --row-hover: #f8f7ff;
  --focus-ring: 0 0 0 4px rgba(85, 71, 245, 0.16);

  --chart-grid: #eceef5;
  --chart-axis: #d3d7e4;
  color-scheme: light;
}

/* ---------- Tokens: dark ---------- */
html[data-theme="dark"] {
  --bg: #090b14;
  --surface: #10131f;
  --surface-muted: #151927;
  --surface-raised: #171b2b;
  --border: #222839;
  --border-strong: #2e354b;
  --text: #e8eaf4;
  --text-muted: #9aa1b9;
  --text-subtle: #6a718a;

  --primary: #9a8cff;
  --primary-hover: #b3a8ff;
  --primary-soft: rgba(139, 124, 255, 0.14);
  --primary-text: #c2b9ff;
  --accent: #38d3ee;

  --success: #34d399; --success-soft: rgba(52, 211, 153, 0.13); --success-text: #6ee7b7;
  --warning-soft: rgba(251, 191, 36, 0.13); --warning-text: #fcd34d;
  --danger: #f87171; --danger-hover: #ef4444; --danger-soft: rgba(248, 113, 113, 0.14); --danger-text: #fca5a5;
  --info-soft: rgba(96, 165, 250, 0.14); --info-text: #93c5fd;
  --neutral-soft: rgba(148, 160, 190, 0.14); --neutral-text: #b4bbd0;
  --orange-soft: rgba(251, 146, 60, 0.14); --orange-text: #fdba74;

  --sidebar-bg: #070912;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 6px 18px -8px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 28px 60px -20px rgba(0, 0, 0, 0.75);
  --topbar-bg: rgba(9, 11, 20, 0.7);
  --row-hover: rgba(139, 124, 255, 0.06);
  --focus-ring: 0 0 0 4px rgba(154, 140, 255, 0.22);
  --glow: 0 10px 34px -10px rgba(124, 100, 255, 0.7);

  --chart-grid: #232a3d;
  --chart-axis: #2e354b;
  color-scheme: dark;
}

/* ---------- Base ---------- */
body {
  background:
    radial-gradient(1200px 500px at 100% -10%, rgba(124, 108, 255, 0.07), transparent 60%),
    radial-gradient(900px 420px at 30% -20%, rgba(34, 195, 238, 0.05), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  font-feature-settings: "cv11", "ss01", "ss03";
}
html[data-theme="dark"] body {
  background:
    radial-gradient(1200px 520px at 100% -10%, rgba(124, 108, 255, 0.12), transparent 60%),
    radial-gradient(900px 420px at 25% -20%, rgba(34, 195, 238, 0.07), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

h1, h2 { font-family: var(--font-display); letter-spacing: -0.02em; font-weight: 680; }
h1 { font-size: 1.95rem; }
h3, h4 { letter-spacing: -0.01em; }
::selection { background: rgba(124, 108, 255, 0.25); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: var(--focus-ring); }
input[type="text"], input[type="password"], input[type="email"], input[type="number"],
input[type="date"], input[type="datetime-local"], input[type="search"], input[type="url"],
select, textarea { background-color: var(--surface); }
select:not([multiple]):not([size]) {
  -webkit-appearance: none; appearance: none; padding-right: 36px;
  background: var(--surface) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 8" width="12" height="8"><path fill="none" stroke="%237a8199" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" d="M1 1.5l5 5 5-5"/></svg>') no-repeat right 14px center / 12px 8px;
}
code { padding: 1px 6px; border-radius: 6px; background: var(--surface-muted); border: 1px solid var(--border); }
pre code { padding: 0; border: 0; background: none; }

/* ---------- Sidebar ---------- */
.app-sidebar {
  background:
    radial-gradient(420px 260px at 0% 0%, rgba(124, 108, 255, 0.22), transparent 70%),
    radial-gradient(360px 300px at 100% 100%, rgba(34, 195, 238, 0.10), transparent 70%),
    var(--sidebar-bg);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  scrollbar-width: thin;
  scrollbar-color: rgba(160, 170, 220, 0.2) transparent;
}
.brand { font-family: var(--font-display); font-weight: 720; font-size: 1.28rem; letter-spacing: -0.02em; }
.brand-mark {
  position: relative;
  width: 36px; height: 36px; border-radius: 11px;
  background: var(--grad-brand);
  background-size: 160% 160%;
  box-shadow: 0 8px 22px -8px rgba(124, 108, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  animation: brand-shift 8s ease-in-out infinite;
}
@keyframes brand-shift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.nav-link, .nav-group summary { border-radius: 10px; transition: background 0.15s, color 0.15s; }
.nav-link.active {
  position: relative;
  background: linear-gradient(90deg, rgba(124, 108, 255, 0.28), rgba(124, 108, 255, 0.06));
  box-shadow: inset 0 0 0 1px rgba(160, 150, 255, 0.18);
}
.nav-link.active::before {
  content: ""; position: absolute; left: -6px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px;
  background: var(--grad-brand); box-shadow: 0 0 12px rgba(139, 124, 255, 0.9);
}
.nav-link.active i { color: #c4bcff; }
.nav-link:hover i { color: #c4bcff; }
.nav-search input { border-radius: 10px; background: rgba(255, 255, 255, 0.05); }
.nav-search input:focus { border-color: #8b7cff; box-shadow: 0 0 0 3px rgba(139, 124, 255, 0.25); }

/* ---------- Top bar ---------- */
.app-topbar {
  background: var(--topbar-bg);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--border);
}
.account-menu summary { background: var(--surface); transition: border-color 0.15s, box-shadow 0.15s; }
.account-menu summary:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.avatar { background: var(--grad-brand); box-shadow: 0 4px 12px -4px rgba(124, 108, 255, 0.7); }
.account-dropdown { background: var(--surface-raised); animation: pop-in 0.14s ease-out; transform-origin: top right; }
.account-dropdown a:hover { background: var(--surface-muted); }
@keyframes pop-in { from { opacity: 0; transform: scale(0.96) translateY(-4px); } to { opacity: 1; transform: none; } }

.topbar-tools { display: flex; align-items: center; gap: 8px; }
.topbar-btn {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px; padding: 0; min-height: 0; min-width: 0; margin: 0;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); color: var(--text-muted);
  box-shadow: none; cursor: pointer; font-size: 0.95rem;
  transition: color 0.15s, border-color 0.15s, transform 0.15s;
}
.topbar-btn:hover { color: var(--primary); border-color: var(--border-strong); transform: translateY(-1px); }
.theme-toggle .fa-sun { display: none; }
html[data-theme="dark"] .theme-toggle .fa-sun { display: inline; }
html[data-theme="dark"] .theme-toggle .fa-moon { display: none; }
.palette-trigger {
  display: inline-flex; align-items: center; gap: 10px;
  min-width: 240px; height: 38px; padding: 0 8px 0 12px; margin: 0;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); color: var(--text-subtle);
  font: inherit; font-size: 0.88rem; cursor: pointer; box-shadow: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.palette-trigger:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.palette-trigger span { flex: 1; text-align: left; }
.palette-trigger kbd, .palette-hint kbd {
  padding: 1px 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 6px;
  background: var(--surface-muted); color: var(--text-muted); font-family: var(--font-mono); font-size: 0.72rem;
}

/* ---------- Content motion ---------- */
.app-content > * { animation: rise 0.45s cubic-bezier(.2, .7, .2, 1) both; }
.app-content > *:nth-child(2) { animation-delay: 0.04s; }
.app-content > *:nth-child(3) { animation-delay: 0.08s; }
.app-content > *:nth-child(4) { animation-delay: 0.12s; }
.app-content > *:nth-child(n+5) { animation-delay: 0.16s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Headings ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--primary); font-size: 0.72rem; letter-spacing: 0.12em;
}
.eyebrow::before { content: ""; width: 14px; height: 2px; border-radius: 2px; background: var(--grad-brand); }
.admin-page-heading h1, .section-header h1 { font-size: 1.85rem; }

/* ---------- Buttons ---------- */
.btn, button[type="submit"]:not(.btn), input[type="submit"] { border-radius: 11px; font-weight: 600; letter-spacing: -0.005em; }
.btn-primary, button[type="submit"]:not(.btn), input[type="submit"] {
  background: var(--grad-button); border-color: transparent; color: #fff;
  box-shadow: var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:hover, button[type="submit"]:not(.btn):hover, input[type="submit"]:hover {
  background: var(--grad-button-hover); color: #fff; transform: translateY(-1px);
}
.btn-secondary { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-secondary:hover { background: var(--surface-muted); color: var(--text); border-color: var(--primary); }
.btn-ghost:hover { background: var(--surface-muted); }
.btn-danger { box-shadow: 0 8px 22px -10px rgba(220, 38, 38, 0.7); }
html[data-theme="dark"] .btn-danger { background: #dc2626; border-color: #dc2626; }

/* ---------- Cards & surfaces ---------- */
.feature-card, .admin-tool-placeholder, .admin-host-panel, .admin-mail-panel, .request-form-card,
.stat-box, .dash-panel, .dash-tool-group, .dash-start, .vmg-card, .home-services,
.grid-table-wrapper, .admin-vm-table-wrapper, .admin-empty-state {
  border-color: var(--border);
  background: var(--surface);
  border-radius: var(--radius);
}
.feature-card, .dash-tool-group { transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s; }
.feature-card:hover, .dash-tool-group:hover { border-color: var(--border-strong); box-shadow: var(--shadow-lg); }

/* Dashboard stat tiles */
.dash-stat {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--radius); background: var(--surface); border-color: var(--border);
}
.dash-stat::after {
  content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; opacity: 0;
  background: radial-gradient(240px 120px at var(--mx, 80%) var(--my, 0%), rgba(124, 108, 255, 0.16), transparent 70%);
  transition: opacity 0.25s;
}
a.dash-stat:hover { border-color: rgba(124, 108, 255, 0.45); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
a.dash-stat:hover::after { opacity: 1; }
.dash-stat .icon-tile {
  width: 46px; height: 46px; border-radius: 14px; font-size: 1.1rem;
  background: var(--primary-soft); color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(124, 108, 255, 0.12);
}
.dash-stat strong { font-family: var(--font-display); font-size: 1.75rem; font-weight: 700; }
.stat-box strong { font-family: var(--font-display); }
.dash-header h1 { font-size: 2.1rem; }
.dash-header h1 .wave { display: inline-block; color: #f5b83d; font-size: 0.8em; transform-origin: 70% 70%; animation: wave 2.4s ease-in-out 0.6s 1; }
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20% { transform: rotate(-8deg); } 40% { transform: rotate(-4deg); } 50% { transform: rotate(10deg); } }
.grad-text {
  background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.role-chip { background: var(--primary-soft); color: var(--primary-text); border: 1px solid rgba(124, 108, 255, 0.16); }
.dash-panel > header { background: linear-gradient(180deg, var(--surface-muted), var(--surface)); }
.dash-list li { transition: background 0.15s; }
.dash-list li:hover { background: var(--row-hover); }
.dash-tool-group h3 i {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 9px;
  background: var(--primary-soft); color: var(--primary); font-size: 0.8rem;
}
.dash-start-num { background: var(--grad-brand); color: #fff; }

/* ---------- Tables ---------- */
.admin-vm-table th, .admin-grid-wrapper table th, .grid-table-wrapper table th {
  background: var(--surface-muted); color: var(--text-muted); border-bottom-color: var(--border);
}
.admin-vm-table td, .admin-grid-wrapper table td { border-bottom-color: var(--border); }
.admin-vm-table tbody tr:hover td,
.grid-table-wrapper table tbody tr:hover td,
.admin-grid-wrapper table tbody tr:hover td { background: var(--row-hover); }
table th, table td { border-color: var(--border); }

/* ---------- Status pills (all areas; tokens so dark mode works) ---------- */
.status-pill, .admin-vm-state { background: var(--neutral-soft); color: var(--neutral-text); }
.status-vm-4, .admin-vm-state-shutdown { background: var(--neutral-soft); color: var(--neutral-text); }
.status-vm-2, .status-task-3, .admin-vm-state-running { background: var(--success-soft); color: var(--success-text); box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.18); }
.status-vm-3, .status-req-3, .status-req-4, .status-task-7, .admin-vm-state-paused { background: var(--warning-soft); color: var(--warning-text); }
.status-vm-1, .status-req-1, .status-req-5, .status-task-1, .status-task-2 { background: var(--info-soft); color: var(--info-text); }
.status-vm--1, .status-req-2, .status-req--1, .status-task-4 { background: var(--danger-soft); color: var(--danger-text); }
.status-vm-2::before, .admin-vm-state-running::before { animation: pulse-dot 2s ease-in-out infinite; }
@keyframes pulse-dot { 0%, 100% { box-shadow: 0 0 0 0 currentColor; } 50% { box-shadow: 0 0 0 3px transparent; opacity: 1; } }
.status-host-1, .baadal-status-up, .sanity-kind-ok, .users-state-active { background: var(--success-soft); color: var(--success-text); }
.status-host-2, .baadal-status-up-progress, .baadal-status-down-progress,
.users-state-email-not-verified { background: var(--warning-soft); color: var(--warning-text); }
.status-host-0, .baadal-status-down, .sanity-kind-error, .users-state-disabled { background: var(--danger-soft); color: var(--danger-text); }
.sanity-kind-orphan, .sanity-kind-undefined,
.sanity-tab-moved .sanity-tab-count, .sanity-tab-orphan .sanity-tab-count, .sanity-tab-undefined .sanity-tab-count { background: var(--orange-soft); color: var(--orange-text); }
.sanity-kind-unchecked { background: var(--info-soft); color: var(--info-text); }
.infra-notes { background: var(--warning-soft); color: var(--warning-text); border: 1px solid rgba(217, 119, 6, 0.2); }

/* Notices */
.flash-area [role="alert"] {
  border: 1px solid var(--border); border-left: 4px solid var(--primary);
  background: var(--surface-raised); border-radius: 12px; animation: pop-in 0.2s ease-out;
}
.monitor-alert { border-color: rgba(217, 119, 6, 0.35); }
.admin-mail-warning { border-color: rgba(217, 119, 6, 0.35); }
.admin-mail-error { border-color: rgba(220, 38, 38, 0.35); }
.admin-mail-success { border-color: rgba(22, 163, 74, 0.35); }

/* Dropdowns / pickers */
.user-picker .user-options, .combo .combo-list { background: var(--surface-raised); border-color: var(--border-strong); box-shadow: var(--shadow-lg); }

/* Footer */
.app-footer { border-top-color: var(--border); color: var(--text-subtle); }
.app-footer .footer-inner { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; align-items: center; }
.app-footer .footer-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); display: inline-block; margin-right: 6px; vertical-align: middle; }

/* ---------- Command palette ---------- */
.palette[hidden] { display: none; }
.palette {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: start center; padding: 12vh 16px 16px;
  background: rgba(8, 10, 20, 0.45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  animation: fade 0.12s ease-out;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.palette-box {
  width: min(620px, 100%); overflow: hidden;
  border: 1px solid var(--border-strong); border-radius: 18px;
  background: var(--surface-raised); box-shadow: 0 40px 80px -24px rgba(0, 0, 0, 0.45), var(--glow);
  animation: pop-in 0.16s ease-out;
}
.palette-input { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.palette-input i { color: var(--primary); }
.palette-input input { flex: 1; padding: 4px 0; border: 0; box-shadow: none; background: transparent; font-size: 1.05rem; }
.palette-input input:focus { box-shadow: none; }
.palette-list { max-height: min(56vh, 440px); overflow-y: auto; margin: 0; padding: 6px; list-style: none; }
.palette-list li { margin: 0; }
.palette-group { padding: 10px 12px 4px; color: var(--text-subtle); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.palette-item {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px;
  color: var(--text); cursor: pointer; font-size: 0.93rem;
}
.palette-item i { width: 18px; text-align: center; color: var(--text-subtle); }
.palette-item small { margin-left: auto; color: var(--text-subtle); font-size: 0.78rem; }
.palette-item.active { background: var(--primary-soft); color: var(--primary-text); }
.palette-item.active i { color: var(--primary); }
.palette-item:hover { text-decoration: none; color: var(--primary-text); }
.palette-empty { padding: 22px; color: var(--text-muted); text-align: center; }
.palette-hint { display: flex; gap: 14px; padding: 9px 16px; border-top: 1px solid var(--border); color: var(--text-subtle); font-size: 0.76rem; }

/* ---------- Sign-in ---------- */
.auth-page { position: relative; }
.auth-card { border-radius: 22px; background: var(--surface-raised); border-color: var(--border); box-shadow: var(--shadow-lg), var(--glow); }
.auth-card h1 { font-family: var(--font-display); font-size: 1.7rem; }

/* =====================================================================
   Home page (index.html): body.page-home. Neutral (page tokens, so it
   follows light/dark); colour only on the headline accent, the primary
   buttons and the closing banner.
   ===================================================================== */
.hx { color: var(--text); }
.hx-wrap { max-width: 1120px; margin: 0 auto; }
.hx-hero { padding: 84px 24px 72px; border-bottom: 1px solid var(--border); background: var(--surface); }
.hx-hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hx-kicker { display: block; margin-bottom: 16px; color: var(--text-muted); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.hx h1 { margin: 0 0 20px; color: var(--text); font-family: var(--font-display); font-size: clamp(2.3rem, 4.8vw, 3.5rem); font-weight: 700; line-height: 1.06; letter-spacing: -0.035em; }
.hx h1 .accent { color: var(--primary); }
.hx-lead { max-width: 540px; margin: 0 0 30px; color: var(--text-muted); font-size: 1.08rem; line-height: 1.65; }
.hx-cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hx-cta .btn { min-height: 46px; padding: 11px 20px; font-size: 0.98rem; }
.hx-stats { display: flex; flex-wrap: wrap; gap: 0; margin-top: 40px; border-top: 1px solid var(--border); padding-top: 22px; }
.hx-stat { padding-right: 32px; margin-right: 32px; border-right: 1px solid var(--border); }
.hx-stat:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.hx-stat strong { display: block; color: var(--text); font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.hx-stat span { color: var(--text-muted); font-size: 0.86rem; }

/* The one illustration: a plain window listing VMs */
.hx-window { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden; }
.hx-window-bar { display: flex; align-items: center; gap: 6px; padding: 11px 14px; border-bottom: 1px solid var(--border); background: var(--surface-muted); }
.hx-window-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.hx-window-bar span { margin-left: 8px; color: var(--text-subtle); font-size: 0.78rem; }
.hx-vms { margin: 0; padding: 0; list-style: none; }
.hx-vm { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin: 0; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.hx-vm-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--surface-muted); border: 1px solid var(--border); color: var(--text-muted); }
.hx-vm b { display: block; font-size: 0.9rem; font-weight: 600; }
.hx-vm small { color: var(--text-subtle); font-size: 0.78rem; }
.hx-term { margin: 14px 16px 16px; padding: 12px 14px; border-radius: 10px; background: #0f1222; color: #c9cee0; font-family: var(--font-mono); font-size: 0.78rem; line-height: 1.7; }
.hx-term .p { color: #93c5fd; } .hx-term .ok { color: #86efac; } .hx-term .mute { color: #6b7290; }

/* Sections */
.hx-section { padding: 72px 24px; }
.hx-section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.hx-head { max-width: 640px; margin: 0 0 36px; }
.hx-head .hx-eyebrow { display: block; margin-bottom: 8px; color: var(--text-muted); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.hx-head h2 { margin: 0 0 8px; font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: -0.025em; line-height: 1.15; }
.hx-head p { margin: 0; color: var(--text-muted); }
.hx-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--border); overflow: hidden; }
.hx-feature { padding: 24px 22px; background: var(--surface); }
.hx-feature-icon { display: inline-grid; place-items: center; width: 38px; height: 38px; margin-bottom: 14px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); font-size: 0.95rem; }
.hx-feature h3 { margin: 0 0 6px; font-size: 1rem; }
.hx-feature p { margin: 0; color: var(--text-muted); font-size: 0.92rem; line-height: 1.6; }
.hx-soon { display: inline-block; margin-left: 6px; padding: 1px 8px; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--text-muted); font-size: 0.7rem; font-weight: 600; vertical-align: middle; }

.hx-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin: 0; padding: 0; list-style: none; }
.hx-step { margin: 0; padding-top: 18px; border-top: 2px solid var(--border); }
.hx-step-num { display: block; margin-bottom: 8px; color: var(--primary); font-family: var(--font-display); font-size: 0.9rem; font-weight: 700; letter-spacing: 0.04em; }
.hx-step h3 { margin: 0 0 6px; font-size: 1.05rem; }
.hx-step p { margin: 0; color: var(--text-muted); font-size: 0.93rem; }

/* The one coloured block */
.hx-cta-band {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 36px 40px; border-radius: 18px;
  background: linear-gradient(120deg, #3f33c7 0%, #5547f5 60%, #4f63e8 100%);
}
.hx-cta-band h2 { margin: 0 0 4px; color: #fff; font-family: var(--font-display); font-size: clamp(1.4rem, 2.6vw, 1.8rem); letter-spacing: -0.02em; }
.hx-cta-band p { margin: 0; color: rgba(255, 255, 255, 0.85); }
.hx-cta-band .btn { min-height: 46px; padding: 11px 20px; background: #fff; color: #3b2fc9; box-shadow: none; }
.hx-cta-band .btn:hover { background: #f1efff; color: #2d22a8; }

/* Gentle reveal on scroll (only with JS) */
.js .reveal { opacity: 0; transform: translateY(10px); transition: opacity 0.5s ease, transform 0.5s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .hx-hero { padding: 56px 20px 56px; }
  .hx-hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hx-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .hx-features, .hx-steps { grid-template-columns: 1fr; }
  .hx-section { padding: 52px 18px; }
  .hx-cta-band { padding: 28px 24px; }
  .hx-stat { padding-right: 20px; margin-right: 20px; }
  .palette-trigger { min-width: 0; width: 38px; padding: 0; justify-content: center; }
  .palette-trigger span, .palette-trigger kbd { display: none; }
}
@media (max-width: 900px) { .palette-trigger { min-width: 0; } }

/* Motion off when the user asks for it */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Plain tables and py4web Grid controls (no.css defaults) ---------- */
thead tr { background-color: var(--surface-muted); }
tbody tr { border-bottom-color: var(--border); }
tbody tr:hover { background-color: var(--row-hover); }
a[role="button"].grid-details-button, a[role="button"].grid-edit-button, a[role="button"].grid-delete-button,
a[role="button"].grid-new-button, a[role="button"].info {
  display: inline-flex; align-items: center; gap: 6px; margin: 2px; padding: 5px 11px;
  border: 1px solid var(--border-strong); border-radius: 9px;
  background: var(--surface); color: var(--text); font-size: 0.82rem; font-weight: 600;
  text-decoration: none; transition: border-color 0.15s, color 0.15s, background 0.15s;
}
a[role="button"].grid-details-button:hover, a[role="button"].grid-edit-button:hover,
a[role="button"].grid-new-button:hover, a[role="button"].info:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
a[role="button"].grid-delete-button { color: var(--danger-text); }
a[role="button"].grid-delete-button:hover { border-color: var(--danger); background: var(--danger-soft); color: var(--danger-text); }

/* The palette is a role="dialog"; undo no.css's pure-CSS modal rules for it */
#palette.palette > .palette-box {
  position: relative; inset: auto; z-index: auto; padding: 0; margin: 0;
  visibility: visible; opacity: 1; transition: none; background-color: var(--surface-raised);
}
#palette.palette > .palette-box > * { width: auto; margin: 0; border-radius: 0; }

/* Public top bar: keep the controls on the right (no.css styles bare <nav>) */
.app-topbar > .public-nav { position: static; display: flex; align-items: center; gap: 8px; width: auto; margin: 0 0 0 auto; padding: 0; background: none; border: 0; box-shadow: none; }

/* ---------- Home, Azure-inspired sections (2026-11-13) ---------- */
.hx-hero-links { margin: 18px 0 0; color: var(--text-muted); font-size: 0.92rem; }
.hx-hero-links a { color: var(--text); font-weight: 600; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
.hx-hero-links a:hover { text-decoration-color: var(--primary); }
.hx-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.hx-head-row .hx-head { margin: 0; }
.hx-link, .hx-more { display: inline-flex; align-items: center; gap: 7px; color: var(--primary-text); font-weight: 600; font-size: 0.94rem; text-decoration: none; }
.hx-link i, .hx-more i { font-size: 0.8em; transition: transform 0.15s ease; }
.hx-link:hover { text-decoration: none; }
.hx-link:hover i, a:hover > .hx-more i, a:hover .hx-more i { transform: translateX(3px); }

/* News cards */
.hx-news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.hx-news-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.hx-news-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.hx-news-art { display: grid; place-items: center; height: 116px; border-bottom: 1px solid var(--border); background:
  radial-gradient(circle at 1px 1px, var(--border-strong) 1px, transparent 0) 0 0 / 16px 16px, var(--surface-muted); color: var(--text-muted); font-size: 2rem; }
.hx-news-body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 18px 20px 20px; }
.hx-news-kind, .hp-card-kind { color: var(--text-muted); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; }
.hx-news-title { font-size: 1.04rem; font-weight: 650; line-height: 1.35; }
.hx-news-text { color: var(--text-muted); font-size: 0.91rem; line-height: 1.55; flex: 1; }

/* Use-case tabs */
.hx-tablist { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--border); margin-bottom: 28px; scrollbar-width: none; }
.hx-tablist [role="tab"] { flex: none; margin: 0 0 -1px; padding: 12px 16px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--text-muted); font: inherit; font-size: 0.96rem; font-weight: 600; cursor: pointer; box-shadow: none; }
.hx-tablist [role="tab"]:hover { color: var(--text); background: none; }
.hx-tablist [role="tab"][aria-selected="true"] { border-bottom-color: var(--primary); color: var(--text); }
.hx-tablist [role="tab"]:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.hx-panel { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.hx-panel[hidden] { display: none; }
.hx-panel h3 { margin: 0 0 10px; font-family: var(--font-display); font-size: 1.45rem; letter-spacing: -0.02em; }
.hx-panel-text > p { margin: 0 0 18px; color: var(--text-muted); max-width: 520px; }
.hx-checks { margin: 0 0 22px; padding: 0; list-style: none; display: grid; gap: 9px; }
.hx-checks li { position: relative; margin: 0; padding-left: 28px; }
.hx-checks li::before { content: "\f00c"; position: absolute; left: 0; top: 1px; display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-text); font: 900 0.62rem "Font Awesome 6 Free"; }
.hx-panel-card { padding: 22px 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.hx-panel-card-title { display: block; margin-bottom: 12px; color: var(--text-muted); font-size: 0.76rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; }
.hx-panel-card dl { margin: 0; }
.hx-panel-card dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--border); }
.hx-panel-card dt { color: var(--text-muted); font-size: 0.9rem; }
.hx-panel-card dd { margin: 0; font-weight: 600; font-size: 0.92rem; text-align: right; }

/* Infrastructure band: dark and neutral in both themes */
.hx-infra { padding: 72px 24px; background: #11131c; color: #e8eaf4; }
html[data-theme="dark"] .hx-infra { background: #05060b; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.hx-infra-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; align-items: center; }
.hx-infra .hx-eyebrow { display: block; margin-bottom: 8px; color: #9aa1b9; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.hx-infra h2 { margin: 0 0 12px; color: #fff; font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: -0.025em; line-height: 1.15; }
.hx-infra p { margin: 0; color: #b4bbd0; max-width: 480px; }
.hx-infra-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius); background: rgba(255,255,255,0.1); }
.hx-infra-stat { padding: 22px 20px; background: #11131c; }
html[data-theme="dark"] .hx-infra-stat { background: #05060b; }
.hx-infra-stat strong { display: block; color: #fff; font-family: var(--font-display); font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.hx-infra-stat span { color: #9aa1b9; font-size: 0.88rem; }

/* Next steps */
.hx-next { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.hx-next-card { display: flex; flex-direction: column; gap: 8px; padding: 26px 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.hx-next-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.hx-next-card > i { margin-bottom: 6px; color: var(--text-muted); font-size: 1.35rem; }
.hx-next-title { font-size: 1.12rem; font-weight: 650; }
.hx-next-text { flex: 1; color: var(--text-muted); font-size: 0.93rem; line-height: 1.55; }
.hx-next-primary { border-color: transparent; background: linear-gradient(120deg, #3f33c7 0%, #5547f5 60%, #4f63e8 100%); color: #fff; }
.hx-next-primary:hover { border-color: transparent; box-shadow: var(--glow); }
.hx-next-primary > i, .hx-next-primary .hx-next-text { color: rgba(255,255,255,0.85); }
.hx-next-primary .hx-more { color: #fff; }

@media (max-width: 960px) {
  .hx-news-grid, .hx-next { grid-template-columns: 1fr 1fr; }
  .hx-panel, .hx-infra-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 640px) {
  .hx-news-grid, .hx-next { grid-template-columns: 1fr; }
  .hx-infra { padding: 52px 18px; }
  .hx-infra-stats { grid-template-columns: 1fr 1fr 1fr; }
  .hx-infra-stat { padding: 16px 12px; }
  .hx-news-art { height: 88px; }
}

/* ---------- Public nav, sidebar help links, footer ---------- */
.public-link { padding: 8px 10px; border-radius: 8px; color: var(--text-muted); font-size: 0.93rem; font-weight: 600; text-decoration: none; }
.public-link:hover { background: var(--surface-muted); color: var(--text); text-decoration: none; }
.sidebar-help { display: grid; gap: 2px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(160, 170, 220, 0.12); }
.footer-links { display: inline-flex; flex-wrap: wrap; gap: 16px; }
.footer-links a { color: inherit; text-decoration: none; }
.footer-links a:hover { color: var(--text); text-decoration: underline; }

/* ---------- Help pages: FAQ and blog ---------- */
.hp { color: var(--text); }
.hp-wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.hp-narrow { max-width: 760px; }
.hp-hero { padding: 48px 0 36px; border-bottom: 1px solid var(--border); background: var(--surface); }
.hp-hero h1 { margin: 6px 0 12px; font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.7rem); letter-spacing: -0.03em; line-height: 1.1; }
.hp-lead { max-width: 640px; margin: 0; color: var(--text-muted); font-size: 1.05rem; line-height: 1.6; }
.hp-meta { margin: 14px 0 0; color: var(--text-subtle); font-size: 0.88rem; }
.hp-crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; color: var(--text-subtle); font-size: 0.85rem; }
.hp-crumbs a { color: var(--text-muted); text-decoration: none; }
.hp-crumbs a:hover { color: var(--text); text-decoration: underline; }
.hp-search { position: relative; max-width: 560px; margin-top: 24px; }
.hp-search i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-subtle); }
.hp-search input { width: 100%; min-height: 48px; margin: 0; padding: 0 16px 0 42px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); color: var(--text); font-size: 1rem; }
.hp-search input:focus { border-color: var(--primary); box-shadow: var(--focus-ring); outline: none; }
.hp-section { padding-top: 40px; padding-bottom: 64px; }

.hp-faq-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; padding-top: 36px; padding-bottom: 64px; }
.hp-toc { position: sticky; top: 84px; align-self: start; display: grid; gap: 2px; }
.hp-toc-title { margin-bottom: 8px; color: var(--text-subtle); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.hp-toc a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text-muted); font-size: 0.92rem; text-decoration: none; }
.hp-toc a i { width: 16px; color: var(--text-subtle); text-align: center; }
.hp-toc a:hover { background: var(--surface-muted); color: var(--text); text-decoration: none; }
.hp-toc-extra { margin-top: 8px; border-top: 1px solid var(--border); border-radius: 0 0 8px 8px !important; padding-top: 14px !important; }
.hp-faq-section { margin-bottom: 36px; scroll-margin-top: 80px; }
.hp-faq-section[hidden], .hp-qa[hidden] { display: none; }
.hp-faq-section h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 1.2rem; }
.hp-faq-section h2 i { color: var(--text-subtle); font-size: 0.95rem; }
.hp-qa { margin: 0; border: 1px solid var(--border); border-bottom-width: 0; background: var(--surface); }
.hp-qa:first-of-type { border-radius: 12px 12px 0 0; }
.hp-qa:last-of-type { border-bottom-width: 1px; border-radius: 0 0 12px 12px; }
.hp-qa:only-of-type { border-radius: 12px; }
.hp-qa summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; font-weight: 600; cursor: pointer; list-style: none; }
.hp-qa summary::-webkit-details-marker { display: none; }
.hp-qa summary::after { display: none; }
.hp-qa summary i { flex: none; color: var(--text-subtle); font-size: 0.8rem; transition: transform 0.2s ease; }
.hp-qa[open] summary i { transform: rotate(180deg); }
.hp-qa summary:hover { color: var(--primary-text); }
.hp-qa summary:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.hp-answer { padding: 0 20px 18px; color: var(--text-muted); line-height: 1.65; }
.hp-answer a, .hp-article a, .hp-lead a, .hp-noresult a, .hp-aside-note a, .hp-help-box a { color: var(--primary-text); }
.hp-noresult { padding: 20px; border: 1px dashed var(--border-strong); border-radius: 12px; color: var(--text-muted); }
.hp-related { margin-top: 48px; }
.hp-related h2, .hp-more-posts h2 { margin: 0 0 16px; font-size: 1.2rem; }

.hp-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.hp-filter { margin: 0; padding: 7px 14px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--text-muted); font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer; box-shadow: none; }
.hp-filter:hover { border-color: var(--text-subtle); color: var(--text); background: var(--surface); }
.hp-filter.is-active { border-color: var(--text); background: var(--text); color: var(--surface); }

.hp-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.hp-card { display: flex; flex-direction: column; gap: 6px; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.hp-card[hidden], .hp-lead-post[hidden] { display: none; }
.hp-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.hp-card h3 { margin: 2px 0 0; font-size: 1.02rem; line-height: 1.35; }
.hp-card p { flex: 1; margin: 0; color: var(--text-muted); font-size: 0.9rem; line-height: 1.55; }
.hp-card .hp-more { margin-top: 6px; }
.hp-card-icon { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 6px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-muted); color: var(--text-muted); }
.hp-more { display: inline-flex; align-items: center; gap: 7px; color: var(--primary-text); font-weight: 600; font-size: 0.9rem; }
.hp-more i { font-size: 0.8em; transition: transform 0.15s ease; }
.hp-lead-post { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); overflow: hidden; margin-bottom: 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); text-decoration: none; transition: box-shadow 0.15s, border-color 0.15s; }
.hp-lead-post:hover { border-color: var(--border-strong); box-shadow: var(--shadow); text-decoration: none; }
.hp-lead-post:hover .hp-more i, .hp-card:hover .hp-more i { transform: translateX(3px); }
.hp-lead-art { display: grid; place-items: center; min-height: 220px; background:
  radial-gradient(circle at 1px 1px, var(--border-strong) 1px, transparent 0) 0 0 / 18px 18px, var(--surface-muted); color: var(--primary); font-size: 3.4rem; }
.hp-lead-body { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 32px; }
.hp-lead-body h2 { margin: 0; font-family: var(--font-display); font-size: clamp(1.4rem, 2.6vw, 1.9rem); letter-spacing: -0.02em; line-height: 1.2; }
.hp-lead-body p { margin: 0; color: var(--text-muted); }
.hp-aside-note { margin: 28px 0 0; color: var(--text-muted); }

/* Article body */
.hp-hero-post { padding-bottom: 32px; }
.hp-article { padding-top: 36px; padding-bottom: 48px; font-size: 1.02rem; line-height: 1.75; }
.hp-article > p, .hp-article > ul, .hp-article > ol { margin: 0 0 18px; }
.hp-article h2 { margin: 40px 0 12px; font-family: var(--font-display); font-size: 1.5rem; letter-spacing: -0.02em; line-height: 1.25; }
.hp-article h3 { margin: 28px 0 8px; font-size: 1.12rem; }
.hp-article li { margin-bottom: 6px; }
.hp-article code { padding: 2px 6px; border-radius: 6px; background: var(--surface-muted); border: 1px solid var(--border); font-family: var(--font-mono); font-size: 0.86em; }
.hp-article pre { position: relative; margin: 0 0 20px; padding: 16px 18px; overflow-x: auto; border-radius: 12px; background: #0f1222; color: #d6dbea; font-size: 0.86rem; line-height: 1.6; }
html[data-theme="dark"] .hp-article pre { background: #05060b; border: 1px solid var(--border); }
.hp-article pre code { padding: 0; border: 0; background: none; color: inherit; font-size: inherit; white-space: pre; }
.hp-copy { position: absolute; top: 8px; right: 8px; margin: 0; padding: 4px 10px; border: 1px solid rgba(255,255,255,0.18); border-radius: 7px; background: rgba(255,255,255,0.06); color: #c9cee0; font: 600 0.74rem var(--font-sans); cursor: pointer; opacity: 0; transition: opacity 0.15s; box-shadow: none; }
.hp-article pre:hover .hp-copy, .hp-copy:focus { opacity: 1; }
.hp-article kbd { padding: 1px 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; background: var(--surface); font-family: var(--font-sans); font-size: 0.82em; }
.hp-callout { display: flex; gap: 14px; margin: 0 0 22px; padding: 16px 18px; border: 1px solid var(--border); border-left: 3px solid var(--info-text); border-radius: 10px; background: var(--surface); font-size: 0.96rem; line-height: 1.6; }
.hp-callout > i { margin-top: 4px; color: var(--info-text); }
.hp-callout-warn { border-left-color: var(--warning-text); }
.hp-callout-warn > i { color: var(--warning-text); }
.hp-help-box { display: flex; gap: 14px; align-items: flex-start; margin-top: 40px; padding: 20px 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-muted); }
.hp-help-box > i { margin-top: 3px; color: var(--text-muted); font-size: 1.2rem; }
.hp-help-box p { margin: 2px 0 0; color: var(--text-muted); }
.hp-more-posts { padding-top: 0; }

@media (max-width: 900px) {
  .hp-faq-layout { grid-template-columns: 1fr; gap: 20px; }
  .hp-toc { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .hp-toc-title { width: 100%; margin-bottom: 0; }
  .hp-toc a { border: 1px solid var(--border); background: var(--surface); }
  .hp-toc-extra { margin-top: 0; border-radius: 8px !important; padding-top: 8px !important; }
  .hp-cards { grid-template-columns: 1fr 1fr; }
  .hp-lead-post { grid-template-columns: 1fr; }
  .hp-lead-art { min-height: 140px; }
}
@media (max-width: 640px) {
  .hp-wrap { padding: 0 16px; }
  .hp-cards { grid-template-columns: 1fr; }
  .hp-lead-body { padding: 22px; }
  .public-link { display: none; }
}

/* no.css: links don't wrap and buttons have a fixed height; undo for these blocks */
.hx-news-card, .hx-next-card, .hp-card, .hp-lead-post, .hp-toc a, .hp-answer a, .hp-article a, .hx-hero-links a { white-space: normal; }
.hx-news-card, .hx-next-card, .hp-card, .hx-panel-text, .hx-news-body { min-width: 0; overflow-wrap: break-word; }
.hx-tablist [role="tab"], .hp-filter, .hp-copy { height: auto; min-width: 0; margin-right: 0; line-height: 1.4; }
.hx-tablist [role="tab"] { margin-bottom: -1px; }
.hp-answer code, .hp-article li code, .hp-article p code { white-space: normal; overflow-wrap: anywhere; margin: 0; }
.hx-checks, .hp-article ul, .hp-article ol { padding-left: 0; }
.hp-article ul, .hp-article ol { padding-left: 22px; }
.hp-article ul { list-style: disc; }
.hp-article ol { list-style: decimal; }
nav.hp-crumbs, nav.sidebar-help { position: static; width: auto; height: auto; margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; background: none; border: 0; box-shadow: none; }
nav.hp-crumbs { padding: 0; }
.hp-article pre code { margin: 0; }
nav.hp-crumbs { align-items: center; }
nav.hp-crumbs a, nav.hp-crumbs span { display: inline; float: none; margin: 0; padding: 0; line-height: 1.4; }

/* ---------- Geometric artwork (static/art/*.svg, original) ---------- */
.hx-visual { position: relative; isolation: isolate; }
.hx-visual::before {
  content: ""; position: absolute; z-index: -1; inset: -84px -120px -76px -110px;
  background: url("../art/geo-hero.svg") center / contain no-repeat;
}
html[data-theme="dark"] .hx-visual::before { opacity: 0.92; }
.hx-hero { overflow: hidden; }

.hx-news-art { color: #fff; background: url("../art/geo-card-1.svg") center / cover no-repeat; border-bottom: 0; }
.hx-news-card:nth-child(3n+2) .hx-news-art { background-image: url("../art/geo-card-2.svg"); }
.hx-news-card:nth-child(3n) .hx-news-art { background-image: url("../art/geo-card-3.svg"); }
.hx-news-art i { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 16px; background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.35); backdrop-filter: blur(4px); font-size: 1.5rem; }

.hp-lead-art { color: #fff; background: url("../art/geo-card-1.svg") center / cover no-repeat; }
.hp-lead-art i { display: grid; place-items: center; width: 96px; height: 96px; border-radius: 26px; background: rgba(255, 255, 255, 0.16); border: 1px solid rgba(255, 255, 255, 0.35); font-size: 2.6rem; }

.hx-infra { background: url("../art/geo-band.svg") right center / cover no-repeat, #11131c; }
html[data-theme="dark"] .hx-infra { background: url("../art/geo-band.svg") right center / cover no-repeat, #05060b; }
.hx-infra-stat { background: rgba(17, 19, 28, 0.82); }
html[data-theme="dark"] .hx-infra-stat { background: rgba(5, 6, 11, 0.82); }

@media (max-width: 960px) { .hx-visual::before { inset: -36px -24px -36px -24px; } }
/* no.css gives every <nav> height: 40px; the sidebar menu must take its real height
   so the help links below it don't overlap it */
.app-sidebar nav.sidebar-nav, .app-sidebar nav.sidebar-help { flex: none; height: auto; width: auto; padding: 0; position: static; }

/* Artwork on the help page headers (FAQ, blog, posts) */
.hp-hero { position: relative; overflow: hidden; isolation: isolate; }
.hp-hero::after {
  content: ""; position: absolute; z-index: -1; top: 50%; right: max(20px, calc((100% - 1120px) / 2 - 24px));
  width: min(500px, 42%); height: 300px; transform: translateY(-50%);
  background: url("../art/geo-banner.svg") center / contain no-repeat;
}
html[data-theme="dark"] .hp-hero::after { opacity: 0.92; }
/* posts: only in the margin beside the 760px text column */
.hp-hero-post::after { right: 16px; width: min(340px, calc((100% - 760px) / 2 - 32px)); height: 260px; }
@media (max-width: 1100px) { .hp-hero::after { opacity: 0.5; } }
@media (max-width: 640px) { .hp-hero::after { display: none; } }

/* Artwork behind the sign-in / account card */
.auth-page { isolation: isolate; overflow: hidden; }
.auth-page::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 50%;
  width: min(760px, 120vw); aspect-ratio: 640 / 560; transform: translate(-50%, -50%);
  background: url("../art/geo-hero.svg") center / contain no-repeat;
}
html[data-theme="dark"] .auth-page::before { opacity: 0.8; }

/* Admin tasks: filters and pager */
.task-filters { margin: 0 0 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.task-filters > summary { padding: 10px 14px; cursor: pointer; font-weight: 600; }
.task-filter-form { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; padding: 4px 14px 14px; }
.task-filter-form label { display: grid; gap: 4px; margin: 0; font-size: 0.85rem; color: var(--text-muted); }
.task-filter-form input, .task-filter-form select { margin: 0; min-width: 150px; }
.task-filter-buttons { display: flex; gap: 8px; }
.task-count { margin: 4px 0 10px; font-size: 0.88rem; }
nav.task-pager { position: static; display: flex; align-items: center; gap: 12px; width: auto; height: auto; margin: 14px 0; padding: 0; background: none; }
.vm-details dd.vm-purpose { white-space: normal; overflow-wrap: anywhere; }
.guest-fs { margin-top: 8px; font-size: 0.88rem; }
.guest-fs td, .guest-fs th { padding: 6px 8px; }
.vm-password-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vm-password-box code { padding: 8px 12px; font-size: 1.15rem; letter-spacing: 0.04em; }

/* ---------- VM page: main column + action sidebar ---------- */
.vm-subtitle { margin: 6px 0 0; color: var(--text-muted); max-width: 900px; overflow-wrap: anywhere; }
.vm-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; margin-top: 12px; }
.vm-main, .vm-side { display: grid; gap: 16px; min-width: 0; }
.vm-main .metric-charts { margin-top: 0; }
.vm-side .feature-card { padding: 16px 18px; }
.vm-side .vm-op-group h3 { margin-bottom: 10px; }
.vm-op-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.vm-op-buttons .inline-form { margin: 0; }
.vm-op-buttons .btn { margin: 0; }
.vm-side .vm-snapshot-config { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 10px; }
.vm-details-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.vm-details-card dd { overflow-wrap: anywhere; }
.guest-card h3 .vmg-muted { font-size: 0.78rem; font-weight: 500; margin-left: 6px; }
.guest-facts { margin-bottom: 12px; }
.guest-facts dd .status-pill { margin-left: 6px; }
.usage-list { display: grid; gap: 10px; }
.usage-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(90px, 220px) 48px; gap: 12px; align-items: center; }
.usage-label { display: flex; flex-direction: column; min-width: 0; }
.usage-name { font-weight: 600; font-size: 0.9rem; overflow-wrap: anywhere; }
.usage-sub { color: var(--text-muted); font-size: 0.8rem; }
.usage-bar { height: 8px; border-radius: 999px; background: var(--surface-muted); border: 1px solid var(--border); overflow: hidden; }
.usage-bar span { display: block; height: 100%; border-radius: 999px; background: var(--success, #16a34a); }
.usage-bar.is-mid span { background: #d97706; }
.usage-bar.is-high span { background: #dc2626; }
.usage-pct { text-align: right; font-variant-numeric: tabular-nums; font-size: 0.88rem; font-weight: 600; }
.vm-logs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 24px; }
.vm-logs h2 { font-size: 1.15rem; margin: 0 0 10px; }
.vm-logs h2 .vmg-muted { font-size: 0.8rem; font-weight: 500; margin-left: 6px; }
@media (max-width: 1100px) {
  .vm-layout { grid-template-columns: minmax(0, 1fr); }
  .vm-side { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .vm-logs { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .vm-details-cols { grid-template-columns: minmax(0, 1fr); }
  .usage-row { grid-template-columns: minmax(0, 1fr) 48px; }
  .usage-bar { grid-column: 1 / -1; grid-row: 2; }
}
.vm-log-table td, .vm-log-table th { padding: 8px 10px; }
.vm-log-when { white-space: nowrap; color: var(--text-muted); font-size: 0.85rem; }
.vm-log-msg { margin-top: 3px; color: var(--text-muted); font-size: 0.8rem; overflow-wrap: anywhere; }
.admin-vm-table.vm-log-table { min-width: 0; width: 100%; }
.vm-snapshots { margin-top: 20px; padding: 0; }
.vm-snapshots > summary { display: flex; align-items: baseline; gap: 10px; padding: 14px 18px; cursor: pointer; list-style: none; }
.vm-snapshots > summary::-webkit-details-marker { display: none; }
.vm-snapshots > summary::before { content: "\25B8"; color: var(--text-muted); transition: transform 0.15s; }
.vm-snapshots[open] > summary::before { transform: rotate(90deg); }
.vm-snapshots-title { font-weight: 650; font-size: 1.05rem; }
.vm-snapshots-body { padding: 0 18px 16px; }
.vm-snapshots-controls { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; }
.vm-snapshots-controls .vm-snapshot-config { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin: 0; }
/* Home infrastructure band: four figures */
.hx-infra-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .hx-infra-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .hx-infra-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* VM page charts: always 2 x 2 (CPU, Memory / Network, Disk) */
.vm-main .chart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .vm-main .chart-grid { grid-template-columns: minmax(0, 1fr); } }
.hx-infra-stat { padding: 20px 16px; }
.hx-infra-stat strong { font-size: clamp(1.45rem, 2.3vw, 2.05rem); white-space: nowrap; }
.hx-infra-resources { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.hx-infra-resources li { margin: 0; padding: 5px 12px; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 999px; background: rgba(255, 255, 255, 0.06); color: #e8eaf4; font-size: 0.85rem; font-weight: 600; }

/* Infrastructure band v3: story, highlights, proof line */
.hx-infra-intro { max-width: 720px; }
.hx-infra-intro p { max-width: 640px; }
.hx-infra-points { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 34px; }
.hx-infra-point { padding: 20px 18px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: var(--radius); background: rgba(255, 255, 255, 0.04); backdrop-filter: blur(2px); }
.hx-infra-point h3 { margin: 12px 0 6px; color: #fff; font-size: 1.02rem; }
.hx-infra-point p { margin: 0; color: #b4bbd0; font-size: 0.9rem; line-height: 1.55; max-width: none; }
.hx-infra-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 11px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.25), rgba(16, 185, 129, 0.25)); border: 1px solid rgba(125, 211, 252, 0.35); color: #a5f3fc; }
.hx-infra-proof { margin: 30px 0 0; color: #cfd5e6; font-size: 1.05rem; line-height: 1.6; max-width: none; }
.hx-infra-proof strong { color: #fff; }
@media (max-width: 1100px) { .hx-infra-points { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .hx-infra-points { grid-template-columns: minmax(0, 1fr); } }
.hx-infra p.hx-infra-proof { max-width: none; margin-top: 30px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.hx-infra .hx-infra-intro p { max-width: 640px; }

/* ---------- Infrastructure band v4: big art, little text ---------- */
.hx-infra.hx-infra-v4 { position: relative; overflow: hidden; padding: 110px 24px 100px;
  background: url("../art/geo-network.svg") right center / cover no-repeat, linear-gradient(120deg, #0b1020 0%, #0f1a2e 55%, #0b2230 100%); }
html[data-theme="dark"] .hx-infra.hx-infra-v4 { background: url("../art/geo-network.svg") right center / cover no-repeat, linear-gradient(120deg, #04060c 0%, #08111f 55%, #061922 100%); }
.hx-infra-v4 .hx-wrap { position: relative; }
.hx-infra-v4 h2 { max-width: 640px; font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.08; letter-spacing: -0.03em; }
.hx-infra-v4 .hx-infra-lead { margin: 14px 0 0; max-width: 520px; color: #c9d4ea; font-size: 1.12rem; }
.hx-infra-chips { display: flex; flex-wrap: wrap; gap: 10px; max-width: 660px; margin: 30px 0 0; padding: 0; list-style: none; }
.hx-infra-chips li { display: inline-flex; align-items: center; gap: 9px; margin: 0; padding: 8px 14px; border: 1px solid rgba(165, 243, 252, 0.28);
  border-radius: 999px; background: rgba(8, 15, 30, 0.55); backdrop-filter: blur(3px); color: #e8f4fb; font-size: 0.92rem; font-weight: 600; }
.hx-infra-chips i { color: #67e8f9; font-size: 0.9rem; }
.hx-infra-v4 p.hx-infra-big { display: flex; flex-wrap: wrap; gap: 10px 44px; margin: 44px 0 0; max-width: none; color: #b7c3dc; font-size: 1.05rem; }
.hx-infra-big span { display: flex; align-items: baseline; gap: 12px; }
.hx-infra-big strong { color: #fff; font-family: var(--font-display); font-size: clamp(2.2rem, 4.6vw, 3.4rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1;
  background: linear-gradient(120deg, #ffffff 30%, #a5f3fc 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (max-width: 760px) {
  .hx-infra.hx-infra-v4 { padding: 72px 18px 64px; background-position: 70% center, 0 0; }
  .hx-infra-big span { flex-direction: column; gap: 4px; }
}

/* How it works page */
.page-how .hx-section { padding-top: 56px; padding-bottom: 56px; }
.hx-how-more { margin: 26px 0 0; color: var(--text-muted); }
.hx-how-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
