/* 2027 SEO pages (views/site-seo2027*.ejs). After the "payable" blog layout: one big
   rounded card, a narrow column, a wide rounded photo, a row of picture cards.
   Only theme tokens, so dark (red), light (blue) and the other themes all work. */
.sx-page {
    --sx-card: color-mix(in srgb, var(--text, #fff) 5%, var(--bg, #101010));
    --sx-ink: var(--text, #fff);
    --sx-soft: color-mix(in srgb, var(--text, #fff) 72%, var(--bg, #101010));
    --sx-mute: var(--muted, #a2a2a8);
    --sx-line: color-mix(in srgb, var(--text, #fff) 10%, transparent);
    --sx-accent: var(--blue, #ff3950);
    --sx-accent-rgb: var(--blue-rgb, 255, 57, 80);
    --sx-col: 660px;
    --sx-wide: 1240px;
    padding-top: 8px;
}

/* ---- the page body: open on the site background, no boxed card around it ---- */
.sx-card {
    max-width: var(--sx-wide);
    margin: 0 auto;
    padding: clamp(28px, 4vw, 48px) clamp(18px, 4vw, 48px) clamp(24px, 3vw, 40px);
}
.sx-col { max-width: var(--sx-col); margin: 0 auto; }

.sx-crumb {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    margin: 0 0 22px; font-size: 13px; color: var(--sx-mute);
}
.sx-crumb a { color: inherit; text-decoration: none; }
.sx-crumb a:hover { color: var(--sx-ink); }
.sx-crumb span[aria-hidden] { opacity: .5; }

.sx-pill {
    display: inline-flex; align-items: center;
    padding: 4px 11px; border-radius: 999px;
    font-size: 12px; font-weight: 600; line-height: 1.25;
    color: color-mix(in srgb, var(--sx-accent) 45%, var(--sx-ink));
    background: rgba(var(--sx-accent-rgb), .14);
    border: 1px solid rgba(var(--sx-accent-rgb), .22);
    white-space: nowrap;
}
.sx-pill-on {
    position: absolute; top: 12px; left: 12px; z-index: 1;
    color: #fff; background: rgba(var(--sx-accent-rgb), .88); border-color: transparent;
    backdrop-filter: blur(6px);
}

.sx-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    margin: 18px 0 0; font-size: 14px; color: var(--sx-mute);
}
.sx-meta .author-byline { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
.sx-meta .author-byline img { width: 20px; height: 20px; border-radius: 50%; }

.sx-page .sx-title {
    margin: 22px 0 0;
    font-size: clamp(32px, 4.6vw, 50px);
    line-height: 1.12;
    font-weight: 500;
    letter-spacing: -0.025em;
    color: var(--sx-ink);
    text-wrap: balance;
}

.sx-hero { margin: 30px 0 0; }
.sx-hero img {
    display: block; width: 100%; height: auto; aspect-ratio: 2.6 / 1; object-fit: cover;
    border-radius: 6px 6px 24px 24px;
    background: color-mix(in srgb, var(--sx-ink) 6%, transparent);
}

/* ---- body text ---- */
.sx-body { margin-top: clamp(32px, 4vw, 48px); color: var(--sx-soft); font-size: 16.5px; line-height: 1.75; }
.sx-lead { font-size: 18px; line-height: 1.7; color: var(--sx-ink); }
.sx-lead p { margin: 0; }
.sx-body > * + * { margin-top: 18px; }
.sx-page .sx-body h2, .sx-page .sx-faq h2, .sx-page .sx-sources h2 {
    margin: 52px 0 0; font-size: clamp(24px, 2.6vw, 30px); line-height: 1.25;
    font-weight: 500; letter-spacing: -0.015em; color: var(--sx-ink);
}
.sx-page .sx-body h3 { margin: 32px 0 0; font-size: 19px; line-height: 1.35; font-weight: 600; color: var(--sx-ink); }
.sx-body h2 + *, .sx-body h3 + * { margin-top: 12px; }
.sx-body p { margin: 0; }
.sx-body p + p { margin-top: 14px; }
.sx-body strong { color: var(--sx-ink); font-weight: 600; }
.sx-body a { color: var(--sx-accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.sx-body a:hover { text-decoration-thickness: 2px; }
.sx-body ul, .sx-body ol { margin: 0; padding-left: 1.25em; }
.sx-body li + li { margin-top: 8px; }
.sx-body li::marker { color: var(--sx-accent); }
.sx-body code {
    padding: 1px 6px; border-radius: 6px; font-size: .9em;
    background: color-mix(in srgb, var(--sx-ink) 7%, transparent); color: var(--sx-ink); font-weight: 500;
}
.sx-body pre {
    margin: 0; padding: 16px 18px; border-radius: 14px; overflow-x: auto;
    background: color-mix(in srgb, var(--bg, #101010) 70%, transparent); border: 1px solid var(--sx-line);
    font-size: 14px; line-height: 1.6;
}
.sx-body pre code { padding: 0; background: none; }
.sx-body blockquote {
    margin: 0; padding: 14px 18px; border-radius: 14px;
    background: rgba(var(--sx-accent-rgb), .08); border: 1px solid rgba(var(--sx-accent-rgb), .18); color: var(--sx-ink);
}
.sx-body table {
    width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14.5px; line-height: 1.5;
    border: 1px solid var(--sx-line); border-radius: 14px; overflow: hidden;
}
.sx-body th, .sx-body td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--sx-line); }
.sx-body tr:last-child td { border-bottom: 0; }
.sx-body th { color: var(--sx-ink); font-weight: 600; background: color-mix(in srgb, var(--sx-ink) 5%, transparent); }
.sx-body .sx-steps { list-style: none; padding: 0; counter-reset: sx; }
.sx-body .sx-steps > li { counter-increment: sx; position: relative; padding-left: 44px; }
.sx-body .sx-steps > li::before {
    content: counter(sx); position: absolute; left: 0; top: 1px;
    width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
    font-size: 13px; font-weight: 700; color: #fff; background: var(--sx-accent);
}
.sx-body .sx-note {
    padding: 14px 18px; border-radius: 14px; font-size: 15px;
    background: color-mix(in srgb, var(--sx-ink) 5%, transparent); border: 1px solid var(--sx-line);
}

/* ---- tool widget ---- */
.sx-tool {
    margin-top: 28px; padding: clamp(16px, 3vw, 24px); border-radius: 20px;
    background: var(--bg, #101010); border: 1px solid var(--sx-line); color: var(--sx-ink);
    font-size: 15px; line-height: 1.5;
}
.sx-tool label { display: block; font-size: 13px; font-weight: 600; color: var(--sx-mute); margin: 0 0 6px; }
.sx-tool input[type="text"], .sx-tool input[type="number"], .sx-tool input[type="url"], .sx-tool input[type="datetime-local"], .sx-tool select, .sx-tool textarea {
    width: 100%; box-sizing: border-box; padding: 11px 13px; border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--sx-ink) 16%, transparent);
    background: var(--sx-card); color: var(--sx-ink); font: inherit; font-size: 16px;
}
.sx-tool textarea { min-height: 110px; resize: vertical; }
.sx-tool input:focus, .sx-tool select:focus, .sx-tool textarea:focus { outline: 2px solid rgba(var(--sx-accent-rgb), .55); outline-offset: 1px; }
.sx-tool .sx-row { display: grid; gap: 14px; }
.sx-tool .sx-row + .sx-row { margin-top: 14px; }
@media (min-width: 640px) { .sx-tool .sx-row.two { grid-template-columns: 1fr 1fr; } .sx-tool .sx-row.three { grid-template-columns: repeat(3, 1fr); } }
.sx-tool .sx-out {
    margin-top: 16px; padding: 14px 16px; border-radius: 14px; min-height: 22px;
    background: var(--sx-card); border: 1px solid var(--sx-line); word-break: break-word; white-space: pre-wrap;
}
.sx-tool .sx-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.sx-tool .sx-check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--sx-soft); }

/* ---- buttons ---- */
.sx-btn, .sx-btn-ghost {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 20px; border-radius: 999px; font-size: 15px; font-weight: 600; line-height: 1;
    text-decoration: none; cursor: pointer; border: 1px solid transparent; white-space: nowrap;
    transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.sx-btn { background: var(--sx-accent); color: #fff; }
.sx-btn:hover { background: color-mix(in srgb, var(--sx-accent) 88%, #000); }
.sx-btn:active, .sx-btn-ghost:active { transform: scale(.97); }
.sx-btn-ghost { background: transparent; color: var(--sx-ink); border-color: color-mix(in srgb, var(--sx-ink) 22%, transparent); }
.sx-btn-ghost:hover { border-color: var(--sx-accent); }
.sx-btn:focus-visible, .sx-btn-ghost:focus-visible, .sx-arrow:focus-visible, .sx-tile:focus-visible { outline: 2px solid var(--sx-accent); outline-offset: 3px; }

/* ---- FAQ, sources, CTA ---- */
.sx-faq { margin-top: 8px; }
.sx-faq h2 { margin-bottom: 14px !important; }
.sx-faq details { border-bottom: 1px solid var(--sx-line); }
.sx-faq summary {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    padding: 16px 0; cursor: pointer; list-style: none;
    font-size: 16.5px; font-weight: 600; color: var(--sx-ink);
}
.sx-faq summary::-webkit-details-marker { display: none; }
.sx-faq summary svg { flex: none; color: var(--sx-mute); transition: transform .2s ease; }
.sx-faq details[open] summary svg { transform: rotate(180deg); }
.sx-faq details p { margin: 0 0 18px; color: var(--sx-soft); font-size: 15.5px; line-height: 1.7; }

.sx-sources ul { margin: 12px 0 0; padding-left: 1.2em; color: var(--sx-mute); font-size: 14.5px; line-height: 1.7; }
.sx-sources a { color: var(--sx-soft); }

.sx-cta {
    margin-top: 52px; padding: 22px 24px; border-radius: 20px;
    display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
    background: rgba(var(--sx-accent-rgb), .08); border: 1px solid rgba(var(--sx-accent-rgb), .2);
}
.sx-cta strong { display: block; font-size: 18px; color: var(--sx-ink); font-weight: 600; }
.sx-cta p { margin: 4px 0 0; color: var(--sx-soft); font-size: 15px; line-height: 1.55; max-width: 40ch; }

/* ---- "Read our next article" ---- */
.sx-next { max-width: var(--sx-wide); margin: clamp(56px, 7vw, 96px) auto 0; padding: 0 clamp(4px, 1vw, 12px); }
.sx-next-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sx-page .sx-next h2 {
    margin: 0; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.1;
    font-weight: 500; letter-spacing: -0.025em; color: var(--sx-ink);
}
.sx-arrows { display: flex; gap: 10px; flex: none; }
.sx-arrow {
    width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
    border: 0; cursor: pointer; color: #fff; background: var(--sx-accent);
    transition: transform .15s ease, opacity .15s ease;
}
.sx-arrow:hover { transform: scale(1.05); }
.sx-arrow:active { transform: scale(.95); }
.sx-arrow[disabled] { opacity: .35; cursor: default; transform: none; }
/* Whole cards only: the row stays inside the page width and shows an exact number of
   tiles (4 / 3 / 2 / 1), so no card is ever cut at the edge. Arrows scroll one tile. */
.sx-track {
    --sx-per: 4; --sx-gap: 20px;
    display: grid; grid-auto-flow: column; gap: var(--sx-gap);
    grid-auto-columns: calc((100% - (var(--sx-per) - 1) * var(--sx-gap)) / var(--sx-per));
    margin-top: clamp(28px, 4vw, 48px);
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain;
    scrollbar-width: none; padding-bottom: 6px;
}
.sx-track::-webkit-scrollbar { display: none; }
.sx-tile { display: flex; flex-direction: column; gap: 10px; color: var(--sx-ink); text-decoration: none; scroll-snap-align: start; min-width: 0; }
.sx-tile-img { position: relative; display: block; border-radius: 22px; overflow: hidden; aspect-ratio: 1 / 1.02; background: var(--sx-card); }
.sx-tile-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.sx-tile:hover .sx-tile-img img { transform: scale(1.04); }
.sx-tile-title { font-size: 17px; line-height: 1.35; font-weight: 600; letter-spacing: -0.005em; }
.sx-tile:hover .sx-tile-title { color: var(--sx-accent); }
.sx-tile-meta { font-size: 13.5px; color: var(--sx-mute); }
.sx-tile-desc { font-size: 14.5px; line-height: 1.55; color: var(--sx-mute); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ---- hub grid ---- */
.sx-grid-wrap { max-width: var(--sx-wide); margin: clamp(40px, 6vw, 72px) auto 0; padding: 0 clamp(4px, 1vw, 12px); }
.sx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 32px 22px; }
.sx-grid .sx-tile-img { aspect-ratio: 16 / 10; }

.sx-page .site-footer { margin-top: clamp(64px, 8vw, 112px); }

@media (max-width: 1100px) { .sx-track { --sx-per: 3; } }
@media (max-width: 820px) { .sx-track { --sx-per: 2; } }

@media (max-width: 640px) {
    .sx-body { font-size: 16px; }
    .sx-lead { font-size: 17px; }
    .sx-hero img { aspect-ratio: 16 / 9; border-radius: 4px 4px 18px 18px; }
    .sx-body table { display: block; overflow-x: auto; white-space: nowrap; }
    .sx-track { --sx-per: 1; --sx-gap: 14px; }
    .sx-arrow { width: 40px; height: 40px; }
    .sx-cta { padding: 18px; }
    .sx-cta .sx-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .sx-track { scroll-behavior: auto; }
    .sx-tile-img img, .sx-arrow, .sx-btn { transition: none; }
}
