/* ==========================================================================
   Power Essence — "facet" design system

   Everything here derives from the logo: a person resolving into countable
   low-poly triangles, with pieces breaking off and drifting away. The palette
   is sampled directly from that artwork, including its ground: the mark's own
   shadow facets are deep indigo (#151451, #211A64), so the page is indigo
   rather than neutral black.

   The six spectrum stops are not decoration. Each one is a content theme, and
   they run in the mark's own left-to-right order.
   ========================================================================== */

:root {
    /* Ground — sampled from the mark's darkest facets, taken deeper */
    --void:     #08071C;
    --deep:     #100E33;
    --deep-2:   #191545;
    --deep-3:   #241E5C;
    --edge:     rgba(255, 255, 255, 0.09);
    --edge-2:   rgba(255, 255, 255, 0.16);

    /* Ink */
    --text:     #F0ECFB;
    --dim:      #A9A2C8;
    --dimmer:   #7C749B;
    --cream:    #FEE4AE;   /* the lit plane of the face */

    /* The spectrum, in the mark's own order */
    --s1: #FEBE3F;  --s1-lit: #FFD173;
    --s2: #FD8A2E;  --s2-lit: #FFAA63;
    --s3: #FD524F;  --s3-lit: #FF817E;
    --s4: #C43A93;  --s4-lit: #F368BE;
    --s5: #6B34A8;  --s5-lit: #A97BE8;
    --s6: #02B5D0;  --s6-lit: #45D6EC;

    --spectrum: linear-gradient(100deg, var(--s1) 0%, var(--s2) 20%, var(--s3) 38%, var(--s4) 58%, var(--s5) 78%, var(--s6) 100%);
    /* Legible variant for text and thin rules, where --s5 would go too dark */
    --spectrum-lit: linear-gradient(100deg, var(--s1) 0%, var(--s3) 30%, var(--s4-lit) 55%, var(--s5-lit) 76%, var(--s6) 100%);

    /* Default theme colour, overridden per element by [data-spectrum] */
    --t: var(--s3);
    --t-lit: var(--s3-lit);

    /* Type */
    --font-display: 'Bricolage Grotesque', 'Segoe UI', sans-serif;
    --font-body:    'Newsreader', Georgia, serif;
    --font-mono:    'IBM Plex Mono', ui-monospace, monospace;

    --fs-label: 0.75rem;
    --fs-sm:    0.9375rem;
    --fs-base:  1.0625rem;
    --fs-read:  1.1875rem;
    --fs-lg:    1.375rem;
    --fs-xl:    clamp(1.5rem, 2.4vw, 1.95rem);
    --fs-2xl:   clamp(2rem, 4vw, 3rem);
    --fs-3xl:   clamp(2.5rem, 6vw, 4.6rem);

    /* Geometry — the chamfer is the signature, so it is a token */
    --chamfer:    30px;
    --chamfer-sm: 12px;

    --container:  1200px;
    --measure:    64ch;
    --nav-h:      68px;
}

/* The six themes. One source of truth for theme colour, referenced by a
   data-spectrum index on any element that needs to carry a theme. */
[data-spectrum="1"] { --t: var(--s1); --t-lit: var(--s1-lit); }
[data-spectrum="2"] { --t: var(--s2); --t-lit: var(--s2-lit); }
[data-spectrum="3"] { --t: var(--s3); --t-lit: var(--s3-lit); }
[data-spectrum="4"] { --t: var(--s4); --t-lit: var(--s4-lit); }
[data-spectrum="5"] { --t: var(--s5); --t-lit: var(--s5-lit); }
[data-spectrum="6"] { --t: var(--s6); --t-lit: var(--s6-lit); }

/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 1.5rem);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background-color: var(--void);
    /* Isometric triangle lattice — the facet grid, kept almost subliminal */
    background-image:
        repeating-linear-gradient(60deg,  rgba(255,255,255,0.022) 0 1px, transparent 1px 68px),
        repeating-linear-gradient(-60deg, rgba(255,255,255,0.022) 0 1px, transparent 1px 68px),
        repeating-linear-gradient(0deg,   rgba(255,255,255,0.014) 0 1px, transparent 1px 59px);
    color: var(--text);
    font-family: var(--font-body);
    font-size: var(--fs-base);
    line-height: 1.65;
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; margin: 0; list-style: none; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
button { font: inherit; cursor: pointer; }

::selection { background: var(--s4); color: #fff; }

:focus-visible {
    outline: 2px solid var(--s1);
    outline-offset: 3px;
    border-radius: 1px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 1000;
    background: var(--s1);
    color: var(--void);
    padding: 0.75rem 1.25rem;
    font-family: var(--font-mono);
    font-weight: 600;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   Layout helpers
   -------------------------------------------------------------------------- */

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 1.5rem; }

.band { padding: clamp(3.5rem, 7vw, 6.5rem) 0; }
.band--tight { padding: clamp(2.5rem, 4vw, 3.5rem) 0; }
.band--edge { border-top: 1px solid var(--edge); }

/* The signature: a chamfered panel with a lit bevel on the cut corner. The
   parent's clip-path does the triangle for us, so ::after only needs to be a
   plain square tucked into the corner. */
.facet {
    position: relative;
    background: var(--deep);
    clip-path: polygon(0 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer), 100% 100%, 0 100%);
}
.facet::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: var(--chamfer);
    height: var(--chamfer);
    background: var(--t);
    transition: width 0.25s ease, height 0.25s ease;
}

/* --------------------------------------------------------------------------
   Type roles
   -------------------------------------------------------------------------- */

.label {
    display: inline-block;
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: var(--fs-label);
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--dim);
}
.label--theme { color: var(--t-lit); }

.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 3.5vw, 3rem); }
.section-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--fs-2xl);
    line-height: 1.04;
    letter-spacing: -0.025em;
    margin-top: 0.7rem;
}
.section-intro {
    font-size: var(--fs-read);
    color: var(--dim);
    margin-top: 0.9rem;
    max-width: 42rem;
}

/* A hairline carrying the full spectrum. Used as a section rule. */
.rule {
    height: 2px;
    background: var(--spectrum);
    border: 0;
    margin: 0;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--fs-sm);
    letter-spacing: 0.005em;
    padding: 0.85rem 1.5rem;
    color: var(--text);
    background: var(--deep-2);
    clip-path: polygon(0 0, calc(100% - var(--chamfer-sm)) 0, 100% var(--chamfer-sm), 100% 100%, 0 100%);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.btn:hover { transform: translateY(-2px); background: var(--deep-3); }
.btn:focus-visible { outline-offset: 2px; }

.btn--primary {
    background: var(--s1);
    color: var(--void);
    font-weight: 700;
}
.btn--primary:hover { background: var(--s1-lit); color: var(--void); }

.btn--ghost {
    background: transparent;
    box-shadow: inset 0 0 0 1px var(--edge-2);
    color: var(--text);
}
.btn--ghost:hover { background: var(--deep-2); box-shadow: inset 0 0 0 1px var(--edge-2); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.85rem; }

/* Inline text link with a spectrum underline that fills on hover */
.tlink {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--fs-sm);
    color: var(--t-lit);
    position: relative;
    padding-bottom: 2px;
}
.tlink::after {
    content: '';
    position: absolute;
    left: 0; right: 100%;
    bottom: 0;
    height: 1.5px;
    background: currentColor;
    transition: right 0.25s ease;
}
.tlink:hover::after, .tlink:focus-visible::after { right: 0; }

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */

.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(8, 7, 28, 0.86);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--edge);
}
.nav-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
    min-height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}
.nav-brand { display: inline-flex; align-items: center; gap: 0.7rem; }
.nav-brand img { width: 36px; height: 36px; }
.nav-wordmark {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
    color: var(--text);
    background: var(--spectrum-lit);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: var(--fs-sm);
}
.nav-links a { position: relative; padding: 0.4rem 0; color: var(--dim); transition: color 0.18s ease; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a::after {
    content: '';
    position: absolute;
    left: 0; right: 100%;
    bottom: 0;
    height: 2px;
    background: var(--spectrum);
    transition: right 0.22s ease;
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { right: 0; }

/* Scoped to beat `.nav-links a` (0,1,1), which would otherwise repaint the
   button's label with the link colour on both rest and hover. */
.nav-links a.nav-cta {
    flex: none;
    white-space: nowrap;
    padding: 0.6rem 1.1rem;
    font-size: var(--fs-label);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--void);
}
.nav-links a.nav-cta:hover { color: var(--void); }
.nav-links a.nav-cta::after { display: none; }

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--edge-2);
    color: var(--text);
    padding: 0.45rem;
    line-height: 0;
}
.nav-close { display: none; }
.nav-links.is-open ~ .nav-toggle .nav-close,
.nav-toggle[aria-expanded="true"] .nav-close { display: block; }
.nav-toggle[aria-expanded="true"] .nav-burger { display: none; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
    position: relative;
    padding: clamp(3rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5.5rem);
    overflow: hidden;
}
/* Ambient bloom, warm on the left and cool on the right, matching the mark */
.hero::before {
    content: '';
    position: absolute;
    inset: -30% -10% auto -10%;
    height: 130%;
    background:
        radial-gradient(46rem 30rem at 78% 34%, rgba(107, 52, 168, 0.34), transparent 68%),
        radial-gradient(34rem 24rem at 92% 62%, rgba(2, 181, 208, 0.16), transparent 70%),
        radial-gradient(30rem 22rem at 12% 12%, rgba(254, 190, 63, 0.10), transparent 70%);
    pointer-events: none;
}
.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: clamp(2rem, 5vw, 4.5rem);
    align-items: center;
}
.hero-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: var(--fs-3xl);
    line-height: 0.98;
    letter-spacing: -0.035em;
    margin: 1rem 0 0;
    text-wrap: balance;
}
.hero-title em {
    font-style: normal;
    background: var(--spectrum-lit);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-rule { margin: 1.6rem 0; max-width: 22rem; transform-origin: left center; }
.hero-deck {
    font-size: clamp(1.1rem, 1.7vw, 1.4rem);
    line-height: 1.55;
    color: var(--dim);
    max-width: 34rem;
}
.hero-deck strong { color: var(--text); font-weight: 500; }
.hero-cta { margin-top: 2.2rem; }

.hero-art { position: relative; justify-self: center; width: 100%; max-width: 460px; }
.hero-mark { width: 100%; height: auto; position: relative; z-index: 2; }
.hero-art::before {
    content: '';
    position: absolute;
    inset: 8%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(196, 58, 147, 0.40), rgba(107, 52, 168, 0.16) 55%, transparent 72%);
    filter: blur(34px);
    z-index: 1;
}
/* Drifting facets, lifted from the triangles breaking off the hair */
.facet-field { position: absolute; inset: -6% -10% -6% -22%; z-index: 3; pointer-events: none; overflow: visible; }
.facet-field polygon { animation: drift 14s ease-in-out infinite; transform-origin: center; }

@keyframes drift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50%      { transform: translate(-7px, -11px) rotate(-7deg); }
}

/* Page-load sequence: the structure arrives, then the colour */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes bloom { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }

.hero-label { animation: rise 0.6s 0.05s both ease-out; }
.hero-title { animation: rise 0.75s 0.14s both cubic-bezier(0.2, 0.7, 0.3, 1); }
.hero-rule  { animation: draw 0.7s 0.5s both cubic-bezier(0.5, 0, 0.2, 1); }
.hero-deck  { animation: rise 0.7s 0.62s both ease-out; }
.hero-cta   { animation: rise 0.7s 0.74s both ease-out; }
.hero-art   { animation: bloom 1.1s 0.2s both cubic-bezier(0.2, 0.7, 0.3, 1); }

/* --------------------------------------------------------------------------
   Article cards — a grid of these should read as a field of facets
   -------------------------------------------------------------------------- */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 1.5rem;
}

.card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    transition: transform 0.22s ease, background 0.22s ease;
}
.card:hover { transform: translateY(-4px); background: var(--deep-2); }
.card:hover::after { width: calc(var(--chamfer) + 12px); height: calc(var(--chamfer) + 12px); }
.card:focus-within { background: var(--deep-2); }

.card-thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--deep-2);
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card:hover .card-thumb img { transform: scale(1.04); }

.card-body { padding: 1.5rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: 0.7rem; flex: 1; }
.card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem; }
.card-meta .label { color: var(--dimmer); }
.card-theme {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font-mono);
    font-size: var(--fs-label);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--t-lit);
}
/* A single triangle, the smallest unit of the mark */
.card-theme::before {
    content: '';
    width: 9px; height: 8px;
    background: var(--t);
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
    flex: none;
}

.card-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: var(--fs-lg);
    line-height: 1.18;
    letter-spacing: -0.02em;
}
.card-title a { display: block; }
.card:hover .card-title { color: var(--t-lit); }

/* The deck is the payoff line in this publication's voice, so it gets real
   typographic weight instead of being grey filler under the title. */
.card-deck {
    font-family: var(--font-body);
    font-style: italic;
    font-size: var(--fs-base);
    line-height: 1.5;
    color: var(--dim);
}
.card-foot { margin-top: auto; padding-top: 0.4rem; }

/* Featured article: same anatomy, laid out wide */
.featured {
    --chamfer: 46px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
    margin-bottom: 1.5rem;
    transition: background 0.22s ease;
}
.featured:hover { background: var(--deep-2); }
.featured:hover::after { width: calc(var(--chamfer) + 14px); height: calc(var(--chamfer) + 14px); }
.featured-body { padding: clamp(1.75rem, 3.5vw, 3rem); display: flex; flex-direction: column; gap: 1rem; justify-content: center; }
.featured-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--fs-xl);
    line-height: 1.08;
    letter-spacing: -0.028em;
}
.featured:hover .featured-title { color: var(--t-lit); }
.featured-deck {
    font-style: italic;
    font-size: clamp(1.1rem, 1.5vw, 1.3rem);
    line-height: 1.5;
    color: var(--dim);
}
.featured-thumb { position: relative; overflow: hidden; background: var(--deep-2); min-height: 260px; min-width: 0; }
.featured-thumb img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }

/* Generated artwork for posts and ebooks with no image of their own */
.facet-plane { display: block; width: 100%; height: 100%; }
.card-thumb .facet-plane, .featured-thumb .facet-plane { position: absolute; inset: 0; }
/* Knock the fallback plane back a little so the headline stays dominant. The
   card's own bevel still paints on top, since .facet::after comes later. */
.card-thumb::after, .featured-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(200deg, rgba(8, 7, 28, 0.06), rgba(8, 7, 28, 0.38));
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   Theme ladder — six rows that together redraw the logo's spectrum
   -------------------------------------------------------------------------- */

.ladder { display: flex; flex-direction: column; }
.ladder-row {
    display: grid;
    grid-template-columns: 4px minmax(0, 15rem) minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.75rem;
    padding: 1.5rem 1.25rem 1.5rem 0;
    border-bottom: 1px solid var(--edge);
    transition: background 0.2s ease, padding-left 0.2s ease;
}
.ladder-row:first-child { border-top: 1px solid var(--edge); }
.ladder-row:hover { background: var(--deep); padding-left: 0.75rem; }
.ladder-bar { align-self: stretch; background: var(--t); min-height: 46px; }
.ladder-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.25rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
}
.ladder-row:hover .ladder-name { color: var(--t-lit); }
.ladder-desc { color: var(--dim); font-size: var(--fs-base); line-height: 1.5; }
.ladder-count { font-family: var(--font-mono); font-size: var(--fs-label); color: var(--dimmer); white-space: nowrap; letter-spacing: 0.1em; }

/* --------------------------------------------------------------------------
   Ebooks
   -------------------------------------------------------------------------- */

.ebook-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 2rem; }

.ebook-card { display: flex; flex-direction: column; gap: 1.1rem; }
.ebook-card:hover .ebook-cover { transform: translateY(-5px) rotate(-0.6deg); }

/* Generated cover: a facet plane in the theme's colour with the title set on
   it. Real cover art can replace this per ebook via front matter. */
.ebook-cover {
    position: relative;
    aspect-ratio: 3 / 4;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.4rem;
    overflow: hidden;
    background: var(--deep);
    clip-path: polygon(0 0, calc(100% - 34px) 0, 100% 34px, 100% 100%, 0 100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.3, 1);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.45);
}
.ebook-cover .facet-plane { position: absolute; inset: 0; }
/* Scrim so the title stays legible over whichever facet lands behind it */
.ebook-cover::before {
    content: '';
    position: absolute; inset: 0;
    z-index: 1;
    background: linear-gradient(to top, rgba(8, 7, 28, 0.92) 4%, rgba(8, 7, 28, 0.45) 34%, transparent 62%);
}
.ebook-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.ebook-cover-text { position: relative; z-index: 2; }
.ebook-cover-title {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.3rem;
    line-height: 1.1;
    letter-spacing: -0.025em;
    text-wrap: balance;
}
.ebook-cover-kicker { display: block; margin-bottom: 0.5rem; color: var(--cream); }

.ebook-info { display: flex; flex-direction: column; gap: 0.5rem; }
.ebook-name { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; letter-spacing: -0.015em; }
.ebook-blurb { color: var(--dim); font-size: var(--fs-sm); line-height: 1.55; }
.ebook-status {
    font-family: var(--font-mono);
    font-size: var(--fs-label);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--t-lit);
}

/* Ebook detail page */
.ebook-hero { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.ebook-hero .ebook-cover { max-width: 320px; }
.ebook-hero-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2rem, 4.4vw, 3.2rem);
    line-height: 1.02;
    letter-spacing: -0.032em;
    margin-top: 0.8rem;
}
.ebook-hero-deck { font-style: italic; font-size: clamp(1.1rem, 1.6vw, 1.35rem); color: var(--dim); margin-top: 1rem; line-height: 1.5; }
.ebook-facts { display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; margin-top: 1.6rem; }
.ebook-fact { display: flex; flex-direction: column; gap: 0.15rem; }
.ebook-fact-value { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }

.contents-list { display: flex; flex-direction: column; margin-top: 0.5rem; }
.contents-item {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--edge);
    align-items: baseline;
}
/* Chapters genuinely are a sequence, so numbering carries information here */
.contents-num { font-family: var(--font-mono); font-size: var(--fs-label); color: var(--t-lit); letter-spacing: 0.1em; }
.contents-text { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-base); }

/* --------------------------------------------------------------------------
   Newsletter strip + subscribe
   -------------------------------------------------------------------------- */

.strip-list { display: flex; flex-direction: column; }
.strip-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.5rem;
    align-items: baseline;
    padding: 1.15rem 0;
    border-bottom: 1px solid var(--edge);
    transition: color 0.18s ease;
}
.strip-item:first-child { border-top: 1px solid var(--edge); }
.strip-item:hover { color: var(--s1); }
.strip-title { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-base); line-height: 1.3; }
.strip-date { font-family: var(--font-mono); font-size: var(--fs-label); color: var(--dimmer); white-space: nowrap; }

.subscribe { --chamfer: 46px; padding: clamp(2.5rem, 5vw, 4rem); text-align: center; background: var(--deep); }
.subscribe::after { background: var(--spectrum); }
.subscribe-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--fs-2xl);
    line-height: 1.05;
    letter-spacing: -0.028em;
    margin-top: 0.7rem;
}
.subscribe-text { color: var(--dim); font-size: var(--fs-read); margin: 1rem auto 2rem; max-width: 34rem; }

/* --------------------------------------------------------------------------
   Page headers, pagination
   -------------------------------------------------------------------------- */

.page-head { padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(1.5rem, 3vw, 2.5rem); position: relative; }
.page-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.2rem, 5.2vw, 4rem);
    line-height: 1.0;
    letter-spacing: -0.035em;
    margin-top: 0.8rem;
}
.page-intro { font-size: var(--fs-read); color: var(--dim); margin-top: 1.1rem; max-width: 44rem; }

.backlink {
    /* flex + fit-content so it takes its own line without stretching */
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-mono);
    font-size: var(--fs-label);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--dim);
    margin-bottom: 1.5rem;
}
.backlink:hover { color: var(--s1); }

.pagination { display: flex; align-items: center; justify-content: center; gap: 1.5rem; margin-top: 3rem; font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--dim); }
.pagination a:hover { color: var(--s1); }

/* --------------------------------------------------------------------------
   Article page
   -------------------------------------------------------------------------- */

.post { padding: clamp(2rem, 4vw, 3.5rem) 0 clamp(3rem, 6vw, 5rem); }
.post-head { margin-bottom: 2.5rem; }
.post-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.1rem, 5vw, 3.6rem);
    line-height: 1.02;
    letter-spacing: -0.034em;
    margin: 1rem 0 0;
    text-wrap: balance;
}
.post-deck {
    font-style: italic;
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    line-height: 1.45;
    color: var(--dim);
    margin-top: 1.2rem;
}
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--edge); }

.byline { display: inline-flex; align-items: center; gap: 0.65rem; }
.byline img, .byline-initial {
    width: 34px; height: 34px;
    object-fit: cover;
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    flex: none;
}
.byline-initial {
    display: grid; place-items: center;
    background: var(--t);
    color: var(--void);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
}
.byline-text { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-sm); }
.byline-text a:hover { color: var(--s1); }

/* Prose */
.prose { font-size: var(--fs-read); line-height: 1.75; color: #E2DDF2; max-width: var(--measure); }
.prose > * + * { margin-top: 1.4em; }
.prose p { text-wrap: pretty; }
.prose h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.75rem;
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--text);
    margin-top: 2.6em;
}
.prose h3 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.3rem;
    letter-spacing: -0.018em;
    color: var(--text);
    margin-top: 2.1em;
}
.prose strong { color: var(--text); font-weight: 600; }
.prose em { color: var(--cream); }
.prose a { color: var(--s1); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { color: var(--s1-lit); }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose ul { list-style: none; }
.prose ol { list-style: decimal; }
.prose li { margin-top: 0.6em; padding-left: 0.3rem; }
.prose ul li { position: relative; }
/* The bullet is a single facet */
.prose ul li::before {
    content: '';
    position: absolute;
    left: -1.25rem; top: 0.68em;
    width: 9px; height: 8px;
    background: var(--t);
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.prose blockquote {
    padding: 0.2rem 0 0.2rem 1.6rem;
    border-left: 2px solid var(--t);
    font-size: 1.28rem;
    line-height: 1.45;
    color: var(--text);
}
.prose figure { margin: 2.4em 0; }
.prose figcaption { font-family: var(--font-mono); font-size: var(--fs-label); color: var(--dimmer); margin-top: 0.8rem; line-height: 1.6; }
.prose figcaption a { color: var(--dim); }
.prose img { width: 100%; }
.prose hr { border: 0; height: 1px; background: var(--edge); margin: 3em 0; }
.prose code { font-family: var(--font-mono); font-size: 0.88em; background: var(--deep-2); padding: 0.15em 0.4em; }
.prose pre { background: var(--deep); padding: 1.25rem; overflow-x: auto; font-size: 0.9rem; }
.prose pre code { background: none; padding: 0; }

.post-foot { max-width: var(--measure); margin-top: 3.5rem; }
.share { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.share-link { display: grid; place-items: center; width: 38px; height: 38px; background: var(--deep-2); color: var(--dim); transition: background 0.18s ease, color 0.18s ease; }
.share-link:hover { background: var(--s4); color: #fff; }

.author-box { --chamfer: 26px; display: flex; gap: 1.25rem; padding: 1.75rem; margin-top: 3rem; max-width: var(--measure); }
.author-box img, .author-box .byline-initial { width: 64px; height: 64px; font-size: 1.5rem; }
.author-box-name { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.author-box-desc { color: var(--dim); font-size: var(--fs-sm); line-height: 1.55; margin-top: 0.35rem; }

.post-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-top: 3rem; }
.post-nav-link { --chamfer: 20px; padding: 1.25rem; display: flex; flex-direction: column; gap: 0.4rem; transition: background 0.2s ease; }
.post-nav-link:hover { background: var(--deep-2); }
.post-nav-title { font-family: var(--font-display); font-weight: 500; font-size: var(--fs-sm); line-height: 1.3; }
.post-nav--next { text-align: right; }
.post-nav--next.facet { clip-path: polygon(var(--chamfer) 0, 100% 0, 100% 100%, 0 100%, 0 var(--chamfer)); }
.post-nav--next.facet::after { right: auto; left: 0; }

/* --------------------------------------------------------------------------
   Author pages
   -------------------------------------------------------------------------- */

.author-head { display: flex; align-items: center; gap: 1.75rem; flex-wrap: wrap; }
.author-avatar {
    width: 110px; height: 110px;
    object-fit: cover;
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    flex: none;
}
.author-avatar--blank { display: grid; place-items: center; background: var(--spectrum); color: var(--void); font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; }
.author-social { display: flex; gap: 0.6rem; margin-top: 1rem; }
.author-social a { display: grid; place-items: center; width: 36px; height: 36px; background: var(--deep-2); color: var(--dim); }
.author-social a:hover { background: var(--s4); color: #fff; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer { border-top: 1px solid var(--edge); padding: clamp(2.5rem, 5vw, 4rem) 0 2rem; margin-top: clamp(3rem, 6vw, 5rem); }
.footer-top { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; }
.footer-brand { display: inline-flex; align-items: center; gap: 0.7rem; margin-bottom: 1rem; }
.footer-brand img { width: 40px; height: 40px; }
.footer-tagline { color: var(--dim); font-size: var(--fs-sm); max-width: 24rem; line-height: 1.6; }
.footer-col-title { font-family: var(--font-mono); font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.14em; color: var(--dimmer); margin-bottom: 1rem; }
.footer-list { display: flex; flex-direction: column; gap: 0.6rem; font-size: var(--fs-sm); }
.footer-list a { color: var(--dim); }
.footer-list a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--edge); }
.footer-fine { font-family: var(--font-mono); font-size: var(--fs-label); color: var(--dimmer); letter-spacing: 0.05em; }
.footer-spectrum { display: flex; height: 4px; width: 140px; }
.footer-spectrum span { flex: 1; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

/* Single-column tracks are minmax(0, 1fr) rather than 1fr throughout. A bare
   1fr track cannot shrink below its item's min-content width, and an item with
   both min-height and aspect-ratio has a large one, which blows the grid out
   past the viewport. */
@media (max-width: 940px) {
    .hero-grid { grid-template-columns: minmax(0, 1fr); }
    .hero-art { order: -1; max-width: 300px; }
    .hero-deck, .hero-rule { max-width: none; }
    .featured { grid-template-columns: minmax(0, 1fr); }
    .featured-thumb { min-height: 0; order: -1; aspect-ratio: 16 / 9; }
    .ebook-hero { grid-template-columns: minmax(0, 1fr); }
    .ebook-hero .ebook-cover { max-width: 260px; }
    .footer-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .ladder-row { grid-template-columns: 4px minmax(0, 1fr) auto; row-gap: 0.5rem; }
    .ladder-desc { grid-column: 2 / -1; }
}

@media (max-width: 760px) {
    :root { --chamfer: 24px; }

    .nav-toggle { display: block; }
    .nav-links {
        position: absolute;
        top: 100%; left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--void);
        border-bottom: 1px solid var(--edge);
        padding: 0.5rem 1.5rem 1.25rem;
        display: none;
    }
    .nav-links.is-open { display: flex; }
    .nav-links a { padding: 0.85rem 0; border-bottom: 1px solid var(--edge); font-size: var(--fs-base); }
    .nav-links a::after { display: none; }
    .nav-cta { margin-top: 1rem; justify-content: center; border-bottom: 0; }

    .card-grid { grid-template-columns: minmax(0, 1fr); }
    .ebook-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.5rem; }
    .featured { --chamfer: 30px; }
    .subscribe { --chamfer: 30px; }
    .footer-top { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .post-nav--next { text-align: left; }
}

@media (max-width: 460px) {
    .ebook-grid { grid-template-columns: minmax(0, 1fr); }
    .author-head { gap: 1.25rem; }
    .author-avatar { width: 84px; height: 84px; }
}

/* --------------------------------------------------------------------------
   Motion preferences
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .hero-label, .hero-title, .hero-rule, .hero-deck, .hero-cta, .hero-art { animation: none; opacity: 1; transform: none; }
    .card:hover, .btn:hover, .ebook-card:hover .ebook-cover { transform: none; }
}
