/* ============================================================
   TERRA IGNOTA — shared print system (index + guides)
   Riso inks on uncoated stock: teal, red, yellow + black.
   Overprints come from mix-blend-mode: multiply.
   ============================================================ */
:root {
    --paper: #F2EEE5;
    --table: #D9D3C6;
    --ink: #1C1B19;
    --ink-2: #4A4740;
    --teal: #00838A;
    --red: #F04E37;
    --yellow: #FFD23F;
    --rule: 1.5px solid var(--ink);
    --stencil: 'Big Shoulders Stencil Display', 'Big Shoulders Display', Impact, sans-serif;
    --serif: 'Source Serif 4', Georgia, serif;
    --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
    background: var(--table);
    color: var(--ink);
    font: 400 17px/1.55 var(--serif);
    padding: 0 12px 48px;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; }
.mul { mix-blend-mode: multiply; }

/* Paper grain over everything */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 50;
    mix-blend-mode: multiply;
    opacity: .5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .4 0 0 0 0 .32 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.sheet {
    max-width: 1320px;
    margin: 0 auto;
    background: var(--paper);
    padding: 0 32px 28px;
    box-shadow: 0 1px 0 #fff8 inset, 0 18px 40px -18px #0006;
    position: relative;
}

/* ── Thumb-index tabs cut into the top edge ── */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; padding-top: 0; margin-bottom: 18px; }
.tabs a {
    font: 500 11px var(--mono);
    letter-spacing: .12em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 9px 14px 7px;
    border: var(--rule);
    border-top: 0;
}
.tabs a.on { background: var(--teal); color: var(--paper); }
.tabs a:not(.on):hover { background: var(--yellow); mix-blend-mode: multiply; }
.tabs .push { margin-left: auto; border-style: dashed; }

/* ── Stencil title with a misregistered second plate ── */
.stencil {
    font-family: var(--stencil);
    font-weight: 900;
    text-transform: uppercase;
    line-height: .82;
    letter-spacing: .005em;
    position: relative;
    display: inline-block;
}
.stencil .k { color: var(--red); mix-blend-mode: multiply; display: block; }
.stencil .reg {
    position: absolute;
    inset: 0;
    color: var(--teal);
    mix-blend-mode: multiply;
    transform: translate(5px, -4px);
    pointer-events: none;
}

/* ── Panels in a ruled grid ── */
.panel { border: var(--rule); padding: 12px; position: relative; background: transparent; }
.panel-h {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 0 0 10px;
    font: 500 11px var(--mono);
    letter-spacing: .14em;
    text-transform: uppercase;
}
.panel-h b {
    font: 900 24px/1 var(--stencil);
    letter-spacing: 0;
    color: var(--red);
    mix-blend-mode: multiply;
}
.panel-h i {
    margin-left: auto;
    font: italic 14px var(--serif);
    letter-spacing: 0;
    text-transform: none;
    text-align: right;
    color: var(--ink-2);
}

/* ── Number badges (the key between map and text) ── */
.num {
    display: inline-grid;
    place-items: center;
    min-width: 26px;
    height: 26px;
    padding: 0 4px;
    border-radius: 13px;
    background: var(--red);
    color: var(--paper);
    font: 700 13px/1 var(--mono);
    mix-blend-mode: multiply;
}
.num.teal { background: var(--teal); }
.num.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); mix-blend-mode: normal; }

/* ── Photo with an offset ink plate behind it ── */
.print { position: relative; display: block; }
.print::before {
    content: "";
    position: absolute;
    inset: 0;
    transform: translate(7px, 7px);
    background: var(--plate, var(--teal));
    mix-blend-mode: multiply;
}
.print img { position: relative; display: block; width: 100%; height: 100%; object-fit: cover; }

/* ── Ad slot (keeps AdSense out of the design) ── */
.ad-slot-wrap { margin: 22px 0; padding: 10px 0; border-top: 1px dashed var(--ink-2); border-bottom: 1px dashed var(--ink-2); min-height: 40px; }
.ad-slot-wrap::before { content: "Advertisement"; display: block; font: 500 10px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 6px; }

/* ── Colophon ── */
.colophon {
    margin-top: 24px;
    padding-top: 12px;
    border-top: 4px solid var(--ink);
    display: flex;
    flex-wrap: wrap;
    gap: 6px 28px;
    font: 500 11px/1.6 var(--mono);
    letter-spacing: .08em;
    text-transform: uppercase;
}
.colophon a { text-decoration: none; border-bottom: 1px solid currentColor; }
.colophon .push { margin-left: auto; }

@media (max-width: 760px) {
    body { padding: 0 0 32px; font-size: 16px; }
    .sheet { padding: 0 16px 22px; box-shadow: none; }
    .tabs a { padding: 8px 10px 6px; font-size: 10px; letter-spacing: .08em; }
    .tabs .push { margin-left: 0; }
    .stencil .reg { transform: translate(3px, -2px); }
}

/* two plates: red behind, teal peeking out top-left */
.print.duo::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translate(-5px, -5px);
    background: var(--teal);
    mix-blend-mode: multiply;
    z-index: -1;
}
.print.duo { z-index: 0; isolation: auto; }

/* full-width responsive ads must not push the page sideways on phones */
.ad-slot-wrap ins.adsbygoogle { max-width: 100% !important; }
