/* Digital Epigraphy & Archaeology — main stylesheet
   Palette: warm parchment and ink, with a terracotta accent taken from the project logo.
   Themes: follows the system setting; overridden by [data-theme="light"|"dark"] on <html>. */

/* ---- Fonts (self-hosted, subsetted; only the subsets a page needs are downloaded) ---- */
@font-face{font-family:"Source Serif 4";font-style:normal;font-weight:200 900;font-display:swap;src:url(/assets/fonts/source-serif-4-latin-wght-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Source Serif 4";font-style:normal;font-weight:200 900;font-display:swap;src:url(/assets/fonts/source-serif-4-latin-ext-wght-normal.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Source Serif 4";font-style:normal;font-weight:200 900;font-display:swap;src:url(/assets/fonts/source-serif-4-greek-wght-normal.woff2) format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}
@font-face{font-family:"Source Serif 4";font-style:italic;font-weight:200 900;font-display:swap;src:url(/assets/fonts/source-serif-4-latin-wght-italic.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Inter";font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/fonts/inter-latin-wght-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Inter";font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/fonts/inter-latin-ext-wght-normal.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Inter";font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/fonts/inter-greek-wght-normal.woff2) format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}

/* ---- Tokens ---- */
:root{
  --bg:#faf8f4; --surface:#ffffff; --surface-2:#f2eee6; --text:#1d1b19; --muted:#5b554c; --border:#d9d1c3;
  --accent:#a3341a; --accent-hover:#862a15; --on-accent:#ffffff; --accent-soft:#f6e4dc; --link:#9a2f16;
  --focus:#1a4fb0; --mark:#ffe08a; --shadow:0 1px 2px rgba(40,30,20,.06),0 6px 20px rgba(40,30,20,.06);
  --hero-glow:radial-gradient(60rem 30rem at 85% -10%,rgba(163,52,26,.10),transparent 70%),radial-gradient(40rem 24rem at -5% 30%,rgba(190,150,80,.12),transparent 70%);
  --font-serif:"Source Serif 4","Iowan Old Style","Palatino Linotype",Palatino,Georgia,"Times New Roman",serif;
  --font-sans:"Inter",system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --font-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;
  --wrap:74rem; --prose:42rem; --radius:.75rem; --radius-sm:.5rem; --header-h:4.25rem;
  color-scheme:light;
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --bg:#14120f; --surface:#1d1a16; --surface-2:#26221d; --text:#efe9df; --muted:#b8b0a3; --border:#3b362e;
    --accent:#f0956d; --accent-hover:#f7ad8a; --on-accent:#1a0f0a; --accent-soft:#3a251c; --link:#f2a27f;
    --focus:#8db6ff; --mark:#6b5514; --shadow:0 1px 2px rgba(0,0,0,.4),0 6px 20px rgba(0,0,0,.35);
    --hero-glow:radial-gradient(60rem 30rem at 85% -10%,rgba(240,149,109,.12),transparent 70%),radial-gradient(40rem 24rem at -5% 30%,rgba(190,150,80,.08),transparent 70%);
    color-scheme:dark;
  }
}
:root[data-theme="dark"]{
  --bg:#14120f; --surface:#1d1a16; --surface-2:#26221d; --text:#efe9df; --muted:#b8b0a3; --border:#3b362e;
  --accent:#f0956d; --accent-hover:#f7ad8a; --on-accent:#1a0f0a; --accent-soft:#3a251c; --link:#f2a27f;
  --focus:#8db6ff; --mark:#6b5514; --shadow:0 1px 2px rgba(0,0,0,.4),0 6px 20px rgba(0,0,0,.35);
  --hero-glow:radial-gradient(60rem 30rem at 85% -10%,rgba(240,149,109,.12),transparent 70%),radial-gradient(40rem 24rem at -5% 30%,rgba(190,150,80,.08),transparent 70%);
  color-scheme:dark;
}

/* ---- Base ---- */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-padding-top:calc(var(--header-h) + 1rem);scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--text);font-family:var(--font-sans);font-size:1rem;line-height:1.6;min-height:100vh;display:flex;flex-direction:column;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
main{flex:1}
main:focus{outline:none}
img,svg,video{max-width:100%;height:auto}
a{color:var(--link);text-underline-offset:.18em;text-decoration-thickness:.08em}
a:hover{color:var(--accent-hover);text-decoration-thickness:.14em}
:focus-visible{outline:3px solid var(--focus);outline-offset:2px;border-radius:.25rem}
[hidden]{display:none !important}
h1,h2,h3,h4{font-family:var(--font-serif);line-height:1.2;font-weight:600;margin:0 0 .6em;text-wrap:balance}
h1{font-size:clamp(2rem,1.3rem + 2.6vw,3.25rem);letter-spacing:-.01em}
h2{font-size:clamp(1.5rem,1.2rem + 1.1vw,2.05rem)}
h3,.h3{font-size:1.3rem;font-family:var(--font-serif);font-weight:600;line-height:1.25}
h4,.h4{font-size:1.05rem;font-family:var(--font-serif);font-weight:600}
p{margin:0 0 1em}
ul,ol{padding-inline-start:1.25rem}
.sr-only{position:absolute !important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.wrap{width:100%;max-width:var(--wrap);margin-inline:auto;padding-inline:clamp(1rem,4vw,2rem)}
.section{padding-block:clamp(2.25rem,5vw,4rem)}
.section--tight{padding-block:1.25rem 0}
.section--alt{background:var(--surface-2)}
.section-head{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin-bottom:1.25rem}
.section-head h2{margin:0}
.more{font-weight:600;text-decoration:none;display:inline-flex;align-items:center;gap:.35rem}
.more:hover{text-decoration:underline}
.muted{color:var(--muted)}
.center{text-align:center}
.amp{font-style:italic;color:var(--accent)}
.eyebrow{font-size:.8rem;font-weight:600;letter-spacing:.09em;text-transform:uppercase;color:var(--muted);margin-bottom:.9rem}
.lede{font-family:var(--font-serif);font-size:clamp(1.1rem,1rem + .5vw,1.35rem);line-height:1.5;color:var(--muted);max-width:52rem}
.note{padding:.85rem 1rem;border-left:4px solid var(--accent);background:var(--surface-2);border-radius:0 var(--radius-sm) var(--radius-sm) 0;max-width:var(--prose)}
.notice{padding:1rem 1.15rem;border:1px solid var(--border);background:var(--surface-2);border-radius:var(--radius);margin:1.5rem 0}
.notice p{margin:0}
.empty{padding:2rem;text-align:center;color:var(--muted)}
.icon{width:1.15em;height:1.15em;flex:none;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;vertical-align:-.2em}

/* ---- Skip link ---- */
.skip-link{position:absolute;left:1rem;top:-4rem;z-index:100;background:var(--accent);color:var(--on-accent);padding:.7rem 1.1rem;border-radius:var(--radius-sm);font-weight:600;text-decoration:none;transition:top .15s}
.skip-link:focus{top:1rem;color:var(--on-accent)}

/* ---- Buttons, chips, badges ---- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;min-height:2.75rem;padding:.55rem 1.1rem;border-radius:999px;border:1.5px solid var(--border);background:var(--surface);color:var(--text);font:600 .95rem/1.2 var(--font-sans);text-decoration:none;cursor:pointer;transition:background .15s,border-color .15s,color .15s}
.btn:hover{border-color:var(--accent);color:var(--accent-hover);background:var(--surface)}
.btn--primary{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
.btn--primary:hover{background:var(--accent-hover);border-color:var(--accent-hover);color:var(--on-accent)}
.btn--ghost{background:transparent}
.btn--sm{min-height:2.5rem;padding:.4rem .9rem;font-size:.88rem}
.btn--lg{min-height:3.1rem;padding:.7rem 1.4rem;font-size:1rem}
.actions{display:flex;flex-wrap:wrap;gap:.6rem;margin:1.25rem 0 0}
.icon-btn{display:inline-flex;align-items:center;justify-content:center;width:2.75rem;height:2.75rem;border-radius:999px;border:1.5px solid transparent;background:transparent;color:var(--text);cursor:pointer;text-decoration:none;position:relative}
.icon-btn:hover{background:var(--surface-2);color:var(--accent-hover)}
.icon-btn .icon{width:1.35rem;height:1.35rem}
.chip{display:inline-flex;align-items:center;gap:.4rem;min-height:2.25rem;padding:.25rem .8rem;border-radius:999px;border:1.5px solid var(--border);background:var(--surface);color:var(--text);font:500 .88rem/1.2 var(--font-sans);text-decoration:none}
a.chip:hover{border-color:var(--accent);color:var(--accent-hover)}
.chip--btn{cursor:pointer;min-height:2.75rem;padding-inline:1rem}
.chip--btn[aria-pressed="true"]{background:var(--accent);border-color:var(--accent);color:var(--on-accent)}
.chip .count{font-size:.78rem;opacity:.85}
.chip-list{list-style:none;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:.5rem}
.badge{display:inline-block;padding:.12rem .6rem;border-radius:999px;background:var(--accent-soft);color:var(--text);font:600 .72rem/1.5 var(--font-sans);letter-spacing:.05em;text-transform:uppercase;border:1px solid var(--border)}

/* ---- Header ---- */
.site-header{position:sticky;top:0;z-index:50;background:color-mix(in srgb,var(--bg) 92%,transparent);-webkit-backdrop-filter:saturate(1.4) blur(10px);backdrop-filter:saturate(1.4) blur(10px);border-bottom:1px solid var(--border)}
.header-inner{display:flex;align-items:center;gap:1rem;min-height:var(--header-h);flex-wrap:wrap;padding-block:.35rem}
.brand{display:flex;align-items:center;gap:.7rem;text-decoration:none;color:var(--text);margin-inline-end:auto}
.brand:hover{color:var(--text)}
.brand-mark{border-radius:.5rem;flex:none}
.brand-text{display:flex;flex-direction:column;line-height:1.15}
.brand{min-width:0}
.brand-name{font:600 1.05rem/1.15 var(--font-serif)}
.brand-sub{font-size:.72rem;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.site-nav{order:3;width:100%}
.site-nav ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:.15rem}
.site-nav a{display:flex;align-items:center;min-height:2.75rem;padding:.4rem .85rem;border-radius:999px;color:var(--text);text-decoration:none;font-weight:500;font-size:.95rem}
.site-nav a:hover{background:var(--surface-2);color:var(--accent-hover)}
.site-nav a[aria-current="page"]{background:var(--accent-soft);font-weight:600;box-shadow:inset 0 -2px 0 var(--accent)}
.header-tools{display:flex;align-items:center;gap:.25rem}
.header-search{display:none;position:relative;align-items:center}
.header-search input{width:10rem;min-height:2.6rem;padding:.4rem 2.7rem .4rem 1rem;border-radius:999px;border:1.5px solid var(--border);background:var(--surface);color:var(--text);font:inherit;font-size:.92rem}
.header-search input:focus-visible{outline-offset:1px}
.header-search .icon-btn{position:absolute;right:.1rem;width:2.4rem;height:2.4rem}
.theme-icons .icon,.nav-toggle-icons .icon{display:none}
#theme-toggle[data-theme-state="auto"] .icon:nth-child(1),#theme-toggle[data-theme-state="light"] .icon:nth-child(2),#theme-toggle[data-theme-state="dark"] .icon:nth-child(3){display:block}
.nav-toggle[aria-expanded="false"] .icon:nth-child(1),.nav-toggle[aria-expanded="true"] .icon:nth-child(2){display:block}
.js .site-nav{display:none}
.js .site-nav.is-open{display:block;padding-bottom:.75rem}
.js .site-nav.is-open ul{flex-direction:column}
@media (min-width:70rem){
  .site-nav,.js .site-nav{display:block;order:0;width:auto}
  .brand{margin-inline-end:0}
  .site-nav{margin-inline-start:auto}
  .site-nav ul{flex-wrap:nowrap}
  .brand-name{white-space:nowrap}
  .brand{flex:none}
  .header-search{display:flex}
  .search-link,.nav-toggle{display:none !important}
  .header-inner{flex-wrap:nowrap}
}

/* ---- Footer ---- */
.site-footer{margin-top:4rem;background:var(--surface-2);border-top:1px solid var(--border);font-size:.94rem}
.footer-grid{display:grid;gap:2rem;padding-block:2.5rem;grid-template-columns:1fr}
@media (min-width:48rem){.footer-grid{grid-template-columns:1.6fr 1fr 1fr}}
.footer-title{font:600 1.05rem var(--font-serif);margin-bottom:.6rem}
.footer-nav ul{list-style:none;margin:0;padding:0}
.footer-nav li{margin:.1rem 0}
.footer-nav a{display:inline-flex;align-items:center;min-height:2.25rem}
.site-footer address{font-style:normal;color:var(--muted);margin-bottom:.75rem}
.footer-base{border-top:1px solid var(--border);padding-block:1.1rem;color:var(--muted);font-size:.85rem}
.footer-base p{margin:0}

/* ---- Page heads / breadcrumbs ---- */
.page-head{padding-block:clamp(1.5rem,4vw,3rem) 0.5rem;background:var(--hero-glow)}
.page-head h1{margin-bottom:.4em}
.breadcrumb{font-size:.86rem;color:var(--muted);margin-bottom:1rem}
.breadcrumb ol{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:.25rem}
.breadcrumb li+li::before{content:"/";margin-inline-end:.35rem;color:var(--border)}
.breadcrumb a{color:var(--muted)}
@media (max-width:39.99rem){.breadcrumb li:last-child{flex-basis:100%}.breadcrumb li:last-child::before{display:none}}
.breadcrumb a:hover{color:var(--accent-hover)}
.kicker{font-size:.82rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);margin:0 0 .5rem}
.kicker-date{text-transform:none;letter-spacing:0;font-weight:500;margin-inline-start:.4rem}
.list-tools{margin-bottom:1.5rem}

/* ---- Home ---- */
.hero{background:var(--hero-glow);padding-block:clamp(2.5rem,7vw,5.5rem) clamp(1rem,3vw,2rem)}
.hero-grid{display:grid;gap:2.25rem;align-items:center}
@media (min-width:60rem){.hero-grid{grid-template-columns:1.15fr .85fr;gap:3.5rem}}
.hero h1{font-size:clamp(2.4rem,1.4rem + 4vw,4.25rem);line-height:1.05;margin-bottom:.35em}
.hero-lede{font:italic 500 clamp(1.2rem,1.05rem + .8vw,1.6rem)/1.35 var(--font-serif);color:var(--muted);margin-bottom:1rem}
.hero-text{max-width:38rem;font-size:1.05rem}
.hero-actions{display:flex;flex-wrap:wrap;gap:.7rem;margin-top:1.75rem}
.hero-figure{margin:0}
.hero-figure img{border-radius:var(--radius);width:100%;border:1px solid var(--border);box-shadow:var(--shadow);background:var(--surface-2)}
.hero-figure figcaption{font-size:.85rem;color:var(--muted);margin-top:.6rem}
.stats{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(9rem,1fr));gap:.75rem}
.stats a{display:flex;flex-direction:column;padding:1rem 1.1rem;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);text-decoration:none;color:var(--text);min-height:4.5rem}
.stats a:hover{border-color:var(--accent)}
.stat-n{font:600 1.9rem/1 var(--font-serif);color:var(--accent)}
.stat-l{font-size:.85rem;color:var(--muted);margin-top:.25rem}
.band{display:grid;gap:2rem;align-items:center}
@media (min-width:60rem){.band{grid-template-columns:1fr 1fr;gap:3rem}}
.section--band{background:var(--surface-2);border-block:1px solid var(--border)}
.band-figure{margin:0}
.band-figure img{border-radius:var(--radius);border:1px solid var(--border);box-shadow:var(--shadow)}
.partners{list-style:none;padding:0;margin:1rem 0 1.5rem;display:flex;flex-wrap:wrap;gap:.5rem}
.partners li{padding:.3rem .85rem;border:1px solid var(--border);border-radius:999px;background:var(--surface);font-size:.9rem}

/* ---- Cards & grids ---- */
.grid{display:grid;gap:1.25rem;grid-template-columns:repeat(auto-fill,minmax(min(100%,19.5rem),1fr))}
.grid-item{display:contents}
.card{position:relative;display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;transition:transform .18s,box-shadow .18s,border-color .18s;height:100%}
.card:hover{border-color:var(--accent);box-shadow:var(--shadow);transform:translateY(-2px)}
.card-media{aspect-ratio:16/10;background:var(--surface-2);overflow:hidden;border-bottom:1px solid var(--border)}
.card-media img{width:100%;height:100%;object-fit:cover;display:block}
.card-body{padding:1rem 1.15rem 1.25rem;display:flex;flex-direction:column;flex:1}
.card-title{font-size:1.15rem;margin:.1rem 0 .5rem}
.card-link{color:var(--text);text-decoration:none}
.card-link:hover{color:var(--accent-hover);text-decoration:underline}
.card-link::after{content:"";position:absolute;inset:0}
.card-link:focus-visible{outline:none}
.card-link:focus-visible::after{outline:3px solid var(--focus);outline-offset:2px;border-radius:var(--radius)}
.card-desc{color:var(--muted);font-size:.93rem;margin:0}
.card .kicker{font-size:.74rem}

/* ---- Toolbar / filters ---- */
.toolbar{display:grid;gap:1rem;margin-bottom:1.75rem;padding:1rem 1.15rem;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface)}
@media (min-width:52rem){.toolbar{grid-template-columns:minmax(14rem,20rem) 1fr;align-items:end}.toolbar .filter-status{grid-column:1/-1}}
.field label,.search-label{display:block;font-weight:600;font-size:.9rem;margin-bottom:.35rem}
input[type="search"],input[type="text"]{width:100%;min-height:2.9rem;padding:.55rem 1rem;border-radius:var(--radius-sm);border:1.5px solid var(--border);background:var(--bg);color:var(--text);font:inherit}
input[type="search"]:focus-visible{outline-offset:1px}
fieldset{border:0;padding:0;margin:0;min-width:0}
legend{font-weight:600;font-size:.9rem;padding:0;margin-bottom:.4rem}
.chips{display:flex;flex-wrap:wrap;gap:.45rem;align-items:center}
.chips legend{float:left;margin:0 .6rem 0 0;line-height:2.75rem}
.filter-status{margin:0;font-size:.88rem;color:var(--muted)}

/* ---- Publications ---- */
.year-group{margin-bottom:2rem}
.year-h{font-size:1.6rem;padding-bottom:.35rem;border-bottom:2px solid var(--border);margin-bottom:.5rem;color:var(--accent)}
.pub-list{list-style:none;padding:0;margin:0}
.pub{padding:1.15rem 0;border-bottom:1px solid var(--border)}
.pub:last-child{border-bottom:0}
.pub-title{font-size:1.2rem;margin:0 0 .25rem}
.pub-title a{color:var(--text);text-decoration:none}
.pub-title a:hover{color:var(--accent-hover);text-decoration:underline}
.pub-authors{margin:0 0 .3rem;color:var(--text);font-size:.95rem}
.pub-venue{margin:0 0 .5rem;color:var(--muted);font-size:.9rem}
.pub-links{list-style:none;margin:0;padding:0;display:flex;gap:.5rem;flex-wrap:wrap}
.pub-links a{display:inline-flex;align-items:center;min-height:2.25rem;padding:.15rem .8rem;border:1.5px solid var(--border);border-radius:999px;font-size:.85rem;font-weight:600;text-decoration:none;color:var(--link);background:var(--surface)}
.pub-links a:hover{border-color:var(--accent);color:var(--accent-hover)}
.pub-list--flat .pub:first-child{padding-top:0}

/* ---- Article ---- */
.article{padding-block:1.5rem 3rem}
.article-header{max-width:54rem;margin-bottom:2rem}
.article-title{margin-bottom:.3em}
.article-authors{font-size:1.1rem;font-weight:500;margin-bottom:.75rem}
.article-layout{display:grid;gap:2.5rem}
@media (min-width:64rem){.article-layout{grid-template-columns:minmax(0,1fr) 19rem;gap:3.5rem;align-items:start}.article-aside{position:sticky;top:calc(var(--header-h) + 1.25rem)}}
.article-main{min-width:0}
.hero-figure:not(.hero-figure--home){margin:0 0 2rem}
.article .hero-figure img{width:100%;max-height:30rem;object-fit:contain;background:var(--surface-2)}
.prose{font-family:var(--font-serif);font-size:1.125rem;line-height:1.7;max-width:var(--prose)}
.prose--page{max-width:46rem}
.prose>*:first-child{margin-top:0}
.prose h2{margin-top:2.2rem;font-size:1.6rem}
.prose h3{margin-top:1.8rem}
.prose p{margin-bottom:1.1em}
.prose ul,.prose ol{margin-bottom:1.1em}
.prose li{margin-bottom:.4em}
.prose a{overflow-wrap:anywhere}
.prose sup{font-size:.7em;line-height:0}
.prose sup a{padding:0 .1rem}
.prose--page{font-family:var(--font-sans);font-size:1.02rem}
.figure{margin:1.75rem 0}
.figure img{border-radius:var(--radius-sm);border:1px solid var(--border);background:var(--surface-2);display:block;max-width:100%;height:auto}
.figure figcaption{font:.88rem/1.5 var(--font-sans);color:var(--muted);margin-top:.55rem}
.embed{width:100%;min-width:0;position:relative;aspect-ratio:var(--ratio,16/9);min-height:11rem;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}
.embed iframe{position:absolute;inset:0;width:100%;height:100%;border:0;background:#fff}
.embed-inner{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.6rem;padding:1rem;text-align:center;font-family:var(--font-sans);overflow:auto}
.embed-title{margin:0;font-weight:600;max-width:32rem}
.embed-link{font-size:.9rem}
.embed-note{margin:0;font-size:.8rem;color:var(--muted);max-width:30rem}
.table-wrap{overflow-x:auto;margin:1.5rem 0;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface)}
table{border-collapse:collapse;width:100%;font:.93rem/1.45 var(--font-sans)}
th,td{padding:.65rem .85rem;text-align:left;vertical-align:top;border-bottom:1px solid var(--border)}
thead th{background:var(--surface-2);font-weight:600;white-space:nowrap}
tbody tr:last-child>*{border-bottom:0}
.num{text-align:right;white-space:nowrap}
pre.code{font:.85rem/1.55 var(--font-mono);background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius-sm);padding:.9rem 1rem;overflow-x:auto;white-space:pre-wrap;overflow-wrap:anywhere;margin:1rem 0}
.gallery-section,.cite,.tags,.share{margin-top:2.5rem;max-width:var(--prose)}
.gallery{list-style:none;margin:0;padding:0;display:grid;gap:1rem;grid-template-columns:repeat(auto-fill,minmax(min(100%,14rem),1fr))}
.gallery .figure{margin:0}
.cite-block{margin-bottom:1.25rem}
.cite-text{font-family:var(--font-serif);font-size:1rem;padding:.9rem 1rem;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius-sm);overflow-wrap:anywhere}
.share-list{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:.5rem}
.facts,.related{margin-bottom:2rem}
.facts dl{margin:0}
.facts dl>div{padding:.55rem 0;border-bottom:1px solid var(--border)}
.facts dt{font-size:.75rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);font-weight:600}
.facts dd{margin:.1rem 0 0;font-size:.95rem;overflow-wrap:anywhere}
.related-list{list-style:none;margin:0;padding:0}
.related-list li{padding:.6rem 0;border-bottom:1px solid var(--border);display:flex;flex-direction:column}
.related-list a{font-family:var(--font-serif);font-weight:600;color:var(--text);text-decoration:none}
.related-list a:hover{color:var(--accent-hover);text-decoration:underline}
.related-type{font-size:.75rem;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}
.pager{display:grid;gap:1rem;grid-template-columns:1fr;margin-top:3.5rem;padding-top:1.5rem;border-top:1px solid var(--border)}
@media (min-width:40rem){.pager{grid-template-columns:1fr 1fr}}
.pager-link{display:flex;flex-direction:column;padding:1rem 1.15rem;border:1px solid var(--border);border-radius:var(--radius);text-decoration:none;color:var(--text);background:var(--surface)}
.pager-link:hover{border-color:var(--accent)}
.pager-next{text-align:right;grid-column:2}
.pager-label{font-size:.75rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
.pager-title{font:600 1rem/1.3 var(--font-serif)}
@media (max-width:39.99rem){.pager-next{grid-column:1}}

/* ---- Social posts ---- */
.posts{display:grid;gap:1.1rem;grid-template-columns:repeat(auto-fill,minmax(min(100%,22rem),1fr));align-items:start}
.post{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1.1rem 1.15rem;display:flex;flex-direction:column;gap:.7rem;min-width:0}
.post-head{display:flex;gap:.75rem;align-items:center}
.avatar{border-radius:50%;width:3rem;height:3rem;object-fit:cover;background:var(--surface-2);flex:none}
.post-name{margin:0;font-weight:600;line-height:1.25}
.post-name a{color:var(--text);text-decoration:none}
.post-name a:hover{text-decoration:underline}
.post-handle{font-weight:400;color:var(--muted);font-size:.9rem;overflow-wrap:anywhere}
.post-meta{margin:.15rem 0 0;font-size:.82rem;color:var(--muted)}
.post-text{overflow-wrap:anywhere;font-size:.98rem}
.post-media{margin:0}
.post-media img{width:100%;height:auto;border-radius:var(--radius-sm);border:1px solid var(--border);display:block}
.post-source{margin:0;font-size:.88rem}
.post .figure{margin:0}

/* ---- About ---- */
.about-layout{display:grid;gap:2rem;grid-template-columns:minmax(0,1fr)}
.about-main{min-width:0}
@media (min-width:60rem){.about-layout{grid-template-columns:14rem minmax(0,1fr);gap:3.5rem;align-items:start}.toc{position:sticky;top:calc(var(--header-h) + 1.25rem)}}
.toc-title{font-weight:600;font-size:.8rem;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);margin-bottom:.5rem}
.toc ul{list-style:none;margin:0;padding:0;border-left:2px solid var(--border)}
.toc a{display:block;padding:.4rem .9rem;text-decoration:none;color:var(--text);min-height:2.25rem}
.toc a:hover{color:var(--accent-hover);background:var(--surface-2)}
.about-main section{margin-bottom:3rem;max-width:52rem}
.timeline{list-style:none;margin:1.25rem 0 1.5rem;padding:0;border-left:2px solid var(--border)}
.timeline li{position:relative;display:grid;grid-template-columns:5rem minmax(0,1fr);gap:1rem;padding:0 0 1.5rem 1.4rem}
.timeline li::before{content:"";position:absolute;left:-.45rem;top:.4rem;width:.8rem;height:.8rem;border-radius:50%;background:var(--accent);border:2px solid var(--bg)}
.timeline li>div{min-width:0}
@media (max-width:29.99rem){.timeline li{grid-template-columns:minmax(0,1fr);gap:.15rem}}
.timeline-year{font:600 1.15rem var(--font-serif);color:var(--accent)}
.timeline p{margin-bottom:.5rem}
.people{list-style:none;margin:0;padding:0;display:grid;gap:.9rem;grid-template-columns:repeat(auto-fill,minmax(min(100%,16rem),1fr))}
.people li{padding:1rem 1.1rem;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface)}
.people h3{font-size:1.05rem;margin-bottom:.3rem}
.people p{margin:0;font-size:.92rem;color:var(--muted)}
.people--lead{grid-template-columns:repeat(auto-fill,minmax(min(100%,22rem),1fr))}
.people--lead li{border-color:var(--accent)}
.people--lead h3{font-size:1.25rem}
.bullets{padding-inline-start:1.25rem}

/* ---- Search ---- */
.search-form{margin-bottom:2rem;max-width:44rem}
.search-row{display:flex;gap:.6rem;flex-wrap:wrap}
.search-row input{flex:1 1 16rem;min-height:3.1rem;font-size:1.05rem}
.search-layout{display:grid;gap:2rem;grid-template-columns:minmax(0,1fr)}
@media (min-width:60rem){.search-layout{grid-template-columns:15rem minmax(0,1fr);gap:3rem;align-items:start}.search-filters{position:sticky;top:calc(var(--header-h) + 1.25rem)}}
.search-filters fieldset{margin-bottom:1.25rem}
.check-list{display:flex;flex-direction:column;gap:.1rem}
.check-list label{display:flex;align-items:center;gap:.6rem;min-height:2.5rem;cursor:pointer}
.check-list input{width:1.15rem;height:1.15rem;accent-color:var(--accent);flex:none}
.check-list .count{color:var(--muted);font-size:.85rem;margin-inline-start:auto}
.active-tag{margin-top:.5rem}
.search-status{color:var(--muted);margin-bottom:1rem}
.results{list-style:none;margin:0;padding:0}
.result{padding:1.15rem 0;border-bottom:1px solid var(--border)}
.result:first-child{padding-top:0}
.result-head{display:flex;gap:.6rem;align-items:baseline;flex-wrap:wrap;margin-bottom:.25rem}
.result-title{font-size:1.2rem;margin:0}
.result-title a{color:var(--text);text-decoration:none}
.result-title a:hover{color:var(--accent-hover);text-decoration:underline}
.result-meta{margin:0 0 .35rem;font-size:.88rem;color:var(--muted)}
.result-snippet{margin:0 0 .5rem;font-size:.95rem;overflow-wrap:anywhere}
mark{background:var(--mark);color:inherit;padding:0 .12em;border-radius:.2em}

/* ---- Motion, contrast, print ---- */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{transition-duration:.001ms !important;animation-duration:.001ms !important}
  .card:hover{transform:none}
}
@media (prefers-contrast:more){
  :root{--border:#6b645a}
  .btn,.chip,.card,.post,.pager-link{border-width:2px}
}
@media (forced-colors:active){
  .btn,.chip,.card,.post,.pager-link,.stats a,.people li{border:1px solid CanvasText}
  .chip--btn[aria-pressed="true"]{forced-color-adjust:none;background:Highlight;color:HighlightText;border-color:Highlight}
  .site-nav a[aria-current="page"]{forced-color-adjust:none;background:Highlight;color:HighlightText}
  :focus-visible{outline:3px solid Highlight}
  mark{forced-color-adjust:none;background:Mark;color:MarkText}
}
@media print{
  :root{--bg:#fff;--surface:#fff;--surface-2:#fff;--text:#000;--muted:#333;--border:#999;--link:#000}
  .site-header,.site-footer,.toolbar,.share,.pager,.skip-link,.embed-load,.hero-actions,.actions,.toc,.search-filters{display:none !important}
  body{font-size:11pt}
  .prose a[href^="http"]::after{content:" (" attr(href) ")";font-size:.85em;overflow-wrap:anywhere}
  .article-layout{display:block}
  .card,.post,.pub{break-inside:avoid}
}
