/* ============================================================
   MegaReelSlot — base tokens, layout, header, footer
   ============================================================ */

:root {
  --bg: #F6F7FA;
  --surface: #FFFFFF;
  --surface-2: #EEF1F6;
  --surface-3: #E2E7EF;
  --border: #DDE2EA;
  --border-hi: #C4CBD8;

  --navy: #0A1F44;
  --navy-2: #142B57;
  --blue: #00247D;
  --blue-dim: rgba(0, 36, 125, 0.08);
  --red: #C8102E;
  --red-dim: rgba(200, 16, 46, 0.08);

  --text: #10182B;
  --text-2: #3D4863;
  --muted: #626C86;

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --strip-h: 30px;
  --bar-h: 60px;
  --header-h: 90px;
  --max-w: 1400px;
  --radius: 8px;
  --radius-sm: 5px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & base ─────────────────────────────────────────── */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  padding-top: var(--header-h);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
/* WCAG 1.4.1: an inline link inside prose cannot rely on colour alone, and the
   blue-on-navy body text only reaches 1.2-2.6:1 against its surroundings. Nav,
   card and list-component links are excluded, they are not inside prose. */
main p a,
main figcaption a,
main td a,
main th a,
main .till-check-list li a,
main .till-pillar li a,
main caption a,
main small a,
.site-footer p a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--navy); line-height: 1.25; margin: 0 0 0.6em; font-weight: 700; }
p { margin: 0 0 1em; color: var(--text-2); }
ul, ol { color: var(--text-2); }
button { font-family: inherit; }

@media (min-width: 900px) {
  :root { --strip-h: 32px; --bar-h: 64px; --header-h: 96px; }
}

/* ── Masthead ────────────────────────────────── */
/* Own class vocabulary on purpose: the header tokens this replaced were
   shared verbatim with two other live sites. */
.masthead {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

/* utility strip */
.masthead-strip {
  background: var(--navy);
  height: var(--strip-h);
}
.masthead-strip-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.masthead-strip-note {
  margin: 0;
  font-size: 0.76rem;
  color: #AFBDD8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.masthead-strip-links { display: none; }
@media (min-width: 760px) {
  .masthead-strip-links {
    display: flex;
    gap: 1.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
  }
}
.masthead-strip-links a { color: #C9D6EE; font-size: 0.76rem; font-weight: 600; }
.masthead-strip-links a:hover { color: #fff; text-decoration: none; }

/* main bar */
.masthead-bar { height: var(--bar-h); }
.masthead-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.masthead-brand {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  margin-right: auto;
}
.masthead-brand:hover { text-decoration: none; }
.brandhead { color: var(--blue); }
.brandtail { color: var(--navy); }
.reelmark { width: 30px; height: 30px; flex-shrink: 0; margin-right: 0.5rem; }
@media (min-width: 900px) { .reelmark { width: 34px; height: 34px; } }

/* nav */
.masthead-nav { display: none; }
@media (min-width: 1000px) {
  .masthead-nav { display: block; }
  .masthead-burger { display: none !important; }
}
.masthead-list { display: flex; align-items: center; gap: 0.15rem; list-style: none; margin: 0; padding: 0; }
.masthead-item { position: static; }
.masthead-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  background: none;
  cursor: pointer;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
}
.masthead-trigger img { opacity: 0.55; transition: transform 0.18s var(--ease); }
.masthead-trigger:hover { color: var(--navy); background: var(--surface-2); }
.masthead-item.open .masthead-trigger { color: var(--blue); background: var(--blue-dim); }
.masthead-item.open .masthead-trigger img { transform: rotate(180deg); opacity: 1; }
.masthead-trigger.here { color: var(--blue); box-shadow: inset 0 -2px 0 0 var(--blue); }

/* mega panel */
.masthead-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 18px 36px rgba(10, 31, 68, 0.13);
}
.masthead-panel-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.6rem 1.25rem 1.8rem;
  display: grid;
  grid-template-columns: 1fr 1fr 300px;
  gap: 2rem;
}
.masthead-panel--narrow .masthead-panel-inner { grid-template-columns: 1fr 300px; max-width: 860px; }
.masthead-col { display: flex; flex-direction: column; gap: 0.1rem; }
.masthead-col-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.6rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.masthead-col a {
  display: block;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  color: var(--navy);
}
.masthead-col a:hover { background: var(--surface-2); text-decoration: none; }
.masthead-col a b {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  font-size: 0.93rem;
  font-weight: 700;
}
.masthead-col a i {
  font-style: normal;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--blue);
  background: var(--blue-dim);
  border-radius: 3px;
  padding: 0.1rem 0.3rem;
}
.masthead-col a em {
  display: block;
  font-style: normal;
  font-size: 0.81rem;
  color: var(--muted);
  margin-top: 0.1rem;
}
.masthead-aside {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 1.2rem;
  align-self: start;
}
.masthead-aside p { font-size: 0.85rem; margin: 0 0 0.9rem; }
.masthead-aside-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.86rem;
  font-weight: 700;
}

/* tools */
.masthead-tools { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.masthead-find {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.7rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-2);
}
.masthead-find:hover { border-color: var(--border-hi); color: var(--navy); }
.masthead-find img { opacity: 0.6; }
.masthead-find span { display: none; }
@media (min-width: 620px) { .masthead-find span { display: inline; } }
.masthead-burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-sm);
}
.masthead-burger:hover { border-color: var(--blue); background: var(--blue-dim); }
.masthead-burger img { filter: invert(10%) sepia(30%) saturate(1500%) hue-rotate(200deg); }
.burger-close { display: none; }
body.drawer-open .burger-close { display: block; }
body.drawer-open .burger-open { display: none; }
body.drawer-open .masthead-burger { border-color: var(--blue); background: var(--blue-dim); }

/* mobile drawer */
.masthead-drawer {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 480;
  background: var(--surface);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.masthead-drawer-inner { padding: 0.5rem 0 3rem; }
.drawer-group { border-bottom: 1px solid var(--border); }
.drawer-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  text-align: left;
}
.drawer-head img { opacity: 0.5; transition: transform 0.18s var(--ease); }
.drawer-group.open .drawer-head { color: var(--blue); }
.drawer-group.open .drawer-head img { transform: rotate(180deg); opacity: 1; }
.drawer-body { padding: 0 1.25rem 0.9rem; }
.drawer-body a {
  display: block;
  padding: 0.6rem 0.7rem;
  border-radius: var(--radius-sm);
  color: var(--navy);
}
.drawer-body a:hover, .drawer-body a[aria-current="page"] { background: var(--blue-dim); text-decoration: none; }
.drawer-body b { display: block; font-size: 0.93rem; font-weight: 700; }
.drawer-body em { display: block; font-style: normal; font-size: 0.8rem; color: var(--muted); }
.drawer-body i { display: none; }
.drawer-extra { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; padding: 1.1rem 1.9rem; }
.drawer-extra a { font-size: 0.88rem; font-weight: 600; }

/* site search */
.finder[hidden] { display: none; }   /* author display beats the hidden attribute */
.finder {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(6, 15, 36, 0.55);
  display: flex;
  justify-content: center;
  padding: 6vh 1rem 2rem;
}
.finder-box {
  width: 100%;
  max-width: 640px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 26px 60px rgba(3, 9, 24, 0.45);
  overflow: hidden;
}
.finder-field {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.finder-field img { opacity: 0.5; flex-shrink: 0; }
.finder-field input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: none;
  font: inherit;
  font-size: 1rem;
  color: var(--navy);
  background: none;
}
.finder-field button {
  border: 0;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0.35rem;
  display: inline-flex;
  flex-shrink: 0;
}
.finder-results { overflow-y: auto; padding: 0.5rem; }
.finder-results a {
  display: block;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--navy);
}
.finder-results a:hover, .finder-results a.on { background: var(--blue-dim); text-decoration: none; }
.finder-results b { display: block; font-size: 0.94rem; font-weight: 700; }
.finder-results em { display: block; font-style: normal; font-size: 0.82rem; color: var(--muted); margin-top: 0.1rem; }
.finder-kind {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.15rem;
}
.finder-empty { padding: 1.4rem 1rem; margin: 0; font-size: 0.9rem; color: var(--muted); }

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  color: #C9D2E8;
  margin-top: 4rem;
}
.footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 3rem 1.25rem 2rem; }
.footer-top { max-width: 520px; margin: 0 auto 2rem; text-align: center; }
.footbrand {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}
.footbrand:hover { text-decoration: none; }
.site-footer .footbrand .brandhead { color: #6FA8FF; }
.site-footer .footbrand .brandtail { color: #FFFFFF; }
.footer-tag { color: #A9B4D0; margin-top: 0.75rem; font-size: 0.95rem; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-links a { color: #C9D2E8; font-size: 0.9rem; font-weight: 600; }
.footer-links a:hover { color: #FFFFFF; }
.footer-rg {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
  padding: 1.5rem 0;
}
.footer-rg img { height: 42px; width: auto; }
.footer-rg p { color: #A9B4D0; font-size: 0.85rem; margin: 0; flex: 1 1 320px; }
.footer-rg a { color: #9FC1FF; }
.footer-bottom { padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.footer-disclosure { font-size: 0.82rem; color: #8D99BC; margin-bottom: 0.5rem; }
.footer-disclosure a { color: #9FC1FF; }
.footer-copy { font-size: 0.82rem; color: #8D9ABE; margin: 0; }

/* ── Back to top ──────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
  z-index: 300;
  box-shadow: 0 6px 18px rgba(10, 31, 68, 0.35);
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top img { filter: invert(100%); width: 18px; height: 18px; }
.back-to-top:hover { background: var(--blue); }

/* ── Shared buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: #A50E26; }
