/* SoilExpo — shared design system
   Reference visual language: ExposomeX (blue academic / card grid) */

:root {
  --blue-950: #08213c;
  --blue-900: #0b2a4a;
  --blue-800: #123b66;
  --blue-700: #15539b;
  --blue-600: #1566c0;
  --blue-500: #1976d2;
  --blue-300: #8fbcf0;
  --blue-100: #e6f0fc;
  --blue-50: #f2f8ff;

  --soil: #b4713a;
  --soil-dark: #8f5527;
  --soil-100: #f7eee5;
  --green: #2c7a58;
  --green-100: #e7f4ed;
  --amber: #b5822a;
  --amber-100: #fbf2de;

  --ink: #172433;
  --ink-2: #3a4a5c;
  --muted: #64748b;
  --muted-2: #8a97a6;
  --line: #e1e8f0;
  --line-2: #eef2f7;
  --bg: #f5f8fc;
  --card: #ffffff;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(11, 42, 74, .04), 0 10px 30px rgba(11, 42, 74, .06);
  --shadow-hover: 0 4px 12px rgba(11, 42, 74, .08), 0 18px 44px rgba(11, 42, 74, .11);
  --maxw: 1200px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.narrow { max-width: 900px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .93);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 28px;
  height: 70px; display: flex; align-items: center; gap: 36px;
}
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-mark { width: 36px; height: 36px; flex-shrink: 0; }
.brand-name { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.03em; color: var(--blue-900); line-height: 1.05; }
.brand-name span { color: var(--soil); }
.brand-sub { display: block; font-size: 10px; color: var(--muted); letter-spacing: .06em; white-space: nowrap; margin-top: 3px; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a {
  padding: 8px 15px; border-radius: 8px; font-size: 14px; font-weight: 500;
  color: var(--ink-2); transition: .18s ease; white-space: nowrap;
}
.nav-links a:hover { color: var(--blue-600); background: var(--blue-50); }
.nav-links a.active { color: var(--blue-700); background: var(--blue-100); font-weight: 700; }
.nav-cta {
  padding: 9px 17px !important; border-radius: 9px !important;
  background: var(--blue-700); color: #fff !important; font-weight: 650 !important;
  box-shadow: 0 3px 10px rgba(21, 83, 155, .22);
}
.nav-cta:hover { background: var(--blue-800) !important; color: #fff !important; transform: translateY(-1px); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 8px; width: 40px; height: 38px; color: var(--ink); font-size: 18px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0a2542 0%, #123b66 48%, #15539b 100%);
  color: #fff;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(110deg, #000 0%, transparent 78%);
}
.hero::after {
  content: ""; position: absolute; width: 620px; height: 620px; right: -140px; top: -260px;
  background: radial-gradient(circle, rgba(78, 156, 240, .30), transparent 65%);
}
.hero-inner { position: relative; z-index: 2; padding: 78px 0 72px; max-width: 800px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 650;
  letter-spacing: .13em; text-transform: uppercase; color: #a9cdf7;
  border: 1px solid rgba(169, 205, 247, .32); border-radius: 100px; padding: 5px 15px;
  background: rgba(255,255,255,.05);
}
.hero-eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: #7fd1a8; box-shadow: 0 0 0 3px rgba(127,209,168,.2); }
.hero h1 { font-size: clamp(34px, 5vw, 54px); margin: 24px 0 18px; letter-spacing: -.035em; }
.hero h1 em { font-style: normal; color: #ffcf9a; }
.hero-lead { font-size: 17px; line-height: 1.85; color: #c9dcf2; max-width: 680px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 22px; border-radius: 10px; font-size: 14.5px; font-weight: 650;
  transition: .18s ease; border: 1px solid transparent; white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: #fff; color: var(--blue-800); box-shadow: 0 6px 20px rgba(0,0,0,.14); }
.btn-primary:hover { background: #f0f6ff; }
.btn-ghost { background: rgba(255,255,255,.09); color: #fff; border-color: rgba(255,255,255,.35); }
.btn-ghost:hover { background: rgba(255,255,255,.18); }
.btn-blue { background: var(--blue-700); color: #fff; box-shadow: 0 4px 14px rgba(21,83,155,.24); }
.btn-blue:hover { background: var(--blue-800); }
.btn-outline { background: #fff; color: var(--blue-700); border-color: var(--line); }
.btn-outline:hover { border-color: var(--blue-300); background: var(--blue-50); }
.btn-sm { padding: 9px 16px; font-size: 13px; }

.hero-stats {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(255,255,255,.16);
  margin-top: 20px;
}
.hero-stats > div { padding: 24px 0 30px; }
.hero-stats .num { font-size: 27px; font-weight: 800; letter-spacing: -.03em; color: #fff; }
.hero-stats .num small { font-size: 14px; font-weight: 600; color: #b9d4f2; margin-left: 3px; }
.hero-stats .lab { font-size: 12.5px; color: #a8c4e2; margin-top: 2px; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section.alt { background: #fff; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.section-head { margin-bottom: 34px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--blue-600); margin-bottom: 10px; }
.section-head h2 { font-size: clamp(25px, 3vw, 32px); color: var(--blue-950); }
.section-head p { color: var(--muted); margin-top: 10px; max-width: 720px; font-size: 15px; }
.section-head.with-action { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ---------- Module cards (home) ---------- */
.module-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.module-card {
  position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 24px 22px; min-height: 218px;
  display: flex; flex-direction: column; box-shadow: var(--shadow); transition: .2s ease;
}
.module-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.module-card.is-live { border-color: #bfd8f5; background: linear-gradient(180deg, #fbfdff 0%, #fff 100%); }
.module-card.is-live::before {
  content: ""; position: absolute; left: 0; top: 20px; bottom: 20px; width: 3px;
  background: var(--blue-600); border-radius: 0 3px 3px 0;
}
.mc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.mc-code { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--blue-700); }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 100px; letter-spacing: .02em; }
.badge-live { background: var(--green-100); color: var(--green); }
.badge-soon { background: #f1f4f8; color: var(--muted-2); }
.badge-blue { background: var(--blue-100); color: var(--blue-700); }
.badge-soil { background: var(--soil-100); color: var(--soil-dark); }
.badge-amber { background: var(--amber-100); color: var(--amber); }
.module-card h3 { font-size: 22px; color: var(--blue-950); letter-spacing: -.02em; }
.module-card.is-empty h3 { color: #aeb9c6; font-weight: 600; font-size: 18px; }
.module-card .mc-desc { font-size: 13.5px; color: var(--muted); margin-top: 10px; line-height: 1.75; flex: 1; }
.module-card.is-empty { border-style: dashed; background: transparent; box-shadow: none; }
.module-card.is-empty .mc-desc { color: #b4bec9; }
.mc-foot { margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; }
.mc-link { font-size: 13px; font-weight: 700; color: var(--blue-700); display: inline-flex; align-items: center; gap: 6px; }
.mc-link:hover { gap: 10px; }
.mc-muted { font-size: 12.5px; color: var(--muted-2); }
.mc-tag { font-size: 11px; color: var(--muted-2); font-family: var(--mono); }

/* ---------- Generic content blocks ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.card + .card { margin-top: 20px; }
.card h3 { font-size: 19px; color: var(--blue-950); margin-bottom: 12px; }
.card h4 { font-size: 15px; color: var(--blue-900); margin: 22px 0 8px; }
.card p { color: var(--ink-2); font-size: 14.5px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.mt-20 { margin-top: 20px; } .mt-28 { margin-top: 28px; } .mt-40 { margin-top: 40px; }

.page-head { background: #fff; border-bottom: 1px solid var(--line); padding: 46px 0 40px; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.crumb a { color: var(--blue-600); }
.crumb a:hover { text-decoration: underline; }
.crumb span { margin: 0 8px; color: #c3ccd6; }
.page-head h1 { font-size: clamp(28px, 3.6vw, 38px); color: var(--blue-950); }
.page-head p { color: var(--muted); margin-top: 12px; font-size: 15.5px; max-width: 780px; }
.page-head .head-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.kpi .kpi-label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.kpi .kpi-value { font-size: 29px; font-weight: 800; letter-spacing: -.03em; color: var(--blue-800); margin-top: 6px; line-height: 1.2; }
.kpi .kpi-value.is-empty { color: #bcc6d1; }
.kpi .kpi-note { font-size: 12px; color: var(--muted-2); margin-top: 4px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line-2); }
th { background: var(--blue-50); color: var(--blue-900); font-weight: 700; font-size: 12.5px; letter-spacing: .02em; white-space: nowrap; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fafcff; }
td.num, th.num { text-align: right; font-family: var(--mono); font-size: 13px; }
td code, .inline-code { font-family: var(--mono); font-size: 12.5px; background: #f1f5f9; padding: 2px 6px; border-radius: 5px; color: var(--blue-800); }

pre {
  background: var(--blue-950); color: #d9e8f8; border-radius: var(--radius-sm);
  padding: 20px 22px; overflow-x: auto; font-family: var(--mono); font-size: 12.8px; line-height: 1.8;
  margin: 0;
}
pre .cm { color: #7f9dbb; }
code { font-family: var(--mono); }

.callout { border-left: 3px solid var(--blue-500); background: var(--blue-50); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 16px 20px; font-size: 14px; color: var(--ink-2); }
.callout.soil { border-left-color: var(--soil); background: var(--soil-100); }
.callout.amber { border-left-color: var(--amber); background: var(--amber-100); }
.callout strong { color: var(--blue-900); }

/* ---------- Download ---------- */
.download-hero {
  display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center;
  background: linear-gradient(120deg, #0b2a4a, #15539b); color: #fff;
  border-radius: 18px; padding: 36px 38px; position: relative; overflow: hidden;
  box-shadow: 0 16px 40px rgba(11,42,74,.18);
}
.download-hero::after { content: ""; position: absolute; width: 340px; height: 340px; right: -80px; top: -160px; background: radial-gradient(circle, rgba(120,180,250,.24), transparent 65%); }
.dh-body, .dh-action { position: relative; z-index: 2; }
.dh-body .tag { font-size: 12px; letter-spacing: .1em; color: #a9cdf7; font-weight: 700; text-transform: uppercase; }
.dh-body h2 { font-size: 27px; margin: 8px 0 10px; }
.dh-body h2 span { font-family: var(--mono); font-size: .8em; color: #ffcf9a; }
.dh-body p { color: #c2d8ef; font-size: 14px; }
.dh-meta { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.16); }
.dh-meta div { font-size: 12px; color: #a9c5e3; }
.dh-meta b { display: block; color: #fff; font-size: 14px; font-weight: 650; margin-top: 2px; font-family: var(--mono); }
.dh-action { text-align: center; }
.btn-download { background: #fff; color: var(--blue-800); padding: 15px 30px; font-size: 15px; border-radius: 11px; font-weight: 750; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.btn-download:hover { background: #eef6ff; transform: translateY(-2px); }
.dh-action small { display: block; margin-top: 10px; color: #a9c5e3; font-size: 11.5px; font-family: var(--mono); }
.hash { font-family: var(--mono); font-size: 11.5px; word-break: break-all; color: var(--muted); background: #f6f9fc; border: 1px solid var(--line); border-radius: 7px; padding: 9px 12px; }

/* ---------- STOX6 ---------- */
.score-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.score-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.score-panel h3 { font-size: 17px; color: var(--blue-950); display: flex; align-items: center; justify-content: space-between; }
.score-panel h3 span { font-size: 12px; font-weight: 600; color: var(--muted); }
.bar-row { display: grid; grid-template-columns: 104px 1fr 48px; gap: 12px; align-items: center; margin-top: 15px; }
.bar-name { font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.bar-track { height: 20px; background: #f0f4f9; border-radius: 5px; overflow: hidden; position: relative; }
.bar-fill { height: 100%; border-radius: 5px; transform-origin: left center; animation: barGrow .9s cubic-bezier(.2,.8,.2,1) both; }
@keyframes barGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.bar-val { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--blue-800); text-align: right; }
.bar-scale { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted-2); margin-top: 12px; padding-left: 116px; font-family: var(--mono); }

.formula {
  text-align: center; background: var(--blue-950); color: #fff; border-radius: var(--radius);
  padding: 30px 20px; font-family: var(--mono); font-size: clamp(15px, 2.2vw, 21px); letter-spacing: .01em;
}
.formula .hl { color: #ffcf9a; }
.formula small { display: block; font-family: var(--font); font-size: 13px; color: #a9c5e3; margin-top: 12px; letter-spacing: 0; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; counter-reset: step; }
.step { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 16px; }
.step::before {
  counter-increment: step; content: counter(step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 7px; background: var(--blue-100); color: var(--blue-700);
  font-family: var(--mono); font-size: 12px; font-weight: 800; margin-bottom: 10px;
}
.step b { display: block; font-size: 13.5px; color: var(--blue-900); }
.step span { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.6; }

.fig-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
figure { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
figure img { width: 100%; background: #fff; padding: 10px; }
figcaption { font-size: 12.5px; color: var(--muted); padding: 12px 16px; border-top: 1px solid var(--line-2); }
figcaption b { color: var(--ink-2); }

.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: center; }
.calc label { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.calc input { width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 9px; font-family: var(--mono); font-size: 15px; color: var(--ink); background: #fff; }
.calc input:focus { outline: 2px solid var(--blue-300); border-color: var(--blue-500); }
.calc-out { background: var(--blue-50); border: 1px solid #cfe1f7; border-radius: var(--radius-sm); padding: 20px; }
.calc-out .lab { font-size: 12.5px; color: var(--muted); }
.calc-out .val { font-family: var(--mono); font-size: 26px; font-weight: 800; color: var(--blue-800); margin-top: 4px; }
.calc-out .hint { font-size: 12px; color: var(--muted); margin-top: 8px; }

.timeline { border-left: 2px solid var(--line); padding-left: 26px; margin-left: 8px; }
.tl-item { position: relative; padding-bottom: 22px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: -33px; top: 6px; width: 11px; height: 11px; border-radius: 50%; background: #fff; border: 3px solid var(--blue-500); }
.tl-item b { color: var(--blue-900); font-size: 14.5px; }
.tl-item p { color: var(--muted); font-size: 13.5px; margin-top: 3px; }

/* ---------- Empty state / placeholders ---------- */
.empty-state { text-align: center; padding: 64px 24px; background: #fff; border: 1px dashed #cfd9e5; border-radius: var(--radius); }
.empty-icon { width: 54px; height: 54px; margin: 0 auto 18px; color: #c3d0de; }
.empty-state h3 { font-size: 18px; color: var(--ink-2); }
.empty-state p { color: var(--muted); font-size: 14px; margin-top: 8px; max-width: 520px; margin-left: auto; margin-right: auto; }
.chart-placeholder {
  height: 230px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff;
  display: flex; align-items: flex-end; justify-content: center; gap: 0; padding: 30px 26px; position: relative; overflow: hidden;
}
.chart-placeholder::before {
  content: ""; position: absolute; inset: 30px 26px;
  background-image: linear-gradient(var(--line-2) 1px, transparent 1px);
  background-size: 100% 25%;
}
.chart-placeholder .ph-label { position: relative; z-index: 2; margin: auto; font-size: 13px; color: var(--muted-2); background: #fff; padding: 8px 16px; border: 1px solid var(--line); border-radius: 100px; }

.chart-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.chart-grid .card > p { color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.pie-layout { display: flex; align-items: center; gap: 24px; margin-top: 22px; }
.pie-chart {
  width: 168px; height: 168px; flex: 0 0 168px; border-radius: 50%; position: relative;
  box-shadow: 0 6px 18px rgba(11, 42, 74, .10);
}
.pie-country { background: conic-gradient(var(--blue-600) 0 34%, var(--blue-500) 34% 58%, var(--blue-300) 58% 80%, #dfeaf6 80% 100%); }
.pie-module { background: conic-gradient(var(--blue-700) 0 38%, var(--blue-500) 38% 65%, var(--blue-300) 65% 85%, #dfeaf6 85% 100%); }
.pie-hole {
  position: absolute; inset: 33px; border-radius: 50%; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px var(--line);
}
.pie-hole span { font-family: var(--mono); font-size: 23px; font-weight: 800; color: #bcc6d1; line-height: 1; }
.pie-hole small { font-size: 10.5px; color: var(--muted-2); margin-top: 6px; }
.pie-legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; }
.pie-legend li { display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 12.5px; color: var(--ink-2); }
.pie-legend li:last-child { border-bottom: none; }
.pie-dot { width: 9px; height: 9px; border-radius: 50%; }
.pie-dot.d1 { background: var(--blue-600); }
.pie-dot.d2 { background: var(--blue-500); }
.pie-dot.d3 { background: var(--blue-300); }
.pie-dot.d4 { background: #dfeaf6; }
.pie-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pie-value { font-family: var(--mono); font-size: 12.5px; color: var(--blue-800); }
@media (max-width: 1000px) {
  .chart-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .pie-layout { flex-direction: column; align-items: flex-start; }
}

.info-list li { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; color: var(--ink-2); }
.info-list li:last-child { border-bottom: none; }
.info-list li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--blue-500); flex-shrink: 0; margin-top: 9px; }
.info-list b { color: var(--blue-900); }

/* ---------- Footer ---------- */
.site-footer { background: var(--blue-950); color: #a9c0d8; margin-top: 0; }
.footer-inner { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; padding: 56px 0 40px; }
.footer-brand .brand-name { color: #fff; font-size: 22px; }
.footer-brand p { font-size: 13px; color: #8ea8c4; margin-top: 14px; max-width: 300px; line-height: 1.8; }
.footer-col h4 { color: #fff; font-size: 13.5px; margin-bottom: 16px; letter-spacing: .02em; }
.footer-col a { display: block; font-size: 13px; color: #9fb8d2; padding: 5px 0; }
.footer-col a:hover { color: #fff; }
.footer-col span { display: block; font-size: 13px; color: #7e99b7; padding: 5px 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0 26px; font-size: 12.5px; color: #7e99b7; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-bottom a { color: #9fb8d2; }
.footer-bottom a:hover { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .module-grid, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media (max-width: 760px) {
  .wrap, .nav-inner { padding: 0 18px; }
  .nav-links {
    display: none; position: absolute; top: 70px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    flex-direction: column; align-items: stretch; padding: 10px 18px 18px; gap: 2px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 12px; }
  .nav-toggle { display: block; }
  .nav-inner { gap: 12px; }
  .nav-cta { display: none !important; }
  .hero-inner { padding: 56px 0 48px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 0 20px; }
  .hero-stats > div { padding: 18px 0; }
  .section { padding: 52px 0; }
  .module-grid, .grid-2, .grid-3, .grid-4, .score-grid, .fig-grid, .calc { grid-template-columns: 1fr; }
  .download-hero { grid-template-columns: 1fr; padding: 28px 24px; }
  .dh-action { text-align: left; }
  .footer-inner { grid-template-columns: 1fr; gap: 26px; padding: 40px 0 30px; }
  .bar-row { grid-template-columns: 88px 1fr 44px; }
  .bar-scale { padding-left: 100px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .steps { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
}

/* ---------- Research Framework ---------- */
.fw-chain { display: grid; gap: 10px; }
.fw-layer { position: relative; display: grid; grid-template-columns: 72px 1fr 150px; gap: 18px; align-items: center; background: #fff; border: 1px solid var(--line); border-left: 4px solid #cbd9e8; border-radius: var(--radius-sm); padding: 17px 20px; box-shadow: var(--shadow); }
.fw-layer::after { content: ""; position: absolute; left: 35px; bottom: -11px; width: 2px; height: 11px; background: #cbd9e8; }
.fw-layer:last-child::after { display: none; }
.fw-layer.is-mapped { border-left-color: var(--blue-600); background: linear-gradient(90deg, #f4f9ff 0%, #fff 62%); }
.fw-idx { font-family: var(--mono); font-size: 20px; font-weight: 800; color: var(--blue-700); letter-spacing: -.03em; }
.fw-idx small { display: block; font-family: var(--font); font-size: 10px; font-weight: 600; color: var(--muted-2); letter-spacing: .08em; margin-top: 2px; }
.fw-body h3 { font-size: 16px; color: var(--blue-950); margin-bottom: 2px; }
.fw-en { font-family: var(--mono); font-size: 10.5px; color: var(--muted-2); letter-spacing: .02em; }
.fw-body p { font-size: 13px; color: var(--muted); margin-top: 7px; line-height: 1.65; }
.fw-anchor { display: block; margin-top: 9px; font-size: 12px; color: var(--blue-700); font-weight: 700; }
.fw-side { text-align: right; }
.fw-side .fw-note { display: block; font-size: 11.5px; color: var(--muted-2); margin-top: 8px; line-height: 1.5; }
.fw-support { margin-top: 16px; border: 1px dashed #c9d7e6; background: #f7fbff; border-radius: var(--radius-sm); padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.fw-support b { font-size: 14px; color: var(--blue-900); }
.fw-support p { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.fw-support-links { display: flex; flex-wrap: wrap; gap: 8px; }
.fw-support-links span { font-size: 12px; color: var(--blue-700); background: #fff; border: 1px solid var(--line); border-radius: 100px; padding: 5px 12px; }
.fw-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 18px; font-size: 12.5px; color: var(--muted); }
.fw-legend span { display: inline-flex; align-items: center; gap: 7px; }
.fw-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

@media (max-width: 760px) {
  .fw-layer { grid-template-columns: 56px 1fr; gap: 12px; padding: 15px 16px; }
  .fw-side { grid-column: 2; text-align: left; margin-top: 6px; }
  .fw-side .fw-note { margin-top: 6px; }
}

/* ---------- Research Modules (home) ---------- */
.module-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.module-grid-4 .mc-code, .module-grid-4 .mc-top .badge { white-space: nowrap; }
.module-grid-4 .mc-top .badge { flex-shrink: 0; }
@media (max-width: 1000px) { .module-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .module-grid-4 { grid-template-columns: 1fr; } }

/* ---------- Team (about) ---------- */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.team-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; box-shadow: var(--shadow); text-align: center; }
.team-avatar { width: 66px; height: 66px; margin: 0 auto 18px; border-radius: 50%; background: linear-gradient(135deg, #eaf2fb, #d8e7f7); border: 1px solid #cfe0f2; display: flex; align-items: center; justify-content: center; color: var(--blue-600); }
.team-name { font-size: 17px; font-weight: 700; color: var(--blue-950); }
.team-role { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--blue-600); font-weight: 700; margin-top: 6px; }
.team-meta { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-2); font-size: 13px; color: var(--muted); line-height: 1.95; text-align: left; }
.team-meta b { color: var(--blue-900); font-weight: 650; }
.team-card.is-placeholder { border-style: dashed; background: transparent; box-shadow: none; }
.team-card.is-placeholder .team-avatar { background: #f4f7fa; border-color: #dfe7ef; color: #b9c7d6; }
.team-card.is-placeholder .team-name { color: #aeb9c6; }
.team-card.is-placeholder .team-role { color: #b9c5d1; }

.team-card.is-featured { grid-column: 1 / -1; display: grid; grid-template-columns: 132px 1fr; gap: 26px; align-items: start; text-align: left; }
.team-featured-avatar { width: 132px; height: 176px; border-radius: 12px; overflow: hidden; background: var(--blue-50); border: 1px solid var(--line); }
.team-featured-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.team-featured-body .team-name { text-align: left; }
.team-featured-body .team-role { text-align: left; margin-top: 8px; }
.team-focus { font-size: 13px; color: var(--blue-700); margin-top: 12px; font-weight: 650; }
.team-bio { margin-top: 12px; font-size: 14px; color: var(--ink-2); line-height: 1.9; text-align: left; }
@media (max-width: 700px) {
  .team-card.is-featured { grid-template-columns: 1fr; gap: 18px; }
  .team-featured-avatar { width: 120px; height: 160px; }
}
@media (max-width: 1000px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .team-grid { grid-template-columns: 1fr; } }

/* ---------- Simple list (download / publications) ---------- */
.list-empty { text-align: center; padding: 40px 20px; color: var(--muted); font-size: 14px; }
.list-empty b { display: block; color: var(--ink-2); font-size: 15.5px; margin-bottom: 6px; }

/* ---------- Language switcher (far right of top-level nav) ---------- */
.lang-switch { display: inline-flex; align-items: center; gap: 2px; margin-left: 10px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: #f4f8fc; }
.nav-links .lang-switch a,
.nav-links .lang-switch .on { display: inline-flex; align-items: center; justify-content: center; padding: 6px 10px; border-radius: 6px; font-size: 12px; font-weight: 700; line-height: 1; white-space: nowrap; }
.nav-links .lang-switch a { color: var(--muted-2); }
.nav-links .lang-switch a:hover { color: var(--blue-700); background: #fff; }
.nav-links .lang-switch .on { color: #fff; background: var(--blue-700); box-shadow: 0 2px 6px rgba(21, 83, 155, .2); }
@media (max-width: 760px) {
  .lang-switch { margin-left: 0; margin-top: 8px; align-self: flex-start; }
}
