:root {
  color-scheme: light;
  --red: #e31b23;
  --red-dark: #b5121b;
  --ink: #202124;
  --muted: #65676b;
  --line: #dedfe1;
  --surface: #ffffff;
  --background: #f5f5f5;
  --focus: #1b65a7;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--background);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--red-dark); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 8px;
  transform: translateY(-160%);
  padding: 10px 14px;
  color: white;
  background: var(--ink);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  border-top: 5px solid var(--red);
  background: var(--surface);
  box-shadow: 0 2px 8px rgb(0 0 0 / 8%);
}
.header-inner {
  display: flex;
  width: min(1200px, calc(100% - 48px));
  min-height: 82px;
  align-items: center;
  margin: 0 auto;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.wordmark img {
  display: block;
  width: 140px;
  max-height: 72px;
  object-fit: contain;
}
.header-divider {
  width: 1px;
  height: 38px;
  margin: 0 22px;
  background: var(--line);
}
.header-context { color: var(--muted); font-size: .94rem; }
.header-link {
  margin-left: auto;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
}
.header-link:hover, .source-link:hover { text-decoration: underline; }

.shell { width: min(1120px, calc(100% - 48px)); margin: 0 auto; padding: 54px 0 32px; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(210px, .42fr); align-items: end; gap: 36px; margin-bottom: 30px; }
.eyebrow {
  margin: 0 0 11px;
  color: var(--red-dark);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .105em;
  text-transform: uppercase;
}
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 15px; font-size: clamp(2.4rem, 5vw, 4.1rem); letter-spacing: -.045em; line-height: 1.03; }
h2 { margin-bottom: 0; font-size: 1.38rem; letter-spacing: -.025em; }
.intro { max-width: 610px; margin-bottom: 0; color: var(--muted); font-size: 1.08rem; line-height: 1.6; }
.hero-note {
  margin: 0 0 5px;
  border-left: 4px solid var(--red);
  padding: 4px 0 4px 16px;
  color: var(--muted);
  font-size: .91rem;
  line-height: 1.5;
}
.hero-note strong { display: block; margin-bottom: 3px; color: var(--ink); font-size: .96rem; }

.panel {
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  box-shadow: 0 4px 16px rgb(0 0 0 / 5%);
}
.setup-panel { padding: 26px 30px 20px; }
.unsubscribe-panel { margin-top: 18px; }
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.quiet { color: var(--muted); font-size: .84rem; }
.panel-heading .quiet { padding-top: 5px; }
.email-form label { display: block; margin-bottom: 8px; font-size: .9rem; font-weight: 700; }
.form-row { display: flex; gap: 12px; }
input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #aeb0b3;
  border-radius: 2px;
  background: white;
  padding: 0 14px;
  color: var(--ink);
  font: inherit;
}
input::placeholder { color: #77797c; }
button {
  min-height: 48px;
  border: 2px solid var(--red);
  border-radius: 2px;
  padding: 0 21px;
  cursor: pointer;
  color: white;
  background: var(--red);
  font: 700 .92rem Arial, Helvetica, sans-serif;
  white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease;
}
button:hover { border-color: var(--red-dark); background: var(--red-dark); }
button:disabled { cursor: wait; opacity: .6; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 13px; }
button.secondary { border-color: var(--ink); color: var(--ink); background: white; }
button.secondary:hover { color: white; background: var(--ink); }
.status { min-height: 1.25em; margin: 12px 0 0; color: #236239; font-size: .9rem; }
.status.error, .last-status.error { color: var(--red-dark); }

.dashboard { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(250px, .75fr); gap: 18px; margin-top: 18px; }
.menu-panel, .status-panel { padding: 27px 30px; }
.menu-panel { min-height: 330px; }
.menu-items { display: grid; gap: 0; border-top: 1px solid var(--line); }
.menu-item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.menu-item strong { display: block; font-size: 1rem; }
.menu-item span { display: block; margin-top: 5px; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.empty { color: var(--muted); line-height: 1.5; }
.source-link { display: inline-block; margin-top: 22px; font-size: .9rem; font-weight: 700; }
.status-panel { border-top: 4px solid var(--red); }
.next-check { display: block; margin-top: 13px; color: var(--ink); font-size: 1.65rem; font-weight: 700; line-height: 1.2; }
.rule { height: 1px; margin: 30px 0 25px; background: var(--line); }
.last-status { margin-bottom: 13px; line-height: 1.55; }

.site-footer {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 18px 0 28px;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.5;
}
.site-footer a { font-weight: 700; }

@media (max-width: 760px) {
  .header-inner { width: min(100% - 32px, 600px); min-height: 72px; }
  .wordmark img { width: 124px; }
  .header-divider { margin: 0 14px; }
  .header-context { font-size: .84rem; }
  .shell { width: min(100% - 32px, 600px); padding-top: 39px; }
  .hero { grid-template-columns: 1fr; gap: 19px; margin-bottom: 23px; }
  .hero-note { max-width: 360px; }
  .dashboard { grid-template-columns: 1fr; }
  .menu-panel { min-height: 280px; }
  .site-footer { width: min(100% - 32px, 600px); }
}

@media (max-width: 480px) {
  .header-link { font-size: .82rem; }
  .setup-panel, .menu-panel, .status-panel { padding: 21px; }
  .form-row { flex-direction: column; }
  .panel-heading { flex-direction: column; gap: 8px; }
  h1 { font-size: 2.65rem; }
}

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