:root {
  color-scheme: light;
  --paper: #f4f0e8;
  --paper-deep: #e6e0d4;
  --ink: #171717;
  --muted: #6f6a60;
  --line: #242321;
  --acid: #d8f55b;
  --coral: #ff725e;
  --sky: #9ed9e4;
  --white: #fffdf7;
  --shadow: 7px 7px 0 var(--line);
}

:root[data-theme="night"] {
  color-scheme: dark;
  --paper: #1a1a19;
  --paper-deep: #292824;
  --ink: #f4f0e8;
  --muted: #b1aa9e;
  --line: #f4f0e8;
  --acid: #d8f55b;
  --coral: #ff806a;
  --sky: #87cbd7;
  --white: #242321;
  --shadow: 7px 7px 0 var(--line);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  transition: background-color 180ms ease, color 180ms ease;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}

.site-shell {
  overflow: hidden;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 12px;
  left: 12px;
  padding: 8px 12px;
  background: var(--acid);
  color: var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 72px;
  padding: 0 4vw;
  border-bottom: 1px solid var(--line);
}

.brand,
.footer-brand {
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.brand span {
  color: var(--coral);
}

.header-status,
.site-nav,
.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-status {
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 0.68rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--coral) 20%, transparent);
}

.header-date {
  border-left: 1px solid var(--paper-deep);
  padding-left: 18px;
}

.site-nav {
  justify-content: flex-end;
  font-size: 0.85rem;
  font-weight: 700;
}

.site-nav a,
.footer-links a {
  border-bottom: 1px solid transparent;
}

.site-nav a:hover,
.footer-links a:hover {
  border-color: currentColor;
}

.icon-button {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
}

.icon-button:hover {
  background: var(--ink);
  color: var(--paper);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  min-height: 630px;
  border-bottom: 1px solid var(--line);
  background: var(--acid);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 630px;
  padding: 6.5vw 5vw 2.8vw;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--ink);
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  font-weight: 900;
  letter-spacing: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 36px;
  font-size: 10rem;
  line-height: 0.84;
  text-transform: uppercase;
}

h1 em,
.join-copy h2 em {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: lowercase;
}

.hero-deck {
  max-width: 480px;
  margin-bottom: 30px;
  font-size: 1.08rem;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0 18px;
  font-weight: 800;
  line-height: 1;
  transition: transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.button-dark {
  background: var(--ink);
  color: var(--paper);
}

.button:hover,
.text-button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 3px 3px 0 var(--line);
}

.text-button {
  min-height: auto;
  border: 0;
  padding: 10px 0;
  background: transparent;
  color: var(--ink);
}

.text-button span {
  font-size: 1.2rem;
}

.hero-footnote {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 60px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  font-family: "Courier New", monospace;
  font-size: 0.62rem;
  font-weight: 700;
}

.hero-poster {
  position: relative;
  min-height: 630px;
  margin: 24px 24px 24px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--ink);
  color: var(--acid);
  box-shadow: var(--shadow);
}

.poster-topline,
.poster-footer {
  position: absolute;
  z-index: 2;
  right: 24px;
  left: 24px;
  display: flex;
  justify-content: space-between;
  font-family: "Courier New", monospace;
  font-size: 0.68rem;
  font-weight: 700;
}

.poster-topline {
  top: 22px;
}

.poster-footer {
  bottom: 22px;
  color: var(--paper);
}

.poster-grid {
  position: absolute;
  top: 16%;
  right: 15%;
  bottom: 16%;
  left: 15%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--acid);
}

.poster-grid span {
  border-left: 1px solid var(--acid);
}

.poster-grid span:first-child {
  border-left: 0;
}

.poster-copy {
  position: absolute;
  top: 50%;
  right: 12%;
  left: 12%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateY(-54%);
}

.poster-copy strong {
  display: block;
  color: var(--coral);
  font-family: Arial Black, Arial, sans-serif;
  font-size: 19rem;
  line-height: 0.7;
}

.poster-small {
  align-self: flex-start;
  padding-top: 12px;
  color: var(--paper);
  font-family: "Courier New", monospace;
  font-size: 0.75rem;
  font-weight: 700;
}

.poster-small-right {
  align-self: flex-end;
  padding-bottom: 6px;
  text-align: right;
}

.poster-stamp {
  position: absolute;
  right: 13%;
  bottom: 22%;
  border: 2px solid var(--coral);
  padding: 8px 11px;
  color: var(--coral);
  font-family: "Courier New", monospace;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.1;
  transform: rotate(-8deg);
}

.ticker {
  display: flex;
  min-height: 50px;
  border-bottom: 1px solid var(--line);
  background: var(--coral);
  color: var(--ink);
  font-family: "Courier New", monospace;
  font-size: 0.73rem;
  font-weight: 700;
  overflow: hidden;
}

.ticker-label {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  padding: 0 22px;
  border-right: 1px solid var(--line);
  background: var(--paper);
}

.ticker-line {
  display: flex;
  align-items: center;
  gap: 22px;
  min-width: max-content;
  padding: 0 22px;
  animation: ticker-scroll 24s linear infinite;
}

.ticker-line i {
  font-style: normal;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-24%); }
}

.signal-bar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  padding: 72px 5vw 58px;
  border-bottom: 1px solid var(--line);
}

.signal-bar h2,
.filter-panel h2,
.feed-heading h2 {
  margin-bottom: 0;
  font-size: 3.2rem;
  line-height: 0.95;
}

.signal-metrics {
  display: flex;
  gap: 34px;
}

.metric {
  display: grid;
  gap: 4px;
  min-width: 110px;
  border-left: 1px solid var(--line);
  padding-left: 16px;
}

.metric strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.5rem;
  font-weight: 400;
  line-height: 0.9;
}

.metric span {
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 0.63rem;
  text-transform: uppercase;
}

.content-section {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 7vw;
  padding: 80px 5vw 100px;
}

.filter-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 530px;
}

.filter-panel h2 {
  font-size: 2.3rem;
}

.filter-list {
  display: grid;
  margin-top: 52px;
  border-top: 1px solid var(--line);
}

.filter-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 43px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0 10px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.filter-button span {
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 0.7rem;
}

.filter-button:hover,
.filter-button.is-active {
  background: var(--acid);
  color: var(--ink);
}

.filter-note {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.filter-note p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.note-mark {
  color: var(--coral);
  font-size: 1.7rem;
  line-height: 0.8;
}

.feed-panel {
  min-width: 0;
}

.feed-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
}

.feed-heading h2 {
  font-size: 3.8rem;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  width: min(100%, 220px);
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
  color: var(--muted);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.85rem;
}

.search-box input::placeholder {
  color: var(--muted);
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.story-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--white);
  animation: card-in 360ms ease both;
}

.story-card:nth-child(2) { animation-delay: 50ms; }
.story-card:nth-child(3) { animation-delay: 100ms; }
.story-card:nth-child(4) { animation-delay: 150ms; }
.story-card:nth-child(5) { animation-delay: 200ms; }
.story-card:nth-child(6) { animation-delay: 250ms; }

@keyframes card-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.story-media {
  position: relative;
  aspect-ratio: 1.65;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--paper-deep);
}

.story-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.03);
  transition: transform 500ms ease, filter 500ms ease;
}

.story-card:hover .story-media img {
  filter: saturate(1) contrast(1.05);
  transform: scale(1.04);
}

.story-index {
  position: absolute;
  top: 12px;
  left: 12px;
  min-width: 30px;
  padding: 4px 6px;
  background: var(--acid);
  color: var(--ink);
  font-family: "Courier New", monospace;
  font-size: 0.7rem;
  font-weight: 700;
  text-align: center;
}

.story-tone {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 12px;
  height: 12px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--coral);
}

.tone-sky .story-tone { background: var(--sky); }
.tone-ink .story-tone { background: var(--ink); }
.tone-acid .story-tone { background: var(--acid); }

.story-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px 18px 15px;
}

.story-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 17px;
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
}

.story-title {
  margin-bottom: 11px;
  font-size: 1.35rem;
  line-height: 1.05;
}

.story-excerpt {
  flex: 1;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.88rem;
}

.story-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--paper-deep);
  padding-top: 12px;
}

.story-link,
.save-button {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 700;
}

.story-link {
  padding: 0;
}

.story-link:hover {
  color: var(--coral);
}

.save-button {
  width: 32px;
  height: 28px;
  border-left: 1px solid var(--paper-deep);
  color: var(--muted);
  font-size: 1.05rem;
}

.save-button:hover,
.save-button.is-saved {
  color: var(--coral);
}

.save-button.is-saved::first-letter {
  color: var(--coral);
}

.empty-state {
  border: 1px dashed var(--muted);
  padding: 22px;
  color: var(--muted);
}

.join-section {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) minmax(300px, 0.8fr);
  gap: 34px;
  align-items: end;
  border-block: 1px solid var(--line);
  padding: 70px 5vw 74px;
  background: var(--sky);
  color: var(--ink);
}

.join-mark {
  font-family: "Courier New", monospace;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.05;
}

.join-copy h2 {
  margin-bottom: 0;
  font-size: 4.8rem;
  line-height: 0.88;
}

.join-form {
  justify-self: end;
  width: min(100%, 460px);
}

.join-form label {
  display: block;
  margin-bottom: 10px;
  font-family: "Courier New", monospace;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.input-row {
  display: flex;
  border-bottom: 1px solid var(--line);
}

.input-row input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.input-row input::placeholder {
  color: color-mix(in srgb, var(--ink) 62%, transparent);
}

.form-status {
  min-height: 24px;
  margin: 12px 0 0;
  font-size: 0.78rem;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  align-items: center;
  padding: 28px 5vw;
  background: var(--ink);
  color: var(--paper);
}

.footer-brand span {
  margin-left: 4px;
  color: var(--coral);
  font-size: 0.55rem;
  vertical-align: top;
}

.site-footer p,
.footer-links {
  margin-bottom: 0;
  color: var(--muted);
  font-family: "Courier New", monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
}

.footer-links {
  justify-content: flex-end;
}

.toast {
  position: fixed;
  z-index: 15;
  right: 18px;
  bottom: 18px;
  max-width: min(360px, calc(100vw - 36px));
  border: 1px solid var(--line);
  padding: 12px 15px;
  background: var(--acid);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1050px) {
  h1 {
    font-size: 7.4rem;
  }

  .hero,
  .content-section {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.78fr);
  }

  .content-section {
    gap: 4vw;
  }

  .join-section {
    grid-template-columns: 50px minmax(0, 1fr) minmax(280px, 0.8fr);
  }
}

@media (max-width: 800px) {
  .site-header {
    grid-template-columns: 1fr auto;
    min-height: 64px;
  }

  .header-status {
    display: none;
  }

  .site-nav {
    gap: 12px;
  }

  .hero {
    display: block;
  }

  .hero-copy {
    min-height: 0;
    padding: 66px 6vw 38px;
  }

  .hero-poster {
    min-height: 500px;
    margin: 0 6vw 42px;
  }

  .poster-copy strong {
    font-size: 14rem;
  }

  .signal-bar {
    display: block;
    padding: 58px 6vw 45px;
  }

  .signal-metrics {
    margin-top: 38px;
  }

  .content-section {
    display: block;
    padding: 60px 6vw 74px;
  }

  .filter-panel {
    display: block;
    min-height: 0;
    margin-bottom: 62px;
  }

  .filter-list {
    grid-template-columns: repeat(3, 1fr);
    margin-top: 30px;
  }

  .filter-note {
    margin-top: 30px;
  }

  .join-section {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 22px;
    padding: 56px 6vw 62px;
  }

  .join-form {
    grid-column: 2;
    justify-self: stretch;
    width: 100%;
  }

  .site-footer {
    grid-template-columns: 1fr 1fr;
    padding: 26px 6vw;
  }

  .site-footer p {
    display: none;
  }
}

@media (max-width: 560px) {
  h1 {
    margin-bottom: 28px;
    font-size: 4.9rem;
  }

  .hero-deck {
    font-size: 0.98rem;
  }

  .hero-footnote {
    display: grid;
    gap: 6px;
    margin-top: 44px;
  }

  .hero-poster {
    min-height: 430px;
  }

  .poster-copy strong {
    font-size: 10rem;
  }

  .poster-stamp {
    right: 10%;
    bottom: 18%;
  }

  .ticker-label {
    padding: 0 14px;
    font-size: 0.62rem;
  }

  .ticker-line {
    gap: 14px;
    padding: 0 14px;
    font-size: 0.62rem;
  }

  .signal-bar h2,
  .filter-panel h2,
  .feed-heading h2 {
    font-size: 2.45rem;
  }

  .signal-metrics {
    gap: 12px;
  }

  .metric {
    min-width: 0;
    padding-left: 10px;
  }

  .metric strong {
    font-size: 2rem;
  }

  .metric span {
    font-size: 0.54rem;
  }

  .filter-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .feed-heading {
    display: block;
  }

  .search-box {
    width: 100%;
    margin-top: 22px;
  }

  .story-grid {
    grid-template-columns: 1fr;
  }

  .join-section {
    grid-template-columns: 28px minmax(0, 1fr);
    padding-inline: 6vw;
  }

  .join-copy h2 {
    font-size: 3.35rem;
  }

  .join-form {
    grid-column: 2;
  }

  .input-row {
    display: grid;
    gap: 12px;
    border-bottom: 0;
  }

  .input-row input {
    min-height: 42px;
    border-bottom: 1px solid var(--line);
  }

  .input-row .button {
    justify-self: start;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .footer-links {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
