:root {
  color-scheme: light;
  --ink: #18332b;
  --forest: #2d5b4c;
  --forest-dark: #173f34;
  --cream: #f6f0df;
  --paper: #fffdf7;
  --amber: #d99a34;
  --coral: #c85f46;
  --line: #d8d1bd;
  --muted: #66766f;
  --shadow: 0 18px 50px rgba(35, 64, 54, .14);
  font-family: "BIZ UDPGothic", "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--cream); line-height: 1.75; }
a { color: var(--forest); text-underline-offset: .2em; }
button, input { font: inherit; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 10; padding: .7rem 1rem; background: white; }
.skip-link:focus { top: 1rem; }

.hero { overflow: hidden; position: relative; padding: 1.5rem 1.25rem 4rem; color: white; background: var(--forest-dark); }
.hero::before { content: ""; position: absolute; inset: -70% -5% auto 45%; height: 18rem; border: 1px solid rgba(255,255,255,.2); border-radius: 48%; transform: rotate(-14deg); }
.hero::after { content: ""; position: absolute; width: 9rem; height: 9rem; right: 8%; bottom: -5.5rem; border-radius: 50%; background: var(--amber); opacity: .85; }
.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: auto 1fr; gap: 1rem; max-width: 68rem; margin: 0 auto; align-items: center; }
.brand-mark { display: grid; place-items: center; width: 3rem; height: 3rem; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; background: rgba(255,255,255,.08); font-size: 1.55rem; }
.eyebrow, .section-kicker { margin: 0 0 .4rem; font-size: .75rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.hero .eyebrow { margin-bottom: .2rem; font-size: .65rem; }
.hero h1 { max-width: none; margin: 0; font-size: clamp(1.75rem, 3vw, 2.2rem); line-height: 1.02; letter-spacing: -.04em; }
.hero h1 span { color: #f3c56e; }
.lead { max-width: none; margin: .75rem 0 0; color: #e3ece8; font-size: clamp(.72rem, 1vw, .88rem); white-space: nowrap; }

main { width: min(68rem, calc(100% - 2rem)); margin: -2rem auto 5rem; position: relative; z-index: 2; }
.search-card { display: grid; grid-template-columns: minmax(17rem, .9fr) 1.5fr; gap: 2rem; padding: clamp(1.5rem, 4vw, 3rem); border-top: .35rem solid var(--amber); background: var(--paper); box-shadow: var(--shadow); }
.search-card h2, .results-header h2 { margin: 0; font-family: inherit; font-size: clamp(1.7rem, 4vw, 2.7rem); font-weight: 900; line-height: 1.25; }
.search-card h2 { font-size: clamp(1.65rem, 3vw, 2.15rem); white-space: nowrap; }
form label { display: block; margin-bottom: .5rem; font-weight: 700; }
.search-row { display: flex; gap: .75rem; }
input { min-width: 0; flex: 1; min-height: 3.5rem; padding: .7rem 1rem; color: var(--ink); border: 1px solid #9da9a2; border-radius: .35rem; background: white; }
input:focus-visible, button:focus-visible, a:focus-visible { outline: .2rem solid #f2bb52; outline-offset: .2rem; }
button { min-height: 3.5rem; padding: .75rem 1.4rem; border: 0; border-radius: .35rem; color: white; background: var(--forest); font-weight: 800; cursor: pointer; transition: transform .15s, background .15s; }
button:hover { background: #214b3e; transform: translateY(-1px); }
button:disabled { cursor: wait; opacity: .7; transform: none; }
.spinner { display: none; width: 1.1rem; height: 1.1rem; margin-left: .6rem; border: .15rem solid rgba(255,255,255,.4); border-top-color: white; border-radius: 50%; animation: spin .75s linear infinite; vertical-align: middle; }
.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.hint { margin: .55rem 0 0; color: var(--muted); font-size: .86rem; }
.status { grid-column: 1 / -1; min-height: 0; }
.status:not(:empty) { padding: .85rem 1rem; border-left: .3rem solid var(--coral); background: #fff1ed; }

.welcome { display: flex; align-items: center; gap: 1.3rem; max-width: 42rem; margin: 4rem auto; color: var(--muted); }
.welcome__number { margin: 0; color: var(--amber); font-family: inherit; font-size: 1rem; font-weight: 900; line-height: 1; white-space: nowrap; }
.welcome__number span { font-size: 5rem; letter-spacing: -.04em; }
.results { margin-top: 4.5rem; }
.results-header { margin-bottom: 2rem; }
.result-section { margin: 1rem 0; padding: clamp(1.4rem, 4vw, 2.6rem); border: 1px solid var(--line); background: rgba(255,253,247,.72); }
.result-section--featured { border: 0; color: white; background: var(--forest); }
.result-heading { display: flex; align-items: baseline; gap: .8rem; margin-bottom: 1.3rem; border-bottom: 1px solid currentColor; }
.result-heading span { color: var(--amber); font-family: inherit; font-size: 1.15rem; font-weight: 900; line-height: 1; }
.result-heading h3 { margin: 0 0 .7rem; font-family: inherit; font-size: clamp(1.35rem, 3vw, 1.8rem); font-weight: 900; line-height: 1.35; }
.event-list { margin: 0; padding: 0; list-style: none; }
.event { display: grid; grid-template-columns: 6rem 1fr; gap: 1.2rem; padding: 1rem 0; border-bottom: 1px solid rgba(95,110,101,.25); }
.event:last-child { border-bottom: 0; }
.event__year { color: var(--coral); font-family: inherit; font-size: 1.2rem; font-weight: 900; line-height: 1.5; }
.result-section--featured .event__year { color: #f5c96f; }
.event p { margin: 0; }
.item-links { display: flex; flex-wrap: wrap; gap: .35rem .7rem; margin-top: .35rem; font-size: .8rem; }
.result-section--featured a { color: #fff2c8; }
.observance { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.observance:last-child { border-bottom: 0; }
.observance h4 { margin: 0; font-size: 1.08rem; }
.observance p { margin: .25rem 0 0; color: var(--muted); }
.empty { margin: 0; padding: 1rem; border: 1px dashed currentColor; text-align: center; opacity: .8; }
.more { display: block; margin: 1rem auto 0; border: 1px solid var(--forest); color: var(--forest); background: transparent; }
.more:hover { color: white; }
.notice { padding: .85rem 1rem; border-left: .3rem solid var(--amber); background: #fff7df; }
.source { margin-top: 2rem; padding: 1.5rem; border-left: .3rem solid var(--amber); background: var(--paper); color: var(--muted); font-size: .9rem; }
.source h3 { margin-top: 0; color: var(--ink); }
.source-links { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; }

@media (max-width: 700px) {
  .hero { padding: 1.25rem 1rem 3rem; }
  .hero__inner { grid-template-columns: auto 1fr; gap: .75rem; }
  .brand-mark { width: 2.6rem; height: 2.6rem; font-size: 1.25rem; }
  .hero h1 { font-size: clamp(1.65rem, 9vw, 2.1rem); }
  .lead { margin-top: .6rem; font-size: .86rem; white-space: normal; }
  .search-card { grid-template-columns: 1fr; gap: 1.25rem; }
  .search-row { flex-direction: column; }
  button { width: 100%; }
  .event { grid-template-columns: 4.4rem 1fr; gap: .6rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition: none !important; }
}
