/* === Styles for Creative Template === */
:root {
    --ink: #1c1c18;
    --paper: #f4f1ea;
    --paper-dark: #dcdad3;
    --red: #b91c1c;
    --muted: #444748;
  }
  * { box-sizing: border-box; }
  body { background: var(--paper); color: var(--ink); font-family: 'Source Serif 4', serif; margin: 0; }

  .font-headline { font-family: 'Domine', serif; }
  .font-label    { font-family: 'Archivo Narrow', sans-serif; }
  .font-body     { font-family: 'Source Serif 4', serif; }

  .section-tag {
    font-family: 'Archivo Narrow', sans-serif;
    font-size: 9px; font-weight: 700; letter-spacing: 0.18em;
    text-transform: uppercase; display: inline-block;
    border-bottom: 1px solid var(--ink); margin-bottom: 10px;
  }
  .section-band {
    background: var(--ink); color: var(--paper);
    font-family: 'Archivo Narrow', sans-serif;
    font-size: 10px; font-weight: 700; letter-spacing: 0.2em;
    text-transform: uppercase; padding: 5px 16px; margin-bottom: 28px;
    display: inline-block;
  }
  .pull-quote {
    border-left: 3px solid var(--ink); padding-left: 16px;
    font-family: 'Domine', serif; font-size: 1.15rem; font-style: italic; line-height: 1.4;
  }
  figcaption {
    font-family: 'Archivo Narrow', sans-serif; font-size: 10px;
    text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted);
    border-top: 1px solid #aaa; margin-top: 4px; padding-top: 3px;
  }
  .wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }

  /* ─── Section divider ──────────────────────────────────────── */
  .sec { padding: 56px 0; border-bottom: 1px solid var(--ink); }
  .sec:last-child { border-bottom: none; }

  /* ─── § O: Diagonal Split ──────────────────────────────────── */
  .diagonal-hero {
    position: relative; min-height: 480px; overflow: hidden;
    display: flex; align-items: stretch;
  }
  .diagonal-hero .img-half {
    width: 55%; position: relative; flex-shrink: 0;
  }
  .diagonal-hero .img-half img {
    width: 100%; height: 100%; object-fit: cover;
    filter: grayscale(1) contrast(1.2);
  }
  .diagonal-hero .img-half::after {
    content: ""; position: absolute; top: 0; right: -60px; bottom: 0;
    width: 120px; background: var(--paper);
    transform: skewX(-6deg); transform-origin: top right;
    z-index: 2;
  }
  .diagonal-hero .text-half {
    flex: 1; padding: 48px 40px 48px 72px; display: flex;
    flex-direction: column; justify-content: center; z-index: 3;
  }
  .diagonal-hero .vol-stamp {
    font-family: 'Domine', serif; font-size: 9rem; font-weight: 700;
    line-height: 1; color: var(--paper-dark); position: absolute;
    bottom: -10px; right: -10px; z-index: 1; user-select: none;
    pointer-events: none;
  }

  /* ─── § P: Oversized Letterform Background ─────────────────── */
  .letter-bg {
    position: relative; overflow: hidden; padding: 64px 0;
  }
  .letter-bg .bg-letter {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    font-family: 'Domine', serif; font-size: 32vw; font-weight: 700;
    color: var(--paper-dark); opacity: 0.4; user-select: none;
    pointer-events: none; line-height: 1; white-space: nowrap;
  }
  .letter-bg .content { position: relative; z-index: 2; }

  /* ─── § Q: Vertical Timeline ───────────────────────────────── */
  .timeline { position: relative; padding-left: 40px; }
  .timeline::before {
    content: ""; position: absolute; left: 8px; top: 0; bottom: 0;
    width: 1px; background: var(--ink);
  }
  .timeline-item { position: relative; margin-bottom: 36px; }
  .timeline-item::before {
    content: ""; position: absolute; left: -36px; top: 6px;
    width: 10px; height: 10px; border: 2px solid var(--ink);
    background: var(--paper);
  }
  .timeline-item .year {
    font-family: 'Archivo Narrow', sans-serif; font-size: 10px;
    font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase;
    color: var(--muted); margin-bottom: 4px;
  }

  /* ─── § R: Staggered Mosaic ────────────────────────────────── */
  .mosaic { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: auto auto; gap: 3px; }
  .mosaic-a { grid-column: 1; grid-row: 1 / 3; }
  .mosaic-b { grid-column: 2; grid-row: 1; }
  .mosaic-c { grid-column: 3; grid-row: 1; }
  .mosaic-d { grid-column: 2 / 4; grid-row: 2; }
  .mosaic-item { position: relative; overflow: hidden; }
  .mosaic-item img { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(1) contrast(1.15); }
  .mosaic-item .caption-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    color: #fff; padding: 24px 16px 12px;
  }
  .mosaic-item .caption-overlay h4 {
    font-family: 'Domine', serif; font-size: 1rem; font-weight: 700;
    line-height: 1.2; margin: 0;
  }
  .mosaic-item .caption-overlay span {
    font-family: 'Archivo Narrow', sans-serif; font-size: 9px;
    text-transform: uppercase; letter-spacing: 0.12em; opacity: 0.7;
  }
  .mosaic-a { min-height: 440px; }
  .mosaic-b, .mosaic-c { min-height: 210px; }
  .mosaic-d { min-height: 210px; }

  /* ─── § S: Data Table with Inline Bar Charts ────────────────── */
  .data-table { width: 100%; border-collapse: collapse; font-family: 'Archivo Narrow', sans-serif; }
  .data-table th {
    font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em;
    border-bottom: 2px solid var(--ink); border-top: 2px solid var(--ink);
    padding: 8px 12px; text-align: left;
  }
  .data-table td { padding: 10px 12px; border-bottom: 1px dotted #aaa; font-size: 13px; vertical-align: middle; }
  .data-table tr:hover td { background: var(--paper-dark); }
  .bar-wrap { width: 120px; background: var(--paper-dark); height: 8px; position: relative; }
  .bar-fill { height: 8px; background: var(--ink); }
  .bar-fill.neg { background: var(--red); }
  .pct-pos { color: #166534; font-weight: 700; }
  .pct-neg { color: var(--red); font-weight: 700; }
  .pct-flat { color: var(--muted); font-weight: 700; }

  /* ─── § T: Full-Bleed Rotated Type ─────────────────────────── */
  .rotated-section {
    position: relative; overflow: hidden;
    background: var(--ink); color: var(--paper);
    padding: 64px 32px;
  }
  .rotated-section .rot-label {
    position: absolute; left: -60px; top: 50%; transform: translateY(-50%) rotate(-90deg);
    font-family: 'Archivo Narrow', sans-serif; font-size: 10px; font-weight: 700;
    letter-spacing: 0.3em; text-transform: uppercase; white-space: nowrap;
    color: rgba(255,255,255,0.3);
  }

  /* ─── § U: Accordion FAQ ────────────────────────────────────── */
  .faq-item { border-bottom: 1px solid var(--ink); }
  .faq-q {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 16px 0; cursor: pointer; list-style: none;
    font-family: 'Domine', serif; font-size: 1.05rem; font-weight: 700;
  }
  .faq-q::-webkit-details-marker { display: none; }
  .faq-q .icon { font-family: 'Archivo Narrow', sans-serif; font-size: 1.2rem; line-height: 1; }
  details[open] .faq-q .icon::after { content: "−"; }
  .faq-q .icon::after { content: "+"; }
  .faq-a { font-family: 'Source Serif 4', serif; font-size: 0.875rem; line-height: 1.7; padding-bottom: 16px; color: var(--muted); }

  /* ─── § V: Striped Comparison Table ────────────────────────── */
  .compare-table { width: 100%; border-collapse: collapse; }
  .compare-table th {
    font-family: 'Archivo Narrow', sans-serif; font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.15em;
    border-top: 3px solid var(--ink); border-bottom: 2px solid var(--ink);
    padding: 10px 16px; text-align: center;
  }
  .compare-table th:first-child { text-align: left; }
  .compare-table td { padding: 12px 16px; font-family: 'Source Serif 4', serif; font-size: 0.85rem; text-align: center; border-bottom: 1px solid var(--paper-dark); }
  .compare-table td:first-child { text-align: left; font-family: 'Archivo Narrow', sans-serif; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; }
  .compare-table tr:nth-child(even) td { background: var(--paper-dark); }
  .check { color: #166534; font-weight: 700; font-size: 1rem; }
  .cross { color: var(--red); font-weight: 700; font-size: 1rem; }
  .half  { color: var(--muted); font-weight: 700; font-size: 1rem; }
  .compare-table .highlight-col { background: var(--ink) !important; color: var(--paper); }

  /* ─── § W: Interview / Q&A Format ───────────────────────────── */
  .qa-block { border-top: 1px solid var(--ink); padding: 20px 0; }
  .qa-block .q-label {
    font-family: 'Archivo Narrow', sans-serif; font-size: 10px; font-weight: 700;
    letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 6px;
    color: var(--muted);
  }
  .qa-block .q-text {
    font-family: 'Domine', serif; font-size: 1.05rem; font-weight: 700;
    line-height: 1.35; margin-bottom: 12px;
  }
  .qa-block .a-text {
    font-family: 'Source Serif 4', serif; font-size: 0.875rem; line-height: 1.75;
    color: var(--muted);
  }

  /* ─── § X: Horizontal Scroll Cards ─────────────────────────── */
  .hscroll-wrap { overflow-x: auto; padding-bottom: 12px; }
  .hscroll-inner { display: flex; gap: 1px; width: max-content; }
  .hscroll-card {
    width: 260px; flex-shrink: 0;
    border: 1px solid var(--ink); padding: 20px;
    background: var(--paper);
  }
  .hscroll-card img { width: 100%; height: 140px; object-fit: cover; filter: grayscale(1); margin-bottom: 12px; border: 1px solid var(--ink); }

  /* ─── § Y: Large Number Infographic Row ─────────────────────── */
  .stat-row { display: flex; }
  .stat-cell {
    flex: 1; padding: 32px 24px; border-right: 1px solid var(--ink);
    text-align: center;
  }
  .stat-cell:last-child { border-right: none; }
  .stat-cell .num {
    font-family: 'Domine', serif; font-size: 3.5rem; font-weight: 700;
    line-height: 1; display: block;
  }
  .stat-cell .unit {
    font-family: 'Domine', serif; font-size: 1.5rem; font-weight: 700;
  }
  .stat-cell .label {
    font-family: 'Archivo Narrow', sans-serif; font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.15em; color: var(--muted);
    margin-top: 8px; display: block;
  }
  .stat-cell .change {
    font-family: 'Archivo Narrow', sans-serif; font-size: 11px; font-weight: 700;
    margin-top: 4px; display: block;
  }

  /* ─── § Z: Newspaper Classified / Grid ──────────────────────── */
  .classifieds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--ink); }
  .classified-item {
    padding: 16px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
    font-family: 'Source Serif 4', serif;
  }
  .classified-item:nth-child(3n) { border-right: none; }
  .classified-item .cl-title {
    font-family: 'Domine', serif; font-size: 0.9rem; font-weight: 700; margin-bottom: 4px;
  }
  .classified-item .cl-price {
    font-family: 'Archivo Narrow', sans-serif; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em; border-bottom: 1px solid var(--ink);
    padding-bottom: 6px; margin-bottom: 6px;
  }
  .classified-item .cl-meta {
    font-family: 'Archivo Narrow', sans-serif; font-size: 9px; color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.1em; line-height: 1.6;
  }

  /* ─── § AA: Magazine Cover–Style Feature Card ───────────────── */
  .cover-card {
    position: relative; min-height: 520px; overflow: hidden;
    border: 1px solid var(--ink);
  }
  .cover-card img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; filter: grayscale(1) contrast(1.1);
  }
  .cover-card .cover-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.7) 60%, rgba(0,0,0,0.95) 100%);
  }
  .cover-card .cover-content {
    position: absolute; bottom: 0; left: 0; right: 0; padding: 40px 36px;
    color: var(--paper);
  }
  .cover-card .issue-line {
    font-family: 'Archivo Narrow', sans-serif; font-size: 9px; font-weight: 700;
    letter-spacing: 0.25em; text-transform: uppercase; opacity: 0.6; margin-bottom: 12px;
  }
  .cover-card .cover-kicker {
    font-family: 'Archivo Narrow', sans-serif; font-size: 10px; font-weight: 700;
    letter-spacing: 0.2em; text-transform: uppercase;
    border-bottom: 1px solid rgba(255,255,255,0.4); display: inline-block;
    margin-bottom: 12px; padding-bottom: 4px;
  }
  .cover-card .cover-hed {
    font-family: 'Domine', serif; font-size: 2.6rem; font-weight: 700;
    line-height: 1.05; margin-bottom: 16px;
  }
  .cover-card .cover-toc {
    font-family: 'Archivo Narrow', sans-serif; font-size: 10px;
    text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.6;
  }
  .cover-card .cover-toc span { margin-right: 16px; }

  /* ─── § AB: Reading Progress Card ──────────────────────────── */
  .read-card { display: flex; gap: 0; border: 1px solid var(--ink); overflow: hidden; }
  .read-card .rc-num {
    background: var(--ink); color: var(--paper);
    font-family: 'Domine', serif; font-size: 3rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    width: 80px; flex-shrink: 0; writing-mode: vertical-rl; text-orientation: mixed;
    letter-spacing: -0.05em;
  }
  .read-card .rc-body { padding: 20px 24px; flex: 1; }

  /* ─── § AC: Vertical Marquee Sidebar ────────────────────────── */
  .marquee-section { display: grid; grid-template-columns: 48px 1fr; gap: 0; border-top: 1px solid var(--ink); }
  .marquee-col {
    background: var(--ink); overflow: hidden; position: relative;
    writing-mode: vertical-rl; text-orientation: mixed;
    font-family: 'Archivo Narrow', sans-serif; font-size: 9px;
    font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--paper); display: flex; align-items: center; padding: 12px 0;
  }
  .marquee-col .marquee-inner {
    display: inline-block; animation: marquee-v 18s linear infinite;
  }
  .marquee-col .marquee-inner span { padding: 0 24px; }
  @keyframes marquee-v {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
  }
  .marquee-content { padding: 32px; }

  /* ─── § AD: Footnoted Article ───────────────────────────────── */
  .footnote-ref {
    font-family: 'Archivo Narrow', sans-serif; font-size: 9px; font-weight: 700;
    vertical-align: super; line-height: 0; margin-left: 1px; border-bottom: 1px solid var(--muted);
    cursor: default;
  }
  .footnotes { border-top: 1px solid var(--ink); margin-top: 32px; padding-top: 16px; }
  .footnotes ol { margin: 0; padding-left: 20px; }
  .footnotes li {
    font-family: 'Archivo Narrow', sans-serif; font-size: 10px; color: var(--muted);
    text-transform: uppercase; letter-spacing: 0.06em; line-height: 1.7;
  }

  /* ─── § AE: Split Inverted Hero ─────────────────────────────── */
  .split-inv { display: grid; grid-template-columns: 1fr 1fr; min-height: 400px; }
  .split-inv .dark-side {
    background: var(--ink); color: var(--paper);
    padding: 56px 48px; display: flex; flex-direction: column; justify-content: space-between;
  }
  .split-inv .light-side { padding: 56px 48px; border: 1px solid var(--ink); border-left: none; }

  /* Scrollbar for hscroll */
  .hscroll-wrap::-webkit-scrollbar { height: 4px; }
  .hscroll-wrap::-webkit-scrollbar-track { background: var(--paper-dark); }
  .hscroll-wrap::-webkit-scrollbar-thumb { background: var(--ink); }

  @media (max-width: 768px) {
    .diagonal-hero { flex-direction: column; }
    .diagonal-hero .img-half { width: 100%; min-height: 240px; }
    .diagonal-hero .img-half::after { display: none; }
    .diagonal-hero .text-half { padding: 32px 24px; }
    .mosaic { grid-template-columns: 1fr 1fr; }
    .mosaic-a { grid-column: 1 / 3; grid-row: 1; min-height: 220px; }
    .mosaic-d { grid-column: 1 / 3; }
    .stat-row { flex-direction: column; }
    .stat-cell { border-right: none; border-bottom: 1px solid var(--ink); }
    .classifieds { grid-template-columns: 1fr; }
    .classified-item { border-right: none; }
    .split-inv { grid-template-columns: 1fr; }
    .split-inv .light-side { border-left: 1px solid var(--ink); }
    .compare-table { font-size: 0.75rem; }
    .wrap { padding: 0 16px; }
  }

/* === Styles for Magazine Template === */
body { background-color: #f4f1ea; color: #1c1c18; font-family: 'Source Serif 4', serif; }
  .masthead { font-family: 'Domine', serif; letter-spacing: -0.05em; border-bottom: 4px double #000; }
  .rule-top { border-top: 1px solid #000; }
  .rule-bottom { border-bottom: 1px solid #000; }
  .rule-left { border-left: 1px solid #000; }
  .rule-right { border-right: 1px solid #000; }
  .column-divider { position: relative; }
  .column-divider::after {
    content: ""; position: absolute; right: -12px; top: 0; bottom: 0;
    width: 1px; background-color: #000;
  }
  @media (max-width: 768px) { .column-divider::after { display: none; } }

  /* Section label badges */
  .section-label {
    display: inline-block;
    font-family: 'Archivo Narrow', sans-serif;
    font-size: 10px; font-weight: 700; letter-spacing: 0.15em;
    text-transform: uppercase; border-bottom: 1px solid #000;
    margin-bottom: 12px;
  }
  /* Pull quote style */
  .pull-quote {
    border-left: 4px solid #000; padding-left: 16px;
    font-family: 'Domine', serif; font-size: 1.25rem;
    font-style: italic; line-height: 1.4;
  }
  /* Drop cap */
  .drop-cap::first-letter {
    float: left; font-family: 'Domine', serif;
    font-size: 4.5rem; font-weight: 700; line-height: 0.75;
    margin-right: 8px; margin-top: 4px;
  }
  /* Dateline */
  .dateline { font-family:'Archivo Narrow',sans-serif; font-size:10px; text-transform:uppercase; letter-spacing:0.1em; color:#444748; margin-bottom:4px; }
  /* Byline */
  .byline { font-family:'Archivo Narrow',sans-serif; font-size:11px; text-transform:uppercase; letter-spacing:0.08em; border-top:1px solid #000; padding-top:6px; margin-top:6px; }
  /* Section header band */
  .section-band { background:#1c1c18; color:#f4f1ea; padding:6px 0; margin-bottom:24px; }
  .section-band span { font-family:'Archivo Narrow',sans-serif; font-size:11px; font-weight:700; letter-spacing:0.2em; text-transform:uppercase; }
  /* Infographic number */
  .stat-number { font-family:'Domine',serif; font-size:3rem; font-weight:700; line-height:1; }
  /* Rule styles */
  hr.thick { border:none; border-top:3px solid #000; }
  hr.double { border:none; border-top:4px double #000; }
  hr.thin { border:none; border-top:1px solid #000; }
  hr.dotted { border:none; border-top:1px dotted #000; }
  /* Highlight box */
  .highlight-box { background:#1c1c18; color:#f4f1ea; padding:24px; }
  .highlight-box h3 { font-family:'Domine',serif; }
  /* Ticker tape */
  .ticker-wrap { overflow:hidden; white-space:nowrap; border-top:1px solid #000; border-bottom:1px solid #000; padding:6px 0; background:#1c1c18; color:#f4f1ea; }
  .ticker-inner { display:inline-block; animation: ticker 30s linear infinite; }
  @keyframes ticker { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }
  /* Captions */
  figcaption { font-family:'Archivo Narrow',sans-serif; font-size:10px; text-transform:uppercase; letter-spacing:0.07em; color:#444748; border-top:1px solid #999; margin-top:4px; padding-top:3px; }
  /* Index / numbered list */
  .index-list { counter-reset: idx; list-style:none; padding:0; }
  .index-list li { counter-increment: idx; display:flex; align-items:baseline; gap:12px; border-bottom:1px dotted #000; padding:8px 0; font-family:'Source Serif 4',serif; font-size:0.875rem; }
  .index-list li::before { content: counter(idx,decimal-leading-zero); font-family:'Archivo Narrow',sans-serif; font-size:10px; font-weight:700; color:#444748; flex-shrink:0; }
  /* Tag chips */
  .tag { display:inline-block; border:1px solid #000; font-family:'Archivo Narrow',sans-serif; font-size:9px; text-transform:uppercase; letter-spacing:0.1em; padding:2px 7px; margin:2px; }

