/* ============================================================
   Record Radar — Ghost theme
   Brand system: light / dark, Space Grotesk + JetBrains Mono + Fraunces.
   ============================================================ */

:root {
    --signal: #b8342c;
    --lock:   #2d7a3d;
    --amber:  #d18424;
}
:root, :root[data-theme="light"] {
    --paper:     #eef1f6;
    --paper-rgb: 238,241,246;
    --paper-2:   #e6ebf2;
    --paper-3:   #dbe2ec;
    --ink:       #0d1b2e;
    --ink-rgb:   13,27,46;
    --ink-2:     #2a3a55;
    --ink-3:     #6a7a92;
    --rule:      #c8d2e0;
    --rule-2:    #a0adc0;
    --redact:    #0a1830;
    --sweep:     #1f4ed8;
    --sweep-rgb: 31,78,216;
}
:root[data-theme="dark"] {
    --paper:     #07142a;
    --paper-rgb: 7,20,42;
    --paper-2:   #0c1b35;
    --paper-3:   #142544;
    --ink:       #eaf0f8;
    --ink-rgb:   234,240,248;
    --ink-2:     #b8c6dc;
    --ink-3:     #7d8ca7;
    --rule:      #1d3358;
    --rule-2:    #2c4673;
    --redact:    #000000;
    --sweep:     #5d8bff;
    --sweep-rgb: 93,139,255;
}

:root {
    --font-mono:    "JetBrains Mono", ui-monospace, Menlo, monospace;
    --font-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
    --font-serif:   "Fraunces", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-feature-settings: "tnum" 1, "kern" 1, "liga" 1;
    transition: background-color 0.18s ease, color 0.18s ease;
}
[data-theme="dark"] body {
    background: radial-gradient(ellipse at 50% -20%, #102b58 0%, var(--paper) 60%);
    background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--sweep); color: var(--paper); }

/* ============================================================
   System status — sticky top bar
   ============================================================ */
.system-status {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center;
    gap: clamp(12px, 2.4vw, 28px);
    padding: 9px clamp(20px, 4vw, 40px);
    background: var(--paper);
    border-bottom: 1px solid var(--ink);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-3);
    overflow-x: auto;
    white-space: nowrap;
}
.system-status::-webkit-scrollbar { display: none; }
.system-status > * { flex-shrink: 0; }
.system-status strong { color: var(--ink); font-weight: 700; }
.system-status .grow { flex: 1; }
.ss-pill { display: inline-flex; align-items: center; gap: 7px; }
.ss-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--lock);
    box-shadow: 0 0 0 0 var(--lock);
    animation: ss-pulse 2.4s ease-out infinite;
}
@keyframes ss-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(45,122,61,0.55); }
    80%  { box-shadow: 0 0 0 8px rgba(45,122,61,0); }
    100% { box-shadow: 0 0 0 0 rgba(45,122,61,0); }
}

/* ============================================================
   Site nav
   ============================================================ */
.site-nav {
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px; flex-wrap: wrap;
    padding: 22px clamp(20px, 4vw, 40px);
    border-bottom: 1px solid var(--rule);
    max-width: 1280px;
    margin: 0 auto;
}
.site-nav-mark {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--font-display);
    font-size: 15px;
    letter-spacing: -0.01em;
    color: var(--ink);
}
.site-nav-mark strong { font-weight: 700; }
.site-nav-blk {
    display: inline-block;
    width: 22px; height: 11px;
    background: var(--redact);
    transform: skewX(-14deg);
}
.site-nav-list {
    display: flex; align-items: center; gap: 22px;
    list-style: none;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.site-nav-list a { color: var(--ink-2); }
.site-nav-list a:hover { color: var(--ink); }
.site-nav-cta {
    background: var(--ink);
    color: var(--paper) !important;
    padding: 8px 16px;
    font-weight: 700;
}
.site-nav-cta:hover { opacity: 0.9; }

/* ============================================================
   Main wrapper
   ============================================================ */
.site-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: clamp(32px, 4vw, 56px) clamp(20px, 4vw, 40px) clamp(56px, 6vw, 96px);
}

/* ============================================================
   Masthead — home hero
   ============================================================ */
.masthead {
    padding-bottom: clamp(40px, 5vw, 72px);
    margin-bottom: clamp(40px, 5vw, 72px);
    border-bottom: 1px solid var(--ink);
}
.masthead-strap {
    display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 12px 0;
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--rule);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: clamp(40px, 6vw, 72px);
}
.masthead-strap strong { color: var(--ink); font-weight: 700; }
.live-pulse {
    display: inline-block;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--lock);
    margin-right: 0.6em;
    vertical-align: 0.1em;
    box-shadow: 0 0 0 0 var(--lock);
    animation: ss-pulse 2.4s ease-out infinite;
}

.masthead-ident { display: grid; gap: 14px; margin-bottom: 28px; }
.wordmark {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(64px, 12vw, 168px);
    line-height: 0.86;
    letter-spacing: -0.04em;
    color: var(--ink);
}
.edition-line {
    display: inline-flex; align-items: center; gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--rule);
    width: 100%; max-width: 540px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(20px, 2.6vw, 28px);
    letter-spacing: -0.01em;
    color: var(--ink);
}
.edition-line .blk {
    display: inline-block;
    width: 28px; height: 13px;
    background: var(--redact);
    transform: skewX(-14deg);
}

.masthead-lede {
    font-family: var(--font-display);
    font-size: clamp(18px, 2.2vw, 28px);
    line-height: 1.4;
    letter-spacing: -0.01em;
    max-width: 36ch;
    color: var(--ink);
    margin-bottom: 14px;
}
.masthead-lede .muted { color: var(--ink-3); }
.masthead-voice {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(15px, 1.6vw, 18px);
    line-height: 1.5;
    color: var(--ink-2);
    max-width: 44ch;
    margin-bottom: clamp(28px, 3vw, 40px);
    font-variation-settings: "opsz" 24, "SOFT" 100;
}

.masthead-signup {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    max-width: 540px;
    align-items: stretch;
}
.masthead-signup input[type="email"] {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 17px;
    letter-spacing: -0.005em;
    padding: 14px 16px;
    border: 1px solid var(--ink);
    background: var(--paper);
    color: var(--ink);
    border-radius: 0;
    width: 100%;
}
.masthead-signup input[type="email"]:focus {
    outline: 2px solid var(--ink);
    outline-offset: -2px;
}
.masthead-signup input[type="email"]::placeholder { color: var(--ink-3); }
.masthead-signup button {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 0 22px;
    background: var(--ink);
    color: var(--paper);
    border: 1px solid var(--ink);
    border-radius: 0;
    cursor: pointer;
    transition: opacity 0.15s ease;
}
.masthead-signup button:hover { opacity: 0.88; }
.signup-msg {
    grid-column: 1 / -1;
    margin-top: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--ink-3);
    min-height: 1.4em;
}
.success .signup-msg { color: var(--lock); }
@media (max-width: 540px) {
    .masthead-signup { grid-template-columns: 1fr; }
}

/* ============================================================
   Archive — feed
   ============================================================ */
.archive-head {
    display: flex; justify-content: space-between; gap: 12px;
    align-items: baseline;
    padding: 12px 0;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    margin-bottom: clamp(32px, 4vw, 48px);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.archive-eye strong { color: var(--ink); font-weight: 700; }
.archive-desc {
    font-family: var(--font-display);
    font-size: 17px;
    color: var(--ink-2);
    max-width: 56ch;
    margin-bottom: clamp(32px, 4vw, 48px);
}

.post-feed {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(16px, 2vw, 24px);
}
@media (max-width: 920px) { .post-feed { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .post-feed { grid-template-columns: 1fr; } }

.post-card {
    border: 1px solid var(--ink);
    background: var(--paper);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    min-height: 220px;
    display: flex;
}
.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(var(--ink-rgb), 0.08), 0 2px 6px rgba(var(--ink-rgb), 0.04);
}
.post-card-link {
    display: flex; flex-direction: column;
    width: 100%;
    padding: 18px 20px 16px;
    color: var(--ink);
    height: 100%;
    min-width: 0;
}
.post-card-strap {
    display: flex; justify-content: space-between; gap: 12px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-3);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 14px;
}
.post-card-strap strong { color: var(--ink); font-weight: 700; }
.post-card-tag { color: var(--sweep); font-weight: 700; }
.post-card-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(18px, 1.7vw, 22px);
    line-height: 1.2;
    letter-spacing: -0.015em;
    color: var(--ink);
    margin-bottom: 10px;
}
.post-card-excerpt {
    font-family: var(--font-display);
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink-2);
    margin-bottom: auto;
}
.post-card-foot {
    display: flex; justify-content: space-between; gap: 12px;
    padding-top: 14px;
    margin-top: 16px;
    border-top: 1px solid var(--rule);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.post-card-foot strong { color: var(--ink); font-weight: 700; }

/* ============================================================
   Pagination
   ============================================================ */
.pagination {
    display: flex; justify-content: space-between; align-items: center;
    padding: clamp(24px, 3vw, 40px) 0 0;
    margin-top: clamp(32px, 4vw, 48px);
    border-top: 1px solid var(--rule);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.pagination a { color: var(--ink); font-weight: 700; }
.pagination a:hover { color: var(--sweep); }

/* ============================================================
   POST page — issue archive
   ============================================================ */
.post {
    max-width: 720px;
    margin: 0 auto;
}
.post-strap {
    display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 14px 20px;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}
.post-strap strong { color: var(--paper); font-weight: 700; }

.post-mast {
    padding: clamp(36px, 5vw, 56px) clamp(20px, 3vw, 32px) clamp(28px, 4vw, 40px);
    border-bottom: 1px solid var(--ink);
    background: var(--paper);
}
.post-eye {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--signal);
    font-weight: 700;
    margin-bottom: 16px;
}
.post-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(36px, 5.5vw, 64px);
    line-height: 0.96;
    letter-spacing: -0.035em;
    color: var(--ink);
}
.post-deck {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(17px, 1.8vw, 21px);
    line-height: 1.5;
    color: var(--ink-2);
    margin-top: 18px;
    max-width: 56ch;
    font-variation-settings: "opsz" 28, "SOFT" 100;
}

.post-content {
    padding: clamp(28px, 4vw, 40px) clamp(20px, 3vw, 32px);
    font-family: var(--font-display);
    font-size: 17px;
    line-height: 1.65;
    color: var(--ink);
}
.post-content > * { max-width: 64ch; margin-left: auto; margin-right: auto; }
.post-content > table { max-width: 100%; }
.post-content p { margin-bottom: 1.2em; }
.post-content h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(22px, 2.4vw, 28px);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 1.8em auto 0.8em;
    max-width: 64ch;
}
.post-content h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(18px, 2vw, 22px);
    letter-spacing: -0.01em;
    line-height: 1.25;
    margin: 1.4em auto 0.6em;
    max-width: 64ch;
}
.post-content blockquote {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(17px, 1.9vw, 22px);
    line-height: 1.5;
    color: var(--ink-2);
    border-left: 3px solid var(--ink);
    padding-left: 24px;
    margin: 1.5em auto;
    max-width: 60ch;
}
.post-content a {
    color: var(--sweep);
    text-decoration: underline;
    text-underline-offset: 0.18em;
    text-decoration-thickness: 1px;
}
.post-content code {
    font-family: var(--font-mono);
    font-size: 0.92em;
    background: var(--paper-2);
    padding: 2px 6px;
}
.post-content table {
    border-collapse: collapse;
    width: 100%;
    max-width: 720px !important;
    margin: 1.5em auto;
}
.post-content table td,
.post-content table th {
    padding: 10px 14px;
    border: 1px solid var(--rule);
    font-family: var(--font-display);
}
.post-content hr {
    border: 0;
    height: 1px;
    background: var(--rule);
    margin: 2em auto;
    max-width: 64ch;
}
.post-content ul,
.post-content ol {
    margin: 1em auto 1.2em;
    padding-left: 1.5em;
    max-width: 60ch;
}

.post-foot {
    border-top: 2px solid var(--ink);
    background: var(--paper);
    padding: clamp(28px, 4vw, 40px) clamp(20px, 3vw, 32px);
}
.post-signoff {
    display: flex; flex-direction: column; gap: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: clamp(28px, 3vw, 40px);
}
.post-signoff-mark { color: var(--ink); font-weight: 700; }

.post-cta {
    border: 1px solid var(--ink);
    padding: clamp(20px, 2.4vw, 28px);
}
.post-cta-eye {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: 8px;
}
.post-cta-h {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(18px, 2vw, 22px);
    letter-spacing: -0.01em;
    color: var(--ink);
    margin-bottom: 16px;
}

/* ============================================================
   Related (adjacent rotations)
   ============================================================ */
.related {
    max-width: 1280px;
    margin: clamp(48px, 5vw, 80px) auto 0;
    padding-top: clamp(32px, 4vw, 48px);
    border-top: 1px solid var(--rule);
}
.related-head {
    display: flex; justify-content: space-between; gap: 12px;
    margin-bottom: clamp(20px, 2.4vw, 28px);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-3);
}

/* ============================================================
   Page (static pages)
   ============================================================ */
.page .post-mast { border-bottom: 1px solid var(--rule); }

/* ============================================================
   Empty state
   ============================================================ */
.empty-state {
    padding: clamp(40px, 5vw, 64px) 0;
    text-align: center;
    font-family: var(--font-display);
    font-size: 18px;
    color: var(--ink-2);
    border: 1px dashed var(--rule);
}

/* ============================================================
   Error page
   ============================================================ */
.error-page {
    max-width: 720px;
    margin: clamp(48px, 8vw, 120px) auto;
    padding: 0 clamp(20px, 4vw, 40px);
    text-align: center;
}
.error-eye {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--signal);
    font-weight: 700;
    margin-bottom: 24px;
}
.error-code {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(96px, 16vw, 200px);
    line-height: 0.86;
    letter-spacing: -0.04em;
    color: var(--ink);
    margin-bottom: 20px;
}
.error-msg {
    font-family: var(--font-display);
    font-size: 18px;
    line-height: 1.5;
    color: var(--ink);
    max-width: 44ch;
    margin: 0 auto 28px;
}
.error-msg .muted { display: block; color: var(--ink-3); margin-top: 6px; }
.error-back {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink);
    border-bottom: 1px solid var(--ink);
    padding-bottom: 1px;
}

/* ============================================================
   Site footer
   ============================================================ */
.site-foot {
    background: var(--ink);
    color: var(--paper);
    padding: clamp(32px, 4vw, 48px) clamp(20px, 4vw, 40px);
    margin-top: clamp(48px, 6vw, 96px);
}
.site-foot-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 24px;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(var(--paper-rgb), 0.55);
}
.site-foot strong { color: var(--paper); font-weight: 700; }
.site-foot-mark {
    display: flex; flex-direction: column; gap: 4px;
    text-transform: none;
    letter-spacing: 0;
    font-family: var(--font-display);
    font-size: 14px;
    color: rgba(var(--paper-rgb), 0.6);
}
.site-foot-mark strong { font-size: 18px; letter-spacing: -0.01em; }
.site-foot-meta { display: flex; gap: 18px; }
.site-foot-links {
    display: flex; gap: 18px;
    list-style: none;
}
.site-foot-links a { color: rgba(var(--paper-rgb), 0.7); }
.site-foot-links a:hover { color: var(--paper); }
@media (max-width: 720px) {
    .site-foot-inner { grid-template-columns: 1fr; gap: 16px; }
}

/* ============================================================
   Theme toggle — bottom-right
   ============================================================ */
.theme-toggle {
    position: fixed;
    bottom: 20px; right: 20px;
    z-index: 100;
    width: 44px; height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0;
    background: var(--paper);
    color: var(--ink);
    border: 1px solid var(--ink);
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(var(--ink-rgb), 0.10), 0 1px 3px rgba(var(--ink-rgb), 0.08);
    transition: transform 0.15s ease;
}
.theme-toggle:hover { transform: translateY(-1px); }
.theme-toggle svg {
    width: 18px; height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ============================================================
   Members portal overrides — match brand accent
   ============================================================ */
:root, [data-theme] {
    --ghost-accent-color: var(--sweep);
}

/* ============================================================
   Koenig editor card classes — required by Ghost validator
   ============================================================ */
.kg-card-hascaption          { display: block; }
.kg-image-card               { margin: 1.6em auto; }
.kg-image-card.kg-width-wide  img { max-width: 1040px; }
.kg-image-card.kg-width-full  img { max-width: none; width: 100vw; transform: translateX(calc(50% - 50vw)); }
.kg-image-card figcaption     {
    text-align: center;
    margin-top: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.06em;
    color: var(--ink-3);
}

.kg-width-wide  { max-width: 1040px; margin-left: auto; margin-right: auto; }
.kg-width-full  { width: 100vw; max-width: 100vw; transform: translateX(calc(50% - 50vw)); }

.kg-gallery-container {
    display: flex; flex-direction: column;
    gap: 8px;
    max-width: 1040px;
    margin: 1.6em auto;
}
.kg-gallery-row {
    display: flex; gap: 8px;
}
.kg-gallery-image img {
    display: block;
    width: 100%; height: 100%;
    object-fit: cover;
}

.kg-bookmark-card {
    display: block;
    margin: 1.6em auto;
    border: 1px solid var(--ink);
    background: var(--paper);
    max-width: 64ch;
    font-family: var(--font-display);
    text-decoration: none;
}
.kg-bookmark-container {
    display: grid;
    grid-template-columns: 1fr 160px;
    gap: 0;
    align-items: stretch;
}
.kg-bookmark-content {
    padding: 18px 20px;
    color: var(--ink);
}
.kg-bookmark-title {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
    color: var(--ink);
}
.kg-bookmark-description {
    font-size: 14px;
    color: var(--ink-2);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.kg-bookmark-metadata {
    display: flex; gap: 10px; align-items: center;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.kg-bookmark-icon { width: 14px; height: 14px; }
.kg-bookmark-author    { font-weight: 700; }
.kg-bookmark-publisher { color: var(--ink-3); }
.kg-bookmark-thumbnail {
    background-size: cover;
    background-position: center;
    border-left: 1px solid var(--rule);
}
.kg-bookmark-thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 540px) {
    .kg-bookmark-container { grid-template-columns: 1fr; }
    .kg-bookmark-thumbnail { display: none; }
}

.kg-embed-card { margin: 1.6em auto; max-width: 720px; }
.kg-embed-card iframe { max-width: 100%; }

.kg-callout-card {
    border-left: 3px solid var(--sweep);
    background: var(--paper-2);
    padding: 16px 20px;
    margin: 1.6em auto;
    max-width: 64ch;
    font-family: var(--font-display);
    font-size: 16px;
    line-height: 1.55;
}
.kg-callout-emoji { margin-right: 10px; }

.kg-toggle-card {
    border: 1px solid var(--rule);
    padding: 14px 18px;
    margin: 1.6em auto;
    max-width: 64ch;
}
.kg-toggle-heading-text { font-weight: 700; }

.kg-button-card { display: flex; justify-content: center; margin: 1.6em 0; }
.kg-btn {
    display: inline-block;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 12px 24px;
    background: var(--ink);
    color: var(--paper);
    border: 1px solid var(--ink);
    text-decoration: none;
}
.kg-btn:hover { opacity: 0.88; }

.kg-product-card {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 16px;
    border: 1px solid var(--rule);
    padding: 16px;
    margin: 1.6em auto;
    max-width: 64ch;
}

.kg-header-card {
    background: var(--paper-2);
    padding: 32px;
    margin: 1.6em auto;
    max-width: 1040px;
    text-align: center;
}

.kg-file-card {
    border: 1px solid var(--rule);
    padding: 14px 18px;
    margin: 1.6em auto;
    max-width: 64ch;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--ink-2);
}

.kg-audio-card,
.kg-video-card {
    margin: 1.6em auto;
    max-width: 720px;
}

/* ============================================================
   .rr-issue — when an issue's email-bulletproof HTML is rendered
   on the web, override the inline web-safe fonts with our brand
   stack. Same post body, two surfaces: email keeps Helvetica /
   Georgia (inline styles win there); web gets the full brand
   typography because we use !important here.

   Also widens the 640px email container to a comfortable web
   reading column and removes the email-grey wrapper.
   ============================================================ */
.rr-issue {
    background: var(--paper) !important;
    padding: 0 !important;
    max-width: 760px;
    margin: 0 auto;
    font-family: var(--font-display) !important;
}
.rr-issue,
.rr-issue table,
.rr-issue td,
.rr-issue p,
.rr-issue span,
.rr-issue strong,
.rr-issue h1,
.rr-issue h2,
.rr-issue h3,
.rr-issue a {
    font-family: var(--font-display) !important;
}
.rr-issue .rr-mono {
    font-family: var(--font-mono) !important;
    letter-spacing: 0.14em !important;
}
.rr-issue .rr-intro,
.rr-issue .rr-intro * {
    font-family: var(--font-serif) !important;
    font-style: italic !important;
    font-variation-settings: "opsz" 28, "SOFT" 100;
}
.rr-issue .rr-headline,
.rr-issue .rr-headline-mast {
    font-family: var(--font-display) !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
}
.rr-issue .rr-headline      { font-size: clamp(17px, 1.4vw, 21px) !important; line-height: 1.3 !important; }
.rr-issue .rr-headline-mast { font-size: clamp(38px, 4.5vw, 56px) !important; line-height: 0.96 !important; }
.rr-issue .rr-stat-num {
    font-family: var(--font-display) !important;
    font-weight: 700 !important;
    font-size: clamp(28px, 2.6vw, 36px) !important;
    letter-spacing: -0.02em !important;
}

/* Body text — keep close to email size on web; never balloon */
.rr-issue p,
.rr-issue td {
    font-size: 14px !important;
    line-height: 1.55 !important;
}
.rr-issue .rr-intro,
.rr-issue .rr-intro * {
    font-size: clamp(14px, 1vw, 16px) !important;
    line-height: 1.55 !important;
}
.rr-issue .rr-meta,
.rr-issue .rr-mono,
.rr-issue .rr-eye,
.rr-issue .rr-stat-lbl {
    font-size: 10.5px !important;
    line-height: 1.6 !important;
}
.rr-issue .rr-stat-lbl,
.rr-issue .rr-eye,
.rr-issue .rr-meta {
    font-family: var(--font-mono) !important;
}

/* Override the email's inline cell paddings on web for breathing room */
.rr-issue .rr-mast > tr > td,
.rr-issue .rr-mast td:first-child {
    padding: clamp(36px, 5vw, 56px) clamp(24px, 3vw, 40px) clamp(28px, 4vw, 40px) !important;
}
.rr-issue .rr-row td:not([width="6"]) {
    padding: clamp(20px, 2.4vw, 28px) clamp(20px, 3vw, 32px) !important;
}
.rr-issue .rr-row-cd td:not([width="6"]) {
    padding: 14px clamp(20px, 3vw, 32px) !important;
}
.rr-issue .rr-stats td {
    padding: clamp(22px, 2.6vw, 28px) 18px !important;
}
.rr-issue .rr-strap-top td,
.rr-issue .rr-strap-bot td,
.rr-issue .rr-section td,
.rr-issue .rr-dept td {
    padding-left: clamp(20px, 3vw, 32px) !important;
    padding-right: clamp(20px, 3vw, 32px) !important;
}

/* Hover state on the source-document link only on web */
.rr-issue a:hover { opacity: 0.85; }

/* The 640px max-width inline doesn't constrain web anymore */
.rr-issue > table {
    max-width: 760px !important;
    width: 100% !important;
}

/* Dark mode — invert the email surfaces gracefully */
[data-theme="dark"] .rr-issue {
    background: var(--paper) !important;
}
[data-theme="dark"] .rr-issue > table,
[data-theme="dark"] .rr-issue .rr-mast,
[data-theme="dark"] .rr-issue .rr-intro-block,
[data-theme="dark"] .rr-issue .rr-stats,
[data-theme="dark"] .rr-issue .rr-row,
[data-theme="dark"] .rr-issue .rr-signoff {
    background: var(--paper) !important;
}
[data-theme="dark"] .rr-issue .rr-fwd,
[data-theme="dark"] .rr-issue .rr-dept {
    background: var(--paper-2) !important;
}
[data-theme="dark"] .rr-issue td[style*="border-bottom:1px solid #0d1b2e"],
[data-theme="dark"] .rr-issue td[style*="border-top:1px solid #0d1b2e"] {
    border-color: var(--rule-2) !important;
}
[data-theme="dark"] .rr-issue td[style*="border-top:1px solid #c8d2e0"],
[data-theme="dark"] .rr-issue td[style*="border-right:1px solid #c8d2e0"] {
    border-color: var(--rule) !important;
}
[data-theme="dark"] .rr-issue [class*="rr-headline"],
[data-theme="dark"] .rr-issue [class*="rr-stat-num"],
[data-theme="dark"] .rr-issue strong {
    color: var(--ink) !important;
}
[data-theme="dark"] .rr-issue .rr-meta,
[data-theme="dark"] .rr-issue .rr-stat-lbl,
[data-theme="dark"] .rr-issue .rr-eye {
    color: var(--ink-3) !important;
}
[data-theme="dark"] .rr-issue p:not(.rr-eye):not(.rr-meta):not(.rr-mono):not(.rr-stat-lbl) {
    color: var(--ink-2) !important;
}
[data-theme="dark"] .rr-issue a {
    color: var(--sweep) !important;
}
