/*
Theme Name: dds_culturaltoursuk.com
Theme URI: https://culturaltoursuk.com/
Author: Eleanor Voss
Description: Architectural field-atlas theme on blueprint paper: chalk elevations, pasted city plans, brass rules and terracotta accents for a guide to historic homes in storied cities.
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: cultatlas
*/

/* ---------- Fonts ---------- */
@font-face { font-family: "Marcellus"; src: url("fonts/marcellus-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("fonts/eb-garamond-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("fonts/eb-garamond-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("fonts/eb-garamond-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("fonts/eb-garamond-latin-600-normal.woff2") format("woff2"); font-weight: 600 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("fonts/caveat-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
    --ink: #10243B;
    --grid: #2C4A63;
    --paper: #E8DCC3;
    --paper-deep: #D8C7A4;
    --brass: #B08D57;
    --chalk: #D9E2E8;
    --text: #F2E8D5;
    --muted: #8FA6B8;
    --terra: #C4552E;
    --terra-dark: #A8441F;
    --night: #0A1725;
    --navy-2: #13304C;
    --sepia: #7A5A3A;
    --leather: #6B4A2E;
    --f-head: "Marcellus", "Optima", "Candara", "Palatino Linotype", serif;
    --f-body: "EB Garamond", "Garamond", "Georgia", "Times New Roman", serif;
    --f-hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;
    --shell: min(85%, 1220px);
}

/* ---------- Hidden-state rules (must precede component styles) ---------- */
.cookie-banner[hidden] { display: none !important; }
[hidden] { display: none !important; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--f-body);
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--paper);
    background-image:
        radial-gradient(ellipse at 6% 22%, rgba(150, 110, 60, .22), transparent 38%),
        radial-gradient(ellipse at 96% 64%, rgba(150, 110, 60, .2), transparent 34%),
        radial-gradient(ellipse at 40% 99%, rgba(150, 110, 60, .18), transparent 40%),
        url("images/paper-tile.jpg");
    background-size: auto, auto, auto, 320px 252px;
}
img { max-width: 100%; height: auto; }
a { color: var(--text); text-decoration: underline; text-decoration-color: var(--brass); text-underline-offset: 3px; transition: color .2s, text-decoration-color .2s; }
a:hover { color: #fff; text-decoration-color: var(--terra); }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px dashed var(--brass); outline-offset: 3px; }
h1, h2, h3, h4, h5, h6 { font-family: var(--f-head); font-weight: 400; line-height: 1.2; margin: 1.6em 0 .6em; letter-spacing: .02em; overflow-wrap: break-word; hyphens: auto; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
p, li, dd, dt, td, th, figcaption { overflow-wrap: break-word; hyphens: auto; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 200; padding: .6rem 1rem; background: var(--terra); color: var(--text); }
.skip-link:focus { top: 1rem; }

/* ---------- Sheet (blueprint page laid on old paper) ---------- */
.sheet {
    margin: 1.6rem;
    background-color: var(--ink);
    background-image:
        linear-gradient(rgba(44, 74, 99, .6) 1px, transparent 1px),
        linear-gradient(90deg, rgba(44, 74, 99, .6) 1px, transparent 1px),
        linear-gradient(rgba(44, 74, 99, .28) 1px, transparent 1px),
        linear-gradient(90deg, rgba(44, 74, 99, .28) 1px, transparent 1px);
    background-size: 64px 64px, 64px 64px, 16px 16px, 16px 16px;
    box-shadow: 0 0 0 1px rgba(176, 141, 87, .45), 0 14px 40px rgba(40, 26, 10, .35);
}
.shell { width: var(--shell); margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: .6rem 1.4rem;
    font-family: var(--f-head);
    font-size: 1rem;
    letter-spacing: .06em;
    color: var(--text);
    background: var(--terra);
    border: 1px solid var(--brass);
    border-radius: 2px;
    box-shadow: inset 0 0 0 3px var(--terra), inset 0 0 0 4px rgba(242, 232, 213, .35);
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, transform .2s, box-shadow .2s;
}
.btn:hover { color: var(--text); background: var(--terra-dark); box-shadow: inset 0 0 0 3px var(--terra-dark), inset 0 0 0 4px rgba(242, 232, 213, .5); transform: translateY(-1px); }
.btn--small { padding: .4rem 1rem; font-size: .9rem; }

/* ---------- Masthead ---------- */
.masthead { padding: 1rem 1rem 0; }
.masthead-plate {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem 2.5rem;
    padding: 1.4rem 2.2rem;
    background: var(--paper) url("images/paper-tile.jpg") repeat;
    background-size: 320px 252px;
    border: 1px solid var(--brass);
    outline: 1px solid var(--brass);
    outline-offset: -8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
    color: var(--ink);
}
.brand { display: flex; align-items: center; gap: 1.1rem; min-width: 0; flex: 1 1 56%; }
.brand-mark { flex: 0 0 auto; display: block; line-height: 0; }
.brand-svg { width: 64px; height: 84px; display: block; }
.brand-logo { display: block; max-height: 84px; width: auto; }
.brand-text { min-width: 0; }
.brand-name {
    display: block;
    font-family: var(--f-head);
    font-size: clamp(1rem, 1.25vw, 1.2rem);
    line-height: 1.3;
    color: var(--ink);
    text-decoration: none;
    letter-spacing: .02em;
}
.brand-name:hover { color: var(--terra); }
.brand-tagline { margin: .35rem 0 0; font-style: italic; font-size: .95rem; line-height: 1.4; color: #3B4B5C; }
.primary-nav { flex: 0 1 auto; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.8rem; justify-content: flex-end; }
.nav-list a {
    display: inline-block;
    padding: .3rem 0;
    font-family: var(--f-head);
    font-size: 1.05rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 2px solid transparent;
}
.nav-list a:hover { color: var(--terra); border-bottom-color: var(--brass); }
.nav-list .current-menu-item > a, .nav-list .current_page_item > a { border-bottom-color: var(--terra); }
.nav-toggle { display: none; }

/* ---------- Section heads ---------- */
.front { padding: 3.2rem 0 4rem; }
.front-section { position: relative; padding: 2.2rem 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; border-bottom: 1px solid rgba(176, 141, 87, .75); }
.sec-title { margin: 0; padding-bottom: .5rem; font-size: clamp(2rem, 4.2vw, 3.3rem); letter-spacing: .05em; text-transform: uppercase; color: var(--text); position: relative; min-width: 0; }
.sec-title::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 3px; background: var(--brass); }
.sec-no { font-family: var(--f-head); font-size: clamp(2rem, 3.6vw, 2.9rem); line-height: 1; padding-bottom: .5rem; color: var(--brass); }
.sec-lead { max-width: 46rem; color: var(--muted); font-size: 1.15rem; margin-bottom: 2rem; }
.empty-note { color: var(--muted); font-style: italic; }

/* ---------- Block 1: City atlas ---------- */
.atlas-section { padding-top: 1rem; }
.atlas-arches { position: absolute; top: -1.6rem; right: -3%; width: 42%; opacity: .55; pointer-events: none; display: block; z-index: 0; }
.atlas-section .sec-head, .atlas-section .sec-lead { position: relative; z-index: 1; }
.atlas-strip { position: relative; z-index: 1; display: flex; align-items: flex-start; padding: 1.5rem 0 1rem; }
.atlas-leaf {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    margin: 0 0 0 -1.6%;
    filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .5));
    transition: transform .25s;
}
.leaf-paper {
    position: relative;
    padding: 1.6rem 1.2rem 2.4rem;
    color: var(--ink);
    background: var(--paper) url("images/paper-tile.jpg");
    background-size: 320px 252px;
    clip-path: polygon(0 0, 100% 0, 100% 96%, 94% 98.5%, 88% 96.5%, 81% 99%, 74% 96.8%, 66% 98.8%, 58% 96.4%, 50% 99%, 43% 96.6%, 35% 98.7%, 27% 96.3%, 20% 98.9%, 12% 96.7%, 6% 98.6%, 0 96.5%);
}
.atlas-leaf:first-child { margin-left: 0; }
.atlas-leaf--2, .atlas-leaf--4 { margin-top: 1.8rem; z-index: 1; }
.atlas-leaf--1, .atlas-leaf--5 { z-index: 2; }
.atlas-leaf--3 { z-index: 3; }
.atlas-leaf--3 .leaf-paper { padding-bottom: 3rem; }
.atlas-leaf:hover { transform: translateY(-6px); z-index: 4; }
.leaf-tab { position: absolute; top: 0; right: 1.2rem; width: 22px; height: 44px; background: linear-gradient(90deg, #8E6E3E, var(--brass) 45%, #C9A773 60%, #8E6E3E); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%); }
.leaf-head { display: block; text-align: center; margin-bottom: .9rem; }
.leaf-city { display: block; font-family: var(--f-head); font-size: clamp(1.15rem, 1.9vw, 1.75rem); letter-spacing: .05em; text-transform: uppercase; line-height: 1.15; }
.leaf-count { display: block; margin-top: .15rem; font-size: 1rem; color: #3B4B5C; }
.leaf-map { display: block; width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border: 1px solid rgba(16, 36, 59, .25); }
.leaf-note { margin: .9rem 0 0; font-style: italic; font-size: .98rem; line-height: 1.45; color: #22374D; }

/* ---------- Block 2: Façade ---------- */
.facade-layout { display: grid; grid-template-columns: minmax(0, 17%) minmax(0, 1fr) minmax(0, 18%); gap: 2.5%; align-items: end; }
.facade-sketch { display: block; width: 100%; opacity: .9; align-self: end; }
.facade-plate { position: relative; margin: 0; }
.facade-plate img { display: block; width: 100%; aspect-ratio: 820 / 512; object-fit: cover; }
.chalk-label {
    position: absolute;
    transform: translate(-50%, -50%);
    max-width: 15%;
    font-family: var(--f-hand);
    font-weight: 500;
    font-size: clamp(.9rem, 1.7vw, 1.6rem);
    line-height: 1;
    text-align: center;
    color: var(--text);
    text-shadow: 0 0 6px rgba(16, 36, 59, .9);
}
.chalk-label--tiles { left: 89.9%; top: 18%; }
.chalk-label--bay { left: 6.7%; top: 33.6%; }
.chalk-label--cornice { left: 7.2%; top: 55.1%; }
.chalk-label--arch { left: 9.3%; top: 81.3%; }
.chalk-label--rail { left: 91.2%; top: 58.4%; }
.facade-legend { padding-left: 1rem; border-left: 1px solid rgba(217, 226, 232, .45); align-self: stretch; }
.legend-title { margin: 0 0 .8rem; font-size: 1rem; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.legend-list { margin: 0; font-size: .92rem; line-height: 1.4; }
.legend-list dt { font-family: var(--f-head); color: var(--text); letter-spacing: .04em; margin-top: .7rem; }
.legend-list dt:first-child { margin-top: 0; }
.legend-list dd { margin: .15rem 0 0; color: var(--muted); padding-bottom: .55rem; border-bottom: 1px dashed rgba(143, 166, 184, .35); }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 2.4rem 2rem; }
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1rem;
    color: var(--ink);
    background: var(--paper) url("images/paper-tile.jpg");
    background-size: 320px 252px;
    border: 1px solid var(--sepia);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .4);
    overflow: hidden;
    transition: transform .25s, box-shadow .25s;
}
.card::after { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(122, 90, 58, .55); pointer-events: none; }
.card:hover { transform: translateY(-5px) rotate(0deg); box-shadow: 0 16px 30px rgba(0, 0, 0, .5); }
.card-thumb { position: relative; z-index: 1; }
.card-thumb a { display: block; }
.card-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border: 1px solid rgba(122, 90, 58, .6); filter: sepia(.25) contrast(1.02); }
.card-body { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; min-width: 0; padding: 1rem .6rem .5rem; }
.card-title { margin: 0 0 .5rem; font-size: 1.35rem; letter-spacing: .04em; text-transform: uppercase; line-height: 1.25; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--terra); }
.card-excerpt { flex: 1; font-size: 1rem; line-height: 1.5; color: #2A3D52; }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-excerpt a { color: var(--ink); }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; margin-top: .8rem; }
.card-date { font-size: .95rem; letter-spacing: .05em; color: #4A5D70; }
.card-foot .btn { margin-left: auto; }

.card-grid--journal { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3.5%; padding: 1rem 0 1.5rem; }
.card-grid--journal .card:nth-child(1) { transform: rotate(-2.8deg) scale(1.03); }
.card-grid--journal .card:nth-child(2) { margin-top: 1.6rem; overflow: visible; }
.card-grid--journal .card:nth-child(2)::before { content: ""; position: absolute; top: -14px; left: 50%; width: 92px; height: 28px; transform: translateX(-50%) rotate(-2deg); background: rgba(228, 214, 180, .85); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); z-index: 3; }
.card-grid--journal .card:nth-child(3) { transform: rotate(2.6deg); margin-top: .6rem; }
.card-grid--journal .card:hover { transform: rotate(0deg) translateY(-6px); }

/* ---------- Front pair ---------- */
.front-pair { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 4.5%; align-items: start; }

/* ---------- Block 4: House in section ---------- */
.cut-layout { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr); gap: .6rem; align-items: stretch; }
.cut-scale { display: flex; flex-direction: column; justify-content: space-between; padding: 4% 0 6%; border-right: 1px solid var(--chalk); }
.cut-scale span { position: relative; padding-right: .7rem; font-size: .78rem; line-height: 1; text-align: right; color: var(--chalk); white-space: nowrap; }
.cut-scale span::after { content: ""; position: absolute; right: 0; top: 50%; width: .45rem; height: 1px; background: var(--chalk); }
.cut-plate { position: relative; margin: 0; }
.cut-plate img { display: block; width: 100%; aspect-ratio: 685 / 480; object-fit: cover; }
.cut-label { position: absolute; transform: translate(-50%, -50%); font-family: var(--f-head); font-size: clamp(.7rem, 1.15vw, 1.05rem); letter-spacing: .08em; text-transform: uppercase; text-align: center; line-height: 1.15; color: var(--text); max-width: 19%; }
.cut-label--attic { left: 9.6%; top: 32.9%; }
.cut-label--piano { left: 9.5%; top: 55.6%; }
.cut-label--cellar { left: 10.9%; top: 80.6%; }
.cut-note { position: absolute; left: 86.4%; top: 54.2%; transform: translate(-50%, -50%); width: 26%; font-family: var(--f-hand); font-size: clamp(.8rem, 1.2vw, 1.15rem); line-height: 1.05; color: var(--paper); text-align: left; }
.cut-facts { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; gap: .7rem; }
.cut-facts li { padding: .7rem 1rem .7rem 1.1rem; font-size: 1rem; line-height: 1.45; color: var(--text); background: rgba(10, 23, 37, .55); border-left: 3px solid var(--brass); }
.cut-facts strong { font-family: var(--f-head); font-weight: 400; letter-spacing: .05em; color: var(--paper); }

/* ---------- Block 5: Ledger (questions) ---------- */
.questions-section .sec-head { align-items: flex-end; }
.ledger {
    position: relative;
    margin: 0 1.6rem 1.4rem 0;
    padding: .6rem 0;
    color: var(--ink);
    background: var(--paper) url("images/paper-tile.jpg");
    background-size: 320px 252px;
    border: 1px solid var(--sepia);
    box-shadow: 4px 5px 0 #D2BF98, 8px 10px 0 #C2AA7E, 12px 15px 0 var(--leather), 0 20px 32px rgba(0, 0, 0, .45);
}
.ledger-item { position: relative; border-top: 1px solid var(--brass); }
.ledger-item:first-child { border-top: 0; }
.ledger-item summary { position: relative; display: flex; align-items: center; gap: 1rem; padding: .95rem 1.4rem; cursor: pointer; list-style: none; }
.ledger-item summary::-webkit-details-marker { display: none; }
.ledger-num { flex: 0 0 auto; font-family: var(--f-head); font-size: 1.15rem; min-width: 1.2rem; color: var(--sepia); transition: font-size .25s; }
.ledger-q { flex: 1; min-width: 0; font-size: 1.15rem; line-height: 1.3; }
.ledger-tab { position: absolute; right: -2.15rem; top: 50%; transform: translateY(-50%); width: 2rem; padding: .5rem 0; font-family: var(--f-head); font-size: .9rem; text-align: center; color: var(--ink); background: linear-gradient(90deg, #C9AE7E, #B8975F); border: 1px solid var(--sepia); border-left: 0; border-radius: 0 4px 4px 0; }
.ledger-item[open] summary { align-items: flex-start; padding-bottom: .3rem; }
.ledger-item[open] .ledger-num { font-size: 4.2rem; line-height: .9; color: var(--ink); }
.ledger-item[open] .ledger-q { font-family: var(--f-head); font-size: 1.3rem; padding-top: .4rem; }
.ledger-item[open] .ledger-tab { background: linear-gradient(90deg, #D9C59C, #C9AE7E); }
.ledger-item summary:hover .ledger-q { color: var(--terra); }
.ledger-a { padding: 0 1.4rem 1.1rem 5.6rem; font-size: 1rem; line-height: 1.5; color: #2A3D52; }
.ledger-a p { margin: 0; }

/* ---------- Inner pages ---------- */
.inner { padding: 2.4rem 0 4rem; }
.crumbs { margin-bottom: 1.8rem; font-size: .98rem; color: var(--muted); letter-spacing: .03em; }
.crumbs a { color: var(--chalk); }
.crumbs .sep { margin: 0 .35rem; color: var(--brass); }
.crumbs span:last-child { color: var(--text); }
.layout-with-sidebar { display: grid; grid-template-columns: minmax(0, 67%) minmax(0, 27%); justify-content: space-between; align-items: start; }
.layout-single { display: block; }
.layout-single .content-area { width: 85%; margin-left: auto; margin-right: auto; }
.content-area { min-width: 0; }
.page-head { margin-bottom: 2rem; border-bottom: 1px solid rgba(176, 141, 87, .75); }
.page-title, .entry-title { margin: 0 0 .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text); }
.page-intro { color: var(--muted); }
.entry-head { margin-bottom: 1.6rem; padding-bottom: 1rem; border-bottom: 1px solid rgba(176, 141, 87, .75); }
.entry-meta { margin: 0; color: var(--muted); font-size: 1rem; letter-spacing: .04em; }
.entry-meta a { color: var(--chalk); }
.meta-sep { margin: 0 .4rem; color: var(--brass); }
.entry-cover { margin: 0 0 1.8rem; padding: .7rem; background: var(--paper); border: 1px solid var(--sepia); }
.entry-cover img { display: block; width: 100%; height: auto; }
.entry-content { font-size: 1.18rem; line-height: 1.7; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2, .entry-content h3 { color: var(--paper); }
.entry-content h2 { padding-bottom: .3rem; border-bottom: 1px solid rgba(176, 141, 87, .5); }
.entry-content ul, .entry-content ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.entry-content li { margin-bottom: .4em; }
.entry-content ul li::marker { color: var(--brass); }
.entry-content ol li::marker { color: var(--brass); font-family: var(--f-head); }
.entry-content img { display: block; height: auto; }
.entry-content figure { margin: 1.6em 0; }
.entry-content figcaption { margin-top: .5em; font-size: .95rem; font-style: italic; color: var(--muted); }
.entry-content blockquote { margin: 1.8em 0; padding: 1.2rem 1.6rem; color: var(--ink); background: var(--paper) url("images/paper-tile.jpg"); background-size: 320px 252px; border-left: 4px solid var(--terra); font-style: italic; font-size: 1.2rem; }
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content blockquote cite { display: block; margin-top: .6rem; font-size: .95rem; font-style: normal; color: var(--sepia); }
.entry-content table { width: 100%; margin: 1.6em 0; border-collapse: collapse; border: 1px solid var(--chalk); font-size: 1rem; }
.entry-content th, .entry-content td { padding: .6rem .8rem; border: 1px solid rgba(217, 226, 232, .6); text-align: left; vertical-align: top; }
.entry-content th { font-family: var(--f-head); font-weight: 400; letter-spacing: .04em; background: rgba(176, 141, 87, .22); color: var(--paper); }
.entry-content tr:nth-child(even) td { background: rgba(10, 23, 37, .35); }
.entry-content pre { overflow-x: auto; padding: 1rem; background: var(--night); border: 1px solid var(--grid); font-size: .95rem; }
.entry-content code { font-size: .92em; background: rgba(10, 23, 37, .6); padding: .1em .3em; }
.entry-content hr { border: 0; height: 1px; margin: 2em 0; background: var(--brass); }
.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 .7rem; font-size: .95rem; text-decoration: none; border: 1px solid var(--brass); color: var(--chalk); }
.entry-tags a:hover { background: var(--brass); color: var(--ink); }
.page-links { margin-top: 1.4rem; }

.post-navigation { margin: 3rem 0 0; }
.post-navigation .nav-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }
.post-navigation a { display: block; height: 100%; padding: 1rem 1.2rem; text-decoration: none; border: 1px solid rgba(176, 141, 87, .6); background: rgba(10, 23, 37, .45); transition: background .2s, border-color .2s; }
.post-navigation a:hover { background: rgba(10, 23, 37, .75); border-color: var(--terra); }
.post-navigation .nav-next { text-align: right; grid-column: 2; }
.nav-label { display: block; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: var(--brass); }
.nav-title { display: block; margin-top: .2rem; font-family: var(--f-head); color: var(--text); }

/* ---------- Pagination ---------- */
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 2.6rem; }
.pager .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 2.6rem; padding: .45rem .8rem; font-family: var(--f-head); font-size: 1rem; color: var(--text); text-decoration: none; border: 1px solid var(--brass); background: rgba(10, 23, 37, .5); transition: background .2s, color .2s; }
.pager a.page-numbers:hover { background: var(--brass); color: var(--ink); }
.pager .page-numbers.current { background: var(--terra); border-color: var(--terra); color: var(--text); }
.pager .page-numbers.dots { border: 0; background: none; min-width: auto; }

/* ---------- Sidebar (paper sheet) ---------- */
.sidebar { min-width: 0; padding: 1.6rem 1.5rem; color: var(--ink); background: var(--paper) url("images/paper-tile.jpg"); background-size: 320px 252px; border: 1px solid var(--sepia); box-shadow: 0 10px 22px rgba(0, 0, 0, .4); }
.sidebar .widget { margin-bottom: 2rem; color: var(--ink); }
.sidebar .widget:last-child { margin-bottom: 0; }
.sidebar .widget-title { margin: 0 0 .9rem; padding-bottom: .5rem; font-size: 1.15rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); border-bottom: 1px solid var(--brass); }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { padding: .5rem 0; border-bottom: 1px dashed rgba(122, 90, 58, .45); font-size: 1.02rem; line-height: 1.4; }
.sidebar li:last-child { border-bottom: 0; }
.sidebar a { color: var(--ink); text-decoration-color: var(--brass); }
.sidebar a:hover { color: var(--terra); }
.sidebar .post-date, .sidebar .rss-date { display: block; font-size: .88rem; color: #4A5D70; }
.sidebar p { color: #2A3D52; }
.sidebar .search-form { flex-direction: column; }
.sidebar .search-field { background: #F4ECDB; color: var(--ink); border-color: var(--sepia); }

/* ---------- Search form ---------- */
.search-form { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1.4rem 0; }
.search-field { flex: 1 1 14rem; min-width: 0; padding: .65rem .9rem; font-family: var(--f-body); font-size: 1.05rem; color: var(--text); background: rgba(10, 23, 37, .7); border: 1px solid var(--brass); border-radius: 2px; }
.search-field::placeholder { color: var(--muted); }

/* ---------- 404 ---------- */
.lost { text-align: center; padding: 2rem 0; }
.lost-code { margin: 0; font-family: var(--f-head); font-size: clamp(5rem, 14vw, 9rem); line-height: 1; color: transparent; -webkit-text-stroke: 1.5px var(--chalk); letter-spacing: .1em; }
.lost-text { max-width: 36rem; margin: 0 auto 1rem; color: var(--muted); }
.lost .search-form { max-width: 34rem; margin-left: auto; margin-right: auto; }

/* ---------- Comments ---------- */
.notes { margin-top: 3.4rem; padding-top: 1.6rem; border-top: 1px solid rgba(176, 141, 87, .75); }
.notes-title, .comment-reply-title { font-size: 1.6rem; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 1.2rem; }
.notes-list, .notes-list .children { list-style: none; margin: 0; padding: 0; }
.notes-list .children { margin-left: 2rem; }
.note-entry { margin-bottom: 1.2rem; padding: 1rem 1.2rem; background: rgba(10, 23, 37, .5); border-left: 3px solid var(--brass); }
.note-head { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: .5rem; }
.note-avatar { display: block; border-radius: 50%; }
.note-author { font-family: var(--f-head); color: var(--paper); }
.note-date { font-size: .9rem; color: var(--muted); }
.note-wait { font-style: italic; color: var(--brass); }
.note-text p:last-child { margin-bottom: .3rem; }
.note-reply a { font-size: .95rem; color: var(--brass); }
.comment-respond { margin-top: 2rem; }
.comment-form p { margin-bottom: 1rem; }
.comment-form label { display: block; margin-bottom: .3rem; font-size: .98rem; color: var(--chalk); }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; padding: .65rem .8rem; font-family: var(--f-body); font-size: 1.05rem; color: var(--text); background: rgba(10, 23, 37, .7); border: 1px solid var(--brass); border-radius: 2px; }
.comment-form-cookies-consent { display: flex; align-items: flex-start; gap: .5rem; }
.comment-form-cookies-consent label { display: inline; margin: 0; }
.comment-notes, .logged-in-as { color: var(--muted); font-size: .98rem; }
.comment-form .submit { padding: .65rem 1.6rem; font-family: var(--f-head); font-size: 1rem; letter-spacing: .06em; color: var(--text); background: var(--terra); border: 1px solid var(--brass); border-radius: 2px; cursor: pointer; }
.comment-form .submit:hover { background: var(--terra-dark); }

/* ---------- Footer ---------- */
.colophon {
    position: relative;
    padding: 3.2rem 0 2rem;
    color: var(--text);
    background-color: var(--night);
    background-image:
        linear-gradient(rgba(217, 226, 232, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(217, 226, 232, .05) 1px, transparent 1px);
    background-size: 64px 64px;
    border-top: 1px solid rgba(176, 141, 87, .6);
}
.colophon-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem; }
.colophon-col { min-width: 0; }
.colophon .widget { margin-bottom: 1.4rem; color: var(--text); font-size: 1rem; }
.colophon .widget-title { margin: 0 0 .9rem; font-size: 1.3rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text); }
.colophon .widget p, .colophon .textwidget { color: #C9D2D9; line-height: 1.55; }
.colophon .widget ul { list-style: none; margin: 0; padding: 0; }
.colophon .widget li { padding: .18rem 0; }
.colophon .widget a { color: var(--muted); text-decoration-color: rgba(176, 141, 87, .6); }
.colophon .widget a:hover { color: var(--text); text-decoration-color: var(--terra); }
.colophon .post-date { color: var(--muted); font-size: .9rem; }
.colophon-copy { margin: 2.4rem 0 0; padding-top: 1.4rem; text-align: center; font-size: .95rem; line-height: 1.5; color: #C9D2D9; border-top: 1px solid rgba(217, 226, 232, .14); }

/* ---------- Cookie banner ---------- */
.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 150;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    max-width: 920px;
    margin: 0 auto;
    padding: 1.1rem 1.6rem;
    color: var(--text);
    background: var(--night);
    border: 1px solid var(--brass);
    outline: 1px solid rgba(176, 141, 87, .45);
    outline-offset: -6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
}
.cookie-text { margin: 0; font-size: 1rem; line-height: 1.45; color: var(--text); }
.cookie-accept { flex: 0 0 auto; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
    .facade-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 24%); }
    .facade-sketch { display: none; }
}

@media (max-width: 960px) {
    :root { --shell: min(92%, 1220px); }
    .sheet { margin: .8rem; }
    .masthead-plate { flex-wrap: wrap; padding: 1.2rem 1.4rem; }
    .brand { flex: 1 1 70%; }
    .nav-toggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 46px; height: 42px; padding: 0 10px; background: transparent; border: 1px solid var(--brass); cursor: pointer; }
    .nav-toggle span { display: block; height: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
    .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
    .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    .primary-nav { display: none; flex-basis: 100%; }
    .primary-nav.is-open { display: block; }
    .nav-list { flex-direction: column; gap: 0; border-top: 1px solid var(--brass); }
    .nav-list a { display: block; padding: .7rem 0; border-bottom: 1px dashed rgba(122, 90, 58, .4); }

    .atlas-arches { width: 60%; }
    .atlas-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }
    .atlas-leaf, .atlas-leaf--2, .atlas-leaf--4 { margin: 0; }
    .atlas-leaf--3 .leaf-paper { padding-bottom: 2.4rem; }
    .atlas-leaf--5 { grid-column: 1 / -1; width: 60%; justify-self: center; }

    .facade-layout { grid-template-columns: minmax(0, 1fr); }
    .facade-legend { border-left: 0; border-top: 1px solid rgba(217, 226, 232, .45); padding: 1.2rem 0 0; }
    .legend-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.6rem; }
    .legend-list dt { margin-top: .7rem; }

    .card-grid--journal { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
    .card-grid--journal .card:nth-child(n) { margin-top: 0; }

    .front-pair { grid-template-columns: minmax(0, 1fr); gap: 1rem; }

    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); gap: 2.6rem; }
    .layout-single .content-area { width: 100%; }
    .colophon-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
}

@media (max-width: 600px) {
    body { font-size: 1.05rem; }
    .sheet { margin: .4rem; }
    .masthead { padding: .6rem .6rem 0; }
    .masthead-plate { padding: 1rem 1.1rem; outline-offset: -6px; }
    .brand { gap: .7rem; }
    .brand-svg { width: 44px; height: 58px; }
    .brand-name { font-size: .92rem; }
    .brand-tagline { font-size: .85rem; }
    .front { padding: 1.8rem 0 2.4rem; }
    .front-section { padding: 1.6rem 0; }
    .sec-head { flex-wrap: wrap; }
    .atlas-arches { display: none; }
    .atlas-strip { grid-template-columns: minmax(0, 1fr); }
    .atlas-leaf--5 { width: auto; }
    .leaf-paper { padding: 1.4rem 1.1rem 2.2rem; }
    .chalk-label { font-size: .78rem; }
    .legend-list { grid-template-columns: minmax(0, 1fr); }
    .card-grid--journal { grid-template-columns: minmax(0, 1fr); }
    .card-grid--journal .card:nth-child(n) { transform: none; }
    .cut-layout { grid-template-columns: 2.4rem minmax(0, 1fr); }
    .cut-scale span { font-size: .62rem; padding-right: .5rem; }
    .cut-label { font-size: .58rem; letter-spacing: .03em; }
    .cut-note { font-size: .66rem; }
    .ledger { margin-right: 1.8rem; }
    .ledger-item summary { padding: .85rem 1rem; }
    .ledger-item[open] .ledger-num { font-size: 3rem; }
    .ledger-q { font-size: 1.05rem; }
    .ledger-item[open] .ledger-q { font-size: 1.12rem; }
    .ledger-a { padding: 0 1rem 1rem 1rem; }
    .post-navigation .nav-links { grid-template-columns: minmax(0, 1fr); }
    .post-navigation .nav-next { grid-column: 1; }
    .colophon-cols { grid-template-columns: minmax(0, 1fr); }
    .cookie-banner { flex-direction: column; align-items: stretch; padding: 1rem 1.1rem; left: .5rem; right: .5rem; bottom: .5rem; }
    .cookie-accept { text-align: center; }
    .entry-content .alignleft, .entry-content .alignright { float: none; margin: 1em 0; }
    .notes-list .children { margin-left: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}
