/*
Theme Name: PanicAcid
Description: A matte-black circuit board: gold pads, white silkscreen lettering, one lit LED. Photo-led. Barlow, Barlow Condensed and JetBrains Mono (SIL Open Font Licence).
Author: PanicAcid
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: panicacid
*/

@font-face { font-family: "Barlow"; src: url("fonts/Barlow-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/Barlow-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/Barlow-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("fonts/BarlowCondensed-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("fonts/BarlowCondensed-800.woff2") format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/JetBrainsMono-400-600.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }

:root {
  --mask: #0c0e0d;          /* matte black solder mask */
  --mask-2: #141716;        /* raised areas */
  --mask-3: #1c201f;
  --silk: #f1efe6;          /* silkscreen white */
  --silk-dim: #a9aba3;
  --copper: #e2b354;        /* gold-plated pads */
  --led: #b6ff3c;           /* the one lit LED */
  --line: rgba(241, 239, 230, .14);
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --sans: "Barlow", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", Consolas, Menlo, monospace;
  --wrap: 1180px;
  --gutter: 28px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--mask); color: var(--silk); font: 400 18px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
main { flex: 1; }
img, video, iframe { max-width: 100%; height: auto; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote, pre { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1; text-wrap: balance; }
a { color: var(--copper); }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 10px; left: 10px; z-index: 100; width: auto; height: auto; clip: auto; padding: 10px 16px; background: var(--copper); color: var(--mask); font-weight: 600; }
:focus-visible { outline: 2px solid var(--led); outline-offset: 3px; }
::selection { background: var(--copper); color: var(--mask); }

/* ---------- Buttons ---------- */
.btn, .search-toggle, .copy-btn { transition: transform 160ms var(--ease-out), background-color 140ms ease, border-color 140ms ease, color 140ms ease; }
.btn:active, .search-toggle:active, .copy-btn:active { transform: scale(0.97); }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 22px; border: 2px solid transparent; border-radius: 4px; font: 700 19px/1.1 var(--display); letter-spacing: .05em; text-transform: uppercase; text-decoration: none; cursor: pointer; }
.btn.primary { background: var(--copper); color: var(--mask); }
.btn.ghost { border-color: var(--line); color: var(--silk); background: none; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(12, 14, 13, .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header > .wrap { display: flex; align-items: center; gap: 30px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--silk); font: 800 27px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; }
.brand svg { width: 28px; height: 28px; flex-shrink: 0; }
.site-header nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.site-header nav a, .search-toggle { padding: 8px 13px; border-radius: 4px; color: var(--silk-dim); font: 700 17px/1.2 var(--display); letter-spacing: .09em; text-transform: uppercase; text-decoration: none; }
.site-header nav a[aria-current="page"] { color: var(--silk); box-shadow: inset 0 -2px 0 var(--copper); border-radius: 0; }
.search-toggle { border: 1px solid var(--line); background: none; cursor: pointer; }
.search-panel { border-top: 1px solid var(--line); transition: opacity 150ms var(--ease-out), transform 150ms var(--ease-out); }
.search-panel[hidden] { display: none; }
.search-panel .wrap { padding-block: 16px; }
@starting-style { .search-panel { opacity: 0; transform: translateY(-4px); } }
.search-form { display: flex; gap: 10px; max-width: 560px; }
.search-form input[type="search"] { flex: 1; min-width: 0; padding: 11px 14px; border-radius: 4px; border: 1px solid var(--line); background: var(--mask-2); color: var(--silk); font: inherit; font-size: 17px; -webkit-appearance: none; appearance: none; }
.search-form input::placeholder { color: var(--silk-dim); }
.search-form input[type="search"]:focus { outline: 2px solid var(--led); outline-offset: 0; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 76px 0 88px; border-bottom: 1px solid var(--line); }
/* A field of unused pads, like the prototyping area of a board, fading out behind the text. */
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(circle, transparent 2.5px, rgba(226, 179, 84, .3) 2.5px 4.5px, transparent 5px); background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(100deg, transparent 30%, #000 90%); mask-image: linear-gradient(100deg, transparent 30%, #000 90%); }
.hero > .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(60px, 9.4vw, 132px); line-height: .9; letter-spacing: -.005em; text-transform: uppercase; }
.hero .lede { margin-top: 26px; max-width: 46ch; font-size: 22px; line-height: 1.45; color: var(--silk-dim); }
.lede:empty, .card p:empty, .feature-body > p:empty { display: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.badge { display: block; width: 100%; max-width: 380px; margin-inline: auto; transform: rotate(4deg); filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .6)); }
.badge .silk text { letter-spacing: .5px; }
.led-glow { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }

.page-head { padding: 60px 0 44px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(48px, 7vw, 88px); line-height: .95; text-transform: uppercase; }
.page-head p { margin-top: 12px; color: var(--silk-dim); }
.page-head.notfound { border-bottom: 0; padding-bottom: 110px; }
.page-head .search-form { margin-top: 26px; }

/* ---------- Bands ---------- */
.band { padding: 72px 0; }
.band + .band { padding-top: 0; }
.section-title { margin-bottom: 30px; font-size: clamp(34px, 4.2vw, 50px); letter-spacing: .01em; text-transform: uppercase; }

/* ---------- Meta ---------- */
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; font: 400 13.5px/1.5 var(--mono); color: var(--silk-dim); }
.meta a, .meta span:not(:last-child) { color: var(--copper); text-decoration: none; }

/* ---------- Photos: fiducial marks at the corners, as on a board ---------- */
.shot { position: relative; display: block; overflow: hidden; background: var(--mask-2); }
.shot img, .shot .no-photo { display: block; width: 100%; height: 100%; object-fit: cover; }
.shot .no-photo { background-image: radial-gradient(circle, transparent 2.5px, rgba(226, 179, 84, .3) 2.5px 4.5px, transparent 5px); background-size: 26px 26px; }
.shot::before, .shot::after { content: ""; position: absolute; z-index: 1; width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--copper); background: var(--mask); }
.shot::before { top: 12px; left: 12px; }
.shot::after { bottom: 12px; right: 12px; }

/* ---------- Featured post ---------- */
.feature { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 44px; align-items: center; margin-bottom: 56px; }
.feature .shot { aspect-ratio: 4 / 3; border-radius: 6px; }
.feature h3 { margin-top: 14px; font-size: clamp(34px, 3.8vw, 52px); line-height: 1; }
.feature p { margin-top: 16px; color: var(--silk-dim); }
.feature .btn { margin-top: 24px; }
.feature h3 a, .card h3 a { color: var(--silk); text-decoration: none; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px; }
.card { display: flex; flex-direction: column; background: var(--mask-2); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.card .shot { aspect-ratio: 16 / 10; }
.card-body { padding: 20px 22px 24px; }
.card h3 { margin-top: 10px; font-size: 29px; font-weight: 700; line-height: 1.05; }
.card p { margin-top: 10px; font-size: 16.5px; line-height: 1.55; color: var(--silk-dim); }
.pagination { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 40px; font-weight: 600; }

/* ---------- Topics ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px 7px 11px; border: 1px solid var(--line); border-radius: 4px; color: var(--silk); font-size: 16px; text-decoration: none; }
.chip::before { content: ""; width: 9px; height: 9px; background: var(--copper); border-radius: 1px; }
.chip span { font: 400 13px/1 var(--mono); color: var(--silk-dim); }

/* ---------- Who ---------- */
.who > .wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 64px; align-items: start; padding-block: 64px; border-top: 1px solid var(--line); }
.who blockquote { font: 700 clamp(26px, 3vw, 38px)/1.14 var(--display); letter-spacing: .005em; }
.pinout { list-style: none; padding: 0; counter-reset: pin; border-left: 2px solid var(--silk-dim); }
.pinout li { counter-increment: pin; display: flex; align-items: center; gap: 14px; padding: 9px 0 9px 16px; font: 400 15.5px/1.3 var(--mono); }
.pinout li::before { content: counter(pin); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--copper); color: var(--mask); font-weight: 600; font-size: 13px; }
.pinout li:first-child::before { border-radius: 3px; }

/* ---------- Post ---------- */
.post-head { padding: 60px 0 40px; }
.post-head h1 { margin-top: 16px; max-width: 22ch; font-size: clamp(42px, 6vw, 80px); line-height: .96; }
.page .post-head h1 { margin-top: 0; text-transform: uppercase; }
.post-head .lede { margin-top: 20px; max-width: 56ch; font-size: 22px; line-height: 1.45; color: var(--silk-dim); }
.post-head .updated { margin-top: 14px; font: 400 13.5px/1.5 var(--mono); color: var(--silk-dim); }
.layout { display: grid; grid-template-columns: minmax(0, 760px) minmax(0, 260px); justify-content: space-between; gap: 64px; align-items: start; padding-bottom: 88px; }
.layout.single-col { grid-template-columns: minmax(0, 760px); }
.side-col { position: sticky; top: 96px; display: grid; gap: 34px; font-size: 16px; }
.side-col h2 { margin-bottom: 12px; font: 700 20px/1.1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--silk-dim); }
.toc ol, .side-list ul { list-style: none; padding: 0; }
.toc ol { border-left: 2px solid var(--line); }
.toc a { display: block; margin-left: -2px; padding: 5px 0 5px 14px; border-left: 2px solid transparent; color: var(--silk-dim); line-height: 1.35; text-decoration: none; }
.toc a[aria-current="true"] { color: var(--silk); border-left-color: var(--copper); }
.side-list li { padding: 10px 0; border-top: 1px solid var(--line); }
.side-list a { display: block; color: var(--silk); font-weight: 600; line-height: 1.3; text-decoration: none; }
.side-list span { font: 400 13px/1.6 var(--mono); color: var(--silk-dim); }

.prose { font-size: 19px; line-height: 1.7; overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.2em; }
.prose h2 { margin-top: 1.9em; font-size: 40px; }
.prose h3 { margin-top: 1.6em; font-size: 29px; font-weight: 700; }
.prose h2 + *, .prose h3 + * { margin-top: .55em; }
.prose a { text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--copper); }
.prose strong { font-weight: 600; color: #fff; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin-block: 2.2em; }
.prose blockquote { padding-left: 22px; border-left: 3px solid var(--copper); font-size: 22px; font-style: italic; }
.prose img { border-radius: 4px; }
/* Portrait photos and phone screenshots stay a sensible height; galleries keep their own layout. */
.prose > .wp-block-image img, .prose > figure:not(.wp-block-gallery) > img { width: auto; max-height: 640px; }
.prose figure { margin-inline: 0; }
.prose figcaption, .prose .wp-element-caption { margin-top: 8px; font-size: 15px; color: var(--silk-dim); text-align: left; }
.prose :not(pre) > code { font: 400 .84em var(--mono); padding: .14em .4em; background: var(--mask-3); border-radius: 3px; }
.prose pre { padding: 18px 20px; overflow-x: auto; background: #060707; border: 1px solid var(--line); border-radius: 4px; color: var(--silk); font: 400 14.5px/1.65 var(--mono); tab-size: 4; white-space: pre; }
.prose pre code { font: inherit; color: inherit; background: none; padding: 0; white-space: pre; overflow-wrap: normal; word-break: normal; }
.code-wrap { position: relative; }
.copy-btn { position: absolute; top: 8px; right: 8px; padding: 4px 10px; border: 0; border-radius: 3px; background: var(--copper); color: var(--mask); font: 600 12px/1.5 var(--mono); cursor: pointer; opacity: 0; }
.code-wrap:hover .copy-btn, .copy-btn:focus-visible { opacity: 1; }
@media (hover: none) { .copy-btn { opacity: 1; } }
.prose table { width: 100%; border-collapse: collapse; font-size: 17px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); }

.post-foot { margin-top: 52px; display: grid; gap: 24px; }
.author-card { display: flex; gap: 18px; align-items: center; padding: 20px 22px; border: 1px solid var(--line); border-radius: 6px; background: var(--mask-2); font-size: 17px; color: var(--silk-dim); }
.author-card svg { width: 40px; height: 40px; flex-shrink: 0; }

/* ---------- Comments ---------- */
.comments { margin-top: 52px; padding-top: 34px; border-top: 1px solid var(--line); }
.comments h2, .comment-reply-title { font: 800 32px/1 var(--display); text-transform: uppercase; margin-bottom: 16px; }
.comment-list { list-style: none; padding: 0; margin-bottom: 30px; }
.comment-list .children { list-style: none; padding-left: 22px; }
.comment-body { padding: 16px 0; border-top: 1px solid var(--line); }
.comment-meta { font-size: 15px; color: var(--silk-dim); margin-bottom: 6px; }
.comment-form p + p { margin-top: 14px; }
.comment-form label { display: block; font-size: 16px; font-weight: 600; margin-bottom: 5px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; padding: 11px 13px; border-radius: 4px; border: 1px solid var(--line); background: var(--mask-2); color: var(--silk); font: inherit; font-size: 17px; }
.comment-form-cookies-consent label { display: inline; font-weight: 400; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--mask-2); color: var(--silk-dim); font-size: 16px; }
.site-footer > .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px 64px; padding-block: 44px 28px; }
.site-footer p { margin-top: 10px; }
.site-footer nav { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px 24px; }
.site-footer nav a { color: var(--silk-dim); font: 700 17px/1.4 var(--display); letter-spacing: .09em; text-transform: uppercase; text-decoration: none; }
.site-footer .legal { display: block; padding-block: 0 30px; font: 400 13px/1.5 var(--mono); }

/* ---------- Hover (pointer devices only) ---------- */
@media (hover: hover) and (pointer: fine) {
  .site-header nav a:hover, .search-toggle:hover, .site-footer nav a:hover { color: var(--silk); }
  .btn.primary:hover { background: #f0c66e; }
  .btn.ghost:hover { border-color: var(--copper); color: var(--copper); }
  .feature h3 a:hover, .card h3 a:hover, .side-list a:hover { color: var(--copper); }
  .card:hover { border-color: rgba(226, 179, 84, .6); }
  .chip:hover { border-color: var(--copper); }
  .prose a:hover { text-decoration-thickness: 2px; }
  .toc a:hover { color: var(--silk); }
}

/* ---------- Smaller screens ---------- */
@media (max-width: 1000px) {
  .hero > .wrap, .feature, .who > .wrap { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .badge { max-width: 300px; }
  .hero::before { -webkit-mask-image: linear-gradient(180deg, transparent 45%, #000 85%); mask-image: linear-gradient(180deg, transparent 45%, #000 85%); }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .side-col { position: static; }
  .toc { display: none; }
}
@media (max-width: 760px) {
  :root { --gutter: 20px; }
  body { font-size: 17px; }
  .site-header > .wrap { flex-wrap: wrap; gap: 0 12px; padding-block: 10px 6px; }
  .site-header nav { order: 3; width: 100%; margin: 4px 0 0 -10px; overflow-x: auto; }
  .site-header nav a { padding: 10px; white-space: nowrap; }
  .search-toggle { margin-left: auto; }
  .hero { padding: 44px 0 56px; }
  .hero .lede, .post-head .lede { font-size: 19px; }
  .band { padding: 52px 0; }
  .post-head { padding: 40px 0 30px; }
  .prose { font-size: 18px; }
  .prose h2 { font-size: 32px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .led-glow { animation: none; }
  .btn, .search-toggle, .copy-btn { transition: none; }
  .btn:active, .search-toggle:active, .copy-btn:active { transform: none; }
  .search-panel { transition: opacity 150ms ease; }
  @starting-style { .search-panel { transform: none; } }
}
@media print {
  .site-header, .site-footer, .side-col, .comments, .copy-btn { display: none !important; }
  body { background: #fff; color: #000; }
  .layout { display: block; }
}

/* ---------- Images in posts ----------
   One rule set for every post: single pictures stay a sensible size, galleries become an even grid,
   and everything opens full size in the viewer. Nothing needs setting per image in the editor. */
.prose figure.wp-block-image, .prose .wp-block-gallery { margin: 1.7em 0; }
.prose figure.wp-block-image img { display: block; width: auto; max-width: 100%; height: auto; max-height: 460px; border-radius: 4px; }
.prose a.zoom { position: relative; display: inline-block; max-width: 100%; overflow: hidden; border-radius: 4px; line-height: 0; cursor: zoom-in; vertical-align: top; }
.prose a.zoom::after { content: ""; position: absolute; right: 8px; bottom: 8px; width: 30px; height: 30px; border-radius: 4px; background: rgba(12, 14, 13, .78) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e2b354' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M10 20H4v-6M20 4l-7 7M4 20l7-7'/%3E%3C/svg%3E") center / 16px no-repeat; opacity: .85; }
.prose figure.wp-block-image figcaption { position: static !important; margin: 8px 0 0 !important; padding: 0 !important; max-height: none !important; background: none !important; color: var(--silk-dim) !important; font-size: 15px !important; line-height: 1.5; text-align: left !important; }

/* A gallery of several pictures: an even grid of thumbnails */
.prose .wp-block-gallery.has-nested-images { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.prose .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) { display: block; width: auto !important; margin: 0 !important; aspect-ratio: 4 / 3; }
.prose .wp-block-gallery.has-nested-images figure.wp-block-image a.zoom { display: block; width: 100%; height: 100%; }
.prose .wp-block-gallery.has-nested-images figure.wp-block-image img { width: 100% !important; height: 100% !important; max-height: none; object-fit: cover; }
.prose .wp-block-gallery.has-nested-images figure.wp-block-image figcaption { display: none; }
.prose .wp-block-gallery.has-nested-images:has(> figure.wp-block-image:nth-child(2):last-child),
.prose .wp-block-gallery.has-nested-images:has(> figure.wp-block-image:nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* A gallery holding just one picture behaves like a single picture */
.prose .wp-block-gallery.has-nested-images:has(> figure.wp-block-image:only-child) { display: block !important; }
.prose .wp-block-gallery.has-nested-images:has(> figure.wp-block-image:only-child) figure.wp-block-image:not(#individual-image) { aspect-ratio: auto; }
.prose .wp-block-gallery.has-nested-images:has(> figure.wp-block-image:only-child) figure.wp-block-image a.zoom { display: inline-block; width: auto; height: auto; }
.prose .wp-block-gallery.has-nested-images:has(> figure.wp-block-image:only-child) figure.wp-block-image img { width: auto !important; height: auto !important; max-height: 460px; object-fit: contain; }
.prose .wp-block-gallery.has-nested-images:has(> figure.wp-block-image:only-child) figure.wp-block-image figcaption { display: block; }
@media (max-width: 760px) {
  .prose .wp-block-gallery.has-nested-images { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prose figure.wp-block-image img, .prose .wp-block-gallery.has-nested-images:has(> figure.wp-block-image:only-child) figure.wp-block-image img { max-height: 380px; }
}

/* ---------- Picture viewer ---------- */
html.lb-open { overflow: hidden; }
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: var(--silk); overflow: hidden; }
.lightbox::backdrop { background: rgba(4, 5, 5, .94); }
.lb-stage { display: grid; grid-template-rows: minmax(0, 1fr) auto; place-items: center; gap: 14px; width: 100%; height: 100%; padding: 56px 72px 22px; }
.lb-img { display: block; max-width: 100%; max-height: 100%; min-height: 0; object-fit: contain; border-radius: 4px; cursor: zoom-out; }
.lightbox[open] .lb-img { opacity: 1; transform: none; transition: opacity 200ms ease-out, transform 200ms var(--ease-out); }
@starting-style { .lightbox[open] .lb-img { opacity: 0; transform: scale(0.97); } }
.lb-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; max-width: 80ch; font-size: 16px; line-height: 1.45; text-align: center; color: var(--silk-dim); }
.lb-count { font: 400 13.5px/1.7 var(--mono); color: var(--copper); }
.lb-btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: rgba(20, 23, 22, .9); color: var(--silk); cursor: pointer; transition: transform 160ms var(--ease-out); }
.lb-btn:active { transform: scale(0.97); }
.lb-btn svg { width: 22px; height: 22px; }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 12px; top: 50%; margin-top: -24px; }
.lb-next { right: 12px; top: 50%; margin-top: -24px; }
.lb-btn[hidden] { display: none; }
@media (hover: hover) and (pointer: fine) { .lb-btn:hover { border-color: var(--copper); color: var(--copper); } .prose a.zoom:hover::after { opacity: 1; background-color: rgba(12, 14, 13, .95); } }
@media (max-width: 760px) { .lb-stage { padding: 64px 10px 16px; } .lb-prev, .lb-next { top: auto; bottom: 12px; margin-top: 0; } .lb-bar { padding-inline: 60px; min-height: 48px; align-items: center; } }
@media (prefers-reduced-motion: reduce) { .lightbox[open] .lb-img { transition: opacity 150ms ease; } @starting-style { .lightbox[open] .lb-img { transform: none; } } .lb-btn { transition: none; } .lb-btn:active { transform: none; } }
/* WordPress's gallery styles turn the link and the image into stretching flex items; switch that off. */
.prose .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) a.zoom { display: block !important; flex: none !important; width: 100% !important; height: 100% !important; }
.prose .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) img { flex: none !important; }
.prose .wp-block-gallery.has-nested-images:has(> figure.wp-block-image:only-child) figure.wp-block-image:not(#individual-image) { display: block !important; width: auto !important; }
.prose .wp-block-gallery.has-nested-images:has(> figure.wp-block-image:only-child) figure.wp-block-image:not(#individual-image) a.zoom { display: inline-block !important; width: auto !important; height: auto !important; }
.prose .wp-block-gallery.has-nested-images:has(> figure.wp-block-image:only-child) figure.wp-block-image:not(#individual-image) img { width: auto !important; height: auto !important; max-width: 100% !important; max-height: 460px !important; object-fit: contain !important; }
@media (max-width: 760px) { .prose .wp-block-gallery.has-nested-images:has(> figure.wp-block-image:only-child) figure.wp-block-image:not(#individual-image) img { max-height: 380px !important; } }
/* ---------- Cookie banner ---------- */
.cookie-banner { position: fixed; z-index: 90; left: 16px; right: 16px; bottom: 16px; max-width: 800px; margin-inline: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; padding: 18px 20px 18px 22px; border-radius: 6px; border: 1px solid rgba(226, 179, 84, .45); background: var(--mask-2); color: var(--silk); box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .8); font-size: 16px; line-height: 1.5; transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out); }
.cookie-banner[hidden] { display: none; }
@starting-style { .cookie-banner { opacity: 0; transform: translateY(10px); } }
.cookie-text { flex: 1 1 340px; }
.cookie-text strong { font: 800 23px/1.1 var(--display); letter-spacing: .03em; text-transform: uppercase; }
.cookie-text p { margin-top: 4px; color: var(--silk-dim); }
.cookie-text a { color: var(--copper); text-underline-offset: 3px; }
.cookie-actions { display: flex; gap: 10px; }
.cookie-actions .btn { min-width: 120px; background: var(--copper); color: var(--mask); }
.site-footer > .wrap.legal { display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: baseline; gap: 6px 24px; }
.site-footer .legal a, .linklike { color: var(--silk-dim); text-decoration: none; }
.linklike { padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }
@media (hover: hover) and (pointer: fine) {
  .cookie-actions .btn:hover { background: #f0c66e; }
  .site-footer .legal a:hover, .linklike:hover { color: var(--silk); text-decoration: underline; }
}
@media (max-width: 560px) { .cookie-banner { left: 10px; right: 10px; bottom: 10px; } .cookie-actions { width: 100%; } .cookie-actions .btn { flex: 1; } }
@media (prefers-reduced-motion: reduce) { .cookie-banner { transition: opacity 150ms ease; } @starting-style { .cookie-banner { transform: none; } } }
@media print { .cookie-banner { display: none !important; } }