/* Buzzardhut: one stylesheet for every page. */

@font-face { font-family: "Source Serif 4"; src: url("fonts/source-serif-4.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("fonts/source-serif-4-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("fonts/barlow-condensed-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("fonts/barlow-condensed-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("fonts/barlow-condensed-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "UnifrakturMaguntia"; src: url("fonts/unifraktur-maguntia.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --vinyl: #1b2330;      /* padded binder */
  --vinyl-2: #232d3d;
  --vinyl-seam: #0e131b;
  --foil: #c8a24a;       /* gold stamping */
  --foil-dim: #a8873b;
  --ground: #bcd0de;     /* reading ground: a light tint of the eagle's steel blue (#3c6980) */
  --ground-seam: #8fa9bc;
  --label: #f7f6f2;      /* J-card label stock: cards and lists laid on the ground */
  --paper: #ffffff;
  --rule: #b8322a;       /* red index ruling (lines) */
  --rule-text: #9e2a22;  /* red as text on the blue ground */
  --rule-soft: #e6cdc8;
  --here: #356a90;       /* reserved: you are here / now playing */
  --here-soft: #dce7ef;
  --ink: #17140f;
  --ink-2: #2f3d4a;
  --on-vinyl: #e6e9ee;
  --on-vinyl-2: #aeb6c2;
  --label-font: "Barlow Condensed", "Arial Narrow", sans-serif-condensed, sans-serif;
  --read-font: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mark-font: "UnifrakturMaguntia", "Old English Text MT", serif;
  --measure: 68ch;
  --gutter: clamp(1rem, 4vw, 4rem);
  --mast-h: 8rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 400 1.125rem/1.65 var(--read-font);
  text-rendering: optimizeLegibility; font-kerning: normal;
}
::selection { background: var(--here); color: #fff; }
:focus-visible { outline: 3px solid var(--here); outline-offset: 3px; border-radius: 2px; }
html { scrollbar-color: var(--foil-dim) var(--vinyl); }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 50; background: var(--foil); color: var(--vinyl);
  font: 700 1rem/1 var(--label-font); letter-spacing: .12em; text-transform: uppercase; padding: .8rem 1rem; text-decoration: none; }
.skip:focus { top: 1rem; }

/* ---------- Masthead: navy vinyl, stamped in foil ---------- */
.mast {
  position: relative; display: flex; align-items: center; gap: 1.5rem;
  min-height: var(--mast-h); padding: .75rem var(--gutter);
  background: var(--vinyl);
  box-shadow: inset 0 -1px 0 var(--vinyl-seam);
}
.brand { display: flex; align-items: center; gap: .9rem; text-decoration: none; color: var(--foil); }
.brand img { width: 5.6rem; height: auto; background: #000; padding: .35rem .5rem; box-shadow: 0 0 0 1px var(--vinyl-seam); }
.brand span { font: 400 clamp(2.1rem, 4.2vw, 3.3rem)/1 var(--mark-font); letter-spacing: .01em;
  color: var(--foil); }
.nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: .25rem 1.9rem;
  font: 600 1.05rem/1 var(--label-font); letter-spacing: .14em; text-transform: uppercase; }
.nav a { color: var(--on-vinyl); text-decoration: none; padding: .55rem 0 .45rem; border-bottom: 3px solid transparent; }
.nav a:hover { color: #fff; border-bottom-color: var(--foil-dim); }
.nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--here); }
.navtoggle { display: none; }

/* ---------- Page layout ---------- */
.layout { display: block; }
.layout.has-side { display: grid; grid-template-columns: minmax(19rem, 27rem) minmax(0, 1fr); align-items: start; }
.col { padding: 2.5rem var(--gutter) 5rem; min-width: 0; }
.col > * { max-width: var(--measure); }
.col > .tw { max-width: min(100%, 62rem); }
.col > .wide, .col > table, .col > div:has(> table), .col > center, .col > form { max-width: none; }

.crumb { font: 600 .9rem/1.2 var(--label-font); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 1.1rem; }
.crumb a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule); }
.crumb a:hover { color: var(--rule-text); }

/* ---------- Reading column (calm) ---------- */
.col h1, .col h2, .col h3, .col h4, .col h5, .col h6 { font-family: var(--label-font); color: var(--ink); text-wrap: balance; line-height: 1.08; }
.col h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); font-weight: 700; text-transform: uppercase; letter-spacing: .01em; margin: 0 0 1.4rem; }
.col h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 700; letter-spacing: .01em; margin: 2.6rem 0 .8rem; }
.col h3 { font-size: 1.45rem; font-weight: 600; letter-spacing: .02em; margin: 2.2rem 0 .6rem; }
.col h4, .col h5, .col h6 { font-size: 1.15rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; margin: 2rem 0 .5rem; }
.col h1 + h2 { margin-top: 0; }
.col p { margin: 0 0 1.1em; }
.col ul, .col ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.col li { margin: .25em 0; }
.col li::marker { color: var(--rule); }
.col b, .col strong { font-weight: 650; }
.col a { color: var(--ink); text-decoration-line: underline; text-decoration-color: var(--rule);
  text-decoration-thickness: 1px; text-underline-offset: .2em; }
.col a:hover { color: var(--rule-text); text-decoration-thickness: 2px; }
.col blockquote { margin: 1.4em 0 1.4em 1.6em; color: #2b2722; }
.col blockquote blockquote { margin: 0; }   /* legacy pages nest blockquotes only to indent */
.col blockquote cite, .col cite { font-style: normal; }
.col hr { border: 0; border-top: 1px solid var(--rule); margin: 2.4em 0; }
.col img { max-width: 100%; height: auto; vertical-align: middle; }
.col img.fl { float: left; margin: .3em 1.4em 1em 0; max-width: 45%; }
.col img.fr { float: right; margin: .3em 0 1em 1.4em; max-width: 45%; }
.col .c { text-align: center; }
.col iframe { display: block; width: 100%; max-width: var(--measure); height: auto; aspect-ratio: 16 / 9; border: 0; margin: 1.5em 0; background: var(--vinyl); }
.col audio { width: 100%; max-width: 28rem; margin: .5em 0 1em; display: block; }
.col pre, .col code { font: .92em/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace; }
.col pre { white-space: pre-wrap; background: var(--paper); border: 1px solid var(--rule-soft); padding: 1em; }
.col sup { line-height: 0; }
.col::after { content: ""; display: block; clear: both; }

/* Tables: hairline ruled, condensed heads, scroll when too wide */
.tw { overflow-x: auto; margin: 1.5em 0; -webkit-overflow-scrolling: touch; }
.col table { border-collapse: collapse; font-size: .98rem; line-height: 1.5; }
.col table.ruled td, .col table.ruled th { border: 1px solid var(--ground-seam); }
.col td, .col th { padding: .45em .7em; vertical-align: top; }
.col th { font: 600 .95rem/1.2 var(--label-font); letter-spacing: .1em; text-transform: uppercase; text-align: left; border-bottom: 2px solid var(--rule); }
.col caption { font: 600 1rem var(--label-font); letter-spacing: .1em; text-transform: uppercase; text-align: left; padding-bottom: .4em; }

/* Forms (scripture search, legacy order forms) */
.col input[type="text"], .col input[type="search"], .col input:not([type]), .col select, .col textarea {
  font: 1rem/1.3 var(--read-font); color: var(--ink); background: var(--paper);
  border: 1px solid #b9b2a6; padding: .55em .7em; max-width: 100%; }
.col input[type="submit"], .col button, .btn {
  font: 700 .95rem/1 var(--label-font); letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink); background: transparent; border: 1.5px solid var(--ink); padding: .7em 1.1em; cursor: pointer; text-decoration: none; display: inline-block; }
.col input[type="submit"]:hover, .col button:hover, .btn:hover { background: var(--ink); color: var(--label); }

/* ---------- Album rail: stamped spine + J-card index ---------- */
.album, .rail { background: var(--vinyl-2); color: var(--on-vinyl); align-self: stretch; }
.album-in, .rail-in { position: sticky; top: 0; max-height: calc(100vh - var(--mast-h)); overflow-y: auto; padding: 1.8rem 1.6rem 0 var(--gutter); scrollbar-width: thin; }
.spine { border: 1.5px solid var(--foil); padding: 1rem 1.2rem .9rem; margin-bottom: 1.2rem; }
.spine h2 { margin: 0; font: 700 clamp(1.7rem, 2.6vw, 2.35rem)/1.02 var(--label-font); letter-spacing: .02em; text-transform: uppercase; color: #fff; text-wrap: balance; }
.spine p { margin: .7rem 0 0; font: 600 .95rem/1.25 var(--label-font); letter-spacing: .14em; text-transform: uppercase; color: var(--foil); }
.jcard { background: var(--label); color: var(--ink); margin: 0 0 1.2rem; border: 1px solid var(--vinyl-seam); }
.jcard h3 { margin: 0; padding: .85rem 1rem .6rem; font: 700 .85rem/1.2 var(--label-font); letter-spacing: .22em; text-transform: uppercase; color: var(--rule); border-bottom: 2px solid var(--rule); }
.jcard ol { list-style: none; margin: 0; padding: 0; }
.jcard li { position: relative; display: grid; grid-template-columns: 1fr auto; border-bottom: 1px solid var(--rule-soft); }
.jcard li:last-child { border-bottom: 0; }
.trk { display: grid; grid-template-columns: 2.4rem 1fr; align-items: baseline; gap: 0; padding: .48rem .3rem .48rem 1rem;
  color: inherit; text-decoration: none; font: 500 1.08rem/1.25 var(--label-font); letter-spacing: .02em; }
.trk .n { font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.trk:hover .t { text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: .18em; }
.dl { display: grid; place-items: center; width: 2.6rem; color: var(--ink-2); }
.dl svg { width: 1.05rem; height: 1.05rem; }
.dl:hover { color: var(--rule); }
.jcard li.now .trk, .jcard li.now .n, .jcard li.now .dl { color: #fff; }
.jcard li.stopped::before { content: ""; position: absolute; left: -1.05rem; top: .5rem; width: .7rem; height: 1.3rem;
  background: var(--here); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 74%, 0 100%); }
.jcard .flagnote { display: block; white-space: nowrap; margin-top: .3rem; font: 600 .78rem/1 var(--label-font); letter-spacing: .14em; text-transform: uppercase; color: var(--here); }
.jcard li.now .flagnote { color: #fff; }

/* The one player */
.player { display: flex; align-items: center; gap: .8rem; }
.player audio { flex: 1; width: 100%; height: 2.6rem; color-scheme: dark; }
.player .np { font: 600 .9rem/1.25 var(--label-font); letter-spacing: .1em; text-transform: uppercase; color: var(--on-vinyl-2); margin: 0 0 .5rem; }
.album .player { display: block; position: sticky; bottom: 0; background: var(--vinyl-2); padding: .9rem 0 1.1rem; border-top: 1px solid var(--vinyl-seam); }
.playerbar { position: fixed; inset: auto 0 0 0; z-index: 40; background: var(--vinyl); border-top: 2px solid var(--foil);
  padding: .6rem var(--gutter) calc(.6rem + env(safe-area-inset-bottom)); }
.playerbar .np { margin: 0 0 .35rem; }
body.has-playerbar { padding-bottom: 6.5rem; }

/* Legacy menus inside a rail (former frames) */
.rail-in { font: 500 1.05rem/1.35 var(--label-font); letter-spacing: .02em; }
.rail-in a { color: var(--on-vinyl); text-decoration: none; }
.rail-in a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--foil); }
.rail-in ul, .rail-in ol { padding-left: 1.1em; }
.rail-in li::marker { color: var(--foil); }
.rail-in img { max-width: 100%; height: auto; }
.rail-in p { margin: .35em 0; }
.rail-in table { width: 100%; }

/* ---------- Home: shelf + directory ---------- */
.col > .home-intro { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1.5rem 3rem; margin-bottom: 2.4rem; max-width: none; }
.home-intro h1 { margin: 0; }
.scripture { display: flex; gap: .5rem; flex-wrap: wrap; align-items: end; }
.scripture label { width: 100%; font: 600 .9rem/1 var(--label-font); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.scripture input[type="text"] { width: 16rem; }
.col .shelf { list-style: none; padding: 0; margin: 0 0 3rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; max-width: none !important; }
.shelf li { margin: 0; }
.shelf a { display: flex; flex-direction: column; justify-content: space-between; min-height: 9.5rem; height: 100%;
  gap: .9rem; background: var(--vinyl-2); color: #fff; text-decoration: none; padding: 1.1rem 1.2rem; border: 1.5px solid var(--vinyl-2);
  outline: 1.5px solid var(--foil-dim); outline-offset: -.55rem; transition: outline-color .3s cubic-bezier(.2,.8,.2,1), background-color .3s cubic-bezier(.2,.8,.2,1); }
.shelf a:hover { outline-color: var(--foil); background: var(--vinyl); color: #fff; }
.shelf .st { font: 700 1.45rem/1.05 var(--label-font); text-transform: uppercase; letter-spacing: .02em; padding: .35rem .35rem 0; text-wrap: balance; }
.shelf .sc { font: 600 .85rem/1 var(--label-font); letter-spacing: .16em; text-transform: uppercase; color: var(--foil); padding: 0 .35rem .3rem; }
.col h2.dir-h { margin: 0 0 1.4rem; }
.dir { columns: 3 17rem; column-gap: 2.6rem; max-width: none !important; }
.dir section { break-inside: avoid; margin: 0 0 2rem; }
.dir h2 { margin: 0 0 .5rem; padding-bottom: .4rem; font-size: 1.3rem; text-transform: uppercase; letter-spacing: .08em; border-bottom: 2px solid var(--rule); }
.dir h2 .no { color: var(--rule); margin-right: .35rem; font-variant-numeric: tabular-nums; }
.col .dir ul { list-style: none; padding: 0; margin: 0; }
.dir li { margin: 0; border-bottom: 1px solid var(--rule-soft); }
.dir li a { display: flex; justify-content: space-between; gap: .6rem; padding: .38rem 0; text-decoration: none; font-size: 1.02rem; line-height: 1.35; }
.dir li a:hover { color: var(--rule); }
.ext { flex: none; width: .85rem; height: .85rem; margin-top: .3rem; color: var(--ink-2); opacity: .7; }
.kind { flex: none; font: 600 .75rem/1.6 var(--label-font); letter-spacing: .12em; color: var(--ink-2); }

/* Library listing (tracts) */
.col .lib { list-style: none; padding: 0; margin: 0; max-width: none !important; columns: 2 22rem; column-gap: 2.6rem; }
.lib li { break-inside: avoid; border-bottom: 1px solid var(--rule-soft); margin: 0; }
.lib a { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; text-decoration: none; }
.lib .kind { margin-top: .2rem; }

/* ---------- Footer ---------- */
.foot { background: var(--vinyl); color: var(--on-vinyl-2); padding: 2.2rem var(--gutter); display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; align-items: center;
  font: 600 .95rem/1.4 var(--label-font); letter-spacing: .12em; text-transform: uppercase; }
.foot .mark { font: 400 1.7rem/1 var(--mark-font); color: var(--foil); letter-spacing: 0; text-transform: none; }
.foot a { color: var(--on-vinyl); text-decoration: none; border-bottom: 1px solid var(--foil-dim); }
.foot a:hover { color: #fff; }

/* ---------- Small screens ---------- */
@media (max-width: 60rem) {
  :root { --mast-h: 4.5rem; }
  .brand img { width: 3.4rem; padding: .2rem .3rem; }
  .navtoggle { display: inline-flex; align-items: center; gap: .5rem; margin-left: auto; background: transparent; color: var(--on-vinyl);
    border: 1.5px solid var(--foil-dim); padding: .55rem .8rem; font: 700 .95rem/1 var(--label-font); letter-spacing: .16em; text-transform: uppercase; cursor: pointer; }
  .navtoggle svg { width: 1rem; height: 1rem; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 30; flex-direction: column; gap: 0;
    background: var(--vinyl); padding: .5rem var(--gutter) 1.2rem; border-bottom: 2px solid var(--foil); }
  .nav.open { display: flex; }
  .nav a { padding: .9rem 0; border-bottom: 1px solid var(--vinyl-2); }
  .nav a[aria-current="page"] { border-bottom-color: var(--here); }
  .layout.has-side { display: block; }
  .album-in, .rail-in { position: static; max-height: none; padding: 1.4rem var(--gutter); }
  .album .player { position: static; }
  .col { padding-top: 1.8rem; }
  .col blockquote { margin-left: .9em; }
  .jcard li.stopped::before { left: -.8rem; width: .55rem; }
  .col .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .shelf a { min-height: 6.6rem; padding: .8rem .85rem; outline-offset: -.4rem; }
  .shelf .st { font-size: 1.05rem; padding: .25rem .25rem 0; }
  .shelf .sc { font-size: .72rem; padding: 0 .25rem .2rem; }
  .col img.fl, .col img.fr { float: none; display: block; margin: 1em auto; max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

@media print {
  .mast, .album, .rail, .foot, .playerbar, .skip { display: none !important; }
  body { background: #fff; }
  .layout.has-side { display: block; }
  .col a::after { content: " (" attr(href) ")"; font-size: .8em; color: #555; }
}

/* ---------- Disclosure for former-frame rails (open on desktop, collapsible on phones) ---------- */
.railbox > summary { display: none; cursor: pointer; list-style: none; align-items: center; justify-content: space-between;
  font: 700 1rem/1 var(--label-font); letter-spacing: .18em; text-transform: uppercase; color: var(--foil); padding: .2rem 0 .9rem; }
.railbox > summary::-webkit-details-marker { display: none; }
.railbox > summary svg { width: 1rem; height: 1rem; transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.railbox[open] > summary svg { transform: rotate(180deg); }

/* ---------- One label grid for every listing: J-card stock on the ground ---------- */
.dir section, .libgroup { background: var(--paper); border: 1px solid var(--rule-soft); padding: 0 1rem .4rem; }
.dir h2, .libgroup h2 { margin: 0 -1rem .3rem; padding: .85rem 1rem .55rem; font: 700 1.05rem/1.2 var(--label-font); letter-spacing: .16em;
  text-transform: uppercase; color: var(--rule); border-bottom: 2px solid var(--rule); }
.dir h2 .no { color: var(--ink-2); }
.dir li:last-child, .lib li:last-child { border-bottom: 0; }
.libgroup { margin: 0 0 2rem; break-inside: avoid; }
.libs { columns: 2 24rem; column-gap: 2rem; max-width: none !important; }
.col .lib { columns: auto; }

/* ---------- The drawn player (drives the one <audio>; native controls are the no-JS fallback) ---------- */
.pctl { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem; }
.pp { width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 0; background: var(--here); color: #fff; display: grid; place-items: center; cursor: pointer; }
.pp:hover { background: #2c5a7b; }
.pp svg { width: .95rem; height: .95rem; }
.seek { -webkit-appearance: none; appearance: none; width: 100%; height: 1.4rem; background: transparent; cursor: pointer; margin: 0; }
.seek::-webkit-slider-runnable-track { height: 3px; background: linear-gradient(var(--here), var(--here)) 0 / var(--p, 0%) 100% no-repeat, #3a475b; }
.seek::-moz-range-track { height: 3px; background: #3a475b; }
.seek::-moz-range-progress { height: 3px; background: var(--here); }
.seek::-webkit-slider-thumb { -webkit-appearance: none; width: .85rem; height: .85rem; border-radius: 50%; background: #fff; margin-top: -.3rem; border: 2px solid var(--here); }
.seek::-moz-range-thumb { width: .7rem; height: .7rem; border-radius: 50%; background: #fff; border: 2px solid var(--here); }
.ptime { font: 600 .95rem/1 var(--label-font); letter-spacing: .06em; font-variant-numeric: tabular-nums; color: var(--on-vinyl-2); white-space: nowrap; }
.js .player audio { display: none; }
.js .player .np { color: var(--on-vinyl); }

/* The one authored moment: the now-playing row fills from the left in steel blue; the stopped flag drops in. */
.jcard li { background: linear-gradient(var(--here), var(--here)) 0 0 / 0% 100% no-repeat; transition: background-size .45s cubic-bezier(.16,1,.3,1); }
.jcard li.now { background-color: transparent; background-size: 100% 100%; }
.jcard li.stopped::before { animation: flagdrop .5s cubic-bezier(.16,1,.3,1) both; }
@keyframes flagdrop { from { transform: translateY(-.6rem); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 60rem) { .railbox > summary { display: flex; } }   /* after the base rule so it wins on phones */
