/*!
 * PingXen marketing site.
 *
 * Mobile-first and token-driven. Every rule starts at the small screen and
 * widens through min-width queries, so the phone layout is designed rather
 * than a squeezed desktop.
 *
 * Two surfaces only -- page and card -- one accent, hairline borders, and a
 * single type scale. The visual system is deliberately plain: content,
 * product proof, and restrained controls instead of decorative drama.
 *
 * Hand-authored: the app itself is on Tailwind, but the public pages must
 * paint without a build step, so they carry their own sheet.
 */

/* ---------------------------------------------------------------- tokens -- */
:root {
    --radius: 8px;
    --radius-lg: 12px;
    --radius-pill: 999px;

    --shell: 1280px;
    --gutter: 1.25rem;

    --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --display: var(--sans);
    --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;

    --bg: #f5f1ec;
    --bg-alt: #ebe7e1;
    --surface: #ffffff;
    --surface-sunken: #ebe7e1;
    --fg: #111111;
    --fg-muted: #626260;
    --fg-faint: #7b7b78;
    --border: #d3cec6;
    --border-strong: #bfb8ad;

    --accent: #111111;
    --accent-fill: #111111;
    --accent-fill-hi: #000000;
    --on-accent: #ffffff;
    --accent-soft: #ffffff;

    --ok: #0b8f3a;
    --ok-soft: #e7f7ec;
    --warn: #ff5600;
    --warn-soft: #fff0e8;
    --err: #c41c1c;
    --err-soft: #fdecea;

    color-scheme: light;
}

@media (min-width: 640px) { :root { --gutter: 2rem; } }
@media (min-width: 1024px) { :root { --gutter: 2.5rem; } }

/* ------------------------------------------------------------------ base -- */
*, *::before, *::after { box-sizing: border-box; }

/*
 * The user-agent rule for [hidden] is display:none at the lowest specificity,
 * so any component that sets its own display -- a grid, a flex row -- wins and
 * the element stays on screen. Anything toggled by the `hidden` property needs
 * this, and it is the one !important in the sheet.
 */
[hidden] { display: none !important; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5.5rem;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

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

body {
    margin: 0;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main, section, .card, .shell { min-width: 0; }

h1, h2, h3, h4 {
    margin: 0 0 .5em;
    font-family: var(--display);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -.025em;
    text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 1.2rem + 5vw, 4.5rem); line-height: 1.05; letter-spacing: -.032em; }
h2 { font-size: clamp(2rem, 1.35rem + 2.8vw, 3.5rem); }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1rem; overflow-wrap: break-word; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { max-width: 100%; }
img { height: auto; }

ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }

hr { height: 1px; margin: 2.5rem 0; border: 0; background: var(--border); }

code, kbd, pre { font-family: var(--mono); font-size: .875em; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    padding: .75rem 1.25rem;
    border-radius: 0 0 var(--radius) 0;
    background: var(--fg);
    color: var(--bg);
    font-weight: 600;
}
.skip-link:focus { left: 0; text-decoration: none; }

.shell {
    width: 100%;
    max-width: var(--shell);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.u-mt { margin-top: 1rem; }
.u-center { text-align: center; }
.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ----------------------------------------------------------------- bands -- */
.band { padding-block: 4rem; }
.band-alt { background: var(--bg-alt); }
.band-tight { padding-block: 2.5rem; }

@media (min-width: 768px) {
    .band { padding-block: 6rem; }
    .band-tight { padding-block: 3.25rem; }
}

/* On a dark band the whole subtree flips to the dark palette, so cards,
   borders and muted text inside it stay correct without one-off overrides. */
.band-dark {
    --bg: #000000;
    --bg-alt: #000000;
    --surface: #313130;
    --surface-sunken: #111111;
    --fg: #ffffff;
    --fg-muted: #9c9fa5;
    --fg-faint: #9c9fa5;
    --border: #313130;
    --border-strong: #313130;
    --accent: #ffffff;
    --accent-fill: #ffffff;
    --accent-fill-hi: #ebe7e1;
    --on-accent: #111111;
    --accent-soft: #313130;
    --ok: #0bdf50;
    --ok-soft: #122419;

    background: var(--bg);
    color: var(--fg);
    color-scheme: dark;
}

/* --------------------------------------------------------------- buttons -- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 2.5rem;
    padding: .625rem 1.125rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: none;
    color: inherit;
    font: inherit;
    font-weight: 500;
    font-size: .9375rem;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 1rem; height: 1rem; flex: none; }

.btn-primary {
    background: var(--accent-fill);
    color: var(--on-accent);
    border-color: var(--accent-fill);
}
.btn-primary:hover { background: var(--accent-fill-hi); border-color: var(--accent-fill-hi); }

.btn-ghost {
    border-color: var(--border);
    color: var(--fg);
    background: var(--surface);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-quiet { color: var(--fg-muted); }
.btn-quiet:hover { color: var(--fg); }

.btn-lg { min-height: 2.75rem; padding-inline: 1.25rem; font-size: .9375rem; }
.btn-block { width: 100%; }

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.75rem;
}
.btn-row.centred { justify-content: center; }

@media (max-width: 400px) {
    .btn-row { flex-direction: column; }
    .btn-row .btn { width: 100%; }
}

@media (max-width: 767px) {
    .band { padding-block: 3rem; }
    .band-tight { padding-block: 2.5rem; }
    .hero { padding-block: 3rem; }
    .hero-grid,
    .split { gap: 1.75rem; }
    .section-head { margin-bottom: 1.5rem; }
    .card,
    .price-card,
    .cta-box { padding: 1.25rem; }
    .stat-row { grid-template-columns: 1fr; }
    .product-body { padding: .875rem; }
    .product-head { align-items: flex-start; }
    .strip-row { justify-content: flex-start; gap: .625rem 1rem; }
}

/* ------------------------------------------------------------------- nav -- */
.nav {
    position: sticky;
    top: 0;
    z-index: 80;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid var(--border);
}
@supports not (backdrop-filter: blur(1px)) {
    .nav { background: var(--bg); }
}

.nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    color: var(--fg);
    font-family: var(--display);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0;
    flex: none;
}
.brand:hover { text-decoration: none; }
.brand-logo {
    display: block;
    width: 7.5rem;
    height: auto;
}
.brand-mark {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    flex: none;
    border-radius: 6px;
    background: var(--fg);
    color: var(--on-accent);
}
.brand-mark svg { width: 1.125rem; height: 1.125rem; }

/* The panel is a dropdown sheet on a phone and an inline row from 1024px. */
.nav-panel {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    padding: .75rem var(--gutter) 1rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.nav-panel.is-open { display: block; }

.nav-links {
    display: flex;
    flex-direction: column;
    gap: .125rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.nav-links a,
.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: .375rem;
    width: 100%;
    padding: .625rem .5rem;
    border: 0;
    border-radius: var(--radius);
    background: none;
    color: var(--fg-muted);
    font: inherit;
    font-size: .9375rem;
    font-weight: 400;
    text-align: left;
    cursor: pointer;
}
.nav-links a:hover,
.nav-dropdown-toggle:hover { background: var(--surface); color: var(--fg); text-decoration: none; }
.nav-links a[aria-current="page"],
.nav-dropdown.is-active > .nav-dropdown-toggle { color: var(--accent); font-weight: 600; }

.nav-caret { width: .75rem; height: .75rem; flex: none; opacity: .65; }

.nav-dropdown-menu {
    margin: 0 0 .25rem;
    padding: .25rem 0 .25rem .75rem;
    list-style: none;
    border-left: 1px solid var(--border);
}
.nav-dropdown-menu a { font-size: .875rem; }

.nav-cta {
    display: none;
    flex-direction: column;
    gap: .5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.nav-bar-actions { display: flex; align-items: center; gap: .375rem; flex: none; }

.nav-toggle {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--fg-muted);
    cursor: pointer;
}
.nav-toggle:hover { color: var(--fg); border-color: var(--border-strong); }
.nav-toggle svg { width: 1.125rem; height: 1.125rem; }

@media (min-width: 1024px) {
    body { padding-top: 4rem; }

    .nav {
        position: fixed;
        left: 0;
        right: 0;
        width: 100%;
    }

    .nav-panel {
        display: flex !important;
        position: static;
        align-items: center;
        justify-content: flex-end;
        gap: 1rem;
        flex: 1;
        max-height: none;
        overflow: visible;
        padding: 0;
        border: 0;
        background: none;
    }
    .nav-links {
        flex-direction: row;
        align-items: center;
        gap: .125rem;
        flex-wrap: nowrap;
        padding: .25rem;
        border: 1px solid var(--border);
        border-radius: 999px;
        background: color-mix(in srgb, var(--surface) 72%, transparent);
    }
    .nav-links a,
    .nav-dropdown-toggle {
        width: auto;
        min-height: 2.25rem;
        padding: .45rem .75rem;
        border-radius: 999px;
        white-space: nowrap;
        font-size: .875rem;
    }
    .nav-links a:hover,
    .nav-dropdown-toggle:hover { background: var(--bg); }
    .nav-links a[aria-current="page"],
    .nav-dropdown.is-active > .nav-dropdown-toggle {
        background: var(--fg);
        color: var(--on-accent);
        font-weight: 500;
    }

    .nav-dropdown { position: relative; }
    .nav-dropdown-menu {
        display: none;
        position: absolute;
        top: calc(100% + .5rem);
        left: 0;
        z-index: 90;
        min-width: 14.5rem;
        padding: .5rem;
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        background: var(--surface);
    }
    .nav-dropdown:hover > .nav-dropdown-menu,
    .nav-dropdown:focus-within > .nav-dropdown-menu { display: block; }

    .nav-cta { display: flex; flex-direction: row; align-items: center; margin: 0; padding: 0; border: 0; }
    .nav-cta .btn { min-height: 2.5rem; }
    .nav-toggle { display: none; }
}

/* ------------------------------------------------------------------ hero -- */
.hero {
    padding-block: 3rem 3.5rem;
    background: var(--bg);
}
@media (min-width: 768px) { .hero { padding-block: 5rem 5.5rem; } }

.hero-grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 1024px) {
    .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 3.5rem; }
}

.hero h1 { max-width: 12ch; margin-bottom: 1rem; }

.lead {
    max-width: 46ch;
    color: var(--fg-muted);
    font-size: 1.125rem;
}
@media (min-width: 768px) { .lead { font-size: 1.25rem; } }
.centred .lead, .u-center .lead { margin-inline: auto; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--fg-muted);
    font-size: .875rem;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.dot {
    display: inline-block;
    width: .5rem;
    height: .5rem;
    flex: none;
    border-radius: 50%;
    background: var(--ok);
}

.proof-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.25rem;
    margin: 1.75rem 0 0;
    padding: 0;
    list-style: none;
    color: var(--fg-muted);
    font-size: .9375rem;
}
.proof-list li { display: flex; align-items: center; gap: .4rem; }
.proof-list svg { width: 1rem; height: 1rem; flex: none; color: var(--ok); }

/* --------------------------------------------------------- section heads -- */
.section-head { margin-bottom: 2rem; }
.section-head.centred { text-align: center; }
.section-head.centred .lead { margin-inline: auto; }
.section-head .lead { max-width: 60ch; margin-bottom: 0; }
.section-head h2, .section-head h1 { margin-bottom: .625rem; }

.band-tight .section-head {
    max-width: 52rem;
    margin-inline: auto;
    text-align: center;
}
.band-tight .section-head .lead { margin-inline: auto; }
.band-tight .btn-row { justify-content: center; }

/* ----------------------------------------------------------------- grids -- */
.grid { display: grid; gap: 1rem; }
@media (min-width: 640px) {
    .grid { gap: 1.25rem; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
    .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.split { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3.5rem; } }

/* ----------------------------------------------------------------- cards -- */
.card {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: inherit;
}
.card p { color: var(--fg-muted); font-size: .9375rem; }
.card > :last-child { margin-bottom: 0; }

a.card, .card-hover { transition: border-color .15s ease, transform .15s ease; }
a.card:hover, .card-hover:hover {
    border-color: var(--border-strong);
    transform: none;
    text-decoration: none;
}

.h-card { margin: 0; font-size: 1.05rem; }

.icon-tile {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: .375rem;
    border-radius: var(--radius);
    background: var(--accent-soft);
    color: var(--accent);
}
.icon-tile svg { width: 1.25rem; height: 1.25rem; }

/* Cards that reveal as they scroll in. Hidden only once JS confirms it can
   bring them back, so a blocked script leaves the content visible. */
.js-reveal [data-reveal] {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .5s ease, transform .5s ease;
}
.js-reveal [data-reveal].is-visible { opacity: 1; transform: none; }

/* --------------------------------------------------------------- product -- */
.product-frame {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    overflow: hidden;
}
.product-top {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .625rem .875rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-alt);
}
.window-dots { display: flex; gap: .3rem; }
.window-dots span {
    width: .625rem; height: .625rem;
    border-radius: 50%;
    background: var(--border-strong);
}
.product-url {
    flex: 1;
    padding: .2rem .625rem;
    border-radius: var(--radius-pill);
    background: var(--surface);
    color: var(--fg-faint);
    font-family: var(--mono);
    font-size: .7rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-body { padding: 1rem; display: grid; gap: .875rem; }

.product-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
}
.product-title { margin: 0; font-size: 1rem; }
.product-kicker { color: var(--fg-faint); font-size: .75rem; }

.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .625rem; }
.stat {
    padding: .75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-alt);
}
.stat-label { color: var(--fg-faint); font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.stat-number { font-family: var(--display); font-size: 1.35rem; font-weight: 700; letter-spacing: 0; }
.stat-number small { font-size: .7em; font-weight: 500; color: var(--fg-muted); }

.chart-card {
    padding: .875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-alt);
}
.chart-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .75rem;
    font-size: .8125rem;
}
.chart-header span { color: var(--fg-faint); }
.chart {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 5rem;
}
.chart i {
    flex: 1;
    border-radius: 3px 3px 0 0;
    background: #65b5ff;
}

.service-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .625rem 0;
    border-top: 1px solid var(--border);
    font-size: .8125rem;
}
.service-line:first-of-type { border-top: 0; }
.service-name { display: flex; align-items: center; gap: .5rem; font-family: var(--mono); font-size: .75rem; }
.service-state { color: var(--ok); font-weight: 600; }

.live-pill {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .25rem .625rem;
    border-radius: var(--radius-pill);
    background: var(--ok-soft);
    color: var(--ok);
    font-size: .75rem;
    font-weight: 600;
}

/* ----------------------------------------------------------------- strip -- */
.strip {
    border-block: 1px solid var(--border);
    background: var(--bg-alt);
    padding-block: 1rem;
}
.strip-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .75rem 2rem;
    color: var(--fg-muted);
    font-size: .875rem;
    font-weight: 500;
}
.strip-row span { display: inline-flex; align-items: center; gap: .45rem; }
.strip-row svg { width: 1rem; height: 1rem; color: var(--accent); }

/* --------------------------------------------------------------- pricing -- */
.price-grid { display: grid; gap: 1.25rem; align-items: stretch; }
@media (min-width: 900px) { .price-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.price-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
    padding: 1.75rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
}
.price-card.is-featured {
    background: var(--fg);
    color: var(--on-accent);
    border-color: var(--fg);
}
.price-card.is-featured .price-desc,
.price-card.is-featured .price-period,
.price-card.is-featured .price-currency,
.price-card.is-featured .price-limit,
.price-card.is-featured .price-features,
.price-card.is-featured .price-features li { color: color-mix(in srgb, var(--on-accent) 72%, transparent); }
.price-badge {
    position: absolute;
    top: -.7rem;
    left: 1.5rem;
    padding: .15rem .625rem;
    border-radius: var(--radius-pill);
    background: #ff5600;
    color: var(--on-accent);
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.price-name { margin: 0; font-size: 1.05rem; }
.price-figure {
    display: flex;
    align-items: baseline;
    gap: .3rem;
    margin: 0;
    font-family: var(--display);
}
.price-figure b { font-size: 2.4rem; font-weight: 700; letter-spacing: 0; }
.price-currency { color: var(--fg-muted); font-size: 1rem; font-weight: 500; }
.price-period { color: var(--fg-muted); font-size: .875rem; font-weight: 400; font-family: var(--sans); }
.price-desc { color: var(--fg-muted); font-size: .9375rem; }
.price-save { color: var(--ok); font-size: .8125rem; font-weight: 600; }

/* The same price in the visitor's own currency, shown under the USD figure.
   Deliberately quieter than the dollar price: it is a helpful approximation,
   not the number the plan is sold at. */
.price-local { color: var(--fg-muted); font-size: .8125rem; font-weight: 500; margin-top: -.25rem; }

.price-card .btn { margin-top: auto; }
.price-features { margin: 0; padding: 1rem 0 0; list-style: none; display: grid; gap: .5rem; font-size: .9375rem; border-top: 1px solid var(--border); }
.price-features li { display: flex; align-items: flex-start; gap: .5rem; }
.price-features svg { width: 1rem; height: 1rem; margin-top: .3rem; flex: none; color: var(--ok); }
.price-limit { color: var(--fg-muted); }

.billing-switch {
    display: inline-flex;
    gap: .25rem;
    margin-top: 1.25rem;
    padding: .25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--bg-alt);
}
.billing-switch button {
    padding: .4rem 1rem;
    border: 0;
    border-radius: var(--radius-pill);
    background: none;
    color: var(--fg-muted);
    font: inherit;
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
}
.billing-switch button[aria-pressed="true"] { background: var(--surface); color: var(--fg); }

/* ------------------------------------------------------------ comparison -- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cmp {
    width: 100%;
    min-width: 34rem;
    border-collapse: collapse;
    font-size: .9375rem;
}
.cmp th, .cmp td {
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}
.cmp thead th {
    border-bottom: 1px solid var(--border-strong);
    color: var(--fg-muted);
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.cmp tbody th { font-weight: 500; color: var(--fg); }
.cmp .col-us { background: var(--accent-soft); }
.cmp thead .col-us { color: var(--accent); }
.cmp svg { width: 1rem; height: 1rem; vertical-align: -.15em; }
.cmp .yes { color: var(--ok); }
.cmp .no { color: var(--fg-faint); }

/* ------------------------------------------------------------------- faq -- */
.faq { display: grid; gap: .625rem; max-width: 46rem; margin-inline: auto; }
.faq details {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}
.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "";
    width: .5rem; height: .5rem;
    flex: none;
    border-right: 2px solid var(--fg-muted);
    border-bottom: 2px solid var(--fg-muted);
    transform: rotate(45deg) translateY(-2px);
    transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(2px); }
.faq-body { padding: 0 1.25rem 1.125rem; color: var(--fg-muted); font-size: .9375rem; }

/* ------------------------------------------------------------------- cta -- */
.cta-box {
    padding: 3rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    text-align: center;
}
@media (min-width: 768px) { .cta-box { padding: 3rem; } }
.cta-box .lead { margin-inline: auto; }

/* ----------------------------------------------------------------- steps -- */
.step-num {
    display: grid;
    place-items: center;
    width: 1.875rem;
    height: 1.875rem;
    margin-bottom: .25rem;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--fg);
    font-family: var(--display);
    font-weight: 600;
    font-size: .875rem;
}

/* ------------------------------------------------------------------ code -- */
.code-block {
    margin: 0;
    padding: 1.125rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-sunken);
    color: var(--fg);
    font-size: .8125rem;
    line-height: 1.7;
    overflow-x: auto;
}
.c-key { color: var(--accent); }
.c-str { color: var(--ok); }
.c-com { color: var(--fg-faint); }

/* ----------------------------------------------------------------- forms -- */
.field { display: grid; gap: .375rem; margin-bottom: 1rem; }
.field label { font-size: .875rem; font-weight: 600; }
.field input, .field textarea, .field select {
    width: 100%;
    padding: .7rem .875rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--fg);
    font: inherit;
    font-size: .9375rem;
}
.field textarea { min-height: 8rem; resize: vertical; }
.field-error { color: var(--err); font-size: .8125rem; }

.alert {
    padding: .875rem 1.125rem;
    margin-bottom: 1.25rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: .9375rem;
}
.alert-ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 35%, transparent); color: var(--ok); }
.alert-err { background: var(--err-soft); border-color: color-mix(in srgb, var(--err) 35%, transparent); color: var(--err); }

/* ----------------------------------------------------------------- prose -- */
.prose { max-width: 46rem; margin-inline: auto; }
.prose h2 { margin-top: 2.5rem; font-size: 1.5rem; }
.prose h3 { margin-top: 1.75rem; font-size: 1.15rem; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose li { margin-bottom: .375rem; color: var(--fg-muted); }
.prose p { color: var(--fg-muted); }
.prose-meta { color: var(--fg-faint); font-size: .875rem; }

/* ------------------------------------------------------------ breadcrumb -- */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: .375rem;
    margin: 0 0 1.25rem;
    padding: 0;
    list-style: none;
    color: var(--fg-faint);
    font-size: .8125rem;
}
.breadcrumb li + li::before { content: "/"; margin-right: .375rem; }
.breadcrumb a { color: var(--fg-muted); }

/* ---------------------------------------------------------------- footer -- */
.footer {
    padding-block: 3rem 2rem;
    border-top: 1px solid var(--border);
    background: var(--bg-alt);
}
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .footer-grid { grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr)); gap: 2.5rem; } }

.footer-lead p { max-width: 34ch; margin-top: .875rem; color: var(--fg-muted); font-size: .9375rem; }
.footer-col h3 {
    margin-bottom: .875rem;
    font-family: var(--sans);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--fg-faint);
}
.footer-col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .5rem; }
.footer-col a { color: var(--fg-muted); font-size: .9375rem; }
.footer-col a:hover { color: var(--accent); }

.footer-base {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    color: var(--fg-faint);
    font-size: .8125rem;
}
.footer-base-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.footer-base a { color: var(--fg-faint); }

@media (max-width: 639px) {
    .footer {
        padding-block: 2.5rem 1.5rem;
    }
    .footer-grid {
        gap: 1.75rem;
        text-align: left;
    }
    .footer-lead {
        display: grid;
        justify-items: start;
    }
    .footer-lead p {
        max-width: none;
    }
    .footer-col {
        padding-top: 1.25rem;
        border-top: 1px solid var(--border);
    }
    .footer-col h3 {
        margin-bottom: .625rem;
        letter-spacing: 0;
        text-transform: none;
    }
    .footer-col ul {
        gap: .375rem;
    }
    .footer-base {
        align-items: flex-start;
        flex-direction: column;
        justify-content: flex-start;
        gap: 1rem;
        margin-top: 1.75rem;
    }
    .footer-base-links {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .5rem 1rem;
    }
}

/* ------------------------------------------------------------ app badges -- */
.store-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    margin-top: 1.5rem;
}
.store-badge { display: inline-block; }
.store-badge img { height: 2.75rem; width: auto; }
.store-label { width: 100%; color: var(--fg-muted); font-size: .875rem; }

/* Expandable extra features on a pricing card.
   Replaces the old inert "+ N more included" line, which looked clickable and
   was not. <details> carries the open/closed state itself, so this needs no
   JavaScript and stays keyboard-operable. */
.price-more { margin-top: .75rem; }
.price-more > summary {
  display: flex; align-items: center; gap: .375rem;
  cursor: pointer; list-style: none;
  font-size: .9375rem; font-weight: 600;
  color: var(--accent);
  padding: .25rem 0;
}
.price-more > summary::-webkit-details-marker { display: none; }
.price-more > summary:hover { text-decoration: underline; }
.price-more > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.price-more-chevron { width: .875rem; height: .875rem; transition: transform .15s ease; }
.price-more[open] .price-more-chevron { transform: rotate(180deg); }
/* Only one of the two labels shows, depending on open state. */
.price-more .price-more-close { display: none; }
.price-more[open] .price-more-open { display: none; }
.price-more[open] .price-more-close { display: inline; }
.price-more .price-features { border-top: 0; padding-top: .5rem; }
/* The featured card inverts its text colours; the accent link would vanish. */
.price-card.is-featured .price-more > summary { color: var(--on-accent); }
.price-card.is-featured .price-more > summary:focus-visible { outline-color: var(--on-accent); }
