/* ============================================================
   THE FLIES — Ghost Theme Stylesheet
   Design system: EB Garamond + Inter, dark palette, amber accents
   ============================================================ */

/* === VARIABLES === */
:root {
    --black: #1a1714;
    --dark: #252220;
    --warm-dark: #2e2a27;
    --cream: #f0ebe3;
    --cream-dim: #d9d3c9;
    --amber: #c4943a;
    --amber-dim: #a67c2e;
    --hatch-green: #6b7f5e;
    --drone-blue: #6883a0;
    --ash-gray: #7a726a;
    --gloss-plum: #8a5e7a;
    --serif: 'EB Garamond', Georgia, serif;
    --sans: 'Inter', -apple-system, sans-serif;
}

/* === RESET === */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: var(--black);
    color: var(--cream);
    font-family: var(--serif);
    font-size: 18px;
    line-height: 1.6;
    min-height: 100vh;
}

/* === HEADER === */
.site-header {
    border-bottom: 1px solid rgba(196, 148, 58, 0.2);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-group {
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.logo {
    font-family: var(--sans);
    font-weight: 700;
    font-size: 1.6rem;
    letter-spacing: 0.08em;
    color: var(--cream);
    text-transform: uppercase;
    text-decoration: none;
}

.logo span { color: var(--amber); }

.logo-group:hover .logo { color: var(--amber); }

.tagline {
    font-family: var(--serif);
    font-size: 0.85rem;
    font-style: italic;
    color: var(--cream-dim);
    letter-spacing: 0.01em;
    margin-top: 0.15rem;
}

.site-nav {
    display: flex;
    gap: 2rem;
    font-family: var(--sans);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.site-nav a {
    color: var(--cream-dim);
    text-decoration: none;
    transition: color 0.2s;
}

.site-nav a:hover,
.site-nav a.nav-current { color: var(--amber); }

/* === CHARACTER BAR === */
.character-bar-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    text-align: center;
}

.char-bar-phrase {
    font-family: var(--serif);
    font-size: 1rem;
    font-style: italic;
    color: var(--cream-dim);
    letter-spacing: 0.08em;
}

.char-bar-phrase.top { margin-bottom: 1rem; }
.char-bar-phrase.bottom { margin-top: 1rem; }

.character-bar {
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.char-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: transform 0.2s;
}

.char-bar-item:hover { transform: translateY(-2px); }

.char-bar-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid;
}

.char-bar-avatar.hatch { border-color: var(--hatch-green); }
.char-bar-avatar.drone { border-color: var(--drone-blue); }
.char-bar-avatar.ash { border-color: var(--ash-gray); }
.char-bar-avatar.gloss { border-color: var(--gloss-plum); }

.char-bar-name {
    font-family: var(--sans);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.char-bar-name.hatch { color: var(--hatch-green); }
.char-bar-name.drone { color: var(--drone-blue); }
.char-bar-name.ash { color: var(--ash-gray); }
.char-bar-name.gloss { color: var(--gloss-plum); }

/* === HERO / LATEST === */
.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 2rem 2rem;
}

.hero-label {
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 1rem;
}

.hero-headline {
    font-family: var(--serif);
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--cream);
    margin-bottom: 0.75rem;
    max-width: 800px;
}

.hero-headline a {
    color: inherit;
    text-decoration: none;
}

.hero-headline a:hover { color: var(--amber); }

.hero-source {
    font-family: var(--sans);
    font-size: 0.8rem;
    color: var(--cream-dim);
    margin-bottom: 2.5rem;
}

.hero-source a {
    color: var(--amber-dim);
    text-decoration: none;
}

.hero-source a:hover { text-decoration: underline; }

/* === FLY COMMENTARY GRID === */
.commentary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 3rem;
}

.fly-card {
    background: var(--dark);
    border-radius: 6px;
    padding: 1.5rem 1.75rem;
    border-left: 3px solid;
    position: relative;
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 1.25rem;
}

.fly-card.hatch { border-left-color: var(--hatch-green); }
.fly-card.drone { border-left-color: var(--drone-blue); }
.fly-card.ash { border-left-color: var(--ash-gray); }
.fly-card.gloss { border-left-color: var(--gloss-plum); }

.fly-avatar {
    width: 72px;
    height: 72px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    align-self: start;
    margin-top: 0.25rem;
}

.fly-name {
    font-family: var(--sans);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.fly-name.hatch { color: var(--hatch-green); }
.fly-name.drone { color: var(--drone-blue); }
.fly-name.ash { color: var(--ash-gray); }
.fly-name.gloss { color: var(--gloss-plum); }

.fly-content { min-width: 0; }

.fly-text {
    font-family: var(--serif);
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--cream);
}

.fly-text p { margin-bottom: 0.75rem; }
.fly-text p:last-child { margin-bottom: 0; }

/* === AD UNITS === */
.ad-unit {
    background: var(--dark);
    border: 1px dashed rgba(196, 148, 58, 0.15);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--sans);
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(240, 235, 227, 0.2);
}

.ad-leaderboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
}

.ad-leaderboard .ad-unit {
    height: 90px;
    width: 100%;
    max-width: 728px;
    margin: 0 auto;
}

.ad-sidebar .ad-unit {
    height: 250px;
    width: 100%;
    margin-bottom: 1.5rem;
}

.ad-in-feed {
    padding: 1.25rem 0;
    border-bottom: 1px solid rgba(240, 235, 227, 0.06);
}

.ad-in-feed .ad-unit {
    height: 100px;
    width: 100%;
}

/* === DIVIDER === */
.divider {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.divider hr {
    border: none;
    border-top: 1px solid rgba(196, 148, 58, 0.15);
}

/* === FEED === */
.feed-label {
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 1.5rem;
}

.feed-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(240, 235, 227, 0.06);
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
}

.feed-item:hover {
    background: rgba(196, 148, 58, 0.03);
}

.feed-category {
    font-family: var(--sans);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    color: var(--amber-dim);
    padding-top: 0.25rem;
}

.feed-content h3 {
    font-family: var(--serif);
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--cream);
    margin-bottom: 0.5rem;
}

.feed-preview {
    font-family: var(--serif);
    font-size: 0.95rem;
    color: var(--cream-dim);
    line-height: 1.5;
    margin-bottom: 0.6rem;
}

.feed-meta {
    font-family: var(--sans);
    font-size: 0.7rem;
    color: rgba(240, 235, 227, 0.4);
    display: flex;
    gap: 1rem;
    align-items: center;
}

.feed-fly-tags {
    display: flex;
    gap: 0.4rem;
}

.fly-tag {
    font-family: var(--sans);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
}

.fly-tag.hatch { background: rgba(107, 127, 94, 0.15); color: var(--hatch-green); }
.fly-tag.drone { background: rgba(104, 131, 160, 0.15); color: var(--drone-blue); }
.fly-tag.ash { background: rgba(122, 114, 106, 0.15); color: var(--ash-gray); }
.fly-tag.gloss { background: rgba(138, 94, 122, 0.15); color: var(--gloss-plum); }

/* === MAIN LAYOUT: Feed + Sidebar === */
.main-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 3rem;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
}

/* === SIDEBAR === */
.sidebar-section {
    padding-top: 0.5rem;
}

.sidebar-heading {
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 1.25rem;
}

.character-card {
    background: var(--dark);
    border-radius: 6px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-left: 3px solid;
    transition: background 0.2s;
    cursor: pointer;
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 1rem;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.character-card:hover { background: var(--warm-dark); }

.character-card.hatch { border-left-color: var(--hatch-green); }
.character-card.drone { border-left-color: var(--drone-blue); }
.character-card.ash { border-left-color: var(--ash-gray); }
.character-card.gloss { border-left-color: var(--gloss-plum); }

.character-card-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.character-card-info h4 {
    font-family: var(--sans);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.character-card.hatch h4 { color: var(--hatch-green); }
.character-card.drone h4 { color: var(--drone-blue); }
.character-card.ash h4 { color: var(--ash-gray); }
.character-card.gloss h4 { color: var(--gloss-plum); }

.character-card-info p {
    font-family: var(--serif);
    font-size: 0.82rem;
    color: var(--cream-dim);
    line-height: 1.4;
}

/* === NEWSLETTER CTA === */
.newsletter-cta {
    background: var(--dark);
    border-radius: 6px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    border: 1px solid rgba(196, 148, 58, 0.15);
}

.newsletter-cta h4 {
    font-family: var(--sans);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--cream);
    margin-bottom: 0.5rem;
}

.newsletter-cta p {
    font-family: var(--serif);
    font-size: 0.85rem;
    color: var(--cream-dim);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.newsletter-input {
    display: flex;
    gap: 0.5rem;
}

.newsletter-input input {
    flex: 1;
    background: var(--black);
    border: 1px solid rgba(240, 235, 227, 0.1);
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    font-family: var(--sans);
    font-size: 0.8rem;
    color: var(--cream);
}

.newsletter-input input::placeholder { color: rgba(240, 235, 227, 0.3); }

.newsletter-input button,
.newsletter-cta button,
.cta-box button {
    background: var(--amber);
    color: var(--black);
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
}

.newsletter-input button:hover,
.newsletter-cta button:hover,
.cta-box button:hover { background: var(--amber-dim); }

/* Newsletter success state — Ghost Portal adds .success class to form */
.newsletter-success {
    display: none;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--sans);
    font-size: 0.8rem;
    color: var(--amber);
    line-height: 1.4;
    width: 100%;
}
.newsletter-success .success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 50%;
    background: var(--amber);
    color: var(--black);
    font-weight: 700;
    font-size: 0.75rem;
    flex-shrink: 0;
}
.newsletter-input.success {
    flex-wrap: wrap;
}
.newsletter-input.success input,
.newsletter-input.success button {
    display: none;
}
.newsletter-input.success .newsletter-success {
    display: flex;
}

/* === ORIGIN TEASER (sidebar) === */
.origin-teaser {
    background: var(--dark);
    border-radius: 6px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.origin-teaser h4 {
    font-family: var(--sans);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--amber);
    margin-bottom: 0.5rem;
}

.origin-teaser p {
    font-family: var(--serif);
    font-size: 0.85rem;
    font-style: italic;
    color: var(--cream-dim);
    line-height: 1.6;
}

.origin-teaser a {
    display: inline-block;
    margin-top: 0.75rem;
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--amber);
    text-decoration: none;
    letter-spacing: 0.04em;
}

.origin-teaser a:hover { text-decoration: underline; }

/* === ABOUT PAGE === */
.about-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
}

.about-label {
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 1.5rem;
}

.about-content h1,
.page-content h1 {
    font-family: var(--serif);
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 2.5rem;
    color: var(--cream);
}

.about-content p,
.page-content p {
    font-family: var(--serif);
    font-size: 1.1rem;
    line-height: 1.75;
    color: var(--cream);
    margin-bottom: 1.5rem;
}

.about-content .dim,
.page-content .dim { color: var(--cream-dim); }

.section-break {
    display: block;
    text-align: center;
    color: var(--amber);
    font-size: 1.2rem;
    letter-spacing: 0.5em;
    margin: 2.5rem 0;
}

.fly-intro {
    background: var(--dark);
    border-radius: 6px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.25rem;
    border-left: 3px solid;
}

.fly-intro.hatch { border-left-color: var(--hatch-green); }
.fly-intro.drone { border-left-color: var(--drone-blue); }
.fly-intro.ash { border-left-color: var(--ash-gray); }
.fly-intro.gloss { border-left-color: var(--gloss-plum); }

.fly-intro h3 {
    font-family: var(--sans);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.fly-intro.hatch h3 { color: var(--hatch-green); }
.fly-intro.drone h3 { color: var(--drone-blue); }
.fly-intro.ash h3 { color: var(--ash-gray); }
.fly-intro.gloss h3 { color: var(--gloss-plum); }

.fly-intro p {
    font-size: 1rem;
    line-height: 1.65;
    margin-bottom: 0;
    color: var(--cream-dim);
}

/* === CTA BOX === */
.cta-box {
    background: var(--dark);
    border: 1px solid rgba(196, 148, 58, 0.15);
    border-radius: 6px;
    padding: 2rem;
    margin-top: 3rem;
    text-align: center;
}

.cta-box h3 {
    font-family: var(--sans);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--cream);
    margin-bottom: 0.5rem;
}

.cta-box p {
    font-size: 0.95rem;
    color: var(--cream-dim);
    margin-bottom: 1.25rem;
}

.cta-box .newsletter-input {
    max-width: 400px;
    margin: 0 auto;
}

.cta-box input {
    flex: 1;
    background: var(--black);
    border: 1px solid rgba(240, 235, 227, 0.1);
    border-radius: 4px;
    padding: 0.6rem 0.75rem;
    font-family: var(--sans);
    font-size: 0.85rem;
    color: var(--cream);
}

.cta-box input::placeholder { color: rgba(240, 235, 227, 0.3); }

/* === AUTHOR / CHARACTER BIO PAGE === */
.bio-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
}

.bio-label {
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    color: var(--amber);
}

.bio-label.hatch { color: var(--hatch-green); }
.bio-label.drone { color: var(--drone-blue); }
.bio-label.ash { color: var(--ash-gray); }
.bio-label.gloss { color: var(--gloss-plum); }

.bio-header {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.bio-avatar {
    width: 200px;
    height: 200px;
    min-width: 200px;
    border-radius: 6px;
    object-fit: cover;
}

.bio-title h1 {
    font-family: var(--serif);
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--cream);
    margin-bottom: 0.5rem;
}

.bio-title p {
    font-family: var(--sans);
    font-size: 0.9rem;
    color: var(--cream-dim);
    font-weight: 500;
}

.bio-content p {
    font-family: var(--serif);
    font-size: 1.1rem;
    line-height: 1.75;
    color: var(--cream);
    margin-bottom: 1.5rem;
}

.bio-content .dim { color: var(--cream-dim); }

.section-label {
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 2.5rem 0 1.5rem;
    display: block;
    color: var(--amber);
}

.section-label.hatch { color: var(--hatch-green); }
.section-label.drone { color: var(--drone-blue); }
.section-label.ash { color: var(--ash-gray); }
.section-label.gloss { color: var(--gloss-plum); }

.recent-commentary {
    background: var(--dark);
    border-radius: 6px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.25rem;
    border-left: 3px solid var(--amber);
}

.recent-commentary.hatch { border-left-color: var(--hatch-green); }
.recent-commentary.drone { border-left-color: var(--drone-blue); }
.recent-commentary.ash { border-left-color: var(--ash-gray); }
.recent-commentary.gloss { border-left-color: var(--gloss-plum); }

.recent-commentary h3 {
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: var(--amber);
}

.recent-commentary h3.hatch { color: var(--hatch-green); }
.recent-commentary h3.drone { color: var(--drone-blue); }
.recent-commentary h3.ash { color: var(--ash-gray); }
.recent-commentary h3.gloss { color: var(--gloss-plum); }

.commentary-item { margin-bottom: 1.5rem; }
.commentary-item:last-child { margin-bottom: 0; }

.commentary-item .story-title {
    font-family: var(--serif);
    font-size: 1rem;
    font-weight: 600;
    color: var(--cream);
    margin-bottom: 0.5rem;
}

.commentary-item .story-meta {
    font-family: var(--sans);
    font-size: 0.75rem;
    color: var(--cream-dim);
    margin-bottom: 0.4rem;
}

/* === POST / STORY PAGE — Ghost content styling === */
.post-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 3rem;
}

/* Fly cards in post content — grid layout with avatar + text */
.post-content .fly-card {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 1.25rem;
}

/* Fallback for cards without avatars — single column */
.post-content .fly-card:not(:has(.fly-avatar)) {
    display: block;
}

.post-content .fly-card .fly-content {
    min-width: 0;
}

/* Ghost's {{content}} output — style KG cards and standard HTML */
.post-content .kg-card { margin: 0 0 1.5rem; }
.post-content .kg-width-wide { margin-left: -4rem; margin-right: -4rem; max-width: calc(100% + 8rem); }
.post-content .kg-width-full { margin-left: calc(-50vw + 50%); margin-right: calc(-50vw + 50%); max-width: 100vw; width: 100vw; }
.post-content .kg-width-wide img,
.post-content .kg-width-full img { max-width: 100%; }

.post-content .kg-bookmark-card {
    background: var(--dark);
    border-radius: 6px;
    border: 1px solid rgba(240, 235, 227, 0.08);
    overflow: hidden;
}

.post-content .kg-bookmark-card a {
    display: flex;
    text-decoration: none;
    color: var(--cream);
}

.post-content .kg-bookmark-content {
    padding: 1.25rem;
    flex: 1;
}

.post-content .kg-bookmark-title {
    font-family: var(--serif);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--cream);
    margin-bottom: 0.5rem;
}

.post-content .kg-bookmark-description {
    font-family: var(--serif);
    font-size: 0.9rem;
    color: var(--cream-dim);
    line-height: 1.5;
}

.post-content .kg-bookmark-metadata {
    font-family: var(--sans);
    font-size: 0.75rem;
    color: var(--cream-dim);
    margin-top: 0.75rem;
}

/* Ghost HTML card — used for commentary grid */
.post-content .kg-html-card {
    max-width: 100%;
}

/* Commentary grid inside post — 2x2 layout, no extra padding */
.post-content .commentary-grid,
.post-content .kg-html-card .commentary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding: 0;
    max-width: 100%;
}

/* Force avatar images to stay small inside Ghost HTML cards */
.post-content .fly-avatar,
.post-content .kg-html-card .fly-avatar,
.gh-content .fly-avatar,
.kg-html-card .fly-avatar {
    width: 72px !important;
    height: 72px !important;
    min-width: 72px;
    max-width: 72px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    align-self: start;
    margin-top: 0.25rem;
}

/* Ensure fly-card grid works inside Ghost HTML cards */
.post-content .kg-html-card .fly-card,
.gh-content .kg-html-card .fly-card {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 1.25rem;
    background: var(--dark);
    border-radius: 6px;
    padding: 1.5rem 1.75rem;
    border-left: 3px solid;
}

.post-content .kg-html-card .fly-card.hatch { border-left-color: var(--hatch-green); }
.post-content .kg-html-card .fly-card.drone { border-left-color: var(--drone-blue); }
.post-content .kg-html-card .fly-card.ash { border-left-color: var(--ash-gray); }
.post-content .kg-html-card .fly-card.gloss { border-left-color: var(--gloss-plum); }

/* Ghost editor wraps custom HTML in gh-content */
.gh-content .fly-card {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 1.25rem;
}

.gh-content .fly-card:not(:has(.fly-avatar)) {
    display: block;
}

/* Ensure commentary grid in gh-content renders properly */
.gh-content .commentary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 3rem;
}

/* Active nav state */
.site-nav a.active { color: var(--amber); }

/* Page feature image styling */
.page-feature-image {
    width: 100%;
    max-width: 100%;
    border-radius: 6px;
    margin-bottom: 2rem;
}

/* === PAGE CONTENT (generic Ghost pages) === */
.page-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem 2rem 4rem;
}

.page-content h1 { margin-bottom: 2.5rem; }
.page-content h2 {
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--cream);
    margin: 2rem 0 1rem;
}

.page-content h3 {
    font-family: var(--sans);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--amber);
    margin: 1.5rem 0 0.75rem;
}

.page-content a {
    color: var(--amber);
    text-decoration: none;
}

.page-content a:hover { text-decoration: underline; }

/* === ON THE WALL (Scanner Page) === */
.wall-header {
    border-bottom: 2px solid var(--amber);
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wall-title-group {
    display: flex;
    align-items: baseline;
    gap: 1.25rem;
}

.wall-title {
    font-family: var(--sans);
    font-weight: 700;
    font-size: 1.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cream);
}

.wall-title span { color: var(--amber); }

.wall-subtitle {
    font-family: var(--serif);
    font-size: 0.9rem;
    font-style: italic;
    color: var(--cream-dim);
}

.wall-nav {
    display: flex;
    gap: 1.5rem;
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.wall-nav a {
    color: var(--cream-dim);
    text-decoration: none;
    transition: color 0.15s;
}

.wall-nav a:hover { color: var(--amber); }

.date-bar {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.5rem 2rem;
    border-bottom: 1px solid rgba(196, 148, 58, 0.15);
    font-family: var(--sans);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--amber-dim);
    display: flex;
    justify-content: space-between;
}

.wall-grid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem 3rem;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 2rem;
}

.wall-column { min-width: 0; }

.category-block { margin-bottom: 1.75rem; }

.category-label {
    font-family: var(--sans);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--amber);
    border-bottom: 1px solid rgba(196, 148, 58, 0.25);
    padding-bottom: 0.35rem;
    margin-bottom: 0.6rem;
}

.wall-link {
    display: block;
    padding: 0.35rem 0;
    text-decoration: none;
    color: var(--cream);
    border-bottom: 1px solid rgba(240, 235, 227, 0.04);
    transition: all 0.15s;
    line-height: 1.4;
}

.wall-link:hover {
    color: var(--amber);
    background: rgba(196, 148, 58, 0.04);
    padding-left: 0.35rem;
}

.wall-link .headline {
    font-family: var(--serif);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.3;
    display: block;
}

.wall-link .sub {
    font-family: var(--sans);
    font-size: 0.72rem;
    color: var(--cream-dim);
    margin-top: 0.15rem;
    display: block;
}

.wall-link .fly-chips {
    display: flex;
    gap: 0.3rem;
    margin-top: 0.25rem;
}

.wall-chip {
    font-family: var(--sans);
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.1rem 0.35rem;
    border-radius: 2px;
}

.wall-chip.hatch { background: rgba(107, 127, 94, 0.2); color: var(--hatch-green); }
.wall-chip.drone { background: rgba(104, 131, 160, 0.2); color: var(--drone-blue); }
.wall-chip.ash { background: rgba(122, 114, 106, 0.2); color: var(--ash-gray); }
.wall-chip.gloss { background: rgba(138, 94, 122, 0.2); color: var(--gloss-plum); }

.featured-block { margin-bottom: 1.75rem; }

.featured-link {
    display: block;
    text-decoration: none;
    color: var(--cream);
    padding: 1rem;
    background: var(--dark);
    border-left: 3px solid var(--amber);
    margin-bottom: 0.75rem;
    transition: all 0.15s;
}

.featured-link:hover {
    background: var(--warm-dark);
    border-left-color: var(--cream);
}

.featured-link .headline {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.25;
    display: block;
    margin-bottom: 0.4rem;
}

.featured-link .pull-quote {
    font-family: var(--serif);
    font-size: 0.95rem;
    font-style: italic;
    color: var(--cream-dim);
    line-height: 1.5;
    display: block;
    margin-bottom: 0.5rem;
}

.featured-link .meta-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--sans);
    font-size: 0.7rem;
    color: rgba(240, 235, 227, 0.4);
}

.siren {
    background: rgba(196, 148, 58, 0.08);
    border: 1px solid rgba(196, 148, 58, 0.25);
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    text-align: center;
}

.siren-label {
    font-family: var(--sans);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 0.25rem;
}

.siren a {
    font-family: var(--serif);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--cream);
    text-decoration: none;
}

.siren a:hover { color: var(--amber); }

.wall-quote {
    border-left: 2px solid var(--amber-dim);
    padding: 0.5rem 0.75rem;
    margin: 0.75rem 0;
    font-family: var(--serif);
    font-size: 0.9rem;
    font-style: italic;
    color: var(--cream-dim);
    line-height: 1.5;
}

.wall-quote .attribution {
    display: block;
    font-style: normal;
    font-family: var(--sans);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-top: 0.35rem;
}

.wall-quote .attribution.hatch { color: var(--hatch-green); }
.wall-quote .attribution.drone { color: var(--drone-blue); }
.wall-quote .attribution.ash { color: var(--ash-gray); }
.wall-quote .attribution.gloss { color: var(--gloss-plum); }

a.wall-quote-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

a.wall-quote-link:hover .wall-quote {
    border-left-color: var(--amber);
    background: rgba(196, 148, 58, 0.05);
}

.fly-roster {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 1rem;
}

.fly-roster-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem;
    text-decoration: none;
    transition: background 0.15s;
    border-radius: 3px;
}

.fly-roster-item:hover { background: rgba(240, 235, 227, 0.04); }

.fly-roster-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid;
}

.fly-roster-img.hatch { border-color: var(--hatch-green); }
.fly-roster-img.drone { border-color: var(--drone-blue); }
.fly-roster-img.ash { border-color: var(--ash-gray); }
.fly-roster-img.gloss { border-color: var(--gloss-plum); }

.fly-roster-name {
    font-family: var(--sans);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.fly-roster-name.hatch { color: var(--hatch-green); }
.fly-roster-name.drone { color: var(--drone-blue); }
.fly-roster-name.ash { color: var(--ash-gray); }
.fly-roster-name.gloss { color: var(--gloss-plum); }

.wall-divider {
    border: none;
    border-top: 1px solid rgba(196, 148, 58, 0.12);
    margin: 1rem 0;
}

/* Wall newsletter CTA */
.wall-cta {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(196, 148, 58, 0.15);
}
.wall-cta-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}
.wall-cta-text {
    font-family: var(--sans);
    font-size: 0.8rem;
    color: var(--cream-dim);
}
.wall-cta-text strong {
    color: var(--amber);
    font-weight: 700;
}
.wall-newsletter {
    flex: 0 1 auto;
    max-width: 350px;
}

.wall-footer {
    border-top: 2px solid var(--amber);
    padding: 1rem 2rem;
    text-align: center;
    font-family: var(--sans);
    font-size: 0.65rem;
    color: rgba(240, 235, 227, 0.3);
    letter-spacing: 0.04em;
    max-width: 1400px;
    margin: 0 auto;
}

/* === FOOTER === */
.site-footer {
    border-top: 1px solid rgba(196, 148, 58, 0.1);
    padding: 2rem;
    text-align: center;
    font-family: var(--sans);
    font-size: 0.7rem;
    color: rgba(240, 235, 227, 0.3);
    letter-spacing: 0.03em;
    max-width: 1200px;
    margin: 0 auto;
}

/* === TAG ARCHIVE === */
.tag-archive {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 2rem 3rem;
}

.tag-archive-title {
    font-family: var(--serif);
    font-size: 2rem;
    font-weight: 700;
    color: var(--cream);
    margin-bottom: 0.5rem;
}

.tag-archive-description {
    font-family: var(--serif);
    font-size: 1rem;
    color: var(--cream-dim);
    margin-bottom: 2rem;
}

/* === ERROR PAGE === */
.error-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 4rem 2rem;
    text-align: center;
}

.error-code {
    font-family: var(--sans);
    font-size: 6rem;
    font-weight: 700;
    color: var(--amber);
    line-height: 1;
    margin-bottom: 1rem;
}

.error-message {
    font-family: var(--serif);
    font-size: 1.3rem;
    color: var(--cream-dim);
    margin-bottom: 2rem;
}

.error-link {
    font-family: var(--sans);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--amber);
    text-decoration: none;
    letter-spacing: 0.04em;
}

.error-link:hover { text-decoration: underline; }

/* === GHOST PORTAL OVERRIDES === */
/* Style Ghost's membership portal to match theme */
.gh-portal-triggerbtn-iframe {
    /* Position portal button cleanly */
}

/* === GHOST CONTENT — embedded HTML styling === */
/* These target HTML content pasted into Ghost posts */
.gh-content .commentary-grid { padding: 0; }

/* === RESPONSIVE === */
@media (max-width: 1000px) {
    .wall-grid { grid-template-columns: 1fr 1fr; }
    .wall-column:nth-child(3) {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 900px) {
    .commentary-grid,
    .gh-content .commentary-grid,
    .post-content .commentary-grid,
    .post-content .kg-html-card .commentary-grid { grid-template-columns: 1fr; }
    .main-layout { grid-template-columns: 1fr; }
    .hero-headline { font-size: 1.8rem; }
    .site-nav { gap: 1rem; }
    .character-bar { gap: 2rem; }
}

@media (max-width: 700px) {
    .wall-header {
        flex-direction: row;
        gap: 0;
        text-align: left;
        padding: 0.75rem 1.25rem;
        position: relative;
        flex-wrap: nowrap;
        align-items: center;
    }
    .wall-header .wall-hamburger { display: block; margin-right: 0.75rem; }
    .wall-nav { display: none !important; }
    .wall-mobile-menu.open { display: flex; }
    .wall-title-group { flex-direction: column; gap: 0.15rem; }
    .wall-title { font-size: 1.3rem; }
    .wall-subtitle { font-size: 0.75rem; }
    .wall-grid { grid-template-columns: 1fr; padding: 1rem 1.25rem 2rem; }
    .wall-column:nth-child(3) { grid-template-columns: 1fr; }
    .featured-link .headline { font-size: 1.25rem; }
    .date-bar { padding: 0.5rem 1.25rem; }
}

/* === HAMBURGER MENU (hidden on desktop) === */
.hamburger-btn {
    display: none; /* hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    position: relative;
}

.hamburger-icon {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--cream);
    position: relative;
    transition: background 0.2s;
}

.hamburger-icon::before,
.hamburger-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 22px;
    height: 2px;
    background: var(--cream);
    transition: transform 0.25s ease, top 0.25s ease;
}

.hamburger-icon::before { top: -7px; }
.hamburger-icon::after { top: 7px; }

/* Animate to X when open */
.hamburger-btn.open .hamburger-icon { background: transparent; }
.hamburger-btn.open .hamburger-icon::before { top: 0; transform: rotate(45deg); }
.hamburger-btn.open .hamburger-icon::after { top: 0; transform: rotate(-45deg); }

/* Mobile dropdown menu (hidden by default) */
.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--dark);
    border-bottom: 1px solid rgba(196, 148, 58, 0.2);
    padding: 0.75rem 1.25rem 1rem;
    z-index: 1000;
    flex-direction: column;
    gap: 0;
}

.mobile-menu a {
    display: block;
    padding: 0.6rem 0;
    font-family: var(--sans);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--cream-dim);
    text-decoration: none;
    transition: color 0.15s;
}

.mobile-menu a:hover,
.mobile-menu a.active { color: var(--amber); }

.mobile-menu-char.hatch { color: var(--hatch-green) !important; }
.mobile-menu-char.drone { color: var(--drone-blue) !important; }
.mobile-menu-char.ash { color: var(--ash-gray) !important; }
.mobile-menu-char.gloss { color: var(--gloss-plum) !important; }

.mobile-menu-divider {
    height: 1px;
    background: rgba(196, 148, 58, 0.12);
    margin: 0.25rem 0;
}

@media (max-width: 600px) {
    /* === HEADER: hamburger left, logo right === */
    .site-header {
        flex-direction: row;
        gap: 0;
        text-align: left;
        padding: 0.75rem 1.25rem;
        position: relative;
    }

    .hamburger-btn { display: block; }
    .site-nav { display: none !important; }
    .mobile-menu.open { display: flex; }

    .logo-group { margin-left: auto; text-align: right; }
    .logo { font-size: 1.3rem; }
    .tagline { font-size: 0.72rem; }

    /* === CHARACTER BAR: tighter spacing === */
    .character-bar-wrapper { padding: 0.75rem 1rem; }
    .char-bar-phrase { font-size: 0.8rem; }
    .char-bar-phrase.top { margin-bottom: 0.5rem; }
    .char-bar-phrase.bottom { margin-top: 0.5rem; }
    .character-bar { gap: 1rem; }
    .char-bar-avatar { width: 48px; height: 48px; border-width: 2px; }
    .char-bar-name { font-size: 0.6rem; }

    /* === HERO: shift up, tighter padding === */
    .hero { padding: 1rem 1.25rem 0.75rem; }
    .hero-label { margin-bottom: 0.5rem; font-size: 0.7rem; }
    .hero-headline { font-size: 1.4rem; margin-bottom: 0.4rem; }
    .hero-source { margin-bottom: 1rem; font-size: 0.75rem; }

    /* === COMMENTARY GRID: vertical list, compact cards === */
    .commentary-grid,
    .post-content .commentary-grid,
    .post-content .kg-html-card .commentary-grid,
    .gh-content .commentary-grid {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
        padding: 0 1rem 1.25rem !important;
    }

    /* === FLY CARDS: compact, all 4 visible on one screen === */
    .fly-card {
        grid-template-columns: 40px 1fr !important;
        gap: 0.6rem !important;
        padding: 0.6rem 0.75rem !important;
        border-left-width: 3px;
    }

    .fly-avatar {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
        border-radius: 4px !important;
        margin-top: 0.1rem !important;
    }

    .fly-name {
        font-size: 0.65rem !important;
        margin-bottom: 0.2rem !important;
    }

    .fly-card {
        cursor: pointer;
        position: relative;
        padding-bottom: 1.6rem !important;
    }

    .fly-text {
        font-size: 0.88rem !important;
        line-height: 1.35 !important;
    }

    /* Collapsed state: show ~3 lines with fade */
    .fly-card:not(.expanded) .fly-text {
        max-height: 3.4em;
        overflow: hidden;
        position: relative;
    }

    .fly-card:not(.expanded) .fly-text::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 1.5em;
        background: linear-gradient(transparent, var(--dark));
        pointer-events: none;
    }

    /* "Tap to read" indicator */
    .fly-card:not(.expanded)::after {
        content: 'tap to read \25BE';
        position: absolute;
        bottom: 0.3rem;
        right: 0.75rem;
        font-family: var(--sans);
        font-size: 0.55rem;
        font-weight: 600;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: var(--amber-dim);
        opacity: 0.7;
    }

    /* Expanded state */
    .fly-card.expanded .fly-text {
        max-height: none;
        overflow: visible;
    }

    .fly-card.expanded .fly-text::after {
        display: none;
    }

    .fly-card.expanded::after {
        content: 'tap to collapse \25B4';
        position: absolute;
        bottom: 0.3rem;
        right: 0.75rem;
        font-family: var(--sans);
        font-size: 0.55rem;
        font-weight: 600;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: var(--amber-dim);
        opacity: 0.7;
    }

    .fly-text p { margin-bottom: 0.3rem; }
    .fly-text p:last-child { margin-bottom: 0; }

    /* === FEED & MAIN LAYOUT: tighter === */
    .main-layout { padding: 0 1rem 1.5rem; gap: 1.5rem; }
    .feed-label { margin-bottom: 0.75rem; }
    .feed-item { gap: 0.75rem; padding: 1rem 0; }
    .feed-content h3 { font-size: 1.15rem; }

    /* === DIVIDER: tighter === */
    .divider { padding: 0 1rem; }

    /* === BIO / ABOUT: tighter === */
    .about-content,
    .bio-content,
    .page-content { padding: 1.5rem 1.25rem 2rem; }
    .bio-header { flex-direction: column; }
    .bio-avatar { width: 100%; height: auto; min-width: auto; }
    .bio-title h1,
    .about-content h1,
    .page-content h1 { font-size: 1.6rem; margin-bottom: 1.5rem; }

    /* === POST CONTENT: tighter === */
    .post-content { padding: 0 1rem 1.5rem; }

    /* === FOOTER: tighter === */
    .site-footer { padding: 1.25rem 1rem; }
}
