:root {
  --paper: #0d0f0f;
  --ink: #f3f0e8;
  --muted: #9a9c96;
  --faint: #222625;
  --line: #343938;
  --acid: #d9ff57;
  --orange: #ff7448;
  --max-width: 1220px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 84% 12%, rgba(217, 255, 87, 0.07), transparent 25rem),
    var(--paper);
}

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

.shell {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
}

.masthead {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--paper);
  background: var(--acid);
  letter-spacing: -0.08em;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
}

.status-dot.is-live {
  background: var(--acid);
  box-shadow: 0 0 12px rgba(217, 255, 87, 0.75);
}

.status-dot.is-error { background: var(--orange); }
.rule { width: 26px; height: 1px; background: var(--line); }

.hero {
  position: relative;
  padding: clamp(68px, 10vw, 132px) 0 60px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 26px;
  color: var(--acid);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
}

h1 {
  max-width: 900px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(58px, 10vw, 132px);
  font-weight: 400;
  letter-spacing: -0.065em;
  line-height: 0.8;
}

h1 em {
  color: var(--acid);
  font-weight: 400;
}

.dek {
  max-width: 580px;
  margin: 44px 0 0 auto;
  color: #c2c3bd;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(18px, 2vw, 25px);
  line-height: 1.45;
}

.hero-stats {
  display: flex;
  gap: clamp(28px, 5vw, 72px);
  margin-top: 58px;
}

.hero-stats div { display: grid; gap: 3px; }
.hero-stats strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  font-weight: 400;
}
.hero-stats span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.toolbar {
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 0;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.filters {
  display: flex;
  gap: 8px;
  width: 100%;
  padding-top: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }

.filter, .refresh-button, .view-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.filter:hover, .refresh-button:hover { color: var(--ink); border-color: #686d6b; }
.filter.is-active { color: var(--paper); border-color: var(--acid); background: var(--acid); }

.toolbar-actions {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--faint);
}
.view-switcher { display: flex; }
.view-button {
  padding-inline: 11px;
  background: #111414;
}
.view-button + .view-button { border-left: 0; }
.view-button:hover { color: var(--ink); }
.view-button.is-active {
  color: var(--paper);
  border-color: var(--ink);
  background: var(--ink);
}
.search input {
  width: min(28vw, 250px);
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  outline: none;
  color: var(--ink);
  background: #111414;
}
.search input:focus { border-color: var(--acid); }
.refresh-button span { display: inline-block; margin-right: 4px; font-size: 15px; }
.refresh-button.is-loading span { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.feed { padding: 54px 0 100px; }
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.section-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  font-weight: 400;
}
.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.notice {
  margin-bottom: 20px;
  padding: 14px 16px;
  border-left: 3px solid var(--orange);
  color: #d7d5ce;
  background: rgba(255, 116, 72, 0.08);
  font-size: 13px;
  line-height: 1.5;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.digest-list {
  border-top: 1px solid var(--line);
}

.digest-group {
  display: grid;
  grid-template-columns: minmax(170px, 0.28fr) 1fr;
  gap: clamp(22px, 5vw, 70px);
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.digest-source {
  margin: 2px 0 0;
  color: var(--acid);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.digest-source span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.digest-items {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.digest-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid rgba(52, 57, 56, 0.55);
}
.digest-item:last-child { border-bottom: 0; }
.digest-bullet { color: var(--acid); }
.digest-link {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(17px, 1.8vw, 22px);
  line-height: 1.25;
  text-decoration: none;
}
.digest-link:hover, .digest-link:focus-visible { color: var(--acid); }
.digest-meta {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}
.digest-gifts { display: inline-flex; gap: 5px; }
.digest-gift { color: var(--acid); text-decoration: none; }
.digest-gift:hover { text-decoration: underline; }
.digest-post { color: inherit; text-decoration: none; }
.digest-post:hover { color: var(--ink); }

.article-card {
  min-height: 315px;
  display: flex;
  flex-direction: column;
  padding: 30px 30px 26px 0;
  border-bottom: 1px solid var(--line);
}
.article-card:nth-child(odd) { border-right: 1px solid var(--line); }
.article-card:nth-child(even) { padding-left: 30px; }

.card-topline, .card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.outlet {
  color: var(--acid);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.article-card time, .share-badge {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}
.article-card h3 {
  margin: 25px 0 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(25px, 3vw, 37px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.08;
}
.article-link {
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: color 140ms ease, text-decoration-color 140ms ease;
}
.article-link:hover, .article-link:focus-visible {
  color: var(--acid);
  text-decoration-color: var(--acid);
}
.description {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.gift-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: -10px 0 22px;
}
.gift-option {
  padding: 5px 8px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}
.gift-option:hover, .gift-option:focus-visible {
  color: var(--paper);
  border-color: var(--acid);
  background: var(--acid);
}
.card-footer { margin-top: auto; }
.source-post {
  color: #d2d3cd;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}
.source-post:hover { color: var(--acid); }

.empty-state {
  padding: 100px 20px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.empty-state h3 {
  margin: 10px 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 400;
}
.empty-state p { color: var(--muted); }
.empty-symbol { color: var(--acid) !important; font-size: 40px; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 28px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
footer p { max-width: 430px; margin: 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: 760px) {
  .shell { width: min(calc(100% - 28px), var(--max-width)); }
  .masthead { min-height: 64px; }
  .header-meta .rule, .header-meta span:last-child { display: none; }
  .hero { padding-top: 72px; }
  h1 { font-size: clamp(54px, 18vw, 92px); line-height: 0.86; }
  .dek { margin-left: 0; }
  .hero-stats { justify-content: space-between; gap: 14px; }
  .toolbar-actions { width: 100%; }
  .view-switcher { flex: 0 0 auto; }
  .search { flex: 1; }
  .search input { width: 100%; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .article-grid { grid-template-columns: 1fr; }
  .article-card, .article-card:nth-child(even) {
    min-height: 280px;
    padding: 28px 0;
    border-right: 0;
  }
  .digest-group { grid-template-columns: 1fr; gap: 12px; }
  .digest-item { grid-template-columns: 10px minmax(0, 1fr); }
  .digest-meta { grid-column: 2; }
  footer { flex-direction: column; }
}

@media (max-width: 520px) {
  .toolbar-actions { flex-wrap: wrap; }
  .view-switcher { order: 2; }
  .refresh-button { order: 3; margin-left: auto; }
  .search { flex-basis: 100%; order: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
