/* Colours and serif taken from Nota Bene (nb4.org). */

@font-face {
  font-family: "Source Serif VF";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/source-serif-4-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Source Serif VF";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/source-serif-4-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #fff1e5;
  --fg: #1a1a1a;
  --muted: #4d4845;
  --soft: #8a7f76;
  --line: #ecd6c3;
  --rule: #1a1a1a;
  --accent: #990f1d;
  --chip: #fbe4d2;
  --field: #fff8f2;
  --ok: #2f6b3a;
  --warn: #8a5a00;
  --serif: "Source Serif VF", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0 auto;
  max-width: 48rem;
  padding: 2.25rem 1.25rem 4rem;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.5 var(--sans);
  -webkit-text-size-adjust: 100%;
}

a { color: inherit; }

/* Header, in the manner of the blog's */

header.site { margin-bottom: 1.75rem; }
.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding-bottom: 1.6rem;
  margin-bottom: 1.8rem;
  border-bottom: 1px solid var(--line);
}
.brand { display: block; line-height: 0; }
.brand .logo { width: 156px; height: auto; }
.bar nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.bar nav a {
  font: 400 0.78rem/1.2 var(--serif);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fg);
}
.bar nav a:hover { text-decoration: underline; text-underline-offset: 3px; }

header.site h1 { margin: 0; font: 600 2.4rem/1.1 var(--serif); letter-spacing: -0.01em; }
header.site h1 a { text-decoration: none; }
.tagline { margin: 0.4rem 0 0; color: var(--muted); font: 400 1.05rem/1.4 var(--serif); }

/* Summary line and the filters switch */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}
.summary { margin: 0; font-size: 0.85rem; color: var(--muted); }
.toggle {
  font: 600 0.8rem/1.2 var(--sans);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--fg);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}
.toggle[aria-expanded="true"] { background: var(--fg); color: var(--bg); }
.toggle[hidden] { display: none; }

.filters {
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
}
.filters[hidden] { display: none; }
.row { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: center; }
.search { flex: 1; }
input[type="search"], input[type="date"] {
  font: inherit;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.45rem 0.6rem;
}
input[type="search"] { width: 100%; font-size: 1rem; }
.dates label { font-size: 0.85rem; color: var(--muted); }
.dates input { margin-left: 0.3rem; font-size: 0.85rem; }

button.link {
  font: inherit;
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
}
.dates button.link { font-size: 0.85rem; }

.pubs { display: grid; gap: 0.5rem; }
.group { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; }
.chip {
  font: inherit;
  font-size: 0.8rem;
  line-height: 1.2;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--chip);
  color: var(--fg);
  cursor: pointer;
}
.chip.country { font-weight: 700; min-width: 8.5rem; text-align: left; }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.chip[aria-pressed="mixed"] { border-color: var(--fg); }

/* The list */

.day h2 {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 2rem 0 0;
  padding: 0.55rem 0 0.4rem;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  font: 700 0.76rem/1.3 var(--sans);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
/* Each outlet once per day: its name in a narrow left column, its editorials beside it. */
.outlet {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 0 1.25rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
}
.outlet ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; }
.pub { align-self: start; padding-top: 0.2rem; font-size: 0.875rem; line-height: 1.3; font-weight: 600; color: var(--accent); text-decoration: none; }
.pub:hover { text-decoration: underline; text-underline-offset: 2px; }
.item .headline { display: block; }
.headline { font: 600 1.22rem/1.3 var(--serif); text-decoration: none; hyphens: auto; }
.headline:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.dek { margin: 0.25rem 0 0; color: var(--muted); font: 400 1rem/1.45 var(--serif); hyphens: auto; }

.empty { color: var(--muted); padding: 2rem 0; }
.more { text-align: center; margin: 1.75rem 0; }
.more button {
  font: 600 0.85rem/1.2 var(--sans);
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  border: 1px solid var(--fg);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}
.more button:hover { background: var(--fg); color: var(--bg); }
.more button[hidden] { display: none; }

/* Sources page */

.prose h2 { font: 600 1.6rem/1.2 var(--serif); margin: 0.5rem 0 0.5rem; }
.prose h3 { font: 600 1.15rem/1.3 var(--serif); margin: 2rem 0 0.4rem; }
.prose p { font: 400 1.05rem/1.55 var(--serif); }
table.sources { width: 100%; border-collapse: collapse; font-size: 0.88rem; margin-top: 1rem; }
table.sources th, table.sources td { text-align: left; padding: 0.45rem 0.5rem 0.45rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.sources thead th { font-size: 0.75rem; color: var(--muted); font-weight: 600; border-bottom-color: var(--rule); }
table.sources tr.country th { padding-top: 1.2rem; font-weight: 700; }
table.sources tr.country a { font-weight: 400; font-size: 0.8rem; margin-left: 0.4rem; }
.num { text-align: right; }
.ok { color: var(--ok); }
.warn { color: var(--warn); }
.bad { color: var(--accent); font-weight: 600; }

footer { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: 0.8rem; color: var(--muted); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

@media (max-width: 34rem) {
  body { padding-top: 1.5rem; }
  .outlet { grid-template-columns: minmax(0, 1fr); }
  .pub { padding-top: 0; margin-bottom: 0.3rem; }
  .brand .logo { width: 130px; }
  header.site h1 { font-size: 2rem; }
  .chip.country { min-width: 0; }
  table.sources td:nth-child(4), table.sources th:nth-child(4) { display: none; }
}
