/*
Theme Name: dds_geotextileerosioncontrol.com
Theme URI: https://geotextileerosioncontrol.com/
Author: Arjun Mehta
Description: A field-survey journal theme for a practical guide to reading, buying and preparing land: kraft paper, graph-paper sheets, stamped labels and engineering cross-sections.
Version: 1.1
Requires at least: 6.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gtxland
*/

/* ---------- Fonts ---------- */
@font-face { font-family: "Oswald"; src: url("fonts/oswald-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Oswald"; src: url("fonts/oswald-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/barlow-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("fonts/caveat-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
    --kraft: #C9B18A;
    --kraft-deep: #B89E74;
    --grid-olive: #7C8B6F;
    --olive: #2F3B2A;
    --olive-soft: #3A4734;
    --paper: #E4DCC4;
    --paper-light: #F1EBDB;
    --strip: #F7F4EC;
    --grid-blue: #9BB3C4;
    --graphite: #22262B;
    --earth: #3A3527;
    --ink: #22262B;
    --muted: #6B6553;
    --ochre: #E0A32E;
    --ochre-dark: #B98420;
    --blue: #2F5D7C;
    --line: #7C8B6F;
    --light-text: #E9E2CF;
    --f-head: "Oswald", "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
    --f-body: "Barlow", "Segoe UI", Roboto, Arial, sans-serif;
    --f-mono: "IBM Plex Mono", "Courier New", monospace;
    --f-hand: "Caveat", "Segoe Print", "Comic Sans MS", cursive;
}

/* Elements controlled through [hidden] */
.cookie-banner[hidden] { display: none !important; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--f-body);
    font-size: 1.0625rem;
    line-height: 1.65;
    letter-spacing: .015em;
    color: var(--ink);
    background-color: var(--kraft);
    background-image:
        linear-gradient(rgba(124, 139, 111, .16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 139, 111, .16) 1px, transparent 1px),
        url("images/kraft.png");
    background-size: 24px 24px, 24px 24px, 256px 256px;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--ochre); outline-offset: 2px; }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5, h6 {
    font-family: var(--f-head);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: .01em;
    margin: 0 0 .6em;
    color: var(--ink);
}
h1, h2, h3, h4, h5, h6, p, li, td, th, figcaption, .card-title, .brand-name { overflow-wrap: break-word; hyphens: auto; }
table { border-collapse: collapse; width: 100%; }
table, th, td { border: 1px solid var(--line); }
th, td { padding: .55em .8em; text-align: start; vertical-align: top; }
th { font-family: var(--f-head); font-weight: 500; letter-spacing: .04em; text-transform: uppercase; font-size: .9rem; background: rgba(124, 139, 111, .14); }
blockquote {
    margin: 1.6em 0;
    padding: 1.1rem 1.4rem;
    background: var(--paper);
    border-inline-start: 6px solid var(--ochre);
    font-size: 1.1rem;
}
blockquote p:last-child { margin-bottom: 0; }
code, pre, kbd { font-family: var(--f-mono); font-size: .92em; }
pre { overflow: auto; padding: 1rem 1.2rem; background: var(--graphite); color: var(--paper); }
hr { border: 0; border-top: 1px dashed var(--line); margin: 2rem 0; }
.screen-reader-text {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; inset-inline-start: 1rem; top: -60px; z-index: 100;
    padding: .6rem 1rem; background: var(--ochre); color: var(--ink); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* Single width container */
.shell { width: min(85%, 1240px); margin-inline: auto; }

/* ---------- Buttons ---------- */
.stamp-btn {
    display: inline-block;
    padding: .62rem 1.25rem .58rem;
    font-family: var(--f-head);
    font-weight: 500;
    font-size: .95rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    text-decoration: none;
    line-height: 1.2;
    color: var(--ink);
    background: var(--ochre);
    border: 2px solid var(--ink);
    border-radius: 0;
    box-shadow: 3px 3px 0 var(--ink);
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.stamp-btn:hover { color: var(--ink); background: #EBB548; transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); text-decoration: none; }
.stamp-btn:active { transform: translate(3px, 3px); box-shadow: none; }
.stamp-btn-line {
    background: transparent;
    color: var(--ochre-dark);
    border-color: var(--ochre-dark);
    box-shadow: none;
    padding: .38rem .8rem .34rem;
    font-size: .85rem;
}
.stamp-btn-line:hover { background: var(--ochre); color: var(--ink); border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink); transform: translate(-1px, -1px); }

.ink-link { font-family: var(--f-head); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); }

/* ---------- Header ---------- */
.masthead {
    position: relative;
    background-color: var(--olive);
    background-image:
        repeating-linear-gradient(135deg, rgba(255, 255, 255, .025) 0 2px, transparent 2px 7px);
    color: var(--light-text);
    border-bottom: 4px solid #1F271C;
}
.masthead-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem 2rem;
    padding: 1.4rem 0;
}
.brand { display: flex; align-items: center; gap: 1rem; min-width: 0; flex: 1 1 520px; }
.brand-mark { flex: 0 0 auto; display: block; line-height: 0; }
.brand-stamp { display: block; transform: rotate(-2deg); }
.brand-logo { display: block; max-height: 76px; width: auto; }
.brand-text { min-width: 0; }
.brand-name {
    display: block;
    max-width: 46ch;
    font-family: var(--f-head);
    font-weight: 500;
    font-size: clamp(.95rem, 1.25vw, 1.12rem);
    line-height: 1.3;
    letter-spacing: .03em;
    color: var(--ochre);
    text-decoration: none;
}
.brand-name { hyphens: manual; }
.brand-name:hover { color: #F0C060; text-decoration: none; }
.brand-tagline {
    margin: .35rem 0 0;
    max-width: 60ch;
    font-size: .88rem;
    line-height: 1.45;
    letter-spacing: .03em;
    color: #CFC5A8;
}

.topnav-toggle {
    display: none;
    align-items: center;
    gap: .55rem;
    padding: .5rem .8rem;
    font-family: var(--f-head);
    font-size: .95rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--light-text);
    background: transparent;
    border: 2px solid var(--light-text);
    border-radius: 0;
    cursor: pointer;
}
.topnav-toggle-bars, .topnav-toggle-bars::before, .topnav-toggle-bars::after {
    display: block; width: 18px; height: 2px; background: currentColor; position: relative; content: "";
}
.topnav-toggle-bars::before { position: absolute; top: -6px; left: 0; }
.topnav-toggle-bars::after { position: absolute; top: 6px; left: 0; }

.topnav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; }
.topnav-list li { display: flex; align-items: center; }
.topnav-list li + li::before { content: "•"; color: var(--ochre); margin: 0 .7rem; font-size: .8rem; }
.topnav-list a {
    font-family: var(--f-head);
    font-weight: 500;
    font-size: 1.08rem;
    letter-spacing: .03em;
    color: var(--light-text);
    text-decoration: none;
    padding: .2rem 0;
    border-bottom: 2px solid transparent;
}
.topnav-list a:hover, .topnav-list .current-menu-item > a { color: #fff; border-bottom-color: var(--ochre); }

/* ---------- Shared section bits ---------- */
.fs { position: relative; padding: 4rem 0; }
.grid-paper {
    background-color: var(--paper);
    background-image:
        linear-gradient(rgba(155, 179, 196, .55) 1px, transparent 1px),
        linear-gradient(90deg, rgba(155, 179, 196, .55) 1px, transparent 1px),
        linear-gradient(rgba(155, 179, 196, .22) 1px, transparent 1px),
        linear-gradient(90deg, rgba(155, 179, 196, .22) 1px, transparent 1px);
    background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
}
.grid-paper::before {
    content: "";
    position: absolute;
    top: 0; bottom: 0; left: 0;
    width: 46px;
    background: linear-gradient(90deg, rgba(58, 53, 39, .38), rgba(58, 53, 39, .12) 45%, transparent);
    border-right: 1px solid rgba(58, 53, 39, .18);
    pointer-events: none;
}
.sec-title {
    font-size: clamp(2rem, 4.4vw, 3.4rem);
    text-transform: uppercase;
    letter-spacing: .01em;
    margin-bottom: 2rem;
}
.sec-title-center { text-align: center; }
.sec-title-light { color: var(--paper); }
.kicker {
    font-family: var(--f-mono);
    font-size: .8rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: .8rem;
}
.fig-note {
    margin-top: .9rem;
    font-family: var(--f-mono);
    font-size: .78rem;
    line-height: 1.55;
    letter-spacing: .02em;
    color: var(--muted);
}
.empty-note { font-style: italic; color: var(--muted); }

/* ---------- Block 1: Read the land ---------- */
.fs-read { padding-top: 3.2rem; border-bottom: 1px solid rgba(58, 53, 39, .25); }
.slip-title {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 1.8rem;
    padding: .7rem 1.6rem .6rem;
    font-size: clamp(1.9rem, 4.6vw, 3.6rem);
    text-transform: uppercase;
    color: var(--ink);
    background: #EADFC5;
    border: 1px solid rgba(58, 53, 39, .25);
    box-shadow: 0 6px 12px -6px rgba(34, 38, 43, .45);
    transform: rotate(-1.6deg);
    text-align: center;
}
.read-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
}
.read-figure { margin: 0; min-width: 0; }
.read-plot {
    position: relative;
    padding: 14px;
    background-image:
        linear-gradient(rgba(124, 139, 111, .55) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 139, 111, .55) 1px, transparent 1px);
    background-size: 7.2% 18%;
    background-position: -1px -1px;
}
.read-plot img { display: block; width: 100%; height: auto; }
.plot-tag {
    position: absolute;
    transform: translate(-50%, -50%) rotate(-4deg);
    padding: .22rem .65rem .18rem;
    font-family: var(--f-head);
    font-weight: 500;
    font-size: clamp(.72rem, 1.5vw, 1.15rem);
    letter-spacing: .04em;
    line-height: 1.2;
    white-space: nowrap;
    color: var(--ink);
    background: #D8C39C;
    border: 2px solid #4A4030;
    border-radius: 4px;
    box-shadow: inset 0 0 0 2px #D8C39C, inset 0 0 0 3px rgba(74, 64, 48, .55), 2px 3px 0 rgba(34, 38, 43, .2);
}
.plot-tag-1 { left: 51%; top: 16%; }
.plot-tag-2 { left: 61%; top: 31%; transform: translate(-50%, -50%) rotate(-3deg); }
.plot-tag-3 { left: 72.7%; top: 46%; transform: translate(-50%, -50%) rotate(-5deg); }
.plot-tag-4 { left: 89%; top: 56.5%; transform: translate(-50%, -50%) rotate(-3deg); }

.read-list { min-width: 0; padding-top: .5rem; }
.tick-list { list-style: none; margin: 0 0 1.4rem; padding: 0; }
.tick-list li {
    position: relative;
    padding: .45rem 0 .45rem 2.3rem;
    font-family: var(--f-head);
    font-weight: 500;
    font-size: clamp(1.05rem, 1.6vw, 1.32rem);
    line-height: 1.3;
    letter-spacing: .01em;
    border-bottom: 1px solid rgba(124, 139, 111, .55);
}
.tick-list li::before {
    content: "";
    position: absolute;
    left: 0; top: .55rem;
    width: 1.25rem; height: 1.25rem;
    border: 2px solid var(--ink);
    background: rgba(255, 255, 255, .15);
}
.tick-list li::after {
    content: "";
    position: absolute;
    left: .38rem; top: .6rem;
    width: .45rem; height: .85rem;
    border: solid var(--ink);
    border-width: 0 3px 3px 0;
    transform: rotate(40deg);
}
.fs-read .fig-note { color: #4E4A3C; }
.read-intro { font-size: 1rem; color: #3D3A30; }

/* ---------- Block 2: Field log ---------- */
.fs-log { padding: 4.2rem 0 3.4rem; border-top: 6px solid rgba(58, 53, 39, .15); }
.log-grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: start;
}
.log-photos {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    padding-bottom: 3.5rem;
}
.snap {
    position: relative;
    margin: 0;
    padding: 14px 14px 12px;
    background: var(--strip);
    border: 1px solid rgba(58, 53, 39, .12);
    box-shadow: 0 10px 18px -10px rgba(34, 38, 43, .55), 0 1px 2px rgba(34, 38, 43, .2);
    min-width: 0;
}
.snap::before {
    content: "";
    position: absolute;
    top: 7px; left: 50%;
    width: 64px; height: 4px;
    margin-left: -32px;
    background: linear-gradient(#8E949A, #5B6066);
    border-radius: 2px;
}
.snap img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; margin-top: 6px; }
.snap figcaption { padding: .6rem .25rem 0; }
.snap-no { display: block; font-family: var(--f-hand); font-weight: 600; font-size: 1.55rem; line-height: 1.1; color: var(--ink); }
.snap-cap { display: block; margin-top: .3rem; font-size: .86rem; line-height: 1.45; color: var(--muted); letter-spacing: .02em; }
.snap-1 { transform: rotate(-3.5deg); z-index: 1; margin-top: .5rem; }
.snap-2 { transform: rotate(1.8deg) translateY(3.2rem); z-index: 3; margin-left: -6%; margin-right: -2%; }
.snap-3 { transform: rotate(2.6deg); z-index: 2; margin-left: 2%; }
.snap:hover { z-index: 5; box-shadow: 0 16px 26px -10px rgba(34, 38, 43, .6); }

.log-side {
    display: flex;
    gap: 1.2rem;
    min-width: 0;
    align-items: flex-start;
}
.log-title {
    writing-mode: vertical-rl;
    margin: 0;
    padding-inline-start: .9rem;
    font-size: clamp(1.7rem, 2.6vw, 2.4rem);
    text-transform: uppercase;
    border-inline-start: 3px solid var(--ink);
    hyphens: manual;
    white-space: nowrap;
}
.log-text { min-width: 0; font-size: .92rem; line-height: 1.6; letter-spacing: .03em; color: #3D3A30; }
.log-text p:first-child::first-letter { font-family: var(--f-head); font-size: 2.3em; float: left; line-height: .9; margin: .05em .12em 0 0; color: var(--blue); }

/* ---------- Latest posts ---------- */
.fs-latest { padding: 2.6rem 0 4.4rem; }
.card-grid { display: grid; gap: 2.2rem 2rem; }
.card-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-grid-3:has(> .card:nth-child(4)) { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.2rem 1.6rem; }
.card-grid-3:has(> .card:nth-child(4)) .card-title { font-size: 1.15rem; }
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 14px 14px 0;
    background: var(--strip);
    border: 1px solid rgba(58, 53, 39, .14);
    box-shadow: 0 10px 16px -10px rgba(34, 38, 43, .5);
    overflow: visible;
    transition: transform .18s ease, box-shadow .18s ease;
}
.card-grid .card:nth-child(3n+1) { transform: rotate(-.7deg); }
.card-grid .card:nth-child(3n+2) { transform: rotate(.5deg); }
.card-grid .card:nth-child(3n) { transform: rotate(-.3deg); }
.card-grid .card:hover { transform: rotate(0) translateY(-4px); box-shadow: 0 16px 22px -12px rgba(34, 38, 43, .55); }
/* paper clip */
.card::before, .card::after {
    content: "";
    position: absolute;
    z-index: 2;
    border: 2px solid #8C9298;
    border-radius: 7px;
    pointer-events: none;
}
.card::before { top: -16px; left: 22px; width: 13px; height: 46px; }
.card::after { top: -9px; left: 26px; width: 7px; height: 32px; border-color: #A3A8AD; }
.card-thumb { overflow: hidden; background: #D5CCB3; }
.card-thumb a { display: block; }
.card-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .35s ease; }
.card:hover .card-thumb img { transform: scale(1.03); }
.card-body { flex: 1; display: flex; flex-direction: column; min-width: 0; padding: 1rem .4rem 1.1rem; }
.card-pin {
    align-self: flex-start;
    margin-bottom: .5rem;
    padding: .1rem .5rem;
    font-family: var(--f-mono);
    font-size: .72rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    background: var(--ochre);
    border: 1px solid var(--ink);
}
.card-title { font-size: 1.28rem; line-height: 1.22; margin: 0 0 .55rem; text-transform: none; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--blue); text-decoration: underline; text-decoration-color: var(--blue); }
.card-excerpt { font-size: .95rem; line-height: 1.55; color: #46423A; margin-bottom: .9rem; }
.card-excerpt p { margin: 0 0 .5em; background: none; }
.card-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; }
.card-date { font-family: var(--f-mono); font-size: .8rem; color: var(--muted); letter-spacing: .03em; }
.more-row { margin: 2.4rem 0 0; text-align: center; }

/* ---------- Block 3: Cross-section ---------- */
.fs-section {
    background-color: var(--graphite);
    background-image:
        linear-gradient(rgba(155, 179, 196, .07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(155, 179, 196, .07) 1px, transparent 1px);
    background-size: 28px 28px;
    color: var(--light-text);
    padding: 3.6rem 0 4rem;
}
.xsec { display: flex; margin: 0; gap: 0; align-items: stretch; }
.xsec-scale {
    position: relative;
    flex: 0 0 72px;
    border-inline-end: 2px solid #59606A;
}
.xsec-scale span {
    position: absolute;
    right: 12px;
    transform: translateY(-50%);
    font-family: var(--f-mono);
    font-size: .78rem;
    color: #C9CED4;
    white-space: nowrap;
}
.xsec-scale span::after {
    content: "";
    position: absolute;
    right: -12px; top: 50%;
    width: 8px; height: 1px;
    background: #8A929B;
}
.xsec-plot { position: relative; flex: 1; min-width: 0; }
.xsec-plot img { display: block; width: 100%; height: auto; }
.xsec-label {
    position: absolute;
    left: 49.3%;
    transform: translate(-50%, -50%);
    padding: 0 .5rem;
    font-size: clamp(.68rem, 1.35vw, 1.05rem);
    font-weight: 600;
    letter-spacing: .04em;
    line-height: 1.2;
    white-space: nowrap;
    color: #F1EBDB;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .85);
}
.xsec-label-ochre { color: #F2C066; }
.xsec-label-blue { color: #A9CBE6; }
.xsec-hint { display: none; margin: .4rem 0 0; font-family: var(--f-mono); font-size: .74rem; color: #9AA1A9; }
.xsec-notes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
    margin-top: 2.6rem;
}
.xsec-note { min-width: 0; padding-top: 1rem; border-top: 3px solid var(--ochre); }
.xsec-note-blue { border-top-color: #4A8DBA; }
.xsec-note h3 { font-size: 1.35rem; text-transform: uppercase; letter-spacing: .06em; color: var(--paper); margin-bottom: .4rem; }
.xsec-note p { font-size: .95rem; color: #C8C2B1; margin: 0; }

/* ---------- Block 4: Slope table ---------- */
.fs-table { padding: 4rem 0 4.4rem; }
.table-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
    gap: 2.6rem;
    align-items: center;
}
.table-main { min-width: 0; }
.table-wrap { overflow-x: auto; background: rgba(241, 235, 219, .75); }
.ref-table { border: 2px solid var(--ink); font-size: 1rem; }
.ref-table th, .ref-table td { border: 1px solid var(--ink); padding: .65rem .9rem; }
.ref-table th { background: rgba(34, 38, 43, .06); font-size: .95rem; }
.ref-table td:nth-child(2) { font-family: var(--f-head); font-weight: 500; font-size: 1.1rem; white-space: nowrap; text-align: center; color: var(--blue); }
.ref-table td:nth-child(3) { font-size: .9rem; color: #46423A; }
.ref-table tbody tr:hover td { background: rgba(224, 163, 46, .12); }
.big-fact { min-width: 0; display: flex; flex-direction: column; }
.big-fact-num {
    font-family: var(--f-head);
    font-weight: 700;
    font-size: clamp(5rem, 13vw, 10rem);
    line-height: .9;
    color: var(--ochre-dark);
    text-shadow: 3px 3px 0 rgba(34, 38, 43, .12);
}
.big-fact-text {
    margin-top: .8rem;
    font-size: clamp(1.15rem, 1.9vw, 1.6rem);
    line-height: 1.25;
    color: var(--ink);
    border-top: 2px solid var(--ink);
    padding-top: .7rem;
}

/* ---------- Inner pages ---------- */
.inner-wrap { padding: 2rem 0 4rem; }
.crumbs {
    margin-bottom: 1.4rem;
    font-family: var(--f-mono);
    font-size: .8rem;
    letter-spacing: .02em;
    color: #3D3A30;
}
.crumbs a { color: var(--blue); }
.crumbs-sep { margin: 0 .35rem; color: var(--olive); }
.layout-single { display: block; }
.layout-single .content-area { width: 100%; margin-left: auto; margin-right: auto; }
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    column-gap: 6%;
    align-items: start;
}
.content-area {
    min-width: 0;
    padding: 2.4rem 2.6rem 2.6rem;
    background-color: var(--paper-light);
    background-image:
        linear-gradient(rgba(155, 179, 196, .22) 1px, transparent 1px),
        linear-gradient(90deg, rgba(155, 179, 196, .22) 1px, transparent 1px);
    background-size: 20px 20px;
    border: 1px solid rgba(58, 53, 39, .25);
    box-shadow: 0 12px 22px -16px rgba(34, 38, 43, .6);
}
.page-head, .entry-head { margin-bottom: 1.8rem; padding-bottom: 1rem; border-bottom: 2px solid var(--ink); }
.page-title { font-size: clamp(1.9rem, 4vw, 3rem); text-transform: uppercase; margin-bottom: .4rem; }
.page-lead { color: var(--muted); font-size: 1.02rem; margin: 0; }
.entry-meta { margin: 0; font-family: var(--f-mono); font-size: .82rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.entry-cat a { color: var(--blue); }
.entry-photo { margin: 0 0 1.8rem; padding: 12px 12px 30px; background: var(--strip); box-shadow: 0 8px 16px -10px rgba(34, 38, 43, .5); transform: rotate(-.4deg); }
.entry-photo img { display: block; width: 100%; height: auto; }
.entry-content { font-size: 1.08rem; }
.entry-content h2 { font-size: 1.85rem; margin-top: 1.8em; text-transform: uppercase; }
.entry-content h3 { font-size: 1.4rem; margin-top: 1.6em; }
.entry-content h4 { font-size: 1.15rem; margin-top: 1.4em; }
.entry-content ul, .entry-content ol { padding-inline-start: 1.4rem; margin: 0 0 1.2em; }
.entry-content li { margin-bottom: .35em; }
.entry-content ul li::marker { color: var(--ochre-dark); }
.entry-content img { display: block; }
.entry-content figure { margin: 1.6em 0; }
.entry-content figcaption { font-family: var(--f-mono); font-size: .8rem; color: var(--muted); margin-top: .5rem; }
.entry-content table { margin: 1.4em 0; background: rgba(255, 255, 255, .35); }
.entry-content .alignleft { float: left; margin: .3em 1.4em 1em 0; }
.entry-content .alignright { float: right; margin: .3em 0 1em 1.4em; }
.entry-content .aligncenter { margin-left: auto; margin-right: auto; }
.entry-tags { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.entry-tags a {
    padding: .2rem .6rem;
    font-family: var(--f-mono);
    font-size: .8rem;
    text-decoration: none;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
}
.entry-tags a:hover { background: var(--ochre); border-color: var(--ink); }
.page-links { margin-top: 1.4rem; font-family: var(--f-mono); }

/* ---------- Sidebar ---------- */
.sidebar { min-width: 0; color: var(--ink); }
.sidebar .widget {
    margin-bottom: 1.8rem;
    padding: 0 1.3rem 1.2rem;
    background: var(--paper);
    border: 1px solid rgba(58, 53, 39, .3);
    box-shadow: 0 10px 18px -14px rgba(34, 38, 43, .6);
}
.sidebar .widget-title {
    margin: 0 -1.3rem 1rem;
    padding: .7rem 1.3rem .6rem;
    font-size: 1.05rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--paper);
    background: var(--olive);
}
.sidebar .widget, .sidebar .widget p { color: var(--ink); }
.sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.sidebar .widget li { padding: .55rem 0; border-bottom: 1px dashed var(--line); line-height: 1.4; }
.sidebar .widget li:last-child { border-bottom: 0; }
.sidebar .widget a { color: var(--blue); }
.sidebar .widget a:hover { color: var(--ink); }
.sidebar .widget .post-date { display: block; font-family: var(--f-mono); font-size: .76rem; color: var(--muted); }

/* ---------- Pagination ---------- */
.pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    margin-top: 2.6rem;
}
.pager .page-numbers {
    display: inline-block;
    min-width: 2.6rem;
    padding: .45rem .75rem;
    font-family: var(--f-head);
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: .05em;
    text-align: center;
    text-decoration: none;
    color: var(--ink);
    background: var(--strip);
    border: 2px solid var(--ink);
}
.pager a.page-numbers:hover { background: var(--ochre); }
.pager .page-numbers.current { background: var(--ink); color: var(--ochre); }
.pager .page-numbers.dots { border-color: transparent; background: transparent; min-width: auto; }

/* ---------- Search form ---------- */
.find-form { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0; }
.find-field {
    flex: 1 1 220px;
    min-width: 0;
    padding: .65rem .9rem;
    font: inherit;
    color: var(--ink);
    background: #FBF8F0;
    border: 2px solid var(--ink);
    border-radius: 0;
}
.find-submit { box-shadow: 2px 2px 0 var(--ink); }

/* ---------- 404 ---------- */
.lost { text-align: center; }
.lost-code {
    margin: 0;
    font-family: var(--f-head);
    font-weight: 700;
    font-size: clamp(5rem, 16vw, 10rem);
    line-height: 1;
    color: var(--ochre-dark);
}
.lost .find-form { max-width: 520px; margin: 1.6rem auto; }
.lost-home { margin-top: 1.4rem; }

/* ---------- Comments ---------- */
.remarks { margin-top: 3rem; padding-top: 1.6rem; border-top: 2px solid var(--ink); }
.remarks-title, .comment-reply-title { font-size: 1.6rem; text-transform: uppercase; }
.remark-list, .remark-list .children { list-style: none; margin: 0; padding: 0; }
.remark-list .children { padding-inline-start: 1.6rem; border-inline-start: 2px dashed var(--line); }
.remark-body {
    margin-bottom: 1.2rem;
    padding: 1rem 1.2rem;
    background: var(--strip);
    border: 1px solid rgba(58, 53, 39, .2);
}
.remark-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin-bottom: .6rem; }
.remark-head img { display: block; border: 2px solid var(--paper); }
.remark-author { font-weight: 600; }
.remark-date { font-family: var(--f-mono); font-size: .78rem; color: var(--muted); }
.remark-wait { font-style: italic; color: var(--ochre-dark); }
.remark-reply a { font-family: var(--f-head); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
.comment-respond { margin-top: 2rem; }
.comment-form p { margin-bottom: 1rem; }
.comment-form label { display: block; margin-bottom: .3rem; font-weight: 600; font-size: .92rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
    width: 100%;
    padding: .6rem .8rem;
    font: inherit;
    color: var(--ink);
    background: #FBF8F0;
    border: 2px solid var(--ink);
    border-radius: 0;
}
.comment-form-cookies-consent { display: flex; align-items: flex-start; gap: .5rem; }
.comment-form-cookies-consent label { display: inline; font-weight: 400; }
.comment-notes, .logged-in-as { font-size: .9rem; color: var(--muted); }
.comment-form .submit {
    padding: .65rem 1.3rem;
    font-family: var(--f-head);
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ink);
    background: var(--ochre);
    border: 2px solid var(--ink);
    border-radius: 0;
    box-shadow: 3px 3px 0 var(--ink);
    cursor: pointer;
}
.comment-form .submit:hover { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.comments-pagination, .comment-navigation { margin: 1rem 0; font-family: var(--f-mono); }

/* ---------- Footer ---------- */
.site-foot {
    background-color: var(--earth);
    background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .02) 0 2px, transparent 2px 9px);
    color: #D9D0B8;
    border-top: 5px solid #2A261C;
}
.foot-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.4rem;
    padding: 3.2rem 0 2.4rem;
}
.foot-col { min-width: 0; }
.site-foot .widget { color: #D9D0B8; font-size: .94rem; line-height: 1.6; }
.site-foot .widget p { color: #D9D0B8; }
.site-foot .widget-title {
    margin-bottom: .9rem;
    font-size: 1.12rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--ochre);
}
.site-foot .widget ul { list-style: none; margin: 0; padding: 0; }
.site-foot .widget li { padding: .25rem 0; }
.site-foot .widget a { color: #EDE5CF; text-decoration-color: rgba(224, 163, 46, .6); }
.site-foot .widget a:hover { color: var(--ochre); }
.site-foot .widget .post-date { color: #B4AA90; }
.foot-base {
    padding: 1.2rem 0 1.6rem;
    border-top: 1px solid rgba(217, 208, 184, .2);
    text-align: center;
}
.foot-base p { margin: 0; font-size: .82rem; letter-spacing: .03em; color: #B4AA90; }

/* ---------- Cookie banner ---------- */
.cookie-banner {
    position: fixed;
    left: 1rem; right: 1rem; bottom: 1rem;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.6rem;
    max-width: 960px;
    margin: 0 auto;
    padding: 1rem 1.4rem;
    color: var(--light-text);
    background: var(--olive);
    border: 2px solid var(--ochre);
    box-shadow: 5px 5px 0 rgba(34, 38, 43, .5);
}
.cookie-text { margin: 0; font-size: .9rem; line-height: 1.5; color: var(--light-text); }
.cookie-accept { flex: 0 0 auto; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .masthead-row { flex-wrap: wrap; }
    .brand { flex: 1 1 0; }
    .topnav-toggle { display: inline-flex; }
    .topnav { display: none; width: 100%; }
    .topnav.is-open { display: block; }
    .topnav-list { flex-direction: column; align-items: stretch; padding: .4rem 0 .6rem; border-top: 1px solid rgba(233, 226, 207, .2); }
    .topnav-list li + li::before { display: none; }
    .topnav-list a { display: block; padding: .6rem 0; border-bottom: 1px solid rgba(233, 226, 207, .12); }

    .read-grid { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
    .log-grid { grid-template-columns: minmax(0, 1fr); }
    .log-side { flex-direction: column; }
    .log-title { writing-mode: horizontal-tb; white-space: normal; border-inline-start: 0; border-bottom: 3px solid var(--ink); padding: 0 0 .5rem; }
    .card-grid-3, .card-grid-3:has(> .card:nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .xsec-notes { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
    .table-grid { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); row-gap: 2.2rem; }
    .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .shell { width: 92%; }
    body { font-size: 1rem; }
    .brand-stamp { width: 56px; height: 56px; }
    .brand-tagline { display: none; }
    .fs { padding: 2.8rem 0; }
    .grid-paper::before { width: 14px; }
    .slip-title { padding: .55rem 1rem .5rem; }
    .read-plot { padding: 6px; }
    .plot-tag { padding: .1rem .35rem; border-width: 1px; box-shadow: none; }
    .log-photos { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; padding-bottom: 0; }
    .snap { width: 100%; max-width: 340px; justify-self: center; }
    .snap-1, .snap-2, .snap-3 { margin: 0; transform: rotate(-1.2deg); }
    .snap-2 { transform: rotate(1.2deg); }
    .card-grid-3, .card-grid-2, .card-grid-3:has(> .card:nth-child(4)) { grid-template-columns: minmax(0, 1fr); }
    .xsec { overflow-x: auto; padding-bottom: .6rem; scrollbar-color: #59606A transparent; }
    .xsec-scale { flex: 0 0 52px; position: sticky; left: 0; z-index: 2; background: var(--graphite); }
    .xsec-scale span { font-size: .66rem; right: 8px; }
    .xsec-scale span::after { right: -8px; width: 5px; }
    .xsec-plot { flex: 0 0 640px; }
    .xsec-label { font-size: .8rem; }
    .xsec-hint { display: block; }
    .ref-table th, .ref-table td { padding: .5rem .55rem; font-size: .88rem; }
    .content-area { padding: 1.5rem 1.2rem 1.8rem; }
    .foot-cols { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; padding-top: 2.4rem; }
    .cookie-banner { flex-direction: column; align-items: flex-start; left: .6rem; right: .6rem; bottom: .6rem; padding: 1rem 1.1rem; }
}
