:root {
  --richmond-blue: #0a2c5e;
  --richmond-blue-deep: #061c3d;
  --richmond-gold: #f4d35e;
  --cream: #f7f4ec;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* Author `display` rules outrank the UA sheet, so [hidden] needs help. */
[hidden] { display: none !important; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--richmond-blue-deep);
  color: var(--cream);
  font-family: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
}

/* Kit-striped pitch backdrop */
.pitch {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,.10), transparent 60%),
    repeating-linear-gradient(115deg, rgba(255,255,255,.035) 0 34px, transparent 34px 68px),
    linear-gradient(170deg, var(--richmond-blue) 0%, var(--richmond-blue-deep) 100%);
  z-index: 0;
}

.stage {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding:
    calc(var(--safe-top) + 20px)
    20px
    calc(var(--dock-h, 96px) + 16px);
  transition: padding-bottom .2s ease;
  cursor: pointer;
  outline: none;
  user-select: none;
}

.wordmark {
  display: flex;
  justify-content: center;
}

.believe {
  font: inherit;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .42em;
  padding: 7px 16px 6px 20px;
  color: var(--richmond-blue);
  background: var(--richmond-gold);
  border-radius: 2px;
  transform: rotate(-1.2deg);
  box-shadow: 0 6px 18px rgba(0,0,0,.28);
}

.believe-info {
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1px solid rgba(10,44,94,.5);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

.quote-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 24px;
  max-width: 44rem;
  width: 100%;
  margin: 0 auto;
  transition: opacity .28s ease, transform .28s ease;
}

.quote-wrap.swap {
  opacity: 0;
  transform: translateY(10px);
}

.quote {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.6rem, 6.2vw, 2.9rem);
  line-height: 1.28;
  font-weight: 400;
  text-wrap: balance;
  text-shadow: 0 2px 14px rgba(0,0,0,.35);
}

.quote.long { font-size: clamp(1.25rem, 4.6vw, 2.1rem); }
.quote.xlong { font-size: clamp(1.05rem, 3.9vw, 1.7rem); }

.attrib {
  margin: 0;
  font-size: clamp(.72rem, 3vw, .85rem);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--richmond-gold);
  font-weight: 700;
}

.attrib::before { content: "— "; }

.hint {
  margin: 0;
  text-align: center;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(247,244,236,.45);
  transition: opacity .4s ease;
}

.hint.faded { opacity: 0; }

/* Dock: character filters */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 10px 12px calc(var(--safe-bottom) + 12px);
  background: linear-gradient(to top, rgba(6,28,61,.96) 55%, rgba(6,28,61,0));
  transition: background .2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.dock-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--cream);
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.dock-toggle svg { transition: transform .2s ease; }
.dock-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.dock.open {
  background: rgba(6,28,61,.97);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255,255,255,.10);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-height: 42svh;
  overflow-y: auto;
  padding: 4px 2px 2px;
  width: 100%;
  max-width: 34rem;
  -webkit-overflow-scrolling: touch;
}

.chip {
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(247,244,236,.72);
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  padding: 8px 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.chip[aria-pressed="true"] {
  background: var(--richmond-gold);
  border-color: var(--richmond-gold);
  color: var(--richmond-blue);
}

.chip .count {
  opacity: .6;
  font-weight: 500;
  margin-left: 5px;
}

.chip.all { border-style: dashed; }

.flag {
  position: fixed;
  top: calc(var(--safe-top) + 12px);
  left: 12px;
  z-index: 3;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}

/* The dot itself, so the tap target stays finger-sized while the mark stays small. */
.flag::after {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--flag-color, transparent);
  box-shadow: 0 0 0 1px rgba(0,0,0,.25), 0 0 10px var(--flag-glow, transparent);
  transition: background .2s ease, box-shadow .2s ease;
}

.flag.verified   { --flag-color: #4ade80; --flag-glow: rgba(74,222,128,.55); }
.flag.unverified { --flag-color: #f87171; --flag-glow: rgba(248,113,113,.45); }

.share {
  position: fixed;
  top: calc(var(--safe-top) + 12px);
  right: 12px;
  z-index: 3;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: rgba(247,244,236,.65);
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
  cursor: pointer;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-bottom) + 84px);
  transform: translate(-50%, 8px);
  z-index: 4;
  background: var(--richmond-gold);
  color: var(--richmond-blue);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 8px 14px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  .quote-wrap, .toast, .hint, .dock-toggle svg, .stage, .dock, .flag::after { transition: none; }
  .quote-wrap.swap { transform: none; }
}


/* ---- About sheet ------------------------------------------------------- */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 19;
  background: rgba(3,14,31,.6);
  opacity: 0;
  transition: opacity .22s ease-out;
}

.sheet-backdrop.open { opacity: 1; }

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  max-height: 84svh;
  margin: 0 auto;
  max-width: 560px;
  padding: 14px 20px calc(var(--safe-bottom) + 22px);
  background: #0d3268;
  border: 1px solid rgba(255,255,255,.14);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -14px 44px rgba(0,0,0,.55);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateY(100%);
  transition: transform .26s cubic-bezier(.2,.8,.2,1);
}

.sheet.open { transform: translateY(0); }

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.sheet-head h2 {
  margin: 0;
  font-size: 15px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--richmond-gold);
}

.icon-btn {
  font: inherit;
  font-size: 15px;
  line-height: 1;
  color: var(--cream);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
}

.sheet-body p {
  margin: 0 0 12px;
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(247,244,236,.86);
}

.info-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 20px 0 16px;
}

.info-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  color: var(--cream);
  text-decoration: none;
}

.info-link:active { background: rgba(255,255,255,.12); }

.info-link-ico {
  flex: none;
  font-size: 19px;
  line-height: 1;
}

.info-link-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.info-link-title { font-size: 14px; font-weight: 600; }

.info-link-desc {
  font-size: 12px;
  color: rgba(247,244,236,.6);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.info-link-chevron {
  flex: none;
  color: rgba(247,244,236,.45);
  font-size: 18px;
}

.credit {
  margin: 0 0 8px;
  font-size: 11.5px;
  line-height: 1.45;
  color: rgba(247,244,236,.55);
}

@media (prefers-reduced-motion: reduce) {
  .sheet, .sheet-backdrop { transition: none; }
}
