@font-face {
  font-family: "Barlow Condensed";
  src: url("./fonts/BarlowCondensed-ExtraBold.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 800;
}

@font-face {
  font-family: "Public Sans";
  src: url("./fonts/PublicSans-Variable.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 100 900;
}

:root {
  color-scheme: light dark;
  --bg: #f4f5ef;
  --surface: #ffffff;
  --surface-strong: #e8eadf;
  --ink: #10120e;
  --muted: #596052;
  --line: #c8ccbe;
  --accent: #baff2f;
  --accent-ink: #11150a;
  --inverse: #f4f6ef;
  --night: #10120e;
  --radius: 10px;
  --shell: min(1280px, calc(100% - 48px));
  --font-body: "Public Sans", Arial, sans-serif;
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11140f;
    --surface: #191d16;
    --surface-strong: #252b20;
    --ink: #f2f5ed;
    --muted: #b3baa9;
    --line: #3d4437;
    --inverse: #f5f7f0;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); }
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; }
button, input { font: inherit; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  color: var(--inverse);
  background: var(--night);
  border-bottom: 1px solid #30352c;
}

.header-inner {
  width: var(--shell);
  height: 70px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; min-width: max-content; }
.brand-mark {
  display: grid;
  width: 42px;
  height: 36px;
  place-items: center;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
}
.brand strong { display: block; font-size: 15px; line-height: 1; letter-spacing: -.02em; }
.brand small { display: block; margin-top: 5px; color: #abb2a4; font-size: 10px; line-height: 1; }
.main-nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 38px); font-size: 13px; font-weight: 600; }
.main-nav a { color: #c9cec3; transition: color .2s ease-out; }
.main-nav a:hover { color: var(--accent); }
.main-nav .editor-link { padding: 9px 13px; border: 1px solid #4b5245; border-radius: 5px; }
.main-nav .editor-link:active { transform: translateY(1px); }

.front-masthead { color: var(--accent-ink); background: var(--accent); border-bottom: 1px solid var(--night); }
.masthead-inner {
  width: var(--shell);
  min-height: 390px;
  margin: auto;
  padding: clamp(52px, 7vw, 84px) 0;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  align-items: end;
  gap: clamp(48px, 8vw, 120px);
}
.signal-label { margin: 0 0 20px; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.masthead-copy h1 {
  max-width: 780px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(4.3rem, 8vw, 6rem);
  font-weight: 800;
  line-height: .88;
  letter-spacing: -.035em;
  text-transform: uppercase;
}
.masthead-copy > p:last-child { max-width: 620px; margin: 28px 0 0; font-size: clamp(15px, 1.5vw, 18px); line-height: 1.55; }

.search { align-self: end; }
.search label { display: block; margin-bottom: 10px; font-size: 12px; font-weight: 750; }
.search-row { display: flex; align-items: stretch; border-bottom: 2px solid currentColor; }
.search input {
  min-width: 0;
  flex: 1;
  padding: 16px 2px;
  border: 0;
  outline: 0;
  color: var(--accent-ink);
  background: transparent;
  font-size: 15px;
}
.search input::placeholder { color: #3f4932; opacity: 1; }
.search button {
  min-width: 92px;
  padding: 0 18px;
  border: 0;
  color: var(--inverse);
  background: var(--night);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.search button:hover { color: var(--accent); }
.search button:active { transform: translateY(1px); }

.lead-story {
  width: var(--shell);
  margin: clamp(32px, 5vw, 64px) auto;
  display: grid;
  grid-template-columns: minmax(360px, .82fr) minmax(0, 1.18fr);
  min-height: 510px;
  color: var(--inverse);
  background: var(--night);
}
.lead-copy { padding: clamp(34px, 5vw, 62px); display: flex; flex-direction: column; }
.story-meta { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 11px; font-weight: 650; }
.lead-copy .story-meta { color: #c1c7ba; }
.story-meta span { color: var(--accent); font-weight: 800; }
.lead-copy h2 {
  margin: 28px 0 22px;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5vw, 4.8rem);
  line-height: .94;
  letter-spacing: -.035em;
  text-transform: uppercase;
}
.lead-copy h2 a:hover { color: var(--accent); }
.lead-copy > p { max-width: 58ch; margin: 0; color: #c4c9be; font-size: 15px; line-height: 1.65; }
.lead-footer { margin-top: auto; padding-top: 32px; display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 12px; }
.lead-footer a { color: var(--accent); font-weight: 800; }
.lead-footer a span { margin-left: 5px; font-size: 17px; }
.lead-media { min-height: 510px; overflow: hidden; background: #22271d; }
.lead-media img { height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.16, 1, .3, 1); }
.lead-media:hover img { transform: scale(1.025); }

.fallback-art { display: flex; width: 100%; height: 100%; min-height: 220px; padding: 34px; flex-direction: column; justify-content: space-between; color: var(--accent); background: #1d2119; }
.fallback-art b { font-family: var(--font-display); font-size: clamp(5rem, 12vw, 10rem); line-height: .8; letter-spacing: -.04em; }
.fallback-art small { color: #ccd1c5; font-size: 12px; font-weight: 650; }
.fallback-art.compact { min-height: 140px; justify-content: center; align-items: center; padding: 16px; }
.fallback-art.compact b { font-size: 4rem; }

.launch-state {
  width: var(--shell);
  margin: clamp(32px, 5vw, 64px) auto;
  padding: clamp(36px, 6vw, 72px);
  color: var(--inverse);
  background: var(--night);
  border-bottom: 8px solid var(--accent);
}
.launch-state > p { margin: 0 0 16px; color: var(--accent); font-size: 12px; font-weight: 800; }
.launch-state h2 { max-width: 800px; margin: 0; font-family: var(--font-display); font-size: clamp(3.5rem, 7vw, 6rem); line-height: .9; letter-spacing: -.035em; text-transform: uppercase; }
.launch-state div { max-width: 780px; margin-top: 38px; display: flex; justify-content: space-between; align-items: center; gap: 28px; color: #c7cdc0; font-size: 14px; }
.launch-state a { flex: 0 0 auto; color: var(--accent); font-weight: 800; }

.results-masthead { width: var(--shell); margin: auto; padding: clamp(48px, 8vw, 90px) 0 52px; }
.results-masthead > a { color: var(--muted); font-size: 12px; font-weight: 700; }
.results-masthead h1 { max-width: 900px; margin: 28px 0 10px; font-family: var(--font-display); font-size: clamp(3.4rem, 7vw, 6rem); line-height: .92; letter-spacing: -.035em; text-transform: uppercase; }
.results-masthead > p { margin: 0; color: var(--muted); }
.search-light { max-width: 640px; margin-top: 42px; }
.search-light input { color: var(--ink); }
.search-light input::placeholder { color: var(--muted); }

.topic-nav { border-block: 1px solid var(--line); background: var(--surface); }
.topic-inner { width: var(--shell); margin: auto; display: flex; overflow-x: auto; scrollbar-width: thin; }
.topic-inner a { flex: 0 0 auto; padding: 18px 17px; border-right: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 700; }
.topic-inner a:first-child { border-left: 1px solid var(--line); }
.topic-inner a:hover, .topic-inner a.active { color: var(--accent-ink); background: var(--accent); }
.topic-inner span { margin-left: 7px; opacity: .65; font-size: 10px; }

.front-grid {
  width: var(--shell);
  margin: auto;
  padding: clamp(52px, 7vw, 92px) 0 110px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: clamp(52px, 7vw, 96px);
  align-items: start;
}
.feed-heading { min-height: 48px; margin-bottom: 12px; padding-bottom: 17px; display: flex; align-items: end; justify-content: space-between; gap: 20px; border-bottom: 3px solid var(--ink); }
.feed-heading h2 { margin: 0; font-family: var(--font-display); font-size: 2rem; line-height: 1; letter-spacing: -.025em; text-transform: uppercase; }
.feed-heading > span { color: var(--muted); font-size: 11px; }

.news-stream { display: grid; }
.stream-item { padding: 24px 0; display: grid; grid-template-columns: minmax(180px, 34%) minmax(0, 1fr); gap: clamp(22px, 3vw, 34px); border-bottom: 1px solid var(--line); }
.stream-media { min-height: 180px; overflow: hidden; background: var(--surface-strong); }
.stream-media img { height: 100%; object-fit: cover; transition: transform .45s cubic-bezier(.16, 1, .3, 1); }
.stream-media:hover img { transform: scale(1.035); }
.stream-copy { min-width: 0; display: flex; flex-direction: column; }
.stream-copy h3 { margin: 15px 0 12px; font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.5rem); line-height: .98; letter-spacing: -.025em; text-transform: uppercase; }
.stream-copy h3 a:hover { color: #4b7200; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.stream-copy > p { max-width: 65ch; margin: 0 0 17px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.stream-copy > small { margin-top: auto; color: var(--muted); font-size: 10px; font-weight: 750; }

.popular-block { position: sticky; top: 94px; }
.popular-list { margin: 0; padding: 0; list-style: none; }
.popular-list li { padding: 22px 0; display: grid; grid-template-columns: 52px 1fr; gap: 14px; border-bottom: 1px solid var(--line); }
.popular-number { color: var(--accent); font-family: var(--font-display); font-size: 2.7rem; line-height: .8; }
.popular-list small { color: var(--muted); font-size: 9px; font-weight: 800; }
.popular-list h3 { margin: 8px 0; font-size: 14px; line-height: 1.4; }
.popular-list h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.popular-list p { margin: 0; color: var(--muted); font-size: 10px; }
.popular-list .popular-empty { display: block; color: var(--muted); font-size: 13px; line-height: 1.55; }

.empty-state { padding: clamp(48px, 8vw, 90px) 0; border-bottom: 1px solid var(--line); }
.empty-state strong { display: block; font-family: var(--font-display); font-size: 2.6rem; text-transform: uppercase; }
.empty-state p { color: var(--muted); }
.empty-state a { display: inline-block; margin-top: 12px; padding-bottom: 3px; border-bottom: 2px solid var(--accent); font-weight: 800; }

.article-page { width: min(1080px, calc(100% - 48px)); margin: auto; padding: 64px 0 110px; }
.article-head { max-width: 860px; margin: 0 auto 44px; text-align: center; }
.back-link { display: block; margin-bottom: 34px; color: var(--muted); font-size: 12px; }
.article-category { display: inline-block; margin-bottom: 18px; color: #4e7300; font-size: 11px; font-weight: 800; }
.article-head h1 { margin: 0; font-family: var(--font-display); font-size: clamp(3rem, 6vw, 5.5rem); line-height: .94; letter-spacing: -.035em; text-transform: uppercase; }
.article-lead { max-width: 70ch; margin: 24px auto 28px; color: var(--muted); font-size: 18px; line-height: 1.65; }
.article-byline { display: inline-flex; align-items: center; gap: 11px; text-align: left; }
.source-avatar { display: grid; width: 39px; height: 39px; place-items: center; border-radius: 50%; color: var(--accent-ink); background: var(--accent); font-weight: 800; }
.article-byline strong, .article-byline span { display: block; }
.article-byline strong { font-size: 12px; }
.article-byline span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.article-image { height: min(560px, 52vw); min-height: 290px; overflow: hidden; background: var(--night); }
.article-image img { height: 100%; object-fit: cover; }
.article-placeholder b { font-size: 90px; }
.article-layout { display: grid; grid-template-columns: minmax(0, 700px) 260px; margin-top: 50px; gap: 64px; justify-content: center; align-items: start; }
.article-content { color: var(--ink); font-size: 18px; line-height: 1.85; white-space: pre-line; }
.source-card { padding: 22px; border-top: 3px solid var(--ink); background: var(--surface); }
.source-card span { color: var(--muted); font-size: 10px; font-weight: 800; }
.source-card strong { display: block; margin-top: 8px; font-size: 17px; }
.source-card p { color: var(--muted); font-size: 12px; line-height: 1.55; }
.source-card a { display: block; margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); color: #4e7300; font-size: 12px; font-weight: 800; }

.site-footer { padding: 46px max(24px, calc((100% - 1280px)/2)); display: flex; align-items: center; justify-content: space-between; gap: 30px; color: #b8beb1; background: var(--night); font-size: 12px; }
.site-footer > div { display: flex; align-items: center; gap: 11px; color: var(--inverse); }
.site-footer p { max-width: 60ch; margin: 0; }
.brand-mark.small { width: 34px; height: 29px; font-size: 13px; }

@media (prefers-reduced-motion: no-preference) {
  .masthead-copy { animation: enter-copy .65s cubic-bezier(.16, 1, .3, 1) both; }
  .search { animation: enter-search .65s .1s cubic-bezier(.16, 1, .3, 1) both; }
  .lead-story { animation: enter-story .75s .12s cubic-bezier(.16, 1, .3, 1) both; }
  @keyframes enter-copy { from { opacity: 0; transform: translateY(18px); } }
  @keyframes enter-search { from { opacity: 0; transform: translateY(14px); } }
  @keyframes enter-story { from { opacity: 0; transform: translateY(20px); } }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 960px) {
  .masthead-inner { grid-template-columns: 1fr; align-items: start; }
  .search { max-width: 650px; }
  .lead-story { grid-template-columns: 1fr; }
  .lead-copy { min-height: 430px; }
  .lead-media { min-height: 400px; }
  .front-grid { grid-template-columns: 1fr; }
  .popular-block { position: static; }
  .popular-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
  .article-layout { grid-template-columns: 1fr; gap: 36px; }
  .source-card { max-width: 420px; }
}

@media (max-width: 680px) {
  :root { --shell: min(100% - 28px, 1280px); }
  .header-inner { height: 62px; gap: 14px; }
  .brand small, .main-nav a:not(.editor-link) { display: none; }
  .main-nav .editor-link { padding: 8px 10px; }
  .masthead-inner { min-height: 480px; padding: 52px 0 44px; gap: 46px; }
  .masthead-copy h1 { font-size: clamp(4rem, 20vw, 5.3rem); }
  .masthead-copy > p:last-child { font-size: 15px; }
  .search-row { align-items: stretch; }
  .search input { padding: 14px 0; }
  .search button { min-width: 78px; padding: 0 12px; }
  .lead-story { width: 100%; margin: 0; }
  .lead-copy { min-height: 420px; padding: 34px 20px; }
  .lead-copy h2 { font-size: clamp(2.8rem, 14vw, 4rem); }
  .lead-footer { align-items: flex-start; flex-direction: column; }
  .lead-media { min-height: 300px; }
  .launch-state { width: 100%; margin: 0; padding: 52px 20px; }
  .launch-state div { align-items: flex-start; flex-direction: column; }
  .results-masthead { padding-top: 48px; }
  .topic-inner { width: 100%; padding-left: 14px; }
  .topic-inner a:first-child { border-left: 0; }
  .front-grid { padding: 50px 0 80px; gap: 64px; }
  .stream-item { grid-template-columns: 1fr; }
  .stream-media { min-height: 220px; }
  .stream-copy h3 { font-size: 2.25rem; }
  .popular-list { grid-template-columns: 1fr; }
  .article-page { width: min(100% - 28px, 1080px); padding-top: 42px; }
  .article-head { text-align: left; }
  .article-byline { display: flex; }
  .article-image { height: 300px; }
  .article-content { font-size: 17px; }
  .site-footer { display: block; padding-inline: 20px; }
  .site-footer p { margin-top: 18px; }
}
