/*
Theme Name: dds_intelligentpipelinesolution.com
Theme URI: https://intelligentpipelinesolution.com/
Author: Rajesh Iyer
Description: Field-journal theme for an educational hub on water, gas and sewer connections in Indian residential property. Tracing-paper grid, ink-blue sections, copper pipework.
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: ipsnet
*/

/* ---------- Fonts (bundled, Apache 2.0 / OFL) ---------- */
@font-face { font-family: "Ips Slab"; src: url("fonts/slab-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Ips Slab"; src: url("fonts/slab-800.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Ips Cond"; src: url("fonts/cond-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Ips Cond"; src: url("fonts/cond-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Ips Cond"; src: url("fonts/cond-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Ips Mono"; src: url("fonts/mono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Ips Mono"; src: url("fonts/mono-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
    --paper: #E8E4D5;
    --paper-hi: #EFECE1;
    --paper-lo: #DCD7C5;
    --grid: #B9B29A;
    --ink-bg: #12263A;
    --ink-bg-2: #1A3249;
    --map-bg: #284663;
    --ink: #1C2A33;
    --muted: #6B7A6A;
    --copper: #B87333;
    --copper-dk: #8E5826;
    --copper-lt: #D2934F;
    --signal: #E4572E;
    --sewer: #3C83C4;
    --line: #2E4A5A;
    --light: #E8E4D5;
    --light-dim: #B8C2C9;
    --f-head: "Ips Slab", "Roboto Slab", "Rockwell", Georgia, serif;
    --f-body: "Ips Cond", "Roboto Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
    --f-mono: "Ips Mono", "JetBrains Mono", "Consolas", "Courier New", monospace;
}

/* ---------- 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;
    color: var(--ink);
    background-color: var(--paper);
    background-image:
        linear-gradient(rgba(185, 178, 154, .42) 1px, transparent 1px),
        linear-gradient(90deg, rgba(185, 178, 154, .42) 1px, transparent 1px),
        linear-gradient(rgba(185, 178, 154, .65) 1px, transparent 1px),
        linear-gradient(90deg, rgba(185, 178, 154, .65) 1px, transparent 1px);
    background-size: 23px 23px, 23px 23px, 115px 115px, 115px 115px;
    font-family: var(--f-body);
    font-size: 1.0625rem;
    line-height: 1.6;
    overflow-wrap: break-word;
    hyphens: auto;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--line); text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5, h6 {
    font-family: var(--f-head);
    font-weight: 800;
    color: var(--ink);
    line-height: 1.15;
    margin: 1.4em 0 .55em;
    overflow-wrap: break-word;
    hyphens: manual;
}
button, input, textarea, select { font: inherit; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}
.skip {
    position: absolute; left: 1rem; top: -4rem; z-index: 100;
    background: var(--copper); color: var(--ink-bg); padding: .6rem 1rem; font-weight: 700;
}
.skip:focus { top: 1rem; }

/* Links with marker square (underline + small square) */
.entry a, .crumbs a, .pagehead__intro a, .lost__text a {
    color: var(--line);
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 100% 1px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    padding-bottom: 1px;
}
.entry a::after {
    content: "";
    display: inline-block;
    width: 5px; height: 5px;
    margin-left: 3px;
    vertical-align: middle;
    background: var(--copper);
}
.entry a:hover, .crumbs a:hover { color: var(--copper-dk); }

/* ---------- Sheet frame (single width container) ---------- */
.sheet {
    width: min(97%, 1440px);
    margin-inline: auto;
    border-left: 2px solid var(--line);
    border-right: 2px solid var(--line);
    background-color: rgba(232, 228, 213, .55);
}
.wrap85 { width: 85%; margin-left: auto; margin-right: auto; }
.wrapline { width: 92%; margin-left: auto; margin-right: auto; padding: 1.4rem 0 3.5rem; }

/* ---------- Stamp buttons ---------- */
.stamp {
    display: inline-block;
    position: relative;
    padding: .62rem 1.35rem .6rem 1.15rem;
    background: var(--copper);
    color: var(--ink-bg);
    font-family: var(--f-body);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: .02em;
    line-height: 1.2;
    border: 4px double var(--ink-bg);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0 100%);
    cursor: pointer;
    text-align: center;
    transition: background-color .15s, color .15s, transform .15s;
}
.stamp:hover, .stamp:focus-visible {
    background: var(--ink-bg);
    color: var(--copper-lt);
    border-color: var(--copper);
    transform: translate(2px, 2px);
}
.stamp--small { padding: .42rem .9rem .4rem .8rem; font-size: .9rem; border-width: 3px; }

/* ---------- Header ---------- */
.masthead {
    background: var(--paper);
    border-top: 2px solid var(--line);
    border-bottom: 2px solid var(--line);
}
.masthead__in {
    width: 92%;
    margin: 0 auto;
    padding: 1.3rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem 2.5rem;
    flex-wrap: wrap;
}
.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1 1 520px;
    min-width: 0;
    color: var(--ink);
}
.brand__mark { flex: 0 0 auto; }
.brand__svg, .brand-logo { width: 74px; height: 74px; object-fit: contain; }
.brand__name, .brand__desc, .opening__lead, .opening__title, .basement__copy { hyphens: manual; }
.brand__text { display: flex; flex-direction: column; min-width: 0; gap: .3rem; }
.brand__name {
    font-family: var(--f-head);
    font-weight: 800;
    font-size: clamp(1rem, 1.35vw, 1.3rem);
    line-height: 1.2;
    color: var(--ink);
}
.brand__desc {
    font-family: var(--f-mono);
    font-size: .72rem;
    line-height: 1.45;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.brand:hover .brand__name { color: var(--copper-dk); }

.topnav { flex: 0 1 auto; min-width: 0; }
.topnav__list {
    list-style: none;
    margin: 0;
    padding: 0 0 .45rem;
    display: flex;
    flex-wrap: wrap;
    border-bottom: 2px solid var(--line);
}
.topnav__list li { position: relative; }
.topnav__list li + li::before {
    content: "";
    position: absolute;
    left: 0; top: .2rem; bottom: .2rem;
    width: 2px;
    background: var(--line);
}
.topnav__list a {
    display: block;
    padding: .25rem 1.05rem;
    font-size: 1.12rem;
    font-weight: 500;
    color: var(--ink);
    white-space: normal;
}
.topnav__list a:hover, .topnav__list .current-menu-item > a { color: var(--copper-dk); }
.topnav__list .current-menu-item > a { box-shadow: inset 0 -3px 0 var(--copper); }
.navtoggle {
    display: none;
    align-items: center;
    gap: .55rem;
    background: var(--paper-hi);
    border: 2px solid var(--line);
    color: var(--ink);
    padding: .45rem .8rem;
    cursor: pointer;
    font-family: var(--f-mono);
    font-size: .85rem;
}
.navtoggle__bars, .navtoggle__bars::before, .navtoggle__bars::after {
    display: block;
    width: 20px; height: 2px;
    background: var(--ink);
    position: relative;
}
.navtoggle__bars::before, .navtoggle__bars::after { content: ""; position: absolute; left: 0; }
.navtoggle__bars::before { top: -6px; }
.navtoggle__bars::after { top: 6px; }

/* ---------- Opening (front hero) ---------- */
.opening {
    background-color: var(--ink-bg);
    background-image:
        linear-gradient(rgba(232, 228, 213, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(232, 228, 213, .04) 1px, transparent 1px);
    background-size: 28px 28px;
    color: var(--light);
    border-bottom: 2px solid var(--line);
}
.opening__in {
    width: 85%;
    margin: 0 auto;
    padding: 3.5rem 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: 2.5rem;
    align-items: center;
}
.opening__copy { min-width: 0; }
.opening__kicker {
    font-family: var(--f-mono);
    font-size: .78rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--copper-lt);
    margin-bottom: 1rem;
}
.opening__title {
    margin: 0 0 1.4rem;
    color: var(--light);
    font-size: clamp(2.3rem, 4.6vw, 4.6rem);
    line-height: 1.03;
    letter-spacing: -.01em;
}
.opening__lead {
    font-family: var(--f-mono);
    font-size: clamp(1rem, 1.35vw, 1.2rem);
    line-height: 1.55;
    color: var(--light);
    max-width: 34em;
    margin-bottom: 1.8rem;
}
.opening__plan {
    position: relative;
    margin: 0;
    min-width: 0;
    container-type: inline-size;
}
.opening__plan img {
    width: 100%;
    aspect-ratio: 1280 / 1100;
    object-fit: cover;
    -webkit-mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 70%, transparent 100%);
    mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 70%, transparent 100%);
}
.opening__tag {
    position: absolute;
    font-family: var(--f-body);
    font-weight: 700;
    font-size: clamp(.8rem, 4.2cqw, 1.6rem);
    line-height: 1;
    padding: .1em .3em;
    background: var(--ink-bg);
}
.opening__tag--gas { left: 44.5%; top: 13.6%; color: var(--signal); }
.opening__tag--water { left: 29%; top: 76.4%; color: var(--signal); }
.opening__tag--sewer { left: 58%; top: 77.4%; color: #4A93D6; }

/* ---------- Page-long pipeline decoration ---------- */
.pipeline { position: relative; }
.pipeline::before, .pipeline::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 7.5rem;
    width: 11px;
    pointer-events: none;
    z-index: 1;
}
.pipeline::before {
    left: calc(0.87% - 5.5px);
    background: linear-gradient(90deg, #7A4A1E, var(--copper-lt) 38%, var(--copper) 62%, #7A4A1E);
    border-radius: 0 0 0 14px;
}
.pipeline::after {
    right: calc(1.45% - 5.5px);
    background: linear-gradient(90deg, #A23A17, #F07450 38%, var(--signal) 62%, #A23A17);
}
.pipeline__flange {
    position: absolute;
    width: 21px;
    height: 10px;
    border: 2px solid var(--ink);
    z-index: 2;
    pointer-events: none;
}
.pipeline__flange--l1, .pipeline__flange--l2 { left: calc(0.87% - 10.5px); background: var(--copper); }
.pipeline__flange--r1, .pipeline__flange--r2 { right: calc(1.45% - 10.5px); background: var(--signal); }
.pipeline__flange--l1, .pipeline__flange--r1 { top: 34%; }
.pipeline__flange--l2, .pipeline__flange--r2 { top: 71%; }

/* ---------- Section titles ---------- */
.sheet-title {
    margin: 0 0 1.4rem;
    font-size: clamp(1.8rem, 3.1vw, 2.85rem);
    color: var(--ink);
}
.sheet-title--light { color: var(--light); }

/* ---------- Block 1: Connection cutaway ---------- */
.cutaway {
    position: relative;
    padding: 2.6rem 0 0;
    border-bottom: 2px solid var(--line);
    background-image:
        linear-gradient(rgba(185, 178, 154, .5) 1px, transparent 1px),
        linear-gradient(90deg, rgba(185, 178, 154, .5) 1px, transparent 1px);
    background-size: 23px 23px;
}
.cutaway__fig {
    position: relative;
    margin: 0;
    container-type: inline-size;
    z-index: 2;
}
.cutaway__fig img { width: 100%; aspect-ratio: 2211 / 420; object-fit: cover; }
.cutaway__tags { list-style: none; margin: 0; padding: 0; }
.cutaway__tag {
    position: absolute;
    top: 58.9%;
    transform: translate(-50%, -50%);
    background: var(--paper-hi);
    border: 2px solid var(--ink);
    padding: .38em .85em;
    font-weight: 700;
    font-size: clamp(.62rem, 1.12cqw, 1.05rem);
    line-height: 1.15;
    white-space: nowrap;
    color: var(--ink);
}
.cutaway__tag--a { left: 31.3%; }
.cutaway__tag--b { left: 48.8%; }
.cutaway__tag--c { left: 66.1%; }
.cutaway__note {
    margin: -.4rem 0 1.4rem;
    max-width: 52em;
    font-family: var(--f-mono);
    font-size: .88rem;
    line-height: 1.7;
    color: var(--muted);
}

/* ---------- Block 2: Three checks ---------- */
.checks { padding: 3rem 0 2.2rem; }
.checks__cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
}
.logpage {
    position: relative;
    min-width: 0;
    padding: 0 2rem 1.4rem;
}
.logpage + .logpage { border-left: 2px dashed var(--line); }
.logpage:first-child { padding-left: 0; }
.logpage:last-child { padding-right: 0; }
.logpage--gas { margin-top: 2.4rem; }
.logpage--sewer { margin-top: 1.1rem; }
.logpage__icon { width: 96px; height: auto; display: block; margin-bottom: .6rem; }
.logpage__title { margin: 0 0 .5rem; font-size: clamp(1.6rem, 2.4vw, 2.3rem); }
.logpage--water .logpage__title { color: var(--copper); }
.logpage--gas .logpage__title { color: var(--signal); }
.logpage--sewer .logpage__title { color: var(--sewer); }
.logpage__text { font-size: 1rem; color: var(--ink); margin-bottom: 1rem; }
.ticklist { list-style: none; margin: 0; padding: 0; }
.ticklist li {
    position: relative;
    padding: .28rem 0 .28rem 2rem;
    font-size: 1.12rem;
    font-weight: 500;
    line-height: 1.35;
}
.ticklist li::before {
    content: "";
    position: absolute;
    left: 0; top: .42rem;
    width: 17px; height: 17px;
    border: 2px solid var(--ink);
    background: var(--paper-hi);
}
.ticklist li.is-ticked::after {
    content: "";
    position: absolute;
    left: 2px; top: calc(.42rem + 2px);
    width: 13px; height: 13px;
    background:
        linear-gradient(45deg, transparent 42%, var(--copper) 42%, var(--copper) 58%, transparent 58%),
        linear-gradient(-45deg, transparent 42%, var(--copper) 42%, var(--copper) 58%, transparent 58%);
}

/* ---------- Recent posts ---------- */
.recent { padding: 1.5rem 0 3.2rem; border-bottom: 2px solid var(--line); }
.recent__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 3.1fr);
    gap: 2.2rem;
    align-items: start;
}
.recent__side { min-width: 0; }
.recent__title { font-size: clamp(1.8rem, 2.9vw, 2.6rem); }
.recent__riser { width: 100%; max-width: 330px; aspect-ratio: 660 / 580; object-fit: contain; }
.recent__cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.6rem;
    min-width: 0;
}

/* ---------- Cards ---------- */
.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--paper-hi);
    border: 2px solid var(--ink);
    padding: .85rem .9rem 1rem;
    transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translate(-3px, -3px); box-shadow: 5px 5px 0 var(--ink); }
.card-thumb {
    margin: -10px -4px .9rem;
    border: 2px solid var(--ink);
    background: var(--paper);
    overflow: hidden;
}
.card-thumb a { display: block; }
.card-thumb img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.recent__cards .card:nth-child(n+4) { display: none; }
.card-body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.card-title {
    margin: 0 0 .45rem;
    font-size: 1.22rem;
    line-height: 1.22;
}
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--copper-dk); }
.card-excerpt { font-size: .98rem; line-height: 1.45; color: var(--ink); }
.card-excerpt p { margin: 0 0 0.5em; background: none; }
.card-foot {
    margin-top: auto;
    padding-top: .8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    flex-wrap: wrap;
}
.card-date, .datestamp {
    font-family: var(--f-mono);
    font-size: .74rem;
    letter-spacing: .04em;
    color: var(--line);
    border: 1.5px solid var(--line);
    padding: .18rem .45rem;
    transform: rotate(-2deg);
    display: inline-block;
}
.empty-note { font-family: var(--f-mono); color: var(--muted); }

/* ---------- Block 3: City map ---------- */
.citymap {
    position: relative;
    z-index: 2;
    background: var(--map-bg);
    color: var(--light);
    padding: 2.8rem 0;
    border-bottom: 2px solid var(--line);
}
.citymap__grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 2.4rem;
    align-items: center;
}
.citymap__left { min-width: 0; }
.citymap__fig { position: relative; margin: 0; container-type: inline-size; }
.citymap__fig img {
    width: 100%;
    aspect-ratio: 1130 / 452;
    object-fit: cover;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.citymap__dot {
    position: absolute;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--copper-lt);
    border: 3px solid var(--light);
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 4px rgba(18, 38, 58, .55);
}
.citymap__dot--intake { left: 19.5%; top: 59.7%; }
.citymap__dot--grs { left: 47.6%; top: 52.7%; }
.citymap__dot--pump { left: 77.2%; top: 36.3%; }
.citymap__label {
    position: absolute;
    transform: translateX(-50%);
    font-weight: 700;
    font-size: clamp(.72rem, 3.4cqw, 1.3rem);
    line-height: 1;
    color: var(--light);
    background: rgba(40, 70, 99, .92);
    padding: .15em .35em;
    white-space: nowrap;
}
.citymap__label--intake { left: 19.5%; top: 66%; }
.citymap__label--grs { left: 47.6%; top: 59%; }
.citymap__label--pump { left: 77.2%; top: 21%; }
.citymap__aside {
    min-width: 0;
    border-left: 2px solid rgba(232, 228, 213, .35);
    padding-left: 1.8rem;
}
.citymap__subtitle { margin: 0 0 .6rem; color: var(--light); font-size: clamp(1.4rem, 2.2vw, 2rem); }
.citymap__aside p { color: var(--light); font-size: 1.12rem; }
.citymap__steps {
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
    counter-reset: wstep;
    font-family: var(--f-mono);
    font-size: .84rem;
    color: var(--light-dim);
}
.citymap__steps li {
    counter-increment: wstep;
    position: relative;
    padding: .38rem 0 .38rem 2.2rem;
    border-bottom: 1px dashed rgba(232, 228, 213, .25);
}
.citymap__steps li::before {
    content: "0" counter(wstep);
    position: absolute;
    left: 0;
    color: var(--copper-lt);
}

/* ---------- Block 4: Who to ask ---------- */
.whoask { padding: 3.2rem 0 3.8rem; }
.whoask__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 2.6rem;
    align-items: center;
}
.whoask__intro { min-width: 0; }
.whoask__intro p { font-size: 1.15rem; max-width: 28em; }
.registry {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 2px solid var(--ink);
    background: var(--paper-hi);
    min-width: 0;
}
.registry__row {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: 0 .9rem 0 0;
    min-height: 3rem;
}
.registry__row + .registry__row { border-top: 1.5px solid var(--line); }
.registry__num {
    flex: 0 0 2.8rem;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--copper);
    color: var(--light);
    font-family: var(--f-head);
    font-weight: 800;
    font-size: 1.2rem;
    border-right: 2px solid var(--ink);
}
.registry__name { flex: 1; min-width: 0; font-weight: 500; font-size: 1.08rem; padding: .55rem 0; }
.registry__icon { flex: 0 0 22px; width: 22px; height: 22px; color: var(--line); }
.registry__row:hover { background: var(--paper); }
.registry__row:hover .registry__icon { color: var(--copper-dk); }

/* ---------- Inner pages ---------- */
.crumbs {
    font-family: var(--f-mono);
    font-size: .78rem;
    color: var(--muted);
    margin: 0 0 1.6rem;
    padding: .55rem .9rem;
    border: 1.5px solid var(--line);
    background: var(--paper-hi);
    display: inline-block;
    max-width: 100%;
}
.crumbs__sep { color: var(--copper); margin: 0 .2rem; }
.layout-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 67fr) minmax(0, 27fr);
    column-gap: 6%;
    align-items: start;
}
.layout-single { display: block; }
.layout-single .content-area { width: 85%; margin-left: auto; margin-right: auto; }
.content-area { min-width: 0; }

.pagehead { margin-bottom: 1.8rem; padding-bottom: 1.2rem; border-bottom: 2px solid var(--line); }
.pagehead__kicker {
    font-family: var(--f-mono);
    font-size: .76rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--copper-dk);
    margin: 0 0 .4rem;
}
.pagehead__title { margin: 0 0 .6rem; font-size: clamp(2rem, 4vw, 3.2rem); }
.pagehead__meta { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin: .4rem 0 0; }
.pagehead__cat {
    font-family: var(--f-mono);
    font-size: .76rem;
    background: var(--ink-bg);
    color: var(--light);
    padding: .22rem .55rem;
}
.pagehead__cat:hover { background: var(--copper); color: var(--ink-bg); }
.pagehead__intro { margin-top: .8rem; color: var(--ink); }

.cardgrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 1.6rem;
    padding-top: .6rem;
}
.no-aside .cardgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.entry-sheet {
    background: var(--paper-hi);
    border: 2px solid var(--ink);
    padding: 2rem 2.2rem 2.2rem;
}
.entry-cover { margin: 0 0 1.6rem; border: 2px solid var(--ink); }
.entry-cover img { width: 100%; height: auto; }
.entry { font-size: 1.1rem; line-height: 1.7; }
.entry > *:first-child { margin-top: 0; }
.entry h2 { font-size: 1.8rem; padding-top: .4rem; border-top: 2px solid var(--line); }
.entry h3 { font-size: 1.4rem; }
.entry h4 { font-size: 1.2rem; }
.entry ul, .entry ol { padding-left: 1.4rem; margin: 0 0 1.2em; }
.entry ul { list-style: none; padding-left: 1.4rem; }
.entry ul li { position: relative; margin-bottom: .35em; }
.entry ul li::before {
    content: "";
    position: absolute;
    left: -1.2rem; top: .62em;
    width: 8px; height: 8px;
    background: var(--copper);
    border: 1.5px solid var(--ink);
}
.entry ol li { margin-bottom: .35em; }
.entry ol li::marker { font-family: var(--f-mono); color: var(--copper-dk); font-weight: 500; }
.entry blockquote {
    margin: 1.6em 0;
    padding: 1.2rem 1.6rem 1.2rem 1.8rem;
    background: var(--ink-bg);
    color: var(--light);
    border-left: 8px solid var(--copper);
    font-family: var(--f-head);
    font-weight: 700;
    font-size: 1.2rem;
    line-height: 1.45;
}
.entry blockquote p:last-child { margin-bottom: 0; }
.entry blockquote a { color: var(--copper-lt); }
.entry blockquote cite { display: block; margin-top: .6rem; font-family: var(--f-mono); font-size: .8rem; font-style: normal; color: var(--light-dim); }
.entry .wp-block-table, .entry .table-scroll { overflow-x: auto; }
.entry table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 1rem; }
.entry table, .entry th, .entry td { border: 1.5px solid var(--line); }
.entry th, .entry td { padding: .55rem .75rem; text-align: left; vertical-align: top; }
.entry th { background: var(--ink-bg); color: var(--light); font-weight: 700; }
.entry tr:nth-child(even) td { background: var(--paper); }
.entry img { border: 2px solid var(--ink); }
.entry figure { margin: 1.4em 0; }
.entry figcaption { font-family: var(--f-mono); font-size: .78rem; color: var(--muted); margin-top: .45rem; }
.entry pre {
    background: var(--ink-bg);
    color: var(--light);
    padding: 1rem 1.2rem;
    overflow-x: auto;
    font-family: var(--f-mono);
    font-size: .88rem;
}
.entry code { font-family: var(--f-mono); font-size: .9em; background: var(--paper); padding: .05em .3em; }
.entry pre code { background: none; padding: 0; }
.entry hr { border: 0; border-top: 2px dashed var(--line); margin: 2em 0; }
.entry-tags { margin: 1.6rem 0 0; display: flex; gap: .5rem; flex-wrap: wrap; }
.entry-tags a {
    font-family: var(--f-mono);
    font-size: .78rem;
    border: 1.5px solid var(--line);
    padding: .2rem .5rem;
    color: var(--line);
}
.entry-tags a:hover { background: var(--copper); color: var(--ink-bg); }
.alignleft { float: left; margin: .3em 1.4em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.4em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text { font-family: var(--f-mono); font-size: .78rem; color: var(--muted); }

.postnav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 2rem 0 0;
}
.postnav__link {
    display: block;
    border: 2px solid var(--ink);
    background: var(--paper-hi);
    padding: .9rem 1rem;
    color: var(--ink);
    font-weight: 700;
    min-width: 0;
}
.postnav__link span {
    display: block;
    font-family: var(--f-mono);
    font-size: .74rem;
    font-weight: 400;
    color: var(--copper-dk);
    margin-bottom: .25rem;
}
.postnav__link--next { grid-column: 2; text-align: right; }
.postnav__link:hover { background: var(--ink-bg); color: var(--light); }

/* ---------- Pagination (type => plain) ---------- */
.pager {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin: 2.4rem 0 0;
    align-items: center;
}
.pager .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.6rem;
    height: 2.6rem;
    padding: 0 .75rem;
    border: 2px solid var(--ink);
    background: var(--paper-hi);
    color: var(--ink);
    font-family: var(--f-mono);
    font-size: .9rem;
}
.pager a.page-numbers:hover { background: var(--ink-bg); color: var(--light); }
.pager .page-numbers.current { background: var(--copper); color: var(--ink-bg); font-weight: 500; }
.pager .page-numbers.dots { border: 0; background: none; min-width: 1.4rem; padding: 0; }
.pager .post-page-numbers { display: inline-flex; padding: .2rem .6rem; border: 2px solid var(--ink); }

/* ---------- Sidebar & widgets ---------- */
.sidebar {
    min-width: 0;
    background: var(--paper-lo);
    border: 2px solid var(--ink);
    padding: 1.4rem 1.4rem .6rem;
}
.ipw { margin-bottom: 1.6rem; }
.ipw ul { list-style: none; margin: 0; padding: 0; }
.ipw li { padding: .45rem 0; }
.sidebar .ipw { color: var(--ink); }
.sidebar .ipw__title {
    margin: 0 0 .7rem;
    font-size: 1.25rem;
    color: var(--ink);
    padding-bottom: .4rem;
    border-bottom: 2px solid var(--copper);
}
.sidebar .ipw li { border-bottom: 1px dashed var(--line); }
.sidebar .ipw a { color: var(--ink); font-weight: 500; }
.sidebar .ipw a:hover { color: var(--copper-dk); }
.sidebar .post-date { display: block; font-family: var(--f-mono); font-size: .74rem; color: var(--muted); }
.sidebar .seek { margin-top: .2rem; }

/* ---------- Search form ---------- */
.seek { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1rem 0 1.4rem; }
.seek__field {
    flex: 1 1 220px;
    min-width: 0;
    padding: .55rem .8rem;
    border: 2px solid var(--ink);
    background: var(--paper-hi);
    color: var(--ink);
    border-radius: 0;
}
.seek__field::placeholder { color: var(--muted); }

/* ---------- 404 ---------- */
.lost { text-align: left; padding: 2rem 0; }
.lost__code {
    font-family: var(--f-head);
    font-weight: 800;
    font-size: clamp(5rem, 16vw, 10rem);
    line-height: 1;
    margin: 0 0 .5rem;
    color: transparent;
    -webkit-text-stroke: 2px var(--line);
}
.lost__text { font-size: 1.15rem; max-width: 36em; }

/* ---------- Comments ---------- */
.talk { margin-top: 2.4rem; }
.talk__title, .comment-reply-title { font-size: 1.6rem; margin: 0 0 1rem; }
.talk__list, .talk__list .children { list-style: none; margin: 0; padding: 0; }
.talk__list .children { padding-left: 1.6rem; border-left: 2px dashed var(--line); margin-left: .6rem; }
.note__body {
    border: 2px solid var(--ink);
    background: var(--paper-hi);
    padding: 1rem 1.2rem;
    margin-bottom: 1rem;
}
.note__head { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: .5rem; }
.note__avatar { border: 2px solid var(--ink); }
.note__author { font-weight: 700; }
.note__date { font-family: var(--f-mono); font-size: .74rem; color: var(--muted); }
.note__wait { font-family: var(--f-mono); font-size: .8rem; color: var(--signal); }
.note__reply a { font-family: var(--f-mono); font-size: .8rem; color: var(--copper-dk); }
.comment-respond {
    border: 2px solid var(--ink);
    background: var(--paper-lo);
    padding: 1.4rem 1.5rem;
    margin-top: 1.4rem;
}
.comment-form label { display: block; font-weight: 700; margin-bottom: .25rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
    width: 100%;
    padding: .55rem .75rem;
    border: 2px solid var(--ink);
    background: var(--paper-hi);
    color: var(--ink);
    border-radius: 0;
}
.comment-form-cookies-consent { display: flex; gap: .5rem; align-items: flex-start; }
.comment-form-cookies-consent label { font-weight: 400; font-size: .92rem; }
.comment-form .submit {
    background: var(--copper);
    color: var(--ink-bg);
    border: 4px double var(--ink-bg);
    padding: .6rem 1.3rem;
    font-weight: 700;
    cursor: pointer;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0 100%);
}
.comment-form .submit:hover { background: var(--ink-bg); color: var(--copper-lt); }
.comment-notes, .logged-in-as { font-family: var(--f-mono); font-size: .8rem; color: var(--muted); }
.logged-in-as a { color: var(--line); }
.comments-pagination, .comment-navigation { margin: 1rem 0; font-family: var(--f-mono); }
.comment-navigation .nav-links { display: flex; justify-content: space-between; gap: 1rem; }

/* ---------- Footer ---------- */
.basement {
    background: var(--ink-bg);
    color: var(--light);
    border-top: 2px solid var(--line);
}
.basement__in { width: 92%; margin: 0 auto; padding: 2.8rem 0 1.4rem; }
.basement__cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.4rem;
}
.basement__col { min-width: 0; }
.basement .ipw { color: var(--light); }
.basement .ipw__title {
    margin: 0 0 .7rem;
    font-size: 1.35rem;
    color: var(--light);
}
.basement .ipw p, .basement .ipw .textwidget { color: var(--light-dim); font-size: 1.02rem; line-height: 1.55; }
.basement .ipw li { padding: .12rem 0; }
.basement .ipw a { color: var(--light); }
.basement .ipw a:hover { color: var(--copper-lt); }
.basement .ipw .post-date { color: var(--light-dim); font-family: var(--f-mono); font-size: .74rem; display: block; }
.basement .seek__field { background: var(--ink-bg-2); color: var(--light); border-color: var(--light-dim); }
.basement .seek__field::placeholder { color: var(--light-dim); }
.basement__copy {
    margin: 2.2rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(232, 228, 213, .3);
    font-size: .95rem;
    color: var(--light-dim);
}

/* ---------- Cookie banner ---------- */
.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 90;
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem 1.4rem;
    flex-wrap: wrap;
    background: var(--ink-bg);
    color: var(--light);
    border: 2px solid var(--copper);
    box-shadow: 6px 6px 0 var(--copper-dk);
    padding: 1rem 1.3rem;
}
.cookie-banner__text { margin: 0; flex: 1 1 320px; font-size: .95rem; color: var(--light); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
    .pipeline::before, .pipeline::after, .pipeline__flange { display: none; }
}
@media (max-width: 960px) {
    .sheet { width: 100%; border-left: 0; border-right: 0; }
    .wrap85, .opening__in { width: 90%; }
    .masthead__in { flex-wrap: wrap; }
    .brand { flex: 1 1 100%; order: 1; }
    .navtoggle { order: 2; }
    .topnav { order: 3; }
    .brand__name { font-size: 1rem; }
    .navtoggle { display: inline-flex; }
    .topnav { flex: 1 0 100%; display: none; }
    .topnav.is-open { display: block; }
    .topnav__list { flex-direction: column; border-bottom: 0; border-top: 2px solid var(--line); padding: .4rem 0 0; }
    .topnav__list li + li::before { display: none; }
    .topnav__list li { border-bottom: 1px dashed var(--line); }
    .topnav__list a { padding: .6rem .2rem; }
    .opening__in { grid-template-columns: minmax(0, 1fr); padding: 2.6rem 0; }
    .checks__cols { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
    .logpage, .logpage:first-child, .logpage:last-child { padding: 0 0 1.4rem; margin-top: 0; }
    .logpage + .logpage { border-left: 0; border-top: 2px dashed var(--line); padding-top: 1.4rem; }
    .recent__grid { grid-template-columns: minmax(0, 1fr); }
    .recent__riser { display: none; }
    .recent__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .citymap__grid { grid-template-columns: minmax(0, 1fr); }
    .citymap__aside { border-left: 0; padding-left: 0; border-top: 2px solid rgba(232, 228, 213, .35); padding-top: 1.4rem; }
    .whoask__grid { grid-template-columns: minmax(0, 1fr); }
    .layout-with-sidebar { grid-template-columns: minmax(0, 1fr); row-gap: 2.4rem; }
    .layout-single .content-area { width: 100%; }
    .no-aside .cardgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .basement__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .cutaway__tags { display: flex; flex-wrap: wrap; gap: .5rem; width: 90%; margin: 1rem auto 0; }
    .cutaway__tag { position: static; transform: none; font-size: .88rem; white-space: normal; }
}
@media (max-width: 600px) {
    body { font-size: 1rem; }
    .wrap85, .opening__in, .wrapline, .masthead__in, .basement__in { width: 90%; }
    .brand__svg, .brand-logo { width: 56px; height: 56px; }
    .brand__desc { -webkit-line-clamp: 3; }
    .opening__in { padding: 2rem 0; }
    .cutaway, .checks { padding-top: 2rem; }
    .recent__cards, .cardgrid, .no-aside .cardgrid { grid-template-columns: minmax(0, 1fr); }
    .card-thumb { margin: -8px -3px .8rem; }
    .entry-sheet { padding: 1.3rem 1.1rem 1.5rem; }
    .entry blockquote { padding: 1rem 1.1rem 1rem 1.2rem; }
    .postnav { grid-template-columns: minmax(0, 1fr); }
    .postnav__link--next { grid-column: 1; }
    .basement__cols { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
    .registry__name { font-size: 1rem; }
    .cookie-banner { left: .6rem; right: .6rem; bottom: .6rem; padding: .9rem 1rem; }
    .comment-respond { padding: 1.1rem 1rem; }
    .sidebar { padding: 1.2rem 1.1rem .4rem; }
}
