/* ==========================================================================
   Pitchside Docket — vintage-newsprint Ghost theme
   ========================================================================== */

:root {
    --paper: #E7E3D6;
    --paper-2: #DEDACB;
    --ink: #1B1915;
    --ink-2: #4A4740;
    --ink-3: #6E6A5F;
    --rule: #A9A492;
    --rule-2: #C3BFAF;
    --spot: #93261B;       /* Legal */
    --leather: #7A4327;    /* Tactics */
    --green: #D0DBC4;
    --green-rule: #3F6B4A; /* Betting */
    --lace: #F2EDE1;

    --font-mast: 'Pirata One', Georgia, serif;
    --font-head: 'Fjalla One', 'Archivo Narrow', sans-serif;
    --font-body: 'Spectral', Georgia, serif;
    --font-label: 'Archivo Narrow', sans-serif;
    --font-drop: 'Bodoni Moda', Georgia, serif;
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.outer { width: 100%; }
.inner {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 40px);
}

/* height: auto is required alongside max-width: 100% — without it, an <img>
   with explicit width/height HTML attributes (very common in scraped
   Substack/CMS content, e.g. width="1456" height="1285") keeps that fixed
   pixel height while the width shrinks responsively, stretching/squishing
   the image instead of scaling it proportionally. */
img { max-width: 100%; height: auto; display: block; }

/* ---------------------------------------------------------------------- */
/* Masthead                                                                */
/* ---------------------------------------------------------------------- */

.masthead {
    background: var(--paper);
    border-bottom: 3px double var(--ink);
}

.masthead-inner { padding-top: clamp(20px, 4vw, 36px); }

.masthead-top {
    text-align: center;
    padding-bottom: 14px;
}

.masthead-logo {
    font-family: var(--font-mast);
    font-weight: 400;
    font-size: clamp(2rem, 7vw, 3.6rem);
    color: var(--ink);
    letter-spacing: 0;
    line-height: 1.15;
    display: inline-block;
}

.masthead-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--green);
    border-top: 1px solid var(--green-rule);
    border-bottom: 1px solid var(--green-rule);
    padding: 8px clamp(16px, 4vw, 40px);
    font-family: var(--font-label);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-2);
}

.masthead-band-center {
    flex: 1;
    text-align: center;
    color: var(--spot);
    font-weight: 700;
}

.subscribe-link {
    font-weight: 700;
    color: var(--ink);
    border-bottom: 1px solid var(--ink);
}

.masthead-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 14px clamp(16px, 4vw, 40px);
    border-bottom: 1px solid var(--rule);
    position: relative;
}

.masthead-nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.masthead-nav-links ul.nav {
    display: flex;
    gap: clamp(14px, 3vw, 32px);
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.masthead-nav-links a {
    font-family: var(--font-label);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-2);
    padding: 4px 2px;
    border-bottom: 2px solid transparent;
}

.masthead-nav-links a:hover { border-bottom-color: var(--spot); color: var(--ink); }

.gh-search-btn {
    font-family: var(--font-label);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: none;
    border: 1px solid var(--rule);
    padding: 6px 12px;
    cursor: pointer;
    color: var(--ink-2);
    position: absolute;
    right: clamp(16px, 4vw, 40px);
}

.nav-burger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 22px;
    height: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: absolute;
    left: clamp(16px, 4vw, 40px);
}
.nav-burger span { display: block; height: 2px; background: var(--ink); }

/* ---------------------------------------------------------------------- */
/* Section dividers / labels                                              */
/* ---------------------------------------------------------------------- */

.section-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 40px 0 24px;
    font-family: var(--font-label);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--rule);
}

/* Section accent colors (tag-based) */
/* Scoped deliberately to the tag-pill/label elements only — Ghost's
   body_class/post_class helpers also stamp "tag-legal" etc. onto <body>
   and <article>, so an unscoped .tag-legal rule would cascade its color
   into all inherited body text. */
.post-card-tag.tag-legal,
.lead-story-tag.tag-legal,
.article-tag.tag-legal,
.section-title.tag-legal { color: var(--spot); }

.post-card-tag.tag-tactics,
.lead-story-tag.tag-tactics,
.article-tag.tag-tactics,
.section-title.tag-tactics { color: var(--leather); }

.post-card-tag.tag-betting,
.lead-story-tag.tag-betting,
.article-tag.tag-betting,
.section-title.tag-betting { color: var(--green-rule); }

.post-card-tag, .lead-story-tag, .article-tag {
    display: inline-block;
    font-family: var(--font-label);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.article-tag { border-bottom: 1px solid currentColor; padding-bottom: 2px; }

/* ---------------------------------------------------------------------- */
/* Lead story                                                             */
/* ---------------------------------------------------------------------- */

.site-main { padding-bottom: 60px; }

.lead-story { margin-top: 32px; }
.lead-story-link { display: block; }
.lead-story-image-wrap { margin-bottom: 20px; border: 1px solid var(--rule); }
.lead-story-image { width: 100%; height: auto; }

.lead-story-title {
    font-family: var(--font-head);
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.05;
    text-transform: uppercase;
    margin: 0 0 14px;
    color: var(--ink);
}

.lead-story-excerpt {
    font-style: italic;
    font-size: 1.2rem;
    color: var(--ink-2);
    max-width: 62ch;
    margin: 0 0 14px;
}

.lead-story-meta, .article-byline {
    font-family: var(--font-label);
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.post-card-dot { margin: 0 6px; }

/* ---------------------------------------------------------------------- */
/* Post grid / cards                                                      */
/* ---------------------------------------------------------------------- */

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px 28px;
}

.post-card { border-top: 1px solid var(--rule-2); padding-top: 16px; }
.post-card-image-wrap { margin-bottom: 12px; border: 1px solid var(--rule); }
.post-card-image { width: 100%; height: 200px; object-fit: cover; }

.post-card-title {
    font-family: var(--font-head);
    font-size: 1.3rem;
    line-height: 1.2;
    margin: 0 0 8px;
    color: var(--ink);
}

.post-card-excerpt {
    font-size: 0.95rem;
    color: var(--ink-2);
    margin: 0 0 10px;
}

.post-card-meta {
    font-family: var(--font-label);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--ink-3);
}

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

.article-page { max-width: 720px; padding-top: 40px; }

.article-header { text-align: center; margin-bottom: 28px; }

.article-title {
    font-family: var(--font-head);
    font-size: clamp(2rem, 5vw, 2.8rem);
    line-height: 1.1;
    text-transform: uppercase;
    margin: 10px 0 14px;
}

.article-deck {
    font-style: italic;
    font-size: 1.25rem;
    color: var(--ink-2);
    margin: 0 0 16px;
}

.article-feature-image {
    margin: 0 0 32px;
    border: 1px solid var(--rule);
}
.article-feature-image figcaption {
    font-family: var(--font-label);
    font-size: 0.75rem;
    color: var(--ink-3);
    text-align: center;
    padding: 8px 0;
}

.article-content {
    font-size: 1.15rem;
    line-height: 1.75;
    max-width: 68ch;
    margin: 0 auto;
}
.article-content > *:first-child::first-letter {
    font-family: var(--font-drop);
    font-size: 4.4rem;
    float: left;
    line-height: 0.8;
    padding: 6px 8px 0 0;
    color: var(--spot);
}
.article-content p { margin: 0 0 1.4em; }
.article-content h2 {
    font-family: var(--font-head);
    text-transform: uppercase;
    font-size: 1.5rem;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 6px;
    margin: 2em 0 0.8em;
}
.article-content h3 { font-family: var(--font-head); font-size: 1.2rem; margin: 1.6em 0 0.6em; }
.article-content img { border: 1px solid var(--rule); margin: 1.6em 0; }

/* Video embeds (YouTube etc. from imported Substack posts) carry explicit
   width/height HTML attributes — without this, they'd overflow narrow
   viewports instead of scaling down like the max-width:100% images do. */
.article-content iframe {
    max-width: 100%;
    height: auto;
    margin: 1.6em 0;
}
.article-content .youtube-wrap,
.article-content .youtube-inner {
    max-width: 100%;
}
.article-content figcaption {
    font-family: var(--font-label);
    font-size: 0.78rem;
    color: var(--ink-3);
    text-align: center;
    margin-top: -1.2em;
    margin-bottom: 1.6em;
}
.article-content blockquote {
    border-left: 3px solid var(--spot);
    margin: 1.6em 0;
    padding: 0.2em 0 0.2em 1.4em;
    font-style: italic;
    color: var(--ink-2);
}
.article-content a { border-bottom: 1px solid var(--rule); }
.article-content hr { border: none; border-top: 1px solid var(--rule); margin: 2.4em 0; }

/* Ghost editor card width classes */
.article-content .kg-width-wide {
    width: 100vw;
    max-width: 1040px;
    margin-left: 50%;
    transform: translateX(-50%);
}
.article-content .kg-width-full {
    width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
}
.article-content .kg-width-full img { border: none; }

.article-footer { max-width: 68ch; margin: 40px auto 0; }
.article-tags { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.article-tag-pill {
    font-family: var(--font-label);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid var(--rule);
    padding: 4px 10px;
    color: var(--ink-2);
}

.article-author-card {
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    padding: 18px 0;
}
.article-author-card-name { font-family: var(--font-head); margin: 0 0 4px; }
.article-author-card-bio { margin: 0; color: var(--ink-2); }

.related-posts { border-top: 3px double var(--ink); padding-top: 8px; }

/* ---------------------------------------------------------------------- */
/* Section (tag) pages                                                    */
/* ---------------------------------------------------------------------- */

.section-header { text-align: center; padding: 40px 0 10px; }
.section-eyebrow {
    display: block;
    font-family: var(--font-label);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: 6px;
}
.section-title {
    font-family: var(--font-head);
    font-size: clamp(2rem, 5vw, 3rem);
    text-transform: uppercase;
    margin: 0 0 10px;
}
.section-description { color: var(--ink-2); max-width: 60ch; margin: 0 auto; }
.section-empty { text-align: center; color: var(--ink-3); padding: 40px 0; }

.section-legal .section-title { color: var(--spot); }
.section-tactics .section-title { color: var(--leather); }
.section-betting .section-title { color: var(--green-rule); }

/* ---------------------------------------------------------------------- */
/* Pagination                                                             */
/* ---------------------------------------------------------------------- */

.pagination {
    display: flex;
    justify-content: space-between;
    margin-top: 48px;
    padding-top: 20px;
    border-top: 1px solid var(--rule);
    font-family: var(--font-label);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
}
.pagination a { border-bottom: 1px solid var(--ink); }

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

.site-footer {
    background: var(--ink);
    color: var(--lace);
    margin-top: 40px;
    padding: 48px 0 24px;
}
.footer-masthead {
    font-family: var(--font-mast);
    font-weight: 400;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 6px;
}
.footer-tagline {
    text-align: center;
    color: var(--rule-2);
    margin: 0 0 24px;
}
.footer-subscribe {
    text-align: center;
    max-width: 480px;
    margin: 0 auto 28px;
}
.footer-subscribe p { margin: 0 0 12px; color: var(--rule-2); }
.footer-subscribe-btn {
    display: inline-block;
    font-family: var(--font-label);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--spot);
    color: var(--lace);
    padding: 10px 22px;
    border: 1px solid var(--spot);
}
.footer-manage-btn { background: transparent; }
.footer-nav {
    margin-bottom: 24px;
    font-family: var(--font-label);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--rule-2);
}
.footer-nav ul.nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}
.footer-nav a { color: var(--rule-2); }
.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-family: var(--font-label);
    font-size: 0.7rem;
    color: var(--ink-3);
    text-align: center;
}
.footer-privacy-note { max-width: 46ch; }

/* ---------------------------------------------------------------------- */
/* Error page                                                             */
/* ---------------------------------------------------------------------- */

.error-page { text-align: center; padding: 80px 0; }
.error-code { font-family: var(--font-mast); font-weight: 400; font-size: 5rem; margin: 0; }
.error-message { color: var(--ink-2); margin-bottom: 24px; }

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

@media (max-width: 900px) {
    .post-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .post-grid { grid-template-columns: 1fr; }

    .masthead-band {
        flex-direction: column;
        align-items: center;
        gap: 6px;
        text-align: center;
        padding: 10px clamp(16px, 4vw, 40px);
    }
    .masthead-band-center { order: 1; }
    .masthead-band-right { order: 2; }

    .nav-burger { display: flex; position: static; order: 1; }
    .gh-search-btn { position: static; order: 2; margin-left: auto; }
    .masthead-nav { flex-wrap: wrap; justify-content: space-between; }
    .masthead-nav-links {
        display: none;
        width: 100%;
        order: 3;
        padding-top: 14px;
    }
    .masthead-nav-links.is-open { display: flex; }
    .masthead-nav-links ul.nav { flex-direction: column; gap: 0; width: 100%; }
    .masthead-nav-links a { padding: 10px 0; border-bottom: 1px solid var(--rule-2); width: 100%; }
}
