/* Shared components for the customer portal.
   Tokens come from layout.css (they mirror nori-website/static/style.css).
   Loaded after layout.css so these rules refine it; keep new UI here, not in inline styles. */

/* ── Accessibility base ─────────────────────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}
.btn:focus-visible,
.nav-link:focus-visible,
.home-step-action:focus-visible {
    outline-offset: 3px;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-primary) 28%, transparent);
}

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

/* ── Ambient colour fields (static, like the marketing site) ────────── */
.orb { animation: none !important; }

/* ── Signature rail: the 3px gradient spine from the site ───────────── */
.sidebar::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient);
}

/* ── Status pill ────────────────────────────────────────────────────── */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    padding: 2px 10px;
    border: 1px solid currentColor;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.6;
    white-space: nowrap;
}
.pill::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.pill--ok   { color: var(--accent-secondary); }
.pill--warn { color: var(--warning, #f5b83d); }
.pill--crit { color: var(--error); }
.pill--mute { color: var(--text-tertiary); }
html[data-theme="light"] .pill--warn { color: #8a5a00; }

/* ── Empty state ────────────────────────────────────────────────────── */
.empty-state {
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 56px 24px;
    border: 1px dashed var(--border);
    border-radius: var(--r-xl);
    background: var(--bg-secondary);
    text-align: center;
}
.empty-state-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--accent-primary) 10%, transparent);
    color: var(--accent-primary);
    font-size: 22px;
}
.empty-state-icon i { opacity: 1 !important; color: inherit !important; }
.empty-state-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-wrap: balance;
}
.empty-state-text {
    max-width: 44ch;
    font-size: 0.95rem;
    color: var(--text-secondary);
}
.empty-state-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
}
.empty-state--page {
    max-width: 520px;
    margin: 72px auto;
}
.btn.btn-link { text-decoration: none; }
.btn i { font-size: 0.9em; }

/* ── Home ───────────────────────────────────────────────────────────── */
.home {
    display: grid;
    gap: 28px;
    max-width: 960px;
}
.home-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3.4vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.15;
    color: var(--text-primary);
}
.home-sub {
    margin-top: 6px;
    color: var(--text-secondary);
}
.home-section-title {
    margin-bottom: 12px;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.home-status {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    border: 1px solid var(--border-soft);
    border-radius: var(--r-md);
    background: var(--bg-secondary);
}
.home-status-item {
    display: grid;
    align-content: start;
    gap: 6px;
    padding: 16px 20px;
    min-width: 0;
}
.home-status-item + .home-status-item { border-left: 1px solid var(--border-soft); }
.home-status-label { font-size: 0.8rem; color: var(--text-secondary); }
.home-status-value {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}
.home-status-note { font-size: 0.8rem; color: var(--text-tertiary); }
.home-meter {
    height: 5px;
    border-radius: 5px;
    background: var(--border-soft);
    overflow: hidden;
}
.home-meter > i { display: block; height: 100%; background: var(--gradient); }
@media (max-width: 640px) {
    .home-status-item + .home-status-item { border-left: 0; border-top: 1px solid var(--border-soft); }
}

.home-steps {
    list-style: none;
    border: 1px solid var(--border-soft);
    border-radius: var(--r-md);
    background: var(--bg-secondary);
}
.home-step {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
}
.home-step + .home-step { border-top: 1px solid var(--border-soft); }
.home-step-mark {
    display: grid;
    place-items: center;
    flex: none;
    width: 24px;
    height: 24px;
    border: 1.5px solid var(--border);
    border-radius: 50%;
    font-size: 11px;
    color: var(--on-gradient);
}
.home-step.is-done .home-step-mark { background: var(--gradient); border-color: transparent; }
.home-step-text { flex: 1; min-width: 0; color: var(--text-primary); }
.home-step-text small { display: block; font-size: 0.82rem; color: var(--text-secondary); }
.home-step.is-done .home-step-text { color: var(--text-secondary); }
.home-step-action { flex: none; }
@media (max-width: 520px) {
    .home-step { flex-wrap: wrap; }
    .home-step-action { margin-left: 38px; }
}

/* ── Subscriptions page: classes that replace inline styles ─────────── */
.page-head-row { justify-content: space-between; align-items: center; }
.sub-search { display: none; margin-bottom: 24px; }
.sub-search.is-visible { display: flex; }
.sub-search .search-wrapper { flex: 1; }
.sub-id {
    display: inline-block;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
    font-family: var(--font-mono);
    font-size: 0.82rem;
}
.dispute-box {
    margin: 12px 0;
    padding: 12px 14px;
    border: 1px solid color-mix(in srgb, var(--warning, #f5b83d) 40%, transparent);
    border-radius: var(--r-sm);
    background: color-mix(in srgb, var(--warning, #f5b83d) 10%, transparent);
}
.dispute-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--warning, #f5b83d);
}
html[data-theme="light"] .dispute-title { color: #8a5a00; }
.dispute-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.recover-ok   { color: var(--accent-primary); }
.recover-warn { color: var(--accent-secondary); }
.recover-mute { color: var(--text-tertiary); }
.recover-err  { color: var(--error); }

/* ── Utilities replacing repeated inline styles (!important matches inline priority) ── */
.u-c-accent { color:var(--accent-primary) !important; }
.u-c-error { color:var(--error) !important; }
.u-hint-indent { color:var(--text-tertiary) !important; margin-left:28px !important; display:block; margin-top:4px !important; }
.u-c-tertiary { color:var(--accent-tertiary) !important; }
.u-row-12 { display:flex; align-items:center !important; gap:12px !important; }
.u-flex-1 { flex:1 !important; }
.u-mb-12 { margin-bottom:12px !important; }
.u-mb-24 { margin-bottom:24px !important; }
.u-mb-28 { margin-bottom:28px !important; }
.u-mb-32 { margin-bottom:32px !important; }
.u-mb-8 { margin-bottom:8px !important; }
.u-mt-10 { margin-top:10px !important; }
.u-mt-16 { margin-top:16px !important; }
.u-mt-8 { margin-top:8px !important; }
.u-m-0 { margin:0 !important; }
.u-reset-pointer { margin:0 !important; cursor:pointer !important; }
.u-modal-500 { max-width:500px !important; width:90% !important; }
.u-o-50 { opacity:.5 !important; }
.u-modal-actions { padding:0 24px 24px !important; justify-content:flex-end !important; display:flex; gap:12px !important; }
.u-modal-actions-28 { padding:0 28px 28px !important; display:flex; gap:10px !important; }
.u-p-0 { padding:0 !important; }
.u-p-32 { padding:32px !important; }
.u-relative { position:relative !important; }
.u-no-underline { text-decoration:none !important; }
.u-capitalize { text-transform:capitalize !important; }
.u-auto-pointer { width:auto !important; cursor:pointer !important; }

/* ── Tones, stat variants and detail-page pieces ───────────────────── */
.tone-warn   { color: var(--warning, #f5b83d) !important; }
.tone-crit   { color: var(--error) !important; }
.tone-ok     { color: var(--accent-secondary) !important; }
.tone-accent { color: var(--accent-primary) !important; }
html[data-theme="light"] .tone-warn { color: #8a5a00 !important; }
.org-stat-icon.is-warn { background: color-mix(in srgb, var(--warning, #f5b83d) 12%, transparent); color: var(--warning, #f5b83d); }
html[data-theme="light"] .org-stat-icon.is-warn { color: #8a5a00; }
.org-stat-icon.is-crit { background: color-mix(in srgb, var(--error) 12%, transparent); color: var(--error); }
.stat-lg { font-size: 1.3rem !important; }
.stat-md { font-size: 1.1rem !important; }
.stat-sm { font-size: 1rem !important; }
.icon-gap { margin-right: 8px; }
.mono-sm { font-family: var(--font-mono); font-size: 0.82rem; }
.cell-muted { color: var(--text-tertiary); font-size: 0.85rem; }
.row-gap-8 { display: flex; gap: 8px; }
.row-gap-12 { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.page-head-row--top { align-items: flex-start; }
.sub-price-block--flat { margin-top: 16px; padding-bottom: 0; border-bottom: 0; }
.state-block { padding: 80px 20px; text-align: center; color: var(--text-secondary); }
.state-icon { display: block; margin-bottom: 12px; font-size: 36px; opacity: 0.3; }
.state-icon--error { font-size: 32px; color: var(--error); opacity: 0.6; }
.state-icon--lg { margin-bottom: 20px; font-size: 48px; opacity: 0.5; }
.dispute-panel {
    margin-bottom: 32px;
    padding: 20px;
    border: 1px solid color-mix(in srgb, var(--warning, #f5b83d) 30%, transparent);
    border-radius: var(--r-md);
    background: color-mix(in srgb, var(--warning, #f5b83d) 7%, transparent);
}
.dispute-status { font-weight: 600; text-transform: capitalize; }
.dispute-note {
    margin-top: 16px;
    padding: 12px;
    border-radius: var(--r-sm);
    background: color-mix(in srgb, var(--warning, #f5b83d) 6%, transparent);
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-secondary);
}
.dispute-line { margin: 0; font-size: 0.9rem; color: var(--text-secondary); }

/* ── Batch 2: modals, states, forms (compound selectors beat the base rules in index.html) ── */
.u-mt-12 { margin-top: 12px !important; }
.u-ml-8 { margin-left: 8px !important; }
.u-wrap { flex-wrap: wrap !important; }
.u-c-muted { color: var(--text-tertiary) !important; }
.row-gap-6 { display: flex; flex-shrink: 0; gap: 6px; }
.modal.modal--scroll { display: flex; flex-direction: column; }
.modal.modal--720 { max-width: 720px; max-height: 85vh; }
.modal.modal--860 { max-width: 860px; max-height: 92vh; }
.modal-body--scroll { flex: 1; overflow-y: auto; }
.modal-body.modal-body--scroll { padding-top: 0; }
.modal-body.modal-body--flush { padding-top: 0; }
.sub-alias-info.sub-alias-info--row { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; }
.sub-alias-row.sub-alias-row--center { justify-content: center; gap: 10px; margin-top: 8px; }
.section-title-sm { font-size: 0.85rem; }
.sub-card.sub-card--bare { margin-bottom: 16px; padding: 0; border: 0; background: transparent; }
.form-group.form-group--tight { margin: 0 0 4px; }
.users-table-container.users-table-container--r8 { border-radius: var(--r-sm); }
.is-readonly { opacity: 0.5; cursor: default; }
.info-value.info-value--wrap { font-size: 0.85rem; word-break: break-all; }
.profile-card.profile-card--wide { grid-column: 1 / -1; }
.state-block--error { padding: 60px 20px; color: var(--error); }
.state-icon--xl { margin-bottom: 20px; font-size: 80px; }
.state-title { margin-bottom: 10px; font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: var(--text-primary); }
.state-block--error .state-title { color: var(--error); }
.btn.btn--disabled-soft { position: relative; opacity: 0.45; }
.text-optional { font-weight: 400; opacity: 0.6; }
.pre-wrap { white-space: pre-wrap; }
#home-body { display: grid; gap: 28px; }

/* ══════════════════════════════════════════════════════════════════════
   Visual pass: page shell, typography, cards and tables, in the Nori site language.
   `html` prefixes beat rules defined later in index.html's inline <style>.
   ══════════════════════════════════════════════════════════════════════ */

/* Headings use Outfit; mono is kept for things people copy (IDs, commands, keys). */
html .account-title,
html .page-title,
html .users-title,
html .modal-title,
html .card-title,
html .sidebar-title,
html .org-banner-name,
html .sub-plan-name,
html .install-intro-title,
html .install-step-title,
html .markdown-body h1,
html .markdown-body h2 {
    font-family: var(--font-display);
    letter-spacing: -0.01em;
}
html .account-title { font-size: clamp(1.6rem, 3vw, 2rem); line-height: 1.15; }
html .account-subtitle { font-family: var(--font-body); font-size: 0.95rem; color: var(--text-secondary); }

/* Page shell: no big boxed container. The header is a title and a hairline, content sits on the page. */
html .account-wrap {
    height: auto;
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}
html .account-header {
    padding: 0 0 24px;
    border-bottom: 1px solid var(--border-soft);
    border-radius: 0;
    background: transparent;
}
html .account-body { padding: 28px 0 0; }
@media (max-width: 768px) {
    html .account-header { padding: 0 0 20px; }
    html .account-body { padding: 24px 0 0; }
}

/* Section labels: sentence case, readable, not tracked-out caps. */
html .account-section-title,
html .nav-section-title {
    text-transform: none;
    letter-spacing: 0;
}
html .account-section-title {
    margin-bottom: 16px;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}
html .nav-section-title { font-size: 0.8rem; font-weight: 500; }

/* Sidebar: quiet active state, the rail already carries the brand. */
html .nav-link { padding: 10px 14px; margin-bottom: 2px; }
html .nav-link.active {
    border: 1px solid transparent;
    background: var(--bg-tertiary);
    color: var(--text-primary);
}
html .nav-link.active .nav-icon { color: var(--accent-primary); }

/* Cards: hairline border, no gradient bar, no glow. */
html .sub-card { padding: 24px; }
html .sub-card::before { display: none; }
html .sub-card:hover { border-color: var(--border); box-shadow: var(--shadow-sm, 0 10px 30px rgba(0,0,0,.25)); }
html .sub-price {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
}
html .sub-price-block { border-top: 0; padding: 4px 0 12px; }
html .org-stat-card { border-color: var(--border-soft); }
html .org-stat-card:hover { border-color: var(--border); box-shadow: none; transform: none; }
html .org-stat-number { font-family: var(--font-display); font-weight: 600; }

/* Tables: sentence-case header, lighter rules. */
html .users-table-container { border-color: var(--border-soft); border-radius: var(--r-md); }
html .users-table thead { background: transparent; }
html .users-table th {
    padding: 12px 16px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-secondary);
    border-bottom-color: var(--border-soft);
}
html .users-table td { border-bottom-color: var(--border-soft); }

/* Modals share the card language. */
html .modal { border-color: var(--border-soft); border-radius: var(--r-xl); box-shadow: var(--shadow, 0 30px 70px rgba(0,0,0,.5)); }
html .modal-title { font-size: 1.25rem; font-weight: 700; }

/* Plans: promo badge and audience label in sentence case. */
html .plan-audience { text-transform: none; letter-spacing: 0; font-size: 12px; }
html .plan-promo-badge { text-transform: none; letter-spacing: 0; font-size: 11px; }

/* ── Tabs (account, and later subscription detail / licenses) ───────── */
.ui-tabs {
    display: flex;
    gap: 4px;
    margin-top: 4px;
    border-bottom: 1px solid var(--border-soft);
    overflow-x: auto;
}
.ui-tab {
    padding: 12px 16px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--text-secondary);
    font: 500 0.95rem var(--font-body);
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}
.ui-tab:hover { color: var(--text-primary); }
.ui-tab[aria-selected="true"] { color: var(--accent-primary); border-bottom-color: var(--accent-primary); }
.ui-lead { max-width: 60ch; margin-bottom: 20px; color: var(--text-secondary); }
/* A page embedded in a tab brings its own header; the tab already names it. */
.ui-panel .account-wrap > .account-header:not(:has(> .btn)) { display: none; }
/* ...but keep the page's own actions (e.g. "New group"): drop the title, keep the button on the right. */
.ui-panel .account-wrap > .account-header:has(> .btn) { padding: 0 0 16px; border-bottom: 0; justify-content: flex-end; }
.ui-panel .account-wrap > .account-header:has(> .btn) > :not(.btn) { display: none; }
.ui-panel .account-wrap > .account-body { padding-left: 0; padding-right: 0; }

/* Header user menu: the Account link looks like the other items. */
a.header-dropdown-item { text-decoration: none; }

/* ── Filter chips ───────────────────────────────────────────────────── */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip {
    padding: 5px 14px;
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    background: transparent;
    color: var(--text-secondary);
    font: 500 0.85rem var(--font-body);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}
.chip:hover { border-color: var(--border); color: var(--text-primary); }
.chip.is-on { border-color: var(--accent-primary); color: var(--accent-primary); background: color-mix(in srgb, var(--accent-primary) 8%, transparent); }
.chip-count { margin-left: 4px; color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.chip.is-on .chip-count { color: inherit; }

/* ── Side sheet: a modal that slides in from the right (create/edit forms) ── */
.modal-overlay.sheet { justify-content: flex-end; align-items: stretch; padding: 0; }
.modal-overlay.sheet .modal {
    width: 100%;
    max-width: 460px;
    height: 100%;
    max-height: none;
    border-width: 0 0 0 1px;
    border-radius: 0;
    animation: sheet-in 0.25s var(--ease);
}
@keyframes sheet-in { from { transform: translateX(32px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-overlay.sheet .modal-header { text-align: left; }

/* ── Table cell helpers ─────────────────────────────────────────────── */
.cell-sub { display: block; margin-top: 2px; font-size: 0.82rem; color: var(--text-secondary); }
.row-end { justify-content: flex-end; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cell-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Sheet: header and footer stay put, only the form scrolls. */
.modal-overlay.sheet .modal { display: flex; flex-direction: column; overflow: hidden; }
.modal-overlay.sheet .modal-body { flex: 1; overflow-y: auto; }
.back-crumb { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; font-size: 0.85rem; color: var(--text-secondary); text-decoration: none; }
.back-crumb:hover { color: var(--accent-primary); }
[data-panel][hidden] { display: none !important; }

/* ── Install: prerequisites collapse into one line ───────────────────── */
.install-prereq { margin-bottom: 28px; border: 1px solid var(--border-soft); border-radius: var(--r-md); background: var(--bg-secondary); }
.install-prereq > summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    list-style: none;
    font-weight: 500;
    color: var(--text-primary);
}
.install-prereq > summary::-webkit-details-marker { display: none; }
.install-prereq > summary::before { content: "\f054"; font: 900 0.7rem "Font Awesome 6 Free"; color: var(--text-tertiary); transition: transform 0.2s; }
.install-prereq[open] > summary::before { transform: rotate(90deg); }
.install-prereq-sum { margin-left: auto; font-weight: 400; font-size: 0.85rem; color: var(--text-tertiary); }
.install-prereq > .install-gui-features { margin: 0; padding: 0 16px 16px; }
.install-os-selector { margin-bottom: 20px; }

/* ── Skeleton loading ───────────────────────────────────────────────── */
.skeleton-list { display: grid; gap: 0; border: 1px solid var(--border-soft); border-radius: var(--r-md); background: var(--bg-secondary); overflow: hidden; }
.skeleton-row { display: flex; align-items: center; gap: 5%; padding: 22px 20px; }
.skeleton-row + .skeleton-row { border-top: 1px solid var(--border-soft); }
.skeleton {
    display: block;
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--border-soft) 0%, color-mix(in srgb, var(--text-primary) 14%, transparent) 50%, var(--border-soft) 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
}
@keyframes skeleton-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }


/* ── Bottom navigation (phones): the four most used areas plus the drawer ── */
.bottom-nav { display: none; }
@media (max-width: 768px) {
    .bottom-nav {
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 150;
        display: flex;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        border-top: 1px solid var(--border-soft);
        background: var(--bg-secondary);
    }
    .bottom-link {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        padding: 9px 4px;
        border: 0;
        background: none;
        color: var(--text-secondary);
        font: 500 0.7rem var(--font-body);
        text-decoration: none;
        cursor: pointer;
    }
    .bottom-link i { font-size: 1.1rem; }
    .bottom-link.active { color: var(--accent-primary); }
    html .mobile-menu-btn { display: none; }
    html #app.main-content { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
}

/* ── Plans: pricing cards and comparison, as on the Nori website ─────── */
html .plan-card { padding: 28px 24px; }
html .plan-card--featured {
    border: 2px solid transparent;
    background: linear-gradient(var(--bg-secondary), var(--bg-secondary)) padding-box, var(--gradient) border-box;
    box-shadow: var(--shadow-sm, 0 10px 30px rgba(0,0,0,.25));
}
.ribbon {
    position: absolute;
    top: -11px;
    left: 24px;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--gradient);
    color: var(--on-gradient);
    font: 600 10px var(--font-mono);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.price { display: flex; align-items: baseline; gap: 4px; }
.price__currency { transform: translateY(-6px); font-size: 15px; font-weight: 500; color: var(--text-secondary); }
.price__figure { font-family: var(--font-display); font-size: 28px; font-weight: 600; line-height: 1.15; color: var(--text-primary); }
html .plan-price { font-size: inherit; }
html .plan-feature { align-items: flex-start; }
.mark { flex: 0 0 auto; font-family: var(--font-mono); font-weight: 700; }
.mark--check { color: var(--accent-secondary); }
html .subscribe-btn { font-weight: 500; }
html .subscribe-btn.subscribe-btn--ghost {
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-primary);
}
html .subscribe-btn.subscribe-btn--ghost:hover:not(:disabled) { border-color: var(--accent-primary); background: var(--bg-tertiary); box-shadow: none; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border-soft); border-radius: var(--r-lg); }
.plan-compare { margin-top: 40px; }
.compare-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 13.5px; }
.compare-table thead th {
    padding: 14px 16px;
    background: var(--bg-tertiary);
    font-family: var(--font-display);
    font-size: 14.5px;
    text-align: left;
}
.compare-table thead th:first-child {
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}
.compare-table td, .compare-table th { padding: 14px 18px; border-top: 1px solid var(--border-soft); }
.compare-table td { color: var(--text-secondary); }
.compare-table td:first-child { width: 240px; font-weight: 500; color: var(--text-primary); }
.compare-table .row-group td {
    background: var(--bg-tertiary);
    font: 500 10.5px var(--font-mono);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-primary);
}
.compare-table .m-pos { color: var(--accent-secondary); font-weight: 600; }
.compare-table .m-neg { color: var(--text-tertiary); }
html[data-theme="light"] .compare-table .m-pos { color: #04884f; }
/* Cards sit three across like on the website; a pair is capped so it does not stretch. */
html .plans-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; align-items: stretch; }
html .plans-grid:has(> :nth-child(2):last-child) { max-width: 760px; margin-left: auto; margin-right: auto; }
/* `display` on the badge beat the hidden attribute, leaving an empty pill under every price. */
html .plan-promo-badge[hidden], html .plan-price-original[hidden] { display: none; }
