:root {
  --ink: #1d2327;
  --muted: #5a6670;
  --line: #d9dee2;
  --bg: #ffffff;
  --soft: #f4f6f7;
  --accent: #a33a12;
  --accent-ink: #ffffff;
  --up: #8a4b00;
  --up-bg: #fff1dc;
  --past-bg: #e8edf0;
  --sponsor-bg: #fbf8ee;
  --sponsor-line: #d8c88f;
}

* { box-sizing: border-box; }

html { font-size: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}

a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 1rem; }

.site-header { border-bottom: 1px solid var(--line); background: var(--soft); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .5rem 1.5rem; padding-top: .75rem; padding-bottom: .75rem;
}
.brand { font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
nav a { margin-right: 1rem; color: var(--ink); }
nav a:last-child { margin-right: 0; }
nav a[aria-current="page"] { font-weight: 700; }

h1 { font-size: 1.75rem; line-height: 1.2; margin: 1.5rem 0 .5rem; }
h2 { font-size: 1.25rem; margin: 1.75rem 0 .5rem; }
h3 { font-size: 1.05rem; margin: 0 0 .25rem; }

.intro p { max-width: 70ch; }
.meta, .hint, .count { color: var(--muted); font-size: .95rem; }

.tabs { display: flex; gap: .25rem; margin: 1rem 0 0; border-bottom: 2px solid var(--line); }
.tabs button {
  border: 0; background: none; padding: .6rem 1rem; font: inherit; cursor: pointer;
  color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.tabs button[aria-selected="true"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--accent); }

.filters {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: .75rem; align-items: end; padding: 1rem 0;
}
.filters label { display: flex; flex-direction: column; font-size: .875rem; font-weight: 600; gap: .25rem; }
input, select, textarea, button { font: inherit; }
input, select, textarea {
  padding: .45rem .5rem; border: 1px solid #aab4bb; border-radius: 4px; background: #fff; color: var(--ink);
  width: 100%;
}
select:disabled, input:disabled { background: var(--soft); color: var(--muted); }
button {
  padding: .5rem 1rem; border: 1px solid var(--accent); border-radius: 4px;
  background: var(--accent); color: var(--accent-ink); cursor: pointer;
}
button.secondary { background: #fff; color: var(--accent); }
:focus-visible { outline: 3px solid #1a6fb0; outline-offset: 2px; }

.table-wrap { overflow-x: auto; }
table.notices { width: 100%; border-collapse: collapse; font-size: .95rem; }
.notices th, .notices td { text-align: left; vertical-align: top; padding: .65rem .5rem; border-bottom: 1px solid var(--line); }
.notices th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.notices td.num { font-weight: 600; }
.notices .sub, .card .sub { display: block; color: var(--muted); font-size: .875rem; }
.notices .note { display: block; font-size: .8rem; color: var(--muted); margin-top: .25rem; max-width: 46ch; }
.empty { color: var(--muted); padding: 1rem 0; }

.tag { display: inline-block; margin-left: .35rem; padding: 0 .4rem; border-radius: 3px; font-size: .75rem; }
.tag-up { background: var(--up-bg); color: var(--up); }
.tag-past { background: var(--past-bg); color: var(--muted); }

.list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .75rem; }
.card { border: 1px solid var(--line); border-radius: 6px; padding: .85rem 1rem; }
.card p { margin: .35rem 0; }
.card .facts { font-size: .875rem; }

.sponsor {
  margin: 2rem 0; padding: 1rem 1.25rem; border: 1px dashed var(--sponsor-line);
  background: var(--sponsor-bg); border-radius: 6px;
}
.sponsor h2 { margin-top: .25rem; }
.sponsor-label {
  margin: 0; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #6b5a1e;
}

.newsletter { border-top: 1px solid var(--line); padding-bottom: 1rem; }
.signup label { font-weight: 600; display: block; margin-bottom: .25rem; }
.signup .row { display: flex; gap: .5rem; max-width: 480px; }
.form-status { color: var(--accent); font-weight: 600; min-height: 1.5em; }

.page form.stack { max-width: 640px; display: grid; gap: 1rem; }
.page form.stack label { display: flex; flex-direction: column; gap: .25rem; font-weight: 600; }
.page form.stack label span.opt { font-weight: 400; color: var(--muted); }
.page form.stack .check { flex-direction: row; align-items: flex-start; font-weight: 400; }
.page form.stack .check input { width: auto; margin-top: .3rem; }
.page p, .page li { max-width: 70ch; }

.site-footer { border-top: 1px solid var(--line); background: var(--soft); margin-top: 2rem; padding: 1rem 0; font-size: .875rem; color: var(--muted); }

/* Stack the table into blocks on small screens */
@media (max-width: 760px) {
  .notices thead { position: absolute; left: -9999px; }
  .notices tr { display: block; border-bottom: 2px solid var(--line); padding: .5rem 0; }
  .notices td { display: flex; gap: .75rem; border: 0; padding: .2rem 0; }
  .notices td::before { content: attr(data-label); flex: 0 0 6.5rem; font-size: .8rem; color: var(--muted); }
  .notices td[data-label="Supplier"] { display: block; }
  .notices td[data-label="Supplier"]::before { content: none; }
  .notices td.empty::before { content: none; }
  .signup .row { flex-direction: column; }
}
