/* Madbotz Blog theme — base styles.
 *
 * Design tokens synced from `02-Products/_Design/tokens/tokens.css` (canonical
 * source in the vault) and `packages/design-tokens` (code mirror). Tailwind v4
 * `@theme` block converted to plain `:root` because Ghost serves this as raw CSS.
 *
 * DO NOT edit tokens here — update `tokens.css` first, then re-sync this block.
 * Component styles below the tokens are theme-specific and OK to edit freely.
 *
 * Look: homologated with madbotz.com (apps/web), the official design for every
 * Madbotz surface. Header, footer, buttons and nav links copy the site's classes
 * from apps/web/src/styles/global.css; keep them in sync.
 *   - Text: Instrument Sans. Headings: Instrument Sans 500 (as the site).
 *   - Instrument Serif italic only for editorial accents (blockquotes).
 *   - Light only, like the site (no dark mode).
 */

/* FONTS — self-hosted, copied from Fontsource by scripts/copy-assets.js */
@font-face {
    font-family: "Instrument Sans";
    font-style: normal;
    font-display: swap;
    font-weight: 400 700;
    src: url(../fonts/instrument-sans-latin-wght-normal.woff2) format("woff2-variations");
}
@font-face {
    font-family: "Instrument Sans";
    font-style: italic;
    font-display: swap;
    font-weight: 400 700;
    src: url(../fonts/instrument-sans-latin-wght-italic.woff2) format("woff2-variations");
}
@font-face {
    font-family: "Instrument Serif";
    font-style: normal;
    font-display: swap;
    font-weight: 400;
    src: url(../fonts/instrument-serif-latin-400-normal.woff2) format("woff2");
}
@font-face {
    font-family: "Instrument Serif";
    font-style: italic;
    font-display: swap;
    font-weight: 400;
    src: url(../fonts/instrument-serif-latin-400-italic.woff2) format("woff2");
}

:root {
    /* COLORS — brand */
    --color-brand-50:  #eff6ff;
    --color-brand-100: #dbeafe;
    --color-brand-200: #bfdbfe;
    --color-brand-300: #93c5fd;
    --color-brand-400: #60a5fa;
    --color-brand-500: #3b82f6;
    --color-brand-600: #2563eb;
    --color-brand-700: #1d4ed8;
    --color-brand-800: #1e40af;
    --color-brand-900: #1e3a8a;

    /* COLORS — neutrals */
    --color-neutral-50:  #f8f9fa;
    --color-neutral-100: #f1f3f5;
    --color-neutral-200: #e9ecef;
    --color-neutral-300: #dee2e6;
    --color-neutral-400: #9ca3af;
    --color-neutral-500: #6b7280;
    --color-neutral-600: #4b5563;
    --color-neutral-700: #374151;
    --color-neutral-800: #1f2937;
    --color-neutral-900: #1b1d1e;
    --color-neutral-950: #111214;

    /* COLORS — surface */
    --color-surface-base:   #ffffff;
    --color-surface-card:   #f4f4f4;
    --color-surface-subtle: #fafafa;

    /* COLORS — accent (decorative) */
    --color-accent-pink:   #ec4899;
    --color-accent-yellow: #facc15;
    --color-accent-green:  #79d45e;

    /* COLORS — semantic */
    --color-success: #40c057;
    --color-warning: #fab005;
    --color-danger:  #fa5252;
    --color-info:    #3b82f6;

    /* TYPOGRAPHY */
    --font-sans:  "Instrument Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
    --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
    --font-mono:  ui-monospace, SFMono-Regular, Menlo, monospace;

    /* RADIUS */
    --radius-sm:   0.5rem;
    --radius-md:   0.75rem;
    --radius-lg:   1rem;
    --radius-xl:   1.5rem;
    --radius-full: 9999px;

    /* SHADOWS */
    --shadow-sm: 0 2px 16px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 2px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.10);
    --shadow-xl: 0 4px 24px rgba(0, 0, 0, 0.10);

    /* MOTION */
    --ease-out-expo: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in-out:   cubic-bezier(0.4, 0, 0.2, 1);

    --duration-fast:   150ms;
    --duration-base:   250ms;
    --duration-medium: 500ms;
    --duration-slow:   800ms;

    --stagger-base: 150ms;

    /* CONTAINER WIDTHS */
    --container-narrow: 720px;
    --container-base:   960px;
    --container-wide:   1200px;

    /* SITE COLORS (apps/web/src/styles/global.css) */
    --color-ink:       #1b1d1e;
    /* 0.65 like the site (WCAG AA: 5.3:1 on white, 5.1:1 on the card grey). */
    --color-ink-muted: rgb(27 29 30 / 0.65);
    --color-ink-line:  rgb(27 29 30 / 0.1);
    --color-heading:   #333333;
    --container-site:  1272px;

    /* SEMANTIC SURFACES (theme-local aliases on top of tokens) */
    --bg:      var(--color-surface-base);
    --fg:      var(--color-ink);
    --muted:   var(--color-ink-muted);
    --subtle:  var(--color-neutral-400);
    --border:  var(--color-ink-line);
    --card-bg: var(--color-surface-card);
}

/* RESET */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-sans);
    font-weight: 400;
    color: var(--fg);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
:focus-visible {
    outline: 2px solid var(--color-brand-500);
    outline-offset: 3px;
    border-radius: 6px;
}
img { max-width: 100%; height: auto; }
a {
    color: var(--color-brand-600);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-in-out);
}
a:hover { color: var(--color-brand-700); text-decoration: underline; }

/* HEADINGS — Instrument Sans 500, as .h-display / .h-section on the site */
h1, h2, h3,
.site-intro h1,
.article-title,
.related-posts .inner > h2,
.gh-content h2,
.gh-content h3 {
    font-family: var(--font-sans);
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--color-heading);
    text-wrap: balance;
}

/* CONTAINERS */
.inner { max-width: var(--container-narrow); margin: 0 auto; padding: 0 1rem; }
.post-feed .inner,
.related-posts .inner,
.tags-page .inner { max-width: var(--container-wide); }

/* === SITE PRIMITIVES === copied from apps/web/src/styles/global.css
 * (.btn, .btn-dark, .btn-badge, .nav-link, .btn-nudge, .roll). Keep in sync. */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 100%;
    border-radius: 9999px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 16px;
    line-height: 1;
    font-weight: 400;
    text-decoration: none;
    cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-badge {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9999px;
}
.btn-dark {
    height: 48px;
    padding: 0 8px 0 20px;
    background: var(--color-ink);
    border-color: var(--color-ink);
    color: #fff;
}
.btn-dark:hover { color: #fff; }
.btn-dark .btn-badge {
    background: #fff;
    color: var(--color-ink);
}
.btn-outline {
    height: 48px;
    padding: 0 8px 0 20px;
    background: #fff;
    border-color: var(--color-neutral-200);
    color: var(--color-ink);
    font-weight: 500;
}
.btn-outline:hover { color: var(--color-ink); }
.btn-outline .btn-badge {
    background: var(--color-ink);
    color: #fff;
}
.btn-primary {
    height: 48px;
    padding: 0 8px 0 20px;
    background: var(--color-brand-500);
    border-color: var(--color-brand-500);
    color: #fff;
    font-weight: 600;
}
.btn-primary:hover { color: #fff; }
.btn-primary .btn-badge {
    background: #fff;
    color: var(--color-ink);
}

/* Newsletter sign-up — copied from packages/design-tokens/src/site.css
 * (.newsletter-*). Here the pill sits inside form.newsletter, which Ghost's
 * Portal script marks with .loading / .success / .error. */
.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;
}
.newsletter { width: 100%; margin: 0; }
.newsletter-form {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 420px;
    padding: 5px 5px 5px 20px;
    background: var(--color-surface-card);
    border: 1px solid transparent;
    border-radius: 9999px;
    transition: border-color 0.15s ease;
}
.newsletter-form:focus-within { border-color: var(--color-brand-500); }
.newsletter-input {
    flex: 1;
    /* A percentage width lets the field shrink below its default size, so a
     * narrow column is not stretched by it. */
    width: 100%;
    min-width: 0;
    padding: 0;
    font: inherit;
    font-size: 16px;
    line-height: 1.4;
    color: var(--color-ink);
    background: transparent;
    border: 0;
}
.newsletter-input::placeholder { color: var(--color-neutral-400); }
.newsletter-input:focus,
.newsletter-input:focus-visible { outline: none; }
.newsletter-form .btn {
    flex: none;
    height: 40px;
    padding: 0 5px 0 16px;
    font-size: 15px;
    font-weight: 500;
}
.newsletter-form .btn-badge { width: 28px; height: 28px; }
.newsletter.loading .btn { opacity: 0.6; pointer-events: none; }
.newsletter-note {
    display: none;
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 1.4;
    color: var(--color-ink-muted);
}
.newsletter-error { color: #c92a2a; }
.newsletter.success .newsletter-form { display: none; }
.newsletter.success .newsletter-success,
.newsletter.error .newsletter-error { display: block; }
.newsletter.success .newsletter-success { margin-top: 0; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 11px;
    background: transparent;
    border: 0;
    border-radius: 9999px;
    font-family: inherit;
    font-size: 16px;
    line-height: 20px;
    font-weight: 500;
    letter-spacing: 0.25px;
    color: var(--color-ink-muted);
    text-decoration: none;
    cursor: pointer;
    transition: color var(--duration-fast) var(--ease-in-out),
                background-color var(--duration-fast) var(--ease-in-out);
}
.nav-link:hover {
    color: var(--color-ink);
    background: #fff;
    text-decoration: none;
}
.nav-link[aria-current="page"],
.site-nav .nav-current > a {
    color: var(--color-ink);
    background: var(--color-surface-card);
}

@media (prefers-reduced-motion: no-preference) {
    /* Header button: label and badge nudge 5px right, drift back slowly (3000ms). */
    .btn-nudge > * { transition: transform 300ms ease; }
    .btn-nudge:hover > * { transform: translateX(5px); }
    .btn-nudge:not(:hover) > * { transition-duration: 3000ms; }

    /* Footer links: letters roll up one after another to a second copy. */
    .roll-line > span {
        transition: transform 250ms ease-out;
        transition-delay: calc(var(--i) * 30ms);
    }
    a:hover > .roll > .roll-line > span { transform: translateY(-100%); }
}
.roll {
    position: relative;
    display: inline-block;
    overflow: clip;
    vertical-align: top;
}
.roll-line { display: block; white-space: pre; }
.roll-line > span { display: inline-block; }
.roll-line + .roll-line { position: absolute; top: 100%; left: 0; }

/* === HEADER === same bar as madbotz.com (apps/web/src/components/Header.astro).
 * Fixed; transparent at the top, solid white once the page scrolls (main.js sets
 * --nav-alpha). .site-main gets top padding so content starts below it. */
.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 50;
    padding: 10px 20px;
}
@media (min-width: 768px) {
    .site-header { padding: 10px 25px; }
}
.site-header-inner {
    max-width: var(--container-site);
    height: 60px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 15px;
    border-radius: 9999px;
    background-color: rgb(255 255 255 / var(--nav-alpha, 0.4));
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}
.site-main { padding-top: 80px; }

.site-logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}
.site-logo img {
    height: 32px;
    width: auto;
    display: block;
}
@media (min-width: 768px) {
    .site-logo img { height: 40px; }
}

.site-nav { display: none; }
@media (min-width: 1024px) {
    .site-nav { display: flex; align-items: center; }
}
.site-nav > ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
}
/* Ghost's {{navigation}} renders plain <li><a>; give them the site's nav-link look. */
.site-nav > ul > li > a {
    white-space: nowrap;
    display: flex;
    align-items: center;
    padding: 8px 11px;
    border-radius: 9999px;
    font-size: 16px;
    line-height: 20px;
    font-weight: 500;
    letter-spacing: 0.25px;
    color: var(--color-ink-muted);
    transition: color var(--duration-fast) var(--ease-in-out),
                background-color var(--duration-fast) var(--ease-in-out);
}
/* Five links plus search: tighter between the desktop breakpoint and 1200px. */
@media (max-width: 1199px) {
    .site-nav > ul { gap: 0; }
    .site-nav > ul > li > a { padding: 8px 7px; font-size: 15px; letter-spacing: 0; }
}
.site-nav > ul > li > a:hover {
    color: var(--color-ink);
    background: #fff;
    text-decoration: none;
}

/* === TAG DROPDOWN (desktop header) === */
.has-tag-dropdown { position: relative; }
.tags-toggle svg { transition: transform var(--duration-fast) var(--ease-in-out); }
.has-tag-dropdown.is-open .tags-toggle { color: var(--color-ink); }
.has-tag-dropdown.is-open .tags-toggle svg { transform: rotate(180deg); }

.tags-dropdown,
.lang-menu .lang-list {
    position: absolute;
    top: calc(100% + 8px);
    min-width: 220px;
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    padding: 8px;
    z-index: 60;
}
.tags-dropdown {
    left: 50%;
    max-width: 20rem;
    transform: translateX(-50%) translateY(-4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration-fast) var(--ease-in-out),
                transform var(--duration-fast) var(--ease-out-expo);
}
.has-tag-dropdown.is-open .tags-dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
.tags-dropdown-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 24rem;
    overflow-y: auto;
}
.tags-dropdown-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 11px;
    border-radius: 9999px;
    color: var(--color-ink-muted);
    font-size: 15px;
    font-weight: 500;
    transition: color var(--duration-fast) var(--ease-in-out),
                background-color var(--duration-fast) var(--ease-in-out);
}
.tags-dropdown-list a:hover {
    color: var(--color-ink);
    background: var(--color-surface-card);
    text-decoration: none;
}
.tags-dropdown-name { flex: 1; }
.tags-dropdown-count {
    font-size: 13px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}
.tags-dropdown-all {
    display: flex;
    justify-content: center;
    margin-top: 4px;
    padding: 10px 11px 6px;
    border-top: 1px solid var(--border);
    color: var(--color-ink);
    font-size: 14px;
    font-weight: 500;
}
.tags-dropdown-all:hover { color: var(--color-brand-500); text-decoration: none; }
.tags-dropdown-empty {
    margin: 0;
    padding: 12px;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

.site-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.search-trigger { padding: 10px; }
.search-trigger-label { display: none; }
@media (min-width: 1280px) {
    .search-trigger { padding: 8px 14px 8px 12px; background: rgb(255 255 255 / 0.7); }
    .search-trigger-label { display: inline; }
}

/* Language menu ("Idioma"), as on the site. Desktop only; the mobile panel lists both. */
.lang-menu { position: relative; display: none; }
@media (min-width: 1024px) {
    .lang-menu { display: block; }
}
.lang-menu summary { list-style: none; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu .lang-list { right: 0; }
.lang-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.lang-list .nav-link { font-size: 14px; }
.lang-list .nav-link:hover { background: var(--color-surface-card); }

.header-cta { display: none; }
@media (min-width: 1024px) {
    .header-cta { display: inline-flex; }
}

.site-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 0;
    color: var(--color-ink);
    cursor: pointer;
    padding: 0;
}
@media (min-width: 1024px) {
    .site-nav-toggle { display: none; }
}

/* === MOBILE MENU === panel that slides in from the right over a dimmed page,
 * as on the site: opens in 500ms, closes in 1000ms. */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 60;
    overflow: hidden;
    visibility: hidden;
    transition: visibility 0s linear 1000ms;
}
.mobile-menu[aria-hidden="false"] {
    visibility: visible;
    transition-delay: 0s;
}
@media (min-width: 1024px) {
    .mobile-menu { display: none; }
}
.mobile-menu-overlay {
    position: absolute;
    inset: 0;
    background: rgb(0 0 0 / 0.5);
    opacity: 0;
    transition: opacity 300ms ease;
}
.mobile-menu[aria-hidden="false"] .mobile-menu-overlay { opacity: 1; }
.mobile-menu-inner {
    position: absolute;
    inset: 0 0 0 auto;
    width: 300px;
    max-width: 85vw;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 16px 24px;
    background: #fff;
    transform: translateX(100%);
    transition: transform 1000ms ease;
}
.mobile-menu[aria-hidden="false"] .mobile-menu-inner {
    transform: none;
    transition-duration: 500ms;
}
@media (prefers-reduced-motion: reduce) {
    .mobile-menu,
    .mobile-menu-overlay,
    .mobile-menu-inner { transition: none; }
}
.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.mobile-menu-label {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-ink);
}
.mobile-menu-close {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    color: var(--color-ink);
    cursor: pointer;
    padding: 0;
}
.mobile-menu-search {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    background: var(--color-surface-card);
    border: 0;
    border-radius: 9999px;
    color: var(--color-ink-muted);
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
}
.mobile-menu-search:hover { color: var(--color-ink); }
.mobile-menu-search svg { flex-shrink: 0; }
.mobile-menu-nav ul,
.mobile-menu-lang .lang-list {
    list-style: none;
    padding: 10px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.mobile-menu-lang .lang-list { gap: 4px; }
.mobile-menu-nav a {
    display: flex;
    padding: 8px 11px;
    border-radius: 9999px;
    font-size: 16px;
    line-height: 20px;
    font-weight: 500;
    letter-spacing: 0.25px;
    color: var(--color-ink);
}
.mobile-menu-nav a:hover { background: var(--color-surface-card); text-decoration: none; }
.mobile-menu-nav .nav-current > a { background: var(--color-surface-card); }

.mobile-menu-tags {
    padding: 10px;
    border-top: 1px solid var(--border);
}
.mobile-menu-tags-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin: 4px 0 8px;
    padding: 0 11px;
}
.mobile-menu-tags-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.mobile-menu-tags-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 11px;
    border-radius: 9999px;
    color: var(--color-ink-muted);
    font-size: 15px;
    font-weight: 500;
}
.mobile-menu-tags-list a:hover {
    color: var(--color-ink);
    background: var(--color-surface-card);
    text-decoration: none;
}
.mobile-menu-tags-count {
    font-size: 13px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}
.mobile-menu-tags-all {
    display: inline-flex;
    margin: 8px 0 0 11px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-ink);
}
.mobile-menu-tags-all:hover { color: var(--color-brand-500); text-decoration: none; }
.mobile-menu-lang { border-top: 1px solid var(--border); }
.mobile-menu-cta { margin-top: 8px; align-self: flex-start; }
body.mobile-menu-open { overflow: hidden; }

/* INTRO (tag / author / paginated headers): styled with the home hero, see
 * "HOME" below. */

/* POST FEED */
.post-feed { padding: 3rem 0 4rem; }
.post-feed .inner {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}
/* Post card — same as the Knowledge Center cards on madbotz.com: grey rounded
 * card, image on top, date + "Leer artículo" badge at the bottom. The title
 * link's ::after makes the whole card clickable; the tag link stays on top. */
.post-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--color-surface-card);
    border-radius: 16px;
    transition: transform 200ms ease;
}
@media (prefers-reduced-motion: no-preference) {
    .post-card:hover { transform: scale(0.99); }
}
.post-card-image {
    display: block;
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}
.post-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 32px;
}
.post-card-tag {
    position: relative;
    z-index: 1;
    align-self: flex-start;
    margin-bottom: 10px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-brand-600);
}
.post-card-tag:hover { color: var(--color-brand-700); text-decoration: none; }
.post-card-title {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 20px;
    line-height: 1.3;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--color-ink);
}
.post-card-title a { color: inherit; }
.post-card-title a:hover { text-decoration: none; }
.post-card-title a::after {
    content: "";
    position: absolute;
    inset: 0;
}
.post-card-title a:focus-visible { outline: none; }
.post-card:has(.post-card-title a:focus-visible) {
    outline: 2px solid var(--color-brand-500);
    outline-offset: 3px;
}
.post-card-excerpt {
    flex: 1;
    margin: 12px 0 0;
    font-size: 16px;
    line-height: 1.4;
    letter-spacing: 0.4px;
    color: var(--color-ink-muted);
}
.post-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 32px;
    flex-wrap: wrap;
}
.post-card-footer time {
    white-space: nowrap;
    font-size: 14px;
    color: var(--color-ink-muted);
}
.post-card-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 500;
    color: var(--color-ink);
    white-space: nowrap;
}
.post-card-more .btn-badge {
    background: var(--color-ink);
    color: #fff;
}

/* ARTICLE */
.article { padding-bottom: 4rem; }
.article-header { padding: 2.5rem 0 1.5rem; }
.article-tag {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-brand-600);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.article-title {
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    line-height: 1.1;
    margin: 0.625rem 0 0.875rem;
    letter-spacing: -0.015em;
}
.article-excerpt {
    color: var(--muted);
    font-size: 1.125rem;
    margin: 0 0 1rem;
    line-height: 1.55;
}
.article-meta {
    font-size: 0.875rem;
    color: var(--muted);
    display: flex;
    gap: 0.875rem;
    flex-wrap: wrap;
    align-items: center;
}
.article-author { color: var(--fg); font-weight: 500; }
.article-author:hover { text-decoration: none; }

/* === FEATURE IMAGE LAYOUTS ===
 * Resolved via `data-layout="<value>"` set in post.hbs. Default value comes from the
 * theme setting `@custom.feature_image_layout` (Ghost Admin → Settings → Design →
 * Customize → Theme settings). Per-post override via internal tag #image-banner,
 * #image-narrow, or #image-contain.
 */
.article-image {
    margin: 0 auto 2rem;
    padding: 0 1rem;
    text-align: center;
}
.article-image img {
    display: block;
    width: 100%;
    /* With the width/height of post.hbs: keeps the 16:9 box at any width. */
    height: auto;
    border-radius: var(--radius-lg);
}
.article-image figcaption {
    color: var(--muted);
    font-size: 0.875rem;
    margin-top: 0.625rem;
    text-align: center;
}

/* contain (default) — as wide as the reading column, vertical-capped without cropping.
 * Image preserved entirely; card-bg fills any unused space if image is transparent.
 * Same width as the title and the prose, so the post reads as one column. */
.article-image[data-layout="contain"] {
    max-width: var(--container-narrow);
}
.article-image[data-layout="contain"] img {
    max-height: 60vh;
    object-fit: contain;
    background: var(--card-bg);
}

/* banner — cinematic 21:9 crop, centered to base container. The only layout wider
 * than the reading column; opt-in. Best for panoramic photos and hero banners. */
.article-image[data-layout="banner"] {
    max-width: var(--container-base);
}
.article-image[data-layout="banner"] img {
    aspect-ratio: 21 / 9;
    object-fit: cover;
}

/* narrow — reading-column width (720 px) like contain, but without the height cap.
 * Best for tall illustrations that should show at full height. */
.article-image[data-layout="narrow"] {
    max-width: var(--container-narrow);
}

/* GHOST CONTENT (post body) */
.gh-content > * { margin-bottom: 1.25rem; }
.gh-content h2 {
    font-size: clamp(1.625rem, 3vw, 2rem);
    margin: 2.5rem 0 0.75rem;
    line-height: 1.25;
}
.gh-content h3 {
    font-size: 1.375rem;
    margin: 2rem 0 0.5rem;
    line-height: 1.3;
}
.gh-content p { font-size: 1.0625rem; line-height: 1.7; }
.gh-content blockquote {
    border-left: 3px solid var(--color-brand-500);
    padding: 0.5rem 0 0.5rem 1.25rem;
    margin-left: 0;
    color: var(--muted);
    font-family: var(--font-serif);
    font-size: 1.125rem;
    font-style: italic;
}
.gh-content code {
    background: var(--card-bg);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.875em;
}
.gh-content pre {
    background: var(--card-bg);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
}
.gh-content pre code { background: transparent; padding: 0; }
.gh-content ul, .gh-content ol { padding-left: 1.5rem; line-height: 1.7; }
.gh-content hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 2.5rem 0;
}

/* Button card — the site's primary pill (.btn-primary on madbotz.com) instead
 * of Ghost's accent colour, so CTAs look the same whatever the accent setting. */
.gh-content .kg-button-card { margin: 2rem 0; }
.gh-content .kg-button-card a.kg-btn {
    display: inline-flex;
    align-items: center;
    height: 56px;
    padding: 0 28px;
    border-radius: 9999px;
    background: var(--color-brand-500);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color var(--duration-fast) var(--ease-in-out);
}
.gh-content .kg-button-card a.kg-btn:hover {
    background: var(--color-brand-600);
    color: #fff;
    text-decoration: none;
}

/* GHOST KOENIG IMAGE WIDTHS (required by gscan):
 * Posts can mark images as wide/full and the editor outputs <figure class="kg-width-wide">
 * or <figure class="kg-width-full">. The default `.gh-content > * { margin: ... }` constrains
 * everything to the .inner width; these classes break out wider.
 */
.gh-content .kg-width-wide {
    margin-left: calc((var(--container-narrow) - var(--container-base)) / 2);
    margin-right: calc((var(--container-narrow) - var(--container-base)) / 2);
    max-width: var(--container-base);
}
.gh-content .kg-width-full {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: 100vw;
}
.gh-content .kg-width-wide img,
.gh-content .kg-width-full img {
    width: 100%;
    height: auto;
}

/* TAGS at end of article */
.article-tags { padding: 1.5rem 0; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.article-tags a {
    font-size: 0.8125rem;
    color: var(--muted);
    background: var(--card-bg);
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-sm);
}
.article-tags a:hover { color: var(--fg); text-decoration: none; }

/* Newsletter card at the end of a post */
.post-newsletter {
    margin-top: 2.5rem;
    padding: 24px;
    background: var(--color-surface-card);
    border-radius: 16px;
}
.post-newsletter-title {
    margin: 0 0 6px;
    font-size: 1.25rem;
    line-height: 1.3;
    font-weight: 500;
    color: var(--color-ink);
}
.post-newsletter-text {
    margin: 0 0 16px;
    font-size: 16px;
    line-height: 1.4;
    color: var(--color-ink-muted);
}
.post-newsletter .newsletter-form { background: #fff; }

/* BREADCRUMBS */
.breadcrumbs { padding: 1rem 0 0; font-size: 0.8125rem; }
.breadcrumbs ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    color: var(--muted);
}
.breadcrumbs li + li::before { content: "/"; margin-right: 0.5rem; color: var(--subtle); }
.breadcrumbs li[aria-current="page"] { color: var(--fg); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--fg); }

/* RELATED */
.related-posts {
    border-top: 1px solid var(--border);
    padding: 3rem 0;
}
/* Only the section heading: the cards inside also use h2 for their titles. */
.related-posts .inner > h2 {
    margin: 0 0 1.75rem;
    font-size: 1.5rem;
    line-height: 1.3;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}
/* Three related posts: on wide screens they share the full row. */
@media (min-width: 1000px) {
    .related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* === FOOTER === same as madbotz.com (apps/web/src/components/Footer.astro) */
.site-footer {
    margin-top: 4rem;
    background: var(--bg);
}
.site-footer-inner {
    max-width: var(--container-site);
    margin: 0 auto;
    padding: 20px 20px 24px;
}
@media (min-width: 768px) {
    .site-footer-inner { padding-top: 80px; }
}
.site-footer-grid {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 30px;
    margin: 40px 0;
}
@media (min-width: 768px) {
    .site-footer-grid { margin: 64px 0; }
}
@media (min-width: 1024px) {
    .site-footer-grid {
        flex-direction: row;
        justify-content: space-between;
        gap: 64px;
    }
}
.site-footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    max-width: 475px;
}
.site-footer-newsletter { width: 100%; }
.site-footer-newsletter .site-footer-column-title { margin-bottom: 4px; }
.site-footer-newsletter .site-footer-description { margin-bottom: 16px; letter-spacing: 0.4px; }
.site-footer-logo { display: inline-flex; }
.site-footer-logo img {
    height: 43px;
    width: auto;
    display: block;
}
.site-footer-description,
.site-footer-links li,
.site-footer-copyright {
    font-size: 16px;
    line-height: 1.4;
    letter-spacing: 0.4px;
    color: var(--color-ink-muted);
    margin: 0;
}
.site-footer-description { letter-spacing: 0.5px; }
.site-footer-columns {
    display: grid;
    gap: 20px;
    flex-shrink: 0;
}
@media (min-width: 640px) {
    .site-footer-columns {
        grid-template-columns: repeat(2, auto);
        gap: 64px;
    }
}
.site-footer-column-title {
    margin: 0 0 16px;
    font-size: 16px;
    line-height: 20px;
    font-weight: 500;
    color: var(--color-ink);
}
.site-footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.site-footer-links a {
    display: inline-block;
    color: var(--color-ink-muted);
    transition: color var(--duration-fast) var(--ease-in-out);
}
.site-footer-links a:hover {
    color: var(--color-brand-500);
    text-decoration: none;
}
.site-footer-bottom {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 15px;
    border-top: 1px solid var(--color-ink-line);
}
@media (min-width: 640px) {
    .site-footer-bottom {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}
/* Blog extras: Ghost secondary navigation, social links, llms.txt. */
.site-footer-extra,
.site-footer-extra ul {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.site-footer-extra a {
    font-size: 14px;
    color: var(--color-ink-muted);
}
.site-footer-extra a:hover {
    color: var(--color-brand-500);
    text-decoration: none;
}

/* === /tags/ PAGE === (dedicated tag index, rendered by page-tags.hbs) */
/* The header is the shared .site-intro (see "HOME"). */
.tags-page { padding: 1.5rem 0 5rem; }
.tags-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}
.tag-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    color: inherit;
    text-decoration: none;
    transition: transform var(--duration-base) var(--ease-out-expo),
                box-shadow var(--duration-base) var(--ease-in-out);
}
.tag-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}
.tag-card-name {
    font-family: var(--font-sans);
    font-size: 1.5rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--fg);
}
.tag-card-description {
    color: var(--muted);
    font-size: 0.9375rem;
    margin: 0;
    line-height: 1.5;
}
.tag-card-count {
    font-size: 0.8125rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: auto;
}
.tags-page-content {
    max-width: var(--container-narrow);
    margin: 3rem auto 0;
}
.tags-page-empty {
    text-align: center;
    color: var(--muted);
    font-size: 1rem;
}

/* PAGINATION */
.pagination {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 2rem 0;
    font-size: 0.9375rem;
}
.pagination a, .pagination span {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    color: var(--muted);
}
.pagination a:hover {
    background: var(--card-bg);
    color: var(--fg);
    text-decoration: none;
}

/* === HOME === (partials/home-feed.hbs)
 * Hero with the gradient of madbotz.com, tag pills, the latest post in large,
 * the featured row and a three-column grid with a sidebar. */

/* Hero — same background as the hero of the site (apps/web/src/blocks/Hero.astro).
 * It sits behind the fixed header, so it cancels the top padding of .site-main. */
.blog-hero,
.site-intro {
    margin-top: -80px;
    padding: 140px 20px 40px;
    text-align: center;
    background-image: linear-gradient(
        355deg,
        rgb(255 255 255 / 0.5) 37%,
        #fff 53%,
        rgb(236 72 153 / 0.1) 71%,
        rgb(59 130 246 / 0.1) 79%
    );
}
@media (min-width: 768px) {
    .blog-hero,
    .site-intro { padding-top: 170px; }
}
.blog-hero-inner {
    max-width: 1000px;
    margin: 0 auto;
}
.blog-hero-title,
.site-intro h1 {
    margin: 0 0 10px;
    font-size: clamp(40px, 6.2vw, 70px);
    line-height: 1;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--color-heading);
}
.site-intro h1 { font-size: clamp(36px, 4.4vw, 48px); line-height: 1.2; }
/* Italic serif fragment that closes a heading, as on the site. */
.accent {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.03em;
}
.blog-hero-text,
.site-description {
    max-width: 720px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.4;
    letter-spacing: 0.4px;
    color: var(--color-ink-muted);
}

/* Search: a wide pill that reads as a field and opens Ghost's search. */
.blog-search {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 560px;
    height: 56px;
    margin: 28px auto 0;
    padding: 0 22px;
    background: #fff;
    border: 1px solid var(--color-neutral-200);
    border-radius: 9999px;
    box-shadow: var(--shadow-sm);
    font-family: inherit;
    font-size: 17px;
    line-height: 1;
    color: var(--color-ink-muted);
    text-align: left;
    cursor: text;
    transition: border-color var(--duration-fast) var(--ease-in-out),
                box-shadow var(--duration-fast) var(--ease-in-out);
}
.blog-search svg { flex: none; color: var(--color-ink); }
.blog-search:hover,
.blog-search:focus-visible {
    border-color: var(--color-brand-500);
    box-shadow: var(--shadow-lg);
    outline: none;
}

/* Tag pills */
.tag-pills { margin-top: 16px; }
.tag-pills ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.tag-pill {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 16px;
    border-radius: 9999px;
    background: var(--color-surface-card);
    font-size: 15px;
    font-weight: 500;
    color: var(--color-ink);
    transition: background-color var(--duration-fast) var(--ease-in-out),
                color var(--duration-fast) var(--ease-in-out);
}
.tag-pill:hover {
    background: var(--color-ink);
    color: #fff;
    text-decoration: none;
}
.tag-pill-all {
    background: transparent;
    border: 1px solid var(--color-neutral-200);
    color: var(--color-ink-muted);
}

/* Page container, as wide as the site. */
.home-wrap {
    max-width: var(--container-site);
    margin: 0 auto;
    padding: 24px 20px 64px;
}
.home-section-title {
    margin: 0 0 24px;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--color-ink);
}

/* Latest post, in large: image on the left, text on the right. */
.home-lead {
    position: relative;
    display: grid;
    overflow: hidden;
    background: var(--color-surface-card);
    border-radius: 24px;
    transition: transform 200ms ease;
}
@media (min-width: 900px) {
    .home-lead { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (prefers-reduced-motion: no-preference) {
    .home-lead:hover { transform: scale(0.995); }
}
.home-lead-image {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}
.home-lead-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px;
}
@media (min-width: 900px) {
    .home-lead-content { padding: 48px; }
}
.home-lead-title {
    margin: 0;
    font-size: clamp(26px, 2.6vw, 36px);
    line-height: 1.15;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--color-ink);
}
.home-lead-title a { color: inherit; }
.home-lead-title a:hover { text-decoration: none; }
.home-lead-title a::after {
    content: "";
    position: absolute;
    inset: 0;
}
.home-lead-title a:focus-visible { outline: none; }
.home-lead:has(.home-lead-title a:focus-visible) {
    outline: 2px solid var(--color-brand-500);
    outline-offset: 3px;
}
.home-lead-excerpt {
    margin: 16px 0 0;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.4px;
    color: var(--color-ink-muted);
}

/* Featured row: up to four compact items separated by hairlines. */
.home-featured {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--color-ink-line);
}
.home-featured-list {
    display: grid;
    gap: 16px 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}
@media (min-width: 640px) {
    .home-featured-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
    .home-featured-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .home-featured-list > li + li {
        padding-left: 24px;
        border-left: 1px solid var(--color-ink-line);
    }
}
.home-featured-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    color: var(--color-ink);
}
.home-featured-item:hover { text-decoration: none; }
.home-featured-item:hover .home-featured-title { color: var(--color-brand-600); }
.home-featured-text { display: flex; flex-direction: column; gap: 8px; }
.home-featured-title {
    font-size: 16px;
    line-height: 1.3;
    font-weight: 500;
    transition: color var(--duration-fast) var(--ease-in-out);
}
.home-featured-item time {
    font-size: 14px;
    color: var(--color-ink-muted);
}
.home-featured-image {
    flex: none;
    width: 72px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
}

/* Latest: grid of cards + sidebar. */
.home-latest {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--color-ink-line);
}
.home-latest-grid {
    display: grid;
    gap: 48px;
}
@media (min-width: 1100px) {
    .home-latest-grid { grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; }
}
.home-post-feed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 24px;
    padding: 0;
}
/* Narrower cards than the plain feed (home grid and related posts): tighter padding and a compact footer so
 * the date and "Leer artículo" stay on one line. */
.home-post-feed .post-card-content,
.related-grid .post-card-content { padding: 20px; }
.home-post-feed .post-card-footer,
.related-grid .post-card-footer { gap: 8px; margin-top: 24px; }
.home-post-feed .post-card-footer time,
.related-grid .post-card-footer time { font-size: 13px; }
.home-post-feed .post-card-more,
.related-grid .post-card-more { gap: 6px; font-size: 14px; }
.home-post-feed .post-card-more .btn-badge,
.related-grid .post-card-more .btn-badge { width: 28px; height: 28px; }

.feed-load-more {
    display: flex;
    justify-content: center;
    margin-top: 48px;
}

/* Sidebar */
.home-sidebar {
    display: flex;
    flex-direction: column;
    gap: 32px;
}
@media (min-width: 1100px) {
    .home-sidebar { position: sticky; top: 100px; align-self: start; }
}
.home-sidebar-block + .home-sidebar-block {
    padding-top: 32px;
    border-top: 1px solid var(--color-ink-line);
}
.home-sidebar-logo { display: block; width: auto; height: 32px; margin-bottom: 16px; }
.home-sidebar-title {
    margin: 0 0 12px;
    font-size: 16px;
    line-height: 20px;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--color-ink);
}
.home-sidebar-text {
    margin: 0;
    font-size: 16px;
    line-height: 1.4;
    letter-spacing: 0.4px;
    color: var(--color-ink-muted);
}
.home-sidebar-newsletter .newsletter { margin-top: 16px; }
/* The sidebar is narrow: tighter pill so the placeholder fits. */
.home-sidebar-newsletter .newsletter-form { gap: 6px; padding-left: 14px; }
.home-sidebar-newsletter .newsletter-input { font-size: 15px; }
.home-sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.home-sidebar-links a {
    font-size: 16px;
    color: var(--color-ink-muted);
}
.home-sidebar-links a:hover { color: var(--color-brand-500); text-decoration: none; }

/* === ENTRANCE ANIMATIONS === (Pedido 5)
 * Gated by prefers-reduced-motion so users with the OS-level toggle see static layout.
 * Hover transforms above stay always-on (user-initiated, subtle). */
@media (prefers-reduced-motion: no-preference) {
    /* Feature image fades + scales in on post pages */
    @keyframes article-image-in {
        from { opacity: 0; transform: scale(0.98); }
        to   { opacity: 1; transform: scale(1); }
    }
    .article-image img {
        animation: article-image-in var(--duration-medium) var(--ease-out-expo) both;
    }

    /* Cards stagger entrance on feeds + /tags/ grid. The cascade caps at 6 so the
     * 7th+ card enters together — keeps long feeds from feeling slow. */
    @keyframes card-enter {
        from { opacity: 0; transform: translateY(16px); }
        to   { opacity: 1; transform: translateY(0); }
    }
    .post-feed .post-card,
    .related-grid .post-card,
    .tags-grid .tag-card {
        animation: card-enter var(--duration-medium) var(--ease-out-expo) both;
    }
    .post-feed .post-card:nth-child(1),
    .related-grid .post-card:nth-child(1),
    .tags-grid .tag-card:nth-child(1) { animation-delay: 0ms; }
    .post-feed .post-card:nth-child(2),
    .related-grid .post-card:nth-child(2),
    .tags-grid .tag-card:nth-child(2) { animation-delay: calc(var(--stagger-base) * 1); }
    .post-feed .post-card:nth-child(3),
    .related-grid .post-card:nth-child(3),
    .tags-grid .tag-card:nth-child(3) { animation-delay: calc(var(--stagger-base) * 2); }
    .post-feed .post-card:nth-child(4),
    .related-grid .post-card:nth-child(4),
    .tags-grid .tag-card:nth-child(4) { animation-delay: calc(var(--stagger-base) * 3); }
    .post-feed .post-card:nth-child(5),
    .related-grid .post-card:nth-child(5),
    .tags-grid .tag-card:nth-child(5) { animation-delay: calc(var(--stagger-base) * 4); }
    .post-feed .post-card:nth-child(6),
    .related-grid .post-card:nth-child(6),
    .tags-grid .tag-card:nth-child(6) { animation-delay: calc(var(--stagger-base) * 5); }
    .post-feed .post-card:nth-child(n+7),
    .related-grid .post-card:nth-child(n+7),
    .tags-grid .tag-card:nth-child(n+7) { animation-delay: calc(var(--stagger-base) * 6); }
}

/* SKIP LINK (a11y) */
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
    left: 1rem;
    top: 1rem;
    background: var(--bg);
    padding: 0.5rem;
    border: 2px solid var(--color-brand-500);
    border-radius: var(--radius-sm);
    z-index: 100;
}

/* SELECTION */
::selection {
    background: var(--color-brand-100);
    color: var(--color-neutral-900);
}
