/* ==========================================================================
   The World Scholar's Cup — site styles
   Palette and type follow registration.scholarscup.org; textures and
   motifs (waves, highlighter) follow pwaa.global.
   ========================================================================== */

/* ---- Fonts ------------------------------------------------------------- */
@font-face { font-family: "Whitney SSm"; src: url("../fonts/whitney-ssm-book.a0f0212523a4.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Whitney SSm"; src: url("../fonts/whitney-ssm-book-italic.f46fddbae1d7.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Whitney SSm"; src: url("../fonts/whitney-ssm-medium.7b6a124e8979.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Whitney SSm"; src: url("../fonts/whitney-ssm-semibold.7903db0cfd26.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Whitney SSm"; src: url("../fonts/whitney-ssm-bold.19b283ce2ba7.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Whitney Display"; src: url("../fonts/whitney-bold.9104e5d6d96f.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Whitney Display"; src: url("../fonts/whitney-black.9af460895fb8.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Whitney Index"; src: url("../fonts/whitney-index-round-bold.f3500675c74a.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: block; }

/* ---- Tokens ------------------------------------------------------------ */
:root {
  --maroon: #7d2b24;
  --maroon-dark: #641e19;
  --maroon-deep: #4a120e;
  --crimson: #93192d;
  --sun: #ffcd05;
  --sun-deep: #d9a800;
  --gold: #8c5f1c;
  --gold-soft: #e8d08a;
  --paper: #fdf8ee;
  --cream: #fff2d5;
  --wash: #fdf3d6;
  --stripe: #f3eedf;
  --card: #ffffff;
  --ink: #3f1f21;
  --ink-soft: #6e5552;
  --muted: #75664a;
  --rule: #e8dec8;
  --rule-strong: #d9ccb0;
  --green: #1d6b4e;
  --green-dark: #145239;
  --charcoal: #2c2425;
  --ok: #2f6b4a;
  --ok-bg: #e4efe3;
  --warn: #8a5a12;
  --warn-bg: #f8edd2;
  --bad: #a13a35;
  --bad-bg: #f6e1de;
  --live: #1d6b4e;

  --font-sans: "Whitney SSm", Whitney, "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: "Whitney Display", "Whitney SSm", Whitney, "Segoe UI", system-ui, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: clamp(1.125rem, 1.07rem + 0.25vw, 1.25rem);
  --step-2: clamp(1.3rem, 1.2rem + 0.5vw, 1.6rem);
  --step-3: clamp(1.6rem, 1.4rem + 1vw, 2.2rem);
  --step-4: clamp(2rem, 1.6rem + 2vw, 3.1rem);
  --step-5: clamp(2.4rem, 1.7rem + 3.4vw, 4.4rem);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgb(63 31 33 / 0.06), 0 1px 1px rgb(63 31 33 / 0.04);
  --shadow: 0 6px 18px -6px rgb(63 31 33 / 0.18), 0 2px 4px rgb(63 31 33 / 0.05);
  --shadow-lg: 0 24px 48px -18px rgb(63 31 33 / 0.35);
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 72px;
  --sticky-h: calc(var(--header-h) + var(--staff-h, 0px)); /* everything stuck to the top of the window */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  --waves-maroon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='30' viewBox='0 0 160 30'%3E%3Cpath d='M0 15c20-9 60-9 80 0s60 9 80 0' fill='none' stroke='%23883229' stroke-width='3'/%3E%3C/svg%3E");
  --waves-navy-all: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='30' viewBox='0 0 160 30'%3E%3Cpath d='M0 15c20-9 60-9 80 0s60 9 80 0' fill='none' stroke='%2324497f' stroke-width='3'/%3E%3C/svg%3E");
  --waves-sun: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='30' viewBox='0 0 160 30'%3E%3Cpath d='M0 15c20-9 60-9 80 0s60 9 80 0' fill='none' stroke='%23f5c400' stroke-width='3'/%3E%3C/svg%3E");
  --waves-deep: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='30' viewBox='0 0 160 30'%3E%3Cpath d='M0 15c20-9 60-9 80 0s60 9 80 0' fill='none' stroke='%23562019' stroke-width='3'/%3E%3C/svg%3E");
  --waves-paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='30' viewBox='0 0 160 30'%3E%3Cpath d='M0 15c20-9 60-9 80 0s60 9 80 0' fill='none' stroke='%23f6ecd8' stroke-width='3'/%3E%3C/svg%3E");
}

/* ---- Reset & base ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--sticky-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
@media (max-width: 640px) { body { font-size: 1rem; } }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--maroon); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--crimson); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
p, ul, ol, dl, figure, blockquote { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; color: var(--ink); text-wrap: balance; }
main { display: block; outline: none; }
[hidden] { display: none !important; }
::selection { background: var(--sun); color: var(--ink); }
:focus-visible { outline: 3px solid var(--sun-deep); outline-offset: 2px; border-radius: 4px; }
.hero-carousel :focus-visible, .masthead :focus-visible, .site-footer :focus-visible { outline-color: var(--sun); }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--sun); color: var(--ink); padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 600; text-decoration: none; transition: top 0.2s; }
.skip-link:focus { top: 12px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; display: inline-block; }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: calc(780px + 2 * var(--gutter)); }

/* ---- Type helpers ------------------------------------------------------ */
.eyebrow { font-family: var(--font-sans); font-size: 0.9rem; font-weight: 600; letter-spacing: 0; color: var(--gold); margin-bottom: 0.6rem; }
.eyebrow--sun { color: var(--sun); }
.section-title { font-size: var(--step-4); font-weight: 900; letter-spacing: -0.02em; }
.section-lead { color: var(--ink-soft); font-size: var(--step-1); margin-top: 0.75rem; max-width: 62ch; }
.muted { color: var(--muted); }

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  --btn-bg: var(--maroon); --btn-fg: #fff; --btn-border: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 46px; padding: 0.7em 1.35em;
  border: 2px solid var(--btn-border); border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 600; font-size: 1rem; line-height: 1.1; text-decoration: none; white-space: nowrap;
  transition: background-color 0.15s, box-shadow 0.15s, color 0.15s;
}
.btn:hover { color: var(--btn-fg); }
/* Phones: a long label wraps inside the button instead of pushing it off the screen. */
@media (max-width: 560px) { .btn { max-width: 100%; white-space: normal; text-align: center; } }
.btn .icon { transition: transform 0.2s var(--ease); }
.btn:hover .icon-arrow-right { transform: translateX(3px); }
.btn--maroon { --btn-bg: var(--maroon); }
.btn--maroon:hover { --btn-bg: var(--maroon-dark); }
.btn--sun { --btn-bg: var(--sun); --btn-fg: var(--ink); }
.btn--sun:hover { --btn-bg: #ffd83d; }
.btn--outline { --btn-bg: transparent; --btn-fg: var(--maroon); --btn-border: var(--maroon); }
.btn--outline:hover { --btn-bg: var(--maroon); --btn-fg: #fff; }
.btn--ghost-light { --btn-bg: rgb(255 255 255 / 0.06); --btn-fg: var(--cream); --btn-border: rgb(255 242 213 / 0.55); }
.btn--ghost-light:hover { --btn-bg: rgb(255 255 255 / 0.14); --btn-fg: #fff; --btn-border: var(--cream); }
.btn--sm { min-height: 38px; padding: 0.45em 1.05em; font-size: 0.9375rem; }
.btn--lg { min-height: 54px; padding: 0.85em 1.6em; font-size: 1.0625rem; }
.btn--block { display: flex; width: 100%; }

.link-arrow { display: inline-flex; align-items: center; gap: 0.35em; font-weight: 600; text-decoration: none; color: var(--maroon); white-space: nowrap; }
.link-arrow:hover { text-decoration: underline; }
.link-arrow .icon { transition: transform 0.2s var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }

.icon-button { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 999px; border: 0; background: transparent; color: var(--ink); text-decoration: none; transition: background-color 0.15s; }
.icon-button:hover { background: var(--stripe); color: var(--maroon); }
.icon-button .icon { width: 22px; height: 22px; }

/* ---- Pills & chips ----------------------------------------------------- */
.pill { display: inline-flex; align-items: center; gap: 0.35em; padding: 0.28em 0.7em; border-radius: 6px; font-size: 0.8125rem; font-weight: 600; line-height: 1.2; white-space: nowrap; background: var(--stripe); color: var(--ink-soft); }
.pill--ok { background: var(--ok-bg); color: var(--ok); }
.pill--warn { background: var(--warn-bg); color: var(--warn); }
.pill--bad { background: var(--bad-bg); color: var(--bad); }
.pill--muted { background: var(--stripe); color: var(--muted); }
.pill--live { background: var(--green); color: #fff; }
.pill--live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--sun); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.tag { display: inline-block; padding: 0.2em 0.6em; border-radius: 999px; border: 1px solid var(--rule-strong); font-size: 0.75rem; font-weight: 600; color: var(--ink-soft); letter-spacing: 0.02em; }
.tag--global { border-color: transparent; background: var(--sun); color: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.chip { display: inline-flex; align-items: center; gap: 0.4em; min-height: 36px; padding: 0.35em 0.9em; border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--card); color: var(--ink); font-size: 0.9rem; font-weight: 500; text-decoration: none; transition: border-color 0.15s, background-color 0.15s; }
.chip:hover, .chip[aria-current="true"], .chip.is-active { border-color: var(--maroon); color: var(--maroon); background: #fff; }
.chip[aria-pressed="true"], .chip.is-selected { background: var(--maroon); border-color: var(--maroon); color: #fff; }


/* ---- Sections ---------------------------------------------------------- */
.section { padding-block: clamp(56px, 7vw, 104px); }
.section--tight { padding-block: clamp(40px, 5vw, 72px); }
.section--paper { background: var(--paper) var(--waves-paper); }
.section--cream { background: var(--wash); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; margin-bottom: clamp(24px, 3vw, 40px); }
.empty { padding: 28px; border: 2px dashed var(--rule-strong); border-radius: var(--radius); text-align: center; color: var(--ink-soft); }

/* ---- Announcement ------------------------------------------------------ */
.announcement { position: relative; font-size: 0.95rem; }
.announcement__inner { display: flex; align-items: center; gap: 12px; padding-block: 10px; }
.announcement__text { flex: 1; line-height: 1.45; }
.announcement__label { display: inline-block; margin-right: 0.6em; padding: 0.15em 0.55em; border-radius: 4px; background: var(--maroon); color: var(--cream); font-size: 0.9rem; font-weight: 700; letter-spacing: 0; vertical-align: 0.1em; }
.announcement__link { display: inline-flex; align-items: center; gap: 0.25em; margin-left: 0.4em; font-weight: 600; white-space: nowrap; }
.announcement__icon { width: 30px; height: 30px; flex: none; }
.announcement__close { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: inherit; opacity: 0.75; }
.announcement__close:hover { opacity: 1; background: rgb(63 31 33 / 0.08); }
/* The button keeps its space until the script shows it, so the banner doesn't jump. */
.announcement__close[hidden] { display: grid !important; visibility: hidden; }
.announcement--news { background: var(--cream); border-bottom: 1px solid var(--rule); }
.announcement--alert { background: var(--sun); color: var(--ink); }
.announcement--alert .announcement__label { background: var(--ink); color: var(--sun); }
.announcement--alert a { color: var(--ink); }
.announcement--celebrate { background: var(--green); color: #fff; }
.announcement--celebrate a { color: #fff; }
.announcement--celebrate .announcement__label { background: var(--sun); color: var(--ink); }

/* ---- Header ------------------------------------------------------------ */
.site-header { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--rule); transition: box-shadow 0.2s; }
/* The blur lives on a pseudo-element: a backdrop-filter on the header itself would trap the fixed mobile menu inside it. */
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgb(253 248 238 / 0.94); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
.site-header.is-scrolled { box-shadow: 0 6px 20px -12px rgb(63 31 33 / 0.35); }
.site-header__inner { display: flex; align-items: center; gap: 20px; height: var(--header-h); }
.brand { flex: none; display: block; width: clamp(150px, 16vw, 206px); }
.brand img { width: 100%; height: auto; }
.primary-nav { margin-left: auto; }
.primary-nav__list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.primary-nav__item { position: relative; }
.primary-nav__link { display: inline-flex; align-items: center; gap: 4px; height: 42px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font-weight: 500; font-size: 0.98rem; text-decoration: none; white-space: nowrap; transition: background-color 0.15s, color 0.15s; }
.primary-nav__link:hover, .primary-nav__link[aria-expanded="true"] { background: var(--stripe); color: var(--maroon); }
.primary-nav__link.is-active { position: relative; color: var(--maroon); }
.primary-nav__link.is-active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -8px; height: 3px; border-radius: 3px; background: var(--maroon); }
.primary-nav__chevron { width: 16px; height: 16px; transition: transform 0.2s var(--ease); }
[aria-expanded="true"] > .primary-nav__chevron { transform: rotate(180deg); }
.site-header__actions { display: flex; align-items: center; gap: 6px; margin-left: 8px; }
/* Search opens in place of the menu; quick results drop down below it. */
.site-header__inner { position: relative; }
.header-search { position: relative; flex: 1; max-width: 640px; margin-left: auto; }
.header-search[hidden] { display: none; }
.site-header.is-searching .primary-nav, .site-header.is-searching [data-search-open] { display: none; }
.header-search__field { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 6px 0 16px; border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--card); box-shadow: var(--shadow-sm); transform-origin: right center; animation: search-open 0.22s var(--ease); }
.header-search__field:focus-within { border-color: var(--maroon); box-shadow: 0 0 0 3px rgb(255 205 5 / 0.45); }
.header-search__field > .icon { flex: none; width: 20px; height: 20px; color: var(--muted); }
.header-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 1rem; outline: none; }
.header-search input::-webkit-search-cancel-button { display: none; }
.header-search__close { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-soft); cursor: pointer; }
.header-search__close:hover { background: var(--stripe); color: var(--maroon); }
.header-search__close .icon { width: 18px; height: 18px; }
@keyframes search-open { from { opacity: 0; transform: scaleX(0.6); } }
.header-search__results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 40; max-height: min(70vh, 520px); overflow-y: auto; padding: 6px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.header-search__results ul { list-style: none; margin: 0; padding: 0; }
.header-search__item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 9px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.header-search__item:hover { background: var(--wash); color: var(--ink); }
.header-search__item:focus-visible { background: var(--wash); color: var(--ink); outline: 2px solid var(--maroon); outline-offset: -2px; }
.header-search__title { font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-search__item:hover .header-search__title, .header-search__item:focus-visible .header-search__title { color: var(--maroon); }
.header-search__group { grid-row: span 2; align-self: center; font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.header-search__detail { font-size: 0.85rem; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-search__empty { padding: 12px; color: var(--ink-soft); }
.header-search__all { display: block; margin-top: 4px; padding: 10px 12px; border-top: 1px solid var(--rule); border-radius: 0 0 10px 10px; color: var(--maroon); font-weight: 600; text-decoration: none; }
.header-search__all:hover { background: var(--wash); }
.header-search__all:focus-visible { background: var(--wash); outline: 2px solid var(--maroon); outline-offset: -2px; }
@media (max-width: 700px) {
  .site-header.is-searching .brand, .site-header.is-searching .site-header__register { display: none; }
  .header-search { max-width: none; margin-left: 0; }
  .header-search__group { display: none; }
  .header-search__item { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .header-search__field { animation: none; } }
.menu-toggle { display: none; }
.menu-toggle__close { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle__open { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle__close { display: inline; }

.dropdown { position: absolute; top: calc(100% + 10px); left: 50%; translate: -50% 0; width: min(640px, 90vw); display: grid; grid-template-columns: 200px 1fr; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; animation: drop-in 0.18s var(--ease); }
.primary-nav__item:last-child .dropdown, .primary-nav__item:nth-last-child(2) .dropdown { left: auto; right: -40px; translate: none; }
@keyframes drop-in { from { opacity: 0; transform: translate3d(0, -6px, 0); } }
.dropdown__intro { padding: 24px 22px; background: var(--maroon) var(--waves-maroon); color: var(--cream); font-size: 0.95rem; line-height: 1.5; }
.dropdown__intro .eyebrow { color: var(--sun); }
.dropdown__links { list-style: none; margin: 0; padding: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.dropdown__links li { display: flex; }
.dropdown__links a { display: block; flex: 1; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.dropdown__links a:hover, .dropdown__links a[aria-current="page"] { background: var(--wash); }
.dropdown__label { display: block; font-weight: 600; line-height: 1.25; }
.dropdown__links a:hover .dropdown__label { color: var(--maroon); }
.dropdown__text { display: block; font-size: 0.85rem; color: var(--ink-soft); line-height: 1.35; margin-top: 2px; }
/* Global Rounds and the ToC carry their calendar colours: sun yellow and Yale navy. */
.dropdown__links a.menu-tone--global { background: rgb(255 205 5 / 0.16); }
.dropdown__links a.menu-tone--global:hover, .dropdown__links a.menu-tone--global[aria-current="page"] { background: rgb(255 205 5 / 0.32); }
.dropdown__links a.menu-tone--toc { background: rgb(28 63 116 / 0.07); }
.dropdown__links a.menu-tone--toc:hover, .dropdown__links a.menu-tone--toc[aria-current="page"] { background: rgb(28 63 116 / 0.14); }
.dropdown__links a.menu-tone--toc:hover .dropdown__label { color: #1c3f74; }
.mobile-menu__group a.menu-tone--global { background: rgb(255 205 5 / 0.14); }
.mobile-menu__group a.menu-tone--toc { background: rgb(169 198 234 / 0.16); }

.mobile-menu { position: fixed; inset: var(--menu-top, var(--header-h)) 0 0; z-index: 29; background: var(--maroon) var(--waves-maroon); color: var(--cream); overflow-y: auto; overscroll-behavior: contain; animation: fade-in 0.18s ease; }
@keyframes fade-in { from { opacity: 0; } }
.mobile-menu__inner { padding: 20px var(--gutter) calc(40px + env(safe-area-inset-bottom)); max-width: 560px; margin-inline: auto; }
.mobile-menu__search { display: flex; align-items: center; gap: 10px; padding: 0 16px; min-height: 52px; background: rgb(255 255 255 / 0.1); border: 1px solid rgb(255 242 213 / 0.3); border-radius: 999px; }
.mobile-menu__search input { flex: 1; min-width: 0; border: 0; background: transparent; color: #fff; padding: 12px 0; outline: none; }
.mobile-menu__search input::placeholder { color: rgb(255 242 213 / 0.85); }
.mobile-menu__list { list-style: none; margin: 16px 0 0; padding: 0; }
.mobile-menu__list > li { border-bottom: 1px solid rgb(255 242 213 / 0.18); }
.mobile-menu__link, .mobile-menu__group summary { display: flex; align-items: center; justify-content: space-between; min-height: 58px; font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; color: #fff; text-decoration: none; cursor: pointer; list-style: none; }
.mobile-menu__group summary::-webkit-details-marker { display: none; }
.mobile-menu__group summary .icon { transition: transform 0.2s; }
.mobile-menu__group[open] summary .icon { transform: rotate(180deg); }
.mobile-menu__group ul { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 2px; }
.mobile-menu__group a { display: block; padding: 10px 14px; border-radius: 10px; color: var(--cream); text-decoration: none; font-size: 1.05rem; }
.mobile-menu__group a:hover, .mobile-menu__group a[aria-current="page"], .mobile-menu__link[aria-current="page"] { background: rgb(255 255 255 / 0.1); color: var(--sun); }
.mobile-menu__cta { display: grid; gap: 10px; margin-top: 24px; }
body.menu-open { overflow: hidden; }

@media (max-width: 1080px) {
  .primary-nav { display: none; }
  .menu-toggle { display: inline-grid; }
  .site-header__actions { margin-left: auto; }
}
@media (max-width: 640px) {
  :root { --header-h: 62px; }
  .site-header__register { display: none; }
}

/* ---- Flash messages ---------------------------------------------------- */
.flash-stack { display: grid; gap: 8px; padding-top: 16px; }
.flash { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--ok-bg); color: var(--ok); font-weight: 500; }
.flash--error, .flash--warning { background: var(--bad-bg); color: var(--bad); }

/* ---- Masthead (page header band) --------------------------------------- */
.masthead { background: var(--maroon) var(--waves-maroon); color: var(--cream); }
.masthead__inner { padding-block: clamp(24px, 3.5vw, 44px) clamp(22px, 3vw, 40px); }
.masthead__title { color: #fff; font-size: var(--step-4); font-weight: 900; letter-spacing: -0.025em; line-height: 1.05; max-width: 24ch; }
.masthead__title em { font-style: normal; color: var(--sun); }
.masthead__lead { margin-top: 10px; max-width: 68ch; font-size: 1.08rem; line-height: 1.5; color: rgb(255 242 213 / 0.9); }
.masthead__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
@media (max-width: 560px) { .masthead__actions .btn { flex: 1 1 auto; } }
.masthead__meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 12px; color: var(--cream); font-weight: 500; }
.masthead__meta span { display: inline-flex; align-items: center; gap: 8px; }
.masthead__meta .icon { color: var(--sun); }
.masthead--split .masthead__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 32px; }
@media (max-width: 760px) { .masthead--split .masthead__inner { grid-template-columns: 1fr; } }
.crumbs { margin-bottom: 18px; font-size: 0.9rem; }
.crumbs a { display: inline-flex; align-items: center; gap: 6px; color: var(--cream); text-decoration: none; opacity: 0.85; }
.crumbs a:hover { opacity: 1; color: var(--sun); }
.crumbs span { opacity: 0.6; margin-inline: 6px; }

/* ==========================================================================
   Home
   ========================================================================== */
.hero-carousel { position: relative; background: var(--maroon-deep) var(--waves-deep); color: var(--cream); overflow: hidden; }
.hero-carousel__slides { display: grid; }
.hero-slide { grid-area: 1 / 1; position: relative; display: flex; align-items: center; min-height: clamp(420px, 62vh, 580px); opacity: 0; visibility: hidden; transition: opacity 0.8s ease, visibility 0s linear 0.8s; }
.hero-slide.is-active { opacity: 1; visibility: visible; transition: opacity 0.8s ease; z-index: 1; }
.hero-slide__media { position: absolute; inset: 0; overflow: hidden; background: var(--maroon-deep); }
.hero-slide__media img { width: 100%; height: 100%; object-fit: cover; }
.hero-slide.is-active .hero-slide__media img { animation: hero-drift 9s ease-out both; }
@keyframes hero-drift { from { transform: scale(1.06); } to { transform: scale(1); } }
.hero-slide__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(52 14 10 / 0.9) 0%, rgb(52 14 10 / 0.72) 32%, rgb(52 14 10 / 0.18) 68%, rgb(52 14 10 / 0) 85%), linear-gradient(0deg, rgb(30 8 6 / 0.6), rgb(30 8 6 / 0) 32%); }
.hero-slide__content { position: relative; z-index: 1; padding-block: 56px 100px; }
.hero-slide__content > * { max-width: 640px; }
.hero-slide__title { color: #fff; font-family: var(--font-display); font-size: clamp(2.5rem, 1.4rem + 4.2vw, 4.8rem); font-weight: 900; line-height: 0.98; letter-spacing: -0.035em; text-wrap: balance; text-shadow: 0 2px 24px rgb(0 0 0 / 0.25); }
.hero-slide__accent { display: block; color: var(--sun); }
.hero-slide__text { margin-top: 18px; max-width: 34em; color: rgb(255 242 213 / 0.94); font-size: var(--step-1); line-height: 1.5; text-shadow: 0 1px 12px rgb(0 0 0 / 0.3); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero__video-link { display: inline-flex; align-items: center; gap: 12px; margin-top: 22px; color: var(--cream); font-weight: 600; text-decoration: none; }
.hero__video-link:hover { color: var(--sun); }
.hero__video-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgb(255 255 255 / 0.12); border: 1px solid rgb(255 242 213 / 0.4); }
.hero__video-link:hover .hero__video-icon { background: var(--sun); color: var(--ink); border-color: var(--sun); }
.hero-carousel__controls { position: absolute; left: 0; right: 0; bottom: 22px; z-index: 2; }
.hero-carousel__bar { display: flex; align-items: center; gap: 10px; }
.hero-dots { display: flex; flex-wrap: wrap; align-items: center; }
.hero-dot { position: relative; display: grid; place-items: center; width: 24px; height: 32px; padding: 0; border: 0; background: none; cursor: pointer; transition: width 0.3s var(--ease); }
.hero-dot::before { content: ""; width: 10px; height: 10px; border-radius: 999px; background: rgb(255 255 255 / 0.5); box-shadow: 0 0 0 1px rgb(30 8 6 / 0.2); transition: width 0.3s var(--ease), background-color 0.2s; }
.hero-dot:hover::before { background: #fff; }
.hero-dot.is-active { width: 48px; }
.hero-dot.is-active::before { width: 34px; background: rgb(255 255 255 / 0.32); }
.hero-dot.is-active::after { content: ""; position: absolute; left: 7px; top: 11px; width: var(--pill-w, 34px); height: 10px; border-radius: 999px; background: var(--sun); }
.hero-carousel.is-running .hero-dot.is-active::after { animation: dot-fill var(--slide-time, 7s) linear both; }
/* The fill grows from a dot into the full pill, so its rounded ends match the track. */
@keyframes dot-fill { from { width: 10px; } to { width: var(--pill-w, 34px); } }
.hero-arrow, .hero-pause { display: inline-grid; place-items: center; height: 40px; border: 1px solid rgb(255 242 213 / 0.45); border-radius: 999px; background: rgb(30 8 6 / 0.35); color: #fff; cursor: pointer; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.hero-arrow { width: 40px; }
.hero-pause { padding: 0 14px; margin-left: auto; font-size: 0.85rem; font-weight: 600; }
.hero-arrow:hover, .hero-pause:hover { background: var(--sun); border-color: var(--sun); color: var(--ink); }
@media (max-width: 560px) {
  /* Phones: swipe instead of arrows, so the dots fit on one line. */
  .hero-carousel__bar { gap: 6px; }
  .hero-arrow { display: none; }
  .hero-dots { flex-wrap: nowrap; }
  .hero-dot { width: 24px; }
  .hero-dot.is-active { width: 44px; }
  .hero-dot.is-active { --pill-w: 30px; }
  .hero-dot.is-active::before { width: 30px; }
}
@media (max-width: 899px) {
  /* Every slide is the same frame: the photo fills it and the words sit at the bottom, so the
     carousel doesn't change height with each photo or with how much a slide says. */
  .hero-slide { align-items: flex-end; min-height: clamp(500px, 76vh, 640px); min-height: clamp(500px, 76svh, 640px); }
  .hero-slide__media::after { background: linear-gradient(0deg, rgb(52 14 10 / 0.96) 0%, rgb(52 14 10 / 0.86) 40%, rgb(52 14 10 / 0.3) 66%, rgb(52 14 10 / 0) 84%); }
  .hero-slide__content { padding-block: 24px 84px; }
  .hero-slide__title { font-size: clamp(2rem, 1.3rem + 4.4vw, 2.8rem); }
  .hero-slide__text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; margin-top: 12px; font-size: 1.02rem; }
  .hero__actions { gap: 10px; margin-top: 20px; }
  .hero__actions .btn { flex: 1 1 auto; min-height: 48px; padding-block: 0.7em; }
  .hero__video-link { margin-top: 14px; }
  .hero-carousel__controls { bottom: 20px; }
}


/* At a glance: compact panels, as on the original home page */
.home-panels { padding-block: clamp(28px, 4vw, 48px); background: var(--paper) var(--waves-paper); }
.glance { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); }
.panel { display: flex; flex-direction: column; min-width: 0; padding: clamp(18px, 2vw, 24px); background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.panel__head { display: flex; align-items: flex-start; gap: 12px; padding-bottom: 14px; margin-bottom: 6px; border-bottom: 1px solid var(--rule); }
.panel__title { font-size: 1.3rem; font-weight: 900; letter-spacing: -0.01em; line-height: 1.15; }
.panel__lead { margin-top: 3px; color: var(--ink-soft); font-size: 0.92rem; line-height: 1.4; }
.panel__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.panel__more { margin-top: auto; padding-top: 14px; align-self: flex-start; }
.panel__empty { padding: 12px 0; color: var(--ink-soft); }
.round-item, .event-item, .video-item { display: flex; align-items: center; gap: 12px; margin-inline: -8px; padding: 8px; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; transition: background-color 0.15s; }
.round-item:hover, .event-item:hover, .video-item:hover { background: var(--wash); color: var(--ink); }
.round-item { gap: 14px; }
.round-item__body, .event-item__body, .video-item__body { display: grid; gap: 2px; flex: 1; min-width: 0; }
.round-item__name, .event-item__body strong, .video-item__body strong { font-weight: 700; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.round-item:hover .round-item__name, .event-item:hover strong, .video-item:hover strong { color: var(--maroon); }
.round-item__where { color: var(--ink-soft); font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.round-item__where .icon { width: 0.95em; height: 0.95em; vertical-align: -2px; color: var(--gold); }
.round-item__go { flex: none; color: var(--rule-strong); transition: color 0.15s, transform 0.2s var(--ease); }
.round-item:hover .round-item__go { color: var(--maroon); transform: translateX(2px); }
.event-item img { flex: none; width: 48px; height: 48px; object-fit: contain; }
.event-item__body span { color: var(--ink-soft); font-size: 0.88rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-item__thumb { position: relative; flex: none; width: 112px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--charcoal); }
.video-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-item__play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--sun); color: var(--ink); box-shadow: 0 4px 10px rgb(0 0 0 / 0.35); transition: transform 0.2s var(--ease); }
.video-item__play .icon { width: 14px; height: 14px; margin-left: 2px; }
.video-item:hover .video-item__play { transform: scale(1.1); }
.video-item__body span { color: var(--muted); font-size: 0.85rem; }
@media (max-width: 1000px) {
  .glance { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .glance > :last-child { grid-column: 1 / -1; }
  .glance > :last-child .panel__list { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); column-gap: 20px; }
}
@media (max-width: 680px) { .glance { grid-template-columns: 1fr; } }

/* "Latest updates": one thin line of news, like Apple's "Hot News Headlines" */
.home-news { display: flex; align-items: center; gap: 10px 16px; margin: calc(-0.5 * clamp(28px, 4vw, 48px)) 0 clamp(18px, 2.5vw, 26px); padding: 11px 4px; border-block: 1px solid var(--rule-strong); font-size: 0.95rem; }
.home-news__label { flex: none; font-weight: 700; color: var(--maroon); text-decoration: none; }
.home-news__label:hover { text-decoration: underline; }
.home-news__label::after { content: ""; display: inline-block; width: 1px; height: 18px; margin-left: 16px; vertical-align: -4px; background: var(--rule-strong); }
.home-news__list { display: flex; flex: 1; min-width: 0; gap: 10px 20px; list-style: none; margin: 0; padding: 0; }
.home-news__list li { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.home-news__list li + li { padding-left: 20px; border-left: 1px solid var(--rule); }
.home-news__list a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-weight: 600; text-decoration: none; }
.home-news__list a:hover { color: var(--maroon); text-decoration: underline; }
.home-news__list time { flex: none; color: var(--muted); font-size: 0.85rem; }
.home-news__all { flex: none; margin-left: auto; color: var(--maroon); font-weight: 600; text-decoration: none; }
.home-news__all:hover { text-decoration: underline; }
@media (max-width: 760px) {
  .home-news { flex-wrap: wrap; }
  .home-news__label::after, .home-news__list li + li, .home-news__all { display: none; }
  .home-news__list { flex-basis: 100%; }
}

/* Home page boxes: four equal boxes, one idea each (after the bottom row of Apple's 2009 home page) */
.home-boxes { list-style: none; margin: clamp(16px, 2vw, 22px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(var(--boxes, 4), minmax(0, 1fr)); gap: clamp(14px, 2vw, 22px); }
.home-box { position: relative; isolation: isolate; display: flex; flex-direction: column; height: 244px; overflow: hidden; border-radius: var(--radius-lg); color: var(--ink); text-decoration: none; }
.home-box__text { position: relative; z-index: 2; display: grid; gap: 4px; padding: 20px 20px 0; }
.home-box__title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 900; letter-spacing: -0.01em; line-height: 1.15; }
.home-box__subtitle { font-size: 0.92rem; line-height: 1.4; }
.home-box--light { background: var(--card); border: 1px solid var(--rule); box-shadow: var(--shadow-sm); transition: border-color 0.15s; }
.home-box--light .home-box__subtitle { color: var(--ink-soft); }
.home-box--light .home-box__image { display: block; width: 100%; height: 54%; margin-top: auto; object-fit: cover; }
.home-box--light:hover { border-color: var(--rule-strong); color: var(--ink); }
.home-box--light:hover .home-box__title { color: var(--maroon); }
.home-box--photo { background: var(--maroon-deep); color: #fff; }
.home-box--photo::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgb(46 12 9 / 0.88), rgb(46 12 9 / 0.55) 42%, rgb(46 12 9 / 0) 72%); }
.home-box--photo .home-box__image { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; }
.home-box--photo .home-box__title { color: #fff; text-shadow: 0 1px 12px rgb(0 0 0 / 0.35); }
.home-box--photo .home-box__subtitle { color: rgb(255 242 213 / 0.92); }
.home-box--photo:hover { color: #fff; }
.home-box--maroon { background: var(--maroon) var(--waves-maroon); color: #fff; }
.home-box--maroon .home-box__title { color: #fff; }
.home-box--maroon .home-box__subtitle { color: rgb(255 242 213 / 0.88); }
.home-box--maroon .home-box__image { display: block; width: auto; height: 104px; margin: auto auto 0; object-fit: contain; }
/* Sun yellow for Global Rounds (dark words on the yellow) */
.home-box--sun.home-box--photo { background: var(--sun); color: var(--ink); }
.home-box--sun.home-box--photo::before { background: linear-gradient(180deg, rgb(255 205 5 / 0.95), rgb(255 205 5 / 0.7) 40%, rgb(255 205 5 / 0.28)); }
.home-box--sun.home-box--photo .home-box__title { color: var(--ink); text-shadow: none; }
.home-box--sun.home-box--photo .home-box__subtitle { color: var(--ink); }
.home-box--sun.home-box--photo:hover { color: var(--ink); }
.home-box--sun.home-box--maroon { background: var(--sun); }
.home-box--sun.home-box--maroon .home-box__title, .home-box--sun.home-box--maroon .home-box__subtitle { color: var(--ink); }
/* Yale blue for the Tournament of Champions */
.home-box--navy.home-box--photo { background: #0d2140; }
.home-box--navy.home-box--photo::before { background: linear-gradient(180deg, rgb(13 33 64 / 0.9), rgb(28 63 116 / 0.55) 45%, rgb(28 63 116 / 0.22)); }
.home-box--navy.home-box--photo .home-box__subtitle { color: #dce8f7; }
.home-box--navy.home-box--maroon { background: #1c3f74 var(--waves-navy-all); }
.home-box--maroon:hover { color: #fff; }
.home-box--maroon:hover .home-box__subtitle { text-decoration: underline; }
.home-box:focus-visible { outline: 3px solid var(--maroon); outline-offset: 3px; }
@media (max-width: 1000px) { .home-boxes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) {
  .home-box { height: 212px; }
  .home-box__text { padding: 14px 14px 0; }
  .home-box__title { font-size: 1.08rem; }
  .home-box__subtitle { font-size: 0.84rem; }
  .home-box--maroon .home-box__image { height: 80px; }
}

.theme-card__fallback-year { font-family: var(--font-display); font-weight: 900; font-size: 4rem; color: var(--maroon); }


.search-result .tag { margin-bottom: 6px; }
.seal { display: grid; place-items: center; flex: none; width: 60px; height: 60px; border-radius: 50%; overflow: hidden; background: var(--wash); border: 1px solid var(--rule); }
.seal img { width: 100%; height: 100%; object-fit: contain; }
.seal__fallback { font-family: var(--font-display); font-weight: 900; font-size: 1.5rem; color: var(--maroon); }
.cta-strip { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 24px; margin-top: 28px; padding: 18px 22px; border-radius: var(--radius); background: var(--wash); border: 1px solid var(--rule); }
.cta-strip p { color: var(--ink-soft); }
.cta-strip strong { color: var(--ink); }


/* Video embeds (lite) */
.video { margin: 0; }
.video__frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--charcoal); }
.video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video__poster { position: absolute; inset: 0; display: block; }
.video__poster img { width: 100%; height: 100%; object-fit: cover; transition: filter 0.3s; }
.video__poster:hover img { filter: brightness(0.9); }
.video__play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--sun); color: var(--ink); box-shadow: 0 8px 24px rgb(0 0 0 / 0.35); transition: transform 0.2s var(--ease); }
.video__play .icon { width: 28px; height: 28px; margin-left: 3px; }
.video__poster:hover .video__play { transform: scale(1.08); }
.video--large .video__play { width: 84px; height: 84px; }
.video__caption { display: grid; gap: 2px; padding-top: 10px; }
.video__title { font-weight: 600; line-height: 1.3; }
.video__meta { font-size: 0.85rem; color: var(--muted); }
.video-feature { display: grid; grid-template-columns: 1.7fr 1fr; gap: 20px; }
@media (max-width: 800px) { .video-feature { grid-template-columns: 1fr; } .video-feature__side { grid-template-columns: 1fr 1fr; } }
.video-dialog { width: min(1000px, 94vw, calc((94vh - 64px) * 16 / 9)); max-height: 94vh; padding: 0; border: 0; border-radius: var(--radius-lg); background: var(--charcoal); color: #fff; overflow: hidden; box-shadow: 0 30px 80px -20px rgb(0 0 0 / 0.6); }
.video-dialog::backdrop { background: rgb(30 10 8 / 0.82); }
.video-dialog__bar { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 18px; }
.video-dialog__title { flex: 1; min-width: 0; margin: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.video-dialog__youtube { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 7px 12px; border-radius: 999px; background: rgb(255 255 255 / 0.1); color: #fff; font-size: 0.88rem; font-weight: 600; text-decoration: none; }
.video-dialog__youtube:hover { background: #fff; color: var(--ink); }
.video-dialog__youtube .icon-youtube { color: #ff3b30; }
.video-dialog__youtube .icon-external { width: 0.85em; height: 0.85em; opacity: 0.7; }
.video-dialog__close { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--sun); color: var(--ink); cursor: pointer; }
.video-dialog__close:hover { background: #fff; }
.video-dialog__frame { position: relative; aspect-ratio: 16 / 9; background: #000 center / cover no-repeat; }
.video-dialog__frame.is-loading::before { content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border: 4px solid rgb(255 255 255 / 0.35); border-top-color: var(--sun); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }
.video-dialog__help { margin: 0; padding: 10px 18px 12px; color: rgb(255 255 255 / 0.8); font-size: 0.9rem; }
.video-dialog__help a { color: var(--sun); }
.video-dialog__frame iframe { position: relative; z-index: 1; display: block; width: 100%; height: 100%; border: 0; }
.video-dialog :focus-visible { outline-color: var(--sun); }
@media (max-width: 560px) { .video-dialog__youtube { font-size: 0; gap: 0; padding: 8px; } .video-dialog__youtube .icon-external { display: none; } .video-dialog__youtube .icon-youtube { width: 20px; height: 20px; } }

/* Quotes */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.quotes--single { grid-template-columns: minmax(0, 720px); justify-content: center; }
.quote { display: flex; flex-direction: column; gap: 16px; padding: 28px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.quote__mark { width: 40px; height: 40px; color: var(--sun-deep); }
.quote blockquote { flex: 1; font-size: 1.05rem; line-height: 1.6; color: var(--ink); font-style: italic; }
.quote figcaption { display: grid; gap: 2px; font-size: 0.95rem; }
.quote figcaption span { color: var(--muted); }
@media (max-width: 900px) { .quotes { grid-template-columns: 1fr; } }

/* ==========================================================================
   Calendar
   ========================================================================== */
.cal-toolbar { position: sticky; top: var(--sticky-h); z-index: 20; background: rgb(253 248 238 / 0.96); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.cal-toolbar__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding-block: 14px; }
.segmented { position: relative; display: inline-flex; padding: 4px; border-radius: 999px; background: var(--stripe); border: 1px solid var(--rule); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label, .segmented a { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; font-weight: 600; font-size: 0.93rem; color: var(--ink-soft); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color 0.15s, color 0.15s; }
.segmented label:hover, .segmented a:hover { color: var(--maroon); }
.segmented input:checked + label, .segmented a[aria-current="page"] { background: var(--card); color: var(--maroon); box-shadow: var(--shadow-sm); }
.segmented input:focus-visible + label { outline: 3px solid var(--sun-deep); outline-offset: 1px; }
/* With JS, one pill slides to the chosen option (also the List/Cards switch and subject chips). */
.segmented label, .segmented a { position: relative; z-index: 1; }
.has-thumb { position: relative; }
.pill-thumb { position: absolute; top: 0; left: 0; z-index: 0; border-radius: 999px; background: var(--card); box-shadow: var(--shadow-sm); pointer-events: none; transition: translate 0.3s var(--ease), width 0.3s var(--ease), height 0.3s var(--ease); }
.segmented.has-thumb input:checked + label, .segmented.has-thumb a[aria-current="page"], .view-toggle.has-thumb button[aria-pressed="true"] { background: transparent; box-shadow: none; }
.chips.has-thumb .pill-thumb { background: var(--maroon); box-shadow: none; }
.chips.has-thumb .chip { position: relative; z-index: 1; }
.chips.has-thumb .chip[aria-current="page"], .chips.has-thumb .chip.is-selected { background: transparent; border-color: transparent; color: #fff; }
.has-thumb.is-still .pill-thumb { transition: none; }
@media (prefers-reduced-motion: reduce) { .pill-thumb { transition: none; } }
.segmented .count { font-size: 0.78rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: rgb(63 31 33 / 0.08); }
.search-field { position: relative; flex: 1 1 200px; max-width: 360px; }
.search-field .icon { position: absolute; left: 14px; top: 50%; translate: 0 -50%; color: var(--muted); pointer-events: none; }
.search-field input { width: 100%; min-height: 44px; padding: 0 16px 0 42px; border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--card); }
.search-field input:focus { outline: none; border-color: var(--maroon); box-shadow: 0 0 0 3px rgb(255 205 5 / 0.5); }
.toggle { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 500; cursor: pointer; user-select: none; }
.toggle input { appearance: none; -webkit-appearance: none; width: 42px; height: 24px; margin: 0; border-radius: 999px; background: var(--muted); position: relative; transition: background-color 0.2s; cursor: pointer; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: translate 0.2s var(--ease); }
.toggle input:checked { background: var(--ok); }
.toggle input:checked::after { translate: 18px 0; }
.cal-toolbar__when { margin-left: auto; }
.cal-summary { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px 16px; margin: 14px 0 0; color: var(--ink-soft); }
.cal-summary strong { color: var(--ink); }
.cal-summary button { border: 0; background: none; padding: 0; color: var(--maroon); font-weight: 600; text-decoration: underline; text-underline-offset: 0.18em; }
.month { margin-top: 22px; }
.month__title { position: sticky; top: calc(var(--sticky-h) + var(--cal-toolbar-h, 72px)); z-index: 5; display: flex; align-items: baseline; gap: 10px; padding: 10px 0 8px; font-family: var(--font-display); font-size: clamp(1.45rem, 1.1rem + 1.2vw, 1.9rem); font-weight: 900; letter-spacing: -0.02em; line-height: 1.1; color: var(--ink); }
/* While a month heading is pinned it becomes a frosted bar across the page, so the rounds glide under it. */
.month__title::before { content: ""; position: absolute; inset: 0 calc(50% - 50vw); z-index: -1; background: rgb(253 248 238 / 0.82); backdrop-filter: blur(12px) saturate(1.2); -webkit-backdrop-filter: blur(12px) saturate(1.2); box-shadow: 0 10px 18px -14px rgb(63 31 33 / 0.35); border-bottom: 1px solid var(--rule); opacity: 0; transition: opacity 0.2s ease; pointer-events: none; }
.month__title.is-stuck::before { opacity: 1; }
.month__year { font-weight: 700; color: var(--muted); }
.month__title::after { content: ""; flex: 1; align-self: center; height: 2px; margin-left: 6px; background: var(--rule); transition: opacity 0.2s ease; }
.month__title.is-stuck::after { opacity: 0; }
.view-toggle { position: relative; display: inline-flex; padding: 4px; border: 1px solid var(--rule); border-radius: 999px; background: var(--stripe); }
.view-toggle button { position: relative; z-index: 1; display: inline-grid; place-items: center; min-height: 36px; min-width: 40px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-soft); font: inherit; font-size: 0.88rem; font-weight: 600; text-decoration: none; cursor: pointer; }
.view-toggle button:hover { color: var(--maroon); }
.view-toggle button[aria-pressed="true"] { background: var(--card); color: var(--maroon); box-shadow: var(--shadow-sm); }
.view-toggle .icon { width: 18px; height: 18px; }

/* Calendar view: each month as a grid, rounds as bars across their days */
/* The month and its arrows stay pinned under the filters while the grid scrolls. */
.month-nav { position: sticky; top: calc(var(--sticky-h) + var(--cal-toolbar-h, 72px)); z-index: 6; margin-top: 6px; padding-top: 8px; }
.month-nav__bar { display: flex; align-items: center; gap: 12px; padding-bottom: 8px; }
.month-nav::before { content: ""; position: absolute; inset: 0 calc(50% - 50vw); z-index: -1; background: rgb(253 248 238 / 0.86); backdrop-filter: blur(12px) saturate(1.2); -webkit-backdrop-filter: blur(12px) saturate(1.2); }
.month-nav__title { flex: 1; display: flex; align-items: center; justify-content: center; gap: 12px; }
.month-nav__today { min-height: 32px; padding: 0 14px; border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--card); color: var(--maroon); font: inherit; font-size: 0.88rem; font-weight: 600; cursor: pointer; }
.month-nav__today:hover { border-color: var(--maroon); }
.month-nav__label { font-size: clamp(1.3rem, 1.05rem + 0.9vw, 1.65rem); font-weight: 900; letter-spacing: -0.02em; line-height: 1.1; text-align: center; }
.month-nav__label span { font-weight: 700; color: var(--muted); }
.month-nav__arrow { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--card); color: var(--ink); cursor: pointer; transition: border-color 0.15s, color 0.15s; }
.month-nav__arrow .icon { width: 20px; height: 20px; }
.month-nav__arrow:hover:not([aria-disabled="true"]) { border-color: var(--maroon); color: var(--maroon); }
.month-nav__arrow[aria-disabled="true"] { opacity: 0.35; cursor: default; }
.month-nav__label:focus { outline: none; }
.month-nav__label:focus-visible { outline: 3px solid var(--sun-deep); outline-offset: 4px; border-radius: 6px; }
/* Sideways swipes are ours (to change month or slide); scrolling up and down still works. */
.rounds.is-calendar .cal-month, .hero-carousel { touch-action: pan-y pinch-zoom; }
.cal-month.from-right .month-grid { animation: month-from-right 0.25s var(--ease); }
.cal-month.from-left .month-grid { animation: month-from-left 0.25s var(--ease); }
@keyframes month-from-right { from { opacity: 0; transform: translateX(24px); } }
@keyframes month-from-left { from { opacity: 0; transform: translateX(-24px); } }
@media (prefers-reduced-motion: reduce) { .cal-month .month-grid { animation: none !important; } .month__title::before { transition: none; } }
.month-grid { overflow: hidden; background: var(--card); border: 1px solid var(--rule); border-top: 0; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.cal-grid, .cal-month { display: none; }
.rounds.is-calendar .cal-grid, .rounds.is-calendar .cal-month.is-shown { display: block; }
.rounds.is-calendar .month { display: none; }
/* The calendar moves through time itself, so it has no Upcoming / Past switch. */
[data-cal-view="calendar"] .cal-toolbar__when { display: none; }
[data-cal-view="calendar"] .view-toggle { margin-left: auto; } /* stays at the right edge in every view */
.month-grid__head, .month-grid__week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.month-grid__head { background: var(--wash); border: 1px solid var(--rule); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.month-grid__head span { padding: 6px 10px; font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); }
.month-grid__week { min-height: 84px; row-gap: 2px; padding-bottom: 5px; border-bottom: 1px solid var(--rule); }
.month-grid__week:last-child { border-bottom: 0; }
.month-grid__day { grid-row: 1 / -1; padding: 3px 6px; border-left: 1px solid var(--rule); font-size: 0.85rem; color: var(--ink-soft); }
.month-grid__day:first-child { border-left: 0; }
.month-grid__day b { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 999px; font-weight: 600; }
.month-grid__day.is-other { background: rgb(63 31 33 / 0.03); color: var(--muted); }
.month-grid__day.is-today b { background: var(--maroon); color: #fff; }
.month-grid__bar { position: relative; z-index: 1; display: flex; align-items: center; min-width: 0; margin: 0 4px; padding: 2px 8px; border-radius: 6px; background: var(--maroon); color: #fff; font-size: 0.8rem; font-weight: 600; line-height: 1.3; text-decoration: none; white-space: nowrap; }
.month-grid__bar > span:not(.sr-only) { overflow: hidden; text-overflow: ellipsis; }
.month-grid__bar--global { background: var(--sun); color: var(--ink); }
.month-grid__bar--toc { background: #1c3f74; }
.month-grid__bar:hover { color: #fff; filter: brightness(1.12); }
.month-grid__bar--global:hover { color: var(--ink); }
.month-grid__bar:focus-visible { outline: 3px solid var(--ink); outline-offset: 1px; }
/* Rounds that have already taken place are faded. */
.month-grid__bar.is-past { background: color-mix(in srgb, var(--maroon) 16%, var(--card)); color: var(--ink); }
.month-grid__bar--global.is-past { background: color-mix(in srgb, var(--sun) 28%, var(--card)); }
.month-grid__bar--toc.is-past { background: color-mix(in srgb, #1c3f74 16%, var(--card)); }
.month-grid__bar.is-past:hover { color: var(--ink); filter: none; box-shadow: inset 0 0 0 1px var(--rule-strong); }
.month-grid__bar.is-continued { margin-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.month-grid__bar.is-continuing { margin-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.month-grid__place { display: none; }
@media (max-width: 700px) {
  .month-grid__head span { padding: 6px 2px; font-size: 0.7rem; text-align: center; }
  .month-grid__week { min-height: 70px; }
  .month-grid__day { padding: 4px 2px; font-size: 0.75rem; text-align: center; }
  .month-grid__week { row-gap: 4px; }
  .month-grid__bar { min-height: 28px; margin: 0 2px; padding: 4px; font-size: 0.78rem; }
  .month-grid__name { display: none; }
  .month-grid__place { display: inline; }
}

/* A tear-off calendar page for dates (home page) */
.date-leaf { display: grid; flex: none; min-width: 68px; overflow: hidden; border: 1px solid var(--rule-strong); border-radius: 10px; background: #fff; text-align: center; line-height: 1; }
.date-leaf__month { padding: 5px 6px 4px; background: var(--maroon); color: #fff; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.date-leaf__days { padding: 8px 6px 3px; font-family: var(--font-display); font-size: 1.4rem; font-weight: 900; letter-spacing: -0.02em; color: var(--ink); white-space: nowrap; }
.date-leaf__weekdays { padding: 0 6px 8px; font-size: 0.72rem; color: var(--muted); white-space: nowrap; }
.date-leaf--small { min-width: 56px; }
.date-leaf--small .date-leaf__days { padding-bottom: 7px; font-size: 1.1rem; }
.round-item--global .date-leaf__month { background: var(--sun); color: var(--ink); }
.round-item--toc .date-leaf__month { background: #1c3f74; }

/* Calendar rounds: one per row by default, or cards in two columns. The coloured date column tells
   regional (maroon), Global (sun yellow) and ToC (navy) rounds apart. */
.round-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.round-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto 212px; min-height: 136px; overflow: hidden; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius-lg); transition: border-color 0.15s, box-shadow 0.15s; }
.round-row:hover { border-color: var(--rule-strong); }
.round-row__date { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px; padding: 14px 8px; background: var(--maroon) var(--waves-maroon); color: #fff; text-align: center; line-height: 1.15; }
.round-row--global .round-row__date { background: var(--sun) var(--waves-sun); color: var(--ink); }
.round-row--global .round-row__month { color: var(--maroon); }
.round-row--global .round-row__weekday, .round-row--global .round-row__expected { color: var(--ink-soft); }
.round-row--toc .round-row__date { background: #1c3f74 var(--waves-navy-all); }
.round-row__month { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sun); }
.round-row--toc .round-row__month { color: #a9c6ea; }
.round-row__days { font-family: var(--font-display); font-size: 1.9rem; font-weight: 900; letter-spacing: -0.03em; line-height: 1; white-space: nowrap; }
.round-row__weekday { font-size: 0.84rem; color: rgb(255 242 213 / 0.85); }
.round-row__expected { font-size: 0.76rem; font-style: italic; color: rgb(255 242 213 / 0.8); }
.round-row__main { align-self: center; min-width: 0; padding: 14px 18px; }
.round-row__head { display: flex; align-items: flex-start; gap: 14px; }
.round-row__titles { flex: 1; min-width: 0; }
.round-row__titles .tag { margin-bottom: 5px; }
.round-row__name { font-family: var(--font-display); font-size: 1.18rem; font-weight: 700; line-height: 1.2; }
.round-row__name a { color: var(--ink); text-decoration: none; }
.round-row__name a:hover { color: var(--maroon); text-decoration: underline; }
.round-row__where { display: flex; align-items: flex-start; gap: 5px; margin-top: 3px; color: var(--ink-soft); font-size: 0.93rem; line-height: 1.35; }
.round-row__where .icon { flex: none; margin-top: 1px; color: var(--gold); width: 1em; height: 1em; }
.round-row__notice { margin-top: 6px; max-width: 80ch; color: var(--maroon); font-size: 0.93rem; font-weight: 500; line-height: 1.5; }
/* The seal has its own column, so it sits in the same place whatever the round's text. */
.round-row__seal { align-self: center; padding: 14px 14px 14px 0; }
.round-row .seal { width: 52px; height: 52px; }
.round-row__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px 14px; padding: 14px 18px 14px 0; }
.round-row__actions { display: flex; gap: 8px; margin-left: auto; }

.rounds.is-cards .round-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.rounds.is-cards .round-row { grid-template-columns: 112px minmax(0, 1fr); grid-template-rows: 1fr auto; min-height: 246px; }
/* In cards (and on phones) the seal sits in the top corner and the text flows under it. */
.rounds.is-cards .round-row { position: relative; }
.rounds.is-cards .round-row__seal { position: absolute; top: 16px; right: 18px; padding: 0; }
.rounds.is-cards .round-row__titles { padding-right: 64px; }
.rounds.is-cards .round-row__date { grid-row: 1 / span 2; padding: 16px 10px; }
.rounds.is-cards .round-row__main { align-self: start; padding: 16px 18px 0; }
.rounds.is-cards .round-row__foot { grid-column: 2; grid-row: 2; margin: 12px 18px 0; padding: 10px 0 14px; border-top: 1px dashed var(--rule); }
@media (max-width: 900px) { .rounds.is-cards .round-list { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .round-row, .rounds.is-cards .round-row { position: relative; grid-template-columns: 88px minmax(0, 1fr); grid-template-rows: 1fr auto; min-height: 0; }
  .round-row__seal, .rounds.is-cards .round-row__seal { position: absolute; top: 14px; right: 14px; padding: 0; }
  .round-row__titles, .rounds.is-cards .round-row__titles { padding-right: 52px; }
  .round-row__date { grid-row: 1 / span 2; padding: 12px 8px; }
  .round-row__days { font-size: 1.5rem; }
  .round-row__main, .rounds.is-cards .round-row__main { align-self: start; padding: 14px 14px 0; }
  .round-row__foot, .rounds.is-cards .round-row__foot { grid-column: 2; grid-row: 2; margin: 10px 14px 0; padding: 10px 0 12px; border-top: 1px dashed var(--rule); }
  .round-row .seal { width: 44px; height: 44px; }
  .month__title, .month-nav { top: var(--sticky-h); } /* the filters scroll away on phones */
  .cal-toolbar__when { margin-left: 0; }
  /* On phones the filters scroll away instead of covering a third of the screen. */
  .cal-toolbar { position: static; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .cal-toolbar .segmented:not(.cal-toolbar__when) { display: flex; width: 100%; }
  .cal-toolbar .segmented:not(.cal-toolbar__when) label { flex: 1; justify-content: center; padding: 0 6px; font-size: 0.88rem; }
  .cal-toolbar .search-field { max-width: none; flex-basis: 100%; }
}
.cal-empty { margin-top: 32px; padding: 48px 24px; text-align: center; border: 2px dashed var(--rule-strong); border-radius: var(--radius-lg); }
.cal-empty h2 { font-size: var(--step-2); margin-bottom: 8px; }
.cal-empty p { color: var(--ink-soft); margin-bottom: 18px; }
.cal-note { margin-top: 48px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 760px) { .cal-note { grid-template-columns: 1fr; } }
.note-card { padding: 24px; border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--rule); }
.note-card h2 { font-size: 1.35rem; margin-bottom: 6px; }
.note-card p { color: var(--ink-soft); margin-bottom: 14px; }

/* ==========================================================================
   Round detail
   ========================================================================== */
.round-hero .masthead__inner { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: center; }
.round-hero .seal { width: 128px; height: 128px; background: var(--cream); border: 4px solid var(--sun); box-shadow: var(--shadow-lg); }
.round-hero .seal__fallback { font-size: 3rem; }
.round-hero .masthead__title { font-size: var(--step-4); }
/* Phones: the back link comes first, with the seal small in the top corner rather than above it. */
@media (max-width: 640px) {
  .round-hero .masthead__inner { grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: start; }
  .round-hero .seal { order: 2; width: 72px; height: 72px; border-width: 3px; }
  .round-hero .seal__fallback { font-size: 1.8rem; }
}
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(28px, 4vw, 56px); align-items: start; }
.detail-layout__aside { position: sticky; top: calc(var(--sticky-h) + 20px); display: grid; gap: 16px; }
@media (max-width: 960px) { .detail-layout { grid-template-columns: 1fr; } .detail-layout__aside { position: static; order: -1; } }
.facts { padding: 22px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.facts__title { font-family: var(--font-sans); font-size: 0.9rem; font-weight: 700; letter-spacing: 0; color: var(--gold); margin-bottom: 12px; }
.facts dl { display: grid; gap: 14px; }
.facts dt { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.facts dt .icon { color: var(--gold); }
.facts dd { margin: 2px 0 0; font-weight: 500; }
.facts dd small { display: block; color: var(--muted); font-weight: 400; font-size: 0.85rem; }
.facts .btn { margin-top: 18px; }
.facts .btn + .btn { margin-top: 10px; }
.meter { height: 10px; border-radius: 999px; background: var(--stripe); overflow: hidden; margin-top: 6px; }
.meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--ok), #4c9a6c); }
.meter--warn span { background: linear-gradient(90deg, var(--sun-deep), var(--sun)); }
.meter--full span { background: var(--bad); }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.link-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); color: var(--ink); font-weight: 600; text-decoration: none; transition: border-color 0.15s, background-color 0.15s; }
.link-list a:hover { border-color: var(--maroon); color: var(--maroon); }
.link-list a .icon { color: var(--maroon); }
.link-list small { display: block; font-weight: 400; color: var(--muted); font-size: 0.85rem; }

/* ==========================================================================
   Themes
   ========================================================================== */
.theme-feature { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding: clamp(24px, 4vw, 44px); background: var(--card); border: 1px solid var(--rule); border-radius: 28px; box-shadow: var(--shadow); }
.theme-feature__art { aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; padding: 14%; background: radial-gradient(circle at 50% 40%, #fff6cf, var(--cream) 60%, var(--gold-soft)); }
.theme-feature__art img { filter: drop-shadow(0 12px 16px rgb(63 31 33 / 0.25)); }
.theme-feature h2 { font-size: var(--step-5); font-weight: 900; color: var(--maroon); letter-spacing: -0.03em; }
.theme-feature p { margin-top: 12px; color: var(--ink-soft); font-size: var(--step-1); }
.theme-feature .btn { margin-top: 22px; }
@media (max-width: 720px) { .theme-feature { grid-template-columns: minmax(0, 1fr); } .theme-feature__art { width: 55%; max-width: 200px; } }
.theme-archive { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.theme-card { display: flex; flex-direction: column; height: 100%; padding: 22px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius-lg); color: var(--ink); text-decoration: none; transition: box-shadow 0.2s, border-color 0.2s; }
a.theme-card:hover { color: var(--ink); border-color: var(--rule-strong); }
.theme-card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.theme-card__year { font-family: var(--font-display); font-weight: 900; font-size: 2.2rem; line-height: 1; color: var(--maroon); letter-spacing: -0.03em; }
.theme-card__icon { width: 52px; height: 52px; object-fit: contain; }
.theme-card__title { margin-top: 10px; font-size: 1.35rem; font-weight: 700; }
.theme-card__subjects { list-style: none; margin: 14px 0 0; padding: 14px 0 0; border-top: 1px dashed var(--rule-strong); display: grid; gap: 4px; font-size: 0.9rem; color: var(--ink-soft); }
.theme-card__subjects b { color: var(--ink); font-weight: 600; }
.theme-card__more { margin-top: auto; padding-top: 14px; font-weight: 600; color: var(--maroon); display: inline-flex; align-items: center; gap: 6px; }

.theme-hero .masthead__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center; }
.theme-hero__art { width: clamp(140px, 18vw, 220px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; padding: 14%; background: radial-gradient(circle at 50% 40%, #fff6cf, var(--cream) 60%, var(--gold-soft)); box-shadow: 0 0 0 8px rgb(255 205 5 / 0.25), var(--shadow-lg); }
.theme-hero__note { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 8px 14px; border-radius: 999px; background: rgb(255 205 5 / 0.14); border: 1px solid rgb(255 205 5 / 0.35); color: var(--cream); font-size: 0.95rem; }
.theme-hero__note .icon { color: var(--sun); }
@media (max-width: 720px) { .theme-hero .masthead__inner { grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: start; } .theme-hero__art { width: 84px; } }

.reader { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.reader__nav { position: sticky; top: calc(var(--sticky-h) + 20px); max-height: calc(100vh - var(--sticky-h) - 40px); overflow: auto; padding-right: 6px; scrollbar-width: thin; }
.reader__nav-title { font-size: 0.9rem; font-weight: 700; letter-spacing: 0; color: var(--gold); margin-bottom: 10px; }
.toc { list-style: none; margin: 0; padding: 0; }
.toc a { display: block; padding: 8px 12px; border-radius: 10px; color: var(--ink-soft); text-decoration: none; font-size: 0.95rem; line-height: 1.3; }
.toc a:hover { background: var(--stripe); color: var(--ink); }
.toc a.is-current { background: var(--card); color: var(--maroon); font-weight: 600; box-shadow: 0 0 0 1px var(--rule); }
.toc a.is-hidden { opacity: 0.35; }
.reader__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-bottom: 18px; }
.reader__tools .search-field { max-width: none; }
@media (max-width: 560px) { .reader__tools .search-field { flex-basis: 100%; } }
.reader__status { width: 100%; font-size: 0.9rem; color: var(--muted); min-height: 1.4em; }
.btn-quiet { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--card); color: var(--ink); font-weight: 600; font-size: 0.9rem; text-decoration: none; }
.btn-quiet:hover { border-color: var(--maroon); color: var(--maroon); }
.reader__mobile-nav { display: none; }
@media (max-width: 960px) {
  .reader { grid-template-columns: 1fr; }
  .reader__nav { display: none; }
  .reader__mobile-nav { display: block; margin-bottom: 16px; }
  .reader__mobile-nav select { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--card); font-weight: 600; }
}
.qsections { display: grid; gap: 12px; }
.qsection { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius-lg); transition: box-shadow 0.2s, border-color 0.2s; scroll-margin-top: calc(var(--sticky-h) + 16px); }
.qsection[open] { box-shadow: var(--shadow); border-color: var(--rule-strong); }
.qsection > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 18px 24px; cursor: pointer; list-style: none; border-radius: inherit; }
.qsection > summary::-webkit-details-marker { display: none; }
.qsection > summary:hover .qsection__title { color: var(--maroon); }
.qsection__title { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; line-height: 1.25; }
.qsection__count { display: block; font-family: var(--font-sans); font-weight: 400; font-size: 0.85rem; color: var(--muted); margin-top: 2px; }
.qsection__chev { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--stripe); transition: transform 0.25s var(--ease), background-color 0.2s; }
.qsection[open] .qsection__chev { transform: rotate(180deg); background: var(--wash); }
.qsection__body { padding: 0 24px 24px; }
.qsection__foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.copy-link { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--muted); font-size: 0.85rem; font-weight: 600; padding: 6px 8px; border-radius: 8px; }
.copy-link:hover { color: var(--maroon); background: var(--stripe); }
@media (max-width: 640px) {
  .qsection > summary { gap: 12px; padding: 16px; }
  .qsection__title { font-size: 1.08rem; }
  .qsection__body { padding: 0 16px 20px; }
}
mark { background: rgb(255 205 5 / 0.6); color: inherit; padding: 0 1px; border-radius: 2px; }
.outline-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; list-style: none; margin: 0; padding: 0; }
.outline-card { display: flex; gap: 14px; align-items: center; height: 100%; padding: 18px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); color: var(--ink); text-decoration: none; transition: border-color 0.15s, box-shadow 0.15s; }
a.outline-card:hover { color: var(--ink); border-color: var(--rule-strong); }
.outline-card img { width: 56px; height: 56px; object-fit: contain; flex: none; }
.outline-card__area { display: block; font-size: 0.9rem; font-weight: 700; letter-spacing: 0; color: var(--gold); }
.outline-card__title { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; line-height: 1.25; }
.outline-card__meta { display: block; font-size: 0.85rem; color: var(--muted); margin-top: 2px; }
.outline-card[aria-current="page"] { border-color: var(--maroon); box-shadow: inset 0 0 0 1px var(--maroon); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 48px; }
.pager a { display: grid; gap: 4px; padding: 18px 20px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); color: var(--ink); text-decoration: none; }
.pager a:hover { border-color: var(--maroon); }
.pager small { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: 0.8rem; letter-spacing: 0; }
.pager strong { font-family: var(--font-display); font-size: 1.15rem; }
.pager__next { text-align: right; justify-items: end; }

/* ==========================================================================
   Content pages
   ========================================================================== */
.page-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(28px, 5vw, 72px); align-items: start; }
.page-layout--single { grid-template-columns: minmax(0, 780px); justify-content: center; }
.page-layout__aside { position: sticky; top: calc(var(--sticky-h) + 20px); display: grid; gap: 16px; }
@media (max-width: 960px) { .page-layout { grid-template-columns: 1fr; } .page-layout__aside { position: static; } }
.page-hero-image { margin: 0 0 32px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.page-hero-image img { width: 100%; max-height: 460px; object-fit: cover; }
.aside-box { padding: 24px; border-radius: var(--radius-lg); background: var(--wash); border: 1px solid var(--rule); }
.aside-box h2 { font-size: 1.3rem; margin-bottom: 12px; }
.on-this-page { padding: 18px 20px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); }
.on-this-page h2 { font-size: 0.9rem; font-weight: 700; letter-spacing: 0; color: var(--gold); margin-bottom: 8px; font-family: var(--font-sans); }
.on-this-page ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 0.95rem; }
.on-this-page a { color: var(--ink-soft); text-decoration: none; }
.on-this-page a:hover { color: var(--maroon); text-decoration: underline; }
.action-list { display: grid; gap: 10px; }
.action-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); color: var(--ink); text-decoration: none; transition: border-color 0.15s, box-shadow 0.15s; }
.action-card:hover { color: var(--ink); border-color: var(--maroon); }
.action-card__go { flex: none; margin-left: auto; color: var(--maroon); }
.action-card > span:first-child { min-width: 0; }
.action-card strong { display: block; line-height: 1.3; }
.action-card small { display: block; color: var(--muted); font-size: 0.87rem; }
.action-card--primary { background: var(--maroon); color: #fff; border-color: var(--maroon); }
.action-card--primary:hover { background: var(--maroon-dark); color: #fff; }
.action-card--primary .action-card__go { color: var(--sun); }
.action-card--primary small { color: rgb(255 242 213 / 0.85); }

/* Rich text */
.prose { font-size: 1.0625rem; line-height: 1.7; color: var(--ink); }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: var(--step-3); font-weight: 900; margin-top: 1.8em; letter-spacing: -0.02em; }
.prose h3 { font-size: var(--step-2); margin-top: 1.6em; }
.prose h4 { font-size: 1.12rem; margin-top: 1.4em; font-family: var(--font-sans); font-weight: 700; }
.prose h2:first-child, .prose h3:first-child, .prose h4:first-child { margin-top: 0; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: 0.5em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.45em; }
.prose li > ul, .prose li > ol { margin-top: 0.45em; }
.prose ul > li::marker { color: var(--gold); }
.prose ol > li::marker { color: var(--gold); font-weight: 700; }
.prose blockquote { margin-inline: 1.5em; font-style: italic; color: var(--ink-soft); }
.prose hr { border: 0; height: 1px; margin-block: 2.2em; background: var(--rule-strong); }
.prose a { font-weight: 500; }
.prose strong { font-weight: 700; }
.prose .table-scroll { overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.prose th { background: var(--stripe); font-weight: 700; }
.lead-text { font-size: var(--step-1); color: var(--ink-soft); }

/* Team events page */
.jump-nav { position: sticky; top: var(--sticky-h); z-index: 15; background: rgb(253 248 238 / 0.95); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.jump-nav .chips { flex-wrap: nowrap; overflow-x: auto; padding-block: 12px; scrollbar-width: none; }
.jump-nav .chips::-webkit-scrollbar { display: none; }
.jump-nav .chip { white-space: nowrap; }
.event-feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; padding-block: clamp(48px, 6vw, 88px); border-bottom: 1px solid var(--rule); scroll-margin-top: calc(var(--sticky-h) + 64px); }
.event-feature:last-child { border-bottom: 0; }
.event-feature:nth-child(even) .event-feature__media { order: -1; }
.event-feature__head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.event-feature__head img { width: 72px; height: 72px; object-fit: contain; }
.event-feature h2 { font-size: var(--step-4); font-weight: 900; letter-spacing: -0.02em; }
.event-feature__tagline { font-family: var(--font-display); font-size: var(--step-2); font-weight: 700; color: var(--maroon); line-height: 1.25; margin-bottom: 18px; }
.event-feature__action { margin-top: 22px; }
.event-feature__media { display: grid; gap: 16px; position: sticky; top: calc(var(--sticky-h) + 80px); }
.event-feature__photo { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 3; box-shadow: var(--shadow); }
.event-feature__photo img { width: 100%; height: 100%; object-fit: cover; }
.resources { display: grid; gap: 8px; margin-top: 24px; }
.resources h3 { font-size: 0.9rem; font-weight: 700; letter-spacing: 0; color: var(--gold); font-family: var(--font-sans); }
@media (max-width: 860px) { .event-feature { grid-template-columns: 1fr; } .event-feature:nth-child(even) .event-feature__media { order: 0; } .event-feature__media { position: static; } }


/* Videos page */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px 20px; }
.video-group + .video-group { margin-top: 56px; }
.video-group h2 { font-size: var(--step-3); font-weight: 900; margin-bottom: 20px; }

/* FAQ */
.faq-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.faq-layout nav { position: sticky; top: calc(var(--sticky-h) + 20px); }
@media (max-width: 860px) { .faq-layout { grid-template-columns: 1fr; } .faq-layout nav { position: static; } }
.faq-group { scroll-margin-top: calc(var(--sticky-h) + 20px); }
.faq-group + .faq-group { margin-top: 40px; }
.faq-group > h2 { font-size: var(--step-3); font-weight: 900; margin-bottom: 14px; }
.faq-item { border-bottom: 1px solid var(--rule); scroll-margin-top: calc(var(--sticky-h) + 20px); }
.faq-item > summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 4px; cursor: pointer; list-style: none; font-weight: 600; font-size: 1.08rem; line-height: 1.35; }
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary:hover { color: var(--maroon); }
.faq-item > summary .icon { flex: none; width: 28px; height: 28px; padding: 5px; border-radius: 50%; background: var(--stripe); transition: transform 0.25s var(--ease), background-color 0.2s; }
.faq-item[open] > summary .icon { transform: rotate(45deg); background: var(--sun); }
.faq-item .prose { padding: 0 4px 22px; color: var(--ink-soft); }

/* History timeline */
.timeline { position: relative; list-style: none; margin: 0 auto; padding: 0; max-width: 980px; }
.timeline::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: var(--rule-strong); }
.timeline__year { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 64px; padding-block: 18px; }
.timeline__marker { position: absolute; left: 50%; top: 22px; z-index: 1; translate: -50% 0; padding: 6px 12px; border-radius: 8px; background: var(--maroon); color: #fff; font-family: var(--font-display); font-weight: 900; font-size: 1.15rem; }
.timeline__card { grid-column: 1; margin-top: 44px; padding: 20px 22px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.timeline__year:nth-child(even) .timeline__card { grid-column: 2; }
.timeline__card p + p { margin-top: 0.7em; }
@media (max-width: 760px) {
  .timeline::before { left: 18px; }
  .timeline__year { grid-template-columns: 1fr; gap: 0; padding-left: 52px; }
  .timeline__marker { left: 18px; }
  .timeline__card, .timeline__year:nth-child(even) .timeline__card { grid-column: 1; }
}

/* Team */
/* Team: photo beside the text, two people per row, so bios read at a comfortable line length */
.team-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.member { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 18px; align-items: start; padding: 18px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius-lg); }
.member__photo { aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--wash); }
.member__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.member__initials { display: grid; place-items: center; height: 100%; font-family: var(--font-display); font-weight: 900; font-size: 2.6rem; color: var(--maroon); }
.member__body { display: flex; flex-direction: column; min-width: 0; }
.member h2 { font-size: 1.25rem; font-weight: 900; line-height: 1.2; }
.member__role { margin-top: 3px; font-size: 0.9rem; font-weight: 600; line-height: 1.3; color: var(--gold); }
.member__bio { margin-top: 8px; font-size: 0.97rem; line-height: 1.6; color: var(--ink-soft); }
.member__bio.is-clamped { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 900px) { .team-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .member { grid-template-columns: 84px minmax(0, 1fr); gap: 14px; padding: 14px; } }
.member__more { align-self: flex-start; margin-top: 6px; font-size: 0.88rem; border: 0; background: none; padding: 0; color: var(--maroon); font-weight: 600; }
.member__more:hover { text-decoration: underline; }

/* Hosts & partners */
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; margin-bottom: 28px; }
.filter-bar__count { color: var(--muted); font-size: 0.95rem; }
.letter-groups { columns: 3 260px; column-gap: 40px; }
.letter-group { break-inside: avoid; margin-bottom: 22px; }
.letter-group h2 { font-size: 1.5rem; font-weight: 900; color: var(--maroon); margin-bottom: 6px; }
.letter-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.letter-group li { padding: 4px 0; border-bottom: 1px dotted var(--rule-strong); }
.partner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.partner { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; height: 100%; padding: 22px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius-lg); color: var(--ink); text-decoration: none; }
a.partner:hover { color: var(--ink); border-color: var(--maroon); }
.partner__logo { height: 80px; display: grid; place-items: center start; }
.partner__logo img { max-height: 80px; max-width: 180px; width: auto; object-fit: contain; }
.partner--no-logo { justify-content: flex-start; } /* no big placeholder letter; the name leads */
.partner--no-logo strong { font-size: 1.2rem; }
.partner strong { font-size: 1.05rem; line-height: 1.3; }
.partner small { color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }

/* Results */
.results-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 40px; }
@media (max-width: 720px) { .results-links { grid-template-columns: 1fr; } }
.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
.result { display: flex; align-items: center; gap: 14px; height: 100%; padding: 14px 16px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.result:hover { color: var(--ink); border-color: var(--maroon); box-shadow: var(--shadow-sm); }
.result .seal { width: 52px; height: 52px; }
.result strong { display: block; line-height: 1.25; }
.result small { display: block; color: var(--muted); }
.result__go { margin-left: auto; color: var(--maroon); }
.season + .season { margin-top: 44px; }
.season h2 { font-size: var(--step-3); font-weight: 900; margin-bottom: 16px; }

/* Global rounds table */
.gr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.gr-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 220px auto; gap: 18px; align-items: center; padding: 16px 18px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); }
.gr-row__name { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.gr-row__name a { color: var(--ink); text-decoration: none; }
.gr-row__name a:hover { color: var(--maroon); text-decoration: underline; }
.gr-row small { color: var(--muted); display: block; }
.gr-row__capacity { font-size: 0.85rem; color: var(--ink-soft); }
/* Capacity: a mark beside the bar (green circle, yellow triangle, red cross), explained under the list. */
.capacity { display: flex; align-items: center; gap: 10px; }
.capacity__bar { flex: 1; min-width: 0; }
.capacity-mark { flex: none; width: 20px; height: 20px; }
.capacity-mark--open circle { fill: var(--ok); }
.capacity-mark--filling path { fill: var(--sun); stroke: #b88a00; stroke-width: 1.5; stroke-linejoin: round; }
.capacity-mark--full path { fill: none; stroke: var(--bad); stroke-width: 3; stroke-linecap: round; }
.capacity-key { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; max-width: 72ch; color: var(--ink-soft); font-size: 0.92rem; line-height: 1.45; }
.capacity-key li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; }
.capacity-key .capacity-mark { width: 18px; height: 18px; margin-top: 1px; }
@media (max-width: 760px) { .gr-row { grid-template-columns: 52px minmax(0, 1fr); } .gr-row .seal { width: 52px; height: 52px; } .gr-row__capacity, .gr-row > .btn, .gr-row > .pill { grid-column: 2; } }
.toc-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); overflow: hidden; border-radius: 28px; background: var(--ink); color: var(--cream); }
.toc-card__photo img { width: 100%; height: 100%; object-fit: cover; min-height: 260px; }
.toc-card__body { padding: clamp(24px, 4vw, 48px); display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.toc-card h2 { color: #fff; font-size: var(--step-4); font-weight: 900; }
.toc-card .btn { align-self: flex-start; margin-top: 8px; }
@media (max-width: 760px) { .toc-card { grid-template-columns: 1fr; } }

/* News */
.post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.post-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius-lg); overflow: hidden; color: var(--ink); text-decoration: none; transition: box-shadow 0.2s; }
.post-card:hover { color: var(--ink); }
.post-card__media { aspect-ratio: 16 / 9; background: var(--maroon) var(--waves-maroon); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card__body { padding: 20px 22px 24px; display: grid; gap: 8px; }
.post-card time { font-size: 0.9rem; font-weight: 600; letter-spacing: 0; color: var(--gold); }
.post-card h3 { font-size: 1.3rem; }
.post-card p { color: var(--ink-soft); }
.pagination { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 40px; }

/* Search */
.search-hero form { display: flex; gap: 10px; margin-top: 22px; max-width: 640px; }
.search-hero input { flex: 1; min-width: 0; min-height: 56px; padding: 0 20px; border: 0; border-radius: 999px; font-size: 1.1rem; background: #fff; color: var(--ink); }
.search-hero input:focus { outline: 3px solid var(--sun); }
.search-group + .search-group { margin-top: 36px; }
.search-group h2 { font-size: 0.8rem; font-family: var(--font-sans); font-weight: 700; letter-spacing: 0; color: var(--gold); margin-bottom: 10px; }
.search-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.search-result { display: block; padding: 16px 18px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.search-result:hover { color: var(--ink); border-color: var(--maroon); }
.search-result strong { display: block; font-size: 1.08rem; }
.search-result small { display: block; color: var(--muted); font-size: 0.85rem; margin-top: 2px; }
.search-result p { margin-top: 6px; color: var(--ink-soft); font-size: 0.95rem; }

/* 404 */
.lost { background: var(--maroon) var(--waves-maroon); color: var(--cream); }
.lost__inner { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: clamp(24px, 5vw, 64px); padding-block: clamp(48px, 7vw, 96px); }
.lost__code { margin-bottom: 10px; font-weight: 600; color: var(--sun); }
.lost__title { color: #fff; font-size: var(--step-5); font-weight: 900; letter-spacing: -0.03em; line-height: 1; }
.lost__title span { color: var(--sun); }
.lost__lead { margin-top: 16px; max-width: 46ch; font-size: var(--step-1); line-height: 1.5; color: rgb(255 242 213 / 0.9); }
.lost__suggest { margin-top: 22px; }
.lost__suggest h2 { font-family: var(--font-sans); font-size: 1rem; font-weight: 600; color: #fff; }
.lost__suggest ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.lost__suggest a { color: var(--sun); font-weight: 600; font-size: 1.05rem; }
.lost__suggest a:hover { color: #fff; }
.lost__search { display: flex; gap: 8px; max-width: 480px; margin-top: 26px; }
.lost__search .search-field { flex: 1; max-width: none; }
.lost__heading { font-size: var(--step-3); font-weight: 900; letter-spacing: -0.02em; margin-bottom: 16px; }
.lost__places { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.lost__places a { display: grid; gap: 4px; height: 100%; padding: 18px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius-lg); color: var(--ink); text-decoration: none; transition: border-color 0.15s, box-shadow 0.15s; }
.lost__places a:hover { border-color: var(--rule-strong); color: var(--ink); }
.lost__places strong { font-family: var(--font-display); font-size: 1.2rem; color: var(--maroon); }
.lost__places span { color: var(--ink-soft); font-size: 0.93rem; line-height: 1.4; }
.lost__contact { margin-top: 18px; color: var(--ink-soft); }
@media (max-width: 900px) { .lost__places { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .lost__inner { grid-template-columns: 1fr; }
  }
@media (max-width: 460px) { .lost__places { grid-template-columns: 1fr; } }

/* ==========================================================================
   Newsletter & footer
   ========================================================================== */
.newsletter { background: var(--sun); color: var(--ink); }
.newsletter__inner { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 14px 40px; align-items: center; padding-block: clamp(22px, 3vw, 32px); }
.newsletter__title { font-size: var(--step-2); font-weight: 900; }
.newsletter__copy p { margin-top: 6px; }
.newsletter__fields { display: flex; gap: 8px; flex-wrap: wrap; }
.newsletter__fields input { min-height: 44px; padding: 0 16px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; }
.newsletter__fields input[type="email"] { flex: 1 1 220px; }
.newsletter__fields input:focus { outline: 3px solid var(--maroon); outline-offset: 1px; }
.newsletter__fields .btn { min-height: 44px; }
.newsletter__note { margin-top: 10px; font-size: 0.88rem; }
.newsletter__note.is-ok { font-weight: 600; color: var(--green-dark); }
.newsletter__note.is-error { font-weight: 700; color: var(--maroon-dark); } /* readable on the yellow band */
@media (max-width: 820px) { .newsletter__inner { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .newsletter__fields > * { flex: 1 1 100% !important; } }

/* After signing up: optional details for the newsletter, in a pop-up. */
.newsletter-dialog { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: clamp(22px, 4vw, 32px); border: 0; border-radius: var(--radius-lg); background: var(--card); color: var(--ink); box-shadow: var(--shadow-lg); overflow: auto; }
.newsletter-dialog::backdrop { background: rgb(30 10 8 / 0.55); }
.newsletter-dialog h2 { font-size: var(--step-2); font-weight: 900; }
.newsletter-dialog__lead { margin-top: 6px; color: var(--ink-soft); }
.newsletter-dialog__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; margin-top: 20px; }
.newsletter-dialog__fields p { display: grid; gap: 6px; min-width: 0; margin: 0; }
.newsletter-dialog__wide { grid-column: 1 / -1; }
.newsletter-dialog label { font-size: 0.92rem; font-weight: 600; }
.newsletter-dialog input, .newsletter-dialog select { width: 100%; min-width: 0; min-height: 44px; padding: 0 14px; border: 2px solid var(--rule-strong); border-radius: var(--radius-sm); background-color: #fff; color: var(--ink); font: inherit; }
.newsletter-dialog select { appearance: none; padding-right: 40px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 6 8 10.5 12.5 6' fill='none' stroke='%233f1f21' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center / 16px; cursor: pointer; }
.newsletter-dialog input:focus, .newsletter-dialog select:focus { border-color: var(--ink); outline: 3px solid var(--sun); outline-offset: 1px; }
.newsletter-dialog__error { min-height: 1.5em; margin-top: 10px; font-weight: 600; color: var(--bad); }
.newsletter-dialog__actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 480px) { .newsletter-dialog__fields { grid-template-columns: 1fr; } }

.site-footer { background: var(--maroon-deep) var(--waves-deep); color: rgb(255 242 213 / 0.85); font-size: 0.97rem; }
.site-footer__grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr) 1.3fr; gap: 36px 28px; padding-block: 56px 40px; }
.footer-plate { display: block; width: 100%; max-width: 250px; padding: 16px 18px; background: var(--paper); border-radius: 12px; box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 5px var(--maroon); }
.site-footer__brand p { margin-top: 18px; line-height: 1.55; }
.site-footer__heading { font-family: var(--font-sans); font-size: 0.9rem; font-weight: 700; letter-spacing: 0; color: var(--sun); margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--cream); text-decoration: none; }
.site-footer a:hover { color: var(--sun); text-decoration: underline; }
.site-footer__contact a { display: inline-flex; align-items: center; gap: 8px; word-break: break-word; }
.site-footer__contact .icon { color: var(--sun); }
.social { display: flex !important; gap: 8px !important; margin-top: 18px !important; }
.social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgb(255 255 255 / 0.08); }
.social a:hover { background: var(--sun); color: var(--ink); }
.social .icon { width: 20px; height: 20px; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 20px 28px; border-top: 1px solid rgb(255 242 213 / 0.15); font-size: 0.87rem; color: rgb(255 242 213 / 0.7); }
@media (max-width: 1080px) { .site-footer__grid { grid-template-columns: repeat(3, 1fr); } .site-footer__brand { grid-column: 1 / -1; } }
@media (max-width: 640px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__contact { grid-column: 1 / -1; } }

/* ==========================================================================
   Motion & print
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .announcement, .newsletter, .site-footer, .reader__nav, .reader__tools, .reader__mobile-nav, .jump-nav, .cal-toolbar, .skip-link, .copy-link, .masthead__actions, .qsection__chev, .pager, .btn { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .masthead, .theme-hero { background: none !important; color: #000; }
  .masthead__title, .masthead__lead { color: #000 !important; }
  .reader { display: block; }
  .qsection { break-inside: auto; border: 0; box-shadow: none !important; }
  .qsection > summary { padding: 12pt 0 4pt; }
  .qsection__body { padding: 0 0 8pt; display: block !important; }
  .qsection:not([open]) > *:not(summary) { display: block !important; }
  a { color: #000; text-decoration: none; }
}

/* Event descriptions open with their tagline: give that first paragraph lead styling. */
.event-feature .prose > p:first-child { font-size: 1.15rem; line-height: 1.55; font-weight: 500; color: var(--ink); }

/* ==========================================================================
   Tournament of Champions — Yale-inspired navy & white (a softer navy than
   Yale Blue #00356B). Covers the page, header, newsletter and footer.
   ========================================================================== */
:root {
  --yale-navy: #1c3f74;
  --yale-navy-deep: #122b52;
  --yale-blue: #2f5f9e;
  --yale-sky: #a9c6ea;
  --yale-wash: #e8eff8;
  --yale-paper: #f5f8fc;
  --waves-navy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='30' viewBox='0 0 160 30'%3E%3Cpath d='M0 15c20-9 60-9 80 0s60 9 80 0' fill='none' stroke='%2324497f' stroke-width='3'/%3E%3C/svg%3E");
  --waves-pale-blue: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='30' viewBox='0 0 160 30'%3E%3Cpath d='M0 15c20-9 60-9 80 0s60 9 80 0' fill='none' stroke='%23e8eef7' stroke-width='3'/%3E%3C/svg%3E");
}
.theme-yale {
  --maroon: var(--yale-navy);
  --maroon-dark: var(--yale-navy-deep);
  --maroon-deep: #0d2140;
  --crimson: #3a6db5;
  --gold: var(--yale-blue);
  --ink: #1d2a3b;
  --ink-soft: #46546a;
  --muted: #56647a;
  --paper: var(--yale-paper);
  --cream: #f1f5fb;
  --wash: var(--yale-wash);
  --stripe: #edf1f7;
  --rule: #d9e2ee;
  --rule-strong: #c2cfe1;
  --charcoal: #0d2140;
  --waves-maroon: var(--waves-navy);
  --waves-deep: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='30' viewBox='0 0 160 30'%3E%3Cpath d='M0 15c20-9 60-9 80 0s60 9 80 0' fill='none' stroke='%23142c52' stroke-width='3'/%3E%3C/svg%3E");
  --waves-paper: var(--waves-pale-blue);
  background: var(--paper) var(--waves-paper);
}
/* Header, menus and banner */
.theme-yale .site-header::before { background: rgb(245 248 252 / 0.94); }
.theme-yale .primary-nav__link.is-active::after { background: var(--yale-blue); }
.theme-yale .site-header .btn--sun { --btn-bg: var(--yale-navy); --btn-fg: #fff; }
.theme-yale .site-header .btn--sun:hover { --btn-bg: var(--yale-navy-deep); }
.theme-yale .announcement--news { background: var(--yale-wash); }
/* Labels and buttons on navy */
.theme-yale .eyebrow--sun,
.theme-yale .masthead__meta .icon,
.theme-yale .dropdown__intro .eyebrow { color: var(--yale-sky); }
.theme-yale main .btn--sun, .theme-yale .mobile-menu .btn--sun { --btn-bg: #fff; --btn-fg: var(--yale-navy); }
.theme-yale main .btn--sun:hover, .theme-yale .mobile-menu .btn--sun:hover { --btn-bg: var(--yale-wash); }
.theme-yale .mobile-menu__group a:hover, .theme-yale .mobile-menu__group a[aria-current="page"], .theme-yale .mobile-menu__link[aria-current="page"] { color: var(--yale-sky); }
/* Newsletter and footer */
.theme-yale .newsletter { background: var(--yale-wash); }
.theme-yale .site-footer__heading, .theme-yale .site-footer__contact .icon { color: var(--yale-sky); }
.theme-yale .site-footer { color: rgb(241 245 251 / 0.85); }
.theme-yale .site-footer a { color: #f1f5fb; }
.theme-yale .site-footer a:hover { color: #fff; }
.theme-yale .social a:hover { background: var(--yale-sky); color: var(--yale-navy-deep); }
.theme-yale .site-footer__bottom { border-top-color: rgb(241 245 251 / 0.15); color: rgb(241 245 251 / 0.7); }
/* Page content */
.theme-yale main .action-card--primary .action-card__go { color: var(--yale-sky); }
.theme-yale main .action-card--primary small { color: rgb(255 255 255 / 0.8); }
.theme-yale main .round-hero .seal { border-color: #fff; background: #fff; }
.theme-yale main .photo-frame { box-shadow: 0 24px 48px -18px rgb(13 33 64 / 0.55); }

/* ToC touches elsewhere: the Global Rounds teaser card and calendar labels */
.toc-card { background: var(--yale-navy) var(--waves-navy); }
.toc-card .eyebrow--sun { color: var(--yale-sky); }
.toc-card .btn--sun { --btn-bg: #fff; --btn-fg: var(--yale-navy); }
.toc-card .btn--sun:hover { --btn-bg: var(--yale-wash); }
.tag--toc { background: var(--yale-navy); color: #fff; }

/* Staff-only design comparison page (/designs/home/) */

/* Phones: the Cards view looks the same as the list, so it isn't offered there. */
@media (max-width: 760px) { .view-toggle [data-view="cards"] { display: none; } }

/* Touch screens: comfortable tap sizes for small buttons. */
@media (pointer: coarse) {
  .btn--sm { min-height: 44px; }
  .icon-button, .announcement__close, .video-dialog__close, .header-search__close { min-width: 44px; min-height: 44px; }
  .month-nav__today, .view-toggle button { min-height: 44px; }
  .view-toggle button { min-width: 44px; }
  .site-footer a { display: inline-block; padding-block: 6px; }
}

/* Contact page (details from Site settings) */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.contact-card { padding: 20px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius-lg); }
.contact-card h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 1.2rem; font-weight: 900; }
.contact-card h2 .icon { width: 20px; height: 20px; color: var(--maroon); }
.contact-card p + p { margin-top: 8px; }
.contact-card address { font-style: normal; line-height: 1.5; }
.contact-card__big { display: grid; gap: 2px; font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; }
.contact-card__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.contact-card__links a { display: inline-flex; align-items: center; gap: 8px; }
.contact-card__links .icon { width: 18px; height: 18px; }
.contact-note { margin-top: 24px; max-width: 72ch; }
.timeline__entry + .timeline__entry { margin-top: 0.7em; }
