/*
 * Styles for the generated guide pages (see build.mjs). The home page keeps
 * its own inline styles; the tokens below repeat its palette and type so both
 * read as one site.
 */
:root {
    --blue: #0094FF;
    --blue-deep: #0070D1;
    --ink: #0C2340;
    --ink-soft: #4A5B73;
    --paper: #FFFFFF;
    --mist: #EAF5FF;
    --grouped: #F2F4F8;
    --line: #DCE3EC;
    --spam-bg: #FDE8E8;
    --spam-fg: #B4232A;

    --display: "Funnel Display", system-ui, sans-serif;
    --text: "Funnel Sans", system-ui, sans-serif;
    --ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
    --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, ul, ol, figure, table { margin: 0; }
img, svg { display: block; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--text);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--blue-deep); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 3px;
    border-radius: 6px;
}

.wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ── Top bar ── */
.top { background: var(--blue); }
.nav {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 72px;
    flex-wrap: wrap;
    padding: 12px 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    text-decoration: none;
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}
.brand img {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.55);
}
.nav-links {
    display: flex;
    gap: 24px;
    margin-left: auto;
}
.nav-links a {
    color: var(--ink);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
}
.nav-links a:hover { text-decoration: underline; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 56px;
    padding: 0 18px 0 13px;
    background: #000;
    color: #fff;
    border: 1px solid #A6A6A6;
    border-radius: 12px;
    text-decoration: none;
    font-family: var(--ui);
}
.badge:hover { color: #fff; }
.badge svg { width: 28px; height: 28px; fill: #fff; flex: none; }
.badge-text { display: flex; flex-direction: column; line-height: 1.05; }
.badge-small { font-size: 11px; font-weight: 400; }
.badge-big { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.badge-sm { height: 40px; padding: 0 12px 0 9px; gap: 6px; border-radius: 9px; }
.badge-sm svg { width: 20px; height: 20px; }
.badge-sm .badge-small { font-size: 8.5px; }
.badge-sm .badge-big { font-size: 15px; }

/* ── Article ── */
.article {
    max-width: 760px;
    margin: 0 auto;
    padding: 40px 32px 96px;
}
.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    list-style: none;
    font-size: 0.875rem;
    color: var(--ink-soft);
}
.crumbs li + li::before { content: "›"; margin-right: 8px; }
.crumbs a { color: inherit; }

.article h1 {
    margin-top: 20px;
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(2rem, 1.4rem + 2.6vw, 3.125rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    text-wrap: balance;
}
.meta {
    margin-top: 16px;
    font-size: 0.875rem;
    color: var(--ink-soft);
}

.answer {
    margin-top: 28px;
    padding: 22px 24px;
    background: var(--mist);
    border-radius: 18px;
}
.answer-label {
    font-family: var(--display);
    font-weight: 700;
    font-size: 0.8125rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--blue-deep);
}
.answer p { margin-top: 8px; font-size: 1.125rem; line-height: 1.55; }

.article h2 {
    margin-top: 56px;
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
    line-height: 1.12;
    letter-spacing: -0.025em;
    text-wrap: balance;
}
.article h3 {
    margin-top: 28px;
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.1875rem;
    line-height: 1.25;
    letter-spacing: -0.01em;
}
.article p { margin-top: 16px; }
.article ul, .article ol { margin-top: 16px; padding-left: 1.4em; }
.article li + li { margin-top: 8px; }
.article ol.steps { list-style: none; padding: 0; counter-reset: step; }
.article ol.steps li {
    position: relative;
    padding-left: 48px;
    counter-increment: step;
}
.article ol.steps li + li { margin-top: 14px; }
.article ol.steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: -1px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--blue);
    color: var(--ink);
    font-family: var(--display);
    font-weight: 700;
    font-size: 0.9375rem;
}

code {
    padding: 2px 6px;
    background: var(--grouped);
    border-radius: 6px;
    font-family: var(--mono);
    font-size: 0.9em;
}

.note {
    margin-top: 20px;
    padding: 16px 20px;
    border-left: 4px solid var(--blue);
    background: var(--grouped);
    border-radius: 0 12px 12px 0;
}
.note.warn { border-left-color: var(--spam-fg); background: var(--spam-bg); }
.note p { margin-top: 0; }

.sms {
    margin-top: 20px;
    padding: 14px 18px;
    max-width: 440px;
    background: #E9E9EB;
    border-radius: 18px 18px 18px 4px;
    font-family: var(--ui);
    font-size: 0.9375rem;
    line-height: 1.4;
    color: #000;
}
.sms-from {
    display: block;
    margin-bottom: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6B6B70;
}

.table-scroll { margin-top: 20px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.45; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-family: var(--display); font-weight: 600; background: var(--grouped); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding: 0; list-style: none; }
.article .chips li { margin: 0; }
.chips code { display: inline-block; padding: 6px 10px; background: var(--spam-bg); color: var(--spam-fg); border-radius: 999px; }

.faq h3 { margin-top: 32px; }

.cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 56px;
    padding: 28px;
    background: var(--blue);
    border-radius: 24px;
}
.cta-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
}
.cta p { margin-top: 6px; max-width: 40ch; }

.related, .sources { margin-top: 56px; }
.related h2, .sources h2 { margin-top: 0; font-size: 1.25rem; }
.sources { font-size: 0.9375rem; color: var(--ink-soft); }
.sources li { overflow-wrap: anywhere; }

/* ── Guide index ── */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 28px;
    padding: 0;
    list-style: none;
}
.article .cards li { margin: 0; }
.cards a {
    display: block;
    height: 100%;
    padding: 20px;
    background: var(--grouped);
    border-radius: 18px;
    color: var(--ink);
    text-decoration: none;
}
.cards a:hover { background: var(--mist); }
.cards strong { display: block; font-family: var(--display); font-size: 1.125rem; line-height: 1.2; }
.cards span { display: block; margin-top: 8px; font-size: 0.9375rem; line-height: 1.45; color: var(--ink-soft); }

/* ── Footer ── */
.footer { background: var(--ink); color: #fff; }
.footer-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px 32px;
    padding: 36px 32px;
}
.footer .brand { color: #fff; font-size: 1.0625rem; }
.footer .brand img { width: 28px; height: 28px; border-radius: 7px; box-shadow: none; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-left: auto; }
.footer-links a { color: #fff; font-size: 0.9375rem; }
.copyright { width: 100%; font-size: 0.8125rem; color: #A9B6C8; }

@media (max-width: 720px) {
    .wrap, .footer-inner { padding-left: 16px; padding-right: 16px; }
    .article { padding: 28px 16px 72px; }
    .nav-links { order: 3; width: 100%; margin-left: 0; gap: 18px; overflow-x: auto; }
    .nav .badge { margin-left: auto; }
    .footer-links { margin-left: 0; }
}
