/* whensearch. Spacing on a 4 point grid. No gradients, no glow, no bounce. */
@font-face { font-family: 'Quicksand'; src: url('/assets/fonts/quicksand-700.woff2') format('woff2'); font-weight: 600 700; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('/assets/fonts/nunito-400.woff2') format('woff2'); font-weight: 400 500; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('/assets/fonts/nunito-700.woff2') format('woff2'); font-weight: 600 700; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('/assets/fonts/nunito-800.woff2') format('woff2'); font-weight: 800 900; font-display: swap; }
:root {
  --paper: #FAF6EC;
  --card: #FFFFFF;
  --ink: #1B1F3B;
  --ink-soft: #464556;
  --muted: #5E5D6B;
  --line: #E3DCC8;
  --line-strong: #CFC6AE;
  --sun: #FFD23F;
  --sun-soft: #FFF1B8;
  --coral: #E5484D;
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;
  --wrap: 1180px;
  --head: 'Quicksand', 'Nunito', system-ui, sans-serif;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.6; }
img, svg { display: block; max-width: 100%; }
a { color: var(--ink); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: #3A3F6B; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(36px, 6vw, 60px); }
h2 { font-size: clamp(26px, 3.4vw, 32px); }
h3 { font-size: 20px; letter-spacing: -0.01em; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* Header */
.site-head { border-bottom: 1px solid var(--line); background: var(--paper); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.brand svg { width: 36px; height: 30px; }
.brand span { font-family: var(--head); font-weight: 700; font-size: 24px; letter-spacing: -0.01em; }
.site-nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a { text-decoration: none; font-weight: 700; font-size: 16px; padding: 8px 12px; border-radius: var(--r-sm); white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: #EFE8D6; }
@media (max-width: 640px) {
  .site-nav { margin-left: -12px; flex-wrap: wrap; overflow: visible; }
  .site-nav a { padding: 8px 12px; font-size: 15px; }
}

/* Buttons and forms */
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 20px; border-radius: var(--r); border: 2px solid var(--ink); background: var(--ink); color: var(--paper); font-family: var(--body); font-weight: 800; font-size: 16px; text-decoration: none; cursor: pointer; }
.btn:hover { background: #2C3160; color: var(--paper); }
.field { min-height: 48px; padding: 12px 16px; border: 2px solid var(--ink); border-radius: var(--r); background: var(--card); color: var(--ink); font-family: var(--body); font-size: 17px; width: 100%; }
.field::placeholder { color: #6F6E7C; }
.textlinks { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; font-weight: 700; font-size: 16px; }
.textlinks button { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; cursor: pointer; }

/* Home hero */
.hero { padding: 56px 0 48px; }
.hero-grid { display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: end; } }
.hero h1 { max-width: 14ch; }
.hero .lede { margin-top: 16px; font-size: 19px; color: var(--ink-soft); max-width: 46ch; }
.search { margin-top: 24px; display: flex; gap: 8px; max-width: 520px; }
.search .field { flex: 1 1 auto; min-width: 0; }
.search-hint { margin-top: 8px; font-size: 15px; color: var(--muted); min-height: 0; }
.search-hint:empty { display: none; }
.search-hint a { font-weight: 700; }

/* The one thing worth looking at: the big live countdown */
.bigcount, .countbox, .result { container-type: inline-size; }
.bigcount { border-top: 4px solid var(--ink); padding-top: 16px; }
.bigcount .what { font-size: 17px; color: var(--muted); }
.bigcount .what a { color: var(--ink); font-weight: 800; }
.bigcount .name { font-family: var(--head); font-weight: 700; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; margin-top: 4px; }
.clock { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px 12px; margin-top: 16px; }
.clock div { display: flex; flex-direction: column; }
.clock b { font-family: var(--head); font-weight: 700; font-size: clamp(40px, 14cqi, 128px); line-height: 0.9; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.clock div:first-child b { color: var(--ink); background: var(--sun); padding: 4px 8px 8px; border-radius: var(--r-sm); align-self: flex-start; }
.clock span { font-size: 15px; font-weight: 700; color: var(--muted); margin-top: 8px; }
.bigcount .date { margin-top: 16px; font-size: 17px; }

/* Sections */
.narrow > * { max-width: 760px; }
.narrow > .table-box, .narrow > section { max-width: 760px; }
.section { padding: 32px 0 48px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.filters { display: flex; gap: 16px; }
.filters button { border: 0; background: none; padding: 8px 0; min-height: 44px; font-family: var(--body); font-weight: 700; font-size: 16px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.filters button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.more { margin-top: 16px; font-weight: 800; }

/* Plain date list */
.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.list li { border-bottom: 1px solid var(--line); }
.list li[hidden] { display: none; }
.list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 16px; padding: 16px 0; text-decoration: none; color: var(--ink); }
.list .nm { font-weight: 800; font-size: 18px; }
.list .dt { grid-column: 1; font-size: 15px; color: var(--muted); }
.list .left { grid-column: 2; grid-row: 1 / span 2; align-self: center; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.list a:hover .nm { text-decoration: underline; text-underline-offset: 3px; }
.tag-exp { font-size: 13px; font-weight: 700; color: var(--muted); margin-left: 4px; }
.month { margin-top: 40px; }
.month h2 { font-size: 22px; margin-bottom: 8px; }

/* Reminder */
.remind { padding-top: 24px; border-top: 4px solid var(--ink); }
.remind h2 { font-size: 24px; }
.remind p { color: var(--ink-soft); margin-top: 4px; }
.remind form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.remind .field { flex: 1 1 240px; }
.remind .status { flex-basis: 100%; font-weight: 700; min-height: 24px; color: var(--ink); margin: 0; }
.hp { position: absolute; left: -9999px; }

/* Event page */
.event-top { padding-top: 40px; padding-bottom: 8px; }
.answer { margin-top: 16px; font-size: clamp(19px, 2.4vw, 22px); }
.answer mark { background: var(--sun); color: var(--ink); padding: 0 4px; border-radius: 4px; font-weight: 800; }
.note { margin-top: 12px; font-size: 16px; color: var(--muted); }
.countbox { margin-top: 32px; }
.countbox .actions { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.prose { display: flex; flex-direction: column; gap: 48px; padding-top: 48px; padding-bottom: 64px; }
.prose section > * + * { margin-top: 12px; }
.prose p { color: #2E2D3A; }
.table-box { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 8px 12px 0; border-bottom: 1px solid var(--line); }
th { font-size: 15px; color: var(--muted); font-weight: 700; }
td.num { font-variant-numeric: tabular-nums; text-align: right; padding-right: 0; }
th:last-child { text-align: right; padding-right: 0; }
tr.is-next td { font-weight: 800; }
details.faq { border-bottom: 1px solid var(--line); padding: 16px 0; }
details.faq:first-of-type { border-top: 1px solid var(--line); }
details.faq summary { font-weight: 800; cursor: pointer; }
details.faq p { margin-top: 8px; }
details.embed summary { font-weight: 700; color: var(--muted); cursor: pointer; }
details.embed textarea { margin-top: 12px; width: 100%; min-height: 96px; font-family: ui-monospace, Menlo, monospace; font-size: 14px; padding: 12px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--card); color: var(--ink); }

/* Tools pages */
.toolform { display: grid; gap: 12px; max-width: 560px; margin-top: 24px; }
.toolform label { font-weight: 800; }
.toolform .row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.result { margin-top: 32px; }
.result[hidden] { display: none; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); }
.site-foot .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; padding-top: 32px; padding-bottom: 40px; }
.site-foot .brand svg { width: 28px; height: 24px; }
.site-foot .brand span { font-size: 19px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 15px; }
.site-foot nav a { text-decoration: none; color: var(--ink-soft); }
.site-foot nav a:hover { color: var(--ink); text-decoration: underline; }

/* Embed page */
body.embed-body { background: var(--card); }
.embed-wrap { padding: 16px; }
.embed-wrap { container-type: inline-size; }
.embed-wrap .clock b { font-size: clamp(28px, 14cqi, 64px); }
.embed-wrap .clock div:first-child b { padding: 2px 6px 4px; }
.embed-wrap p { margin-top: 8px; font-size: 14px; color: var(--muted); }

/* Smooth, card based look from the approved design */
a, button, .card, .btn, .field { transition: background-color .2s ease, border-color .2s ease, color .2s ease; }
.field:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--sun-soft); }
.field { border-width: 1.5px; border-color: var(--line-strong); border-radius: 14px; }
.btn { border-radius: 14px; }
.search .field { border-color: var(--ink); }
.hero-grid { align-items: center; }
.nextcard { background: var(--ink); color: var(--paper); border-radius: 24px; padding: 28px; container-type: inline-size; }
.nc-label { font-size: 15px; font-weight: 700; color: #C9CBE0; }
.nc-name { font-family: var(--head); font-weight: 700; font-size: clamp(28px, 3.4vw, 36px); line-height: 1.1; margin-top: 8px; }
.nc-name a { color: var(--paper); text-decoration: none; }
.nc-name a:hover { color: var(--sun); }
.nc-date { color: #C9CBE0; margin-top: 4px; }
.clock { gap: 8px; margin-top: 20px; }
.clock div { background: var(--paper); border-radius: 16px; padding: 16px 4px 12px; align-items: center; text-align: center; }
.clock b { font-size: clamp(32px, 11cqi, 72px); line-height: 1; letter-spacing: -0.03em; }
.clock div:first-child b { background: none; padding: 0; align-self: center; }
.clock span { margin-top: 6px; font-size: 14px; }
.nextcard .clock div { background: #262B52; }
.nextcard .clock b { color: var(--paper); }
.nextcard .clock div:first-child b { color: var(--sun); }
.nextcard .clock span { color: #C9CBE0; }
.cardbox { background: var(--card); border: 1.5px solid var(--line-strong); border-radius: 24px; padding: 24px; }
.cardbox .clock { margin-top: 0; }
.cardbox .clock div:first-child { background: var(--sun); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; margin-top: 16px; }
.card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; text-decoration: none; color: var(--ink); }
.card:hover { border-color: var(--ink); color: var(--ink); }
.card[hidden] { display: none; }
.c-name { font-family: var(--head); font-weight: 700; font-size: 20px; line-height: 1.2; }
.c-date { grid-column: 1; font-size: 15px; color: var(--muted); }
.c-left { grid-column: 2; grid-row: 1 / span 2; align-self: center; text-align: right; }
.c-left b { display: block; font-family: var(--head); font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.c-left small { font-size: 13px; font-weight: 700; color: var(--muted); }
@media (max-width: 640px) { .nextcard, .cardbox { padding: 20px; } .clock { gap: 6px; } }

/* Search first homepage */
.hero-solo { padding: 64px 0 80px; }
.hero-solo .wrap > * { max-width: 680px; }
.hero-solo h1 { font-size: clamp(44px, 8vw, 80px); }
.search-big { margin-top: 24px; max-width: 680px; }
.search-big .field { min-height: 60px; font-size: 19px; border-color: var(--ink); }
.search-big .btn { min-height: 60px; padding: 0 24px; font-size: 17px; }
.hero-solo .nextcard { margin-top: 40px; }
.search input::-webkit-calendar-picker-indicator { display: none !important; }
