/* Imperfect Practice — Field Notes theme
   Type: Instrument Serif (display), Newsreader (body), IBM Plex Mono (labels) */

:root {
    --ink: #17150F;
    --paper: #F2ECE0;
    --paper-2: #E8E0D0;
    --card: #F7F2E9;
    --body: #3E382E;
    --text: #221F19;
    --muted: #5C5446;
    --rule: #CFC3AE;
    --rule-2: #A89C88;
    --rust: #9A3E1F;
    --accent: #E07A4F;
    --dark-text: #CFC6B4;
    --dark-muted: #8F8674;
    --dark-rule: #3A352C;
    --pillar: #17150F;

    --display: var(--gh-font-heading, 'Instrument Serif', Georgia, serif);
    --serif: var(--gh-font-body, 'Newsreader', Georgia, serif);
    --mono: 'IBM Plex Mono', ui-monospace, monospace;

    --gutter: clamp(20px, 5.5vw, 80px);
    --max: 1440px;
}

.pillar-the-foundation { --pillar: #9A4A2E; }
.pillar-the-instrument { --pillar: #4F6378; }
.pillar-the-voice      { --pillar: #7D6594; }
.pillar-the-well       { --pillar: #5E6B45; }
.pillar-the-practice   { --pillar: #B58A3C; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--serif);
    font-size: 18px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--rust); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
button { font: inherit; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: 12px 16px; z-index: 100; }
.skip-link:focus { left: 12px; top: 12px; }

.display { font-family: var(--display); font-weight: 400; font-size: clamp(36px, 4vw, 52px); line-height: 1; letter-spacing: -0.01em; }
.display em { font-style: italic; color: var(--accent); }

.mono-label {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}
.mono-link {
    font-family: var(--mono);
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--rust);
}
.meta-row { display: flex; flex-wrap: wrap; gap: 6px 18px; font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.meta-row__accent { color: var(--rust); }

.pillar-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--pillar); flex-shrink: 0; }

/* ---------- Header ---------- */
.site-header { background: var(--ink); color: var(--paper); position: relative; z-index: 10; }
.site-header__inner {
    max-width: var(--max); margin: 0 auto; padding: 0 12px 0 var(--gutter);
    min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
    border-bottom: 1px solid var(--dark-rule);
}
.site-header__brand { font-family: var(--mono); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; }
.site-header__brand span { color: var(--dark-muted); display: none; }
.site-header__brand:hover { color: var(--paper); }
.site-header__actions { display: flex; align-items: center; gap: 16px; font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }
.site-header__signin { color: var(--dark-text); display: none; }
.btn-outline { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--accent); color: var(--paper); }
.btn-outline:hover { background: var(--accent); color: var(--ink); }
.site-header__menu { width: 44px; height: 44px; border: 0; background: transparent; color: var(--paper); display: flex; align-items: center; justify-content: center; cursor: pointer; }

.site-nav { display: none; }
.site-nav .nav { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; }
.site-nav .nav a { font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dark-text); }
.site-nav .nav a:hover, .site-nav .nav-current a { color: var(--paper); }
.site-nav .nav-current a { text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--accent); }
.home-template .site-nav .nav-start-here a { text-decoration: none; color: var(--dark-text); }

.site-nav.is-open {
    display: block; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--ink); border-bottom: 1px solid var(--dark-rule); padding: 8px var(--gutter) 20px;
}
.site-nav.is-open .nav { flex-direction: column; gap: 0; }
.site-nav.is-open .nav a { display: flex; align-items: center; min-height: 48px; border-bottom: 1px solid var(--dark-rule); font-size: 14px; }

@media (min-width: 1100px) {
    .site-header__inner { min-height: 72px; padding-right: var(--gutter); }
    .site-header__brand { font-size: 15px; }
    .site-header__brand span { display: inline; }
    .site-header__signin { display: inline; }
    .site-header__menu { display: none; }
    .site-nav, .site-nav.is-open { display: block; position: static; padding: 0; border: 0; background: none; }
    .site-nav.is-open .nav { flex-direction: row; gap: 28px; }
    .site-nav.is-open .nav a { display: inline; min-height: 0; border: 0; font-size: 13px; }
}

/* ---------- Subscribe form ---------- */
.subscribe { display: flex; flex-direction: column; gap: 8px; max-width: 600px; }
.subscribe__row { display: flex; border-bottom: 1px solid currentColor; }
.subscribe input {
    flex: 1 1 auto; min-width: 0; height: 54px; border: 0; padding: 0; background: transparent;
    font-family: var(--serif); font-size: 19px; color: inherit;
}
.subscribe input::placeholder { color: var(--dark-muted); }
.subscribe input:focus { outline: none; }
.subscribe__row:focus-within { border-bottom-color: var(--accent); }
.subscribe button {
    height: 54px; padding: 0 0 0 16px; border: 0; background: transparent; cursor: pointer;
    font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); white-space: nowrap;
}
.subscribe__note { font-size: 15px; color: var(--dark-muted); }
.subscribe__msg { display: none; font-size: 15px; }
.subscribe.success .subscribe__msg--success { display: block; }
.subscribe.error .subscribe__msg--error { display: block; color: var(--accent); }
.subscribe.loading button { opacity: 0.5; }

/* ---------- Home: hero ---------- */
.hero { background: var(--ink); color: var(--paper); }
.hero__inner { max-width: var(--max); margin: 0 auto; padding: 36px var(--gutter) 36px; display: grid; gap: 28px; }
.hero__copy { display: flex; flex-direction: column; gap: 18px; }
.hero__title { font-family: var(--display); font-size: clamp(52px, 7vw, 92px); line-height: 0.95; letter-spacing: -0.015em; }
.hero__title em { color: var(--accent); }
.hero__title br { display: none; }
.hero__lede { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--dark-text); max-width: 660px; }
.hero .mono-label { color: var(--dark-muted); }
.hero__byline { margin: 0; display: flex; gap: 14px; align-items: center; padding-top: 18px; border-top: 1px solid var(--dark-rule); font-size: 15px; line-height: 1.45; color: var(--dark-text); }
.hero__byline strong { color: var(--paper); font-weight: 400; }
.hero__byline a { color: var(--accent); }
.hero__portrait { width: 64px; height: 76px; object-fit: cover; flex-shrink: 0; }

@media (min-width: 900px) {
    .hero__inner { grid-template-columns: minmax(0, 1fr) 300px; gap: 88px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
    .hero__title br { display: inline; }
    .hero__byline { flex-direction: column; align-items: flex-start; gap: 16px; padding-top: 0; border-top: 0; font-size: 17px; line-height: 1.5; }
    .hero__portrait { width: 300px; height: 360px; }
}

/* ---------- Home: latest ---------- */
.latest { max-width: var(--max); margin: 0 auto; padding: 32px var(--gutter) 48px; display: grid; gap: 32px; }
.latest__lead { display: flex; flex-direction: column; gap: 14px; }
.latest__image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.latest__title { font-family: var(--display); font-size: clamp(42px, 5vw, 68px); line-height: 1; letter-spacing: -0.01em; }
.latest__excerpt { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; color: var(--body); max-width: 720px; }
.latest__side { display: flex; flex-direction: column; gap: 28px; }

.wrap-card { display: flex; flex-direction: column; gap: 10px; padding: 22px; background: var(--ink); color: var(--paper); }
.wrap-card:hover { color: var(--paper); }
.wrap-card:hover .wrap-card__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.wrap-card .mono-label { color: var(--dark-muted); }
.wrap-card .mono-link { color: var(--accent); }
.wrap-card__title { font-family: var(--display); font-size: 30px; line-height: 1.05; }
.wrap-card__excerpt { font-size: 17px; line-height: 1.45; color: var(--dark-text); }

@media (min-width: 1000px) {
    .latest { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 56px; padding-top: 56px; padding-bottom: 72px; }
}

/* ---------- Log (rows) ---------- */
.log { display: flex; flex-direction: column; border-top: 2px solid var(--ink); }
.log__head { display: flex; justify-content: space-between; padding: 0 0 10px; margin-top: -2px; border-bottom: 2px solid var(--ink); font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.log--compact { border-top: 0; }
.log__head a { color: var(--rust); }
.log-row { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 4px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.log-row__date, .log-row__type, .log-row__read { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.log-row__type { color: var(--rust); }
.log-row__title { grid-column: 1 / -1; font-family: var(--display); font-size: 23px; line-height: 1.15; }
.log-row__read { display: none; }
.log--compact .log-row:nth-child(n+6) { display: none; } /* head + 4 rows */
.log__cols { display: none; }

@media (min-width: 900px) {
    .log--table .log__cols, .log--table .log-row {
        display: grid; grid-template-columns: 150px 170px minmax(0, 1fr) 80px; column-gap: 24px; align-items: baseline;
    }
    .log--table .log__cols { padding: 12px 0; border-bottom: 1px solid var(--ink); font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
    .log--table .log__cols span:last-child, .log--table .log-row__read { text-align: right; }
    .log--table .log-row { padding: 22px 0; }
    .log--table .log-row__date, .log--table .log-row__type, .log--table .log-row__read { font-size: 14px; }
    .log--table .log-row__title { grid-column: auto; font-size: 32px; line-height: 1.1; }
    .log--table .log-row__read { display: block; }
}

/* ---------- Home: start here ---------- */
.start-here { background: var(--paper-2); padding: 40px var(--gutter) 44px; display: grid; gap: 20px; }
.start-here > * { max-width: calc(var(--max) - 2 * 80px); width: 100%; margin: 0 auto; }
.start-here__intro { display: flex; flex-direction: column; gap: 14px; }
.start-here__intro p { color: var(--body); }
.start-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.start-list li { border-bottom: 1px solid #B5A993; }
.start-list a { display: flex; gap: 14px; align-items: baseline; padding: 14px 0; }
.start-list .mono-label { width: 22px; flex-shrink: 0; letter-spacing: 0; }
.start-list__title { font-family: var(--display); font-size: 23px; line-height: 1.1; }

@media (min-width: 1000px) {
    .start-here { padding: 72px var(--gutter); }
    .start-here { grid-template-columns: 340px minmax(0, 1fr); gap: 72px; max-width: none; }
    .start-here > * { margin: 0; max-width: none; }
    .start-here { padding-left: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); padding-right: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); }
    .start-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-left: 1px solid var(--ink); }
    .start-list li { border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
    .start-list a { flex-direction: column; gap: 10px; padding: 22px; min-height: 130px; }
    .start-list__title { font-size: 28px; line-height: 1.08; }
}

/* ---------- Pillars ---------- */
.pillars { max-width: var(--max); margin: 0 auto; padding: 40px var(--gutter) 44px; display: flex; flex-direction: column; gap: 14px; }
.pillars__head { display: flex; flex-direction: column; gap: 12px; }
.pillars__head > div { display: flex; flex-direction: column; gap: 12px; }
.pillars__head p { display: none; }
.pillars__swipe { align-self: flex-end; }
.pillar-grid {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 4px calc(-1 * var(--gutter)) 0; padding: 0 var(--gutter) 6px; scroll-padding: 0 var(--gutter);
}
.pillar-card {
    flex: 0 0 262px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 10px;
    padding: 20px; border: 1px solid var(--ink); background: var(--card);
}
.pillar-bar { height: 6px; width: 40px; background: var(--pillar); }
.pillar-card__name { font-family: var(--display); font-size: 28px; line-height: 1; }
.pillar-card__desc { font-size: 16px; line-height: 1.45; color: var(--body); flex-grow: 1; }
.pillar-card:hover { color: var(--ink); }
.pillar-card:hover .pillar-card__name { color: var(--rust); }

@media (min-width: 1000px) {
    .pillars { padding: 72px var(--gutter) 80px; gap: 32px; }
    .pillars__head { flex-direction: row; justify-content: space-between; align-items: flex-end; gap: 64px; }
    .pillars__head p { display: block; max-width: 360px; font-size: 19px; color: var(--body); }
    .pillars__swipe { display: none; }
    .pillar-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; overflow: visible; margin: 0; padding: 0; border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
    .pillar-card { border: 0; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); background: transparent; padding: 26px 24px 28px; gap: 12px; }
    .pillar-bar { width: 48px; }
    .pillar-card__name { font-size: 34px; }
    .pillar-card__desc { font-size: 17px; line-height: 1.5; }
}

/* ---------- Home: inbox band ---------- */
.inbox { background: var(--ink); color: var(--paper); }
.inbox__inner { max-width: var(--max); margin: 0 auto; padding: 48px var(--gutter) 48px; display: grid; gap: 28px; }
.inbox__what { display: flex; flex-direction: column; gap: 28px; }
.inbox__grid { display: grid; gap: 18px; }
.inbox__grid > div { display: flex; flex-direction: column; gap: 6px; padding-top: 14px; border-top: 1px solid var(--dark-rule); font-size: 16px; line-height: 1.45; color: var(--dark-text); }
.inbox__grid .mono-label { color: var(--dark-muted); }
.inbox__name { font-family: var(--display); font-size: 26px; color: var(--paper); }
.inbox__form { display: flex; flex-direction: column; justify-content: flex-end; gap: 28px; }
.inbox .mono-label { color: var(--dark-muted); }
.inbox__share { font-size: 17px; color: var(--dark-text); }
.inbox__share span { color: var(--accent); }
.inbox__share:hover { color: var(--paper); }

@media (min-width: 1000px) {
    .inbox__inner { grid-template-columns: minmax(0, 1fr) 480px; gap: 88px; padding-top: 80px; padding-bottom: 56px; }
    .inbox__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
}

/* ---------- CTA band (tag, index) ---------- */
.cta-band { background: var(--ink); color: var(--paper); }
.cta-band__inner { max-width: var(--max); margin: 0 auto; padding: 48px var(--gutter); display: grid; gap: 24px; }
.cta-band__copy { display: flex; flex-direction: column; gap: 14px; }
.cta-band .mono-label { color: var(--dark-muted); }
@media (min-width: 1000px) {
    .cta-band__inner { grid-template-columns: minmax(0, 1fr) 520px; gap: 88px; align-items: end; padding-top: 72px; padding-bottom: 56px; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--dark-muted); }
.site-footer__inner {
    max-width: var(--max); margin: 0 auto; padding: 24px var(--gutter) 32px;
    border-top: 1px solid var(--dark-rule);
    display: flex; flex-direction: column; gap: 14px; justify-content: space-between;
    font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
}
.site-footer__links { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.site-footer__links .nav { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a:hover { color: var(--paper); }
@media (min-width: 900px) { .site-footer__inner { flex-direction: row; padding-bottom: 40px; } }

/* ---------- Article ---------- */
.article__head { max-width: var(--max); margin: 0 auto; padding: 36px var(--gutter) 28px; display: grid; gap: 16px; }
.article__kicker { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.pillar-link { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.article__headline { display: flex; flex-direction: column; gap: 18px; max-width: 980px; }
.article__title { font-family: var(--display); font-size: clamp(56px, 8vw, 112px); line-height: 0.92; letter-spacing: -0.02em; }
.article__dek { font-size: clamp(19px, 1.8vw, 24px); line-height: 1.45; color: var(--body); max-width: 760px; }
.article__byline { display: flex; align-items: center; gap: 12px; }
.article__byline > span { display: flex; flex-direction: column; gap: 2px; }
.article__byline a { font-size: 17px; font-weight: 500; }
.article__avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }

.article__figure { margin: 0 auto; max-width: var(--max); padding: 0; display: flex; flex-direction: column; gap: 8px; }
.article__image { width: 100%; max-height: 640px; object-fit: cover; }
.article__figure figcaption { padding: 0 var(--gutter); font-family: var(--mono); font-size: 12px; color: var(--muted); }

.article__body { max-width: var(--max); margin: 0 auto; padding: 32px var(--gutter) 64px; display: grid; gap: 40px; }
.article__rail { display: none; }
.article__main { min-width: 0; }

@media (min-width: 1100px) {
    .article__head { grid-template-columns: 240px minmax(0, 1fr); gap: 80px; padding-top: 72px; padding-bottom: 48px; }
    .article__kicker { flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 14px; font-size: 13px; }
    .article__figure { padding: 0 var(--gutter); }
    .article__figure figcaption { padding-left: 320px; }
    .article__body { grid-template-columns: 240px 680px minmax(0, 1fr); gap: 80px; padding-top: 72px; padding-bottom: 96px; }
    .article__rail { display: flex; flex-direction: column; gap: 36px; position: sticky; top: 32px; align-self: start; }
}

.rail-block { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; border-top: 1px solid var(--ink); }
.rail-link { font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.rail-link:hover { color: var(--rust); }
.rail-block--prose > span:not(.mono-label) { font-size: 17px; line-height: 1.45; color: var(--body); }

/* Post content — everything here is automatic; nothing to mark up in Ulysses */
.gh-content { font-size: 19px; line-height: 1.6; color: var(--text); }
.gh-content > * + * { margin-top: 20px; }
@media (min-width: 760px) { .gh-content { font-size: 22px; line-height: 1.65; } .gh-content > * + * { margin-top: 24px; } }
.gh-content > p:first-of-type::first-letter {
    float: left; font-family: var(--display); font-size: 4.2em; line-height: 0.8; padding: 0.08em 0.12em 0 0; color: var(--rust);
}
.gh-content > p:last-child::after {
    content: ""; display: inline-block; width: 0.5em; height: 0.5em; margin-left: 0.45em; background: var(--rust);
}
.gh-content a { color: var(--rust); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.gh-content h2 { font-family: var(--display); font-size: 1.8em; line-height: 1.1; margin-top: 1.6em; }
.gh-content h3 { font-family: var(--display); font-size: 1.4em; line-height: 1.15; margin-top: 1.4em; }
.gh-content ul, .gh-content ol { padding-left: 1.2em; }
.gh-content li + li { margin-top: 0.4em; }
.gh-content hr {
    border: 0; margin: 1.6em 0; height: 20px; width: 106px; position: relative; overflow: visible;
    background:
        linear-gradient(var(--rule-2), var(--rule-2)) 0 50% / 40px 1px no-repeat,
        linear-gradient(var(--rule-2), var(--rule-2)) 66px 50% / 40px 1px no-repeat;
}
.gh-content hr::after {
    content: "§"; position: absolute; left: 53px; top: 50%; transform: translate(-50%, -55%);
    font-family: var(--mono); font-size: 14px; line-height: 1; color: var(--rust);
}
.gh-content blockquote:not(.kg-blockquote-alt) {
    margin: 1.2em 0; padding: 0; border: 0;
    font-family: var(--display); font-style: italic; font-size: 1.7em; line-height: 1.15; color: var(--ink);
}
.gh-content blockquote:not(.kg-blockquote-alt) > p { display: inline; }
.gh-content blockquote:not(.kg-blockquote-alt)::before { content: "“"; color: var(--rust); }
.gh-content blockquote:not(.kg-blockquote-alt)::after { content: "”"; color: var(--rust); }
.gh-content blockquote.kg-blockquote-alt { margin: 1.2em 0; font-family: var(--display); font-style: italic; font-size: 1.7em; line-height: 1.15; text-align: left; color: var(--ink); }
.gh-content figure { margin: 1.6em 0; }
.gh-content figcaption { margin-top: 8px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.gh-content code { font-family: var(--mono); font-size: 0.85em; background: var(--paper-2); padding: 0.1em 0.3em; }
.gh-content pre { font-family: var(--mono); font-size: 15px; background: var(--ink); color: var(--paper); padding: 20px; overflow-x: auto; }
.gh-content pre code { background: none; padding: 0; }

@media (min-width: 1100px) {
    .gh-content .kg-width-wide { width: calc(100% + 240px); max-width: none; }
    /* the reading column starts 400px into a centered 1440px frame */
    .gh-content .kg-width-full { width: 100vw; max-width: none; margin-left: calc(-1 * ((100vw - min(100vw, var(--max))) / 2 + 400px)); }
}
@media (max-width: 1099px) {
    .gh-content .kg-width-full, .gh-content .kg-width-wide { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); width: auto; }
}

/* Article end matter */
.article__end { display: flex; flex-direction: column; gap: 28px; margin-top: 48px; }
.filed-under { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-top: 24px; border-top: 1px solid var(--ink); }
.filed-under .mono-label { margin-right: 6px; }
.chip { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; border: 1px solid var(--rule-2); border-radius: 999px; font-size: 17px; }
.resonated { display: flex; flex-direction: column; gap: 16px; padding: 28px 20px; margin: 0 calc(-1 * var(--gutter)); background: var(--ink); color: var(--paper); }
.resonated .display { font-size: clamp(30px, 3vw, 40px); line-height: 1.05; }
.resonated .mono-label { color: var(--dark-muted); }
@media (min-width: 760px) { .resonated { margin: 0; padding: 36px; } }
.author-box { display: flex; gap: 20px; align-items: flex-start; font-size: 18px; line-height: 1.5; color: var(--body); }
.author-box img { width: 80px; height: 96px; object-fit: cover; flex-shrink: 0; }
.author-box strong { color: var(--ink); font-weight: 500; }
.author-box div { display: flex; flex-direction: column; gap: 10px; }
.author-box a { color: var(--rust); }

.article-comments { max-width: 680px; margin: 0 auto; padding: 0 var(--gutter) 64px; box-sizing: content-box; }

.keep-reading { background: var(--paper-2); padding: 40px var(--gutter) 48px; }
.keep-reading > * { max-width: calc(var(--max) - 160px); margin-left: auto; margin-right: auto; }
.keep-reading__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 20px; }
.keep-reading__grid { display: grid; gap: 28px; }
.card { display: flex; flex-direction: column; gap: 12px; }
.card__image { width: 100%; aspect-ratio: 5 / 3; object-fit: cover; }
.card__title { font-family: var(--display); font-size: 28px; line-height: 1.05; }
@media (min-width: 900px) {
    .keep-reading { padding: 72px var(--gutter) 88px; }
    .keep-reading__head { margin-bottom: 32px; }
    .keep-reading__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
    .card__title { font-size: 32px; }
}

/* ---------- Pages ---------- */
.page__head { max-width: 900px; margin: 0 auto; padding: 48px var(--gutter) 32px; display: flex; flex-direction: column; gap: 18px; }
.page__body { max-width: 680px; margin: 0 auto; padding: 32px var(--gutter) 88px; box-sizing: content-box; }
.page__body > p:first-of-type::first-letter { float: none; font: inherit; padding: 0; color: inherit; }
.page__body > p:last-child::after { display: none; }

/* ---------- Tag / pillar pages ---------- */
.tag-bar { height: 8px; background: var(--pillar); }
.tag-head { max-width: var(--max); margin: 0 auto; padding: 36px var(--gutter) 28px; display: grid; gap: 24px; border-bottom: 1px solid var(--ink); }
.tag-head__copy { display: flex; flex-direction: column; gap: 14px; }
.tag-head__kicker { display: flex; align-items: center; gap: 10px; }
.tag-head__kicker .pillar-dot { width: 12px; height: 12px; }
.tag-head__title { font-family: var(--display); font-size: clamp(64px, 9vw, 136px); line-height: 0.9; letter-spacing: -0.02em; }
.tag-head__desc { font-size: clamp(19px, 1.9vw, 25px); line-height: 1.45; color: var(--body); max-width: 760px; }
.other-pillars { display: flex; gap: 8px; overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
.other-pillars .mono-label { display: none; }
.other-pillars a { flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--rule-2); border-radius: 999px; font-size: 16px; }
@media (min-width: 1000px) {
    .tag-head { grid-template-columns: minmax(0, 1fr) 280px; gap: 96px; align-items: end; padding-top: 72px; padding-bottom: 64px; }
    .other-pillars { flex-direction: column; gap: 0; margin: 0; padding: 0; overflow: visible; border-top: 1px solid var(--ink); }
    .other-pillars .mono-label { display: block; padding: 12px 0; border-bottom: 1px solid var(--rule); }
    .other-pillars a { min-height: 48px; padding: 0; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; font-family: var(--display); font-size: 24px; gap: 12px; }
}
.tag-featured { max-width: var(--max); margin: 0 auto; padding: 28px var(--gutter) 40px; display: grid; gap: 32px; }
.tag-featured__item { display: flex; flex-direction: column; gap: 14px; }
.tag-featured__item + .tag-featured__item .tag-featured__image { display: none; }
.tag-featured__image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.tag-featured__title { font-family: var(--display); font-size: 38px; line-height: 1; }
.tag-featured__item + .tag-featured__item .tag-featured__title { font-size: 26px; line-height: 1.1; }
.tag-featured__excerpt { font-size: 17px; line-height: 1.5; color: var(--body); }
.tag-featured__item + .tag-featured__item .tag-featured__excerpt { display: none; }
@media (min-width: 1000px) {
    .tag-featured { grid-template-columns: 7fr 5fr; gap: 56px; padding-top: 56px; padding-bottom: 64px; }
    .tag-featured__item + .tag-featured__item .tag-featured__image { display: block; }
    .tag-featured__item--lead .tag-featured__title { font-size: 56px; }
    .tag-featured__item + .tag-featured__item .tag-featured__title { font-size: 38px; line-height: 1.05; }
    .tag-featured__item + .tag-featured__item .tag-featured__excerpt { display: block; }
    .tag-featured__excerpt { font-size: 20px; }
}
.entries { max-width: var(--max); margin: 0 auto; padding: 32px var(--gutter) 64px; display: flex; flex-direction: column; gap: 20px; }
.entries__title { font-size: clamp(32px, 3vw, 44px); }

.pagination { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}
