/* ============================================================================
   Relatable Truth — Manuscript theme for Ghost
   See README.md in the design handoff for design rationale and tokens.
   ============================================================================ */

/* ── Design tokens ────────────────────────────────────────────────────── */
:root {
    --rt-paper:       #f5efe2;
    --rt-ink:         #b23a2e;
    --rt-text:        #1c1813;
    --rt-text-muted:  rgba(28, 24, 19, .78);
    --rt-rule:        rgba(0, 0, 0, .35);

    --rt-font-display: "Special Elite", "Courier Prime", monospace;
    --rt-font-body:    "Courier Prime", ui-monospace, monospace;
    --rt-font-mono:    "JetBrains Mono", ui-monospace, monospace;
    --rt-font-hand:    "Caveat", "Bradley Hand", "Marker Felt", cursive;

    /* Layout — desktop */
    --rt-home-pad:     56px 96px 88px 178px;
    --rt-home-rule:    64px;
    --rt-post-pad:     48px 120px 80px 198px;
    --rt-post-rule:    80px;

    /* Layout — mobile */
    --rt-home-pad-m:   36px 22px 60px 40px;
    --rt-home-rule-m:  14px;
    --rt-post-pad-m:   32px 22px 60px 40px;
    --rt-post-rule-m:  14px;
}

/* ── Reset / base ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--rt-paper);
    color: var(--rt-text);
    min-height: 100vh;
}

body {
    font-family: var(--rt-font-body);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

button {
    font-family: inherit;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.rt-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;
}

/* ── Paper sheet ──────────────────────────────────────────────────────── */
.rt-paper {
    position: relative;
    background: var(--rt-paper);
    background-image:
        radial-gradient(rgba(0, 0, 0, .025) 1px, transparent 1px),
        radial-gradient(rgba(0, 0, 0, .02) 1px, transparent 1px);
    background-size: 5px 5px, 9px 9px;
    background-position: 0 0, 2px 3px;
    max-width: 1280px;
    margin: 0 auto;
    overflow: hidden;
    color: var(--rt-text);
}

.rt-margin-rule {
    position: absolute;
    top: 0; bottom: 0;
    width: 1px;
    background: var(--rt-ink);
    opacity: .35;
    pointer-events: none;
}

/* ── Type primitives ──────────────────────────────────────────────────── */
.rt-mono {
    font-family: var(--rt-font-mono);
    font-size: 11px;
    letter-spacing: .18em;
    text-transform: uppercase;
    opacity: .55;
}

.rt-italic {
    font-family: var(--rt-font-body);
    font-style: italic;
}

.rt-hand {
    font-family: var(--rt-font-hand);
    color: var(--rt-ink);
    font-size: 18px;
    line-height: 1.2;
    font-style: italic;
}

.rt-stamp {
    font-family: var(--rt-font-display);
    color: var(--rt-ink);
    border: 2px solid var(--rt-ink);
    padding: 3px 8px;
    display: inline-block;
    letter-spacing: .18em;
    font-size: 11px;
    text-transform: uppercase;
    transform: rotate(-3deg);
    opacity: .85;
    background: transparent;
}

.rt-rule {
    border: 0;
    border-top: 1px dashed var(--rt-rule);
    margin: 32px 0 36px;
    display: block;
}

/* ── Letterhead ───────────────────────────────────────────────────────── */
.rt-letterhead {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 44px;
    gap: 24px;
}

.rt-letterhead__from { margin-bottom: 6px; }

.rt-wordmark {
    display: inline-block;
    font-family: var(--rt-font-display);
    font-size: 44px;
    letter-spacing: .04em;
    line-height: 1.05;
    text-transform: uppercase;
    text-decoration: none;
    color: inherit;
    margin-top: 6px;
}

.rt-wordmark__text {
    display: inline;
}

/* JS splits the title into per-word spans so each word renders on its own
   line. The fallback (no JS) shows all words inline with a normal wrap. */
.rt-wordmark[data-rendered] .rt-wordmark__text {
    display: block;
}

.rt-wordmark__word {
    display: block;
}

.rt-wordmark__dot {
    color: var(--rt-ink);
}

.rt-letterhead__tagline {
    font-size: 13px;
    margin-top: 8px;
    opacity: .75;
}

.rt-letterhead__right {
    text-align: right;
    flex-shrink: 0;
}

.rt-letterhead__loc {
    margin-top: 6px;
}

.rt-letterhead__stamp {
    margin-top: 18px;
}

/* ── Home / archive ───────────────────────────────────────────────────── */
.rt-home,
.rt-archive {
    padding: var(--rt-home-pad);
}

.rt-home > .rt-margin-rule,
.rt-archive > .rt-margin-rule {
    left: var(--rt-home-rule);
}

.rt-toc-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 24px;
}

.rt-toc-head__title {
    margin: 0;
    font-family: var(--rt-font-display);
    font-size: 16px;
    letter-spacing: .22em;
    text-transform: uppercase;
}

.rt-toc-head__count {
    font-family: var(--rt-font-mono);
    text-transform: none;
    letter-spacing: 0;
    font-size: 12px;
    opacity: .55;
}

.rt-toc {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* ── Post row (TOC entry) ─────────────────────────────────────────────── */
.rt-row {
    position: relative;
    transition: background 150ms ease;
}

.rt-row:hover {
    background: rgba(0, 0, 0, .03);
}

.rt-row__card {
    display: grid;
    grid-template-columns: 110px 1fr;
    grid-template-areas: "sliver text";
    gap: 22px;
    align-items: stretch;
}

.rt-row__sliver {
    grid-area: sliver;
    height: 92px;
    width: 110px;
    align-self: center;
    background:
        repeating-linear-gradient(135deg,
            rgba(0, 0, 0, .06) 0 1px, transparent 1px 6px),
        #1a1714;
    color: rgba(255, 255, 255, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    text-decoration: none;
}

.rt-row__sliver img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: grayscale(1) contrast(1.05);
}

.rt-row__sliver-label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-family: var(--rt-font-mono);
    font-size: 8px;
    letter-spacing: .12em;
    text-transform: uppercase;
    z-index: 1;
    padding: 4px;
    text-align: center;
}

.rt-row__text { grid-area: text; min-width: 0; }

.rt-row__head {
    display: flex;
    align-items: baseline;
    gap: 14px;
    font-family: var(--rt-font-body);
}

.rt-row__no {
    font-family: var(--rt-font-display);
    font-size: 12px;
    opacity: .6;
    width: 36px;
    flex-shrink: 0;
}

.rt-row__date {
    font-family: var(--rt-font-body);
    font-size: 12px;
    opacity: .55;
    width: 96px;
    flex-shrink: 0;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.rt-row__title {
    font-family: var(--rt-font-display);
    font-size: 19px;
    line-height: 1.2;
    letter-spacing: .01em;
    flex: 1;
    color: inherit;
    text-decoration: underline;
    text-decoration-color: rgba(0, 0, 0, .3);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    transition: text-decoration-thickness 150ms ease;
}

.rt-row:hover .rt-row__title {
    text-decoration-thickness: 2px;
}

.rt-row__dek {
    font-family: var(--rt-font-body);
    margin: 6px 0 0 50px;
    font-size: 13px;
    line-height: 1.55;
    opacity: .78;
    max-width: 720px;
    color: var(--rt-text);
}

/* ── Home marginalia (red-pencil notes in right gutter, desktop only) ─── */
.rt-home-marg {
    position: absolute;
    left: calc(100% + 12px);
    width: 140px;
    font-family: var(--rt-font-hand);
    color: var(--rt-ink);
    font-size: 18px;
    line-height: 1.2;
    font-style: italic;
}

.rt-home-marg .rt-home-marg__strike {
    text-decoration: line-through;
    opacity: .7;
}

.rt-home-marg__sub {
    display: block;
    font-size: 14px;
    opacity: .7;
}

/* ── Pagination ───────────────────────────────────────────────────────── */
.rt-pagination {
    margin-top: 48px;
    padding-top: 20px;
    border-top: 1px dashed var(--rt-rule);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-family: var(--rt-font-body);
    font-size: 13px;
}

.rt-pagination__link {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: rgba(0, 0, 0, .3);
    text-underline-offset: 4px;
}

.rt-pagination__link:hover {
    text-decoration-color: var(--rt-ink);
}

.rt-pagination__link--prev { order: -1; }

/* ── Subscribe block ──────────────────────────────────────────────────── */
.rt-subscribe {
    margin-top: 64px;
    padding-top: 24px;
    border-top: 1px dashed var(--rt-rule);
}

.rt-subscribe__lede {
    opacity: .7;
    font-size: 13px;
    line-height: 1.7;
    margin: 0;
}

.rt-subscribe__form {
    display: flex;
    gap: 10px;
    align-items: baseline;
    max-width: 520px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.rt-subscribe__arrow {
    font-family: var(--rt-font-mono);
    font-size: 11px;
    letter-spacing: .18em;
    text-transform: uppercase;
    opacity: .65;
}

.rt-subscribe__field {
    flex: 1;
    min-width: 180px;
    border: 0;
    border-bottom: 1px solid rgba(0, 0, 0, .55);
    padding: 0 0 4px;
    font-family: var(--rt-font-body);
    font-style: italic;
    font-size: 13px;
    background: transparent;
    color: var(--rt-text);
    outline: none;
}

.rt-subscribe__field::placeholder {
    opacity: .5;
    color: var(--rt-text);
}

.rt-subscribe__field:focus {
    border-bottom-color: var(--rt-ink);
}

.rt-subscribe__btn {
    transform: rotate(0);
    padding: 2px 10px;
    font-size: 10px;
    cursor: pointer;
}

.rt-subscribe__btn:hover {
    background: rgba(178, 58, 46, .08);
}

/* Portal toggles .loading / .success / .error classes on the form element.
   Drive the UI from those states without any custom JS. */

.rt-subscribe__form.loading .rt-subscribe__btn {
    opacity: .5;
    pointer-events: none;
}

.rt-subscribe__form.loading .rt-subscribe__btn::after {
    content: " …";
}

/* On success: swap the form out for the success message in the same row. */
.rt-subscribe__success {
    margin-top: 14px;
    font-family: var(--rt-font-mono);
    font-size: 11px;
    letter-spacing: .18em;
    text-transform: uppercase;
    opacity: .7;
    display: none;
}

.rt-subscribe__form.success {
    display: none;
}

.rt-subscribe__form.success ~ .rt-subscribe__success {
    display: block;
}

/* On error: Portal injects its message into [data-members-error]. Style that
   span inline so the typewriter rhythm survives. */
.rt-subscribe__error-text {
    display: block;
    width: 100%;
    margin-top: 8px;
    font-family: var(--rt-font-mono);
    font-size: 11px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--rt-ink);
    opacity: 1;
}

.rt-subscribe__error-text:empty {
    display: none;
}

.rt-subscribe__colophon {
    margin-top: 22px;
    font-family: var(--rt-font-mono);
    font-size: 10px;
    letter-spacing: .18em;
    text-transform: uppercase;
    opacity: .45;
}

/* ── Archive header (tag / author pages) ──────────────────────────────── */
.rt-archive-head {
    margin-bottom: 44px;
}

.rt-archive-head__filed {
    margin-bottom: 6px;
}

.rt-archive-head__name {
    margin: 0;
    font-family: var(--rt-font-display);
    font-size: 36px;
    letter-spacing: .02em;
    line-height: 1.1;
    text-transform: uppercase;
}

.rt-archive-head__desc {
    margin-top: 10px;
    font-size: 14px;
    opacity: .75;
    max-width: 640px;
}

.rt-archive-head__loc {
    margin-top: 12px;
}

/* ── Post ─────────────────────────────────────────────────────────────── */
.rt-post,
.rt-page,
.rt-error {
    padding: var(--rt-post-pad);
}

.rt-post > .rt-margin-rule,
.rt-page > .rt-margin-rule,
.rt-error > .rt-margin-rule {
    left: var(--rt-post-rule);
}

.rt-strap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    gap: 16px;
}

.rt-strap__site { opacity: .65; }

.rt-title {
    text-align: center;
    margin-bottom: 44px;
    position: relative;
}

.rt-title__meta {
    font-family: var(--rt-font-body);
    font-size: 12px;
    letter-spacing: .24em;
    text-transform: uppercase;
    opacity: .55;
    margin-bottom: 18px;
}

.rt-title__sep {
    margin: 0 8px;
    opacity: .6;
}

.rt-title__h1 {
    margin: 0;
    font-family: var(--rt-font-display);
    font-size: 40px;
    line-height: 1.12;
    letter-spacing: .01em;
    text-transform: uppercase;
}

.rt-title__sub {
    margin-top: 14px;
    font-family: var(--rt-font-body);
    font-style: italic;
    font-size: 16px;
    opacity: .75;
}

.rt-title__by {
    margin-top: 22px;
    font-family: var(--rt-font-body);
    font-size: 12px;
    letter-spacing: .2em;
    text-transform: uppercase;
    opacity: .55;
}

.rt-title__stamp {
    position: absolute;
    right: -40px;
    top: -4px;
}

.rt-title--page .rt-title__h1 {
    font-size: 32px;
}

/* ── Article body ─────────────────────────────────────────────────────── */
.rt-article {
    position: relative;
    max-width: 680px;
    margin: 0 auto;
}

.rt-content {
    font-family: var(--rt-font-body);
    font-size: 15px;
    line-height: 2;
    color: var(--rt-text);
}

.rt-content > p {
    margin: 0;
    text-indent: 3ch;
}

.rt-content > p:first-child {
    text-indent: 0;
}

.rt-content > h2 + p,
.rt-content > h3 + p,
.rt-content > h4 + p,
.rt-content > figure + p,
.rt-content > hr + p,
.rt-content > ul + p,
.rt-content > ol + p {
    text-indent: 0;
}

/* Lede — first sentence of first paragraph in Special Elite */
.rt-content .rt-lede {
    font-family: var(--rt-font-display);
    font-size: 16px;
    letter-spacing: .02em;
}

/* Footnote markers inside body */
.rt-content sup,
.rt-content .rt-fn-mark {
    color: var(--rt-ink);
    font-family: var(--rt-font-display);
    font-size: 0.7em;
    margin-left: 2px;
    line-height: 1;
}

.rt-content sup a,
.rt-content .rt-fn-mark a {
    color: inherit;
    text-decoration: none;
}

.rt-content sup a:hover {
    text-decoration: underline;
    text-decoration-color: var(--rt-ink);
}

/* Headings within content */
.rt-content h2 {
    font-family: var(--rt-font-display);
    font-size: 24px;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin: 44px 0 18px;
    line-height: 1.2;
    text-indent: 0;
}

.rt-content h3 {
    font-family: var(--rt-font-display);
    font-size: 18px;
    letter-spacing: .04em;
    text-transform: uppercase;
    margin: 32px 0 12px;
    text-indent: 0;
}

.rt-content h4 {
    font-family: var(--rt-font-body);
    font-weight: 700;
    font-size: 15px;
    margin: 28px 0 10px;
    text-indent: 0;
}

/* Inline links inside content */
.rt-content a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: var(--rt-ink);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.rt-content a:hover {
    text-decoration-thickness: 2px;
}

/* Lists */
.rt-content ul, .rt-content ol {
    padding-left: 2.4em;
    margin: 18px 0;
}

.rt-content li {
    margin-bottom: 4px;
    line-height: 1.7;
}

/* Code */
.rt-content code {
    font-family: var(--rt-font-mono);
    font-size: .9em;
    background: rgba(0, 0, 0, .05);
    padding: 1px 5px;
    border-radius: 2px;
}

.rt-content pre {
    font-family: var(--rt-font-mono);
    font-size: 13px;
    background: rgba(0, 0, 0, .05);
    border-left: 2px solid var(--rt-rule);
    padding: 16px 18px;
    overflow-x: auto;
    line-height: 1.6;
    margin: 24px 0;
    text-indent: 0;
}

.rt-content pre code {
    background: none;
    padding: 0;
}

/* Default blockquote (NOT the pull quote) */
.rt-content blockquote {
    margin: 24px 0 24px 0;
    padding-left: 18px;
    border-left: 1px solid var(--rt-rule);
    font-style: italic;
    font-family: var(--rt-font-body);
    opacity: .9;
    text-indent: 0;
}

/* Pull quote — author opt-in via class="pull" on a blockquote, or Koenig's
   callout card (which uses .kg-callout-card). */
.rt-content blockquote.pull,
.rt-content .kg-callout-card {
    margin: 32px 0 32px 60px;
    padding: 14px 0 14px 22px;
    border-left: 3px double var(--rt-ink);
    border-top: 0;
    border-right: 0;
    border-bottom: 0;
    background: transparent;
    font-family: var(--rt-font-display);
    font-size: 22px;
    line-height: 1.45;
    font-style: italic;
    opacity: 1;
    text-indent: 0;
}

.rt-content .kg-callout-emoji { display: none; }

/* Taped photo plate — applies to Koenig image cards */
.rt-content figure {
    margin: 30px 0;
    text-indent: 0;
}

.rt-content figure.kg-image-card,
.rt-content figure.kg-card-hascaption,
.rt-content figure.plate {
    position: relative;
    padding: 12px;
    background: rgba(0, 0, 0, .04);
    border: 1px solid rgba(0, 0, 0, .18);
    transform: rotate(-0.6deg);
    margin-left: -20px;
    margin-right: -20px;
}

.rt-content figure.kg-image-card::before,
.rt-content figure.kg-image-card::after,
.rt-content figure.plate::before,
.rt-content figure.plate::after {
    content: "";
    position: absolute;
    top: -8px;
    width: 56px;
    height: 16px;
    background: rgba(178, 58, 46, .18);
    border: 1px solid rgba(178, 58, 46, .25);
}

.rt-content figure.kg-image-card::before,
.rt-content figure.plate::before {
    left: 18%;
    transform: rotate(-4deg);
}

.rt-content figure.kg-image-card::after,
.rt-content figure.plate::after {
    right: 18%;
    transform: rotate(3deg);
}

.rt-content figure img {
    filter: grayscale(1) contrast(1.05);
    width: 100%;
    height: auto;
    display: block;
}

.rt-content figcaption,
.rt-content .kg-card-caption {
    margin-top: 10px;
    font-family: var(--rt-font-body);
    font-size: 12px;
    font-style: italic;
    opacity: .75;
    text-align: center;
    line-height: 1.5;
    text-indent: 0;
}

/* Wide / full Koenig cards: keep grayscale, drop the rotation for very wide cards */
.rt-content .kg-width-wide,
.rt-content .kg-width-full {
    transform: none;
    margin-left: 0;
    margin-right: 0;
}

/* Tables */
.rt-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-family: var(--rt-font-body);
    font-size: 14px;
}

.rt-content th, .rt-content td {
    padding: 8px 12px;
    border-bottom: 1px dashed var(--rt-rule);
    text-align: left;
    text-indent: 0;
}

.rt-content th {
    font-family: var(--rt-font-display);
    letter-spacing: .04em;
    text-transform: uppercase;
    font-size: 12px;
}

/* HR inside content */
.rt-content hr {
    border: 0;
    border-top: 1px dashed var(--rt-rule);
    margin: 28px 0;
}

/* Author-written footnotes section */
.rt-content .rt-footnotes,
.rt-footnotes {
    margin: 56px 0 0;
    padding-top: 20px;
    border-top: 1px dashed var(--rt-rule);
    text-indent: 0;
}

.rt-footnotes__label {
    font-family: var(--rt-font-display);
    font-size: 11px;
    letter-spacing: .24em;
    text-transform: uppercase;
    opacity: .6;
    margin-bottom: 12px;
}

.rt-footnote {
    display: flex;
    gap: 10px;
    font-family: var(--rt-font-body);
    font-size: 12px;
    line-height: 1.7;
    opacity: .82;
    margin-bottom: 8px;
}

.rt-footnote sup {
    color: var(--rt-ink);
    font-family: var(--rt-font-display);
    flex-shrink: 0;
    font-size: 0.95em;
}

.rt-footnote:target,
.rt-footnote.is-targeted {
    background: rgba(178, 58, 46, .08);
    transition: background 200ms ease;
}

/* Post marginalia (single red-pencil note in the post's right gutter, desktop only) */
.rt-post-marginalia {
    position: absolute;
    left: calc(100% + 24px);
    top: 280px;
    width: 140px;
    font-family: var(--rt-font-hand);
    color: var(--rt-ink);
    font-size: 18px;
    line-height: 1.2;
    font-style: italic;
    transform: rotate(-3deg);
    white-space: pre-line;
}

/* End mark */
.rt-end-mark {
    text-align: center;
    margin-top: 48px;
    font-family: var(--rt-font-display);
    font-size: 14px;
    letter-spacing: .4em;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Signoff ──────────────────────────────────────────────────────────── */
.rt-signoff {
    margin: 40px auto 0;
    max-width: 680px;
    text-align: left;
}

.rt-signoff__pre {
    font-family: var(--rt-font-body);
    font-size: 13px;
    opacity: .7;
    margin-bottom: 4px;
}

.rt-signoff__sig {
    display: block;
    width: 240px;
    height: auto;
    margin-left: 0;
    mix-blend-mode: multiply;
    transform: rotate(-2deg);
    opacity: .92;
}

.rt-signoff__name {
    margin-top: 6px;
    font-family: var(--rt-font-body);
    font-size: 12px;
    letter-spacing: .18em;
    text-transform: uppercase;
    opacity: .55;
}

/* ── LinkedIn link (signoff + home footer) ────────────────────────────── */
.rt-linkedin {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--rt-ink);
    text-decoration: none;
    font-family: var(--rt-font-body);
    font-size: 13px;
    letter-spacing: .04em;
    margin-top: 18px;
}

.rt-signoff .rt-linkedin {
    margin-top: 14px;
}

.rt-subscribe .rt-linkedin {
    margin-top: 22px;
}

.rt-linkedin__mark {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    transform: rotate(-2deg);
    transition: transform 200ms ease;
}

.rt-linkedin__label {
    text-decoration: underline;
    text-decoration-color: rgba(178, 58, 46, .35);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: text-decoration-thickness 150ms ease, text-decoration-color 150ms ease;
}

.rt-linkedin:hover .rt-linkedin__label,
.rt-linkedin:focus .rt-linkedin__label {
    text-decoration-color: var(--rt-ink);
    text-decoration-thickness: 2px;
}

.rt-linkedin:hover .rt-linkedin__mark {
    transform: rotate(-4deg);
}

/* ── Page footer (bottom of post) ─────────────────────────────────────── */
.rt-page-footer {
    margin: 44px auto 0;
    max-width: 680px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-family: var(--rt-font-body);
    font-size: 12px;
    opacity: .55;
    flex-wrap: wrap;
}

.rt-page-footer__end {
    font-family: var(--rt-font-mono);
    opacity: 1;
}

/* ── Error page ───────────────────────────────────────────────────────── */
.rt-error__body {
    text-align: center;
}

.rt-error__body p {
    text-indent: 0;
}

/* ============================================================================
   Responsive — mobile (under 640px)
   ============================================================================ */
@media (max-width: 640px) {
    .rt-home,
    .rt-archive {
        padding: var(--rt-home-pad-m);
    }

    .rt-home > .rt-margin-rule,
    .rt-archive > .rt-margin-rule {
        left: var(--rt-home-rule-m);
    }

    .rt-post,
    .rt-page,
    .rt-error {
        padding: var(--rt-post-pad-m);
    }

    .rt-post > .rt-margin-rule,
    .rt-page > .rt-margin-rule,
    .rt-error > .rt-margin-rule {
        left: var(--rt-post-rule-m);
    }

    .rt-letterhead {
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 28px;
    }

    .rt-letterhead__right {
        text-align: left;
        margin-top: 18px;
    }

    .rt-wordmark {
        font-size: 28px;
        letter-spacing: .02em;
    }

    .rt-letterhead__tagline {
        font-size: 12px;
    }

    .rt-rule {
        margin: 20px 0 26px;
    }

    .rt-toc-head {
        margin-bottom: 18px;
    }

    .rt-toc-head__title {
        font-size: 14px;
    }

    .rt-toc-head__count {
        font-size: 11px;
    }

    .rt-toc {
        gap: 18px;
    }

    .rt-row__card {
        grid-template-columns: 1fr 62px;
        grid-template-areas: "text sliver";
        gap: 12px;
    }

    .rt-row__sliver {
        width: 62px;
        height: 70px;
    }

    .rt-row__head {
        gap: 10px;
    }

    .rt-row__no {
        font-size: 11px;
        width: 28px;
    }

    .rt-row__date {
        font-size: 11px;
        width: 78px;
    }

    .rt-row__title {
        font-size: 16px;
    }

    .rt-row__dek {
        margin-left: 38px;
        margin-top: 4px;
        font-size: 12px;
    }

    /* Desktop-only marginalia */
    .rt-home-marg,
    .rt-post-marginalia {
        display: none;
    }

    /* Post mobile */
    .rt-strap {
        margin-bottom: 28px;
    }

    .rt-title {
        margin-bottom: 30px;
    }

    .rt-title__h1 {
        font-size: 26px;
    }

    .rt-title__meta {
        font-size: 11px;
        margin-bottom: 18px;
    }

    .rt-title__sub {
        font-size: 14px;
        margin-top: 14px;
    }

    .rt-title__by {
        font-size: 11px;
        margin-top: 22px;
    }

    /* v.2 final stamp hidden on mobile per design spec */
    .rt-title__stamp {
        display: none;
    }

    .rt-title--page .rt-title__h1 {
        font-size: 24px;
    }

    .rt-content {
        font-size: 13px;
    }

    .rt-content .rt-lede {
        font-size: 14px;
    }

    .rt-content h2 {
        font-size: 20px;
    }

    .rt-content h3 {
        font-size: 16px;
    }

    .rt-content blockquote.pull,
    .rt-content .kg-callout-card {
        margin: 26px 0 26px 12px;
        padding: 14px 0 14px 18px;
        font-size: 18px;
    }

    .rt-content figure.kg-image-card,
    .rt-content figure.plate {
        margin: 26px 0;
        padding: 10px;
    }

    .rt-content figcaption,
    .rt-content .kg-card-caption {
        font-size: 11px;
    }

    .rt-end-mark {
        margin-top: 34px;
    }

    .rt-signoff {
        margin-top: 28px;
    }

    .rt-signoff__sig {
        width: 180px;
    }

    .rt-signoff__name {
        font-size: 11px;
    }

    .rt-footnotes {
        margin-top: 32px;
        padding-top: 16px;
    }

    .rt-footnotes__label {
        font-size: 10px;
    }

    .rt-footnote {
        font-size: 11px;
    }

    .rt-page-footer {
        margin-top: 28px;
        font-size: 11px;
    }

    .rt-archive-head__name {
        font-size: 28px;
    }

    .rt-subscribe {
        margin-top: 38px;
        padding-top: 18px;
    }

    .rt-subscribe__lede {
        font-size: 12px;
    }

    .rt-subscribe__field {
        font-size: 12px;
    }

    .rt-subscribe__colophon {
        margin-top: 18px;
    }
}

/* ============================================================================
   Print
   ============================================================================ */
@media print {
    html, body { background: white; }
    .rt-paper {
        background: white;
        background-image: none;
        box-shadow: none;
    }
    .rt-margin-rule,
    .rt-home-marg,
    .rt-post-marginalia,
    .rt-title__stamp,
    .rt-subscribe { display: none; }
    .rt-content { font-size: 12pt; line-height: 1.6; }
}

/* ============================================================================
   Reduced motion
   ============================================================================ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
