:root {
  --paper: #f5f2e9;
  --paper-2: #fbf9f3;
  --white: #fff;
  --ink: #122033;
  --ink-2: #2d4055;
  --muted: #6f7d8c;
  --line: rgba(25, 48, 72, 0.12);
  --teal: #0f766e;
  --blue: #2563eb;
  --pink: #e11d6b;
  --amber: #b45309;
  --violet: #7c3aed;
  --sans: "Aptos", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  --mono: "Bahnschrift", "DIN Alternate", "Segoe UI", sans-serif;
  --shadow: 0 22px 60px rgba(25, 46, 69, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 82% 10%, rgba(121, 191, 236, 0.18), transparent 34%),
    radial-gradient(circle at 10% 76%, rgba(247, 194, 106, 0.13), transparent 34%),
    linear-gradient(rgba(23, 49, 76, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 49, 76, 0.035) 1px, transparent 1px);
  background-size: auto, auto, 72px 72px, 72px 72px;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; }

.site { width: min(1400px, calc(100% - 56px)); margin: 0 auto; }

.topbar {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 250px; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink); color: #fff;
  font-family: var(--display); font-size: 18px; font-weight: 700;
}
.brand-copy { display: flex; flex-direction: column; gap: 1px; }
.brand-copy b { font-family: var(--display); font-size: 15px; letter-spacing: 0.04em; }
.brand-copy em { color: var(--muted); font-family: var(--mono); font-size: 7px; letter-spacing: 0.14em; font-style: normal; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: #526276; font-size: 10px; letter-spacing: 0.03em; }
.nav a:hover { color: var(--ink); }
.source-link {
  margin-left: 10px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 999px;
  color: var(--teal); font-size: 9px; white-space: nowrap;
  background: rgba(255,255,255,0.5);
}

.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) 245px;
  gap: 40px; align-items: end;
  padding: 52px 0 32px;
}
.eyebrow {
  display: flex; align-items: center; gap: 9px;
  margin: 0 0 16px; color: var(--muted);
  font-family: var(--mono); font-size: 8px; letter-spacing: 0.12em;
}
.eyebrow span { color: var(--teal); font-weight: 700; }
.eyebrow i { width: 38px; height: 1px; background: var(--line); }
.hero h1 {
  margin: 0; font-family: var(--display);
  font-size: clamp(46px, 5.8vw, 82px); font-weight: 600;
  line-height: 1.08; letter-spacing: -0.045em;
}
.hero h1 em { color: var(--teal); font-style: normal; }
.lede { max-width: 680px; margin: 22px 0 0; color: #536176; font-size: 13px; line-height: 1.9; }
.lede strong { color: var(--ink); font-weight: 650; }
.method { margin: 13px 0 0; color: #8a96a3; font-family: var(--mono); font-size: 8px; letter-spacing: 0.03em; }
.hero-stamp {
  display: grid; grid-template-columns: auto 1fr; gap: 7px 10px;
  padding: 16px 17px; border: 1px solid var(--line); border-left: 2px solid var(--teal);
  background: rgba(255,255,255,0.56); border-radius: 3px;
}
.hero-stamp span { color: #93a0ad; font-family: var(--mono); font-size: 7px; letter-spacing: 0.1em; }
.hero-stamp b { color: var(--ink-2); font-family: var(--mono); font-size: 9px; font-weight: 500; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.scope-bar {
  display: flex; align-items: center; gap: 18px;
  padding: 12px 0 13px; border-bottom: 1px solid var(--line);
}
.scope-label { color: #8b98a4; font-family: var(--mono); font-size: 7px; letter-spacing: 0.13em; }
.scope-tabs { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,0.45); }
.scope-tabs button {
  height: 27px; padding: 0 12px; border: 0; border-radius: 999px;
  background: transparent; color: #68798a; font-size: 9px;
}
.scope-tabs button em { margin-left: 5px; color: #9aa6b1; font-family: var(--mono); font-size: 7px; font-style: normal; }
.scope-tabs button.is-active { background: var(--teal); color: #fff; }
.scope-tabs button.is-active em { color: rgba(255,255,255,0.72); }
.scope-note { margin-left: auto; color: #93a0ad; font-family: var(--mono); font-size: 7px; }
.kpi { padding: 19px 20px 18px; border-right: 1px solid var(--line); }
.kpi:first-child { padding-left: 0; }
.kpi:last-child { border-right: 0; }
.kpi b { display: block; font-family: var(--display); font-size: 33px; font-weight: 600; line-height: 1; }
.kpi span { display: block; margin-top: 8px; color: var(--muted); font-size: 9px; letter-spacing: 0.03em; }
.kpi em { color: var(--teal); font-style: normal; }

.globe-panel {
  margin-top: 24px; padding: 24px 26px 22px;
  border-radius: 5px; overflow: hidden;
  background:
    radial-gradient(circle at 76% 20%, rgba(56, 132, 174, 0.24), transparent 38%),
    radial-gradient(circle at 12% 90%, rgba(15, 118, 110, 0.22), transparent 36%),
    #0b1929;
  color: #eaf4f8;
  box-shadow: 0 24px 60px rgba(12, 25, 41, 0.2);
}
.globe-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.globe-head .card-kicker { color: #7fa3b8; }
.globe-head h2 { margin: 0; font-family: var(--display); font-size: 30px; font-weight: 600; letter-spacing: -0.04em; color: #f3f7f7; }
.globe-head h2 em { color: #72d4c8; font-style: normal; }
.globe-sub { max-width: 610px; margin: 9px 0 0; color: #92aebe; font-size: 9px; line-height: 1.7; }
.globe-kpis { display: flex; gap: 24px; padding-top: 5px; }
.globe-kpis div { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.globe-kpis b { font-family: var(--display); font-size: 28px; font-weight: 600; color: #fff; }
.globe-kpis span { color: #7fa3b8; font-size: 7px; }
.globe-layout { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 22px; align-items: center; margin-top: 8px; }
.globe-canvas-wrap { position: relative; min-width: 0; }
#globeCanvas { display: block; width: 100%; max-width: 720px; height: auto; margin: 0 auto; touch-action: none; cursor: grab; }
#globeCanvas:active { cursor: grabbing; }
.globe-hint { position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); color: #6f8fa4; font-family: var(--mono); font-size: 7px; letter-spacing: 0.04em; white-space: nowrap; }
.globe-tooltip {
  position: absolute; z-index: 3; min-width: 100px; padding: 8px 9px;
  border: 1px solid rgba(126, 209, 201, 0.28); border-radius: 3px;
  background: rgba(8, 22, 35, 0.94); color: #dceff1; pointer-events: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.globe-tooltip b { display: block; font-family: var(--display); font-size: 13px; font-weight: 600; }
.globe-tooltip span { display: block; margin-top: 3px; color: #8fb9c5; font-family: var(--mono); font-size: 8px; }
.globe-side { align-self: stretch; display: flex; flex-direction: column; gap: 18px; }
.globe-year { padding: 13px 13px 11px; border: 1px solid rgba(158, 205, 215, 0.13); border-radius: 3px; background: rgba(255,255,255,0.03); }
.globe-year-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.globe-year-head span { color: #7fa3b8; font-family: var(--mono); font-size: 7px; letter-spacing: 0.09em; }
.globe-year-head b { color: #7ce0d2; font-family: var(--display); font-size: 24px; font-weight: 600; }
#yearSlider { width: 100%; margin: 13px 0 8px; accent-color: #45bfaf; }
.globe-year-actions { display: flex; gap: 7px; }
.globe-year-actions button {
  flex: 1; height: 26px; border: 1px solid rgba(158, 205, 215, 0.18);
  border-radius: 3px; background: transparent; color: #a8c7d1; font-size: 8px;
}
.globe-year-actions button:hover { border-color: #45bfaf; color: #7ce0d2; }
.globe-legend { display: flex; flex-wrap: wrap; gap: 7px 12px; }
.globe-legend span { display: inline-flex; align-items: center; gap: 5px; color: #8fb0bd; font-size: 8px; }
.globe-legend i { width: 6px; height: 6px; border-radius: 50%; }
.globe-list { display: grid; gap: 7px; }
.globe-list-row { display: grid; grid-template-columns: 65px 1fr 26px; align-items: center; gap: 7px; }
.globe-list-row span { overflow: hidden; color: #a4c0ca; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.globe-list-track { height: 4px; background: rgba(255,255,255,0.09); border-radius: 999px; overflow: hidden; }
.globe-list-track i { display: block; height: 100%; border-radius: inherit; background: #4cc9b9; }
.globe-list-row b { color: #d8ebee; font-family: var(--mono); font-size: 7px; font-weight: 500; text-align: right; }

.workspace { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 34px; padding: 34px 0 40px; }
.filters {
  align-self: start; position: sticky; top: 20px;
  padding: 14px 14px 12px; border: 1px solid var(--line);
  background: rgba(255,255,255,0.5); border-radius: 4px;
}
.filter-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.filter-head span { font-family: var(--mono); font-size: 8px; letter-spacing: 0.14em; color: var(--muted); }
.filter-head button { border: 0; background: transparent; color: var(--teal); font-size: 8px; }
.field { display: block; padding: 11px 0; border-bottom: 1px solid rgba(25,48,72,0.07); }
.field > span { display: block; margin-bottom: 6px; color: #7b8794; font-family: var(--mono); font-size: 7px; letter-spacing: 0.07em; }
.field select {
  width: 100%; height: 31px; padding: 0 8px;
  border: 1px solid var(--line); border-radius: 3px;
  background: rgba(255,255,255,0.8); color: var(--ink-2); font-size: 10px;
}
.filter-note { margin-top: 13px; padding: 10px; background: rgba(15,118,110,0.05); border-left: 2px solid var(--teal); }
.filter-note b { color: var(--teal); font-family: var(--mono); font-size: 7px; letter-spacing: 0.1em; }
.filter-note p { margin: 5px 0 0; color: #68798a; font-size: 8px; line-height: 1.7; }
.filter-source { display: block; margin-top: 11px; color: var(--teal); font-size: 8px; text-decoration: underline; text-underline-offset: 3px; }

.content { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
#timeline { order: 1; }
#feature { order: 2; }
#kindPanel { order: 3; }
#countries { order: 4; }
#records { order: 5; }
.card {
  min-width: 0; padding: 20px 20px 17px;
  border: 1px solid var(--line); border-radius: 4px;
  background: rgba(255,255,255,0.64); box-shadow: 0 8px 28px rgba(25,46,69,0.03);
}
.card-wide { grid-column: span 2; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.card-kicker { margin: 0 0 7px; color: #8b98a4; font-family: var(--mono); font-size: 7px; letter-spacing: 0.13em; }
.card h2 { margin: 0; font-family: var(--display); font-size: 24px; font-weight: 600; letter-spacing: -0.04em; }
.card h2 em { color: var(--teal); font-style: normal; }
.card-note { margin: 10px 0 0; color: #8995a1; font-size: 8px; line-height: 1.65; }
.chart-wrap { margin-top: 14px; overflow: hidden; }
#timelineChart { width: 100%; height: auto; display: block; overflow: visible; }
.legend { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 8px; }
.legend i { width: 7px; height: 7px; border-radius: 2px; }

.donut-wrap { position: relative; width: min(220px, 100%); margin: 12px auto 0; }
#featureDonut { display: block; width: 100%; height: auto; transform: rotate(-90deg); }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.donut-center b { font-family: var(--display); font-size: 34px; font-weight: 600; }
.donut-center span { color: var(--muted); font-size: 8px; }
.mini-legend { display: grid; gap: 6px; margin-top: 8px; }
.mini-legend div { display: flex; align-items: center; gap: 7px; padding: 4px 0; border-bottom: 1px solid rgba(25,48,72,0.06); }
.mini-legend i { width: 7px; height: 7px; border-radius: 50%; }
.mini-legend span { color: var(--muted); font-size: 9px; }
.mini-legend b { margin-left: auto; font-family: var(--mono); font-size: 9px; font-weight: 500; color: var(--ink-2); }

.card-stat { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; padding-top: 4px; }
.card-stat b { font-family: var(--display); font-size: 28px; font-weight: 600; }
.card-stat span { color: var(--muted); font-size: 8px; }
.country-bars { display: grid; gap: 5px; margin-top: 16px; }
.country-row { display: grid; grid-template-columns: 92px minmax(0,1fr) 38px; align-items: center; gap: 9px; }
.country-row span { overflow: hidden; color: #5e6e7f; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.country-track { height: 8px; background: rgba(25,48,72,0.06); border-radius: 999px; overflow: hidden; }
.country-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal), #4ea8a0); }
.country-row b { color: var(--ink-2); font-family: var(--mono); font-size: 8px; font-weight: 500; text-align: right; }

.kind-total { margin-top: 13px; }
.kind-total b { font-family: var(--display); font-size: 35px; font-weight: 600; }
.kind-total span { margin-left: 7px; color: var(--muted); font-size: 8px; }
.kind-bar { display: flex; height: 10px; margin-top: 12px; overflow: hidden; border-radius: 999px; background: rgba(25,48,72,0.06); }
.kind-bar span { height: 100%; }
.kind-individual { background: var(--teal); }
.kind-collective { background: var(--pink); }
.kind-cert { background: var(--amber); }
.kind-rows { display: grid; gap: 8px; margin-top: 15px; }
.kind-rows div { display: flex; align-items: center; gap: 7px; }
.kind-rows span { color: var(--muted); font-size: 9px; }
.kind-rows b { margin-left: auto; font-family: var(--mono); font-size: 9px; font-weight: 500; }
.dot { width: 7px; height: 7px; border-radius: 50%; }
.dot-teal { background: var(--teal); }
.dot-pink { background: var(--pink); }
.dot-amber { background: var(--amber); }

.kind-cross {
  margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line);
}
.kind-cross table { width: 100%; border-collapse: collapse; }
.kind-cross th {
  padding: 4px 3px; color: #8b98a4; font-family: var(--mono);
  font-size: 6.5px; font-weight: 500; text-align: right;
}
.kind-cross th:first-child { text-align: left; }
.kind-cross td {
  padding: 5px 3px; border-top: 1px solid rgba(25,48,72,0.06);
  color: #68798a; font-family: var(--mono); font-size: 8px; text-align: right;
}
.kind-cross td:first-child { color: var(--ink-2); font-family: var(--sans); font-size: 9px; text-align: left; }

.records-tools { display: flex; align-items: center; gap: 8px; }
.records-tools input {
  width: 150px; height: 29px; padding: 0 9px;
  border: 1px solid var(--line); border-radius: 3px; background: #fff; font-size: 9px;
}
.records-tools button { height: 29px; padding: 0 10px; border: 1px solid var(--line); border-radius: 3px; background: transparent; font-size: 8px; }
.table-wrap { margin-top: 15px; overflow-x: auto; }
.records-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.records-table th { padding: 8px 8px; border-bottom: 1px solid var(--line); color: #8b98a4; font-family: var(--mono); font-size: 7px; font-weight: 500; letter-spacing: 0.05em; text-align: left; }
.records-table td { padding: 9px 8px; border-bottom: 1px solid rgba(25,48,72,0.06); color: #4f6072; font-size: 9px; }
.records-table tr { cursor: pointer; }
.records-table tr:hover td { background: rgba(15,118,110,0.04); }
.records-table td:nth-child(1) { font-family: var(--mono); color: var(--muted); }
.records-table td:nth-child(2) { color: var(--muted); }
.records-table td:nth-child(3) { color: var(--ink); font-weight: 600; }
.records-table td:nth-child(4) { font-family: var(--mono); }
.brand-tag { display: inline-flex; padding: 3px 6px; border-radius: 999px; font-family: var(--mono); font-size: 7px; }
.brand-tag--oppo { color: #0f766e; background: rgba(15,118,110,0.08); }
.brand-tag--oneplus { color: #b45309; background: rgba(180,83,9,0.08); }
.table-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; color: var(--muted); font-size: 8px; }

.detail { margin: 0 0 40px; padding: 22px; border: 1px solid var(--line); background: rgba(255,255,255,0.75); border-radius: 4px; }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.detail h2 { margin: 0; font-family: var(--display); font-size: 30px; font-weight: 600; }
.detail-head button { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 6px 12px; font-size: 9px; }
.detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; }
.detail-grid div { padding-top: 10px; border-top: 1px solid var(--line); }
.detail-grid span { display: block; color: var(--muted); font-family: var(--mono); font-size: 7px; letter-spacing: 0.08em; }
.detail-grid b { display: block; margin-top: 5px; color: var(--ink-2); font-size: 11px; font-weight: 500; }
.detail-countries { grid-column: span 4; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.chips span { padding: 4px 7px; border: 1px solid rgba(15,118,110,0.2); border-radius: 999px; color: var(--teal); font-family: var(--mono); font-size: 8px; background: rgba(15,118,110,0.04); }

.footer { display: flex; align-items: center; gap: 20px; padding: 22px 0 30px; border-top: 1px solid var(--line); color: #8995a1; font-family: var(--mono); font-size: 7px; letter-spacing: 0.03em; }
.footer a { margin-left: auto; color: var(--teal); }

@media (max-width: 1100px) {
  .site { width: min(100% - 36px, 1000px); }
  .nav { display: none; }
  .workspace { grid-template-columns: 210px minmax(0,1fr); gap: 22px; }
  .detail-grid { grid-template-columns: repeat(2,1fr); }
  .detail-countries { grid-column: span 2; }
}
@media (max-width: 820px) {
  .site { width: calc(100% - 26px); }
  .topbar { height: 62px; gap: 12px; }
  .brand { min-width: 0; }
  .source-link { margin-left: auto; font-size: 8px; padding: 6px 9px; }
  .hero { grid-template-columns: 1fr; gap: 22px; padding: 36px 0 24px; }
  .hero h1 { font-size: clamp(44px, 12vw, 62px); }
  .hero-stamp { display: flex; flex-wrap: wrap; gap: 6px 12px; }
  .hero-stamp span, .hero-stamp b { font-size: 7px; }
  .kpis { grid-template-columns: repeat(2,1fr); }
  .scope-bar { flex-wrap: wrap; gap: 8px 12px; }
  .scope-note { flex-basis: 100%; margin-left: 0; }
  .scope-tabs button { padding: 0 10px; }
  .globe-panel { padding: 18px 14px 16px; }
  .globe-head { flex-direction: column; gap: 13px; }
  .globe-head h2 { font-size: 25px; }
  .globe-kpis { gap: 26px; padding-top: 0; }
  .globe-kpis div { align-items: flex-start; }
  .globe-layout { grid-template-columns: 1fr; gap: 12px; }
  .globe-side { display: grid; grid-template-columns: 1fr; gap: 12px; }
  .globe-list { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px 12px; }
  .globe-legend { display: none; }
  .kpi { padding: 15px 13px; border-bottom: 1px solid var(--line); }
  .kpi:nth-child(odd) { padding-left: 0; }
  .kpi:nth-child(2) { border-right: 0; }
  .workspace { grid-template-columns: 1fr; gap: 18px; padding: 22px 0 30px; }
  .filters { position: static; display: grid; grid-template-columns: repeat(2,1fr); gap: 0 12px; }
  .filter-head, .filter-note, .filter-source { grid-column: span 2; }
  .content { grid-template-columns: 1fr; }
  .card-wide { grid-column: span 1; }
  .card { padding: 16px 14px; }
  .card h2 { font-size: 21px; }
  .records-tools { flex-direction: column; align-items: stretch; }
  .records-tools input { width: 130px; }
  .country-row { grid-template-columns: 78px minmax(0,1fr) 32px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-countries { grid-column: span 1; }
  .footer { flex-direction: column; align-items: flex-start; gap: 7px; }
  .footer a { margin-left: 0; }
}
