:root {
  color-scheme: light;
  --ink: #17191d;
  --muted: #686d76;
  --paper: #f6f7f9;
  --white: #ffffff;
  --line: #d9dce2;
  --yellow: #ffe34f;
  --blue: #1e55ff;
  --shadow: 0 7px 0 var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-size: 1rem;
  line-height: 1.5;
}

a { color: inherit; }

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.15rem clamp(1rem, 4vw, 3.5rem);
  background: var(--yellow);
  border-bottom: 2px solid var(--ink);
}

.masthead p { margin: 0; font-size: .9rem; font-weight: 650; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-weight: 900;
  letter-spacing: -.04em;
  text-decoration: none;
  font-size: 1.25rem;
}

.brand-mark { display: grid; gap: 3px; width: 23px; }
.brand-mark i { display: block; height: 3px; background: var(--ink); border-radius: 4px; }
.brand-mark i:last-child { width: 65%; }

main, footer { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }

.source-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(2rem, 6vw, 4.5rem) 0 1.6rem;
}

.eyebrow {
  margin: 0 0 .25rem;
  color: var(--blue);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}

h1 { margin: 0; font-size: clamp(2.4rem, 7vw, 5.4rem); line-height: .94; letter-spacing: -.065em; }
.archive-summary { margin: .8rem 0 0; color: var(--muted); font-weight: 650; }
.freshness { margin: .2rem 0 0; color: var(--muted); font-size: .8rem; }

.source-link {
  flex: 0 0 auto;
  padding: .7rem .95rem;
  border: 2px solid var(--ink);
  background: var(--white);
  box-shadow: 3px 3px 0 var(--ink);
  font-weight: 750;
  text-decoration: none;
}

.source-link:hover, .source-link:focus-visible { background: var(--yellow); }

.controls {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) repeat(3, minmax(135px, .7fr));
  gap: .75rem;
  padding: 1rem;
  background: var(--white);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
}

label { display: grid; gap: .35rem; font-size: .78rem; font-weight: 800; }

input, select, button { font: inherit; color: inherit; }

input, select {
  width: 100%;
  min-height: 46px;
  padding: .65rem .75rem;
  border: 1.5px solid #aeb2bb;
  border-radius: 0;
  background: var(--white);
  font-size: 1rem;
}

input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.results { padding: 2.25rem 0 1rem; }
.results-bar { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-bottom: .65rem; border-bottom: 2px solid var(--ink); }
.results-bar h2 { margin: 0; font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; }
.results-bar p { margin: 0; color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }

.article-list { list-style: none; margin: 0; padding: 0; }
.article {
  display: grid;
  grid-template-columns: 8.4rem minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  padding: 1.15rem .25rem;
  border-bottom: 1px solid var(--line);
}

.article time { color: var(--muted); font-size: .88rem; font-variant-numeric: tabular-nums; }
.article-copy { min-width: 0; }
.article-title { font-size: clamp(1rem, 2vw, 1.18rem); font-weight: 760; line-height: 1.35; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.article a:hover { color: var(--blue); }
.topics { margin: .45rem 0 0; color: var(--muted); font-size: .8rem; }
.article--unavailable { opacity: .72; }
.article--unavailable .article-title { text-decoration-style: dashed; }
.availability {
  display: inline-block;
  margin-left: .55rem;
  padding: .08rem .38rem;
  border: 1px solid currentColor;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 750;
  vertical-align: .12rem;
}

.more, .empty button {
  display: block;
  margin: 1.5rem auto 0;
  padding: .75rem 1.2rem;
  border: 2px solid var(--ink);
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.more:hover, .empty button:hover { transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--ink); }
.empty { padding: 4rem 1rem; text-align: center; }
.empty p { font-size: 1.1rem; font-weight: 700; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 3rem;
  padding: 1.5rem 0 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .8rem;
}

footer p { margin: 0; max-width: 42rem; }

@media (max-width: 780px) {
  .masthead p { display: none; }
  .source-heading { align-items: start; }
  .controls { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .article { grid-template-columns: 6.6rem minmax(0, 1fr); gap: .8rem; }
}

@media (max-width: 520px) {
  main, footer { width: min(100% - 1.25rem, 1120px); }
  .source-heading { padding-top: 2.25rem; }
  .source-link { padding: .55rem .7rem; font-size: .82rem; }
  .controls { grid-template-columns: 1fr; padding: .75rem; box-shadow: 0 5px 0 var(--ink); }
  .search-field { grid-column: auto; }
  .article { grid-template-columns: 1fr; gap: .25rem; padding: 1rem .1rem 1.15rem; }
  .article time { order: 2; }
  .article-copy { order: 1; }
  .availability { display: table; margin: .35rem 0 0; }
  footer { display: grid; }
}

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