/*
 * Shared stylesheet for every page except the home page (which uses Tailwind, index.css).
 * Same dark zinc/rose colors and DM Sans as the home page. Edit here, not in the pages.
 */

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

:root {
    color-scheme: dark;
    /* The home page's colors: Tailwind zinc and rose */
    --bg: #09090b;
    --bg-card: #111113;
    --bg-warm: #18181b;
    --border: #27272a;
    --border-light: #1f1f23;
    --text: #f4f4f5;
    --text-body: #d4d4d8;
    --text-muted: #a1a1aa;
    /* Rose 600 behind white text (buttons). Small rose text uses the lighter rose 400, which reads on dark */
    --accent: #e11d48;
    --accent-hover: #f43f5e;
    --accent-text: #fb7185;
    --accent-bg: rgba(244, 63, 94, 0.1);
    --accent-border: rgba(244, 63, 94, 0.3);
    --green: #4ade80;
    --green-bg: rgba(74, 222, 128, 0.08);
    --amber: #fbbf24;
    --amber-bg: rgba(251, 191, 36, 0.08);
    --amber-border: rgba(251, 191, 36, 0.28);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    line-height: 1.75;
    font-size: 16px;
}

::selection {
    background: var(--accent);
    color: white;
}

.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(9, 9, 11, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    color: var(--text);
    letter-spacing: -0.025em;
}

.nav-logo span {
    color: var(--accent-hover);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text);
}

.nav-cta {
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    background: var(--accent);
    color: white;
    text-decoration: none;
    transition: background-color 0.2s;
}

.nav-cta:hover {
    background: var(--accent-hover);
}

.article {
    max-width: 720px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.breadcrumb {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--accent-text);
}

.kicker {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-text);
    margin-bottom: 16px;
}

h1 {
    font-size: clamp(34px, 5.5vw, 50px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
    color: var(--text);
}

.lead {
    font-size: 19px;
    color: var(--text-body);
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 560px;
}

.cta-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: white;
    background: var(--accent);
    padding: 14px 28px;
    border-radius: 12px;
    text-decoration: none;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-primary svg {
    width: 16px;
    height: 16px;
}

.btn-ghost {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-body);
    text-decoration: none;
    padding: 14px 8px;
}

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

.meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 48px;
}

h2 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 56px 0 16px;
    color: var(--text);
}

p {
    color: var(--text-body);
    margin-bottom: 20px;
}

strong {
    color: var(--text);
    font-weight: 700;
}

a.inline {
    color: var(--accent-text);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

a.inline:hover {
    text-decoration-thickness: 2px;
}

.steps {
    margin: 24px 0 32px;
}

.step {
    display: flex;
    gap: 20px;
    padding: 24px 0;
    border-bottom: 1px solid var(--border-light);
}

.step:last-child {
    border-bottom: none;
}

.step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    flex-shrink: 0;
    background: var(--accent-bg);
    color: var(--accent-text);
    border: 1px solid var(--accent-border);
}

.step-body {
    flex: 1;
}

.step-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.step-text {
    font-size: 15px;
    color: var(--text-body);
    margin: 0;
    line-height: 1.65;
}

code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    background: var(--bg-warm);
    border: 1px solid var(--border);
    padding: 2px 7px;
    border-radius: 5px;
    color: var(--text);
}

.callout {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: var(--amber-bg);
    border: 1px solid var(--amber-border);
    border-radius: 12px;
    padding: 16px 20px;
    margin: 24px 0;
    font-size: 14px;
    color: #fcd34d;
    line-height: 1.6;
}

.callout-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.callout-green {
    background: var(--green-bg);
    border-color: rgba(74, 222, 128, 0.3);
    color: #86efac;
}

.compare {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0 32px;
    font-size: 15px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.compare th {
    text-align: left;
    padding: 14px 20px;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    background: var(--bg-warm);
    border-bottom: 1px solid var(--border);
}

.compare td {
    padding: 12px 20px;
    color: var(--text-body);
    border-bottom: 1px solid var(--border-light);
}

.compare tr:last-child td {
    border-bottom: none;
}

.compare .y {
    color: var(--green);
    font-weight: 700;
}

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

.compare .feat {
    color: var(--text);
    font-weight: 500;
}

.faq {
    margin: 24px 0;
}

.faq-item {
    border-bottom: 1px solid var(--border-light);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-q {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    text-align: left;
    gap: 16px;
}

.faq-q:hover {
    color: var(--accent-text);
}

.faq-q svg {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.faq-item.open .faq-q svg {
    transform: rotate(180deg);
}

.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.open .faq-a {
    max-height: 300px;
}

.faq-a-inner {
    padding: 0 0 20px;
    font-size: 15px;
    color: var(--text-body);
    line-height: 1.7;
}

.bottom-cta {
    text-align: center;
    margin-top: 64px;
    padding: 56px 24px;
    background: var(--bg-warm);
    border-radius: 20px;
    border: 1px solid var(--border);
}

.bottom-cta h2 {
    margin-top: 0;
}

.bottom-cta p {
    max-width: 420px;
    margin: 0 auto 24px;
}

.footer {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px 24px;
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.footer a:hover {
    color: var(--text-body);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.related-guides {
    margin: 56px 0 0;
    padding: 40px 0;
    border-top: 1px solid var(--border);
}

.related-guides h2 {
    font-size: 24px;
    margin: 0 0 8px;
}

.related-guides .subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.related-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.related-card {
    display: block;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.related-card:hover {
    border-color: var(--accent-border);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.related-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.related-card-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 640px) {
    .related-grid {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 640px) {
    .cta-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-ghost {
        padding: 8px 0;
    }

    .nav-links {
        display: none;
    }

    .footer {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

h3 {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 32px 0 10px;
    color: var(--text);
}

.article ul,
.article ol {
    margin: 0 0 20px 22px;
}

.article li {
    color: var(--text-body);
    margin-bottom: 8px;
}

.figure {
    margin: 28px 0 36px;
}

.figure img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
    border: 1px solid var(--border);
}

.figure figcaption {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 10px;
    text-align: center;
}

.table-wrap {
    overflow-x: auto;
    margin: 24px 0 32px;
}

.table-wrap .compare {
    margin: 0;
    min-width: 640px;
    font-size: 14px;
}

.table-wrap .compare th,
.table-wrap .compare td {
    padding: 12px 14px;
}

.compare td small {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

.note {
    font-size: 14px;
    color: var(--text-muted);
}

.related-all {
    margin: 20px 0 0;
    font-size: 14px;
}

.guide-group {
    margin-top: 40px;
}

.guide-group h2 {
    font-size: 26px;
    margin: 0 0 16px;
}

pre {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    background: var(--bg-warm);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    margin: 0 0 20px;
    overflow-x: auto;
    color: var(--text);
    line-height: 1.6;
}

pre code {
    background: none;
    border: none;
    padding: 0;
}

/* ── Only some pages use these ── */

.article img {
    height: auto;
}

/* Feature pills (blog, Mac, Windows, designers) */
.pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 28px 0 32px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-body);
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 10px 18px;
    border-radius: 100px;
}

.pill-icon {
    font-size: 16px;
}

/* Board link example and OS tabs (blog) */
.url-example {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-muted);
    background: var(--bg-warm);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    margin: 12px 0 0;
}

.url-example .hl {
    color: var(--accent-text);
    font-weight: 700;
}

.os-tabs {
    display: flex;
    gap: 8px;
    margin: 16px 0 20px;
}

.os-tab {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 8px 20px;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.2s;
}

.os-tab:hover {
    color: var(--text-body);
}

.os-tab.active {
    background: var(--accent-bg);
    border-color: var(--accent-border);
    color: var(--accent-text);
}

.os-content {
    display: none;
}

.os-content.active {
    display: block;
}

@media (max-width: 640px) {
    .pills {
        gap: 8px;
    }

    .pill {
        font-size: 13px;
        padding: 8px 14px;
    }

    .footer-links {
        justify-content: center;
    }
}

/* ── Download page ── */

[hidden] {
    display: none !important;
}

h2[id] {
    scroll-margin-top: 80px;
}

.dl-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 8px 0 20px;
}

.dl-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 20px 22px;
    border-radius: 14px;
    border: 1.5px solid var(--border);
    background: var(--bg-card);
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.dl-card:hover {
    border-color: var(--accent-border);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
    transform: translateY(-1px);
}

.dl-card.is-yours {
    border-color: var(--accent);
    box-shadow: 0 8px 28px -12px rgba(225, 29, 72, 0.6);
}

.dl-os {
    font-size: 17px;
    font-weight: 700;
}

.dl-sub {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.dl-file {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-text);
}

.dl-file svg {
    width: 16px;
    height: 16px;
}

.dl-size {
    font-weight: 500;
    color: var(--text-muted);
}

.dl-badge {
    display: none;
    position: absolute;
    top: -11px;
    right: 16px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--accent);
    color: white;
    padding: 3px 10px;
    border-radius: 100px;
}

.dl-card.is-yours .dl-badge {
    display: block;
}

.dl-help {
    font-size: 14px;
    line-height: 1.65;
    margin-bottom: 8px;
}

.phone-note {
    background: var(--accent-bg);
    border: 1px solid var(--accent-border);
    border-radius: 14px;
    padding: 20px 22px;
    margin: 0 0 24px;
}

.phone-note p {
    margin-bottom: 14px;
}

.share-done {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    color: var(--green);
    font-weight: 600;
}

.callout-strong {
    background: var(--accent-bg);
    border-color: var(--accent-border);
    color: var(--text-body);
    font-size: 15px;
}

.video-figure video {
    display: block;
    width: 100%;
    max-width: 480px;
    height: auto;
    margin: 0 auto;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--bg-warm);
}

.started {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 12px;
    width: max-content;
    max-width: calc(100% - 32px);
    padding: 14px 20px;
    border-radius: 14px;
    background: #0c1f14;
    border: 1px solid rgba(74, 222, 128, 0.35);
    color: #86efac;
    font-size: 15px;
    line-height: 1.5;
    box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.6);
}

.started strong {
    color: #86efac;
}

.started svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .dl-grid {
        grid-template-columns: 1fr;
    }
}
