:root {
  --ink: #161a1f;
  --muted: #5d6874;
  --line: #d8dee6;
  --soft: #f2f5f7;
  --paper: #ffffff;
  --accent: #b51f32;
  --accent-dark: #7c1422;
  --blue: #174b7a;
  --green: #2c6b52;
  --gold: #9a6416;
  --shadow: 0 18px 40px rgba(30, 39, 52, .09);
}

:root.dark-mode {
  --ink: #eef3f6;
  --muted: #aeb9c3;
  --line: #34414d;
  --soft: #1c2730;
  --paper: #121a21;
  --accent: #e25c6b;
  --accent-dark: #ff9aa4;
  --blue: #9cc9ef;
  --green: #87d7b2;
  --gold: #f2bf71;
  --shadow: 0 18px 40px rgba(0, 0, 0, .28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f7f8f8;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root.dark-mode body {
  background: #0c1116;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

:root.dark-mode .site-header {
  background: rgba(18, 26, 33, .96);
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 24px 14px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: var(--ink);
  border-radius: 6px;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
}

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

.brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  line-height: 1;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.header-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 13px;
}

.header-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff;
}

.header-meta a,
.header-action {
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.header-meta a:hover,
.header-action:hover,
.site-footer a:hover {
  color: var(--accent);
  border-color: #cfa2a9;
}

:root.dark-mode .header-meta span,
:root.dark-mode .header-meta a,
:root.dark-mode .header-action,
:root.dark-mode .category-button {
  background: #121a21;
}

.category-nav {
  display: flex;
  gap: 6px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 14px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.category-button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #2d3742;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.category-button:hover,
.category-button:focus-visible {
  border-color: #9ca9b7;
  outline: none;
}

.category-button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 56px;
}

.lead-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr);
  gap: 18px;
  align-items: stretch;
}

.lead-story,
.briefing-panel,
.news-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.lead-story {
  min-height: 420px;
  display: grid;
  grid-template-columns: minmax(260px, .95fr) minmax(0, 1.05fr);
}

.lead-story img {
  height: 100%;
  object-fit: cover;
}

.lead-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 16px;
  padding: 28px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--soft);
  color: #33404d;
  font-size: 12px;
  font-weight: 700;
}

.tag.category {
  background: #f7e8ea;
  color: var(--accent-dark);
}

.tag.special {
  background: var(--accent);
  color: #fff;
}

.tag.source {
  background: #eaf1f7;
  color: var(--blue);
}

:root.dark-mode .tag.category,
:root.dark-mode .tag.source {
  background: #1c2730;
}

:root.dark-mode .tag.special {
  background: var(--accent-dark);
  color: #121a21;
}

.lead-copy h2,
.news-card h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: 0;
}

.lead-copy h2 {
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.lead-copy p,
.news-card p {
  margin: 0;
  color: #3e4955;
  line-height: 1.55;
}

:root.dark-mode .lead-copy p,
:root.dark-mode .news-card p,
:root.dark-mode .legal-card p,
:root.dark-mode .article-text p,
:root.dark-mode .article-section p,
:root.dark-mode .source-list {
  color: #ccd5dc;
}

.story-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.briefing-panel {
  padding: 22px;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.panel-title span {
  color: var(--muted);
}

.panel-title strong {
  color: var(--green);
}

.source-meter {
  display: grid;
  gap: 16px;
  margin: 18px 0 0;
}

.source-meter div {
  display: grid;
  gap: 5px;
}

.source-meter dt {
  color: var(--ink);
  font-weight: 800;
}

.source-meter dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 34px 0 16px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.section-head h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
  letter-spacing: 0;
}

.story-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 14px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.news-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.news-card img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.news-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 17px;
}

.news-card h3 {
  font-size: 22px;
  line-height: 1.12;
}

.confidence {
  margin-top: auto;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
}

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

.parameter-row span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f4f6f7;
  color: #536170;
  font-size: 12px;
  font-weight: 700;
}

.site-footer {
  display: flex;
  justify-content: center;
  gap: 12px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 24px 44px;
  border-top: 1px solid var(--line);
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 7px 10px;
}

.legal-page {
  max-width: 860px;
}

.legal-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(22px, 4vw, 42px);
  box-shadow: var(--shadow);
}

.legal-card h1,
.legal-card h2 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

.legal-card h1 {
  margin: 0 0 26px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1;
}

.legal-card section {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.legal-card section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.legal-card h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.legal-card p {
  margin: 0 0 12px;
  color: #3e4955;
  line-height: 1.6;
}

.legal-card p:last-child {
  margin-bottom: 0;
}

.notice {
  padding: 12px 14px;
  background: #fff8e8;
  border: 1px solid #ead7a2;
  border-radius: 8px;
}

:root.dark-mode .notice,
:root.dark-mode .parameter-grid span,
:root.dark-mode .parameter-row span,
:root.dark-mode .share-box,
:root.dark-mode .article-params div,
:root.dark-mode .empty-state {
  background: #1c2730;
}

.email-image {
  width: min(100%, 237px);
  height: auto;
  border-radius: 8px;
  vertical-align: middle;
}

.email-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.parameter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.parameter-grid span {
  padding: 12px 13px;
  background: #f4f6f7;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #2d3742;
  font-weight: 800;
}

.story-link {
  color: inherit;
  text-decoration: none;
}

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

.news-card > a {
  color: inherit;
  text-decoration: none;
}

.article-page {
  max-width: 980px;
}

.article-shell {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.article-hero img {
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

.article-body {
  padding: clamp(22px, 5vw, 52px);
}

.article-body h1 {
  margin: 18px 0 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(36px, 6vw, 62px);
  line-height: 1;
  letter-spacing: 0;
}

.article-summary {
  margin: 0 0 16px;
  color: #3e4955;
  font-size: 19px;
  line-height: 1.55;
}

.share-box {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  padding: 14px;
  background: #f4f6f7;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.share-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.share-button:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.share-status {
  color: var(--green);
  font-weight: 800;
}

.article-text {
  display: grid;
  gap: 16px;
  margin: 24px 0;
}

.article-text p,
.article-section p {
  margin: 0;
  color: #2f3a45;
  font-size: 18px;
  line-height: 1.72;
}

.article-section {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.article-section h2 {
  margin: 0 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  letter-spacing: 0;
}

.critical-review {
  margin: 26px 0 0;
  padding: 22px;
  background: #fff8ea;
  border: 1px solid #ead7aa;
  border-radius: 8px;
}

:root.dark-mode .critical-review {
  background: #2a2518;
  border-color: #5c4a24;
}

.critical-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding-left: 20px;
  color: #2f3a45;
  font-size: 17px;
  line-height: 1.62;
}

:root.dark-mode .critical-list {
  color: #d6dde4;
}

.source-list {
  margin: 14px 0 0;
  padding-left: 20px;
  color: #2f3a45;
  line-height: 1.7;
}

.source-link {
  display: inline-flex;
  margin-top: 12px;
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.source-link:hover {
  text-decoration: underline;
}

.source-url-text {
  overflow-wrap: anywhere;
  font-weight: 700;
}

.article-params {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin: 0;
}

.article-params div {
  padding: 12px;
  background: #f4f6f7;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.article-params dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.article-params dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-weight: 800;
}

.empty-state {
  grid-column: 1 / -1;
  margin: 0;
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 26px 0 0;
}

.page-button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.page-button:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.page-button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.page-current {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: var(--muted);
  font-weight: 800;
}

@media (max-width: 860px) {
  .masthead {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .header-meta {
    justify-content: flex-start;
  }

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

  .lead-story {
    min-height: 0;
  }

  .lead-story img {
    aspect-ratio: 16 / 9;
    height: auto;
  }

  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  main,
  .masthead,
  .category-nav {
    padding-left: 16px;
    padding-right: 16px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .lead-copy {
    padding: 22px;
  }

  .brand strong {
    font-size: 23px;
  }
}
