/* === SELF-HOSTED FONTS (latin subset, variable weight) === */
@font-face{
  font-family:'EB Garamond';
  font-style:normal;font-weight:400 800;font-display:swap;
  src:url("../fonts/eb-garamond-latin.woff2") format("woff2");
}
@font-face{
  font-family:'EB Garamond';
  font-style:italic;font-weight:400 700;font-display:swap;
  src:url("../fonts/eb-garamond-italic-latin.woff2") format("woff2");
}
@font-face{
  font-family:'Playfair Display';
  font-style:normal;font-weight:700;font-display:swap;
  src:url("../fonts/playfair-display-700-latin.woff2") format("woff2");
}

/* === RESET & BASE === */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}@media (prefers-reduced-motion:no-preference){html{scroll-behavior:smooth}}

/* === THEME CUSTOM PROPERTIES === */
:root{
  interpolate-size:allow-keywords;
  --ink:#2b1a08;
  --ink-dark:#3a2010;
  --ink-medium:#4a3a2a;
  --ink-light:#5a4a3a;
  --ink-faint:#3a2a1a;
  --brass:#8b7746;
  --brass-light:rgba(139,119,70,0.3);
  --paper:#f9ecc7;
  --paper-warm:#f5e8c8;
  --paper-bg:rgba(250,240,216,0.55);
  --paper-bg-light:rgba(250,240,215,0.2);
  --dark-bg:#2b170d;
  --dark-bg-light:#2a1a08;
  --bg-void:#02040a;
  --paper-texture:url("../paper-texture-900.webp");
  --cursor-default:url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2732%27%20height%3D%2732%27%20viewBox%3D%270%200%2032%2032%27%3E%3Cdefs%3E%3Cfilter%20id%3D%27s%27%20x%3D%27-25%25%27%20y%3D%27-25%25%27%20width%3D%27150%25%27%20height%3D%27150%25%27%3E%3CfeDropShadow%20dx%3D%270.8%27%20dy%3D%271%27%20stdDeviation%3D%270.8%27%20flood-color%3D%27%2302040a%27%20flood-opacity%3D%27.45%27%2F%3E%3C%2Ffilter%3E%3C%2Fdefs%3E%3Cg%20filter%3D%27url%28%23s%29%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M4%203l7.7%2017.4%2015.6%207.7-7.7-15.6z%27%20fill%3D%27%23f9ecc7%27%20stroke%3D%27%233a2010%27%20stroke-width%3D%271.2%27%2F%3E%3Cpath%20d%3D%27M4%203l15.6%209.5-7.9%207.9z%27%20fill%3D%27%233a2010%27%2F%3E%3Cpath%20d%3D%27M9.4%208.7l13%2013%27%20stroke%3D%27%238b7746%27%20stroke-width%3D%271.15%27%2F%3E%3Cpath%20d%3D%27M13.7%2020.2l-4.7%205%206.2-3.5%27%20fill%3D%27none%27%20stroke%3D%27%233a2010%27%20stroke-width%3D%271.05%27%2F%3E%3Cpath%20d%3D%27M6.2%206.1l5.8%2013.5%27%20stroke%3D%27%23f5e8c8%27%20stroke-width%3D%27.85%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") 4 3, auto;
  --cursor-pointer:url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2732%27%20height%3D%2732%27%20viewBox%3D%270%200%2032%2032%27%3E%3Cdefs%3E%3Cfilter%20id%3D%27s%27%20x%3D%27-25%25%27%20y%3D%27-25%25%27%20width%3D%27150%25%27%20height%3D%27150%25%27%3E%3CfeDropShadow%20dx%3D%270.8%27%20dy%3D%271.1%27%20stdDeviation%3D%270.85%27%20flood-color%3D%27%2302040a%27%20flood-opacity%3D%27.5%27%2F%3E%3C%2Ffilter%3E%3C%2Fdefs%3E%3Cg%20filter%3D%27url%28%23s%29%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M4%203l7.6%2017.8%2015.9%207.2-8.1-15.3z%27%20fill%3D%27%23fff4d1%27%20stroke%3D%27%233a2010%27%20stroke-width%3D%271.15%27%2F%3E%3Cpath%20d%3D%27M4%203l15.4%209.7-7.8%208.1z%27%20fill%3D%27%232b1a08%27%2F%3E%3Cpath%20d%3D%27M9.3%208.6l13.2%2013.1%27%20stroke%3D%27%238b7746%27%20stroke-width%3D%271.25%27%2F%3E%3Ccircle%20cx%3D%2722.7%27%20cy%3D%2722.1%27%20r%3D%273.2%27%20fill%3D%27none%27%20stroke%3D%27%238b7746%27%20stroke-width%3D%271.1%27%2F%3E%3Cpath%20d%3D%27M13.5%2020.6l-4.4%205.1%206-3.3%27%20fill%3D%27none%27%20stroke%3D%27%233a2010%27%20stroke-width%3D%271.05%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") 4 3, pointer;
  --cursor-drag-idle:url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2732%27%20height%3D%2732%27%20viewBox%3D%270%200%2032%2032%27%3E%3Cdefs%3E%3Cfilter%20id%3D%27s%27%20x%3D%27-25%25%27%20y%3D%27-25%25%27%20width%3D%27150%25%27%20height%3D%27150%25%27%3E%3CfeDropShadow%20dx%3D%270.8%27%20dy%3D%271.1%27%20stdDeviation%3D%270.9%27%20flood-color%3D%27%2302040a%27%20flood-opacity%3D%27.55%27%2F%3E%3C%2Ffilter%3E%3C%2Fdefs%3E%3Cg%20filter%3D%27url%28%23s%29%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M5%204l8%2017%2014%207-7-14z%27%20fill%3D%27%23f9ecc7%27%20stroke%3D%27%233a2010%27%20stroke-width%3D%271.2%27%2F%3E%3Cpath%20d%3D%27M5%204l15%2010-7%207z%27%20fill%3D%27%233a2010%27%2F%3E%3Cpath%20d%3D%27M10.2%209.2l12.2%2012.2%27%20stroke%3D%27%238b7746%27%20stroke-width%3D%271.15%27%2F%3E%3Cpath%20d%3D%27M16%207.2v4.2M16%2020.6v4.2M9.3%2016h4.2M18.5%2016h4.2%27%20stroke%3D%27%238b7746%27%20stroke-width%3D%271.1%27%2F%3E%3Ccircle%20cx%3D%2716%27%20cy%3D%2716%27%20r%3D%271.6%27%20fill%3D%27%238b7746%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") 16 16, grab;
  --cursor-pressed:url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%2732%27%20height%3D%2732%27%20viewBox%3D%270%200%2032%2032%27%3E%3Cdefs%3E%3Cfilter%20id%3D%27s%27%20x%3D%27-25%25%27%20y%3D%27-25%25%27%20width%3D%27150%25%27%20height%3D%27150%25%27%3E%3CfeDropShadow%20dx%3D%270.8%27%20dy%3D%271.1%27%20stdDeviation%3D%270.9%27%20flood-color%3D%27%2302040a%27%20flood-opacity%3D%27.65%27%2F%3E%3C%2Ffilter%3E%3C%2Fdefs%3E%3Cg%20filter%3D%27url%28%23s%29%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M5.5%204.5l7.6%2016.4%2014.1%206.7-6.9-13.8z%27%20fill%3D%27%233a2010%27%20stroke%3D%27%23f9ecc7%27%20stroke-width%3D%271.15%27%2F%3E%3Cpath%20d%3D%27M5.5%204.5l14.8%209.3-7.2%207.1z%27%20fill%3D%27%23f9ecc7%27%2F%3E%3Cpath%20d%3D%27M10.6%209.6l11.7%2011.5%27%20stroke%3D%27%238b7746%27%20stroke-width%3D%271.2%27%2F%3E%3Cpath%20d%3D%27M16%207.8v4M16%2020.2v4M9.8%2016h4M18.2%2016h4%27%20stroke%3D%27%23f9ecc7%27%20stroke-width%3D%271.05%27%2F%3E%3Ccircle%20cx%3D%2716%27%20cy%3D%2716%27%20r%3D%271.5%27%20fill%3D%27%23f9ecc7%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") 16 16, grabbing;
  --double-border:3px double var(--ink-dark);
  --single-border:1px solid var(--brass);
  --section-border:1px solid var(--ink-dark);
  --vignette-color:rgba(180,140,60,0.06);
}
@supports (background-image:image-set(url("../paper-texture-900.avif") type("image/avif"))){
  :root{
    --paper-texture:image-set(
      url("../paper-texture-900.avif") type("image/avif"),
      url("../paper-texture-900.webp") type("image/webp"),
      url("../paper-texture-900.jpg") type("image/jpeg")
    );
  }
}

body{
  margin:0;padding:0;
  font-family:Georgia,'Times New Roman',serif;
  color:var(--ink);
  min-height:100dvh;
  background:var(--bg-void);
  cursor:var(--cursor-default);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

a,
button,
select,
summary,
label,
[role="button"],
.clickable,
.bgm-toggle,
.modal-close,
.newspaper.rolled{
  cursor:var(--cursor-pointer);
}
input,
textarea,
[contenteditable="true"]{
  cursor:text;
}

/* === CUSTOM SCROLLBAR — SURVEYOR'S CHAIN BRASS RULER === */
/* Inspired by Victorian brass measuring instruments.
   Tick-marked rail track, graduated brass thumb with engraved cross-lines,
   diamond finial endcaps. Fits the 1880s–1910s newspaper aesthetic. */
html{
  scrollbar-width:thin;
  scrollbar-color:var(--brass) var(--bg-void);
  scrollbar-gutter:stable;
}
/* Ornate ruler scrollbar for engines without scrollbar-color; Chromium/Firefox/Safari 26+ use the standard properties above */
@supports not (scrollbar-color:auto){
::-webkit-scrollbar{width:14px}
::-webkit-scrollbar-track{
  background-color:var(--bg-void);
  background-image:repeating-linear-gradient(
    to bottom,
    transparent 0px,transparent 5px,
    rgba(139,119,70,0.35) 5px,rgba(139,119,70,0.35) 6px
  );
  background-position:center;
  background-size:4px 6px;
  background-repeat:repeat-y;
  border-left:1px solid rgba(139,119,70,0.45);
  border-right:1px solid rgba(139,119,70,0.45);
}
::-webkit-scrollbar-thumb{
  background:
    linear-gradient(to bottom,
      transparent 28%,rgba(249,236,199,0.2) 28%,rgba(249,236,199,0.2) 30%,transparent 30%,
      transparent 48%,rgba(249,236,199,0.35) 48%,rgba(249,236,199,0.35) 50%,transparent 50%,
      transparent 68%,rgba(249,236,199,0.2) 68%,rgba(249,236,199,0.2) 70%,transparent 70%
    ),
    linear-gradient(to bottom,
      var(--brass) 0%,#6b5a30 20%,var(--brass) 50%,#6b5a30 80%,var(--brass) 100%
    );
  border:1px solid var(--brass);
  border-radius:1px;
  box-shadow:0 0 4px rgba(139,119,70,0.25);
}
::-webkit-scrollbar-thumb:hover{
  box-shadow:0 0 10px rgba(139,119,70,0.5);
}
::-webkit-scrollbar-button:single-button{
  display:block;
  height:10px;
  width:14px;
  background-color:var(--brass);
  clip-path:polygon(50% 0%,100% 50%,50% 100%,0% 50%);
}
::-webkit-scrollbar-corner{background:var(--bg-void)}
}

/* === 3D BACKGROUND CANVAS === */
#bg-canvas{
  position:fixed;inset:0;z-index:0;
  display:block;
  contain:strict;
  cursor:var(--cursor-drag-idle);
  touch-action:none;
  user-select:none;
  -webkit-user-select:none;
}
body.scene-dragging,
body.scene-dragging *{
  cursor:var(--cursor-pressed) !important;
}

/* === LOADING VEIL === */
#loading-veil{
  position:fixed;inset:0;z-index:1;
  background:#02040a;
  pointer-events:none;
  transition:opacity 1.5s ease-out;
  opacity:1;
}
#loading-veil.faded{opacity:0}

.bgm-toggle{
  position:fixed;right:18px;bottom:18px;z-index:20;
  display:grid;place-items:center;
  width:46px;height:46px;padding:0;
  border:1px solid rgba(139,119,70,0.7);
  background:
    linear-gradient(rgba(250,240,216,0.82),rgba(232,213,160,0.82)),
    var(--paper-texture);
  color:var(--ink);
  font-family:'EB Garamond',Georgia,'Times New Roman',serif;
  cursor:var(--cursor-pointer);
  box-shadow:0 8px 24px rgba(0,0,0,0.35),inset 0 0 22px rgba(120,90,40,0.08);
  transition:transform 0.2s ease,box-shadow 0.2s ease,border-color 0.2s ease;
}
.bgm-toggle:hover{
  transform:translateY(-1px);
  border-color:var(--brass);
  box-shadow:0 10px 30px rgba(0,0,0,0.42),inset 0 0 22px rgba(120,90,40,0.1);
}
.bgm-toggle:focus-visible{
  outline:2px solid rgba(249,236,199,0.85);
  outline-offset:3px;
}
.bgm-toggle.is-playing .bgm-icon{
  color:#f5e8c8;background:#3a2010;
}
.bgm-toggle.has-error{
  border-color:rgba(140,40,40,0.75);
}
.bgm-icon{
  width:34px;height:34px;flex:0 0 34px;
  display:grid;place-items:center;
  border:1px solid rgba(58,32,16,0.55);
  border-radius:50%;
  background:rgba(249,236,199,0.45);
  font-size:1.2rem;font-weight:700;
  line-height:1;
}
.bgm-copy{
  position:absolute;right:54px;bottom:0;
  display:grid;gap:1px;
  width:238px;min-width:0;
  padding:8px 10px;
  border:1px solid rgba(139,119,70,0.7);
  background:
    linear-gradient(rgba(250,240,216,0.9),rgba(232,213,160,0.9)),
    var(--paper-texture);
  box-shadow:0 8px 24px rgba(0,0,0,0.35),inset 0 0 22px rgba(120,90,40,0.08);
  opacity:0;
  pointer-events:none;
  transform:translateX(4px);
  transition:opacity 0.2s ease,transform 0.2s ease;
  text-align:left;
}
.bgm-toggle:hover .bgm-copy,
.bgm-toggle:focus .bgm-copy,
.bgm-toggle:focus-visible .bgm-copy{
  opacity:1;
  transform:translateX(0);
}
.bgm-kicker{
  font-size:0.62rem;letter-spacing:1.8px;text-transform:uppercase;
  color:#6b5a30;font-weight:700;
}
.bgm-title{
  font-size:0.95rem;line-height:1.05;font-weight:700;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.bgm-artists{
  font-size:0.76rem;line-height:1.1;color:#5a4a3a;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}

/* Scroll wrapper for overscroll isolation */
#scroll-wrapper{
  position:relative;z-index:2;
}
/* Warm vignette — bridges newspaper to cosmic background */
#scroll-wrapper::before{
  content:"";
  position:fixed;inset:0;
  pointer-events:none;z-index:0;
  background:radial-gradient(ellipse at 50% 35%,
    rgba(220,170,50,0.10) 0%,
    rgba(180,130,40,0.05) 35%,
    rgba(120,80,20,0.02) 60%,
    transparent 75%
  );
}


/* === TYPOGRAPHY === */
/*
 * Vintage newspaper typography hallmarks:
 * - Headlines: bold condensed serifs, tight tracking, blackletter feel
 * - Body: small, densely packed, justified, tight leading
 * - Subtle ink-bleed via text-shadow on all text
 * - Brown-black ink (not pure black) on warm paper
 */
h1,h2,h3,h4{
  font-family:'EB Garamond',Georgia,'Times New Roman',serif;
  text-shadow:0 0 0.3px rgba(30,15,5,0.35);
}
.newspaper,.modal-card{
  text-shadow:0 0 0.2px rgba(30,15,5,0.25);
}

/* Drop caps — ornate oversized first letter */
.drop-cap::first-letter{
  font-size:3.4em;float:left;line-height:0.75;
  margin-right:5px;margin-top:3px;margin-bottom:-2px;
  font-family:'EB Garamond',Georgia,'Times New Roman',serif;font-weight:700;
  text-shadow:0 0 0.4px rgba(30,15,5,0.4);
}

/* === NEWSPAPER CONTAINER === */
.newspaper{
  max-width:1160px;margin:24px auto;padding:28px 36px;
  background:
    linear-gradient(var(--paper-bg),rgba(245,232,200,0.55)),
    var(--paper-texture);
  background-size:auto,cover;
  background-position:center;
  background-attachment:scroll;
  border:4px double var(--ink-dark);
  box-shadow:
    inset 0 0 120px rgba(120,90,40,0.08),
    inset 0 0 30px rgba(100,70,30,0.04),
    3px 3px 10px rgba(0,0,0,0.35);
  position:relative;
  transition:box-shadow 0.6s cubic-bezier(0.34,1.05,0.5,1);
}
/* Aged edge effect — darker paper border */
.newspaper::before{
  content:"";
  position:absolute;inset:6px;
  pointer-events:none;
  border:1px solid rgba(139,119,70,0.15);
}

/* === MASTHEAD === */
.masthead{
  text-align:center;
  border-bottom:3px double #3a2010;
  padding-bottom:14px;margin-bottom:10px;
  cursor:var(--cursor-pointer);
  position:relative;
  transition:padding 0.5s ease,border-color 0.5s ease;
  user-select:none;
  -webkit-user-select:none;
}
.masthead:hover{
  border-bottom-color:#5a3a20;
}
.masthead:focus-visible{
  outline:2px solid rgba(58,32,16,0.55);
  outline-offset:2px;
}
.masthead::after{
  content:"roll up";
  position:absolute;bottom:2px;right:8px;
  font-size:0.6rem;text-transform:uppercase;letter-spacing:2.5px;
  color:#8b7746;opacity:0;
  transition:opacity 0.3s;
  font-family:Georgia,serif;
  pointer-events:none;
}
.masthead:hover::after{
  opacity:0.55;
}
.masthead-title{
  font-family:'EB Garamond',Georgia,'Times New Roman',serif;
  font-size:4.2rem;font-weight:800;
  letter-spacing:4px;line-height:1.05;
  text-transform:uppercase;
  text-shadow:0 0 0.5px rgba(30,15,5,0.4),0 1px 2px rgba(30,15,5,0.08);
}
.masthead-location{
  font-size:1.05rem;text-transform:uppercase;
  letter-spacing:5px;color:var(--ink-medium);
  word-spacing:4px;
  margin:0;overflow:hidden;
  transition:block-size 0.25s ease, margin 0.25s ease, opacity 0.25s ease;
}
.masthead-ornament{
  font-size:1.2rem;color:var(--ink-dark);margin:6px 0;
  letter-spacing:10px;
  overflow:hidden;
  transition:block-size 0.25s ease, margin 0.25s ease, opacity 0.25s ease;
}
.masthead-subtitle{
  font-size:1.1rem;text-transform:uppercase;
  letter-spacing:6px;color:var(--ink-medium);
  margin-top:5px;margin-bottom:0;word-spacing:3px;
  overflow:hidden;
  transition:block-size 0.25s ease, margin 0.25s ease, opacity 0.25s ease;
}

/* === ENTRANCE ANIMATIONS === */
@keyframes masthead-reveal{
  from{opacity:0;transform:translateY(-18px)}
  to{opacity:1;transform:translateY(0)}
}
@keyframes column-reveal{
  from{opacity:0;transform:translateY(24px)}
  to{opacity:1;transform:translateY(0)}
}


/* Entrance animations: opt in only when motion is welcome */
@media (prefers-reduced-motion:no-preference){
  .masthead-title{animation:masthead-reveal 1.2s cubic-bezier(0.22,0.61,0.36,1) both}
  .masthead-location{animation:masthead-reveal 1.2s 0.1s cubic-bezier(0.22,0.61,0.36,1) both}
  .masthead-ornament{animation:masthead-reveal 1.2s 0.2s cubic-bezier(0.22,0.61,0.36,1) both}
  .masthead-subtitle{animation:masthead-reveal 1.2s 0.3s cubic-bezier(0.22,0.61,0.36,1) both}
  .col-left{animation:column-reveal 0.8s 0.4s cubic-bezier(0.22,0.61,0.36,1) both}
  .col-center{animation:column-reveal 0.8s 0.55s cubic-bezier(0.22,0.61,0.36,1) both}
  .col-right{animation:column-reveal 0.8s 0.7s cubic-bezier(0.22,0.61,0.36,1) both}
  .dateline{animation:masthead-reveal 0.8s 0.35s cubic-bezier(0.22,0.61,0.36,1) both}
  .newspaper-footer{animation:masthead-reveal 0.8s 0.85s cubic-bezier(0.22,0.61,0.36,1) both}
}

/* === DATELINE === */
.dateline{
  display:grid;grid-template-columns:1fr auto 1fr;align-items:center;
  border-top:1px solid #8b7746;
  border-bottom:2px solid #3a2010;
  padding:6px 0;margin-bottom:14px;
  font-size:0.92rem;text-transform:uppercase;letter-spacing:2.5px;
  word-spacing:2px;color:#3a2a1a;
}
  .dateline>:first-child{text-align:left}
  .dateline>:nth-child(2){text-align:center}
  .dateline>:last-child{text-align:right;text-transform:none}

/* === 3-COLUMN GRID === */
.columns{
  display:grid;
  grid-template-columns:1fr 1.5fr 1fr;
  gap:14px;
}
.col-left{
  border-right:1px solid #8b7746;
  padding-right:12px;
}
.col-center{
  border-right:1px solid #8b7746;
  padding:0 12px;
}
.col-right{
  padding-left:12px;
}


/* === SECTION BLOCKS === */
.section-title{
  font-family:'Playfair Display','EB Garamond',Georgia,'Times New Roman',serif;
  font-size:1.15rem;font-weight:700;
  text-transform:uppercase;text-align:center;
  border-bottom:1px solid var(--ink-dark);
  padding-bottom:4px;margin-bottom:6px;
  letter-spacing:1.5px;
  word-spacing:2px;
}
.body-text{
  font-size:1rem;text-align:justify;
  line-height:1.4;margin-bottom:5px;
  word-spacing:-0.3px;
  letter-spacing:-0.1px;
}

/* === DARK BOX === */
.dark-box{
  color:#f9ecc7;
  background:#2b170d;
  padding:12px;margin-bottom:12px;
  position:relative;
}
/* Four corner brackets — vintage newspaper ornament */
.dark-box::before{
  content:"";
  position:absolute;inset:0;pointer-events:none;
  background:
    /* top-left ┌ */
    linear-gradient(to right, rgba(249,236,199,0.5) 8px, transparent 8px) 5px 5px / 8px 1px no-repeat,
    linear-gradient(to bottom, rgba(249,236,199,0.5) 8px, transparent 8px) 5px 5px / 1px 8px no-repeat,
    /* top-right ┐ */
    linear-gradient(to left, rgba(249,236,199,0.5) 8px, transparent 8px) calc(100% - 5px) 5px / 8px 1px no-repeat,
    linear-gradient(to bottom, rgba(249,236,199,0.5) 8px, transparent 8px) calc(100% - 5px) 5px / 1px 8px no-repeat,
    /* bottom-left └ */
    linear-gradient(to right, rgba(249,236,199,0.5) 8px, transparent 8px) 5px calc(100% - 5px) / 8px 1px no-repeat,
    linear-gradient(to top, rgba(249,236,199,0.5) 8px, transparent 8px) 5px calc(100% - 5px) / 1px 8px no-repeat,
    /* bottom-right ┘ */
    linear-gradient(to left, rgba(249,236,199,0.5) 8px, transparent 8px) calc(100% - 5px) calc(100% - 5px) / 8px 1px no-repeat,
    linear-gradient(to top, rgba(249,236,199,0.5) 8px, transparent 8px) calc(100% - 5px) calc(100% - 5px) / 1px 8px no-repeat;
}
.dark-box .section-title{
  border-bottom-color:rgba(249,236,199,0.4);
  font-size:1.2rem;letter-spacing:2px;
  color:#f9ecc7;
}
.dark-box .body-text{
  font-size:0.92rem;line-height:1.45;
  color:#f9ecc7;
}

/* === BORDERED BOX === */
.bordered-box{
  border:2px solid #3a2010;
  padding:10px;margin-bottom:12px;
}

/* === STOCK MARKET TABLE === */
.stock-table{
  width:100%;border-collapse:collapse;
  font-size:0.82rem;line-height:1.25;
  font-family:Georgia,'Times New Roman',serif;
  text-shadow:0 0 0.2px rgba(30,15,5,0.25);
}
.stock-table thead th{
  font-family:'EB Garamond',Georgia,serif;
  font-size:0.78rem;font-weight:700;
  text-transform:uppercase;letter-spacing:1px;
  text-align:left;padding:3px 4px 4px;
  border-bottom:1px solid #3a2010;
  color:#3a2010;
  text-shadow:0 0 0.3px rgba(30,15,5,0.35);
}
.stock-table thead th:last-child,
.stock-table thead th:nth-child(2){text-align:right;}
.stock-table tbody td{
  padding:2px 4px;
  border-bottom:1px dotted rgba(139,119,70,0.3);
  vertical-align:baseline;
}
.stock-table tbody td:first-child{
  font-variant:small-caps;letter-spacing:0.3px;
}
.stock-table tbody td:nth-child(2),
.stock-table tbody td:nth-child(3){
  text-align:right;font-variant-numeric:tabular-nums;
}
.stock-change-pos{color:var(--ink);}
.stock-change-neg{color:#6b2a2a;}
/* Price change flash animation */
@keyframes price-flash-up{
  0%{background:transparent}
  40%{background:rgba(40,100,40,0.18);color:#1a4a1a}
  100%{background:transparent}
}
@keyframes price-flash-down{
  0%{background:transparent}
  40%{background:rgba(140,40,40,0.18);color:#6b1a1a}
  100%{background:transparent}
}
.stock-flash-up{animation:price-flash-up 1.2s ease-out}
.stock-flash-down{animation:price-flash-down 1.2s ease-out}
.stock-footnote{
  font-size:0.7rem;color:#5a4a3a;
  text-align:right;margin-top:4px;
  font-style:italic;letter-spacing:0.3px;
}
.stock-loading{
  text-align:center;font-size:0.82rem;
  color:#5a4a3a;padding:10px 0;font-style:italic;
}
.stock-error{
  text-align:center;font-size:0.78rem;
  color:#6b2a2a;padding:8px 0;font-style:italic;
  border-top:1px solid rgba(139,119,70,0.3);
}

/* === CORRESPONDENCE CONTACT ROWS === */
.contact-row{
  display:flex;align-items:baseline;
  margin-bottom:4px;
  font-size:0.88rem;line-height:1.4;
  color:#2b1a08;
}
.contact-row:last-child{margin-bottom:0;}
.contact-label{
  font-family:'EB Garamond',Georgia,'Times New Roman',serif;
  font-weight:600;
  min-width:68px;
  color:#3a2010;
  font-size:0.90rem;
  letter-spacing:0.8px;
}
.contact-value{
  cursor:var(--cursor-pointer);
  word-break:break-all;
}
.contact-link-wrap{display:inline-block;}
.contact-value.clickable::after,
.contact-link-wrap.clickable::after{
  top:100%;right:auto;left:0;
  white-space:nowrap;
}
.contact-link{
  color:#2b1a08;
  text-decoration:underline;
  text-decoration-color:#8b7746;
  text-underline-offset:2px;
  transition:color 0.2s;
}
.contact-link:hover{
  color:#5a3a1a;
  text-decoration-color:#5a3a1a;
}

/* === FOOTER === */
.newspaper-footer{
  border-top:2px solid #3a2010;
  margin-top:16px;padding-top:8px;
  text-align:center;
  font-size:0.88rem;text-transform:uppercase;
  letter-spacing:3.5px;color:#5a4a3a;
  word-spacing:3px;
}

/* === ROLL TOGGLE === */
.newspaper-body{
  overflow:hidden;
  opacity:1;
  transition:opacity 0.2s ease;
}
.newspaper-body-inner{
  transition:transform 0.6s cubic-bezier(0.34,1.05,0.5,1);
}
.newspaper.rolled .newspaper-body{
  max-height:0;
  opacity:0;
  transition:opacity 0.15s ease;
}
.newspaper.rolled .newspaper-body-inner{
  transform:translateY(-100%);
}
.newspaper.rolled{
  position:fixed;
  bottom:16px;
  left:50%;
  transform:translateX(-50%);
  z-index:500;
  width:calc(100% - 48px);
  max-width:1160px;
  margin:0;
  padding:6px 36px 8px;
  overflow:hidden;
  cursor:var(--cursor-pointer);
  box-shadow:inset 0 0 120px rgba(120,90,40,0),inset 0 0 30px rgba(100,70,30,0),0 -3px 16px rgba(0,0,0,0.38);
  border-radius:2px;
}
.newspaper.rolled .masthead{
  border-bottom:none;
  padding-bottom:0;
  margin-bottom:0;
  cursor:var(--cursor-pointer);
}
.newspaper.rolled .masthead-location,
.newspaper.rolled .masthead-ornament,
.newspaper.rolled .masthead-subtitle{
  opacity:0;
  visibility:hidden;
  block-size:0;
  margin:0;
  transition:opacity 0.25s ease, visibility 0s 0.25s, block-size 0.25s ease, margin 0.25s ease;
}
.newspaper.rolled .masthead-title{
  font-size:1.3rem;
  letter-spacing:3px;
}
.newspaper.rolled .masthead::after{
  content:"click to open";
  bottom:-2px;
  right:4px;
  opacity:0.7;
  transition:opacity 0.3s ease 0.3s;
}
.newspaper.rolled .masthead:hover::after{
  opacity:0.6;
}
.newspaper.rolled::before{
  display:none;
}
/* Roll / unroll: the browser morphs the paper between full page and bottom bar */
.newspaper{view-transition-name:paper}
::view-transition-group(paper){
  animation-duration:0.6s;
  animation-timing-function:cubic-bezier(0.34,1.05,0.5,1);
}
::view-transition-old(paper),
::view-transition-new(paper){
  height:100%;
  object-fit:cover;
  object-position:top center;
}
::view-transition-old(root),
::view-transition-new(root){animation:none}
html.vt-active .newspaper,
html.vt-active .newspaper *{
  transition:none !important;
  animation:none !important;
}

@media (prefers-reduced-motion: reduce) {
  .clickable,
  .bgm-toggle,
  .bgm-copy { transition: none; }
  .clickable:hover { transform: none; }
  .newspaper-body { transition: none; }
  .newspaper-body-inner { transition: none; }
  .newspaper { transition: none; }
  .masthead-location,
  .masthead-ornament,
  .masthead-subtitle { transition: none; }
  .masthead::after { transition: none; }
}

/* === WATERFRONT ILLUSTRATION === */
.waterfront{
  border:2px solid #3a2010;
  margin-bottom:10px;
  position:relative;
}
/* Engraved plate border */
.waterfront::before{
  content:"";
  position:absolute;inset:3px;pointer-events:none;
  border:1px solid rgba(58,32,16,0.3);
  z-index:5;
}
.waterfront-scene{
  height:170px;
  position:relative;overflow:hidden;
  background:linear-gradient(180deg,
    #7BAEC7 0%,#8CB8D0 15%,#A4C6D8 30%,
    #B8D0E0 42%,#AEC8D8 48%,
    #5A8A9C 52%,#4A7A8C 58%,#3A6A7C 65%,
    #2A5A6C 75%,#1A3A4C 100%);
}
.waterfront-scene::after{
  content:"";
  position:absolute;inset:0;
  background:radial-gradient(ellipse at 50% 50%,
    transparent 40%,rgba(0,0,0,0.15) 100%);
  pointer-events:none;
}
.waterfront-sky{
  position:absolute;top:8px;left:50%;transform:translateX(-50%);
  font-size:11px;opacity:0.55;white-space:nowrap;
  filter:grayscale(0.6);
}
.waterfront-sun{
  position:absolute;top:10px;right:14%;
  width:22px;height:22px;border-radius:50%;
  background:radial-gradient(circle,#ffe8c0,#f0c060);
  opacity:0.65;
  box-shadow:0 0 12px rgba(240,192,96,0.3);
}
.waterfront-skyline{
  position:absolute;bottom:55px;left:0;right:0;height:45px;
  background:linear-gradient(180deg,#3a4a5a,#2a3a4a);
  clip-path:polygon(
    0% 100%,0% 55%,4% 25%,8% 35%,11% 8%,15% 30%,
    20% 18%,25% 40%,30% 12%,35% 35%,40% 5%,44% 25%,
    48% 28%,52% 45%,56% 10%,60% 32%,64% 22%,68% 38%,
    72% 15%,75% 30%,80% 20%,84% 42%,88% 8%,92% 28%,
    96% 18%,100% 42%,100% 100%
  );
}
.waterfront-water{
  position:absolute;bottom:0;left:0;right:0;height:58px;
  background:linear-gradient(180deg,#3A7B9C 0%,#2A5A7A 30%,#1A3A5A 70%,#0F2A44 100%);
}
.waterfront-water::before{
  content:"";
  position:absolute;top:8px;left:8%;width:84%;height:2px;
  background:rgba(255,255,255,0.22);
}
.waterfront-water::after{
  content:"";
  position:absolute;top:20px;left:14%;width:72%;height:1.5px;
  background:rgba(255,255,255,0.15);
}
.waterfront-boat{
  position:absolute;bottom:50px;right:25%;
  font-size:18px;filter:grayscale(0.4);
}
/* Extra wave detail */
.waterfront-wave{
  position:absolute;bottom:47px;left:5%;right:5%;height:1px;
  background:rgba(255,255,255,0.1);
  border-radius:50%;
}
.waterfront-wave-b{
  position:absolute;bottom:43px;left:10%;right:8%;height:1px;
  background:rgba(255,255,255,0.08);
  border-radius:50%;
}
.waterfront-caption{
  text-align:center;font-size:0.8rem;
  padding:4px 8px;
  letter-spacing:0.5px;word-spacing:1px;
}

/* === VINTAGE ENGRAVING IMAGE === */
.vintage-image{
  border:2px solid #3a2010;
  margin-bottom:10px;
  position:relative;
  line-height:0;
  overflow:hidden;
}
.vintage-image picture,
.portrait-block picture{
  display:block;
}
.vintage-image::before{
  content:none;
}
.engraving-img{
  width:100%;
  height:220px;
  display:block;
  object-fit:cover;
  object-position:center 25%;
  filter:sepia(0.7) saturate(0.6) brightness(0.85) contrast(1.1);
  transition:filter 0.3s;
}
.vintage-image:hover .engraving-img{
  filter:sepia(0.5) saturate(0.5) brightness(0.9) contrast(1.05);
}

/* === CLICKABLE === */
.clickable{
  cursor:var(--cursor-pointer);
  transition:filter 0.25s,box-shadow 0.25s,transform 0.15s;
  position:relative;
}
.clickable:hover{
  filter:brightness(0.94) sepia(0.05);
  box-shadow:0 3px 10px rgba(0,0,0,0.18);
  transform:translateY(-1px);
}
.clickable::after{
  content:attr(data-hint);
  position:absolute;top:5px;right:7px;
  font-size:0.72rem;color:#8b7746;
  text-transform:uppercase;letter-spacing:1.5px;
  opacity:0;
  transition:opacity 0.25s;
  pointer-events:none;
  font-family:Georgia,serif;
}
.clickable:hover::after{
  opacity:0.7;
}

/* === PORTRAIT BLOCK === */
.portrait-block{
  border:2px solid #3a2010;padding:8px;
  text-align:center;margin-bottom:8px;
  background:rgba(250,240,215,0.2);
  line-height:0;
}
.portrait-photo{
  width:100%;height:auto;
  display:block;
  filter:sepia(0.55) saturate(0.65) brightness(0.88) contrast(1.08);
  transition:filter 0.3s;
}
.portrait-block:hover .portrait-photo{
  filter:sepia(0.4) saturate(0.55) brightness(0.92) contrast(1.05);
}
.portrait-name{
  font-family:'EB Garamond',Georgia,'Times New Roman',serif;
  font-size:1.55rem;font-weight:700;
  text-transform:uppercase;letter-spacing:2px;
  text-align:center;margin-top:10px;
}
.portrait-title{
  font-size:1.15rem;color:#4a3a2a;
  text-align:center;margin-top:3px;
}
.portrait-company{
  font-size:1.05rem;color:#5a4a3a;
  text-align:center;margin-bottom:10px;
}

/* === MODAL SYSTEM === */
/* The <dialog class="modal-card"> is the card itself; the browser supplies the
   top layer, inert page, focus handling, Esc and light dismiss. */
dialog:modal{margin:auto;overscroll-behavior:contain}
dialog::backdrop{
  overflow:hidden;
  overscroll-behavior:contain;
  background:rgb(0 0 0 / 0);
  backdrop-filter:blur(0);
  transition-property:background-color,backdrop-filter,display,overlay;
  transition-duration:0.35s;
  transition-timing-function:ease;
  transition-behavior:allow-discrete;
}
dialog[open]::backdrop{
  background:rgb(0 0 0 / 0.45);
  backdrop-filter:blur(6px);
  @starting-style{
    background:rgb(0 0 0 / 0);
    backdrop-filter:blur(0);
  }
}
.modal-card{
  color:var(--ink);
  opacity:0;
  transition-property:opacity,transform,display,overlay;
  transition-duration:0.4s;
  transition-timing-function:cubic-bezier(0.34,1.56,0.64,1);
  transition-behavior:allow-discrete;
  @media (prefers-reduced-motion:no-preference){transform:scale(0.9)}
  @media (prefers-reduced-motion:reduce){transition-duration:0.1s}
}
.modal-card[open]{
  opacity:1;
  @starting-style{opacity:0}
  @media (prefers-reduced-motion:no-preference){
    transform:scale(1);
    @starting-style{transform:scale(0.9)}
  }
}
.modal-card{
  background:
    radial-gradient(ellipse at 50% 30%,#faf0d8 0%,#f5e8c8 35%,#e8d5a0 70%,#e0cc90 100%);
  background-attachment:local;
  background-repeat:repeat-y;
  border:5px double #3a2010;
  padding:28px 24px 20px;
  max-width:620px;width:90%;
  max-height:82dvh;
  overflow-y:auto;
  scroll-behavior:smooth;
  position:relative;
  box-shadow:
    0 20px 60px rgba(0,0,0,0.55),
    inset 0 0 80px rgba(120,90,40,0.06);
  font-family:Georgia,'Times New Roman',serif;
}
.modal-card--resume{
  width:min(1120px,calc(100vw - 48px));
  max-width:1120px;
  height:min(88dvh,860px);
  max-height:88dvh;
  padding:30px 32px 24px;
  overflow:hidden;
}
.modal-card--dispatches{
  width:min(920px,calc(100vw - 48px));
  max-width:920px;
  max-height:88dvh;
  padding:30px 34px 24px;
}
.modal-close{
  position:absolute;top:8px;right:12px;
  background:none;border:none;
  font-size:1.7rem;color:#5a4a3a;
  cursor:var(--cursor-pointer);
  font-family:Georgia,serif;
  line-height:1;
  transition:color 0.2s;
  text-shadow:0 0 0.3px rgba(30,15,5,0.3);
  outline:none;
}
.modal-close:focus-visible{
  outline:2px solid rgba(58,32,16,0.5);
  outline-offset:2px;
}
.modal-close:hover{color:#2a1a08}
.modal-title{
  font-family:'EB Garamond',Georgia,'Times New Roman',serif;
  font-size:2rem;font-weight:700;
  text-transform:uppercase;text-align:center;
  border-bottom:2px solid #3a2010;
  padding-bottom:8px;margin-bottom:14px;
  letter-spacing:1.5px;word-spacing:3px;
  text-shadow:0 0 0.4px rgba(30,15,5,0.35);
}
.modal-body{font-size:1rem;line-height:1.5;text-align:justify}
.modal-body--resume{
  display:flex;
  flex-direction:column;
  font-size:0.96rem;
  height:100%;
  line-height:1.42;
  min-height:0;
  overflow:hidden;
  text-align:left;
}
.modal-body h3{
  font-family:'EB Garamond',Georgia,'Times New Roman',serif;
  font-size:1.2rem;font-weight:700;
  text-transform:uppercase;
  border-bottom:1px solid #8b7746;
  margin:14px 0 6px;padding-bottom:3px;
  letter-spacing:1px;word-spacing:2px;
}
.modal-body ul{
  list-style:none;padding:0;margin:0 0 10px;
}
.modal-body ul li{
  padding:2px 0 2px 16px;position:relative;
  font-size:0.95rem;text-align:justify;
}
.modal-body ul li::before{
  content:"\2014";position:absolute;left:0;
  color:#5a4a3a;
}
.modal-body--resume ul li{
  text-align:left;
}
.modal-body .dark-note{
  background:#2a1a08;color:#f5e8c8;
  padding:10px 12px;margin:12px 0;
  font-size:0.92rem;
  box-shadow:inset 0 0 10px rgba(0,0,0,0.25);
}
.resume-heading{
  display:flex;
  flex:0 0 auto;
  justify-content:space-between;
  align-items:flex-end;
  gap:18px;
  margin:-2px 0 18px;
  padding-bottom:12px;
  border-bottom:1px solid rgba(58,32,16,0.45);
}
.resume-name{
  font-family:'EB Garamond',Georgia,'Times New Roman',serif;
  font-size:1.55rem;
  font-weight:700;
  line-height:1.05;
  text-transform:uppercase;
  letter-spacing:1px;
}
.resume-role{
  margin-top:4px;
  color:#4a3a2a;
  font-size:1rem;
}
.resume-contact{
  display:grid;
  gap:2px;
  min-width:230px;
  color:#4a3a2a;
  font-size:0.88rem;
  text-align:right;
}
.resume-contact a{color:#3a2010;text-decoration:underline;text-decoration-thickness:1px;text-decoration-color:rgba(58,32,16,0.35);text-underline-offset:3px}
.resume-layout{
  display:grid;
  grid-template-columns:minmax(245px,0.82fr) minmax(0,1.38fr);
  gap:24px;
  align-items:stretch;
  flex:1 1 auto;
  min-height:0;
  overflow:hidden;
}
.resume-sidebar{
  padding-right:22px;
  border-right:3px double rgba(58,32,16,0.5);
  min-height:0;
  overflow:hidden;
}
.resume-main{
  display:grid;
  gap:16px;
  min-height:0;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding-right:12px;
  scrollbar-gutter:stable;
}
.resume-section{
  break-inside:avoid;
  margin-bottom:16px;
}
.resume-section:last-child{margin-bottom:0}
.resume-main .resume-section{margin-bottom:0}
.resume-section h3,
.resume-main h3{
  margin-top:0;
}
.resume-section p,
.resume-job p,
.resume-project-group p{
  margin:0 0 8px;
}
.resume-job{
  padding-bottom:12px;
  margin-bottom:12px;
  border-bottom:1px solid rgba(139,119,70,0.55);
}
.resume-job:last-child{
  border-bottom:none;
  margin-bottom:0;
  padding-bottom:0;
}
.resume-job-head{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:12px;
  margin-bottom:4px;
  font-family:'EB Garamond',Georgia,'Times New Roman',serif;
}
.resume-job-title{
  font-size:1.08rem;
  font-weight:700;
}
.resume-job-date{
  color:#5a4a3a;
  font-size:0.9rem;
  white-space:nowrap;
}
.resume-meta{
  color:#4a3a2a;
  font-size:0.92rem;
  margin-bottom:7px;
}
.resume-skill-list{
  display:grid;
  grid-template-columns:1fr;
  gap:3px;
}
.resume-project-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:16px 22px;
}
.resume-project-group{
  break-inside:avoid;
}
.resume-project-group h3{
  font-size:1.02rem;
  letter-spacing:0.7px;
  margin-bottom:5px;
}
.resume-body-note{
  margin:0 0 10px;
  color:#4a3a2a;
}
.dispatch-entry{
  margin-bottom:18px;
  padding-bottom:12px;
  border-bottom:1px solid #8b7746;
}
.dispatch-entry:last-of-type{
  border-bottom:none;margin-bottom:10px;
}
.dispatch-head{
  display:flex;justify-content:space-between;align-items:baseline;
  font-family:'EB Garamond',Georgia,'Times New Roman',serif;
  font-size:0.8rem;text-transform:uppercase;letter-spacing:0.8px;
  color:#6b5a3e;margin-bottom:4px;
  border-top:1px solid #8b7746;border-bottom:1px solid #8b7746;
  padding:3px 0;flex-wrap:wrap;gap:4px 12px;
}
.dispatch-dateline{font-weight:700;color:#3a2010}
.dispatch-byline{font-style:italic;color:#5a4a3a}

/* === RESPONSIVE === */
@media(max-width:960px){
  .columns{grid-template-columns:1fr 1fr;}
  .col-center{border-right:none;padding:0 0 0 12px;}
  .col-right{border-top:1px solid #8b7746;padding-top:12px;margin-top:8px;padding-left:0}
  .modal-card--resume{width:calc(100vw - 28px);padding:26px 22px 20px}
  .modal-card--dispatches{width:calc(100vw - 28px);padding:28px 24px 22px}
  .resume-layout{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr);gap:18px}
  .resume-sidebar{border-right:none;border-bottom:3px double rgba(58,32,16,0.5);padding:0 0 16px}
}
@media(max-width:768px){
  .newspaper{padding:16px;margin:8px}
  .columns{grid-template-columns:1fr 1fr;}
  .col-center{border-right:none;padding:0;border-top:1px solid #8b7746;padding-top:12px;margin-top:8px}
  .col-right{border-top:1px solid #8b7746;padding-top:12px;margin-top:8px}
  .masthead-title{font-size:2.6rem}
  .waterfront-scene{height:130px}
  .engraving-img{height:170px}
  .newspaper.rolled{width:calc(100% - 16px);padding:6px 16px 8px}
  .newspaper.rolled .masthead-title{font-size:1.1rem;letter-spacing:2px}
  .stock-table{font-size:0.76rem}
  .stock-table thead th{font-size:0.72rem}
  .modal-card{width:calc(100vw - 22px);max-height:86dvh;padding:24px 18px 18px}
  .modal-card--resume{width:calc(100vw - 18px);height:calc(100dvh - 18px);max-height:calc(100dvh - 18px);padding:24px 16px 18px}
  .modal-card--dispatches{width:calc(100vw - 18px);max-height:calc(100dvh - 18px);padding:24px 16px 18px}
  .resume-heading{align-items:flex-start;flex-direction:column;gap:8px}
  .resume-contact{text-align:left;min-width:0}
  .resume-project-grid{grid-template-columns:1fr}
  .resume-job-head{align-items:flex-start;flex-direction:column;gap:1px}
  .resume-job-date{white-space:normal}
}
@media(max-width:480px){
  .columns{grid-template-columns:1fr}
  .col-left,.col-center,.col-right{border-right:none;padding:0;border-bottom:1px solid #8b7746;padding-bottom:12px;margin-bottom:8px}
  .col-right{border-bottom:none}
  .masthead-title{font-size:2rem}
  .masthead-subtitle{font-size:0.85rem;letter-spacing:3px}
  .newspaper.rolled{width:calc(100% - 16px);padding:4px 12px 6px}
  .newspaper.rolled .masthead-title{font-size:1rem;letter-spacing:1px}
  .stock-table{font-size:0.8rem}
  .bgm-toggle{right:10px;bottom:10px;width:42px;height:42px}
  .bgm-icon{width:30px;height:30px;flex-basis:30px;font-size:1rem}
  .bgm-copy{right:48px;width:calc(100vw - 68px)}
  .bgm-title{font-size:0.86rem}
  .bgm-artists{font-size:0.7rem}
  .modal-title{font-size:1.55rem;letter-spacing:1px}
  .resume-name{font-size:1.34rem}
  .modal-body--resume{font-size:0.93rem}
  .resume-heading{margin-bottom:12px;padding-bottom:10px}
  .resume-sidebar{padding-bottom:12px}
  .resume-sidebar .resume-section{margin-bottom:10px}
  .resume-sidebar h3{font-size:1.02rem;margin-bottom:4px}
  .resume-main{padding-right:8px}
}

/* === UTILITIES & FORMER INLINE STYLES (kept after base rules so they win) === */
.mb-1{margin-bottom:1px}
.mb-2{margin-bottom:2px}
.mb-3{margin-bottom:3px}
.mb-5{margin-bottom:5px}
.mt-6{margin-top:6px}
.hero-headline{
  font-family:'EB Garamond',Georgia,'Times New Roman',serif;
  font-size:1.75rem;font-weight:700;
  text-transform:uppercase;text-align:center;
  line-height:1.2;margin-bottom:6px;
}
.hero-standfirst{
  text-align:center;font-size:0.88rem;color:#5a4a3a;
  margin-bottom:8px;border-top:1px solid #8b7746;padding-top:6px;
}
.dark-box .body-text.dark-box-note{
  border-top:1px solid rgba(249,236,199,0.4);
  padding-top:4px;margin-top:4px;font-size:0.88rem;
}
.modal-body .dark-note.dark-note--center{text-align:center;letter-spacing:0.5px}
.dark-note-small{font-size:0.85rem}

/* === CARD TRIGGERS (real buttons stretched over clickable blocks) === */
.card-trigger{
  position:absolute;inset:0;z-index:1;
  width:100%;height:100%;
  padding:0;border:0;background:none;
  cursor:var(--cursor-pointer);
}
.card-trigger:focus-visible{
  outline:2px solid #f9ecc7;
  outline-offset:-5px;
  box-shadow:inset 0 0 0 4px #3a2010;
}
.clickable:has(:focus-visible)::after{opacity:0.7}

/* === PHASE 2: SEMANTICS & CONTROLS === */
.sr-only{
  position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;
  overflow:hidden;clip-path:inset(50%);white-space:nowrap;
}
.masthead-toggle{
  position:absolute;inset:0;z-index:2;
  width:100%;height:100%;padding:0;border:0;background:none;
  cursor:var(--cursor-pointer);
}
.masthead-toggle:focus-visible{
  outline:2px solid rgba(58,32,16,0.55);
  outline-offset:2px;
}
.list-dash,.list-plain{list-style:none;padding:0}
.list-dash li{position:relative;padding-left:16px;margin-bottom:1px;text-align:left}
.list-dash li::before{content:"\2014";position:absolute;left:0}
.list-plain li{margin-bottom:3px;text-align:left}
.list-heading{
  font-family:inherit;font-size:1rem;font-weight:700;line-height:1.4;
  text-shadow:none;margin-bottom:2px;
}
.copy-button{
  background:none;border:0;padding:0;
  font:inherit;color:inherit;text-align:left;word-break:break-all;
  min-block-size:24px;
  text-decoration:underline;text-decoration-color:#8b7746;text-underline-offset:2px;
  cursor:var(--cursor-pointer);
}
.copy-button:focus-visible{outline:2px solid rgba(58,32,16,0.55);outline-offset:2px}
.copy-tip{
  position:absolute;top:100%;left:0;
  font-size:0.72rem;text-transform:uppercase;letter-spacing:1.5px;
  color:#6b5a30;white-space:nowrap;pointer-events:none;
  opacity:0;transition:opacity 0.25s;
}
.copy-tip:not(:empty){opacity:1}
.contact-value:has(.copy-tip:not(:empty))::after{opacity:0}
.motion-toggle{
  position:fixed;right:72px;bottom:18px;z-index:20;
  min-width:46px;height:46px;padding:0 14px;
  border:1px solid rgba(139,119,70,0.7);
  background:linear-gradient(rgba(250,240,216,0.82),rgba(232,213,160,0.82)),var(--paper-texture);
  color:var(--ink);
  font-family:'EB Garamond',Georgia,'Times New Roman',serif;
  font-size:0.8rem;font-weight:700;letter-spacing:1.5px;text-transform:uppercase;
  cursor:var(--cursor-pointer);
  box-shadow:0 8px 24px rgba(0,0,0,0.35),inset 0 0 22px rgba(120,90,40,0.08);
}
.motion-toggle:hover{border-color:var(--brass)}
.motion-toggle:focus-visible{outline:2px solid rgba(249,236,199,0.85);outline-offset:3px}
@media(max-width:480px){.motion-toggle{right:60px;bottom:10px;height:42px;padding:0 10px}}
/* Lift the floating controls above the folded newspaper bar */
.bgm-toggle,.motion-toggle{z-index:600}
html:has(.newspaper.rolled) .bgm-toggle,
html:has(.newspaper.rolled) .motion-toggle{bottom:84px}

/* Keep fallback serif metrics close to the web fonts to avoid layout shift */
h1,h2,h3,.masthead-title,.section-title,.modal-title{font-size-adjust:from-font}

/* === TYPOGRAPHY === */
h1,h2,h3,.masthead-title,.section-title,.modal-title,.hero-headline{text-wrap:balance}
.body-text{hyphens:auto;text-wrap:pretty}
