/* Wake the Bench — jurisdiction-neutral judicial theme over the Wake the Nation layout shell.
   Same layout as wakenation.org (css/nation-shell.css); only palette, type and motifs change:
   robe black + gilt gold + ivory, Cinzel inscription capitals + Source Serif text,
   courthouse portico hero, scales-of-justice mark. No state flags or state symbols. */

:root {
  color-scheme: dark;
  --wn-bg: #0d0b09;
  --wn-bg-elev: #15120d;
  --wn-bg-3: #1c1811;
  --wn-panel: #17130d;
  --wn-panel-elev: #211b12;
  --wn-border: rgba(212, 175, 90, 0.24);
  --wn-border-strong: rgba(212, 175, 90, 0.55);
  --wn-cream: #f3ecdc;
  --wn-cream-dim: #bdb096;
  --wn-gold: #b8913c;
  --wn-gold-bright: #e2c27a;
  --wn-gold-soft: rgba(212, 175, 90, 0.13);
  --wn-red: #b8913c;
  --wn-ink: #0d0b09;
  --wn-font: "Source Serif 4", Georgia, "Times New Roman", serif;
  --wn-display: "Cinzel", "Trajan Pro", Georgia, serif;
  --fp-pw-gold: #b8913c;
  --fp-pw-gold-bright: #e2c27a;
  --fp-pw-cream: #f3ecdc;
  --fp-pw-border: rgba(212, 175, 90, 0.35);
  --fp-pw-display: "Cinzel", Georgia, serif;
  --wtb-gilt-rule: linear-gradient(90deg, transparent, #b8913c 12%, #e2c27a 50%, #b8913c 88%, transparent);
}

body.wtb-shell {
  background:
    radial-gradient(ellipse 90% 50% at 50% -8%, rgba(212, 175, 90, 0.10), transparent 55%),
    var(--wn-bg);
  color: var(--wn-cream);
  font-family: var(--wn-font);
  display: flex;
  flex-direction: column;
}
body.wtb-shell h1, body.wtb-shell h2, body.wtb-shell h3 { font-family: var(--wn-display); }

/* ---- Layout: Nation's left-rail + main row (wrapped so kit banners above stay full width) ---- */
.wtb-shell-row { display: block; flex: 1; }
.wtb-shell-row-end { display: none; }
@media (min-width: 900px) {
  body.wtb-shell.wn-shell-dash { display: flex; }
  .wtb-shell-row {
    display: grid;
    grid-template-columns: 17rem minmax(0, 1fr);
    align-items: start;
  }
  body.wtb-shell.wn-shell-dash .wn-left-dash {
    grid-column: 1; grid-row: 1;
    position: sticky; top: var(--wn-nav-h, 64px);
    height: calc(100dvh - var(--wn-nav-h, 64px));
  }
  body.wtb-shell.wn-shell-dash main { grid-column: 2; grid-row: 1; min-width: 0; }
  body.wtb-shell.wn-page-welcome main.wn-welcome { width: auto; max-width: none; padding-top: 0; margin: 0; }
  body.wtb-shell.wn-page-welcome main.wn-welcome > :not(.wn-welcome-hero) { margin-left: auto; margin-right: auto; max-width: var(--wn-max); }
  body.wtb-shell.wn-page-welcome .wn-welcome-hero { width: auto; max-width: none; margin-left: 0; margin-right: 0; }
}
body.wtb-shell:not(.wn-page-welcome) main { width: min(100% - 2rem, var(--wn-max)); margin: 0 auto; }

/* ---- Announce bar + nav ---- */
body.wtb-shell .wn-announce { background: #b8913c; color: #0d0b09; font-family: var(--wn-display); letter-spacing: 0.08em; }
body.wtb-shell .wn-nav {
  background: linear-gradient(180deg, #120f0b, #0d0b09);
  border-bottom: 0;
  box-shadow: 0 1px 0 rgba(212,175,90,.35), 0 6px 18px rgba(0,0,0,.45);
}
body.wtb-shell .wn-nav::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px;
  background: var(--wtb-gilt-rule); opacity: .8; pointer-events: none;
}
body.wtb-shell .wn-brand-flag.wtb-emblem {
  width: 36px; height: 36px; padding: 5px; box-sizing: border-box;
  color: #0d0b09; background: linear-gradient(180deg, #e2c27a, #b8913c);
  border-radius: 50%; box-shadow: 0 0 0 1px rgba(226,194,122,.6);
}
body.wtb-shell .wn-brand-wm, body.wtb-shell .wn-brand-wm a { font-family: var(--wn-display); color: var(--wn-cream); }
body.wtb-shell .wn-brand-nation { color: var(--wn-gold-bright) !important; }
body.wtb-shell .wn-dot { color: var(--wn-gold-bright); }
body.wtb-shell .wn-brand-tag { color: var(--wn-cream-dim); font-family: var(--wn-display); letter-spacing: .14em; }
body.wtb-shell .wn-nav .wn-core { border-color: rgba(212,175,90,.25); font-family: var(--wn-display); }
body.wtb-shell .wn-nav .wn-core.is-current { color: #0d0b09; background: var(--wn-gold-bright); border-color: var(--wn-gold-bright); }
body.wtb-shell .wn-nav .wn-subscribe { background: linear-gradient(180deg, #e2c27a, #b8913c); color: #0d0b09; border-color: #b8913c; font-family: var(--wn-display); }
body.wtb-shell .wn-nav .wn-subscribe:hover { background: #e2c27a; color: #0d0b09; }
body.wtb-shell .wn-nav .wn-donate { background: transparent; color: var(--wn-cream); border: 1px solid var(--wn-border); font: inherit; font-family: var(--wn-display); cursor: pointer; }
body.wtb-shell .wn-header-crumb { background: #15120d; border-bottom: 1px solid rgba(212,175,90,.18); font-family: var(--wn-font); }
body.wtb-shell .wn-header-crumb a { color: var(--wn-gold-bright); }

/* ---- Left rail (courts dash) ---- */
body.wtb-shell .wn-left-dash { background: #110e0a; border-right: 1px solid rgba(212,175,90,.2); }
body.wtb-shell .wn-left-brand { font-family: var(--wn-display); color: var(--wn-cream); }
body.wtb-shell .wn-left-h { color: var(--wn-gold-bright); font-family: var(--wn-display); letter-spacing: .14em; }
body.wtb-shell .wn-left-link { color: var(--wn-cream); }
body.wtb-shell .wn-left-link.is-current { border-color: var(--wn-gold); background: var(--wn-gold-soft); color: var(--wn-gold-bright); }
body.wtb-shell .wn-left-jump a { border-color: rgba(212,175,90,.35); color: var(--wn-cream); }

/* ---- Hero: courthouse portico, scales emblem (replaces Nation's flag chip) ---- */
body.wtb-shell .wn-welcome-hero::before { filter: brightness(0.9); }
body.wtb-shell .wn-welcome-hero::after {
  background:
    linear-gradient(180deg, rgba(13,11,9,.30) 0%, rgba(13,11,9,.55) 55%, rgba(13,11,9,.82) 100%),
    radial-gradient(ellipse 80% 60% at 50% 40%, transparent 30%, rgba(13,11,9,.5) 100%);
}
body.wtb-shell .wn-welcome-hero { color: var(--wn-cream); border-bottom: 3px solid transparent; border-image: var(--wtb-gilt-rule) 1; }
body.wtb-shell .wn-hero-flag.wtb-hero-emblem {
  width: 4.25rem; height: 4.25rem; padding: .6rem; box-sizing: border-box;
  color: #0d0b09; background: radial-gradient(circle at 35% 30%, #f0d995, #b8913c 70%);
  border-radius: 50%; box-shadow: 0 0 0 2px rgba(13,11,9,.8), 0 0 0 3px #e2c27a, 0 8px 24px rgba(0,0,0,.6);
}
body.wtb-shell .wn-welcome-hero .wn-eyebrow { color: var(--wn-gold-bright); font-family: var(--wn-display); }
body.wtb-shell .wn-welcome-hero .wn-eyebrow::before { background: var(--wn-gold-bright); }
body.wtb-shell .wn-hero-supra { color: var(--wn-cream); font-family: var(--wn-font); font-style: italic; }
body.wtb-shell .wn-hero-mission strong, body.wtb-shell .wn-hero-purpose strong { color: var(--wn-gold-bright); }
body.wtb-shell .wn-hero-mission { color: var(--wn-cream); }
body.wtb-shell .wn-hero-wm { font-family: var(--wn-display); color: var(--wn-cream); letter-spacing: .08em; text-shadow: 0 2px 18px rgba(0,0,0,.6); }
body.wtb-shell .wn-hero-wm .wn-dot { color: var(--wn-gold-bright); }
body.wtb-shell .wn-hero-purpose { color: var(--wn-cream); }
body.wtb-shell .wn-hero-tagline { color: var(--wn-gold-bright); font-family: var(--wn-display); }
body.wtb-shell .wn-hero-frame strong { background: rgba(212,175,90,.14); color: var(--wn-gold-bright); border: 1px solid rgba(212,175,90,.45); }
body.wtb-shell .fp-btn { font-family: var(--wn-display); }
body.wtb-shell .fp-btn-primary, body.wtb-shell .wn-path-cta {
  background: linear-gradient(180deg, #e2c27a, #b8913c) !important;
  color: #0d0b09 !important; border: 1px solid #e2c27a !important;
  box-shadow: 0 6px 18px rgba(0,0,0,.45);
}
body.wtb-shell .wn-path-cta .wn-path-cta-help { color: #2a2112 !important; }
body.wtb-shell .fp-btn-ghost { color: var(--wn-cream); border-color: rgba(212,175,90,.45); }
body.wtb-shell .wn-status-welcome { background: rgba(13,11,9,.7); color: var(--wn-cream); border: 1px solid rgba(212,175,90,.4); font-family: var(--wn-font); text-transform: none; letter-spacing: 0; }
body.wtb-shell .wn-status-welcome a { color: var(--wn-gold-bright); }

/* Countdown (docket style) inside the hero */
body.wtb-shell .wn-welcome-hero .countdown { display: flex; gap: .5rem; justify-content: center; margin: 1rem 0 .25rem; }
body.wtb-shell .wn-welcome-hero .countdown .unit { background: rgba(13,11,9,.75); border: 1px solid rgba(212,175,90,.45); border-radius: 6px; padding: .4rem .7rem; min-width: 4rem; }
body.wtb-shell .wn-welcome-hero .countdown .num { font-family: var(--wn-display); color: var(--wn-gold-bright); font-size: 1.5rem; font-weight: 700; }
body.wtb-shell .wn-welcome-hero .countdown .lbl { color: var(--wn-cream-dim); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; }
body.wtb-shell .wn-welcome-hero .countdown-caption { color: var(--wn-cream-dim); font-size: .85rem; margin: .2rem 0 .8rem; }

/* ---- Bands below the hero (Nation's light welcome bands → law-library ivory on black) ---- */
body.wtb-shell .wn-welcome { --wn-w-bg: #0d0b09; }
body.wtb-shell .wn-about-band, body.wtb-shell .wn-how-band, body.wtb-shell .wn-fold-band,
body.wtb-shell .wn-invite-doors, body.wtb-shell .wn-welcome-help, body.wtb-shell .wn-location-bar {
  background: #15120d !important; color: var(--wn-cream) !important;
  border: 1px solid rgba(212,175,90,.28) !important; border-top: 3px solid #b8913c !important;
  border-radius: 6px; box-shadow: none;
}
body.wtb-shell .wn-section-label { color: var(--wn-gold-bright) !important; font-family: var(--wn-display); letter-spacing: .1em; }
body.wtb-shell .wn-lede { color: var(--wn-cream) !important; font-size: 1.05rem; }
body.wtb-shell .wn-about-band p, body.wtb-shell .wn-how-band p, body.wtb-shell .wn-invite-doors li { color: var(--wn-cream-dim) !important; }
body.wtb-shell .wn-invite-kicker { color: var(--wn-gold-bright) !important; font-family: var(--wn-display); }
body.wtb-shell .wn-invite-doors strong { color: var(--wn-cream); }
body.wtb-shell a.inline, body.wtb-shell .wn-invite-doors a { color: var(--wn-gold-bright) !important; }
body.wtb-shell .wn-location-bar { padding: 1rem 1.1rem; }
body.wtb-shell .wn-welcome-help > summary { cursor: pointer; }
body.wtb-shell .wn-fold-band .research-status { margin: 0; background: transparent; border: 0; }

/* Legal band: Nation's dense indigo band → robe black with gilt rule */
body.wtb-shell .wn-welcome-legal { background: #0a0806 !important; color: var(--wn-cream-dim) !important; border-top: 3px solid #b8913c; }
body.wtb-shell .wn-legal-kicker { color: var(--wn-gold-bright) !important; font-family: var(--wn-display); }
body.wtb-shell .wn-welcome-legal strong { color: var(--wn-cream); }

/* Footer + sticky bar */
body.wtb-shell .wf-footer__mark--bench { color: var(--wn-gold-bright); width: 48px; height: 48px; }
body.wtb-shell .wn-sticky-weekly { background: #15120d; color: var(--wn-cream); border-top: 1px solid rgba(212,175,90,.45); font-family: var(--wn-font); }
body.wtb-shell .wn-sticky-weekly strong, body.wtb-shell .wn-sticky-weekly a { color: var(--wn-gold-bright); }

/* Fluted column rule above the footer (judicial motif) */
body.wtb-shell .wf-footer { position: relative; }
body.wtb-shell .wf-footer::before {
  content: ""; display: block; height: 14px; margin-bottom: 1rem;
  background: repeating-linear-gradient(90deg, rgba(212,175,90,.5) 0 2px, transparent 2px 9px);
  border-top: 2px solid #b8913c; border-bottom: 2px solid #b8913c; opacity: .55;
}

/* Inner pages: content headings in inscription capitals */
body.wtb-shell .page-title { font-family: var(--wn-display); color: var(--wn-cream); letter-spacing: .04em; }
body.wtb-shell .deepdive-h3, body.wtb-shell .grade-legend-head { font-family: var(--wn-display); color: var(--wn-gold-bright); }

/* Hero sizing: emblem stacked above copy; first screen capped so the bands below stay in reach */
body.wtb-shell .wn-welcome-hero { flex-direction: column; min-height: min(calc(100dvh - 7rem), 48rem); }
body.wtb-shell .wn-welcome-hero .wn-status-welcome {
  display: inline-block; max-width: 36rem; margin-top: .6rem; padding: .45rem .9rem;
  border-radius: 999px; font-size: .82rem; line-height: 1.4; white-space: normal;
}
@media (max-width: 640px) {
  body.wtb-shell .wn-welcome-hero { min-height: 0; }
  body.wtb-shell .wn-welcome-hero .countdown .unit { min-width: 3.4rem; padding: .35rem .4rem; }
  body.wtb-shell .wn-hero-flag.wtb-hero-emblem { width: 3.5rem; height: 3.5rem; margin-top: -1.75rem; }
}
body.wtb-shell .wn-welcome > section:not(.wn-welcome-hero), body.wtb-shell .wn-welcome > aside,
body.wtb-shell .wn-welcome > details, body.wtb-shell .wn-welcome > .wn-location-bar { margin-bottom: 1.1rem; padding: 1rem 1.15rem; }
@media (max-width: 899px) { body.wtb-shell .wn-welcome > :not(.wn-welcome-hero) { margin-left: .75rem; margin-right: .75rem; } }

/* Carried over from css/judicial.css: long citations/URLs on judge pages overflowed at 390px */
main, .profile-head, .profile-head > *, .prose, .lean-note, .grade-note, .sources-list li, .fact dd,
.why-grade, .why-grade * { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 559px) { .profile-head { flex-direction: column; gap: 0.5rem; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media (forced-colors: active) { body.wtb-shell .wf-footer::before, body.wtb-shell .wn-nav::after { display: none; } }

/* Nation welcome tokens → judicial palette */
body.wtb-shell .wn-welcome {
  --wn-w-bg: #0d0b09; --wn-w-bg-card: #15120d; --wn-w-indigo: #f3ecdc; --wn-w-indigo-soft: #211b12;
  --wn-w-muted: #bdb096; --wn-w-orange: #b8913c; --wn-w-orange-deep: #8a6b28; --wn-w-peach: rgba(212,175,90,.12);
  --wn-w-border: rgba(212,175,90,.25); --wn-w-shadow: 0 10px 32px rgba(0,0,0,.4);
  color: var(--wn-cream);
}
@media (max-width: 640px) {
  body.wtb-shell .wn-hero-copy { background: linear-gradient(180deg, rgba(13,11,9,.94) 0%, rgba(13,11,9,.99) 100%); }
}
/* Phone rail drawer must sit above the sticky announce bar (z 80) */
@media (max-width: 899px) {
  body.wtb-shell.wn-left-open .wn-left-dash { z-index: 95; }
  body.wtb-shell.wn-left-open::after { z-index: 90; }
}
@media (max-width: 899px) {
  body.wtb-shell.wn-left-open .wn-left-dash { z-index: 1000; }
  body.wtb-shell.wn-left-open::after { z-index: 999; }
}
@media (max-width: 640px) {
  body.wtb-shell .wn-welcome-hero h1.wn-hero-wm { font-size: clamp(1.5rem, 8.2vw, 2.3rem); letter-spacing: .02em; white-space: nowrap; }
}
body.wtb-shell .wn-hero-frame strong { display: inline-block; padding: .3rem .8rem; border-radius: 999px; }
