/* =============================================================================
   HUGIN WEB — Kanagawa Wave
   Same palette as hugin-ui desktop app (design_tokens.css).
   Only web-specific layout patterns (hero, pricing, footer) are added here.
   ============================================================================= */

:root {
    /* =========================================================================
       KANAGAWA WAVE PALETTE
       ========================================================================= */

    --kw-sakura: #d27e99;
    --kw-wave-red: #e46876;
    --kw-sakura-pink: #d27e99;
    --kw-oni-violet: #957fb8;
    --kw-autumn-red: #e46876;
    --kw-peach-red: #ff5d62;
    --kw-surimi: #e6956b;
    --kw-carp-yellow: #e6c384;
    --kw-spring-green: #98bb6c;
    --kw-wave-aqua: #7aa89f;
    --kw-spring-blue: #7fb4ca;
    --kw-crystal-blue: #7e9cd8;
    --kw-blue: #7e9cd8;
    --kw-spring-violet: #9cabca;
    --kw-fg: #d6d8de;
    --kw-fg-dim: #c4c6d0;
    --kw-fg-muted: #9496a4;
    --kw-overlay-2: #8c8ea0;
    --kw-overlay-1: #6a6c7e;
    --kw-overlay-0: #4a4c56;
    --kw-ink-6: #454758;
    --kw-ink-5: #363844;
    --kw-ink-4: #2a2c36;
    --kw-ink-3: #1f2029;
    --kw-ink-2: #1a1b24;
    --kw-ink-1: #14151b;

    --color-white: #ffffff;
    --color-black: #000000;

    /* =========================================================================
       SEMANTIC COLORS
       ========================================================================= */

    --bg-app: var(--kw-ink-1);
    --bg-primary: var(--kw-ink-2);
    --bg-tertiary: var(--kw-ink-3);
    --bg-elevated: var(--kw-ink-5);

    --text-primary: var(--kw-fg);
    --text-secondary: var(--kw-fg-muted);
    --text-tertiary: var(--kw-overlay-1);
    --text-link: var(--kw-blue);
    --text-link-hover: var(--kw-crystal-blue);

    --border-primary: var(--kw-ink-4);
    --border-secondary: var(--kw-ink-5);
    --border-focus: var(--kw-blue);

    --color-success: var(--kw-spring-green);
    --color-success-bg: rgba(166, 218, 149, 0.15);
    --color-warning: var(--kw-carp-yellow);
    --color-warning-bg: rgba(238, 212, 159, 0.15);
    --color-error: var(--kw-autumn-red);
    --color-error-bg: rgba(237, 135, 150, 0.15);
    --color-info: var(--kw-blue);

    /* =========================================================================
       TYPOGRAPHY
       ========================================================================= */

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Cascadia Code', Consolas, monospace;

    /* =========================================================================
       BORDERS & RADIUS
       ========================================================================= */

    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;

    /* =========================================================================
       WEB-SPECIFIC LAYOUT TOKENS
       ========================================================================= */

    --max-width: 1100px;
    --narrow: 640px;
}

/* =============================================================================
   RESET & BASE
   ============================================================================= */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    color-scheme: dark;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-app);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container.narrow {
    max-width: var(--narrow);
}

/* =============================================================================
   TYPOGRAPHY
   ============================================================================= */

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
}

.muted {
    color: var(--text-secondary);
}

.small {
    font-size: 0.875rem;
}

a:not(.btn):not(.logo),
a:not(.btn):not(.logo):visited {
    color: var(--text-link);
    text-decoration: none;
}

a:not(.btn):not(.logo):hover {
    color: var(--text-link-hover);
    text-decoration: underline;
}

code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--bg-tertiary);
    padding: 0.15em 0.4em;
    border-radius: var(--radius-sm);
}

pre.code-block {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 0.6rem 1rem;
    overflow-x: auto;
    margin-bottom: 1rem;
}

pre.code-block code {
    background: none;
    padding: 0;
    font-size: 0.875rem;
    white-space: pre;
}

.copy-group {
    position: relative;
}

.copy-group .code-block {
    padding-right: 4.5rem;
}

.btn-copy {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: background 0.15s, color 0.15s;
}

.btn-copy:hover {
    background: var(--kw-blue);
    color: var(--kw-ink-1);
}

.btn-copy:active {
    transform: scale(0.93);
    transition-duration: 0s;
}

.btn-copy.copied {
    background: var(--kw-spring-green);
    color: var(--kw-ink-1);
}

/* =============================================================================
   NAVIGATION
   ============================================================================= */

.navbar {
    border-bottom: 1px solid var(--border-primary);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    background: var(--bg-app);
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.4rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--kw-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 6px rgba(138, 173, 244, 0.25));
}

.logo-raven {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: drop-shadow(0 0 4px rgba(138, 173, 244, 0.3));
}

/* Hamburger toggle — hidden on desktop */
.nav-toggle-input {
    display: none;
}

.nav-toggle-label {
    display: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 102;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: "";
    position: absolute;
    left: 0;
    width: 22px;
}

.hamburger::before {
    top: -7px;
}

.hamburger::after {
    top: 7px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a:not(.btn) {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    text-decoration: none;
}

.nav-links a:not(.btn):hover {
    color: var(--text-primary);
    text-decoration: none;
}

.nav-links a:active {
    transform: scale(0.95);
    transition-duration: 0s;
}

.btn-nav,
.btn-nav:visited {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    box-shadow: inset 0 0 0 1px var(--border-primary);
}

.btn-nav:hover {
    background: var(--bg-elevated);
}

/* =============================================================================
   BUTTONS
   ============================================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0 1rem;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    box-sizing: border-box;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    line-height: 1.4;
}

.btn:active {
    transform: scale(0.96);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
    transition-duration: 0s;
}

.btn-primary,
.btn-primary:visited {
    background: var(--kw-blue);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--kw-crystal-blue);
}

.btn-secondary,
.btn-secondary:visited {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    box-shadow: inset 0 0 0 1px var(--border-primary);
}

.btn-secondary:hover {
    background: var(--bg-elevated);
}

.btn-sm {
    font-size: 0.875rem;
}

/* =============================================================================
   HERO SECTION
   ============================================================================= */

.hero {
    padding: 5rem 0 5rem;
    text-align: center;
    background:
        radial-gradient(ellipse 600px 300px at 50% 40%, rgba(138, 173, 244, 0.06) 0%, transparent 70%),
        radial-gradient(ellipse 800px 400px at 50% 60%, rgba(125, 196, 228, 0.04) 0%, transparent 70%);
    position: relative;
}

.hero::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, transparent, var(--bg-app));
    pointer-events: none;
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-raven {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 16px rgba(138, 173, 244, 0.2)) drop-shadow(0 8px 24px rgba(0, 0, 0, 0.3));
    animation: hero-float 6s ease-in-out infinite;
}

@keyframes hero-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-raven { animation: none; }
}

/* Launch banner — raven above countdown, centered */
.hero-launch-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.hero-launch-column .hero-raven {
    margin-bottom: 0;
    width: 100px;
    height: 100px;
}

.launch-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.launch-label {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--kw-spring-blue);
    border: 2px solid var(--kw-spring-blue);
    border-radius: 6px;
    padding: 0.35rem 0;
    margin-bottom: 0.5rem;
    text-align: center;
}

.launch-date {
    font-size: 0.8rem;
    color: var(--kw-fg-muted);
    margin: 0 0 0.6rem;
}

.countdown {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
}

.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 3rem;
}

.countdown-value {
    font-size: 1.6rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--kw-spring-blue);
    line-height: 1.2;
}

.countdown-label {
    font-size: 0.55rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--kw-fg-muted);
    margin-top: 0.15rem;
}

@media (max-width: 600px) {
    .hero-launch-column {
        gap: 0.5rem;
    }
    .hero-launch-column .hero-raven {
        width: 80px;
        height: 80px;
    }
    .launch-banner { text-align: center; }
}

.hero h1 {
    color: var(--kw-fg);
    margin-bottom: 2rem;
}

@supports (background-clip: text) or (-webkit-background-clip: text) {
    .hero h1 {
        background: linear-gradient(180deg, var(--kw-fg) 0%, var(--kw-fg-muted) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        color: transparent;
    }
}

.hero .lead {
    margin: 1rem auto 0;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 3.5rem;
    flex-wrap: wrap;
}

.launch-offer {
    margin-top: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* =============================================================================
   CONTENT SECTIONS
   ============================================================================= */

.features, .pricing-section, .download-section, .checkout-section, .account-section, .success-section, .about-section, .policy-section, .compare-section {
    padding: 4.5rem 0;
}

.cta {
    padding: 4rem 0;
    text-align: center;
}

.cta .lead {
    margin: 1rem auto 0;
}

.section-divider {
    border-top: 1px solid var(--border-primary);
    margin: 3rem 0;
}

/* =============================================================================
   FEATURE GRID
   ============================================================================= */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.feature-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.feature-card:hover {
    border-color: var(--border-secondary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.feature-card.pro {
    border-color: var(--kw-blue);
}

.feature-card.featured-collab {
    background: linear-gradient(135deg, var(--bg-primary), rgba(138, 173, 244, 0.06));
    border-color: var(--kw-blue);
    box-shadow: 0 0 12px rgba(138, 173, 244, 0.08);
}

.feature-card.featured-collab:hover {
    box-shadow: 0 2px 16px rgba(138, 173, 244, 0.15);
}

.feature-card.pro h3::after {
    content: "PRO";
    font-size: 0.625rem;
    font-weight: 700;
    background: var(--kw-blue);
    color: var(--color-white);
    padding: 0.15em 0.5em;
    border-radius: var(--radius-sm);
    margin-left: 0.5rem;
    vertical-align: middle;
    letter-spacing: 0.05em;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 0;
}

/* =============================================================================
   BENTO GRID (home page — feature layout)
   ============================================================================= */

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.0625rem;
    margin-bottom: 2rem;
}

/* --- Hero feature (full-width spotlight) --- */

.bento-hero {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse 400px 200px at 80% 50%, rgba(138, 173, 244, 0.07) 0%, transparent 70%),
        var(--bg-primary);
    border-color: rgba(138, 173, 244, 0.25);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.bento-hero:hover {
    border-color: var(--kw-blue);
    box-shadow: 0 4px 24px rgba(138, 173, 244, 0.1);
}

.bento-hero-pro {
    background:
        radial-gradient(ellipse 400px 200px at 20% 50%, rgba(138, 173, 244, 0.05) 0%, transparent 70%),
        var(--bg-primary);
    margin-top: 1.5rem;
}

.bento-hero-content {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.bento-hero-text {
    flex: 1;
}

.bento-hero-text h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--kw-blue);
}

.bento-hero-text p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.bento-hero-code {
    flex: 0 0 320px;
}

.bento-hero-code .code-block {
    margin: 0;
    font-size: 0.8125rem;
}

/* --- Bento grid (2-col with accent borders) --- */

.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.bento-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    padding-left: 2rem;
    position: relative;
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.2s, transform 0.2s;
}

.bento-card:hover {
    border-color: var(--border-secondary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.bento-accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.accent-green .bento-accent { background: var(--kw-spring-green); }
.accent-red .bento-accent { background: var(--kw-autumn-red); }
.accent-peach .bento-accent { background: var(--kw-surimi); }
.accent-mauve .bento-accent { background: var(--kw-oni-violet); }
.accent-yellow .bento-accent { background: var(--kw-carp-yellow); }
.accent-teal .bento-accent { background: var(--kw-wave-aqua); }
.accent-blue .bento-accent { background: var(--kw-blue); }

.accent-green:hover { border-color: rgba(152, 187, 108, 0.4); }
.accent-red:hover { border-color: rgba(228, 104, 118, 0.4); }
.accent-peach:hover { border-color: rgba(230, 149, 107, 0.4); }
.accent-mauve:hover { border-color: rgba(149, 127, 184, 0.4); }
.accent-yellow:hover { border-color: rgba(230, 195, 132, 0.4); }
.accent-teal:hover { border-color: rgba(122, 168, 159, 0.4); }

.bento-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.bento-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.bento-card code {
    font-size: 0.8125rem;
    background: var(--bg-tertiary);
    padding: 0.1em 0.35em;
    border-radius: var(--radius-sm);
    color: var(--kw-surimi);
}

.bento-card.pro {
    border-color: rgba(138, 173, 244, 0.2);
}

.bento-card.pro:hover {
    border-color: rgba(138, 173, 244, 0.4);
}

/* --- Banner strip (compact full-width) --- */

.bento-banner {
    margin-bottom: 1.5rem;
}

.bento-banner-inner {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    transition: border-color 0.15s;
}

.bento-banner-inner:hover {
    border-color: var(--border-secondary);
}

.bento-banner-inner h3 {
    font-size: 1.125rem;
    margin-bottom: 0;
    white-space: nowrap;
}

.bento-banner-inner p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 0;
    flex: 1;
}

.bento-banner-inner .tech-tags {
    margin-top: 0;
}

/* --- Shared tag / header / badge styles --- */

.tech-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.tech-header h3 {
    margin-bottom: 0;
    font-size: 1.125rem;
}

.pro-badge {
    font-size: 0.625rem;
    font-weight: 700;
    background: var(--kw-blue);
    color: var(--color-white);
    padding: 0.15em 0.5em;
    border-radius: var(--radius-sm);
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.75rem;
}

.tag {
    font-size: 0.6875rem;
    font-family: var(--font-mono);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-primary);
    padding: 0.2em 0.5em;
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.code-sm {
    font-size: 0.8125rem;
    margin-top: 0.75rem;
    margin-bottom: 0;
}

/* =============================================================================
   SHOWCASE TABS (home page — Caido-style feature highlight)
   ============================================================================= */

.showcase {
    position: relative;
    background:
        radial-gradient(ellipse 600px 300px at 30% 40%, rgba(152, 187, 108, 0.04) 0%, transparent 70%),
        radial-gradient(ellipse 600px 300px at 70% 60%, rgba(138, 173, 244, 0.04) 0%, transparent 70%);
}

/* The scroll track creates the scroll distance for the sticky lock.
   Height = 100vh per tab (3 tabs = 300vh). The sticky child fills one viewport. */
.showcase-scroll-track {
    height: 300vh;
}

.showcase-sticky {
    position: sticky;
    top: 60px;
    height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.showcase h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.showcase .section-subtitle {
    text-align: center;
}

.text-accent {
    color: var(--kw-blue);
}

.showcase-tabs {
    display: flex;
    justify-content: center;
    margin-top: 2.5rem;
    min-height: 4.5rem;
    align-items: center;
}

.showcase-word {
    display: none;
    font-family: var(--font-mono);
    font-size: 4.5rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--kw-fg);
    text-shadow: 0 0 30px rgba(110, 150, 255, 0.7), 0 0 60px rgba(110, 150, 255, 0.4), 0 0 100px rgba(110, 150, 255, 0.2);
    text-align: center;
    animation: showcase-word-in 0.4s ease-out;
    cursor: pointer;
}

.showcase-word.active {
    display: block;
}

@keyframes showcase-word-in {
    from { opacity: 0; transform: translateY(12px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.showcase-panels {
    min-height: 280px;
    margin-top: 2.5rem;
}

.showcase-panel {
    display: none;
}

.showcase-panel.active {
    display: block;
}

.showcase-item {
    margin-bottom: 2.5rem;
    text-align: center;
}

.showcase-item:last-child {
    margin-bottom: 0;
}

.showcase-item h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.showcase-item p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
    max-width: 560px;
    margin: 0 auto;
}

/* =============================================================================
   TIER CARDS (home page — free vs pro glance)
   ============================================================================= */

.tiers {
    padding: 5rem 0 5rem;
}

.tiers-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 640px;
    margin: 0 auto;
}

.tier-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: border-color 0.15s;
}

.tier-card:hover {
    border-color: var(--border-secondary);
}

.tier-card.tier-pro {
    border-color: rgba(138, 173, 244, 0.3);
}

.tier-card.tier-pro:hover {
    border-color: var(--kw-blue);
}

.tier-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.tier-price {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.tier-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

/* =============================================================================
   COMPARISON TABLE (compare page)
   ============================================================================= */

.compare-table-wrap {
    overflow-x: auto;
    margin: 1.5rem 0 2rem;
    -webkit-overflow-scrolling: touch;
}

.compare-table {
    min-width: 800px;
}

.cmp-row {
    display: grid;
    grid-template-columns: 200px repeat(6, 1fr);
    gap: 0;
    border-bottom: 1px solid var(--border-primary);
}

.cmp-row:last-child {
    border-bottom: none;
}

.cmp-row.cmp-header {
    border-bottom: 2px solid var(--border-secondary);
    position: sticky;
    top: 0;
    background: var(--bg-app);
    z-index: 1;
}

.cmp-feature, .cmp-col {
    padding: 0.75rem 0.625rem;
    font-size: 0.875rem;
}

.cmp-feature {
    font-weight: 600;
    color: var(--text-primary);
}

.cmp-col {
    text-align: center;
    color: var(--text-secondary);
}

.cmp-header .cmp-col {
    text-align: center;
    padding-bottom: 0.5rem;
}

.cmp-header .cmp-col strong {
    display: block;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.cmp-tier {
    display: block;
    font-size: 0.6875rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    margin-top: 0.125rem;
}

.cmp-highlight {
    background: rgba(138, 173, 244, 0.06);
}

.cmp-row:not(.cmp-header):hover {
    background: rgba(255, 255, 255, 0.02);
}

.cmp-yes {
    color: var(--kw-spring-green);
    font-weight: 700;
    font-size: 1rem;
}

.cmp-no {
    color: var(--kw-autumn-red);
    font-weight: 700;
    font-size: 1rem;
}

.cmp-partial {
    color: var(--kw-carp-yellow);
    font-weight: 700;
    font-size: 1rem;
}

/* Narrative comparison blocks */
.compare-narrative {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    margin-top: 2rem;
}

.compare-block h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-primary);
}

.compare-point {
    margin-bottom: 1.75rem;
}

.compare-point:last-child {
    margin-bottom: 0;
}

.compare-point h4 {
    font-size: 1rem;
    margin-bottom: 0.375rem;
    color: var(--text-primary);
}

.compare-point p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* =============================================================================
   PLATFORM SELECTOR (download page)
   ============================================================================= */

.platform-selector {
    display: inline-flex;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 3px;
    margin-top: 2rem;
    gap: 2px;
}

.platform-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    user-select: none;
}

.platform-tab svg {
    flex-shrink: 0;
}

.platform-tab:hover {
    color: var(--text-primary);
}

.platform-tab:active {
    transform: scale(0.95);
    transition-duration: 0s;
}

.platform-tab.active {
    background: var(--bg-elevated);
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.platform-panel {
    display: none;
    margin-top: 2rem;
    text-align: center;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
}

.platform-panel.active {
    display: block;
}

.platform-panel .code-block {
    margin-bottom: 0.5rem;
}

.platform-panel p {
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
}

.platform-panel .muted {
    margin-bottom: 0;
    font-size: 0.8125rem;
}

.download-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: 2rem 2.5rem 2.5rem;
    text-align: left;
    max-width: 540px;
    margin: 0 auto;
}

.download-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: var(--text-primary);
}

.download-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.25rem;
    margin-bottom: 2rem;
}

.download-buttons .btn {
    flex: 1;
    justify-content: center;
}

.platform-list {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0;
}

.platform-list li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.4rem;
    font-size: 0.9375rem;
    color: var(--kw-fg-muted);
}

.platform-list li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--kw-spring-blue);
    font-weight: 700;
}

.star-count {
    margin-left: 0.5rem;
    font-size: 0.8125rem;
    opacity: 0.7;
}

.star-count:empty {
    display: none;
}

/* =============================================================================
   PRICING
   ============================================================================= */

/* Period cards — Mullvad-style flat rate visualization */
.period-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

.period-grid.single {
    grid-template-columns: 1fr;
    max-width: 200px;
}

.period-card {
    background: var(--bg-primary);
    border: 2px solid var(--kw-spring-blue);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.25rem;
    text-align: center;
    transition: box-shadow 0.15s;
    box-shadow: 0 0 16px color-mix(in srgb, var(--kw-spring-blue) 15%, transparent);
}

.period-card:hover {
    border-color: var(--kw-spring-blue);
    box-shadow: 0 0 30px color-mix(in srgb, var(--kw-spring-blue) 40%, transparent);
}

.period-card h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.period-price {
    margin-bottom: 0.25rem;
}

.period-amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.period-sub {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin: 0;
}

/* Currency equivalents */
.currency-row {
    text-align: center;
    margin-bottom: 3rem;
}

.currency-label {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.currency-grid {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.currency-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.currency-flag {
    display: flex;
    align-items: center;
    justify-content: center;
}

.currency-flag svg {
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.currency-value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Bento grid for pricing features */
.bento-section-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.bento-section-desc {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.bento-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.bento-card h4 {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.bento-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0;
    flex: 1;
}

.bento-sm {
    grid-column: span 1;
}

.bento-lg {
    grid-column: span 2;
}

.bento-pro {
    border-color: var(--kw-blue);
    box-shadow: 0 0 12px rgba(138, 173, 244, 0.08);
}

.bento-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 1rem;
}

.bento-tag {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.2em 0.6em;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
    letter-spacing: 0.02em;
}

.bento-pro .bento-tag {
    background: rgba(138, 173, 244, 0.1);
    color: var(--kw-blue);
}

.payment-note {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    text-align: center;
    margin-top: auto;
    margin-bottom: 1rem;
}

.feature-list {
    list-style: none;
    flex: 1;
    margin-bottom: 1.5rem;
}

.feature-list li {
    padding: 0.5rem 0;
    padding-left: 1.75rem;
    position: relative;
    font-size: 0.9375rem;
    border-bottom: 1px solid var(--border-primary);
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list li.included::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--color-success);
    font-weight: 700;
}

.feature-list li.excluded {
    color: var(--text-tertiary);
}

.feature-list li.excluded::before {
    content: "\2717";
    position: absolute;
    left: 0;
    color: var(--text-tertiary);
}

/* =============================================================================
   FAQ
   ============================================================================= */

.pricing-faq {
    max-width: 700px;
    margin: 0 auto;
}

.pricing-faq dt {
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.pricing-faq dd {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* =============================================================================
   DOWNLOAD
   ============================================================================= */

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.download-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.download-card:hover {
    border-color: var(--border-secondary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.quickstart .step {
    margin-bottom: 2rem;
}

.quickstart .step h4 {
    color: var(--kw-blue);
}

/* =============================================================================
   FORMS
   ============================================================================= */

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    appearance: auto;
}

.form-group select {
    cursor: pointer;
}

.form-group textarea {
    resize: vertical;
    min-height: 2.75rem;
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 2px rgba(138, 173, 244, 0.2);
}

.form-group .hint {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.account-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.account-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 0.6rem 1rem;
}

.account-item code {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text-primary);
    word-break: break-all;
}

.btn-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0 0.25rem;
    line-height: 1;
}

.btn-remove:hover {
    color: var(--text-primary);
}

.account-item.generated {
    border-color: var(--accent);
}

.btn-copy-sm {
    background: none;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    cursor: pointer;
    white-space: nowrap;
}

.btn-copy-sm:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.account-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    align-items: center;
}

.account-actions .btn {
    white-space: nowrap;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
}

.add-existing {
    display: flex;
    gap: 0.35rem;
    flex: 1;
    align-items: center;
}

.add-existing input {
    flex: 1;
    min-width: 0;
    font-size: 0.875rem;
    padding: 0.6rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
}

.add-existing input:focus {
    outline: none;
    border-color: var(--border-focus);
}

.duration-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.duration-option {
    cursor: pointer;
    display: block;
}

.duration-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.duration-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 1rem 0.5rem;
    background: var(--bg-primary);
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-lg);
    transition: border-color 0.15s, background 0.15s;
    text-align: center;
}

.duration-option input[type="radio"]:checked + .duration-card {
    border-color: var(--kw-blue);
    background: rgba(126, 156, 216, 0.08);
}

.duration-card:hover {
    border-color: var(--kw-blue);
}

.duration-card:active {
    transform: scale(0.97);
    transition-duration: 0s;
}

.duration-months {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.duration-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.duration-price {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--kw-blue);
    margin-top: 0.25rem;
}

.duration-option:last-child {
    grid-column: 1 / -1;
}

.duration-custom {
    flex-direction: row;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
}

.duration-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.duration-number-input {
    width: 3.5rem;
    padding: 0.25rem 0.4rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    text-align: center;
    font-family: inherit;
}

.duration-number-input:focus {
    outline: none;
    border-color: var(--border-focus);
}

.licenses-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.licenses-row input {
    width: 5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    text-align: center;
}

.licenses-row input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 2px rgba(138, 173, 244, 0.2);
}

.licenses-hint {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.payment-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.payment-buttons .btn {
    text-align: center;
}

/* =============================================================================
   STRIPE PAYMENT FORM
   ============================================================================= */

.payment-summary {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-primary);
}

.payment-summary h3 {
    margin-bottom: 0.5rem;
}

.payment-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.payment-form-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 2rem;
}

#payment-element {
    margin-bottom: 1.5rem;
}

.btn-block {
    width: 100%;
    padding: 1rem;
    font-size: 1.125rem;
}

.btn-block:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.payment-error {
    color: var(--color-error);
    font-size: 0.9375rem;
    text-align: center;
    margin-bottom: 1rem;
}

.hidden {
    display: none;
}

.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--color-white);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 0.5rem;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== Status Page ========== */

.status-hero {
    padding: 4rem 0 2rem;
    text-align: center;
}

.status-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.status-banner h1 {
    margin: 0;
    font-size: 2rem;
}

.status-banner-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.status-banner-icon svg {
    width: 28px;
    height: 28px;
}

.status-banner.operational .status-banner-icon {
    background: var(--kw-spring-green);
    color: var(--kw-ink-1);
}

.status-banner.degraded .status-banner-icon {
    background: var(--kw-carp-yellow);
    color: var(--kw-ink-1);
}

.status-banner.down .status-banner-icon {
    background: var(--kw-autumn-red);
    color: var(--kw-ink-1);
}

.status-updated {
    font-size: 0.875rem;
}

.status-section {
    padding: 0 0 4rem;
}

.status-card {
    background: var(--kw-ink-2);
    border: 1px solid var(--kw-ink-4);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.status-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    font-weight: 500;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge.operational {
    background: rgba(166, 209, 137, 0.15);
    color: var(--kw-spring-green);
}

.status-badge.degraded {
    background: rgba(229, 200, 144, 0.15);
    color: var(--kw-carp-yellow);
}

.status-badge.down {
    background: rgba(231, 130, 132, 0.15);
    color: var(--kw-autumn-red);
}

.status-badge::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.status-service {
    padding: 1.25rem 0;
    border-top: 1px solid var(--kw-ink-4);
}

.status-service:last-child {
    padding-bottom: 0;
}

.status-service-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.status-service-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.operational {
    background: var(--kw-spring-green);
}

.status-dot.degraded {
    background: var(--kw-carp-yellow);
}

.status-dot.down {
    background: var(--kw-autumn-red);
}

.status-service-name {
    font-weight: 500;
    font-size: 1rem;
}

.status-uptime {
    font-size: 0.875rem;
    color: var(--kw-spring-green);
    font-weight: 500;
}

.status-bars {
    display: flex;
    gap: 2px;
    height: 34px;
    align-items: stretch;
    background: var(--kw-ink-1);
    border-radius: 4px;
    padding: 3px;
}

.status-bar {
    flex: 1;
    border-radius: 2px;
    min-width: 0;
    cursor: default;
    transition: opacity 0.15s;
}

.status-bar:hover {
    opacity: 0.8;
    transform: scaleY(1.1);
}

.status-bar.operational {
    background: var(--kw-spring-green);
}

.status-bar.degraded {
    background: var(--kw-carp-yellow);
}

.status-bar.down {
    background: var(--kw-autumn-red);
}

.status-bar.no-data {
    background: var(--kw-ink-4);
}

.status-bar-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

@media (max-width: 600px) {
    .duration-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =============================================================================
   CARDS
   ============================================================================= */

.card {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.get-started-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.get-started-grid .card {
    margin-bottom: 0;
}

.get-started-grid .card h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.warning-card {
    border-color: var(--color-warning);
}

.warning {
    color: var(--color-warning);
    font-weight: 500;
}

.paid-until {
    text-align: center;
    padding: 1rem 0;
}

.paid-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.paid-date {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.paid-date.expired {
    color: var(--color-error);
}

.paid-remaining {
    display: block;
    font-size: 0.875rem;
    color: var(--color-success);
    margin-top: 0.25rem;
}

.account-id code {
    font-size: 1.125rem;
    color: var(--kw-wave-aqua);
    background: none;
    padding: 0;
    user-select: all;
}

/* =============================================================================
   STATUS DISPLAY
   ============================================================================= */

.status-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-primary);
}

.status-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.status-row .label {
    color: var(--text-secondary);
}

.status-row .value {
    font-weight: 500;
}

.badge {
    display: inline-block;
    padding: 0.2em 0.6em;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
}

.badge.pro {
    background: var(--kw-blue);
    color: var(--color-white);
}

.badge.active {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.badge.expired {
    background: var(--color-error-bg);
    color: var(--color-error);
}

/* =============================================================================
   DEVICE CARDS (Mullvad-style)
   ============================================================================= */

.device-card {
    padding: 1.25rem 1.5rem;
}

.device-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.device-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.device-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.device-date {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.device-details {
    border-top: 1px solid var(--border-primary);
    padding-top: 0.75rem;
}

.device-details .label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.25rem;
}

.device-details .code-block {
    margin: 0 0 0.5rem;
    font-size: 0.75rem;
    word-break: break-all;
}

.device-seen {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.btn-danger {
    background: var(--color-error);
    color: var(--color-white);
    border: none;
}

.btn-danger:hover {
    background: var(--color-error);
    opacity: 0.85;
}

/* =============================================================================
   ABOUT
   ============================================================================= */

.about-content {
    max-width: 700px;
    margin: 0 auto;
}

.about-content p {
    color: var(--text-secondary);
    font-size: 1.0625rem;
    line-height: 1.7;
}

.belief {
    margin-bottom: 2rem;
}

.belief h3 {
    color: var(--text-primary);
}

.belief p {
    margin-bottom: 0;
}

/* =============================================================================
   FOOTER
   ============================================================================= */

/* Contact grid */
/* Contact channel rows (Mullvad-inspired icon list) */
.contact-channels {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.contact-row {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-primary);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
    border-radius: var(--radius-sm);
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.contact-row:first-child {
    border-top: 1px solid var(--border-primary);
}

.contact-row:hover {
    background: var(--bg-tertiary);
}

.contact-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 0.4rem;
}

.contact-row:hover .contact-icon {
    color: var(--accent-primary);
}

.contact-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.contact-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.contact-desc {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

/* Policy page numbered sections */
.policy-section h2 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.policy-section h3 {
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.policy-section p {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.policy-section ul {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.policy-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Footer — 3-column Mullvad-style */
.footer {
    border-top: 1px solid var(--border-primary);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: "HUGIN";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-49%, -50%);
    font-size: 28vw;
    font-weight: 900;
    letter-spacing: 0.08em;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--kw-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.05;
    pointer-events: none;
    white-space: nowrap;
    line-height: 1;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.8125rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-col a:not(.btn),
.footer-col a:not(.btn):visited {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
    text-decoration: none;
}

.footer-col a:not(.btn):hover {
    color: var(--text-primary);
    text-decoration: none;
}

.footer-col .footer-email {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
}

.footer-social {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.footer-social svg {
    vertical-align: middle;
    flex-shrink: 0;
}

.footer-bottom {
    border-top: 1px solid var(--border-primary);
    padding-top: 1.5rem;
    text-align: center;
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 768px) {
    /* --- Status page --- */
    .status-card {
        padding: 1rem 1.25rem;
    }

    .status-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .status-banner h1 {
        font-size: 1.5rem;
    }

    /* --- Hamburger menu --- */
    .nav-toggle-label {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--bg-app);
        border-bottom: 1px solid var(--border-primary);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        padding: 0.5rem 0;
        z-index: 101;
    }

    .nav-toggle-input:checked ~ .nav-links {
        display: flex;
    }

    /* Animate hamburger to X */
    .nav-toggle-input:checked ~ .nav-toggle-label .hamburger {
        background: transparent;
    }

    .nav-toggle-input:checked ~ .nav-toggle-label .hamburger::before {
        top: 0;
        transform: rotate(45deg);
    }

    .nav-toggle-input:checked ~ .nav-toggle-label .hamburger::after {
        top: 0;
        transform: rotate(-45deg);
    }

    .nav-links a {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        border-bottom: 1px solid var(--border-primary);
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    .nav-links .btn {
        margin: 0.5rem 1.5rem;
        text-align: center;
        border-bottom: none;
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .navbar .container {
        position: relative;
    }

    /* --- Typography --- */
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.375rem;
    }

    .lead {
        font-size: 1rem;
    }

    /* --- Hero --- */
    .hero {
        padding: 2.5rem 0 2rem;
    }

    .hero-raven {
        width: 80px;
        height: 80px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 280px;
    }

    /* --- Grids --- */
    .feature-grid,
    .download-grid {
        grid-template-columns: 1fr;
    }

    .bento-grid {
        grid-template-columns: 1fr;
    }

    .bento-hero-content {
        flex-direction: column;
        gap: 1.5rem;
    }

    .bento-hero-code {
        flex: 1 1 auto;
        width: 100%;
    }

    .bento-banner-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .bento-banner-inner p {
        margin-bottom: 0.5rem;
    }

    /* --- Showcase tabs --- */
    .showcase-scroll-track {
        height: 300vh;
    }

    .showcase-word {
        font-size: 3rem;
    }

    .showcase-panels {
        min-height: auto;
    }

    /* --- Tier cards --- */
    .tiers-grid {
        grid-template-columns: 1fr;
        max-width: 360px;
    }

    /* --- Compare page --- */
    .compare-narrative {
        grid-template-columns: 1fr;
    }

    .cmp-feature {
        font-size: 0.75rem;
    }

    .cmp-col {
        font-size: 0.75rem;
        padding: 0.5rem 0.375rem;
    }

    .period-grid {
        grid-template-columns: 1fr;
        max-width: 280px;
    }

    .currency-grid {
        gap: 1.5rem;
    }

    /* --- Code blocks --- */
    pre.code-block {
        font-size: 0.8125rem;
        padding: 0.5rem 0.75rem;
    }

    pre.code-block code {
        font-size: 0.8125rem;
        word-break: break-all;
        white-space: pre-wrap;
    }

    .account-id code {
        font-size: 0.9375rem;
        word-break: break-all;
    }

    .copy-group .code-block {
        padding-right: 0.75rem;
    }

    .btn-copy {
        position: static;
        display: block;
        width: 100%;
        margin-top: 0.5rem;
        text-align: center;
        padding: 0.5rem;
    }

    .copy-group {
        position: static;
    }

    /* --- Platform selector --- */
    .platform-selector {
        flex-direction: column;
    }

    /* --- Cards / bento --- */
    .bento-card {
        padding: 1.25rem;
    }

    .card {
        padding: 1.25rem;
    }

    .get-started-grid {
        grid-template-columns: 1fr;
    }

    /* --- Contact grid --- */
    .contact-row {
        gap: 1rem;
    }

    /* --- Footer --- */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem 1rem;
    }

    .footer {
        padding: 2rem 0 1.5rem;
        margin-top: 2rem;
    }

    /* --- Checkout / forms --- */
    .checkout-section .container.narrow {
        padding: 0 1rem;
    }

    .payment-buttons .btn {
        padding: 1rem;
        font-size: 1rem;
    }

    /* --- Status grid (account page) --- */
    .status-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    /* --- Sections padding --- */
    .features, .pricing-section, .download-section, .checkout-section, .account-section, .success-section, .about-section, .policy-section {
        padding: 2rem 0;
    }
}

/* Small phones */
@media (max-width: 400px) {
    .container {
        padding: 0 1rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .duration-grid {
        grid-template-columns: 1fr 1fr;
    }

    .period-amount {
        font-size: 2.25rem;
    }
}

/* App screenshot showcase */
.screenshot-section {
    padding: 2rem 1rem 4rem;
    overflow: hidden;
}

.screenshot-section .container {
    max-width: 960px;
}

.app-screenshot {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Tactile press feedback for all interactive elements */
.nav-toggle-label:active,
.btn-remove:active,
.duration-option:active,
.footer a:active,
.tier-card:active,
.bento-card:active,
.cmp-row:active {
    transform: scale(0.97);
    transition-duration: 0s;
}
