/* Nib public site — clean, minimal, professional.
   Palette: Catppuccin Latte (light, below) / Mocha (dark, html.theme-dark) with a
   mauve brand accent — the same visual language as Nib's app, so the site and the
   product feel like one thing. Zero web fonts, zero trackers: nothing loads over
   the network, which is itself on-brand for a "nothing leaves your computer" tool. */

:root {
    --color-bg: #ffffff;
    --color-text: #4c4f69;
    --color-muted: #6c6f85;
    --color-brand: #8839ef;
    --color-brand-dark: #7726d9;
    --color-border: #ccd0da;
    --color-surface: #eff1f5;
    --color-section-alt: #ece6fa;
    --color-code-bg: #e6e9ef;
    --color-alpha-bg: #fffbeb;
    --color-alpha-border: #fde68a;
    --color-alpha-text: #92400e;
    --color-alpha-link: #b45309;
    --color-brand-tint: rgba(136, 57, 239, 0.08);
    --color-brand-tint-soft: rgba(136, 57, 239, 0.04);
    --color-brand-shadow: rgba(136, 57, 239, 0.12);
    --color-check: #40a02b;
    --hero-gradient: linear-gradient(135deg, #f3edff 0%, #eef1f5 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "SF Mono", "Fira Code", "Fira Mono", Menlo, Consolas, monospace;
    --max-width: 1200px;
}

/* Catppuccin Mocha palette — matches Nib's app dark theme so the marketing
   site and the product share one visual language. Mauve is the brand accent. */
html.theme-dark {
    --color-bg: #1e1e2e;
    --color-text: #cdd6f4;
    --color-muted: #a6adc8;
    --color-brand: #cba6f7;
    --color-brand-dark: #b4befe;
    --color-border: #45475a;
    --color-surface: #181825;
    --color-section-alt: #181825;
    --color-code-bg: #313244;
    --color-alpha-bg: rgba(249, 226, 175, 0.08);
    --color-alpha-border: rgba(249, 226, 175, 0.28);
    --color-alpha-text: #f9e2af;
    --color-alpha-link: #fab387;
    --color-brand-tint: rgba(203, 166, 247, 0.14);
    --color-brand-tint-soft: rgba(203, 166, 247, 0.06);
    --color-brand-shadow: rgba(0, 0, 0, 0.35);
    --color-check: #a6e3a1;
    --hero-gradient: linear-gradient(135deg, #232336 0%, #2a2440 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45);
}

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

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Screen-reader-only utility for captions, labels that shouldn't render visually. */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip-to-content link, revealed when keyboard-focused. */
.skip-link {
    position: absolute;
    top: -48px;
    left: 8px;
    padding: 8px 16px;
    background: var(--color-brand);
    color: #fff;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    z-index: 1000;
    transition: top 0.15s;
}
.skip-link:focus {
    top: 8px;
    outline: 2px solid var(--color-bg);
    outline-offset: 2px;
}

/* Global focus-visible fallback. Individual components (theme toggle, copy button)
   can override with their own styling. */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--color-brand);
    outline-offset: 2px;
    border-radius: 4px;
}

/* --- Header --- */

.site-header {
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 32px;
}

.site-header__logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.site-header__logo-img--dark { display: none; }
html.theme-dark .site-header__logo-img--dark { display: inline-block; }
html.theme-dark .site-header__logo-img--light { display: none; }

.site-header__theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    margin-left: auto;
    color: var(--color-muted);
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.site-header__theme-toggle:hover {
    color: var(--color-text);
    border-color: var(--color-muted);
    background: var(--color-surface);
}
.site-header__theme-toggle:focus-visible {
    outline: 2px solid var(--color-brand);
    outline-offset: 2px;
}
.site-header__theme-icon {
    width: 16px;
    height: 16px;
}
/* Show the icon that represents the action the button will perform:
   sun = "click to go light" (currently dark); moon = "click to go dark"
   (currently light). */
.site-header__theme-icon--sun { display: none; }
.site-header__theme-icon--moon { display: inline-block; }
html.theme-dark .site-header__theme-icon--sun { display: inline-block; }
html.theme-dark .site-header__theme-icon--moon { display: none; }

.site-header__logo { gap: 9px; }
.site-header__logo-img {
    height: 30px;
}
/* Nib uses one colored emblem (works on both themes) + a text wordmark. */
.site-header__wordmark {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--color-text);
}

/* Mobile hamburger — hidden on desktop, revealed below 768px. Mirrors the
   theme-toggle sizing for visual parity in the header. */
.site-header__menu {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    margin-left: 4px;
    color: var(--color-muted);
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.site-header__menu:hover {
    color: var(--color-text);
    border-color: var(--color-muted);
    background: var(--color-surface);
}
.site-header__menu-icon { width: 18px; height: 18px; }
.site-header__menu-icon--close { display: none; }
.site-header__menu[aria-expanded="true"] .site-header__menu-icon--open { display: none; }
.site-header__menu[aria-expanded="true"] .site-header__menu-icon--close { display: inline-block; }

.site-nav { display: flex; gap: 4px; }

.site-nav__link {
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-muted);
    transition: color 0.15s, background 0.15s;
}

.site-nav__link:hover { color: var(--color-text); background: var(--color-surface); }
.site-nav__link--active { color: var(--color-brand); background: var(--color-brand-tint); }

/* Language switcher — native select of endonyms with a custom caret. */
.lang-switcher {
    margin-left: 8px;
    padding: 6px 28px 6px 10px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background-color: var(--color-surface);
    color: var(--color-text);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888888' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    transition: border-color 0.15s;
}
.lang-switcher:hover { border-color: var(--color-brand); }
.lang-switcher:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 1px; }

/* --- Alpha banner --- */

.alpha-banner {
    background: var(--color-alpha-bg);
    border-bottom: 1px solid var(--color-alpha-border);
    padding: 10px 24px;
    text-align: center;
    font-size: 14px;
    color: var(--color-alpha-text);
}

.alpha-banner a { color: var(--color-alpha-link); font-weight: 700; text-decoration: underline; }
.alpha-banner a:hover { text-decoration: none; }

.alpha-banner__badge {
    display: inline-block;
    margin-right: 8px;
    padding: 1px 9px;
    border: 1px solid var(--color-alpha-link);
    border-radius: 999px;
    color: var(--color-alpha-link);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* --- Hero --- */

.hero {
    background: var(--hero-gradient);
    padding: 80px 24px;
    text-align: center;
}

.hero__inner { max-width: 720px; margin: 0 auto; }
.hero__eyebrow { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: var(--color-brand); margin-bottom: 16px; }
.hero__title { font-size: 40px; font-weight: 800; line-height: 1.15; letter-spacing: -1px; margin-bottom: 10px; }
.hero__tagline { font-size: 27px; font-weight: 400; line-height: 1.3; letter-spacing: -0.4px; color: var(--color-text); opacity: 0.85; margin-bottom: 22px; }
.hero__alt { font-size: 22px; font-weight: 600; line-height: 1.3; color: var(--color-brand); margin-bottom: 16px; }
.hero__subtitle { font-size: 18px; color: var(--color-muted); line-height: 1.6; margin-bottom: 32px; }

.hero__actions { display: flex; gap: 12px; justify-content: center; }

.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s;
}

.btn--primary { background: var(--color-brand); color: #fff; }
.btn--primary:hover { background: var(--color-brand-dark); }
.btn--secondary { background: var(--color-bg); color: var(--color-text); border: 1px solid var(--color-border); }
.btn--secondary:hover { background: var(--color-surface); }

/* --- Features grid --- */

.features { padding: 64px 24px; max-width: var(--max-width); margin: 0 auto; }

.features__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    padding: 24px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-bg);
}

.feature-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--color-muted); line-height: 1.5; }
.feature-card code { font-family: var(--font-mono); font-size: 13px; background: var(--color-code-bg); padding: 1px 5px; border-radius: 4px; }

/* --- Quickstart --- */

.quickstart { padding: 48px 24px; background: var(--color-section-alt); text-align: center; }
.quickstart__inner { max-width: 600px; margin: 0 auto; }
.quickstart__inner h2 { margin-bottom: 16px; font-size: 24px; }
.quickstart__inner p { color: var(--color-muted); font-size: 14px; margin-top: 12px; }

.code-block {
    position: relative;
    background: #1e1e2e;
    color: #cdd6f4;
    border-radius: 8px;
    padding: 16px 72px 16px 20px;
    font-family: var(--font-mono);
    font-size: 15px;
    text-align: left;
    overflow-x: auto;
}

.code-block__copy {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 10px;
    font-size: 12px;
    font-family: var(--font-sans);
    font-weight: 500;
    color: #a6adc8;
    background: rgba(205, 214, 244, 0.08);
    border: 1px solid rgba(205, 214, 244, 0.15);
    border-radius: 4px;
    cursor: pointer;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.code-block__copy:hover {
    color: #cdd6f4;
    background: rgba(205, 214, 244, 0.14);
    border-color: rgba(205, 214, 244, 0.28);
}
.code-block__copy:focus-visible {
    outline: 2px solid #89b4fa;
    outline-offset: 2px;
}
.code-block__copy--copied {
    color: #a6e3a1;
    border-color: rgba(166, 227, 161, 0.4);
}

/* --- Hero note --- */

.hero__note { font-size: 13px; color: var(--color-muted); margin-top: 12px; }

/* --- Comparison table --- */

.comparison { padding: 64px 24px; background: var(--color-section-alt); }
.comparison__inner { max-width: var(--max-width); margin: 0 auto; }
.comparison__inner h2 { text-align: center; margin-bottom: 24px; font-size: 28px; }
.comparison__table-wrapper { overflow-x: auto; }

.comparison__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.comparison__table th {
    padding: 10px 16px;
    text-align: center;
    font-weight: 600;
    border-bottom: 2px solid var(--color-border);
}

.comparison__table td {
    padding: 8px 16px;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
}

.comparison__label { text-align: left !important; font-weight: 500; }

/* Row-header cells (th scope="row") inside the body normalize to td spacing and
   border so the left column lines up with the rest of the row. */
.comparison__table tbody th[scope="row"] {
    padding: 8px 16px;
    border-bottom: 1px solid var(--color-border);
}

.comparison__baseline { font-size: 13px; color: var(--color-muted); text-align: center; margin-bottom: 20px; line-height: 1.5; }
.comparison__baseline a { color: var(--color-brand); text-decoration: underline; }
.comparison__baseline a:hover { text-decoration: none; }
.comparison__footnote { font-size: 12px; color: var(--color-muted); margin-top: 12px; text-align: center; }
.comparison__footnote a { color: var(--color-brand); text-decoration: underline; }
.comparison__footnote a:hover { text-decoration: none; }

.comparison__highlight {
    background: var(--color-brand-tint-soft);
}

th.comparison__highlight {
    color: var(--color-brand);
    font-size: 16px;
}

/* --- Advantages --- */

.advantages { padding: 64px 24px; max-width: var(--max-width); margin: 0 auto; }

.advantages__inner {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.advantage { text-align: center; }
.advantage__icon { font-size: 32px; margin-bottom: 8px; }
.advantage h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }

.advantage__stat {
    font-size: 22px;
    font-weight: 800;
    color: var(--color-brand);
    margin-bottom: 8px;
}

.advantage p:last-child { font-size: 14px; color: var(--color-muted); line-height: 1.5; }

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

/* --- Quickstart extras --- */

.quickstart__platforms { font-size: 13px; color: var(--color-muted); margin-top: 8px; }
.quickstart__platforms code { font-family: var(--font-mono); font-size: 12px; background: var(--color-code-bg); padding: 2px 5px; border-radius: 3px; }

/* --- Resilience --- */

.resilience { padding: 48px 24px; background: var(--color-section-alt); text-align: center; }
.resilience__inner { max-width: 640px; margin: 0 auto; }
.resilience__inner h2 { font-size: 24px; margin-bottom: 12px; }
.resilience__inner p { font-size: 15px; color: var(--color-muted); line-height: 1.6; }

/* --- CTA --- */

.cta { padding: 64px 24px; text-align: center; }
.cta__inner { max-width: 500px; margin: 0 auto; }
.cta__inner h2 { font-size: 28px; margin-bottom: 8px; }
.cta__inner p { font-size: 16px; color: var(--color-muted); margin-bottom: 20px; }

/* --- Platforms --- */

.platforms { padding: 48px 24px; max-width: 900px; margin: 0 auto; }
.platforms__desc { text-align: center; color: var(--color-muted); font-size: 15px; margin-bottom: 24px; }
.platforms__desc code { font-family: var(--font-mono); font-size: 13px; background: var(--color-code-bg); padding: 2px 5px; border-radius: 3px; }
.platforms__inner h2 { text-align: center; margin-bottom: 24px; font-size: 24px; }

.platforms__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.platforms__table th {
    text-align: left;
    padding: 8px 12px;
    border-bottom: 2px solid var(--color-border);
    font-weight: 600;
}

.platforms__table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--color-border);
}

/* Row-header cells normalize to the td border thickness so the row line stays
   straight across the first column. */
.platforms__table tbody th[scope="row"] {
    border-bottom: 1px solid var(--color-border);
}

/* --- Page hero --- */

.page-hero { background: var(--hero-gradient); padding: 48px 24px; text-align: center; }
.page-hero__inner { max-width: 640px; margin: 0 auto; }
.page-hero h1 { font-size: 32px; font-weight: 800; margin-bottom: 8px; }
.page-hero p { font-size: 16px; color: var(--color-muted); }

/* --- Differentiators --- */

.diff-section { padding: 48px 24px; border-top: 1px solid var(--color-border); }
.diff-section--alt { background: var(--color-section-alt); }
.diff-section__inner { max-width: var(--max-width); margin: 0 auto; }
.diff-section__title { font-size: 24px; font-weight: 800; margin-bottom: 24px; text-align: center; }
.diff-section__title::after {
    content: "";
    display: block;
    width: 48px;
    height: 3px;
    margin: 12px auto 0;
    background: var(--color-brand);
    border-radius: 2px;
}

.diff-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: var(--max-width);
    margin: 0 auto;
}

/* When the download grid is narrowed to the visitor's own OS card plus the
   "All platforms" card, show just those two centered, rather than leaving a
   gap in a three-column track. Collapses to one column with .diff-grid on
   mobile (the responsive rule below comes later in source). */
.diff-grid--duo {
    grid-template-columns: repeat(2, minmax(0, 320px));
    justify-content: center;
}

.diff-card {
    padding: 20px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-bg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.15s;
}
.diff-card:hover { box-shadow: var(--shadow-md); }

.diff-card h4 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.diff-card p { font-size: 13px; color: var(--color-muted); line-height: 1.5; }
.diff-card p a,
.advantage p a { text-decoration: underline; }
.diff-card p a:hover,
.advantage p a:hover { text-decoration: none; }
.diff-card code { font-family: var(--font-mono); font-size: 12px; background: var(--color-code-bg); padding: 1px 4px; border-radius: 3px; }

/* --- Migration --- */

.migration-compare { padding: 48px 24px; background: var(--color-section-alt); }
.migration-compare__inner { max-width: var(--max-width); margin: 0 auto; }
.migration-compare__inner h2 { text-align: center; font-size: 24px; margin-bottom: 24px; }

.migration-guides { padding: 48px 24px; }
.migration-guides__inner { max-width: var(--max-width); margin: 0 auto; }
.migration-guides__inner h2 { text-align: center; font-size: 24px; margin-bottom: 24px; }

.migration-guides__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.migration-card {
    display: block;
    padding: 24px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.migration-card:hover {
    border-color: var(--color-brand);
    box-shadow: 0 2px 8px var(--color-brand-shadow);
}

.migration-card h3 { font-size: 16px; font-weight: 700; color: var(--color-text); margin-bottom: 6px; }
.migration-card p { font-size: 13px; color: var(--color-muted); line-height: 1.5; }

/* --- Page content --- */

.page-content { max-width: 800px; margin: 0 auto; padding: 48px 24px; }

/* --- Blog --- */

.blog-list { padding: 48px 24px; }
.blog-list__inner { max-width: 800px; margin: 0 auto; }
.blog-list__items { list-style: none; padding: 0; margin: 0; }
.blog-list__item {
    padding: 28px 0;
    border-bottom: 1px solid var(--color-border);
}
.blog-list__item:first-child { padding-top: 0; }
.blog-list__item:last-child { border-bottom: none; }
.blog-list__title { font-size: 24px; font-weight: 700; line-height: 1.25; margin-bottom: 6px; letter-spacing: -0.3px; }
.blog-list__title a { color: var(--color-text); text-decoration: none; }
.blog-list__title a:hover { color: var(--color-brand); }
.blog-list__meta { font-size: 14px; color: var(--color-muted); margin-bottom: 10px; }
.blog-list__excerpt { font-size: 16px; line-height: 1.6; margin-bottom: 8px; }
.blog-list__more { color: var(--color-brand); text-decoration: none; font-size: 14px; font-weight: 600; }
.blog-list__more:hover { text-decoration: underline; }

.blog-post { max-width: 760px; margin: 0 auto; padding: 48px 24px; }
.blog-post__header { margin-bottom: 32px; }
.blog-post__crumbs { font-size: 14px; margin-bottom: 8px; }
.blog-post__crumbs a { color: var(--color-brand); text-decoration: none; }
.blog-post__crumbs a:hover { text-decoration: underline; }
.blog-post__title { font-size: 36px; font-weight: 800; line-height: 1.15; letter-spacing: -1px; margin-bottom: 8px; }
.blog-post__meta { font-size: 14px; color: var(--color-muted); }
.blog-post__hero { margin: 0 0 32px; }
.blog-post__hero img { width: 100%; height: auto; border-radius: 8px; box-shadow: var(--shadow-md); display: block; }
.blog-post__body { font-size: 17px; line-height: 1.75; }
.blog-post__body p { margin-bottom: 16px; }
.blog-post__body img { max-width: 100%; height: auto; border-radius: 6px; margin: 16px 0; box-shadow: var(--shadow-sm); }
.blog-post__footer { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--color-border); font-size: 14px; }
.blog-post__footer a { color: var(--color-brand); text-decoration: none; }
.blog-post__footer a:hover { text-decoration: underline; }

@media (max-width: 720px) {
    .blog-post__title { font-size: 28px; }
    .blog-post__body { font-size: 16px; }
}

/* Auth-gated /blog/all editorial overview */

.blog-all { padding: 32px 24px 48px; }
.blog-all__inner { max-width: 960px; margin: 0 auto; }
.blog-all__table { width: 100%; border-collapse: collapse; font-size: 15px; }
.blog-all__table th {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid var(--color-border);
    font-weight: 600;
    background: var(--color-surface);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.blog-all__table td {
    padding: 12px;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}
.blog-all__table a { color: var(--color-brand); text-decoration: none; font-weight: 600; }
.blog-all__table a:hover { text-decoration: underline; }
.blog-all__col-date { width: 110px; }
.blog-all__col-status { width: 110px; }
.blog-all__col-author { width: 140px; }
.blog-all__cell-date { font-variant-numeric: tabular-nums; color: var(--color-text); }
.blog-all__cell-author { color: var(--color-text); }
.blog-all__pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.blog-all__pill--published {
    color: var(--color-check);
    border: 1px solid var(--color-check);
}
.blog-all__pill--queued {
    color: var(--color-alpha-text);
    border: 1px solid var(--color-alpha-border);
}
.blog-all__pill--draft {
    color: var(--color-muted);
    border: 1px solid var(--color-border);
}
.blog-all__note {
    margin-top: 24px;
    padding: 16px;
    background: var(--color-surface);
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
}
.blog-all__note a { color: var(--color-brand); text-decoration: none; font-weight: 600; }
.blog-all__note a:hover { text-decoration: underline; }

/* --- Pricing cards --- */

.pricing { padding: 48px 24px; }
.pricing__inner { max-width: var(--max-width); margin: 0 auto; }

.pricing__cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.pricing__card {
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    position: relative;
    background: var(--color-bg);
}

.pricing__card--free { background: var(--color-surface); }

.pricing__card--popular {
    border-color: var(--color-brand);
    box-shadow: 0 0 0 1px var(--color-brand);
}

.pricing__badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-brand);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 12px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pricing__card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.pricing__price { font-size: 28px; font-weight: 800; color: var(--color-brand); }
.pricing__price span { font-size: 13px; font-weight: 400; color: var(--color-muted); }
.pricing__nodes { font-size: 13px; color: var(--color-muted); margin-bottom: 16px; }

.pricing__features {
    list-style: none;
    text-align: left;
    font-size: 13px;
    margin-bottom: 16px;
}

.pricing__features li {
    padding: 4px 0;
    padding-left: 20px;
    position: relative;
}

.pricing__features li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--color-check);
    font-weight: 700;
}

/* --- Support detail --- */

.support-detail { padding: 48px 24px; background: var(--color-section-alt); }
.support-detail__inner { max-width: 800px; margin: 0 auto; }
.support-detail__inner h2 { text-align: center; font-size: 24px; margin-bottom: 4px; }
.support-detail__subtitle { text-align: center; color: var(--color-muted); font-size: 15px; margin-bottom: 24px; }

.support-detail__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.support-detail__table th {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid var(--color-border);
    font-weight: 600;
}

.support-detail__table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--color-border);
}

.support-detail__note {
    margin-top: 16px;
    font-size: 13px;
    color: var(--color-muted);
    text-align: center;
}

/* --- Loyalty --- */

.loyalty { padding: 48px 24px; }
.loyalty__inner { max-width: 500px; margin: 0 auto; }
.loyalty__inner h2 { text-align: center; font-size: 24px; margin-bottom: 4px; }
.loyalty__subtitle { text-align: center; color: var(--color-muted); font-size: 15px; margin-bottom: 24px; }

.loyalty__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.loyalty__table th {
    text-align: left;
    padding: 8px 12px;
    border-bottom: 2px solid var(--color-border);
    font-weight: 600;
}

.loyalty__table td {
    padding: 6px 12px;
    border-bottom: 1px solid var(--color-border);
}

/* --- Pricing FAQ --- */

.pricing-faq { padding: 48px 24px; background: var(--color-section-alt); }
.pricing-faq__inner { max-width: var(--max-width); margin: 0 auto; }
.pricing-faq__inner h2 { text-align: center; font-size: 24px; margin-bottom: 24px; }

.pricing-faq__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.pricing-faq__item h4 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.pricing-faq__item p { font-size: 14px; color: var(--color-muted); line-height: 1.5; }

/* --- Markdown body --- */

.markdown-body h1 { font-size: 32px; font-weight: 800; margin-bottom: 16px; letter-spacing: -0.5px; }
.markdown-body h2 { font-size: 24px; font-weight: 700; margin: 32px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--color-border); }
.markdown-body h3 { font-size: 18px; font-weight: 600; margin: 24px 0 8px; }
.markdown-body h4 { font-size: 15px; font-weight: 600; margin: 20px 0 6px; }
.markdown-body p { margin-bottom: 12px; }
.markdown-body ul, .markdown-body ol { margin: 0 0 12px 24px; }
.markdown-body li { margin-bottom: 4px; }
.markdown-body a { color: var(--color-brand); text-decoration: underline; }
.markdown-body a:hover { text-decoration: none; }

.markdown-body code {
    font-family: var(--font-mono);
    font-size: 13px;
    background: var(--color-code-bg);
    padding: 2px 6px;
    border-radius: 4px;
}

.markdown-body pre {
    background: #1e1e2e;
    color: #cdd6f4;
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    margin: 12px 0;
    font-size: 13px;
    line-height: 1.5;
}

.markdown-body pre code { background: none; padding: 0; color: inherit; }

.markdown-body table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.markdown-body th { text-align: left; padding: 8px 12px; border-bottom: 2px solid var(--color-border); font-weight: 600; background: var(--color-surface); }
.markdown-body td { padding: 8px 12px; border-bottom: 1px solid var(--color-border); }
.markdown-body blockquote { border-left: 3px solid var(--color-brand); padding-left: 16px; color: var(--color-muted); margin: 12px 0; }
.markdown-body img { max-width: 100%; }

/* --- Footer --- */

.site-footer {
    border-top: 1px solid var(--color-border);
    padding: 24px;
    text-align: center;
    font-size: 13px;
    color: var(--color-muted);
}

.site-footer a { color: var(--color-brand); text-decoration: none; }

.site-footnote {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 12px 24px 24px;
    font-size: 12px;
    color: var(--color-muted);
}

.site-footnote a { color: var(--color-brand); text-decoration: none; }
.site-footnote a:hover { text-decoration: underline; }

/* --- Screenshots & diagrams --- */

.screenshot {
    max-width: 100%;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
}

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.screenshot-grid__item {
    text-align: center;
    margin: 0;
}

.screenshot-grid__item img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    cursor: zoom-in;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.screenshot-grid__item img:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Theme-aware screenshot swap — same approach as the header logo: show the
   screenshot whose app chrome matches the active site theme. Dark is default. */
.screenshot-grid__item img.shot--dark { display: none; }
html.theme-dark .screenshot-grid__item img.shot--dark { display: inline-block; }
html.theme-dark .screenshot-grid__item img.shot--light { display: none; }

.screenshot-grid__label {
    font-size: 13px;
    color: var(--color-muted);
    margin-top: 8px;
}

.diagram-section {
    padding: 48px 24px;
    text-align: center;
}

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

.diagram-section__inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.diagram-section__inner h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 24px;
}

.diagram-section__inner img,
.diagram-section__inner svg {
    max-width: 100%;
}

/* Nib: a centered section title with the brand underline flourish, plus a lead
   intro paragraph and centered, readable-width code blocks. */
.diagram-section__title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.4px;
    text-align: center;
    margin-bottom: 12px;
}
.diagram-section__title::after {
    content: "";
    display: block;
    width: 48px;
    height: 3px;
    margin: 14px auto 0;
    background: var(--color-brand);
    border-radius: 2px;
}
.diagram-section__intro {
    max-width: 720px;
    margin: 0 auto 28px;
    text-align: center;
    color: var(--color-muted);
    font-size: 16px;
    line-height: 1.6;
}
.diagram-section__intro code {
    font-family: var(--font-mono);
    font-size: 14px;
    background: var(--color-code-bg);
    padding: 1px 5px;
    border-radius: 4px;
    color: var(--color-text);
}
.code-block { max-width: 760px; margin: 16px auto; }

/* --- Stats --- */

.stats-summary { padding: 32px 24px; }
.stats-summary__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stats-card {
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    background: var(--color-bg);
}

.stats-card__value {
    font-size: 32px;
    font-weight: 800;
    color: var(--color-brand);
    line-height: 1.2;
}

.stats-card__label {
    font-size: 13px;
    color: var(--color-muted);
    margin-top: 4px;
}

.stats-period { padding: 0 24px 24px; text-align: center; }
.stats-period__inner { max-width: var(--max-width); margin: 0 auto; display: flex; gap: 8px; justify-content: center; }

.btn--sm {
    padding: 6px 16px;
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.15s;
}

.btn--sm:hover { background: var(--color-surface); }
.btn--active { background: var(--color-brand); color: #fff; border-color: var(--color-brand); }
.btn--active:hover { background: var(--color-brand-dark); }

.stats-section { padding: 32px 24px; }
.stats-section--alt { background: var(--color-section-alt); }
.stats-section__inner { max-width: var(--max-width); margin: 0 auto; }
.stats-section__inner h2 { font-size: 20px; font-weight: 700; margin-bottom: 16px; }

.stats-chart { margin-bottom: 24px; }

.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.stats-table th {
    text-align: left;
    padding: 8px 12px;
    border-bottom: 2px solid var(--color-border);
    font-weight: 600;
    font-size: 13px;
    color: var(--color-muted);
}

.stats-table td {
    padding: 6px 12px;
    border-bottom: 1px solid var(--color-border);
}

.stats-table code {
    font-family: var(--font-mono);
    font-size: 13px;
    background: var(--color-code-bg);
    padding: 2px 6px;
    border-radius: 4px;
}

.stats-empty { color: var(--color-muted); font-size: 14px; }

.stats-footer { padding: 24px; text-align: center; }
.stats-footer__inner { max-width: var(--max-width); margin: 0 auto; }
.stats-footer__inner p { font-size: 12px; color: var(--color-muted); }

/* --- Terminal code comparison --- */

.code-compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-width: 1100px;
    margin: 0 auto;
}

.code-terminal {
    border-radius: 10px;
    background: #1e1e2e;
    border: 1px solid #313244;
    text-align: left;
    display: flex;
    flex-direction: column;
    font-family: var(--font-mono);
}

.code-terminal__header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: #313244;
    border-radius: 10px 10px 0 0;
}

.code-terminal--vigo .code-terminal__header { background: #1e3a2a; }

.code-terminal__dot { width: 10px; height: 10px; border-radius: 50%; }

.code-terminal__title {
    margin-left: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #cdd6f4;
}

.code-terminal__file {
    padding: 5px 16px;
    font-size: 11px;
    color: #f38ba8;
    background: #181825;
    border-top: 1px solid #313244;
}

.code-terminal--vigo .code-terminal__file { color: #a6e3a1; }

.code-terminal__body {
    margin: 0;
    padding: 12px 16px;
    font-size: 12.5px;
    line-height: 1.5;
    color: #cdd6f4;
    flex: 1 0 auto;
}

.code-terminal__footer {
    padding: 8px 16px;
    font-size: 11px;
    color: #6c7086;
    background: #181825;
    border-top: 1px solid #313244;
    text-align: center;
    border-radius: 0 0 10px 10px;
}

.s-kw { color: #cba6f7; }
.s-ty { color: #89dceb; }
.s-st { color: #a6e3a1; }
.s-vl { color: #fab387; }
.s-fn { color: #89b4fa; }
.s-rs { color: #f9e2af; }
.s-cm { color: #6c7086; }
.s-vr { color: #f38ba8; }

/* --- Lightbox --- */

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.lightbox--open { display: flex; }

.lightbox__img {
    max-width: 92vw;
    max-height: 92vh;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* --- Responsive --- */

/* Intermediate widths (tablets, small laptops): drop 3-column grids to 2-column
   so cards don't crowd. Narrower viewports collapse further below. */
@media (min-width: 769px) and (max-width: 1023px) {
    .features__grid,
    .diff-grid,
    .migration-guides__grid,
    .pricing__cards { grid-template-columns: repeat(2, 1fr); }
    /* Wide app screenshots read better stacked large than crammed 3-up on tablets. */
    .screenshot-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    /* Hamburger visible, nav collapses into a dropdown below the header. */
    .site-header__menu { display: inline-flex; }
    .site-nav {
        display: none;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        padding: 8px 16px 12px;
        background: var(--color-bg);
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-sm);
    }
    .site-nav--open { display: flex; }
    .site-nav__link { padding: 10px 12px; font-size: 15px; }

    .features__grid { grid-template-columns: 1fr; }
    .advantages__inner { grid-template-columns: 1fr; }
    .hero__eyebrow { font-size: 12px; letter-spacing: 1.5px; }
    .hero__title { font-size: 28px; }
    .hero__tagline { font-size: 19px; }
    .hero__alt { font-size: 18px; }
    .hero__subtitle { font-size: 16px; }
    .advantage__stat { font-size: 18px; }

    .comparison__table { font-size: 12px; }
    .comparison__table th, .comparison__table td { padding: 6px 8px; }
    .pricing__cards { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
    .pricing-faq__grid { grid-template-columns: 1fr; }
    .diff-grid { grid-template-columns: 1fr; }
    .migration-guides__grid { grid-template-columns: 1fr; }
    .stats-summary__inner { grid-template-columns: repeat(2, 1fr); }
    .screenshot-grid { grid-template-columns: 1fr; }
    .code-compare-grid { grid-template-columns: 1fr; }
}
