:root {
  --ink: #14211b;
  --muted: #68736d;
  --paper: #f4f2eb;
  --card: #fbfaf6;
  --line: #d8d8cf;
  --green: #133f32;
  --lime: #c7ef5b;
  --orange: #f17c45;
  --blue: #5d7ee5;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "DM Sans", "Noto Sans SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 90% 3%, rgba(199, 239, 91, 0.22), transparent 20rem),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
}

.site-header,
main,
footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--lime);
  background: var(--green);
  font: 700 22px var(--serif);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
  letter-spacing: 0.08em;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.2em;
}

.header-meta {
  color: var(--muted);
  font-size: 13px;
}

.analyst-credit {
  margin-left: 14px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
}

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #43a467;
  box-shadow: 0 0 0 4px rgba(67, 164, 103, 0.12);
}

.hero {
  min-height: 380px;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  align-items: end;
  gap: 80px;
  padding: 74px 0 58px;
}

.eyebrow,
.aside-label {
  margin: 0 0 16px;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font: 400 clamp(50px, 7vw, 90px)/0.96 var(--serif);
  letter-spacing: -0.055em;
}

.hero h1 em {
  color: var(--green);
  font-weight: 400;
}

.hero-summary {
  padding-bottom: 8px;
}

.hero-summary > p {
  margin: 0 0 34px;
  color: #435048;
  font: 400 18px/1.72 var(--serif);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  color: var(--muted);
  font-size: 12px;
}

.hero-stats b {
  color: var(--ink);
  font-size: 16px;
}

.controls {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 15px 0;
  border-block: 1px solid var(--line);
  background: rgba(244, 242, 235, 0.9);
  backdrop-filter: blur(12px);
}

.filters {
  display: flex;
  gap: 7px;
  overflow-x: auto;
}

.control-groups {
  display: flex;
  align-items: center;
  gap: 22px;
}

.scope-filters {
  display: flex;
  gap: 5px;
  padding-right: 22px;
  border-right: 1px solid var(--line);
}

.scope-filter {
  padding: 9px 14px;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  font-size: 13px;
}

.scope-filter b {
  margin-left: 4px;
  color: #9ca39f;
  font-size: 10px;
}

.scope-filter.active {
  color: var(--ink);
  background: white;
  box-shadow: 0 3px 14px rgba(20, 33, 27, 0.08);
}

button {
  font: inherit;
}

.filter,
.reading-mode {
  border: 0;
  cursor: pointer;
  white-space: nowrap;
}

.filter {
  padding: 9px 15px;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
}

.filter.active {
  color: var(--lime);
  background: var(--green);
}

.reading-mode {
  color: var(--muted);
  background: transparent;
  font-size: 12px;
}

.briefing-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 54px;
  padding: 48px 0 90px;
}

.story {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 22px;
  padding: 0 0 46px;
  margin-bottom: 46px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: transform 180ms ease;
}

.story:hover {
  transform: translateX(5px);
}

.story:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 8px;
}

.story-number {
  color: #9da49f;
  font: 400 29px var(--serif);
}

.story-meta,
.story-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.story-meta {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.category {
  padding: 5px 9px;
  border-radius: 4px;
  color: var(--green);
  background: rgba(199, 239, 91, 0.55);
}

.importance::before {
  content: "•";
  margin-right: 8px;
}

.story-title {
  max-width: 780px;
  margin: 0 0 15px;
  font: 600 clamp(24px, 3.2vw, 37px)/1.18 var(--serif);
  letter-spacing: -0.025em;
}

.story-summary {
  margin: 0 0 22px;
  color: #4b5851;
  font-size: 15px;
  line-height: 1.75;
}

.why-it-matters {
  padding: 18px 20px;
  border-left: 3px solid var(--orange);
  background: rgba(255, 255, 255, 0.47);
}

.why-it-matters span {
  color: var(--orange);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.why-it-matters p {
  margin: 7px 0 0;
  font: 400 14px/1.62 var(--serif);
}

.story-footer {
  justify-content: space-between;
  margin-top: 18px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  color: var(--muted);
  font-size: 11px;
}

.tag::before {
  content: "#";
}

.source-link,
.analysis-button {
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.analysis-button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.analysis-dialog {
  width: min(920px, calc(100% - 28px));
  max-height: 90vh;
  padding: 0;
  border: 0;
  border-radius: 2px;
  color: var(--ink);
  background: var(--card);
  box-shadow: 0 30px 100px rgba(20, 33, 27, 0.28);
}

.analysis-dialog::backdrop {
  background: rgba(11, 25, 19, 0.72);
  backdrop-filter: blur(5px);
}

.dialog-scroll {
  max-height: 90vh;
  overflow-y: auto;
  padding: clamp(34px, 6vw, 70px);
}

.dialog-close {
  position: fixed;
  z-index: 2;
  margin: 18px 0 0 18px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: var(--paper);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.dialog-kicker {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dialog-analyst {
  margin-left: auto;
  color: var(--ink);
}

#dialog-category {
  color: var(--green);
}

.analysis-dialog h2 {
  max-width: 760px;
  margin: 0;
  font: 600 clamp(31px, 5vw, 52px)/1.08 var(--serif);
  letter-spacing: -0.035em;
}

.dialog-thesis {
  margin: 25px 0 38px;
  padding-left: 20px;
  border-left: 4px solid var(--lime);
  color: var(--green);
  font: 500 19px/1.6 var(--serif);
}

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

.analysis-grid section {
  min-height: 190px;
  padding: 25px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.analysis-grid h3 {
  margin: 0 0 12px;
  color: var(--orange);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.analysis-grid p,
.scenario-box p {
  margin: 0;
  color: #46524b;
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-line;
}

.analysis-grid .plain-language {
  background: rgba(199, 239, 91, 0.1);
}

.analysis-grid p::first-line {
  color: var(--ink);
}

.scenario-box {
  margin-top: 28px;
  padding: 25px;
  color: white;
  background: var(--green);
}

.scenario-box span {
  display: block;
  margin-bottom: 9px;
  color: var(--lime);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.scenario-box p {
  color: white;
}

.analysis-disclaimer {
  margin: 25px 0 12px;
  color: var(--muted);
  font-size: 10px;
}

aside {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.aside-card {
  padding: 27px;
  border: 1px solid var(--line);
  background: rgba(251, 250, 246, 0.7);
}

.aside-card:first-child {
  color: #f8f8f2;
  border: 0;
  background: var(--green);
}

.aside-card:first-child .aside-label {
  color: var(--lime);
}

.aside-card h2 {
  margin: 0 0 13px;
  font: 600 23px/1.25 var(--serif);
}

.aside-card p:last-child {
  margin-bottom: 0;
  color: inherit;
  font-size: 13px;
  line-height: 1.7;
  opacity: 0.83;
}

.framework ol {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
}

.framework li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.5;
}

.framework li span {
  color: var(--orange);
  font-size: 10px;
  font-weight: 700;
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 30px 0 46px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.empty-state {
  padding: 80px 20px;
  text-align: center;
  border: 1px dashed var(--line);
}

.empty-state h2 {
  font: 600 28px var(--serif);
}

.focus-mode aside,
.focus-mode .hero-summary,
.focus-mode .story-summary,
.focus-mode .tags {
  display: none;
}

.focus-mode .briefing-layout {
  display: block;
  max-width: 820px;
  margin: auto;
}

@media (max-width: 850px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .briefing-layout {
    grid-template-columns: 1fr;
  }

  aside {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .source-note {
    grid-column: 1 / -1;
  }

  .controls {
    align-items: flex-start;
  }

  .control-groups {
    display: block;
    overflow: hidden;
  }

  .scope-filters {
    margin-bottom: 9px;
    padding-right: 0;
    border-right: 0;
  }
}

@media (max-width: 560px) {
  .site-header,
  main,
  footer {
    width: min(100% - 28px, 1180px);
  }

  .hero {
    min-height: auto;
    padding: 56px 0 40px;
  }

  .hero h1 {
    font-size: 48px;
  }

  .header-meta,
  .reading-mode {
    display: none;
  }

  .story {
    grid-template-columns: 35px 1fr;
    gap: 10px;
  }

  .story-number {
    font-size: 22px;
  }

  aside {
    display: flex;
  }

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

  .analysis-grid section {
    min-height: auto;
  }

  .dialog-close {
    margin: 10px;
  }

  footer {
    display: block;
  }
}
