:root {
  color-scheme: light;
  --bg: #f4f5f2;
  --panel: #ffffff;
  --panel-soft: #eef3f1;
  --ink: #17202a;
  --muted: #64707d;
  --line: #d6ddd9;
  --blue: #185a9d;
  --green: #176c56;
  --amber: #976719;
  --red: #aa3f3f;
  --violet: #5d4b8c;
  --shadow: 0 10px 26px rgba(23, 32, 42, 0.08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
header, main, footer {
  max-width: 1220px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}
header {
  min-height: 250px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: end;
  padding-top: 46px;
  padding-bottom: 24px;
}
h1 {
  margin: 0;
  font-size: 58px;
  line-height: 1;
  letter-spacing: 0;
}
h2 { margin: 0; font-size: 22px; letter-spacing: 0; }
h3 { margin: 0; letter-spacing: 0; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.subtitle {
  max-width: 760px;
  margin: 16px 0 0;
  color: #374353;
  font-size: 19px;
}
.run-meta {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  display: grid;
  gap: 6px;
  align-self: end;
  box-shadow: var(--shadow);
}
.run-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.run-meta strong { font-size: 24px; }
.run-meta label {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.run-meta span { color: var(--muted); font-size: 13px; }
.home-link {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  color: var(--ink);
  text-decoration: none;
  flex: 0 0 34px;
}
.home-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.history-select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  padding: 0 10px;
}
.history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.history-actions a {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 9px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.history-actions a.is-disabled {
  color: #9aa4af;
  pointer-events: none;
}
.lane-nav {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 0;
  background: rgba(244, 245, 242, 0.94);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.lane-nav a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 24px;
}
.metrics div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}
.metrics strong {
  display: block;
  font-size: 30px;
  line-height: 1;
}
.metrics span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}
.brief-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(240px, 0.8fr) minmax(240px, 0.8fr);
  gap: 14px;
  padding: 0;
  border: 0;
  margin-bottom: 28px;
}
.brief-panel div {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}
.brief-panel h2 { font-size: 18px; }
.brief-panel p {
  margin: 8px 0 0;
  color: #374353;
}
.source-mix {
  display: grid;
  gap: 7px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.source-mix li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #374353;
  font-size: 14px;
}
.source-mix strong {
  min-width: 28px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--green);
  text-align: center;
}
.muted-note {
  margin: 8px 0 0;
  color: var(--muted);
}
section {
  padding: 28px 0 8px;
  border-top: 1px solid var(--line);
}
.folded-section {
  padding: 28px 0 8px;
  border-top: 1px solid var(--line);
}
.folded-section summary {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  list-style: none;
  cursor: pointer;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: 0 1px 0 rgba(23, 32, 42, 0.03);
}
.folded-section summary::-webkit-details-marker {
  display: none;
}
.folded-section summary::after {
  content: "Open";
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 13px;
  font-weight: 750;
}
.folded-section[open] summary {
  margin-bottom: 14px;
}
.folded-section[open] summary::after {
  content: "Hide";
}
.folded-section summary span {
  font-size: 22px;
  font-weight: 700;
}
.folded-section summary small {
  color: var(--muted);
  font-size: 14px;
}
.section-heading {
  display: flex;
  gap: 18px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.section-heading p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.item-list {
  display: grid;
  gap: 12px;
}
.focus-list { gap: 14px; }
.item-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  padding: 16px 18px 16px 14px;
  box-shadow: 0 1px 0 rgba(23, 32, 42, 0.03);
}
.item-card.item-adjacent { border-left-color: var(--amber); }
.item-card.item-negative { border-left-color: var(--red); }
.item-card.is-seen { opacity: 0.72; }
.item-card.is-queued {
  border-right: 4px solid var(--violet);
  box-shadow: var(--shadow);
}
.item-rank {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e7ede9;
  color: var(--green);
  font-weight: 800;
}
.item-card h3 {
  margin-top: 8px;
  font-size: 19px;
  line-height: 1.25;
}
.item-card p {
  margin: 8px 0 0;
}
.authors {
  color: var(--muted);
  font-size: 14px;
}
.item-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.pill {
  color: #ffffff;
  background: var(--green);
  border-radius: 999px;
  padding: 1px 8px 2px;
  font-weight: 700;
}
.item-adjacent .pill { background: var(--amber); }
.item-negative .pill { background: var(--red); }
.digest {
  color: #283546;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.reader-notes {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 12px;
  background: #f7f8fa;
  border: 1px solid #e2e7ee;
  border-radius: 8px;
}
.reader-notes p {
  margin: 0;
  color: #384454;
  font-size: 14px;
}
.reader-notes strong {
  color: var(--ink);
  margin-right: 6px;
}
.signals {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.signals span {
  background: #edf1f6;
  border: 1px solid #dce3ec;
  border-radius: 999px;
  color: #384454;
  font-size: 12px;
  padding: 2px 8px;
}
.item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.item-actions a,
.item-actions button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  padding: 0 11px;
  text-decoration: none;
}
.item-actions button.is-active {
  background: #ece7f7;
  border-color: #b8abd6;
  color: #3f2f6d;
}
.empty-state {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  padding: 18px;
}
.warnings {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0;
  padding: 16px 16px 16px 34px;
}
footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  padding-top: 30px;
  padding-bottom: 44px;
}
@media (max-width: 760px) {
  header, main, footer {
    padding-left: 16px;
    padding-right: 16px;
  }
  header {
    min-height: 220px;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: start;
  }
  h1 { font-size: 42px; }
  .run-meta { max-width: 100%; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brief-panel { grid-template-columns: 1fr; }
  .section-heading {
    display: block;
  }
  .section-heading p { margin-top: 6px; }
  .folded-section summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }
  .folded-section summary small {
    grid-column: 1 / -1;
  }
  .item-card {
    grid-template-columns: 1fr;
    padding: 14px;
  }
  .item-rank {
    width: 30px;
    height: 30px;
  }
  .reader-notes p {
    font-size: 13px;
  }
  .reader-notes p:nth-child(3),
  .signals {
    display: none;
  }
}
