:root {
    --bg: #f5f7fb;
    --bg-alt: #ffffff;
    --text: #121826;
    --text-muted: #5a6275;
    --brand: #2563eb;
    --brand-accent: #7c3aed;
    --brand-soft: rgba(37, 99, 235, 0.1);
    --border: #d7dce9;
    --card-shadow: 0 24px 48px rgba(18, 24, 38, 0.08);
    --shot-max-width: 456px;
    --shot-max-height: 86vh;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.6;
}

@media (min-width: 900px) {
    :root {
        --shot-max-width: 672px;
        --shot-max-height: 90vh;
    }
}

@media (min-width: 1200px) {
    :root {
        --shot-max-width: 744px;
    }
}

* {
    box-sizing: border-box;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover,
a:focus {
    color: var(--brand);
}

body {
    margin: 0;
    background: var(--bg);
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    font-size: 0.95em;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.18);
    padding: 0.12rem 0.35rem;
    border-radius: 8px;
}

code.code-wrap {
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

.container {
    width: min(1200px, 92vw);
    margin: 0 auto;
}

@media (min-width: 1200px) {
    .container {
        width: min(1280px, 92vw);
    }
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(12px);
    background: rgba(245, 247, 251, 0.9);
    border-bottom: 1px solid rgba(215, 220, 233, 0.4);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--brand);
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    font-weight: 500;
}

.lang-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.55rem 1.1rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
}

.lang-select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-soft);
}

.nav-menu a {
    padding: 0.25rem 0;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.3rem;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--brand), var(--brand-accent));
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.nav-menu a:hover::after,
.nav-menu a:focus::after {
    transform: scaleX(1);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 1.5rem;
    height: 2px;
    margin: 0.3rem 0;
    background: var(--text);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.hero {
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.15), transparent 45%), radial-gradient(circle at bottom right, rgba(124, 58, 237, 0.12), transparent 40%);
    padding: clamp(4rem, 8vw, 6rem) 0 4rem;
}

.hero-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    align-items: center;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--brand);
}

.hero h1 {
    font-size: clamp(2.25rem, 4vw, 3rem);
    line-height: 1.15;
    margin: 0.75rem 0;
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.hero-points {
    margin: 0 0 1.75rem;
    padding-left: 1.15rem;
    color: var(--text-muted);
    max-width: 44rem;
}

.hero-points li {
    margin: 0.35rem 0;
}

.hero-points strong {
    color: var(--text);
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.6rem;
    border-radius: 999px;
    font-weight: 600;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-accent));
    color: #fff;
    box-shadow: 0 18px 32px rgba(37, 99, 235, 0.25);
}

.btn.primary:hover,
.btn.primary:focus {
    transform: translateY(-2px);
    box-shadow: 0 24px 36px rgba(37, 99, 235, 0.32);
}

.btn.secondary {
    background: rgba(37, 99, 235, 0.08);
    color: var(--brand);
}

.btn.tertiary {
    background: transparent;
    color: var(--brand);
    border-color: var(--brand);
}

.hero-card {
    background: var(--bg-alt);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
}

.hero-card__title {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.hero-card ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hero-card li {
    margin-bottom: 0.75rem;
}

.section {
    padding: clamp(3.5rem, 7vw, 5rem) 0;
}

.section-alt {
    background: var(--bg-alt);
}

.section h2 {
    font-size: clamp(2rem, 3vw, 2.5rem);
    margin-bottom: 1rem;
}

.section-intro {
    max-width: 620px;
    margin: 0.5rem auto 2.5rem;
    color: var(--text-muted);
}

.section-intro.left {
    margin-left: 0;
    margin-right: 0;
}

.center {
    text-align: center;
}

.grid-two {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    align-items: start;
}

/* Quick navigation: reduce TOC height via layout (not stretching cards) */
.toc .toc-list a {
    padding: 0.35rem 0;
}

@media (min-width: 900px) {
    .toc .toc-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 1rem;
        row-gap: 0.15rem;
    }

    .toc .toc-list li + li {
        margin-top: 0;
    }
}

.quick-nav-note {
    max-width: 920px;
    margin: 1.25rem auto 0;
    padding: 0.9rem 1rem;
}

/* Quick navigation: keep both cards visually same height without stretching the TOC */
.quick-nav-right {
    padding: 1.35rem;
}

.quick-nav-right h3 {
    margin: 0 0 0.9rem;
}

.quick-nav-right .icon-list {
    gap: 0.85rem;
}

.quick-nav-right .icon-list li {
    gap: 0.75rem;
}

.quick-nav-right .icon-list p {
    margin: 0.2rem 0 0;
    line-height: 1.4;
}

.card {
    background: var(--bg-alt);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
}

.icon-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.icon {
    font-size: 1.5rem;
}

.icon-list li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: start;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.75rem;
    margin-top: 2.5rem;
}

.product-card {
    background: var(--bg-alt);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    box-shadow: 0 16px 32px rgba(18, 24, 38, 0.06);
}

.product-card.highlight {
    border: 1px solid rgba(37, 99, 235, 0.18);
    box-shadow: 0 24px 40px rgba(37, 99, 235, 0.18);
}

.product-badge {
    display: inline-flex;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    color: var(--brand);
    font-weight: 600;
    font-size: 0.75rem;
    margin-bottom: 1rem;
}

.product-badge.upcoming {
    background: rgba(124, 58, 237, 0.12);
    color: var(--brand-accent);
}

.pennie-header {
    max-width: 720px;
}

.feature-panels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
}

/* Pennie docs: use row-wise feature blocks (prevents one tall image from stretching a column) */
.feature-panels.feature-rows {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.panel {
    background: var(--bg-alt);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
}

.feature-panels .panel .btn {
    margin-top: 1.5rem;
}

.bullet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem 1.5rem;
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
}

.bullet-grid li {
    background: rgba(37, 99, 235, 0.08);
    border-radius: 14px;
    padding: 1rem;
}

.comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.comparison h4 {
    margin-bottom: 0.75rem;
}

.comparison ul {
    margin: 0;
    padding-left: 1.1rem;
}

.guide-steps {
    list-style: decimal;
    margin: 0;
    padding-left: 1.25rem;
    display: grid;
    gap: 1.75rem;
}

.guide-steps li {
    background: var(--bg-alt);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 12px 24px rgba(18, 24, 38, 0.05);
}

.contact {
    align-items: stretch;
}

.contact-form {
    background: var(--bg-alt);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    display: grid;
    gap: 0.9rem;
}

.contact-form input,
.contact-form textarea {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-family: inherit;
    font-size: 1rem;
    background: #fff;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.form-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: -0.5rem;
}

.contact-email a {
    font-weight: 600;
    color: var(--brand);
    background: rgba(37, 99, 235, 0.08);
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
}

.site-footer {
    padding: 2.5rem 0;
    background: #0f172a;
    color: rgba(255, 255, 255, 0.82);
}

/* --- Multi-page additions --- */

.breadcrumb {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--brand);
    font-weight: 600;
}

.page-hero {
    padding: clamp(3.5rem, 7vw, 5rem) 0 2.5rem;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 52%), radial-gradient(circle at bottom right, rgba(124, 58, 237, 0.10), transparent 46%);
}

.page-hero h1 {
    margin: 0.8rem 0 0.75rem;
    font-size: clamp(2rem, 3.6vw, 2.75rem);
    line-height: 1.15;
}

.hero-title-row {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.hero-title-row h1 {
    margin: 0.8rem 0 0.75rem;
}

.app-icon-lg {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    box-shadow: 0 16px 28px rgba(18, 24, 38, 0.12);
    border: 1px solid rgba(215, 220, 233, 0.7);
    background: rgba(255, 255, 255, 0.65);
    flex: 0 0 auto;
}

@media (max-width: 520px) {
    .hero-title-row {
        align-items: flex-start;
        gap: 0.75rem;
    }

    .app-icon-lg {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        margin-top: 0.95rem;
    }
}

.page-hero .subtitle {
    margin-bottom: 1.25rem;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    background: rgba(37, 99, 235, 0.07);
    color: var(--brand);
    font-weight: 600;
    font-size: 0.8rem;
}

.download-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: center;
    margin-top: 1.25rem;
}

.platform-note {
    display: inline-flex;
    gap: 0.55rem;
    align-items: center;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(18, 24, 38, 0.10);
    background: rgba(255, 255, 255, 0.65);
    color: var(--text);
    font-weight: 600;
    font-size: 0.9rem;
}

.platform-logo {
    width: 18px;
    height: 18px;
    display: block;
}

.toc {
    background: var(--bg-alt);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
}

.toc-title-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0 0 0.75rem;
}

.toc-title-row h3 {
    margin: 0;
}

.app-icon-sm {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    box-shadow: 0 10px 18px rgba(18, 24, 38, 0.10);
    border: 1px solid rgba(215, 220, 233, 0.7);
    background: rgba(255, 255, 255, 0.65);
    flex: 0 0 auto;
}

.toc a {
    display: block;
    padding: 0.4rem 0;
    color: var(--text);
}

.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc-list li + li {
    margin-top: 0.25rem;
}

.toc-list a {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0;
    text-decoration: none;
}

.toc-ico {
    width: 1.55rem;
    height: 1.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.16);
    color: var(--brand);
    flex: 0 0 auto;
    font-size: 0.95rem;
    line-height: 1;
}

.toc a:hover,
.toc a:focus {
    color: var(--brand);
}

.shot {
    margin: 1.25rem 0 0;
    background: var(--bg-alt);
    border-radius: 18px;
    box-shadow: 0 14px 30px rgba(18, 24, 38, 0.06);
    overflow: hidden;
    border: 1px solid rgba(215, 220, 233, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.7rem;
}

.shot img {
    width: min(var(--shot-max-width), 100%);
    height: auto;
    max-height: var(--shot-max-height);
    display: block;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.10), rgba(124, 58, 237, 0.08));
    border-radius: 16px;
}

.shot figcaption {
    padding: 0.6rem 0.25rem 0.15rem;
    font-size: 0.74rem;
    line-height: 1.3;
    color: var(--text-muted);
    border-top: none;
    text-align: center;
    max-width: 360px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.note {
    background: rgba(124, 58, 237, 0.07);
    border: 1px solid rgba(124, 58, 237, 0.18);
    color: var(--text);
    border-radius: 16px;
    padding: 1rem 1.1rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.stat {
    background: var(--bg-alt);
    border-radius: 18px;
    padding: 1.25rem;
    border: 1px solid rgba(215, 220, 233, 0.65);
    box-shadow: 0 14px 30px rgba(18, 24, 38, 0.05);
}

.shot-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: flex-start;
    justify-content: center;
    margin: 1.25rem 0;

    /* In grids, prefer 3-per-row on typical desktop widths by capping card width.
       This reduces the empty space you saw between/around images. */
    --shot-max-width: clamp(280px, 30vw, 360px);
}

.shot-grid .shot {
    margin: 0;
    flex: 0 1 var(--shot-max-width);
    padding: 0.55rem;
}

/* If screenshots are listed as consecutive <figure class="shot"> in a panel (no .shot-grid wrapper),
   lay them out in rows and wrap automatically. */
.panel figure.shot {
    display: inline-block;
    vertical-align: top;
    width: calc(50% - 0.65rem);
    margin: 1.25rem 1.3rem 0 0;
}

.panel figure.shot:only-of-type {
    display: block;
    width: 100%;
    margin-right: 0;

    /* Single screenshot in a section: match the same frame size as multi-shot grids. */
    --shot-max-width: clamp(280px, 30vw, 360px);
    padding: 0.55rem;
}

.panel figure.shot:nth-of-type(2n) {
    margin-right: 0;
}

@media (max-width: 720px) {
    .panel figure.shot {
        display: block;
        width: 100%;
        margin-right: 0;
    }
}

@media (min-width: 900px) {
    .panel figure.shot {
        width: calc(33.333% - 0.9rem);
        margin-right: 1.35rem;
    }

    .panel figure.shot:nth-of-type(2n) {
        margin-right: 1.35rem;
    }

    .panel figure.shot:nth-of-type(3n) {
        margin-right: 0;
    }
}

.stat .k {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    font-weight: 700;
}

.stat .v {
    font-weight: 800;
    font-size: 1.25rem;
    margin-top: 0.4rem;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
}

.footer-copy {
    color: rgba(255, 255, 255, 0.65);
    margin: 0.5rem 0 0;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
}

.footer-links a:hover,
.footer-links a:focus {
    color: #fff;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: inline-flex;
        flex-direction: column;
    }

    .nav-menu {
        position: absolute;
        top: 72px;
        right: 4vw;
        background: var(--bg-alt);
        border-radius: 16px;
        box-shadow: var(--card-shadow);
        padding: 1.25rem;
        display: grid;
        gap: 1rem;
        min-width: 180px;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-12px);
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

    .nav-menu.open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-toggle.active span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .hero {
        padding-top: 5.5rem;
    }

    .footer-grid {
        flex-direction: column;
        align-items: flex-start;
    }
}
