/* What's on Harvey — mobile-first, large type, high contrast, no tracking */
:root {
  --bg: #f3efe6;
  --ink: #1a1714;
  --muted: #3f3a34;
  --card: #fffdf8;
  --line: #cfc6b6;
  --accent: #134e3a;
  --accent-soft: #e4efe8;
  --link: #0b3d74;
  --deadline: #6b3a00;
  --deadline-bg: #f8eedf;
  --focus: #0b3d74;
  --shadow: 0 1px 2px rgba(26, 23, 20, 0.08);
  --radius: 12px;
  --pad: 1rem;
  --max: 40rem;
  --font: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.5;
}

img, svg { max-width: 100%; height: auto; }

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3.5rem;
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  z-index: 20;
}
.skip:focus { top: 0.75rem; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad) 3rem;
}

.site-header {
  background: var(--accent);
  color: #fffdf8;
  padding: 0.85rem 0 0.95rem;
}

.site-header .wrap { padding-bottom: 0; }

.site-header p.kicker {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.9;
}

.site-header h1 {
  margin: 0.15rem 0 0.25rem;
  font-size: 1.85rem;
  line-height: 1.15;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.site-header .lede {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.4;
  max-width: 36rem;
  color: #f3efe6;
}

.disclaimer {
  background: #ebe4d4;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding: 0.65rem 0;
  font-size: 1rem;
  line-height: 1.45;
}

.disclaimer .wrap { padding-bottom: 0; }

.disclaimer p { margin: 0; }

.controls {
  padding: 0.5rem 0;
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
}

.controls .wrap { padding-bottom: 0; }

.filter-bar {
  padding: 0.55rem 0 0;
}

.filter-bar .wrap { padding-bottom: 0; }

.jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
}

.jump a {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
}

.jump a:hover, .jump a:focus-visible { background: var(--accent-soft); }

.filters {
  display: grid;
  gap: 0.65rem;
}

label.field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--ink);
}

input[type="search"], select {
  appearance: none;
  font: inherit;
  font-weight: 400;
  font-size: 1.125rem;
  color: var(--ink);
  background: var(--card);
  border: 2px solid #8a8172;
  border-radius: 10px;
  min-height: 3rem;
  padding: 0.4rem 0.75rem;
  width: 100%;
}

input[type="search"]:focus, select:focus {
  border-color: var(--focus);
}

.filter-status {
  margin: 0.5rem 0 0;
  font-size: 1rem;
  color: var(--muted);
}
.filter-status:empty { margin: 0; }

section {
  margin-top: 1.1rem;
  scroll-margin-top: 7.5rem;
}
#today { margin-top: 0.85rem; }

section h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.2;
}

.section-head p {
  margin: 0.35rem 0 0.8rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.count {
  font-weight: 650;
  color: var(--accent);
}

.day-group { margin: 0 0 1.25rem; }

.day-group h3, .date-group h3 {
  margin: 0 0 0.55rem;
  font-size: 1.15rem;
  color: var(--accent);
}

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.85rem 0.95rem 0.9rem;
}

.card.deadline {
  border-color: #d9b88a;
  background: var(--deadline-bg);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.35rem;
}

.badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

.badge.special { background: #e8eef6; color: #0b3d74; }
.badge.deadline { background: #6b3a00; color: #fffdf8; }
.badge.tbc { background: #efe7b8; color: #3f3500; }

.card h3 {
  margin: 0;
  font-size: 1.22rem;
  line-height: 1.25;
}

.when, .where, .blurb {
  margin: 0.28rem 0 0;
}

.when { font-weight: 650; }

.where, .blurb { color: var(--ink); }

.blurb { font-size: 1.05rem; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  margin-top: 0.55rem;
}

.actions a {
  font-weight: 650;
  min-height: 2.25rem;
  display: inline-flex;
  align-items: center;
}

details.more {
  margin-top: 0.5rem;
}

details.more summary {
  cursor: pointer;
  font-weight: 650;
  color: var(--link);
  min-height: 2.25rem;
  display: inline-flex;
  align-items: center;
}

details.more .extra {
  margin-top: 0.4rem;
  padding: 0.55rem 0.7rem;
  background: #f6f2e9;
  border-radius: 8px;
}

details.more .extra p { margin: 0 0 0.4rem; }
details.more .extra p:last-child { margin-bottom: 0; }

details.more ul {
  margin: 0.2rem 0 0;
  padding-left: 1.2rem;
}

.empty {
  margin: 0;
  padding: 0.85rem 0;
  color: var(--muted);
}

.site-footer {
  margin-top: 2.5rem;
  padding: 1.25rem 0 2rem;
  border-top: 1px solid var(--line);
  background: #ebe4d4;
  color: var(--ink);
  font-size: 1rem;
}

.site-footer .wrap { padding-bottom: 0; }

.site-footer p { margin: 0 0 0.65rem; }
.site-footer p:last-child { margin-bottom: 0; }

.site-footer .send a { font-weight: 700; font-size: 1.125rem; }

.updated { color: var(--muted); font-size: 0.95rem; }

@media (min-width: 640px) {
  body { font-size: 1.1875rem; }
  .site-header h1 { font-size: 2.25rem; }
  .filters { grid-template-columns: 1.4fr 1fr; align-items: end; }
}


/* Hero slot — short, so the disclaimer and Today stay near the top on a 375px phone. */
.hero {
  margin: 0;
  background: #e7e1d4;
  border-bottom: 1px solid var(--line);
}

.hero .hero-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 4.25rem;
  max-height: 4.5rem;
  padding: 0.45rem var(--pad);
  text-align: center;
}

.hero .hero-slot p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.hero.hero-has-image img {
  display: block;
  width: 100%;
  height: 6.25rem;
  object-fit: cover;
  object-position: center;
}

/* Add your event */
.header-actions {
  margin: 0.55rem 0 0;
}

.btn-add-event {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.4rem 1.1rem;
  border-radius: 10px;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}

.btn-add-event-header {
  border: 2px solid #fffdf8;
  background: #fffdf8;
  color: var(--accent);
}

.btn-add-event-header:hover,
.btn-add-event-header:focus-visible {
  background: var(--accent-soft);
  color: var(--accent);
}

.footer-actions {
  margin: 0.85rem 0 0.7rem;
}

.btn-add-event-footer {
  border: 2px solid var(--accent);
  background: var(--accent);
  color: #fffdf8;
  width: 100%;
  max-width: 22rem;
}

.btn-add-event-footer:hover,
.btn-add-event-footer:focus-visible {
  background: #0f3f2f;
}

#add-event-dialog {
  width: calc(100% - 1.5rem);
  max-width: 26rem;
  max-height: calc(100vh - 1.5rem);
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 8px 28px rgba(26, 23, 20, 0.22);
  overflow-x: hidden;
  overflow-y: auto;
}

#add-event-dialog::backdrop {
  background: rgba(26, 23, 20, 0.45);
}

#add-event-form {
  display: grid;
  gap: 0.5rem;
  padding: 0.8rem 0.9rem 0.85rem;
  min-width: 0;
  max-width: 100%;
}

.time-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  min-width: 0;
}

.time-fields .field {
  min-width: 0;
}

#add-event-form h2 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.2;
}

#add-event-form .form-note {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.35;
  color: var(--muted);
  font-weight: 400;
}

#add-event-form textarea,
#add-event-form input[type="text"],
#add-event-form input[type="date"],
#add-event-form input[type="time"] {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-weight: 400;
  font-size: 1.125rem;
  color: var(--ink);
  background: var(--card);
  border: 2px solid #8a8172;
  border-radius: 10px;
  padding: 0.4rem 0.75rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

#add-event-form textarea {
  min-height: 4.25rem;
  padding: 0.45rem 0.7rem;
  resize: vertical;
}

#add-event-form input[type="text"],
#add-event-form input[type="date"],
#add-event-form input[type="time"] {
  min-height: 2.75rem;
  display: block;
}

#add-event-form input[type="date"]::-webkit-datetime-edit,
#add-event-form input[type="time"]::-webkit-datetime-edit {
  min-width: 0;
  padding: 0;
}

#add-event-form input[type="date"]::-webkit-calendar-picker-indicator,
#add-event-form input[type="time"]::-webkit-calendar-picker-indicator {
  margin-left: 0.2rem;
  flex-shrink: 0;
}

#add-event-form input[type="text"]:focus,
#add-event-form input[type="date"]:focus,
#add-event-form input[type="time"]:focus,
#add-event-form textarea:focus {
  border-color: var(--focus);
  outline: none;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.25rem;
}

.btn-submit,
.btn-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.4rem 1.1rem;
  border-radius: 10px;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-submit {
  border: 2px solid var(--accent);
  background: var(--accent);
  color: #fffdf8;
  flex: 1 1 auto;
}

.btn-submit:hover,
.btn-submit:focus-visible {
  background: #0f3f2f;
}

.btn-cancel {
  border: 2px solid #8a8172;
  background: var(--card);
  color: var(--ink);
  flex: 1 1 auto;
}

.btn-cancel:hover,
.btn-cancel:focus-visible {
  background: #f6f2e9;
}
