/* Geometry for the calendar home; the #157 colour tokens remain unchanged. */
html body.layout-home #main { width: min(1228px, 100%); margin-inline: auto; padding-inline: var(--space-6); }
html body.layout-home #main .home-wrap { width: 100%; max-width: 100%; padding-inline: 0; margin-inline: 0; }
html body.layout-home #main .layout-home-first { margin: 0; padding-block: var(--space-6); }
html body.layout-home #main #home-title { margin: 0 0 var(--space-2); }
html body.layout-home #main .home-lede { margin: 0 0 var(--space-2); white-space: normal; overflow: visible; text-overflow: clip; }
html body.layout-home #main .home-korea-link { margin: 0 0 var(--space-2); }
html body.layout-home #main :is(h1, h2, h3, .next-up-period, .next-up-company, .next-up-name, .next-up-event) { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
html body.layout-home #main .home-layout-controls { display: flex; align-items: center; gap: var(--space-4); margin-bottom: var(--space-6); }
html body.layout-home #main .home-layout-search { flex: 1; margin: 0; }
html body.layout-home #main .home-layout-search .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
html body.layout-home #main .home-layout-search input { width: 100%; min-width: 0; margin: 0; padding: var(--space-2) var(--space-4); }
/* 2026-10-19: the ticker search is the most prominent control in the first screen. */
html body.layout-home #main .home-layout-search input { min-height: 56px; font-size: 19px; border: 2px solid var(--accent); }
html body.layout-home #main .home-coverage-request { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); margin: calc(-1 * var(--space-2)) 0 var(--space-6); }
html body.layout-home #main .home-coverage-request > p { margin: 0; }
html body.layout-home #main .home-coverage-none, html body.layout-home #main .home-coverage-page { font-weight: 600; }
html body.layout-home #main .home-coverage-page a { display: inline-flex; align-items: center; min-block-size: 44px; font-weight: 400; }
html body.layout-home #main .home-coverage-button { min-height: 44px; padding: var(--space-2) var(--space-4); cursor: pointer; }
html body.layout-home #main .home-coverage-status:empty { display: none; }
/* 2026-10-19: "What these terms mean" under NEXT UP (definitions from scripts/term-help.js). */
html body.layout-home #main .home-terms { margin-block: var(--space-4) 0; }
html body.layout-home #main .home-terms > summary { display: inline-flex; align-items: center; min-block-size: var(--touch-min); cursor: pointer; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
html body.layout-home #main .home-terms-list { margin: var(--space-2) 0 0; max-inline-size: var(--reading-width); }
html body.layout-home #main .home-terms-list > div { padding-block: var(--space-2); border-top: 1px solid var(--border); }
html body.layout-home #main .home-terms-list dt { font-weight: 600; }
html body.layout-home #main .home-terms-list dd { margin: 0; }
html body.layout-home #main .home-layout-controls > a { flex: none; white-space: nowrap; min-height: 44px; padding-block: var(--space-2); }
html body.layout-home #main .home-next-up { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 3fr); gap: var(--space-6); padding: var(--space-6); border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); }
html body.layout-home #main .next-up-clock { min-width: 0; padding-right: var(--space-6); border-right: 1px solid var(--border); }
html body.layout-home #main .next-up-kicker { margin: 0 0 var(--space-2); font-weight: 600; }
html body.layout-home #main .next-up-count { margin: 0 0 var(--space-2); line-height: 1.1; }
html body.layout-home #main .next-up-count [data-layout-next-count] { display: block; font-size: 48px !important; font-weight: 700 !important; font-variant-numeric: tabular-nums; }
html body.layout-home #main .next-up-count-label { display: block; margin-top: var(--space-2); font-size: 14px !important; font-weight: 600; line-height: 1.6; }
html body.layout-home #main .next-up-period { margin: 0; font-weight: 600; }
html body.layout-home #main .next-up-program { min-width: 0; }
html body.layout-home #main .next-up-program > p { margin: 0; }
html body.layout-home #main .next-up-ticker { font-size: 24px; font-weight: 600; letter-spacing: .02em; }
html body.layout-home #main .next-up-event { color: var(--text-2); }
html body.layout-home #main .next-up-program .review-label { margin-block: var(--space-2); font-size: 14px; }
html body.layout-home #main .next-up-actions { display: flex; align-items: center; gap: var(--space-4); }
html body.layout-home #main .next-up-actions > a { display: inline-flex; align-items: center; min-height: 44px; }
html body.layout-home #main .next-up-program details { margin-top: var(--space-2); }
html body.layout-home #main .home-layout-records { margin-block: var(--space-6) 0; padding: 0; }
html body.layout-home #main .home-layout-records > h2 { margin-block: 0 var(--space-4); }
html body.layout-home #main .home-recent-timing { margin-block: var(--space-12); padding: 0; }
html body.layout-home #main .home-recent-timing h2 { margin-block: 0 var(--space-2); }
html body.layout-home #main .home-recent-timing ol { list-style: none; margin: var(--space-4) 0 0; padding: 0; }
html body.layout-home #main .home-recent-timing li { padding-block: var(--space-4); border-top: 1px solid var(--border); overflow-wrap: anywhere; }
html body.layout-home #main .recent-timing-heading { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); }
html body.layout-home #main .recent-timing-heading > a:first-child { display: inline-flex; align-items: center; min-block-size: 44px; font-weight: 600; }
html body.layout-home #main .recent-timing-heading > time { color: var(--text-2); }
html body.layout-home #main .recent-timing-comparison { margin-block: var(--space-2); }
html body.layout-home #main .recent-timing-sources { margin-block: 0; max-inline-size: 70ch; color: var(--text-2); font-size: 14px; line-height: 1.6; }
html body.layout-home #main .recent-timing-sources a { display: inline-flex; align-items: center; min-block-size: 44px; }
html body.layout-home #main .home-stage-controls { margin-block: var(--space-3) var(--space-4); }
html body.layout-home #main .home-stage-controls > summary { min-block-size: var(--touch-min); inline-size: fit-content; cursor: pointer; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
html body.layout-home #main .home-stage-controls .home-stage-filters { margin-block: var(--space-2) 0; }
html body.layout-home #main .home-schedule-group { margin-block: var(--space-6); }
html body.layout-home #main .home-schedule-group > h3 { margin: 0 0 var(--space-2); }
html body.layout-home #main .home-layout-how { margin-top: var(--space-12); }
html body.layout-home #main .home-layout-how ol { padding-left: var(--space-6); max-inline-size: var(--reading-width); }
html body.layout-home #main .home-layout-how li { padding-block: var(--space-2); }
html body.layout-home #main .home-weekly-line, html body.layout-home #main .home-records-request { margin-block: var(--space-12); }
html body.layout-home #main [hidden] { display: none !important; }
@media (min-width: 768px) {
  html body.layout-home #main .home-stage-controls > summary { display: none; }
}
@media (max-width: 767px) {
  html body.layout-home #main { padding-inline: var(--space-4) !important; }
  html body.layout-home #main .layout-home-first { padding-block: var(--space-4); }
  html body.layout-home #main .home-layout-controls { flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
  html body.layout-home #main .home-layout-search { flex-basis: 100%; }
  html body.layout-home #main .home-layout-controls > a { width: 100%; }
  html body.layout-home #main .home-next-up { grid-template-columns: minmax(96px, 1fr) minmax(0, 2.5fr); gap: var(--space-4); padding: var(--space-6); }
  html body.layout-home #main .next-up-clock { padding-right: var(--space-4); }
  html body.layout-home #main .next-up-period { overflow-wrap: anywhere; }
  html body.layout-home #main .next-up-program > p { font-size: 17px; }
  html body.layout-home #main .next-up-ticker { font-size: 19px; }
}
/* 2026-10-21 (founder): compact NEXT UP on phones so it stays fully in the 390x844 first screen whatever the program:
   one countdown row, all text full width (it still wraps; nothing is cut), tighter spacing. */
@media (max-width: 767px) {
  html body.layout-home #main .home-next-up { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); padding: var(--space-2) var(--space-4); }
  html body.layout-home #main .next-up-clock { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--space-3); padding: 0 0 var(--space-2); border-right: 0; border-bottom: 1px solid var(--border); }
  html body.layout-home #main .next-up-kicker { margin: 0; }
  html body.layout-home #main .next-up-count { display: flex; align-items: baseline; gap: var(--space-2); margin: 0; }
  html body.layout-home #main .next-up-count [data-layout-next-count] { font-size: 34px !important; }
  html body.layout-home #main .next-up-count-label { margin-top: 0; }
  html body.layout-home #main .next-up-period { flex-basis: 100%; }
  html body.layout-home #main .next-up-program .review-label { margin-block: 0; }
  /* 2026-10-21: with a wide fallback font (DejaVu Sans on the Linux CI runner) the paused "Email alerts paused"
     button wrapped to two lines and pushed NEXT UP past 844px; a tighter actions row keeps it on one line. */
  html body.layout-home #main .next-up-actions { gap: var(--space-3); }
  html body.layout-home #main .next-up-actions > .button { padding-inline: var(--space-3); }
}
/* 2026-10-20 (engagement): one-line latest change, ticker chips and a calendar link under the search; earlier phrase struck through. */
html body.layout-home #main .home-latest-change { margin: calc(-1 * var(--space-2)) 0 var(--space-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; line-height: 1.6; color: var(--text-2); }
html body.layout-home #main .home-latest-change a { display: inline; }
html body.layout-home #main .home-latest-label { color: var(--text-2); font-size: 14px; white-space: nowrap; }
html body.layout-home #main .home-latest-links { display: flex; flex-wrap: nowrap; align-items: center; gap: var(--space-2); margin: 0 0 var(--space-4); overflow-x: auto; scrollbar-width: none; font-size: 14px; }
html body.layout-home #main .home-chip { display: inline-flex; flex: none; align-items: center; min-block-size: 32px; padding: 0 var(--space-3); border: 1px solid var(--border); border-radius: 999px; font-weight: 600; text-decoration: none; }
html body.layout-home #main .home-latest-calendar { display: inline-flex; flex: none; align-items: center; min-block-size: 32px; white-space: nowrap; }
html body.layout-home #main .home-recent-timing .sr-only, html body.layout-home #main .home-recent-timing s + .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
html body.layout-home #main .recent-timing-comparison s { color: var(--text-2); }
/* 2026-10-20: chips under the search on desktop; on phones they follow NEXT UP so it stays in the first screen. */
html body.layout-home #main .home-latest-links-narrow, html body.layout-home #main .home-latest-change-narrow { display: none; }
html body.layout-home #main .home-latest-links-narrow { margin: var(--space-2) 0 0; }
@media (max-width: 767px) {
  html body.layout-home #main .home-latest-links-wide, html body.layout-home #main .home-latest-change-wide { display: none; }
  html body.layout-home #main .home-latest-links-narrow { display: flex; }
  html body.layout-home #main .home-latest-change-narrow { display: block; margin: var(--space-3) 0 0; }
  html body.layout-home #main .home-latest-links { flex-wrap: wrap; overflow-x: visible; }
  html body.layout-home #main .home-latest-change { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
  html body.layout-home #main .home-latest-change a { white-space: normal; overflow-wrap: anywhere; }
  html body.layout-home #main :is(.home-chip, .home-latest-calendar) { min-inline-size: 44px; min-block-size: 44px; white-space: normal; }
}
