:root {
  color-scheme: light dark;
  --bg: #f3f5f2;
  --surface: #ffffff;
  --surface-strong: #e7ebe5;
  --text: #17211c;
  --muted: #5b6861;
  --line: #ccd4ce;
  --accent: #146c4a;
  --accent-strong: #0b5237;
  --accent-soft: #dcece3;
  --warning: #9b4d12;
  --warning-soft: #fff0dc;
  --danger: #9b2c2c;
  --shadow: 0 18px 44px rgb(20 44 32 / 8%);
  --radius: 18px;
  --max-width: 1180px;
}

[data-theme="dark"] {
  --bg: #111713;
  --surface: #18211c;
  --surface-strong: #222e27;
  --text: #edf4ef;
  --muted: #a7b7ad;
  --line: #34443a;
  --accent: #6fd1a2;
  --accent-strong: #91e2b9;
  --accent-soft: #203d2f;
  --warning: #ffc27b;
  --warning-soft: #4a3018;
  --danger: #ff9b9b;
  --shadow: 0 18px 44px rgb(0 0 0 / 24%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 92% 0, rgb(20 108 74 / 9%), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui,
    sans-serif;
  font-size: 16px;
  line-height: 1.72;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent-strong);
}

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

button,
.button {
  min-height: 44px;
}

code {
  overflow-wrap: anywhere;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.86em;
}

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

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--text);
  color: var(--bg);
  transform: translateY(-180%);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgb(128 145 135 / 25%);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
}

.site-header .shell {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
}

.site-header nav a {
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
}

.site-header nav a:hover {
  color: var(--text);
}

.theme-toggle {
  width: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
}

.hero,
.report-header {
  padding: clamp(72px, 11vw, 142px) 0 clamp(42px, 7vw, 84px);
}

.hero {
  max-width: 910px;
}

.company-home {
  padding-bottom: clamp(48px, 8vw, 96px);
}

.company-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: clamp(32px, 7vw, 100px);
  align-items: center;
  padding: clamp(76px, 12vw, 156px) 0 clamp(58px, 9vw, 112px);
}

.company-hero h1 {
  font-size: clamp(3.1rem, 7vw, 6.7rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.home-mark {
  width: min(100%, 390px);
  justify-self: end;
  color: var(--text);
}

.home-mark svg {
  display: block;
  width: 100%;
}

.mark-ring,
.mark-handle,
.mark-signal {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mark-ring,
.mark-handle {
  stroke: currentColor;
  stroke-width: 14;
}

.mark-signal {
  stroke: var(--accent);
  stroke-width: 10;
}

.mark-node {
  fill: var(--accent);
}

.home-proof {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: clamp(78px, 11vw, 140px);
  border-block: 1px solid var(--line);
}

.home-proof div {
  padding: 22px 18px;
  border-right: 1px solid var(--line);
}

.home-proof div:last-child {
  border-right: 0;
}

.home-proof strong,
.home-proof span {
  display: block;
}

.home-proof strong {
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 0.92rem;
}

.home-proof span {
  color: var(--muted);
  font-size: 0.8rem;
}

.home-section {
  margin-bottom: clamp(88px, 13vw, 164px);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 38px;
}

.section-heading > p:last-child {
  color: var(--muted);
  font-size: 1.04rem;
}

.problem-grid,
.process-grid,
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.problem-grid article,
.process-grid li {
  padding-top: 22px;
  border-top: 2px solid var(--text);
}

.problem-grid article > span,
.process-grid li > span {
  display: block;
  margin-bottom: 28px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
}

.problem-grid p,
.process-grid p,
.product-card p {
  color: var(--muted);
}

.process-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.product-card {
  min-height: 310px;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.product-card.featured {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.product-card h3 {
  margin-top: 38px;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
}

.product-status {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.muted-link {
  color: var(--muted);
  font-size: 0.9rem;
}

.audience-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}

.audience-grid div {
  padding: 24px 18px;
  border-right: 1px solid var(--line);
}

.audience-grid div:last-child {
  border-right: 0;
}

.audience-grid strong,
.audience-grid span {
  display: block;
}

.audience-grid span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
}

.home-latest {
  padding: clamp(28px, 5vw, 54px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.home-latest .section-heading {
  margin-bottom: 26px;
}

.home-latest-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 24px 0 30px;
  border-block: 1px solid var(--line);
}

.home-latest-metrics div {
  padding: 18px 14px;
  border-right: 1px solid var(--line);
}

.home-latest-metrics div:last-child {
  border-right: 0;
}

.home-latest-metrics strong,
.home-latest-metrics span {
  display: block;
}

.home-latest-metrics strong {
  font-size: clamp(1.3rem, 3vw, 2rem);
}

.home-latest-metrics span {
  color: var(--muted);
  font-size: 0.76rem;
}

.home-cta {
  max-width: 860px;
  padding: clamp(42px, 8vw, 92px) 0;
  border-top: 1px solid var(--line);
}

.home-cta p:not(.eyebrow) {
  max-width: 680px;
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.25;
  letter-spacing: -0.025em;
}

h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.35rem, 6vw, 5.5rem);
}

h2 {
  margin: 0 0 24px;
  font-size: clamp(1.55rem, 3vw, 2.45rem);
}

h3 {
  margin: 0 0 10px;
  font-size: clamp(1.04rem, 2vw, 1.3rem);
}

.hero-copy {
  max-width: 790px;
  margin: 24px 0 30px;
  color: var(--muted);
  font-size: clamp(1.04rem, 2vw, 1.3rem);
}

.button,
button[data-expand-evidence] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary {
  background: transparent;
  color: var(--accent);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  margin-bottom: clamp(68px, 10vw, 120px);
  border-block: 1px solid var(--line);
}

.metric-strip div {
  padding: 21px 16px;
  border-right: 1px solid var(--line);
}

.metric-strip div:last-child {
  border-right: 0;
}

.metric-strip span,
.metric-strip strong {
  display: block;
}

.metric-strip span {
  color: var(--muted);
  font-size: 0.78rem;
}

.metric-strip strong {
  margin-top: 4px;
  font-size: clamp(1.3rem, 3vw, 2rem);
}

.top-events {
  margin-bottom: clamp(64px, 10vw, 120px);
}

.top-events ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.event-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 22px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
}

.event-card:last-child {
  border-bottom: 1px solid var(--line);
}

.rank {
  color: var(--accent);
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.event-card p {
  margin: 9px 0;
}

.event-meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.reason {
  padding-left: 16px;
  border-left: 3px solid var(--accent);
}

.continuity {
  color: var(--accent);
}

.event-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.84rem;
}

.confidence {
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
}

.panel {
  margin: 28px 0;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.compact-card {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.compact-card h3 a {
  color: var(--text);
  text-decoration: none;
}

.compact-card p {
  margin: 8px 0 0;
}

.watchlist,
.quality-list,
.degrade-reasons,
.status-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.watchlist li {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 2fr;
  gap: 20px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.watchlist span,
.quality-list {
  color: var(--muted);
}

.quality-list li {
  padding: 8px 0;
}

.quality-list strong {
  color: var(--warning);
  text-transform: uppercase;
}

.degrade-reasons {
  margin-bottom: 20px;
  color: var(--danger);
}

.metadata,
.evidence-meta {
  display: grid;
  gap: 8px;
  margin: 28px 0 0;
}

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

.metadata div,
.evidence-meta div {
  min-width: 0;
}

dt {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}

.draft-banner,
.legacy-banner {
  padding: 14px max(20px, calc((100% - var(--max-width)) / 2));
}

.draft-banner {
  display: flex;
  justify-content: center;
  gap: 18px;
  background: var(--warning-soft);
  color: var(--warning);
}

.legacy-banner {
  margin-top: 24px;
  border-radius: 10px;
  background: var(--surface-strong);
  color: var(--muted);
}

.evidence-link {
  margin: 48px 0 100px;
  text-align: center;
}

.public-intro {
  margin-bottom: clamp(72px, 10vw, 120px);
}

.public-intro p {
  max-width: 760px;
}

.evidence-shell,
.archive-shell,
.status-shell,
.about-shell,
.empty-state {
  padding-block: clamp(52px, 8vw, 100px);
}

.evidence-shell h1,
.archive-shell h1,
.status-shell h1,
.about-shell h1,
.empty-state h1 {
  font-size: clamp(2.2rem, 5vw, 4.4rem);
}

.about-hero {
  max-width: 880px;
  margin-bottom: 42px;
}

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

.about-grid .panel {
  margin: 0;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
}

.evidence-actions {
  margin: 28px 0;
}

.evidence-item {
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.evidence-item summary {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px;
  cursor: pointer;
  font-weight: 700;
}

.evidence-item > :not(summary) {
  margin-inline: 20px;
}

.evidence-item blockquote {
  margin-block: 16px;
  padding: 16px 18px;
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
}

.quote-note {
  color: var(--muted);
  font-size: 0.84rem;
}

.evidence-meta {
  margin-bottom: 22px;
}

.evidence-meta div {
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.search-label {
  display: block;
  margin: 42px 0 8px;
  color: var(--muted);
}

input[type="search"] {
  width: min(100%, 660px);
  min-height: 50px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.result-count {
  min-height: 1.7em;
  color: var(--muted);
}

.archive-card {
  display: grid;
  grid-template-columns: 130px 1fr 180px;
  gap: 24px;
  align-items: start;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.archive-card h2 {
  margin: 0;
  font-size: 1.2rem;
}

.archive-card h2 a {
  color: var(--text);
  text-decoration: none;
}

.archive-card p,
.archive-card time {
  margin: 0;
  color: var(--muted);
}

.archive-card[hidden] {
  display: none;
}

.status-list li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.site-footer {
  margin-top: 60px;
  padding: 32px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}

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

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

  .home-mark {
    width: min(70%, 320px);
    justify-self: start;
  }

  .home-proof,
  .audience-grid,
  .process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-proof div:nth-child(2),
  .audience-grid div:nth-child(2),
  .process-grid li:nth-child(2) {
    border-right: 0;
  }

  .home-proof div:nth-child(-n + 2),
  .audience-grid div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .problem-grid,
  .product-grid {
    grid-template-columns: 1fr;
  }

  .metric-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .metric-strip div:nth-child(3) {
    border-right: 0;
  }

  .metric-strip div:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

  .archive-card {
    grid-template-columns: 110px 1fr;
  }

  .archive-card .tags {
    grid-column: 2;
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(calc(100% - 28px), var(--max-width));
  }

  .site-header .shell {
    align-items: flex-start;
    padding-block: 12px;
  }

  .site-header nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px 14px;
  }

  .site-header nav a {
    font-size: 0.8rem;
  }

  .hero,
  .report-header {
    padding-top: 58px;
  }

  .company-hero {
    padding-top: 64px;
  }

  .company-hero h1 {
    font-size: clamp(2.9rem, 16vw, 4.8rem);
  }

  .home-mark {
    width: min(82%, 290px);
  }

  .home-proof,
  .audience-grid,
  .process-grid,
  .home-latest-metrics {
    grid-template-columns: 1fr;
  }

  .home-proof div,
  .audience-grid div,
  .home-latest-metrics div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .home-proof div:last-child,
  .audience-grid div:last-child,
  .home-latest-metrics div:last-child {
    border-bottom: 0;
  }

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

  .metric-strip div:nth-child(3) {
    border-right: 1px solid var(--line);
  }

  .metric-strip div:nth-child(even) {
    border-right: 0;
  }

  .metric-strip div {
    border-bottom: 1px solid var(--line);
  }

  .event-card {
    grid-template-columns: 42px 1fr;
    gap: 10px;
  }

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

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

  .watchlist li,
  .archive-card {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .archive-card .tags {
    grid-column: auto;
  }

  .draft-banner {
    display: block;
  }

  .draft-banner span {
    display: block;
  }

  .evidence-item summary {
    display: block;
  }
}

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

@media print {
  :root {
    --bg: #fff;
    --surface: #fff;
    --text: #000;
    --muted: #333;
    --line: #999;
  }

  body {
    background: #fff;
    font-size: 11pt;
  }

  .site-header,
  .site-footer,
  .theme-toggle,
  .evidence-actions,
  .search-label,
  input[type="search"],
  .button {
    display: none !important;
  }

  .shell {
    width: 100%;
  }

  .hero,
  .report-header {
    padding: 20px 0;
  }

  h1 {
    font-size: 28pt;
  }

  .panel,
  .event-card,
  .evidence-item {
    break-inside: avoid;
    box-shadow: none;
  }

  .draft-banner {
    border: 3px solid #000;
    background: #fff;
    color: #000;
    font-weight: 800;
  }
}
