/* The ElevenLabs-shaped listing (Nov 2026): a "Blog" title, category tabs
   that switch in place, one lead card, then every other post as a square
   image card, three across. Values measured from elevenlabs.io/blog.

   Layered on top of pocket-style.css rather than edited into it: that file
   is live, and an uploaded CSS URL pins stale (see docs), so new rules ship
   in a fresh file. Linked by hand from partials/nav.html, after
   pocket-style.css, so it wins. Flat selectors only. */

:root {
    --nx-cream: #f5f3f1;          /* behind pictures and the lead card */
    --nx-cream-tab: #ebe8e4;      /* tab hover */
    --nx-line: #ebe8e4;           /* the band's rules */
    --nx-grey: #777169;           /* dates, excerpts */
    --nx-tab-grey: #6b6b6b;
    /* ElevenLabs uses squares, but their artwork is made square. Ours (the
       featured images Akshay makes, 3600×2400) is 3:2 with type in it,
       which a square crops mid-word. Switch to 1 / 1 if the art goes square. */
    --nx-card-ratio: 3 / 2;
    --nx-blue: rgb(1, 113, 228);
}

/* ── Title ─────────────────────────────────────────────────── */
.nx-head--blog { margin-bottom: 2.5rem; }
.nx-head--blog .nx-head-title {
    font-size: 2.25rem;
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: -0.02em;
}
@media (min-width: 1024px) {
    .nx-head--blog { margin-bottom: 3rem; }
    .nx-head--blog .nx-head-title { font-size: 2.75rem; line-height: 3rem; }
}

/* ── Tabs ──────────────────────────────────────────────────────
   Grey text; on hover a cream pill fades in and the text goes black. The
   active tab is a white pill with a hairline ring. Switching: the old pill
   fades out while growing a little, the new one fades in from a little
   smaller, ~280ms (assets/js/nx-tabs.js sets is-active / was-active). */
.nx-tabs {
    display: flex;
    margin: 2.5rem -1rem 0;
    padding: 0 1rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.nx-tabs::-webkit-scrollbar { display: none; }
@media (min-width: 640px) { .nx-tabs { flex-wrap: wrap; margin: 2.5rem 0 0; padding: 0; overflow: visible; } }

.nx-tab {
    position: relative;
    isolation: isolate;
    flex: none;
    display: inline-flex;
    align-items: center;
    height: 2.25rem;
    padding: 0 0.9375rem;
    border-radius: 999px;
    font-size: 0.9375rem;
    font-weight: 400;
    letter-spacing: -0.005em;
    color: var(--nx-tab-grey);
    text-decoration: none;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s ease;
}
/* Hover tint, inset 2px / 3px like the reference. */
.nx-tab::before {
    content: "";
    position: absolute;
    inset: 0.125rem 0.1875rem;
    z-index: -2;
    border-radius: 999px;
    background: var(--nx-cream-tab);
    opacity: 0;
    transition: opacity 0.15s ease;
}
.nx-tab:hover, .nx-tab.is-loading, .nx-tab.is-active { color: var(--nx-ink); }
.nx-tab:hover::before, .nx-tab.is-loading::before { opacity: 1; }
.nx-tab.is-active::before { opacity: 0; }

.nx-tab-pill {
    position: absolute;
    inset: 0.125rem 0.1875rem;
    z-index: -1;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.04);
    opacity: 0;
    transform: scale(0.95, 0.89);
    transition: opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1), transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}
.nx-tab.is-active .nx-tab-pill { opacity: 1; transform: none; }
.nx-tab.was-active .nx-tab-pill { opacity: 0; transform: scale(1.05, 1.12); }
.nx-tab:focus-visible { outline: 2px solid var(--nx-blue); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    .nx-tab-pill, .nx-tab::before { transition: none; }
}

/* ── Pictures: one ratio (above), cream behind, 16px corners, no hover zoom ── */
.nx-shot,
.nx-lead-shot {
    aspect-ratio: var(--nx-card-ratio);
    border: 0;
    border-radius: 1rem;
    background: var(--nx-cream);
}
.nx-card:hover .nx-shot img,
.nx-lead:hover .nx-lead-shot img { transform: none; }

/* A post with no featured image still gets a picture: a Pocket-blue
   panel with the title set in it. */
.nx-shot--blank { background: linear-gradient(160deg, #2b8cf0 0%, var(--nx-blue) 55%, #0b3f8a 100%); }
.nx-shot-word {
    position: absolute;
    inset: auto 0 0 0;
    padding: 1.5rem;
    font-size: 1.375rem;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #fff;
    text-wrap: balance;
}

/* ── The lead: one cream card, copy left, square picture right ── */
.nx-feed .nx-lead {
    display: flex;
    flex-direction: column-reverse;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 1rem;
    background: var(--nx-cream);
}
.nx-feed .nx-lead-shot { border-radius: 0; }
.nx-feed .nx-lead-copy {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 1.5rem 1.25rem 1.75rem;
}
.nx-feed .nx-lead-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.015em;
}
.nx-lead-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-top: 1.25rem;
    font-size: 1rem;
    line-height: 1.25rem;
    color: var(--nx-grey);
}
.nx-lead-meta .nx-card-cat { color: var(--nx-grey); font-weight: 400; }
.nx-lead-meta .nx-card-cat::after { content: "•"; margin-left: 0.625rem; }
.nx-feed .nx-lead-excerpt {
    margin-top: 1.5rem;
    max-width: 32rem;
    font-size: 1rem;
    line-height: 1.5;
    letter-spacing: 0;
    color: var(--nx-grey);
}
@media (min-width: 1024px) {
    .nx-feed .nx-lead {
        display: grid;
        grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
        gap: 0;
        align-items: stretch;
    }
    .nx-feed .nx-lead-shot { order: 2; }
    .nx-feed .nx-lead-copy { padding: 2rem; }
    .nx-feed .nx-lead-title { font-size: 2rem; line-height: 2.25rem; font-weight: 300; }
    .nx-feed .nx-lead-excerpt { margin-top: auto; padding-top: 2rem; }
    .nx-feed .nx-lead:hover .nx-lead-title { color: rgba(10, 10, 10, 0.75); }
}

/* ── The band: ruled above and at the sides, cards inside ────── */
.nx-band {
    margin-top: 3rem;
    border-top: 1px solid var(--nx-line);
}
.nx-feed > .nx-band:first-child { margin-top: 0; }
.nx-band > .nx-wrap { padding-bottom: 5rem; }
@media (min-width: 640px) {
    .nx-band > .nx-wrap > .nx-grid--feed,
    .nx-band > .nx-wrap > .nx-pager {
        border-left: 1px solid var(--nx-line);
        border-right: 1px solid var(--nx-line);
    }
}

/* ── The grid: 1 → 2 → 3 across, 12px apart, 64px between rows ── */
.nx-grid--feed {
    margin-top: 0;
    padding: 0.75rem 0 0;
    column-gap: 0.75rem;
    row-gap: 3rem;
}
@media (min-width: 640px) {
    .nx-grid--feed { margin-top: 0; padding: 0.75rem 0.75rem 0; row-gap: 4rem; }
}
@media (min-width: 1024px) {
    .nx-grid--feed { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Title and meta sit inset 20px from the picture's edge. */
.nx-card .nx-card-title {
    margin: 1.5rem 0 0;
    padding: 0 1.25rem;
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.35;
    letter-spacing: -0.01em;
    transition: color 0.15s ease;
}
.nx-card:hover .nx-card-title { color: rgba(10, 10, 10, 0.7); }
.nx-card .nx-card-meta {
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-top: 1rem;
    padding: 0 1.25rem;
    font-size: 0.9375rem;
    line-height: 1.25rem;
    color: var(--nx-grey);
}
.nx-card .nx-card-cat { color: var(--nx-ink); font-weight: 400; }
@media (max-width: 639px) {
    .nx-card .nx-card-title, .nx-card .nx-card-meta { padding: 0 0.25rem; }
}

.nx-band .nx-pager { margin-top: 0; padding: 3rem 0.75rem 0; }
