@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* BlockReal Design System — DigiMedia light theme (Poppins · purple #726ae3 + pink #fa65b1) */
/* Re-skin of station 18: same class + variable names, new visual language */

:root {
  /* Surfaces */
  --bg: #ffffff;
  --bg-soft: #f6f6fc;          /* cool lavender-white for alt sections (not warm cream) */
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.86);
  --border: #ececf3;
  --border-hover: #726ae3;

  /* Text */
  --text: #3d3d47;             /* body — ~10:1 on white */
  --text-muted: #5b5b67;       /* secondary — ~6.6:1 */
  --text-dim: #767682;         /* tertiary — ~4.7:1 */
  --heading: #2a2a2a;          /* DigiMedia ink */

  /* Brand accents */
  --accent: #726ae3;           /* purple — primary */
  --accent-strong: #574fc4;    /* deeper purple for text links (~6.2:1) */
  --accent-2: #fa65b1;         /* pink — secondary / decorative */
  --accent-light: #e94f9a;     /* inline emphasis pink (passes large-text AA) */
  --accent-gradient: linear-gradient(135deg, #726ae3 0%, #fa65b1 100%);
  --accent-gradient-2: linear-gradient(135deg, #8b7bff 0%, #726ae3 100%);

  /* Status */
  --success: #1c8a5f;
  --warning: #b5751a;
  --danger: #d63333;
  --info: #5a51c9;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --shadow: 0 2px 24px rgba(114, 106, 227, 0.08);
  --shadow-card: 0 6px 28px rgba(42, 42, 42, 0.06);
  --shadow-hover: 0 18px 44px rgba(114, 106, 227, 0.18);
  --shadow-btn: 0 8px 22px rgba(114, 106, 227, 0.28);

  --font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --max-w: 1140px;
  --max-w-article: 800px;
  --transition: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
[id] { scroll-margin-top: 88px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  font-weight: 400;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Pastel hero wash (DigiMedia-style soft blobs) */
body::before {
  content: '';
  position: fixed;
  top: -22%; left: -12%;
  width: 60vw; height: 60vh;
  background: radial-gradient(ellipse, rgba(114, 106, 227, 0.10) 0%, transparent 68%);
  pointer-events: none;
  z-index: -1;
}
body::after {
  content: '';
  position: fixed;
  top: -10%; right: -14%;
  width: 55vw; height: 55vh;
  background: radial-gradient(ellipse, rgba(250, 101, 177, 0.09) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
a { color: var(--accent-strong); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-2); }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ==================== HEADER ==================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 66px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--heading);
  font-weight: 700; font-size: 1.2rem;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--accent); }
.brand-mark { width: 36px; height: 36px; flex-shrink: 0; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-name { white-space: nowrap; }
/* Logo / brand-image fallback sizing — prevents an unsized logo from blowing up the header if CSS/img cache mixes */
.site-header img, .brand img, .brand-mark img { max-height: 40px; width: auto; max-width: 200px; height: auto; }

/* Navigation */
.site-nav {
  display: flex; align-items: center; gap: 4px;
  list-style: none; flex-wrap: wrap;
}
.site-nav a { color: var(--text-muted); }
.nav-text,
.site-nav > li > a:not(.nav-cta) {
  display: inline-block;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 0.92rem; font-weight: 500;
  transition: all var(--transition);
}
.nav-text:hover,
.site-nav > li > a:not(.nav-cta):hover { color: var(--accent); background: var(--bg-soft); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 20px;
  background: var(--accent-2);
  color: #fff !important;
  border-radius: var(--radius-pill);
  font-weight: 600; font-size: 0.9rem;
  box-shadow: 0 6px 16px rgba(250, 101, 177, 0.30);
  transition: transform var(--transition), box-shadow var(--transition);
}
.nav-cta .nav-text { padding: 0; color: #fff; background: none; }
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(250, 101, 177, 0.42); color: #fff !important; }

/* Language switch */
.lang-switch { position: relative; }
.lang-switch summary {
  cursor: pointer; padding: 7px 14px;
  border-radius: var(--radius-pill); font-size: 0.88rem;
  color: var(--text-muted); list-style: none;
  border: 1px solid var(--border);
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary:hover { color: var(--accent); border-color: var(--accent); }
.lang-dropdown {
  position: absolute; right: 0; top: 120%;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px 6px;
  min-width: 150px; box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; z-index: 200;
}
.lang-dropdown a {
  padding: 7px 14px; border-radius: 8px;
  color: var(--text-muted); font-size: 0.88rem;
}
.lang-dropdown a:hover { background: var(--bg-soft); color: var(--accent); }

/* ==================== HERO ==================== */
.hero {
  padding: 92px 0 64px;
  text-align: center;
  position: relative;
}
.hero-badge {
  display: inline-block;
  padding: 7px 18px;
  background: rgba(114, 106, 227, 0.10);
  border: 1px solid rgba(114, 106, 227, 0.22);
  border-radius: var(--radius-pill);
  font-size: 0.86rem; font-weight: 600;
  color: var(--accent);
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.4rem);
  font-weight: 800; color: var(--heading);
  line-height: 1.18; margin-bottom: 18px;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.hero-lead {
  font-size: 1.16rem; color: var(--text-muted);
  max-width: 660px; margin: 0 auto 34px;
  line-height: 1.7;
  text-wrap: pretty;
}
.hero-cta-row {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
}

/* Buttons — pill, DigiMedia flavor */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 30px;
  font-weight: 600; font-size: 1rem; font-family: var(--font);
  border-radius: var(--radius-pill); border: none; cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(114, 106, 227, 0.40); color: #fff; }
.btn-primary:active { transform: translateY(0); }
.btn-outline {
  background: #fff;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-outline:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }
.btn-outline:active { transform: translateY(0); }

/* ==================== CATEGORY TAGS ==================== */
.category-nav {
  display: flex; gap: 8px; flex-wrap: wrap;
  justify-content: center;
  margin: 0 0 32px;
}
.cat-tag {
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.86rem;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: #fff;
  transition: all var(--transition);
  cursor: pointer; text-decoration: none;
}
.cat-tag:hover, .cat-tag.active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

/* ==================== SECTION ==================== */
.section { padding: 56px 0; }
.section-alt { padding: 56px 0; background: var(--bg-soft); }
.section-title {
  font-size: clamp(1.6rem, 3.4vw, 2.15rem); font-weight: 700;
  color: var(--heading);
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.section-title::after {
  content: '';
  display: block;
  width: 54px; height: 4px;
  margin: 16px auto 0;
  border-radius: var(--radius-pill);
  background: var(--accent-gradient);
}
.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 40px;
  font-size: 1.02rem;
}

/* ==================== CARDS ==================== */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 24px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative; overflow: hidden;
}
.card::before {
  content: '';
  position: absolute; inset: 0 0 auto 0;
  height: 4px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--transition);
}
.card:hover {
  border-color: transparent;
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}
.card:hover::before { opacity: 1; }
.card h3 {
  font-size: 1.16rem; font-weight: 700;
  color: var(--heading); margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.card p {
  color: var(--text-muted); font-size: 0.94rem;
  line-height: 1.7;
}
.card-link {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 16px; font-weight: 600; font-size: 0.92rem;
  color: var(--accent);
}
.card-link:hover { color: var(--accent-2); gap: 9px; }
.mt-2 { margin-top: 10px; }

/* Tags — soft pastel pills (DigiMedia multi-color) */
.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.tag-amber { background: #fdeccf; color: #9a6212; }
.tag-blue  { background: #e4ecff; color: #3a5fd9; }
.tag-red   { background: #ffe1e1; color: #d63333; }
.tag-green { background: #d8f3e7; color: #1c8a5f; }
.tag-cyan  { background: #d6f4f8; color: #0e7c8a; }

/* ==================== ARTICLE HEADER ==================== */
.article-header {
  padding: 72px 0 28px;
  border-bottom: 1px solid var(--border);
}
.article-header h1 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  font-weight: 800; color: var(--heading); line-height: 1.22;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.article-header h1 small {
  display: block; font-size: 0.46em;
  color: var(--text-muted); font-weight: 400;
  margin-top: 8px; line-height: 1.5;
}
.subtitle {
  font-size: 1.1rem; color: var(--text-muted);
  margin-top: 10px; line-height: 1.6;
}

/* ==================== ARTICLE BODY ==================== */
main.container { max-width: var(--max-w-article); padding-top: 24px; padding-bottom: 72px; }
main.container h2 {
  font-size: 1.5rem; font-weight: 700;
  color: var(--heading); margin: 44px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.01em;
}
main.container h3 {
  font-size: 1.18rem; font-weight: 600;
  color: var(--heading); margin: 28px 0 12px;
}
main.container p { margin-bottom: 16px; }
main.container ul, main.container ol { margin: 0 0 20px 26px; }
main.container li { margin-bottom: 8px; }
main.container strong { color: var(--heading); font-weight: 600; }

/* Concept box */
.concept-box {
  background: linear-gradient(135deg, rgba(114, 106, 227, 0.07), rgba(250, 101, 177, 0.07));
  border: 1px solid rgba(114, 106, 227, 0.20);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  margin: 26px 0;
  font-size: 1.05rem;
  color: var(--text);
}

/* Analogy box — full border + tint (no side stripe) */
.analogy-box {
  background: rgba(114, 106, 227, 0.06);
  border: 1px solid rgba(114, 106, 227, 0.18);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 22px 0;
}
.analogy-box p { margin: 0; }

/* Lead paragraph — opener hook (§23.1) */
p.lead {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--text);
  margin: 22px 0 26px;
}
p.lead strong { color: var(--heading); }

/* Callout */
.callout {
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 22px 0;
  font-size: 0.96rem;
}
.callout h3 { margin: 0 0 6px; border: none; padding: 0; font-size: 1.02rem; }
.callout strong { color: var(--heading); }
.callout p { margin: 6px 0 0; color: var(--text-muted); }
.callout-warning { background: #fff6e9; border: 1px solid #f3d9a8; }
.callout-danger  { background: #ffeded; border: 1px solid #f6c2c2; }
.callout-info    { background: #eef0ff; border: 1px solid #cdd3f7; }
.callout-success { background: #e7f6ef; border: 1px solid #b6e3cd; }

/* TOC */
nav.toc {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 26px 0;
}
nav.toc h2 {
  font-size: 1.02rem; margin: 0 0 12px !important;
  border: none !important; padding: 0 !important;
  color: var(--accent);
}
nav.toc ol { margin: 0 0 0 20px !important; }
nav.toc li { margin-bottom: 6px !important; font-size: 0.94rem; }

/* FAQ */
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 14px 0;
  padding: 20px 24px;
  box-shadow: var(--shadow-card);
}
.faq-item h3 {
  font-size: 1.04rem; margin: 0 0 8px !important;
  border: none !important; padding: 0 !important;
  color: var(--heading);
}
.faq-item p {
  color: var(--text-muted); margin: 0;
  font-size: 0.94rem;
}

/* Tables */
.compare-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.92rem; margin: 24px 0;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-card);
}
.compare-table th {
  background: var(--accent);
  color: #fff;
  padding: 13px 16px;
  text-align: left;
  font-weight: 600;
}
.compare-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tbody tr:hover td { background: var(--bg-soft); }

/* Checklist */
.checklist { list-style: none; margin-left: 0 !important; }
.checklist li { padding: 5px 0; }

/* Related articles */
.related-articles { margin: 36px 0 16px; }
.related-articles h2 {
  font-size: 1.18rem !important; margin-bottom: 14px !important;
  border: none !important; padding: 0 !important;
}
.related-articles ul { list-style: none; margin: 0 !important; padding: 0; }
.related-articles li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.related-articles li:last-child { border-bottom: none; }
.related-articles a { font-weight: 500; }

/* Chain flow */
.chain-flow {
  display: flex; align-items: center; gap: 10px;
  overflow-x: auto; padding: 18px 0;
  flex-wrap: wrap; justify-content: center;
}
.chain-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  text-align: center;
  min-width: 130px;
  box-shadow: var(--shadow-card);
}
.chain-arrow { color: var(--accent); font-size: 1.3rem; font-weight: 700; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #fff; font-weight: 700; font-size: 0.85rem;
  margin-right: 8px;
}

/* Trust note */
.trust-note {
  margin: 44px 0 0;
  padding: 18px 22px;
  border-top: 1px solid var(--border);
  font-size: 0.86rem;
  color: var(--text-dim);
}

/* ==================== FOOTER ==================== */
.site-footer {
  background: #2b2a35;
  padding: 40px 0;
  text-align: center;
  color: #b6b6c4;
  font-size: 0.88rem;
}
.site-footer a { color: #d6d6e2; }
.site-footer a:hover { color: var(--accent-2); }
.site-footer .footer-safety { max-width: 780px; margin: 0 auto 14px; font-size: 0.8rem; color: #9a9aa8; line-height: 1.65; }
.site-footer .footer-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; margin-bottom: 14px; font-size: 0.85rem; }
.site-footer .footer-copy { font-size: 0.85rem; color: #8a8a96; }

/* Split hero (copy left, precheck card right) */
.hero-split .container {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: 48px; align-items: center; text-align: left;
}
.hero-split .hero-copy { text-align: left; }
.hero-split .hero-cta-row { justify-content: flex-start; }
.hero-split .hero-lead { margin-left: 0; }
.hero-split .precheck-wrap { display: flex; justify-content: center; }
@media (max-width: 880px) {
  .hero-split .container { grid-template-columns: 1fr; gap: 28px; text-align: center; }
  .hero-split .hero-copy { text-align: center; }
  .hero-split .hero-cta-row { justify-content: center; }
}

/* ==================== ARTICLE BYLINE ==================== */
.article-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-top: 14px;
  font-size: 0.9rem; color: var(--text-dim);
}
.article-meta a { color: var(--accent); font-weight: 600; }
.article-meta a:hover { color: var(--accent-2); }
.am-dot { color: var(--border); }

/* ==================== SAFETY NOTE ==================== */
.safety-note {
  background: #fff7fb;
  border: 1px solid #f3d4e6;
  border-radius: var(--radius);
  padding: 12px 18px;
  margin: 20px 0;
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.safety-note strong { color: var(--accent); }

/* ==================== PRECHECK CARD (注册前核对卡) ==================== */
.precheck {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 24px 26px;
  max-width: 420px;
  width: 100%;
}
.precheck h3 {
  font-size: 1.08rem; font-weight: 700; color: var(--heading);
  margin: 0 0 4px;
}
.precheck .precheck-sub {
  font-size: 0.84rem; color: var(--text-dim); margin: 0 0 16px;
}
.precheck-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px 12px;
  flex-wrap: wrap;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.precheck-row:last-of-type { border-bottom: none; }
.precheck-row .pk-label { color: var(--text-muted); flex-shrink: 0; }
.precheck-row .pk-val { color: var(--heading); font-weight: 600; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.precheck-row .pk-val.pk-code {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace;
  background: rgba(114,106,227,0.10); color: var(--accent);
  padding: 2px 10px; border-radius: 6px; letter-spacing: 0.04em;
}
.precheck-disclosure {
  font-size: 0.8rem; color: var(--text-dim); line-height: 1.6;
  margin: 14px 0 16px; padding-top: 14px; border-top: 1px solid var(--border);
}
.precheck .btn { width: 100%; justify-content: center; }

@media (max-width: 768px) {
  .precheck { max-width: 100%; margin-top: 24px; }
}

/* ==================== MOTION ==================== */
@media (prefers-reduced-motion: no-preference) {
  .hero-badge { animation: fadeUp 0.6s var(--transition) both; }
  .hero h1 { animation: fadeUp 0.6s var(--transition) 0.08s both; }
  .hero-lead { animation: fadeUp 0.6s var(--transition) 0.16s both; }
  .hero-cta-row { animation: fadeUp 0.6s var(--transition) 0.24s both; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .site-header .container { height: auto; flex-wrap: wrap; padding: 12px 16px; gap: 8px; }
  .site-nav { gap: 4px; }
  .nav-text { padding: 5px 11px; font-size: 0.82rem; }
  .hero { padding: 58px 0 44px; }
  .hero h1 { font-size: 1.85rem; }
  .hero-lead { font-size: 1.04rem; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .chain-flow { flex-direction: column; }
  .chain-arrow { transform: rotate(90deg); }
  .article-header { padding: 48px 0 22px; }
  main.container h2 { font-size: 1.32rem; }
  .section, .section-alt { padding: 44px 0; }
  .compare-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 480px) {
  body { font-size: 15px; }
  .hero h1 { font-size: 1.6rem; }
  .btn { padding: 13px 24px; font-size: 0.95rem; }
  .compare-table { font-size: 0.84rem; }
  .compare-table th, .compare-table td { padding: 10px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
}
