:root {
  --bg: #e9e7e1;
  --ink: #1c1c1a;
  --muted: #8c8a80;
  --accent: #2f3e6e;
  --line: #cdc9be;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  line-height: 1.5;
  font-size: 18px;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 11vh 28px 80px;
}

/* Masthead */
.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 0;
}

.masthead-copy {
  min-width: 0;
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.title {
  font-size: clamp(2.3rem, 7vw, 3.4rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.015em;
  margin: 0.3em 0 0.55em;
}

.logo {
  aspect-ratio: 392 / 461;
  flex-shrink: 0;
  justify-self: end;
  align-self: center;
  display: block;
  /* height set by logo.js = 75% of .masthead-copy */
}

.lede {
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  line-height: 1.45;
  max-width: 30ch;
  color: #34332f;
}

.event-meta {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-top: 1.1em;
}

.meta-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.meta-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

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

/* Schedule */
.schedule {
  margin-top: 48px;
  border-top: 1px solid var(--line);
}

.entry {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
  transition: padding-left 0.25s ease;
}

.entry:hover {
  padding-left: 10px;
}

.when {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 0.35em;
}

.date {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.time {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.name {
  font-size: clamp(1.5rem, 4vw, 1.95rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.role {
  margin-top: 6px;
  font-size: 1.02rem;
  color: #45433d;
}

.tag {
  display: inline-block;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 8px;
  vertical-align: 1px;
  margin-left: 2px;
  white-space: nowrap;
}

.footer {
  margin-top: 48px;
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.loading {
  padding: 28px 0;
  color: var(--muted);
  font-size: 1.05rem;
}

/* Admin bar */
.admin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding: 14px 18px;
  background: rgba(47, 62, 110, 0.06);
  border: 1px solid var(--line);
  border-radius: 10px;
  flex-wrap: wrap;
}
.admin-bar[hidden] { display: none; }

.admin-page-header {
  margin-bottom: 32px;
}

.admin-title {
  font-size: clamp(2rem, 6vw, 2.8rem);
  margin: 0.3em 0 0.4em;
}

.login-panel {
  max-width: 400px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(47, 62, 110, 0.04);
}

.panel-title {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 20px;
}

.login-panel .btn-solid {
  margin-top: 8px;
}

.lede a {
  text-decoration: none;
}
.lede a:hover {
  text-decoration: underline;
}

.admin-status {
  font-size: 0.85rem;
  color: #45433d;
}
.admin-status #adminEmail { color: var(--accent); font-weight: 600; }

.admin-actions { display: flex; gap: 8px; }

/* Edit affordance on entries */
.edit-hint {
  display: none;
  align-self: center;
  justify-self: end;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
}
.schedule.admin-mode .entry {
  grid-template-columns: 150px 1fr auto;
  cursor: pointer;
}
.schedule.admin-mode .entry:hover { padding-left: 10px; }
.schedule.admin-mode .entry:hover .edit-hint {
  color: var(--accent);
  border-color: var(--accent);
}
.schedule.admin-mode .edit-hint { display: inline-flex; }

/* Footer admin link */
.footer-right { display: inline-flex; align-items: center; gap: 16px; }

/* Buttons */
.btn {
  font-family: inherit;
  font-size: 0.9rem;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--line);
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn-ghost { background: transparent; color: #45433d; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-solid { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-solid:hover { background: #25315a; }
.btn-danger { background: transparent; color: #9b2c2c; border-color: #d9b8b8; }
.btn-danger:hover { background: #9b2c2c; color: #fff; border-color: #9b2c2c; }
.btn:disabled { opacity: 0.6; cursor: default; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 18, 0.45);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 50;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: #f3f1ec;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 30px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 24px 60px rgba(20, 20, 18, 0.22);
}
.modal-title {
  font-size: 1.7rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}
.field { display: block; margin-bottom: 16px; }
.field > span {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.field-hint { text-transform: none; letter-spacing: 0; font-size: 0.72rem; }
.field input {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fdfcfa;
  color: var(--ink);
}
.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 62, 110, 0.12);
}
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-error {
  color: #9b2c2c;
  font-size: 0.88rem;
  margin: -4px 0 14px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}
.modal-actions-split { align-items: center; }
.modal-actions .spacer { flex: 1; }

@media (max-width: 560px) {
  .page { padding: 8vh 22px 60px; }
  .masthead {
    grid-template-columns: 1fr;
  }
  .logo {
    display: none;
  }
  .entry {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .schedule.admin-mode .entry { grid-template-columns: 1fr auto; }
  .when {
    flex-direction: row;
    gap: 12px;
    padding-top: 0;
    align-items: baseline;
  }
  .entry:hover { padding-left: 0; }
  .field-grid { grid-template-columns: 1fr; }
}
