/* The Dec 2026 layout: the "Sunlit" Paper structure (design-reference/),
   drawn in the CURRENT brand: Inter, ink on white, cream panels, the blue
   button. The new brand (pocket-newbrand-6.css) reskins this same markup
   under html.pkt-nb, so layout lives here and looks live there.

   Replaces pocket-home.css (no longer linked) and sits over
   pocket-style.css and pocket-feed.css. Its own fresh file because
   uploaded CSS URLs pin stale (see docs). Linked from partials/nav.html,
   last of the current-brand sheets. Flat selectors only. */

:root {
    --nx-col: 1072px;             /* the column, gutters included */
    --nx-gut: 1.25rem;
    --nx-r-panel: 1rem;           /* featured card, newsletter, cover */
    --nx-r-shot: 1rem;            /* card pictures */
    --nx-shot-ratio: 3 / 2;       /* our cover art is 3:2 with type in it */
    --hx-blue: rgb(1, 113, 228);
    --nx-serif: inherit;          /* display face; the new brand sets one */
}
@media (min-width: 640px) { :root { --nx-gut: 2rem; } }

/* ── One column ─────────────────────────────────────────────── */
.nx-head--blog,
.nx-feed > .nx-wrap,
.nx-feed .nx-band > .nx-wrap,
.nx-keep {
    max-width: var(--nx-col);
    padding-left: var(--nx-gut);
    padding-right: var(--nx-gut);
}

/* ── Listing header: subtitle and title left, pills right ───── */
.nx-head--blog {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    margin-bottom: 2.5rem;
}
.nx-head-kicker {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    line-height: 1.4;
    color: var(--nx-grey);
}
.nx-head--blog .nx-head-title {
    font-family: var(--nx-serif);
    font-size: 2.5rem;
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.03em;
}
@media (min-width: 1024px) {
    .nx-head--blog {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
        gap: 2rem;
        margin-bottom: 2.5rem;
    }
    .nx-head-kicker { font-size: 1.125rem; }
    .nx-head--blog .nx-head-title { font-size: 3.75rem; }
}

/* Pills: hairline-ringed, the active one solid ink. */
.nx-head--blog .nx-tabs { margin: 0; padding: 0; gap: 0.5rem; align-items: center; }
@media (max-width: 639px) {
    .nx-head--blog .nx-tabs { margin: 0 calc(var(--nx-gut) * -1); padding: 0 var(--nx-gut); }
}
@media (min-width: 1024px) {
    .nx-head--blog .nx-tabs { flex-wrap: nowrap; padding-bottom: 0.5rem; }
}
.nx-tab {
    height: 2.5rem;
    padding: 0 1.125rem;
    border: 1px solid var(--nx-line);
    background: #fff;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--nx-ink);
}
.nx-tab::before { inset: -1px; }
.nx-tab-pill { inset: -1px; background: var(--nx-ink); box-shadow: none; }
.nx-tab.is-active,
.nx-tab.is-active:hover { color: #fff; border-color: var(--nx-ink); }

/* ── Shared bits ────────────────────────────────────────────── */
.hx-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.25rem;
    color: var(--nx-grey);
}
.hx-meta > * + *::before { content: "\00B7"; margin: 0 0.4em; }

.hx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    height: 3rem;
    padding: 0 1.625rem;
    border: 0;
    border-radius: 999px;
    background: var(--hx-blue);
    color: #fff;
    font: inherit;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: filter 0.15s ease;
}
.hx-btn:hover { filter: brightness(0.92); }

/* ── 1. Featured: copy left, picture right ──────────────────── */
.hx-hero-card {
    display: flex;
    flex-direction: column-reverse;
    overflow: hidden;
    border-radius: var(--nx-r-panel);
    background: var(--nx-cream);
}
.hx-hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    padding: 1.75rem 1.5rem 2rem;
}
.hx-hero-title {
    margin: 1rem 0 0;
    font-family: var(--nx-serif);
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-wrap: balance;
}
.hx-hero-title a { color: inherit; text-decoration: none; }
.hx-hero-title a:hover { opacity: 0.75; }
.hx-hero-excerpt {
    margin: 1rem 0 0;
    max-width: 32rem;
    font-size: 1.0625rem;
    line-height: 1.5;
    color: var(--nx-grey);
}
.hx-hero-shot {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: var(--nx-shot-ratio);
    background: var(--nx-cream);
}
.hx-hero-shot img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* The cover art carries type edge to edge, so the picture keeps its own
   ratio and sets the card's height; the copy is sized to fit beside it. */
.hx-hero-excerpt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}
@media (min-width: 1024px) {
    .hx-hero-card { flex-direction: row; align-items: stretch; }
    .hx-hero-copy { flex: 1 1 0; min-width: 0; padding: 2rem 2.25rem; gap: 1.25rem; }
    .hx-hero-shot { flex: 0 0 60%; }
    .hx-hero-title { font-size: 2rem; }
}

/* ── Sections ───────────────────────────────────────────────── */
.hx-section { margin-top: 4rem; }
.hx-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 0;
    border-bottom: 0;
}
.hx-section-title {
    margin: 0;
    font-family: var(--nx-serif);
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.02em;
}
.hx-section-link {
    flex: none;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--nx-ink);
    text-decoration: none;
}
.hx-section-link:hover { opacity: 0.7; }
@media (max-width: 639px) {
    .hx-section-title { font-size: 1.75rem; }
    .hx-section-link { font-size: 0.875rem; }
}
@media (min-width: 1024px) {
    .hx-section { margin-top: 5rem; }
    .hx-section-title { font-size: 2.5rem; }
}

/* ── Card grids: Latest (3), Work smarter (2), categories, Keep reading ── */
.nx-band { margin-top: 0; border-top: 0; }
.nx-band > .nx-wrap { padding-bottom: 6rem; }
.nx-band > .nx-wrap > .nx-grid--feed,
.nx-band > .nx-wrap > .nx-pager { border-left: 0; border-right: 0; }

.hx-cards {
    display: grid;
    margin: 0;
    padding: 0;
    column-gap: 1.5rem;
    row-gap: 3rem;
}
@media (min-width: 640px) {
    .hx-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0; }
    .hx-cards--2 { row-gap: 3.5rem; }
}
@media (min-width: 1024px) {
    .hx-cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 2rem; }
}

.hx-cards .nx-shot {
    aspect-ratio: var(--nx-shot-ratio);
    border: 0;
    border-radius: var(--nx-r-shot);
}
.hx-cards .nx-card-title {
    margin: 1.25rem 0 0;
    padding: 0;
    font-family: var(--nx-serif);
    font-size: 1.375rem;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: -0.01em;
}
.hx-cards .nx-card-meta {
    gap: 0;
    margin-top: 0.75rem;
    padding: 0;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: var(--nx-grey);
}
.hx-cards .nx-card-meta > * + *::before { content: "\00B7"; margin: 0 0.4em; color: var(--nx-grey); }
.hx-cards .nx-card-cat { color: var(--nx-ink); font-weight: 500; }
.hx-cards .nx-card:hover .nx-card-title { opacity: 0.75; color: inherit; }
@media (min-width: 1024px) {
    /* Three lines held open, so the meta lines up across a row. */
    .hx-cards--3 .nx-card-title { min-height: 3.75em; }
    .hx-cards--2 .nx-card-title { font-size: 1.5rem; }
}

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

/* ── 5. Newsletter: title left, pill field right ────────────── */
.hx-letter {
    display: grid;
    gap: 1.5rem;
    padding: 2rem 1.5rem;
    border: 1px solid var(--nx-line);
    border-radius: var(--nx-r-panel);
    background: #fff;
}
.hx-letter-title {
    margin: 0;
    max-width: 16ch;
    font-family: var(--nx-serif);
    font-size: 1.875rem;
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.02em;
}
.hx-letter-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.375rem 0.375rem 1.25rem;
    border-radius: 999px;
    background: var(--nx-cream);
}
.hx-letter-row input {
    flex: 1;
    min-width: 0;
    height: 2.5rem;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 1rem;
    color: var(--nx-ink);
    outline: none;
}
.hx-letter-row input::placeholder { color: var(--nx-grey); }
.hx-letter-row:focus-within { box-shadow: 0 0 0 2px var(--hx-blue); }
.hx-letter-row .hx-btn { height: 2.75rem; padding: 0 1.375rem; }
.hx-letter-form .message { margin: 0.75rem 0 0 1.25rem; font-size: 0.875rem; color: var(--nx-grey); }
@media (min-width: 1024px) {
    .hx-letter {
        grid-template-columns: minmax(0, 1fr) minmax(0, 27.5rem);
        align-items: center;
        gap: 3rem;
        padding: 2.5rem 2.75rem;
    }
    .hx-letter-title { font-size: 2.25rem; }
}

.hx > :last-child { margin-bottom: 6rem; }

/* ── The post ───────────────────────────────────────────────── */
.nx-post { padding: 3.5rem 0 0; }
@media (min-width: 640px) { .nx-post { padding: 4.5rem 0 0; } }

.nx-post-head {
    max-width: var(--nx-col);
    padding-left: var(--nx-gut);
    padding-right: var(--nx-gut);
}

/* "← Blog · Press · Aug 19, 2026", centred */
.nx-post-crumbs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin: 0 0 1.5rem;
    font-size: 0.9375rem;
    line-height: 1.25rem;
    color: var(--nx-grey);
}
.nx-post-crumbs > * + *::before { content: "\00B7"; margin: 0 0.6em; color: var(--nx-grey); }
.nx-post-crumbs .nx-back { display: inline; gap: 0; color: var(--nx-grey); }
.nx-post-crumbs .nx-back:hover,
.nx-post-cat:hover { color: var(--nx-ink); }
.nx-post-cat { color: var(--nx-ink); font-weight: 500; text-decoration: none; }

.nx-post-title { max-width: 60rem; font-family: var(--nx-serif); }
.nx-post-standfirst { max-width: 40rem; color: var(--nx-grey); }

.nx-post-cover { margin: 3rem 0 0; border: 0; border-radius: var(--nx-r-panel); }
@media (min-width: 640px) { .nx-post-cover { margin: 3.5rem 0 0; } }

/* Body, with "In this post" beside it from 1024px */
.nx-post-main {
    max-width: var(--nx-col);
    margin: 3.5rem auto 0;
    padding: 0 var(--nx-gut);
}
.nx-post-main .nx-post-body { max-width: 42.5rem; margin: 0 auto; padding: 0; }
.nx-contents { display: none; }
@media (min-width: 640px) { .nx-post-main { margin-top: 4.5rem; } }
@media (min-width: 1024px) {
    .nx-post-main.has-contents {
        display: grid;
        grid-template-columns: 12.5rem minmax(0, 42.5rem);
        justify-content: center;
        column-gap: 4.5rem;
    }
    .nx-post-main.has-contents .nx-post-body { margin: 0; }
    .nx-contents {
        display: block;
        position: sticky;
        top: 6rem;
        align-self: start;
        font-size: 0.9375rem;
        line-height: 1.2;
    }
}
.nx-contents-title { margin: 0; font-weight: 500; color: var(--nx-ink); }
.nx-contents ol { margin: 0; padding: 0; list-style: none; }
.nx-contents li { margin: 0.875rem 0 0; padding: 0; }
.nx-contents a { color: var(--nx-grey); text-decoration: none; transition: color 0.15s ease; }
.nx-contents a:hover,
.nx-contents a.is-current { color: var(--nx-ink); }

/* The cover is lifted out of the body (views/post.html), but when it came
   in an image widget the <figure> around it stays behind, empty, holding
   open a gap above the first paragraph. */
.nx-prose > figure:first-child:not(:has(img)) { display: none; }

/* Share row */
.nx-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--nx-line);
}
.nx-share-label { margin: 0; font-size: 0.9375rem; color: var(--nx-grey); }
.nx-share-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.nx-share-btn {
    display: inline-flex;
    align-items: center;
    height: 2.5rem;
    padding: 0 1rem;
    border: 1px solid var(--nx-line);
    border-radius: 999px;
    background: #fff;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--nx-ink);
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.15s ease;
}
.nx-share-btn:hover { border-color: rgba(10, 10, 10, 0.3); }

/* The promo banner keeps its own spacing (partials/bottom-banner.html). */

/* Keep reading */
.nx-keep { margin: 5rem auto 6rem; }
.nx-keep .hx-section-head { padding-top: 3.5rem; border-top: 1px solid var(--nx-line); }
@media (min-width: 1024px) { .nx-keep { margin-top: 6rem; } }

@media (prefers-reduced-motion: reduce) {
    .nx-contents a, .nx-share-btn, .hx-btn { transition: none; }
}
