@font-face {
  font-family: Fraunces;
  src: url("/assets/fraunces.woff2") format("woff2");
  font-weight: 700 900;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/source-serif-4.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fbf5eb;
  --forest: #112f24;
  --ink: #212522;
  --gold: #f9d980;
  --rule: #93975e;
  --news: #8a5100;
  --reaction: #a34832;
  --zoo: #496b50;
  --heading: Fraunces, Georgia, serif;
  --body: "Source Serif 4", Georgia, serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, figure, ol { margin: 0; }
img { display: block; max-inline-size: 100%; }
a { color: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 4px;
}

.icon-definitions {
  position: absolute;
  inline-size: 0;
  block-size: 0;
  overflow: hidden;
}

.icon {
  inline-size: 1.15em;
  block-size: 1.15em;
  flex: none;
}

.visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.shell {
  inline-size: min(87.2%, 1340px);
  margin-inline: auto;
}

.masthead {
  min-block-size: 76px;
  margin-inline: 5px;
  padding-inline: 5px 1px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 2px solid var(--forest);
  color: var(--forest);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--heading);
  font-weight: 900;
  font-size: clamp(1.7rem, 3.35vw, 3.125rem);
  line-height: 1;
  letter-spacing: -.036em;
  word-spacing: .035em;
  text-decoration: none;
}

.wordmark-mark {
  display: grid;
  place-items: center;
  inline-size: clamp(2.5rem, 5vw, 4.4rem);
  aspect-ratio: 1;
  flex: none;
  border-radius: 50%;
  background: var(--gold);
}

.wordmark-mark img { inline-size: 76%; block-size: auto; }

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-block-size: 44px;
  padding: .42rem 1.45rem;
  border: 1px solid var(--forest);
  border-radius: 100vw;
  background: transparent;
  font-family: var(--body);
  font-size: 1.14rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--forest);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .18s ease, color .18s ease, scale .12s ease;
}

.pill:hover { background: #efe8d4; }
.pill:active { scale: .96; }
.pill[aria-pressed="true"] { background: var(--forest); color: var(--paper); }

.share-button {
  min-block-size: 47px;
  gap: .56rem;
  padding-inline: 1.4rem;
  border-width: 1.5px;
  font-size: 1.27rem;
  font-weight: 700;
}

.share-button .icon { inline-size: 1.28em; block-size: 1.28em; }

.hero {
  display: grid;
  grid-template-columns: 43% 57%;
  min-block-size: 341px;
  margin-top: 28px;
  overflow: hidden;
  border-radius: 20px;
  color: var(--forest);
}

.status-panel {
  display: grid;
  align-items: center;
  background: var(--gold);
  container-type: inline-size;
  padding: 35px clamp(23px, 2.7vw, 42px);
}

.status-question, .status-updated {
  font-family: var(--mono);
  text-transform: uppercase;
}

.status-question {
  font-size: clamp(.9rem, 4.9cqi, 1.55rem);
  font-weight: 600;
  letter-spacing: .065em;
}

.status-content h1 {
  margin: 10px -.11em .075em;
  font-family: var(--heading);
  font-size: clamp(2.5rem, 24.5cqi, 7.55rem);
  font-weight: 900;
  font-variation-settings: "opsz" 95;
  line-height: .97;
  letter-spacing: -.047em;
  word-spacing: .10em;
}

.status-summary {
  margin-inline-end: -.35em;
  font-size: clamp(1.08rem, 5.3cqi, 1.66rem);
  line-height: 1.19;
}

.status-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .7em 1.1em;
  margin-top: clamp(15px, 4.9cqi, 24px);
  font-size: clamp(.72rem, 3.4cqi, 1rem);
  font-weight: 600;
  letter-spacing: .11em;
}

.status-wait {
  padding: .42em .85em .4em;
  border-radius: 100vw;
  background: var(--forest);
  color: var(--gold);
  font-family: var(--mono);
  text-transform: uppercase;
}

.status-updated {
  display: flex;
  align-items: center;
  gap: .49em;
}

.status-dot {
  flex: none;
  inline-size: .66em;
  block-size: .66em;
  margin-right: .16em;
  border-radius: 50%;
  background: currentColor;
}

[data-status="waiting"] .status-dot { animation: pulse 2.2s ease-out infinite; }

@keyframes pulse {
  from { box-shadow: 0 0 0 0 #112f2480; }
  70%, to { box-shadow: 0 0 0 .62em #112f2400; }
}

/* The answer is yes: flip the panel and let the headline fill it. */
.status-panel { transition: background-color .6s ease, color .6s ease; }
.status-panel:has([data-status="passed"]) { background: var(--forest); color: var(--gold); }
[data-status="passed"] h1 { font-size: clamp(3.4rem, 36cqi, 10.5rem); margin-top: 4px; }
[data-status="passed"] .status-wait { background: var(--gold); color: var(--forest); }

.status-content { animation: rise .7s cubic-bezier(.2, .8, .2, 1) both; }

@keyframes rise {
  from { opacity: 0; translate: 0 12px; }
}

.portrait {
  position: relative;
  min-block-size: 100%;
  overflow: hidden;
  background: #486448;
}

.portrait img {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

.story {
  display: flex;
  align-items: baseline;
  gap: .4rem 1.2rem;
  margin: 20px 5px 0;
  padding: 0 5px 20px;
  border-bottom: 1px solid var(--rule);
  font-size: clamp(1.02rem, 1.35vw, 1.2rem);
  line-height: 1.4;
}

.story-label {
  flex: none;
  color: var(--forest);
  font: 600 .78em/1.4 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.story a {
  color: var(--forest);
  font-weight: 600;
  text-underline-offset: .19em;
  white-space: nowrap;
}

.fact { margin-top: 16px; padding-bottom: 16px; }
.fact-typed { margin-inline-end: -2px; border-inline-end: 2px solid var(--forest); }
.fact-pending { color: transparent; user-select: none; }

.stream { margin-top: 26px; }

.stream-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 26px;
}

.stream h2, dialog h2 {
  color: var(--forest);
  font-family: var(--heading);
  font-weight: 900;
  font-size: clamp(2.1rem, 3.9vw, 3.7rem);
  line-height: 1.05;
  letter-spacing: -.037em;
  word-spacing: .032em;
}

.stream-header p {
  margin-top: 4px;
  font-size: clamp(1rem, 1.45vw, 1.36rem);
  line-height: 1.29;
}

.filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.timeline {
  margin-inline: -10px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.entry {
  --pad: 14px;
  --date-col: 117px;
  --gap: 36px;
  position: relative;
  display: grid;
  grid-template-columns: var(--date-col) minmax(0, 1fr) max-content;
  gap: var(--gap);
  min-block-size: 118px;
  padding: 15px var(--pad) 17px;
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 16px;
  transition: background-color .5s ease;
}

/* One date per day: later entries tuck under it behind a lighter, shorter rule. */
.entry.day-continues { border-bottom-color: transparent; }
.entry.same-day time { color: transparent; user-select: none; }

.entry.same-day::before {
  content: "";
  position: absolute;
  inset: -1px var(--pad) auto calc(var(--pad) + var(--date-col) + var(--gap));
  border-top: 1px solid color-mix(in srgb, var(--rule) 45%, transparent);
}

.entry:target { background: #f9d98055; }

.entry.is-new .entry-type::after {
  content: "New";
  margin-inline-start: .7em;
  padding: .12em .6em .1em;
  border-radius: 100vw;
  background: var(--forest);
  color: var(--gold);
  font-size: .86em;
}

.entry.is-entering { animation: arrive 1.6s ease-out both; }

@keyframes arrive {
  from { opacity: 0; translate: 0 -14px; background: var(--gold); }
  35% { opacity: 1; translate: 0; background: var(--gold); }
}

.entry time {
  padding-top: 4px;
  border-right: 1px solid var(--rule);
  color: var(--forest);
  font-family: var(--heading);
  font-size: 1.13rem;
  font-weight: 850;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.entry-type {
  color: var(--category-color);
  font-family: var(--heading);
  font-size: .89rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: .055em;
  text-transform: uppercase;
}

[data-type="news"] { --category-color: var(--news); }
[data-type="reaction"] { --category-color: var(--reaction); }
[data-type="zoo"] { --category-color: var(--zoo); }

.entry h3 {
  margin-top: 2px;
  color: #17201b;
  font-family: var(--heading);
  font-size: clamp(1.35rem, 2.02vw, 1.93rem);
  font-weight: 900;
  line-height: 1.03;
  letter-spacing: -.028em;
  word-spacing: .035em;
}

.entry article p:last-child {
  max-inline-size: 88ch;
  margin-top: 3px;
  font-size: 1.07rem;
  line-height: 1.42;
}

.source {
  display: inline-flex;
  align-self: start;
  align-items: center;
  justify-content: end;
  gap: .65rem;
  min-block-size: 32px;
  padding-inline: 2px;
  color: var(--forest);
  font-size: 1.04rem;
  font-weight: 600;
  text-decoration: none;
}

.source .icon { transition: translate .18s ease; }
.source:hover .icon { translate: 2px -2px; }
.source:hover, .footer a:hover { text-decoration: underline; }
.empty { padding: 24px 0; }

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .85rem 1.5rem;
  min-block-size: 62px;
  padding-block: 14px;
  color: var(--forest);
  font: .76rem/1.5 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.footer-home {
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  text-decoration: none;
}

.footer-home img { inline-size: 36px; block-size: auto; }
.footer p a { text-underline-offset: .19em; }
.footer .icon { vertical-align: -.14em; }

dialog {
  max-inline-size: min(28rem, calc(100% - 2rem));
  padding: 1.5rem;
  border: 1px solid var(--forest);
  border-radius: 16px;
  background: var(--paper);
  color: var(--forest);
}

dialog::backdrop { background: #112f2466; }
dialog h2 { font-size: 2rem; }
dialog label { display: block; margin-top: 1rem; }

dialog input {
  inline-size: 100%;
  margin-block: .25rem 1rem;
  padding: .55rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: #fffaf0;
  color: var(--forest);
  font: 1rem var(--body);
}

@media (max-width: 1050px) {
  .shell { inline-size: 91%; }
  .hero { min-block-size: 295px; }
  .stream-header { align-items: start; }
  .filters .pill { padding-inline: .85rem; font-size: 1rem; }
  .entry { --date-col: 86px; --gap: 23px; }
}

@media (max-width: 800px) {
  .stream-header { flex-direction: column; gap: 1rem; margin-bottom: 17px; }
  .entry { --gap: 14px; }
  .story { flex-direction: column; }
}

@media (max-width: 650px) {
  .shell { inline-size: calc(100% - 32px); }
  .masthead { min-block-size: 65px; margin-inline: 0; padding-inline: 0; gap: .6rem; }
  .wordmark { gap: 7px; font-size: clamp(1.23rem, 4.8vw, 1.75rem); }
  .wordmark-mark { inline-size: 36px; }
  .share-button { min-block-size: 44px; gap: .3rem; padding-inline: .61rem; font-size: .83rem; }
  .share-button .icon { inline-size: 1em; block-size: 1em; }
  .hero { grid-template-columns: 1fr; margin-top: 18px; border-radius: 16px; }
  .status-panel { padding: 20px 22px 22px; }
  .status-content h1 { margin-inline: -.035em; font-size: clamp(2.6rem, 23.5cqi, 6.4rem); }
  .status-question { font-size: clamp(.85rem, 4.7cqi, 1.2rem); }
  .status-summary { margin-inline-end: 0; font-size: clamp(1.06rem, 5.6cqi, 1.46rem); }
  .status-meta { margin-top: 16px; }
  .portrait { aspect-ratio: 1.9; }
  .stream { margin-top: 25px; }
  .stream-header p { max-inline-size: 33ch; }
  .filters { gap: 7px; }
  .filters .pill { padding-inline: .73rem; font-size: .91rem; }
  .timeline { margin-inline: 0; }
  .story { margin-inline: 0; padding-inline: 0; }
  .entry {
    --pad: 0px;
    --date-col: 54px;
    --gap: 13px;
    grid-template-columns: var(--date-col) minmax(0, 1fr);
    row-gap: 2px;
    padding: 13px 0 9px;
  }
  .entry time { grid-row: span 2; padding-top: 2px; font-size: .76rem; white-space: nowrap; }
  .entry-type { font-size: .74rem; }
  .entry article p:last-child { margin-top: 5px; font-size: 1rem; }
  .source { grid-column: 2; justify-content: start; justify-self: start; min-block-size: 36px; font-size: .92rem; }
  .footer { font-size: .68rem; }
}

@media (max-width: 350px) {
  .shell { inline-size: calc(100% - 24px); }
  .masthead { gap: .35rem; }
  .wordmark { gap: 5px; font-size: 1.08rem; }
  .wordmark-mark { inline-size: 32px; }
  .share-button { padding-inline: .34rem; font-size: .76rem; }
  .status-panel { padding-inline: 16px; }
  .filters .pill { padding-inline: .55rem; }
}

.confetti {
  position: fixed;
  inset: 0;
  z-index: 10;
  overflow: hidden;
  pointer-events: none;
}

.confetti span {
  position: absolute;
  inset: -6vh auto auto var(--x);
  inline-size: 10px;
  block-size: 16px;
  animation: fall var(--fall) cubic-bezier(.3, .2, .6, 1) var(--delay) both;
}

.confetti .confetti-treat {
  inline-size: auto;
  block-size: auto;
  font-size: 1.9rem;
  line-height: 1;
}

@keyframes fall {
  to { translate: var(--drift) 112vh; rotate: var(--spin); }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

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