/* STARC Institute — site stylesheet.
   System fonts only: Google Fonts and most CDNs are unreliable in mainland China. */

:root {
  --paper: #f7f5f0;
  --surface: #ffffff;
  --ink: #101a36;
  --ink-soft: #3b4560;
  --muted: #646c80;
  --line: #e2ded4;
  --accent: #2563d9;
  --accent-ink: #1a4cb0;
  --accent-wash: #e9effc;
  --navy: #0a1230;
  --navy-2: #13235a;
  --glow: #5aa9ff;
  --on-navy: #e8eeff;
  --on-navy-muted: #a7b4d8;
  --ok: #1f7a4d;
  --no: #b3402f;

  --serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
          "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --max: 1080px;
  --prose: 720px;
  --radius: 10px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0c1124;
    --surface: #131a33;
    --ink: #e9edf8;
    --ink-soft: #c3cbe0;
    --muted: #8f99b3;
    --line: #253055;
    --accent: #6ea8ff;
    --accent-ink: #8fbcff;
    --accent-wash: #16244a;
    --navy: #070b1c;
    --navy-2: #0f1b45;
    --ok: #5cc493;
    --no: #f08a77;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.75 var(--sans);
  -webkit-font-smoothing: antialiased;
}
:lang(zh) body, body:lang(zh) { line-height: 1.85; }
img { max-width: 100%; height: auto; }
a { color: var(--accent-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.25; margin: 0 0 .6em; letter-spacing: -.005em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); }
h3 { font-size: 1.22rem; }
p { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.3em; margin: 0 0 1.1em; }
li { margin-bottom: .35em; }
strong { font-weight: 650; }
hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.prose { max-width: var(--prose); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--surface); padding: 8px 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--navy) 92%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--on-navy); text-decoration: none; margin-right: auto; }
.brand:hover { color: #fff; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand-name { font-family: Georgia, "Times New Roman", serif; font-size: 1.28rem; letter-spacing: .06em; font-weight: 600; }
.brand-sub { font-size: .8rem; color: var(--on-navy-muted); letter-spacing: .08em; margin-left: 2px; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--on-navy-muted); text-decoration: none; font-size: .93rem; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; }
.nav .lang { border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 2px 11px; font-size: .82rem; }
.btn {
  display: inline-flex; align-items: center; gap: .45em;
  background: var(--accent); color: #fff; text-decoration: none;
  padding: .62em 1.15em; border-radius: 999px; font-weight: 600; font-size: .95rem; line-height: 1.2;
  border: 1px solid transparent; transition: background .15s, transform .15s;
}
.btn:hover { background: var(--accent-ink); color: #fff; }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn.ghost:hover { background: rgba(255,255,255,.08); }
.site-header .btn { padding: .5em 1em; font-size: .88rem; background: #3b7bf0; }
@media (prefers-color-scheme: dark) { .btn { color: #071026; } .btn:hover { color: #071026; } .site-header .btn { color: #fff; } }

.menu { display: none; }
@media (max-width: 860px) {
  .nav { display: none; }
  .menu { display: block; position: relative; }
  .menu summary {
    list-style: none; cursor: pointer; color: var(--on-navy);
    border: 1px solid rgba(255,255,255,.2); border-radius: 8px; padding: 5px 12px; font-size: .9rem;
  }
  .menu summary::-webkit-details-marker { display: none; }
  .menu[open] .menu-panel { display: flex; }
  .menu-panel {
    display: none; flex-direction: column; position: absolute; right: 0; top: 46px; min-width: 220px;
    background: var(--navy-2); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 10px;
    box-shadow: 0 18px 40px rgba(0,0,0,.35);
  }
  .menu-panel a { color: var(--on-navy); text-decoration: none; padding: 9px 12px; border-radius: 8px; }
  .menu-panel a:hover { background: rgba(255,255,255,.07); }
  .brand-sub { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--on-navy);
  background: radial-gradient(1200px 500px at 85% 120%, #1d4fb8 0%, transparent 60%),
              linear-gradient(170deg, var(--navy) 0%, var(--navy-2) 100%);
  padding: 96px 0 120px;
}
.hero.small { padding: 72px 0 88px; }
.hero .arcs { position: absolute; inset: auto 0 0 0; width: 100%; height: 100%; pointer-events: none; }
.hero .wrap { position: relative; }
.hero h1 { color: #fff; max-width: 16em; }
.hero .lead { color: var(--on-navy-muted); font-size: 1.18rem; max-width: 36em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero .btn.ghost { color: var(--on-navy); border-color: rgba(255,255,255,.35); }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.hero .eyebrow { color: var(--glow); }
.crumbs { font-size: .85rem; color: var(--on-navy-muted); margin-bottom: 14px; }
.crumbs a { color: var(--on-navy-muted); }

/* ---------- Sections ---------- */
section.block { padding: 84px 0; }
section.block + section.block { border-top: 1px solid var(--line); }
section.tint { background: var(--surface); }
.section-head { max-width: var(--prose); margin-bottom: 40px; }
.section-head p { color: var(--muted); font-size: 1.07rem; }
.lead { font-size: 1.15rem; color: var(--ink-soft); }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

.grid { display: grid; gap: 20px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid.three, .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid.two, .grid.three, .grid.four { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 26px 22px; display: flex; flex-direction: column;
}
section.tint .card { background: var(--paper); }
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card .tag { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.card .more { margin-top: auto; padding-top: 14px; font-weight: 600; text-decoration: none; }
.card.feature { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); box-shadow: 0 1px 0 var(--accent) inset; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--surface); padding: 22px 20px; }
.stat b { display: block; font-family: var(--serif); font-size: 2rem; line-height: 1.1; color: var(--ink); }
.stat span { font-size: .88rem; color: var(--muted); }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; display: grid; gap: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 26px 58px; margin: 0; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: .95rem;
  background: var(--accent-wash); color: var(--accent-ink); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.steps li::after { content: ""; position: absolute; left: 18.5px; top: 42px; bottom: 4px; width: 1px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps h3 { font-family: var(--sans); font-size: 1.05rem; font-weight: 650; margin: 5px 0 4px; }
.steps p { margin: 0; color: var(--ink-soft); }

.checks, .crosses { list-style: none; padding: 0; }
.checks li, .crosses li { position: relative; padding-left: 30px; margin-bottom: .7em; }
.checks li::before, .crosses li::before { position: absolute; left: 0; top: 0; font-weight: 700; }
.checks li::before { content: "✓"; color: var(--ok); }
.crosses li::before { content: "✕"; color: var(--no); }

.callout {
  border-left: 3px solid var(--accent); background: var(--accent-wash);
  padding: 18px 22px; border-radius: 0 var(--radius) var(--radius) 0; margin: 0 0 1.4em;
}
.callout p:last-child { margin: 0; }
.callout.plain { border-left-color: var(--line); background: var(--surface); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 1.4em; }
table { border-collapse: collapse; width: 100%; font-size: .96rem; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 650; background: color-mix(in srgb, var(--paper) 60%, var(--surface)); }
tr:last-child td { border-bottom: 0; }
td.num { white-space: nowrap; font-weight: 650; color: var(--accent-ink); }

.empty {
  border: 1px dashed color-mix(in srgb, var(--muted) 50%, transparent); border-radius: var(--radius);
  padding: 30px 26px; text-align: center; color: var(--muted);
}
.empty strong { display: block; color: var(--ink); font-family: var(--serif); font-size: 1.15rem; margin-bottom: 6px; }

details.qa { border-bottom: 1px solid var(--line); }
details.qa summary {
  cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative;
  font-family: var(--serif); font-size: 1.12rem; font-weight: 600;
}
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after { content: "+"; position: absolute; right: 6px; top: 16px; font-size: 1.5rem; color: var(--accent); font-family: var(--sans); font-weight: 400; }
details.qa[open] summary::after { content: "–"; }
details.qa .a { padding: 0 0 18px; color: var(--ink-soft); }

.cta-band { background: var(--navy); color: var(--on-navy); padding: 70px 0; }
.cta-band h2 { color: #fff; }
.cta-band p { color: var(--on-navy-muted); max-width: 40em; }
.cta-band .btn.ghost { color: var(--on-navy); border-color: rgba(255,255,255,.35); }
.cta-band .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { border-top: 1px solid var(--line); padding: 24px 0; margin: 0; display: grid; grid-template-columns: 130px 1fr; gap: 20px; }
.post-list li:last-child { border-bottom: 1px solid var(--line); }
.post-list .meta { font-size: .85rem; color: var(--muted); padding-top: 4px; }
.post-list h3 { margin-bottom: .3em; }
.post-list h3 a { color: var(--ink); text-decoration: none; }
.post-list h3 a:hover { color: var(--accent); }
.post-list p { margin: 0; color: var(--ink-soft); }
@media (max-width: 600px) { .post-list li { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: var(--on-navy-muted); padding: 56px 0 40px; font-size: .92rem; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.site-footer h4 { font-family: var(--sans); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--on-navy); margin-bottom: 12px; }
.site-footer a { color: var(--on-navy-muted); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer .fine { border-top: 1px solid rgba(255,255,255,.08); margin-top: 40px; padding-top: 20px; font-size: .82rem; }
@media (max-width: 720px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } .site-footer .cols > :first-child { grid-column: 1 / -1; } }

.lang-hint {
  display: none; background: var(--accent-wash); color: var(--ink); font-size: .9rem; text-align: center; padding: 8px 16px;
}
.lang-hint.show { display: block; }

/* ---------- Articles (blogs + resources) ---------- */
.article { padding: 64px 0 40px; }
.article .wrap > section { max-width: var(--prose); margin: 0 auto 3.2rem; }
.article h2 { margin-top: .4em; }
.article h3 { margin-top: 1.6em; }
.article .inner > header h2 { padding-bottom: .4em; border-bottom: 1px solid var(--line); }
.article img, .article figure img { display: block; margin: 1.5em auto; border-radius: 6px; background: #fff; }
.article .image.fit img { width: 100%; }
.article .table-wrapper { overflow-x: auto; margin-bottom: 1.4em; }
.article mjx-container { overflow-x: auto; overflow-y: hidden; }
.guide-box, .consensus-box, .debate-box, .insight-box {
  border-left: 3px solid var(--line); background: var(--surface);
  padding: 18px 22px; margin: 1.8em 0; border-radius: 0 var(--radius) var(--radius) 0;
}
.guide-box h3, .consensus-box h3, .debate-box h3, .insight-box h3 { margin-top: 0; font-size: 1.05rem; }
.consensus-box { border-left-color: var(--accent); }
.debate-box { border-left-color: #c98a3d; }
.insight-box { border-left-color: var(--glow); background: var(--accent-wash); }
.source-list { list-style: none; padding-left: 0; }
.source-list li { padding: .8em 0; border-top: 1px solid var(--line); }
.profile-intro { color: var(--muted); font-style: italic; }
.byline { color: var(--on-navy-muted); font-size: .95rem; }
.byline a { color: var(--on-navy); }

@media (max-width: 640px) {
  th, td { padding: 10px 12px; }
  td:first-child, th:first-child { min-width: 5.5em; }
  td.num { white-space: normal; }
}

/* ---------- Blog ---------- */
.pill { display: inline-block; margin-top: 6px; font-size: .72rem; font-weight: 650; letter-spacing: .04em; color: var(--accent-ink); background: var(--accent-wash); border-radius: 999px; padding: 1px 9px; }
.answer { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; padding: 20px 24px; margin: 0 0 2.4em; }
.answer .eyebrow { margin-bottom: 6px; }
.answer p { margin: 0; font-size: 1.08rem; color: var(--ink); }
.post h2 { margin-top: 1.8em; }
.post code { font-family: var(--mono); font-size: .9em; background: var(--accent-wash); padding: 1px 5px; border-radius: 4px; }
.cta-card { background: var(--navy); color: var(--on-navy-muted); border-radius: var(--radius); padding: 28px; margin: 3em 0 1.6em; }
.cta-card h3 { color: #fff; margin-top: 0; }
.cta-card .btn.ghost { color: var(--on-navy); border-color: rgba(255,255,255,.35); margin-left: 6px; }
