/* 星网数科多模态内容合成算法 · 加盟选择专家
   机构级商业智能平台设计系统 */

:root {
  --bg: #f5f5f7;
  --bg-elevated: #ffffff;
  --ink: #1d1d1f;
  --ink-soft: #424245;
  --muted: #6e6e73;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.15);
  --emerald-900: #0a3633;
  --emerald-800: #115e59;
  --emerald-700: #0f766e;
  --emerald-600: #0d9488;
  --emerald-100: #ccfbf1;
  --emerald-50: #eefaf8;
  --amber-800: #92400e;
  --amber-700: #b45309;
  --amber-600: #d97706;
  --amber-100: #fef3c7;
  --amber-50: #fffbeb;
  --command: #111315;
  --command-2: #1d1d1f;
  --danger: #dc2626;
  --ok: #059669;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.11);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --header-h: 58px;
  --container: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body.modal-open { overflow: hidden; }

img, video, svg { max-width: 100%; }

img, video { display: block; }

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

button { cursor: pointer; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4, p { margin: 0; }

ul, ol { margin: 0; padding: 0; }

li { list-style: none; }

::selection { background: #99f6e4; color: #134e4a; }

:focus-visible {
  outline: 2px solid var(--emerald-600);
  outline-offset: 2px;
}

.num, .credit-pill, .badge-credit, .score-value, .kpi-value, .data-table td.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -40px;
  z-index: 80;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
}

.skip-link:focus { top: 12px; }

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

.section { padding: 64px 0; }
.section-tight { padding: 32px 0; }

.kicker {
  margin: 0 0 8px;
  color: var(--emerald-700);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.muted { color: var(--muted); }
.text-emerald { color: var(--emerald-700); }
.text-gold { color: var(--amber-700); }

h1, .h1 {
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.18;
  letter-spacing: -0.025em;
  font-weight: 700;
}

h2, .h2 {
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h3, .h3 { font-size: 20px; line-height: 1.35; font-weight: 680; }

.lead { color: var(--ink-soft); font-size: 17px; line-height: 1.7; }

.grid-2, .grid-3, .grid-4, .split-2 { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split-2 { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 28px; }

.site-main { min-height: calc(100vh - 420px); }

/* Buttons — Apple Pill & Squircle System */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-bd: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 980px;
  border: 1px solid var(--btn-bd);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.16s var(--ease), color 0.16s var(--ease), border-color 0.16s var(--ease), transform 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: 13px; border-radius: 980px; }
.btn-lg { min-height: 46px; padding: 0 22px; font-size: 15px; }
.btn-block { width: 100%; }

.btn-primary { --btn-bg: #1d1d1f; --btn-fg: #fff; --btn-bd: #1d1d1f; color: #fff !important; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12); }
.btn-primary:hover { --btn-bg: var(--emerald-700); --btn-bd: var(--emerald-700); color: #fff !important; }

.btn-secondary { --btn-bg: var(--ink-soft); --btn-fg: #fff; --btn-bd: var(--ink-soft); color: #fff !important; }
.btn-secondary:hover { --btn-bg: var(--ink); --btn-bd: var(--ink); color: #fff !important; }

.btn-gold { --btn-bg: var(--emerald-700); --btn-fg: #fff; --btn-bd: var(--emerald-700); color: #fff !important; box-shadow: 0 2px 10px rgba(15, 118, 110, 0.22); }
.btn-gold:hover { --btn-bg: var(--emerald-800); --btn-bd: var(--emerald-800); color: #fff !important; }

.btn-outline { --btn-bg: #fff; --btn-fg: #1d1d1f; --btn-bd: rgba(0, 0, 0, 0.14); color: #1d1d1f !important; }
.btn-outline:hover { --btn-bg: #f5f5f7; --btn-bd: rgba(0, 0, 0, 0.24); color: #1d1d1f !important; }

.btn-ghost { --btn-bg: transparent; --btn-fg: var(--ink-soft); --btn-bd: transparent; }
.btn-ghost:hover { --btn-bg: rgba(0, 0, 0, 0.05); --btn-fg: var(--ink); }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.6;
  white-space: nowrap;
}

.badge-modality { background: var(--emerald-50); color: var(--emerald-800); border-color: #99f6e4; }
.badge-watermark { background: var(--command); color: #f8fafc; border-color: rgba(255, 255, 255, 0.08); }
.badge-credit { background: var(--amber-50); color: var(--amber-800); border-color: #fde68a; }
.badge-verified { background: #ecfdf5; color: var(--ok); border-color: #a7f3d0; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { display: inline-flex; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-name { font-size: 15px; font-weight: 720; letter-spacing: -0.01em; color: var(--ink); }
.brand-sub { margin-top: 3px; font-size: 11px; color: var(--muted); letter-spacing: 0.04em; }

.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-link {
  padding: 6px 11px;
  border-radius: 980px;
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 500;
  transition: color 0.16s var(--ease), background 0.16s var(--ease);
}
.nav-link:hover { color: var(--ink); background: rgba(0, 0, 0, 0.045); }
.nav-link.is-active { color: var(--ink); background: rgba(0, 0, 0, 0.07); font-weight: 650; }

.nav-auth { display: flex; align-items: center; gap: 8px; margin-left: 10px; }
.nav-auth .btn { border-radius: 980px; padding-inline: 14px; font-size: 13px; }
.nav-auth .btn-gold { background: #1d1d1f; border-color: #1d1d1f; box-shadow: none; }
.nav-auth .btn-gold:hover { background: #0f766e; border-color: #0f766e; }
.nav-user { font-size: 14px; font-weight: 680; color: var(--ink); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-user:hover { color: var(--emerald-700); }

.credit-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f0fdfa, #ccfbf1);
  color: var(--emerald-900);
  border: 1px solid #99f6e4;
  font-size: 13px;
  font-weight: 720;
}
.credit-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fbbf24, var(--amber-600));
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

.mobile-nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.mobile-nav-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
}

.mobile-drawer {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  padding: 8px 20px 20px;
}
.mobile-drawer[hidden] { display: none !important; }
.mobile-drawer-nav { display: grid; gap: 4px; }
.mobile-nav-link {
  display: block;
  padding: 12px 12px;
  border-radius: 10px;
  color: var(--ink);
  font-weight: 640;
}
.mobile-nav-link.is-active { background: var(--emerald-50); color: var(--emerald-800); }
.mobile-drawer-auth { display: grid; gap: 8px; margin-top: 12px; }

/* Hero */
.hero { padding: 72px 0 56px; }
.hero-dark {
  color: #e2e8f0;
  background-color: var(--command);
  background-image:
    radial-gradient(880px 420px at 88% -10%, rgba(13, 148, 136, 0.32), transparent 58%),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: auto, 56px 56px, 56px 56px;
}
.hero-dark .lead, .hero-dark .brand-sub { color: #cbd5e1; }
.hero-dark h1, .hero-dark .brand-name { color: #f8fafc; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 40px; align-items: center; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero-lead { margin-top: 14px; max-width: 640px; }
.hero-panel, .command-panel {
  background: var(--command-2);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.hero-dark .hero-panel { background: rgba(17, 24, 39, 0.72); }
.hero-kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}
.kpi, .hero-kpi-strip .kpi {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
}
.hero-dark .kpi { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.08); }
.kpi-label { display: block; color: var(--muted); font-size: 12px; }
.hero-dark .kpi-label { color: #94a3b8; }
.kpi-value { display: block; margin-top: 4px; font-size: 26px; font-weight: 720; letter-spacing: -0.03em; color: var(--ink); }
.hero-dark .kpi-value { color: #f8fafc; }
.kpi-value em { font-style: normal; color: var(--amber-600); font-size: 14px; margin-left: 4px; }

/* Cards */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-hover { transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s var(--ease); }
.card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #99f6e4; }
.card-media { aspect-ratio: 16 / 9; overflow: hidden; background: #e2e8f0; }
.card-media img, .card-media video { width: 100%; height: 100%; object-fit: cover; }
.card-body, .showcase-body { padding: 16px 16px 18px; display: grid; gap: 10px; }
.card-kicker { color: var(--emerald-700); font-size: 12px; font-weight: 700; }
.card-title, .showcase-title { font-size: 18px; line-height: 1.35; }
.card-title a:hover, .showcase-title a:hover { color: var(--emerald-700); }
.card-desc, .showcase-summary { color: var(--ink-soft); font-size: 14px; line-height: 1.65; }
.kpi-row { display: flex; flex-wrap: wrap; gap: 12px 18px; }
.kpi-row strong { font-variant-numeric: tabular-nums; }

.city-card .city-rent, .project-card .payback { color: var(--amber-700); font-variant-numeric: tabular-nums; font-weight: 720; }
.project-card .roi, .article-card .meta { color: var(--emerald-700); font-variant-numeric: tabular-nums; }
.city-card, .project-card, .article-card, .showcase-card { overflow: hidden; height: 100%; }
.showcase-meta, .card-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.showcase-media { position: relative; background: var(--command); }
.showcase-media-image, .showcase-media-video { aspect-ratio: 16 / 9; }
.showcase-media img, .showcase-media video { width: 100%; height: 100%; object-fit: cover; }
.showcase-media-image .badge-watermark,
.showcase-media-video .badge-watermark { position: absolute; left: 10px; bottom: 10px; }
.showcase-media-text, .showcase-media-audio {
  aspect-ratio: auto;
  background: #f8fafc;
  color: var(--ink-soft);
  padding: 16px;
  display: grid;
  gap: 10px;
}
.showcase-media-text p {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
}

/* Tables */
.data-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.data-table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 14px; }
.data-table th, .data-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: #f8fafc; }
.data-table td.num, .data-table .num { text-align: right; }

/* GEO */
.geo-card {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--emerald-700);
  border-radius: 14px;
  padding: 22px 22px 18px;
  box-shadow: var(--shadow-sm);
}
.geo-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.geo-title { font-size: 22px; }
.geo-summary { color: var(--ink-soft); margin-bottom: 14px; }
.geo-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.geo-facts div {
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.geo-facts dt { color: var(--muted); font-size: 12px; }
.geo-facts dd { margin: 2px 0 0; font-weight: 680; font-variant-numeric: tabular-nums; }
.geo-source { margin-top: 14px; color: var(--muted); font-size: 13px; }
.geo-source span { margin-right: 8px; color: var(--emerald-800); font-weight: 700; }

/* Scores */
.score-bar-row { display: grid; gap: 6px; }
.score-bar-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.score-label { color: var(--ink-soft); font-weight: 640; }
.score-value { font-weight: 720; color: var(--ink); }
.score-max { color: var(--muted); font-weight: 600; }
.score-track {
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.score-fill {
  width: var(--score, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--emerald-700), var(--emerald-600));
}

/* Tabs — macOS Segmented Control */
.tabs-bar { display: flex; gap: 4px; padding: 4px; background: rgba(0, 0, 0, 0.055); border-radius: 12px; }
.tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 600;
  transition: background 0.16s var(--ease), color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
.tab-btn:hover { color: var(--ink); }
.tab-btn.is-active { background: #fff; color: #1d1d1f; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.09); }
.tab-panel { display: none; padding-top: 16px; }
.tab-panel.is-active { display: block; }
.tab-panel[hidden] { display: none !important; }

/* FAQ */
.faq-section { display: grid; gap: 16px; }
.faq-list { display: grid; gap: 8px; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.faq-heading { font-size: inherit; font-weight: inherit; }
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 0;
  background: #fff;
  text-align: left;
  font-weight: 680;
  color: var(--ink);
}
.faq-question:hover { background: #f8fafc; }
.faq-icon {
  width: 18px;
  height: 18px;
  position: relative;
  flex: none;
}
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  background: var(--emerald-700);
  border-radius: 1px;
}
.faq-icon::before { width: 12px; height: 1.5px; left: 3px; top: 8px; }
.faq-icon::after { width: 1.5px; height: 12px; left: 8px; top: 3px; transition: transform 0.16s var(--ease); }
.faq-item.is-open .faq-icon::after { transform: scaleY(0); }
.faq-answer { padding: 0 16px 14px; color: var(--ink-soft); }
.faq-answer[hidden] { display: none !important; }

/* Forms */
.form-group { display: grid; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 680; color: var(--ink-soft); }
.form-input, .form-select, .form-textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--ink);
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
.form-input, .form-select { min-height: 42px; }
.form-textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.form-input:hover, .form-select:hover, .form-textarea:hover { border-color: #94a3b8; }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--emerald-600);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.12);
}
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-error { margin: 0; color: var(--danger); font-size: 13px; }
.auth-form { display: grid; gap: 12px; }

/* Banners — Whisper-Quiet macOS Status Ribbon */
.guest-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px auto 20px;
  padding: 12px 18px;
  width: min(var(--container), calc(100% - 32px));
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
.xw-wrap .guest-banner, .wb-page-hero .guest-banner { width: 100%; margin: 20px 0 0; }
.guest-banner.is-authenticated { background: #ffffff; border-color: rgba(15, 118, 110, 0.2); }
.guest-banner-copy { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.guest-banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.16);
  flex: none;
}
.guest-banner-text { display: grid; gap: 2px; min-width: 0; }
.guest-banner-copy .kicker { font-size: 11px; margin: 0; letter-spacing: 0.06em; }
.guest-banner-copy strong { font-size: 14px; font-weight: 650; letter-spacing: -0.01em; color: #1d1d1f; }
.guest-banner-copy p:last-child { color: #6e6e73; font-size: 12.5px; margin: 0; line-height: 1.5; }
.guest-banner-actions { display: flex; flex-wrap: wrap; gap: 8px; flex: none; }

.compliance-strip {
  background: rgba(255, 255, 255, 0.92);
  border-block: 1px solid rgba(0, 0, 0, 0.07);
}
.compliance-strip-inner { display: flex; align-items: center; gap: 18px; padding: 13px 0; }
.compliance-flag {
  flex: none;
  margin: 0;
  padding: 5px 11px;
  border-radius: 980px;
  background: #1d1d1f;
  color: #fff;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.04em;
}
.compliance-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.compliance-meta li { display: grid; gap: 1px; min-width: 0; }
.compliance-meta span { color: #86868b; font-size: 11px; }
.compliance-meta strong { font-size: 13px; font-weight: 620; color: #1d1d1f; }
.compliance-meta a { color: var(--emerald-700); }

/* Footer */
.site-footer {
  margin-top: 48px;
  background: var(--command);
  color: #cbd5e1;
  padding: 48px 0 24px;
}
.footer-grid { display: grid; grid-template-columns: 1.15fr 0.7fr 0.9fr 1.25fr; gap: 32px; }
.footer-lead { margin-top: 14px; font-size: 13px; line-height: 1.7; max-width: 360px; }
.footer-location { margin-top: 10px; color: #94a3b8; font-size: 12px; }
.brand-on-dark .brand-name { color: #f8fafc; }
.brand-on-dark .brand-sub { color: #94a3b8; }
.footer-heading { margin: 0 0 12px; font-size: 13px; letter-spacing: 0.08em; color: #94a3b8; font-weight: 700; }
.footer-links { display: grid; gap: 8px; }
.footer-links a { color: #e2e8f0; font-size: 14px; }
.footer-links a:hover { color: #99f6e4; }
.footer-algo-meta dl { display: grid; gap: 8px; }
.footer-algo-meta div { display: grid; gap: 2px; }
.footer-algo-meta dt { color: #94a3b8; font-size: 11px; }
.footer-algo-meta dd { margin: 0; color: #f8fafc; font-size: 13px; line-height: 1.55; }
.footer-algo-meta a { color: #fbbf24; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 12px;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: rgba(15, 23, 42, 0.48);
}
.modal-backdrop[hidden] { display: none !important; }
.modal-dialog {
  width: min(520px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  padding: 22px 22px 18px;
}
.modal-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.modal-head h2 { font-size: 22px; }
.modal-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 20px;
  line-height: 1;
}
.modal-close:hover { background: #f8fafc; }
.modal-reason {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--amber-50);
  color: var(--amber-800);
  font-size: 13px;
}
.modal-footnote { margin-top: 8px; color: var(--muted); font-size: 12px; }

.toast-stack {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100% - 32px));
}
.toast {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--command);
  color: #f8fafc;
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.toast-success { background: var(--emerald-800); }
.toast-error { background: #7f1d1d; }
.toast-info { background: var(--command-2); }
.toast.is-leaving { opacity: 0; transform: translateY(6px); transition: opacity 0.18s var(--ease), transform 0.18s var(--ease); }

/* Breadcrumb */
.breadcrumb { padding: 16px 0 0; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--muted); font-size: 13px; }
.breadcrumb li { display: inline-flex; align-items: center; gap: 6px; }
.breadcrumb li + li::before { content: "/"; color: #cbd5e1; }
.breadcrumb a:hover { color: var(--emerald-700); }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 680; }

/* Prose */
.prose { color: var(--ink-soft); font-size: 16px; line-height: 1.8; }
.prose > * + * { margin-top: 0.9em; }
.prose h1, .prose h2, .prose h3, .prose h4 { color: var(--ink); line-height: 1.3; margin-top: 1.4em; }
.prose h1 { font-size: 32px; }
.prose h2 { font-size: 24px; }
.prose h3 { font-size: 18px; }
.prose a { color: var(--emerald-700); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose ul li, .prose ol li { list-style: disc; margin: 0.25em 0; }
.prose ol li { list-style: decimal; }
.prose blockquote {
  margin: 0;
  padding: 8px 0 8px 14px;
  border-left: 3px solid var(--emerald-600);
  color: var(--ink);
  background: var(--emerald-50);
  border-radius: 0 10px 10px 0;
}
.prose code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: #f1f5f9;
  padding: 0.1em 0.35em;
  border-radius: 5px;
}
.prose pre, .code-block {
  background: var(--command);
  color: #e2e8f0;
  border-radius: 12px;
  padding: 16px 18px;
  overflow: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color-scheme: dark;
}
.prose pre code { background: transparent; color: inherit; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.prose th { background: #f8fafc; }
.prose img { border-radius: 12px; border: 1px solid var(--line); }

/* Print */
@media print {
  .site-header, .mobile-drawer, .modal-backdrop, .toast-stack, .guest-banner-actions, .skip-link, .mobile-nav-toggle { display: none !important; }
  body { background: #fff; }
  .site-footer { background: #fff; color: #000; }
  .footer-algo-meta dd, .footer-links a, .brand-on-dark .brand-name { color: #000; }
  a { text-decoration: underline; }
  .card, .geo-card { break-inside: avoid; }
}

@media (max-width: 1024px) {
  .nav-links, .nav-auth { display: none; }
  .mobile-nav-toggle { display: inline-flex; }
  .hero-grid, .split-2, .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { gap: 24px; }
  .footer-brand, .footer-algo-meta { grid-column: 1 / -1; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1025px) {
  .mobile-drawer { display: none !important; }
}

@media (max-width: 768px) {
  .container, .guest-banner { width: min(var(--container), calc(100% - 28px)); }
  .grid-2, .grid-3, .grid-4, .split-2, .hero-grid, .geo-facts, .form-row-2, .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 32px; }
  .section { padding: 40px 0; }
  .guest-banner, .compliance-strip-inner, .footer-bottom { flex-direction: column; align-items: stretch; }
  .guest-banner-actions .btn { width: 100%; }
  .hero-kpi-strip { grid-template-columns: 1fr 1fr; }
  .footer-brand, .footer-algo-meta { grid-column: auto; }
}

@media (max-width: 480px) {
  .hero-kpi-strip { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
  .modal-dialog { padding: 16px; }
  .kpi-value { font-size: 22px; }
}

/* Global mobile overflow guard & single-line pill protection */
html, body { max-width: 100%; overflow-x: clip; }
.credit-pill { white-space: nowrap; flex-shrink: 0; }
.xw, .xw-wrap { max-width: 100%; overflow-x: clip; }
.xw-hero > *, .xw-grid-2 > *, .xw-grid-3 > *, .xw-stats > *, .xw-matrix > * { min-width: 0; }
@media (max-width: 640px) {
  .xw-wrap { padding: 8px 16px 56px !important; width: 100%; }
  .xw h1 { font-size: 25px !important; line-height: 1.3 !important; word-break: break-word; }
  .xw h2 { font-size: 21px !important; }
  .xw-lead { font-size: 15px !important; }
  .xw-actions { flex-direction: column; align-items: stretch; }
  .xw-actions .xw-btn { width: 100%; }
  .xw-seal { flex-direction: column; align-items: flex-start !important; }
  .xw-table-wrap, .data-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
  .xw table { display: block; overflow-x: auto; max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
