/* The Holley Hour — app styles. Colors are taken from the show's parchment & logo artwork. */

@font-face { font-family: "Schola"; src: url(../fonts/schola-regular.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Schola"; src: url(../fonts/schola-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Schola"; src: url(../fonts/schola-bold.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --navy: #01152b;
  --navy-deep: #010d1e;
  --navy-700: #0b2447;
  --navy-600: #143463;
  --gold-200: #fbe9b4;
  --gold-300: #f4d88a;
  --gold: #e2bd62;
  --gold-600: #c39a3f;
  --gold-700: #8f6a25;
  --gold-grad: linear-gradient(180deg, #fbe7a8 0%, #e6c164 48%, #b9892f 100%);
  --red: #c8202e;
  --red-dark: #9b1b24;
  --cream: #f3ead6;
  --text: #e9e3d3;
  --muted: #a9b4c8;
  --ink: #2b1d0d;
  --ink-soft: #5c4527;
  --ink-red: #7c1d1d;
  --serif: "Schola", "Century Schoolbook", "Century Schoolbook L", "TeX Gyre Schola", "C059", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --topbar-h: 64px;
  --tabbar-h: 66px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --gutter: 18px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--navy); scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: transparent; /* the html element carries the base colour so the fixed layers below show */
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgba(226, 189, 98, .15);
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(120% 55% at 50% -8%, rgba(42, 82, 150, .42), transparent 62%),
    radial-gradient(90% 55% at 50% 112%, rgba(0, 0, 0, .6), transparent 70%),
    url(../img/navy-texture.png) repeat,
    var(--navy);
}
body.no-scroll { overflow: hidden; }
img, svg, video, iframe { max-width: 100%; }
img { height: auto; }
a { color: var(--gold-300); text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 22px; height: 22px; flex: none; }
.ico-inline { width: 1.15em; height: 1.15em; vertical-align: -.22em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- background decoration & gold frame ---------- */
.bg-decor { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.decor-wtp { position: absolute; top: calc(var(--safe-top) + 16px); left: 16px; width: min(52vw, 380px); opacity: .28; display: none; }
@media (min-width: 700px) { .decor-wtp { display: block; } }
.decor-monument { position: absolute; right: 12px; bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 8px); height: 74vh; width: auto; max-width: none; opacity: .45; display: none; }
@media (min-width: 1100px) { .decor-monument { display: block; } .decor-wtp { opacity: .5; } }

.frame {
  position: fixed;
  z-index: 40;
  pointer-events: none;
  top: calc(var(--safe-top) + 4px);
  left: calc(var(--safe-left) + 4px);
  right: calc(var(--safe-right) + 4px);
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 4px);
  border: 16px solid transparent;
  border-image: url(../img/frame.svg) 24 / 16px stretch;
}
@media (min-width: 700px) { .frame { border-width: 20px; border-image-width: 20px; top: calc(var(--safe-top) + 8px); left: 8px; right: 8px; bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 8px); } }

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: calc(var(--topbar-h) + var(--safe-top));
  padding: calc(var(--safe-top) + 7px) calc(var(--safe-right) + 22px) 7px calc(var(--safe-left) + 22px);
  background: linear-gradient(180deg, rgba(1, 13, 30, .97) 0%, rgba(1, 13, 30, .86) 72%, rgba(1, 13, 30, 0) 100%);
}
.brand { display: block; line-height: 0; }
.brand img { height: 50px; width: auto; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5)); }
.page-home .brand { visibility: hidden; }
.topbar-actions { display: flex; gap: 8px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 13px;
  border-radius: 999px;
  border: 1px solid rgba(226, 189, 98, .55);
  background: rgba(1, 21, 43, .7);
  color: var(--gold-300);
  font: 650 13px/1 var(--sans);
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.chip .ico { width: 17px; height: 17px; }
.chip-gold { background: var(--gold-grad); color: #2a1a04; border-color: transparent; box-shadow: 0 3px 10px rgba(0, 0, 0, .35); }
@media (max-width: 400px) { #getAppBtn span { display: none; } #getAppBtn { width: 36px; padding: 0; justify-content: center; } }

/* ---------- layout ---------- */
.main {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 4px calc(var(--safe-right) + var(--gutter) + 6px) calc(var(--tabbar-h) + var(--safe-bottom) + 40px) calc(var(--safe-left) + var(--gutter) + 6px);
}
.narrow { max-width: 760px; margin-left: auto; margin-right: auto; }

/* ---------- bottom menu ---------- */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 45;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding: 0 calc(var(--safe-right) + 4px) var(--safe-bottom) calc(var(--safe-left) + 4px);
  background: linear-gradient(180deg, #0c2650 0%, #04162f 55%, #010d1e 100%);
  border-top: 1px solid var(--gold-600);
  box-shadow: 0 -12px 30px rgba(0, 0, 0, .45);
}
.tabbar::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 3px; height: 2px;
  background: linear-gradient(90deg, transparent 2%, var(--red) 20%, var(--red) 80%, transparent 98%);
  opacity: .85;
}
.tab {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  padding-top: 6px;
  color: #b9c3d6;
  text-decoration: none;
  font: 700 11px/1 var(--sans);
  letter-spacing: .07em;
  text-transform: uppercase;
  transition: color .15s;
}
.tab .ico { width: 26px; height: 26px; }
.tab:hover { color: var(--gold-200); }
.tab.is-active { color: var(--gold-300); }
.tab.is-active::after {
  content: "";
  position: absolute; top: 5px; left: 50%;
  width: 38px; height: 3px; margin-left: -19px;
  border-radius: 0 0 3px 3px;
  background: var(--gold-grad);
}
.tab:active { transform: scale(.96); }
@media (min-width: 720px) {
  .tabbar { grid-template-columns: repeat(4, minmax(0, 190px)); justify-content: center; }
  .tab { flex-direction: row; gap: 9px; font-size: 13px; }
}

/* ---------- headings & ornaments ---------- */
.page-head { text-align: center; margin: 2px auto 20px; max-width: 760px; }
.page-head .starline { display: block; width: min(68%, 400px); margin: 0 auto 4px; }
.page-title, .gold-text {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .55));
}
.page-title { font-size: clamp(28px, 7.6vw, 46px); line-height: 1.1; margin: 0; }
.page-sub { font: italic 16px/1.4 var(--serif); color: var(--muted); margin: 8px 0 0; }
.page-head .ornament { display: block; width: min(94%, 620px); margin: 12px auto 0; }
.label-rule {
  display: flex; align-items: center; gap: 14px;
  margin: 24px 0 14px;
  color: var(--gold-300);
  font: 800 12.5px/1 var(--sans);
  letter-spacing: .26em;
  text-transform: uppercase;
}
.label-rule::before, .label-rule::after { content: ""; flex: 1; height: 2px; background: linear-gradient(90deg, transparent, var(--gold-600)); }
.label-rule::after { background: linear-gradient(90deg, var(--gold-600), transparent); }
.label-rule .ico { width: 14px; height: 14px; color: var(--red); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 48px; padding: 0 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 800 13.5px/1 var(--sans);
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s, filter .15s, background .15s;
}
.btn .ico { width: 19px; height: 19px; }
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--gold-grad); color: #2a1a04; box-shadow: 0 8px 20px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .55); }
.btn-red { background: linear-gradient(180deg, #e03b45, #a51b25); color: #fff; box-shadow: 0 8px 20px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-outline { border-color: var(--gold-600); color: var(--gold-300); background: rgba(1, 21, 43, .6); }
.btn-ink { background: #3b260c; color: #f6e3b4; }
.btn-ink-outline { border-color: rgba(59, 38, 12, .7); color: #3b260c; background: rgba(255, 250, 235, .35); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 12px; }
.btn-block { display: flex; width: 100%; }
.btn-link { background: none; border: 0; min-height: 40px; color: var(--muted); font: 500 15px var(--sans); letter-spacing: 0; text-transform: none; cursor: pointer; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 20px 0; }

/* ---------- parchment panels (9-slice from the show artwork) ---------- */
.parchment {
  position: relative;
  color: var(--ink);
  border: 24px solid transparent;
  border-image: url(../img/parchment.webp) 46 fill / 24px stretch;
  padding: 2px 6px 4px;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, .45));
}
.parchment h2 { font: 700 23px/1.25 var(--serif); color: #3b260c; text-align: center; letter-spacing: .03em; margin: .1em 0 .55em; }
.parchment h3 { font: 700 19px/1.3 var(--serif); color: #3b260c; margin: 1em 0 .4em; }
.parchment p { margin: 0 0 .8em; }
.parchment p:last-child { margin-bottom: 0; }
.parchment a:not(.btn) { color: var(--ink-red); }
.parchment ul { margin: 0 0 .8em; padding-left: 1.3em; }

/* ---------- video ---------- */
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  background: #000;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 0 0 1px #0b0702, 0 0 0 4px var(--gold-600), 0 0 0 5px #4a3712, 0 0 0 7px rgba(226, 189, 98, .35), 0 18px 44px rgba(0, 0, 0, .65);
}
.video-frame iframe, .video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@supports not (aspect-ratio: 16 / 9) { .video-frame { height: 0; padding-top: 56.25%; } }

/* ---------- home / welcome ---------- */
.home { max-width: 860px; margin: 0 auto; }
.hero { text-align: center; margin: -8px 0 0; }
.hero-logo { display: block; width: min(90%, 540px, calc(40vh * 1.68)); margin: 0 auto; filter: drop-shadow(0 12px 26px rgba(0, 0, 0, .6)); }
.tagline { margin: 6px 0 0; font: 800 11.5px/1.6 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: #dfe4ee; }
.tagline span { white-space: nowrap; }
.tagline .ico { width: 11px; height: 11px; color: var(--red); vertical-align: 0; margin: 0 .35em; }
.ep-title { font: 700 clamp(21px, 5.2vw, 29px)/1.25 var(--serif); color: var(--cream); margin: 22px 0 4px; text-align: center; }
.ep-meta { text-align: center; color: var(--muted); margin: 0; font-style: italic; }
.ep-note { text-align: center; color: var(--text); margin: 8px auto 0; max-width: 620px; }
.empty-state { text-align: center; padding: 26px 10px; }
.welcome { margin-top: 30px; font-size: 17.5px; }
.app-promo {
  display: flex; gap: 14px; align-items: center;
  margin: 28px 0 0; padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(226, 189, 98, .5);
  background: linear-gradient(135deg, rgba(22, 56, 106, .92), rgba(3, 20, 44, .92));
  box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
}
.app-promo img { width: 58px; height: 58px; border-radius: 14px; flex: none; box-shadow: 0 4px 12px rgba(0, 0, 0, .5); }
.app-promo b { display: block; font: 700 18px/1.25 var(--serif); color: var(--gold-300); }
.app-promo span { display: block; font: 14px/1.4 var(--sans); color: var(--muted); }
.app-promo .btn { margin-left: auto; flex: none; }
@media (max-width: 520px) { .app-promo { flex-wrap: wrap; } .app-promo .btn { width: 100%; margin-left: 0; } }

/* ---------- episodes ---------- */
.ep-tools { display: flex; gap: 10px; margin: 0 auto 20px; max-width: 560px; }
.search {
  flex: 1; display: flex; align-items: center; gap: 8px;
  height: 48px; padding: 0 16px;
  border-radius: 999px;
  background: rgba(0, 10, 25, .6);
  border: 1px solid rgba(226, 189, 98, .45);
  color: var(--gold-300);
}
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--text); font: 16px var(--sans); }
.search input::placeholder { color: #8391a8; }
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 20px; }
.ep-card {
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(16, 44, 86, .82), rgba(3, 16, 36, .9));
  border: 1px solid rgba(226, 189, 98, .35);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .38);
}
.ep-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; background: #000; cursor: pointer; overflow: hidden; }
.ep-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.ep-thumb:hover img { transform: scale(1.04); }
.ep-play {
  position: absolute; inset: 0; margin: auto;
  width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(200, 32, 46, .92); color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .9), 0 8px 22px rgba(0, 0, 0, .55);
  transition: transform .2s;
}
.ep-thumb:hover .ep-play { transform: scale(1.08); }
.ep-play .ico { width: 26px; height: 26px; margin-left: 4px; }
.ep-dur { position: absolute; right: 8px; bottom: 8px; padding: 4px 7px; border-radius: 5px; background: rgba(0, 0, 0, .82); color: #fff; font: 700 12px/1 var(--sans); }
.ep-badge { position: absolute; left: 8px; top: 8px; padding: 5px 9px; border-radius: 5px; background: var(--gold-grad); color: #2a1a04; font: 900 10.5px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.ep-badge.live { background: var(--red); color: #fff; }
.ep-info { padding: 13px 15px 15px; }
.ep-info h2 { font: 700 17.5px/1.3 var(--serif); color: var(--cream); margin: 0 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep-info time { font: 13px var(--sans); color: var(--muted); }
.ep-more { text-align: center; margin: 26px 0 0; }
.ep-foot { text-align: center; margin: 22px 0 0; color: var(--muted); font: 14px var(--sans); }

/* ---------- modal & bottom sheet ---------- */
.modal, .sheet { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal-backdrop, .sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 6, 16, .84); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal-card {
  position: relative;
  width: min(980px, 100%);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--gold-600);
  border-radius: 14px;
  background: linear-gradient(180deg, #0c2650, #020f22);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .65);
}
.modal-card h2 { font: 700 21px/1.3 var(--serif); color: var(--cream); margin: 18px 0 2px; }
.modal-card .meta { color: var(--muted); font: 14px var(--sans); margin: 0 0 10px; }
.modal-card .desc { white-space: pre-line; color: var(--text); font-size: 15.5px; max-height: 9.5em; overflow: auto; margin: 0 0 14px; }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.x-btn {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid rgba(226, 189, 98, .5);
  background: rgba(1, 13, 30, .85); color: var(--gold-300);
  cursor: pointer;
}
.modal-card .x-btn { position: sticky; float: right; top: 0; right: 0; margin: -6px -6px 8px 8px; }

.sheet { place-items: end center; padding: 0; }
.sheet-card {
  position: relative;
  width: min(480px, 100%);
  max-height: 92dvh;
  overflow: auto;
  padding: 28px 22px calc(18px + var(--safe-bottom));
  text-align: center;
  border: 1px solid var(--gold-600);
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(180deg, #0f2c5a, #031631);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .55);
  animation: sheet-up .28s ease-out;
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 600px) { .sheet { place-items: center; padding: 16px; } .sheet-card { border-radius: 18px; border-bottom: 1px solid var(--gold-600); } }
.sheet-x { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .08); color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.sheet-icon { width: 76px; height: 76px; border-radius: 18px; box-shadow: 0 8px 20px rgba(0, 0, 0, .5); }
.sheet-card h2 { font: 700 23px/1.25 var(--serif); color: var(--gold-300); margin: 12px 0 6px; }
.sheet-lead { color: var(--muted); margin: 0 0 18px; font: 15px/1.45 var(--sans); }
.sheet-note { font: 15.5px/1.5 var(--sans); color: var(--text); text-align: left; }
.sheet [data-mode] { display: none; }
.sheet[data-show="prompt"] [data-mode="prompt"], .sheet[data-show="ios"] [data-mode="ios"],
.sheet[data-show="inapp"] [data-mode="inapp"], .sheet[data-show="manual"] [data-mode="manual"] { display: block; }
.steps { list-style: none; margin: 0 0 8px; padding: 0; text-align: left; }
.steps li { display: flex; gap: 14px; align-items: center; padding: 12px 2px; border-top: 1px solid rgba(226, 189, 98, .2); font: 16px/1.35 var(--sans); color: var(--text); }
.steps li:first-child { border-top: 0; }
.steps small { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }
.steps b { color: var(--gold-200); }
.step-ico { flex: none; width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: rgba(226, 189, 98, .14); color: var(--gold-300); }

/* ---------- learning ---------- */
.intro { max-width: 720px; margin: -6px auto 20px; text-align: center; color: var(--text); }
.intro p { margin: 0 0 .6em; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 0 0 22px; }
.filter { height: 36px; padding: 0 15px; border-radius: 999px; border: 1px solid rgba(226, 189, 98, .45); background: rgba(1, 21, 43, .65); color: var(--gold-300); font: 650 13px var(--sans); cursor: pointer; }
.filter.on { background: var(--gold-grad); color: #2a1a04; border-color: transparent; }
.learn-list { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); align-items: start; }
.learn-card { font-size: 16.5px; }
.learn-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.learn-ico { flex: none; width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center; background: #3b260c; color: var(--gold-300); }
.learn-ico .ico { width: 24px; height: 24px; }
.parchment .learn-title { font: 700 19.5px/1.25 var(--serif); margin: 2px 0 0; color: var(--ink); text-align: left; letter-spacing: 0; }
.learn-meta { font: 700 11.5px/1.3 var(--sans); color: #6b5330; margin-top: 5px; text-transform: uppercase; letter-spacing: .08em; }
.learn-desc { color: #3a2a14; }
.learn-media { margin: 12px 0 4px; }
.learn-media img { display: block; width: 100%; border-radius: 6px; box-shadow: 0 0 0 1px rgba(59, 38, 12, .35); }
.learn-media audio { width: 100%; }
.learn-body { position: relative; }
.learn-body.clamp { max-height: 15em; overflow: hidden; }
.learn-body.clamp::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4em; background: linear-gradient(rgba(240, 222, 180, 0), rgba(238, 219, 176, .95)); }
.learn-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.yt-facade { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 6px; overflow: hidden; background: #000; cursor: pointer; }
.yt-facade img { width: 100%; height: 100%; object-fit: cover; display: block; }
.link-host { font: 13px var(--sans); color: #6b5330; word-break: break-all; }

/* ---------- forms (subscribe) ---------- */
.form { display: grid; gap: 16px; }
.field label { display: block; margin-bottom: 6px; font: 800 12.5px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #4a3214; }
.field input {
  width: 100%; height: 52px; padding: 0 15px;
  border-radius: 9px;
  border: 1px solid #a88a57;
  background: rgba(255, 252, 242, .88);
  color: #21170a;
  font: 17px var(--sans);
}
.field input:focus { outline: 3px solid rgba(200, 32, 46, .3); border-color: var(--ink-red); }
.form-row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { padding: 12px 14px; border-radius: 8px; background: rgba(124, 29, 29, .12); border: 1px solid rgba(124, 29, 29, .45); color: var(--ink-red); font: 15px/1.4 var(--sans); }
.fine { font: 13.5px/1.45 var(--sans); color: var(--ink-soft); text-align: center; margin: 4px 0 0; }
.success { text-align: center; }
.success .check { width: 64px; height: 64px; margin: 4px auto 8px; border-radius: 50%; display: grid; place-items: center; background: #2f6b2f; color: #fff; }
.success .check .ico { width: 34px; height: 34px; stroke-width: 2.6; }

/* ---------- donate ---------- */
.donate-wrap { max-width: 640px; margin: 0 auto; }
.donate-box {
  margin: 24px 0 0;
  padding: 10px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 0 0 4px var(--gold-600), 0 0 0 5px #4a3712, 0 0 0 7px rgba(226, 189, 98, .35), 0 18px 44px rgba(0, 0, 0, .6);
  min-height: 160px;
  color: #333;
}
.gfm-embed { min-height: 140px; }
.gfm-embed iframe { width: 100% !important; border: 0; }
.gfm-fallback { display: block; width: 100%; height: 620px; border: 0; }
.donate-secure { text-align: center; color: var(--muted); font: 13.5px var(--sans); margin: 14px 0 0; }

/* ---------- constitution ---------- */
.page-constitution .main { max-width: none; padding: 0; }
.const {
  position: fixed;
  left: 0; right: 0;
  top: calc(var(--topbar-h) + var(--safe-top) - 4px);
  bottom: calc(var(--tabbar-h) + var(--safe-bottom));
  display: flex;
  justify-content: center;
  padding: 0 calc(var(--safe-right) + 20px) 22px calc(var(--safe-left) + 20px);
}
.const-stage { position: relative; display: flex; flex-direction: column; width: 100%; max-width: 1000px; min-height: 0; }
.const-head { flex: none; text-align: center; }
.const-head .starline { display: block; width: min(60%, 360px); margin: 0 auto; }
.const-titlebar { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 2px 0 0; }
.const-h1 { margin: 0; min-width: 0; font-size: inherit; line-height: 1; }
.const-title { flex: 0 1 auto; min-width: 0; padding: 0 4px; border: 0; background: none; cursor: pointer; font-size: clamp(30px, 9.6vw, 46px); line-height: 1.05; white-space: nowrap; }
.const-title .gold-text { display: block; }
.const-title .k { font-size: .46em; letter-spacing: .32em; margin-right: -.32em; }
.const-title .n:only-child { font-size: .7em; }
.const-arrow {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--gold-600);
  background: rgba(1, 21, 43, .75);
  color: var(--gold-300);
  cursor: pointer;
}
.const-arrow .ico { width: 20px; height: 20px; }
.const-arrow:disabled { opacity: .28; cursor: default; }
.const-meta { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 2px; font: 12.5px/1.2 var(--sans); letter-spacing: .06em; color: var(--muted); }
.const-meta button { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; border: 1px solid rgba(226, 189, 98, .4); background: rgba(1, 21, 43, .6); color: var(--gold-300); font: 700 12px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.const-meta .ico { width: 15px; height: 15px; }
.const-head .ornament { display: block; width: min(96%, 600px); margin: 6px auto 4px; }
.const-parchment {
  position: relative;
  flex: 1;
  min-height: 0;
  border: 26px solid transparent;
  border-image: url(../img/parchment.webp) 46 fill / 26px stretch;
  filter: drop-shadow(0 14px 26px rgba(0, 0, 0, .55));
}
.const-scroll {
  position: absolute;
  inset: -8px -6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 6px 12px 18px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 14pt;
  line-height: 1.62;
  scrollbar-width: thin;
  scrollbar-color: #8c6a37 transparent;
}
.const-scroll::-webkit-scrollbar { width: 8px; }
.const-scroll::-webkit-scrollbar-thumb { background: rgba(120, 86, 40, .55); border-radius: 8px; }
.const-page { max-width: 44em; margin: 0 auto; }
.js .const-page:not(.is-active) { display: none; }
.const-page + .const-page { margin-top: 2em; }
.js .const-page + .const-page { margin-top: 0; }
.const-topic { margin: .15em 0 .8em; font: italic 700 1.02em/1.35 var(--serif); text-align: center; color: #5a3a12; }
.const-page p { margin: 0 0 .85em; }
.const-page p.lead::first-letter { float: left; font-size: 3.1em; line-height: .86; font-weight: 700; padding: .07em .09em 0 0; color: var(--ink-red); }
.const-sec { margin: 1.35em 0 .5em; font: 700 .8em/1.2 var(--serif); letter-spacing: .14em; text-transform: uppercase; text-align: center; color: var(--ink-red); }
.const-sec::before, .const-sec::after { content: "—"; margin: 0 .5em; opacity: .6; }
.signer { margin: 0 0 .35em !important; }
.signer b { letter-spacing: .03em; }
.const-note { margin: 1.5em 0 0 !important; padding-top: .8em; border-top: 1px solid rgba(90, 58, 18, .35); font: italic .8em/1.5 var(--serif); color: #5f4a2c; text-align: center; }
@media (min-width: 560px) { .const-page p { text-align: justify; -webkit-hyphens: auto; hyphens: auto; } .const-page p.signer, .const-page p.const-note { text-align: left; } .const-page p.const-note { text-align: center; } }
@media (max-height: 640px) and (max-aspect-ratio: 5/4) { .const-head .starline { display: none; } .const-head .ornament { margin: 2px auto 0; } }

/* Wide screens: the original artwork as a fixed stage, text inside the parchment area. */
@media (min-aspect-ratio: 5/4) and (min-height: 600px) and (min-width: 900px) {
  .page-constitution .topbar, .page-constitution .frame, .page-constitution .bg-decor { display: none; }
  .const { top: 0; padding: 0; align-items: center; background: #010e1f; }
  .const-stage {
    flex: none;
    display: block;
    width: min(100vw, calc((100vh - var(--tabbar-h) - var(--safe-bottom)) * 1.7768));
    max-width: none;
    aspect-ratio: 1672 / 941;
    background: url(../img/constitution-stage-forefathers.webp) center / 100% 100% no-repeat;
    container-type: inline-size;
  }
  .const-head { position: absolute; left: 27%; right: 27%; top: 6.2%; height: 15.6%; display: flex; flex-direction: column; justify-content: center; }
  .const-head .starline, .const-head .ornament { display: none; }
  .const-title { font-size: 3.2cqw; }
  .const-title .gold-text { display: inline; }
  .const-title .k { font-size: 1em; letter-spacing: .14em; margin-right: 0; }
  .const-title .n:only-child { font-size: 1em; }
  .const-arrow { width: max(36px, 2.7cqw); height: max(36px, 2.7cqw); }
  .const-meta { font-size: max(12px, .8cqw); margin-top: .4cqw; }
  .const-parchment { position: absolute; left: 10.23%; top: 26.46%; width: 79.43%; height: 58.77%; border: 0; border-image: none; filter: none; }
  .const-scroll { inset: 5.4% 3.2% 4.8% 3.2%; padding: 0 1.4cqw .6cqw; }
  .brand-home { position: absolute; left: 43.5%; width: 13%; top: 85.4%; height: 12.4%; }
}
.brand-home { display: none; }
@media (min-aspect-ratio: 5/4) and (min-height: 600px) and (min-width: 900px) { .brand-home { display: block; } }

.toc-card { width: min(760px, 100%); }
.toc-card h2 { margin-top: 4px; text-align: center; }
.toc-group { margin: 14px 0 6px; font: 800 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-300); text-align: center; }
.toc { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 0 22px; margin: 0; padding: 0; list-style: none; }
.toc a { display: flex; gap: 12px; align-items: baseline; padding: 9px 8px; border-bottom: 1px solid rgba(226, 189, 98, .16); color: var(--text); text-decoration: none; border-radius: 6px; }
.toc a:hover, .toc a.on { background: rgba(226, 189, 98, .12); }
.toc a b { flex: none; min-width: 8.6em; font: 700 15px/1.3 var(--serif); color: var(--gold-300); }
.toc a span { font: 14px/1.35 var(--sans); color: var(--muted); }

/* ---------- misc ---------- */
.notice { text-align: center; color: var(--muted); font: 14px var(--sans); }
.foot-links { text-align: center; margin: 34px 0 0; font: 13px var(--sans); color: #7f8ba1; }
.foot-links a { color: #93a0b8; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
