/* ========================================================================
   锥坡工程量计算器 v1.1 · SaaS 现代风视觉系统
   ======================================================================== */

:root {
  --bg:           #F7F8FA;
  --bg-elevated:  #FFFFFF;
  --bg-subtle:    #F1F5F9;
  --border:       #E2E8F0;
  --border-strong:#CBD5E1;

  --text:         #0F172A;
  --text-2:       #334155;
  --text-3:       #64748B;
  --text-4:       #94A3B8;

  --brand:        #2563EB;
  --brand-hover:  #1D4ED8;
  --brand-tint:   #EFF6FF;

  --accent:       #F59E0B;
  --accent-tint:  #FEF3C7;

  --success:      #059669;
  --success-tint: #ECFDF5;
  --danger:       #DC2626;
  --danger-tint:  #FEE2E2;

  --font-sans:    'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', Consolas, 'Liberation Mono', monospace;

  --shadow-sm: 0 1px 2px rgba(15,23,42,0.04);
  --shadow:    0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --shadow-md: 0 4px 6px rgba(15,23,42,0.05), 0 2px 4px rgba(15,23,42,0.04);
  --shadow-lg: 0 10px 15px rgba(15,23,42,0.06), 0 4px 6px rgba(15,23,42,0.04);

  --r-sm: 6px;
  --r:    8px;
  --r-md: 10px;
  --r-lg: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ==================== 顶部导航 ==================== */
.topnav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topnav__inner {
  max-width: 1320px; margin: 0 auto;
  padding: 0 24px; height: 60px;
  display: flex; align-items: center; gap: 32px;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; color: var(--text); }
.brand__mark { color: var(--brand); display: inline-flex; }
.brand__badge {
  margin-left: 4px; font-family: var(--font-mono);
  font-size: 10px; font-weight: 500; color: var(--text-4);
  background: var(--bg-subtle); padding: 2px 6px; border-radius: 4px;
}
.topnav__links { display: flex; gap: 4px; flex: 1; }
.topnav__links a {
  padding: 6px 12px; font-size: 13.5px; color: var(--text-2);
  border-radius: var(--r-sm); transition: all 0.15s;
}
.topnav__links a:hover { background: var(--bg-subtle); color: var(--text); }
.topnav__cta {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; background: var(--bg-subtle); border-radius: 999px;
  font-size: 12px; color: var(--text-3);
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(5,150,105,0.18); }
.status-dot--busy { background: var(--accent); box-shadow: 0 0 0 3px rgba(245,158,11,0.18); animation: pulse 1s infinite; }
.status-dot--err  { background: var(--danger); box-shadow: 0 0 0 3px rgba(220,38,38,0.18); }
@keyframes pulse { 0%,100% {transform:scale(1);opacity:1;} 50% {transform:scale(1.3);opacity:0.65;} }

/* ==================== Hero ==================== */
.hero {
  background:
    radial-gradient(ellipse 800px 400px at 80% -10%, rgba(37,99,235,0.08), transparent),
    radial-gradient(ellipse 600px 300px at 10% 110%, rgba(245,158,11,0.06), transparent),
    var(--bg);
  border-bottom: 1px solid var(--border);
}
.hero__inner {
  max-width: 1320px; margin: 0 auto;
  padding: 56px 24px 48px;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center;
}
.hero__chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; background: var(--brand-tint); color: var(--brand);
  border: 1px solid rgba(37,99,235,0.18); border-radius: 999px;
  font-size: 12px; font-weight: 500; margin-bottom: 18px;
}
.hero__title {
  font-size: 44px; line-height: 1.05; font-weight: 800;
  letter-spacing: -0.025em; margin: 0 0 16px; color: var(--text);
}
.hero__title-sub {
  display: block; font-size: 28px; font-weight: 600;
  color: var(--text-3); margin-top: 6px; letter-spacing: -0.02em;
}
.hero__desc {
  font-size: 16px; line-height: 1.7; color: var(--text-2);
  margin: 0 0 24px; max-width: 560px;
}
.hero__desc strong { color: var(--text); font-weight: 600; }
.hero__actions { display: flex; gap: 12px; margin-bottom: 32px; flex-wrap: wrap; }
.hero__stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  padding-top: 24px; border-top: 1px solid var(--border); max-width: 560px;
}
.hero__stat-num { font-family: var(--font-mono); font-size: 24px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.hero__stat-lbl { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.hero__visual {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3; max-width: 500px; justify-self: end; width: 100%;
}
#hero-diagram { width: 100%; height: 100%; }

/* ==================== 按钮 ==================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: var(--r);
  font-size: 14px; font-weight: 500; border: 1px solid transparent;
  transition: all 0.15s; text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: progress; }
.btn--primary { background: var(--text); color: white; border-color: var(--text); }
.btn--primary:hover:not(:disabled) { background: var(--text-2); border-color: var(--text-2); }
.btn--ghost { background: transparent; color: var(--text-2); border-color: var(--border); }
.btn--ghost:hover { background: var(--bg-subtle); color: var(--text); border-color: var(--border-strong); }
.btn--block { width: 100%; padding: 12px 18px; font-size: 14px; }
.btn--lg { padding: 12px 22px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-md); }
.btn--lg:hover { box-shadow: var(--shadow-lg); }

.link-btn {
  font-size: 12px; font-weight: 500; color: var(--text-3);
  background: none; border: none; padding: 4px 8px; border-radius: var(--r-sm);
  transition: all 0.15s;
}
.link-btn:hover { background: var(--bg-subtle); color: var(--text); }

/* ==================== 工作台 ==================== */
.workbench { max-width: 1320px; margin: 0 auto; padding: 48px 24px 32px; }

.section-head { margin-bottom: 28px; }
.section-head--with-action {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.section-head__eyebrow {
  font-size: 12px; font-weight: 600; color: var(--brand);
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px;
}
.section-head__title {
  font-size: 32px; font-weight: 700; letter-spacing: -0.02em;
  margin: 0 0 8px; color: var(--text);
}
.section-head__desc {
  font-size: 15px; color: var(--text-3); margin: 0;
  max-width: 720px; line-height: 1.6;
}
.section-head__desc strong { color: var(--text); font-weight: 600; }

.workbench__grid {
  display: grid; grid-template-columns: 460px 1fr 360px;
  gap: 20px; align-items: start;
}

/* ==================== 面板 ==================== */
.panel {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden;
}
.panel__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}
.panel__title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--text);
}
.panel__icon { display: inline-flex; }
.panel__head-note { font-family: var(--font-mono); font-size: 11px; color: var(--text-4); }
.panel__head-actions { display: flex; align-items: center; gap: 10px; }

/* ==================== 参数输入面板（左右配对核心） ==================== */
.panel--inputs { display: flex; flex-direction: column; }

.param-group { border-bottom: 1px solid var(--border); }
.param-group:last-of-type { border-bottom: none; }
.param-group__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px 8px;
}
.param-group__title {
  font-size: 12px; font-weight: 600; color: var(--text-2); letter-spacing: 0.02em;
}
.param-group__note { font-size: 11px; color: var(--text-4); }
.param-group__chip {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  padding: 2px 7px; border-radius: 4px; margin-left: 8px;
}
.param-group__chip--blue  { background: var(--brand-tint);  color: var(--brand); }
.param-group__chip--amber { background: var(--accent-tint); color: #B45309; }

/* 全局参数（线路夹角 / 路基宽度）—— 横向两列 */
.globals {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px;
  padding: 0 18px 14px;
}
.param--global { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; }

/* 配对参数表（一级 + 二级 左右排列） */
.paired-head {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 8px 18px 8px;
  font-size: 12px; font-weight: 600;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.paired-head__name { color: var(--text-3); font-size: 11px; }
.paired-head__col {
  text-align: center;
  display: flex; align-items: center; justify-content: center;
  gap: 0;
  font-size: 12px; font-weight: 700;
}
.paired-head__col--blue  { color: var(--brand); }
.paired-head__col--amber { color: #B45309; }

.paired-rows { padding: 4px 18px 14px; }
.paired-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  padding: 5px 0;
  gap: 8px;
  cursor: help;
  border-bottom: 1px dashed transparent;
  transition: background-color 0.12s;
}
.paired-row:hover { background-color: var(--bg-subtle); border-bottom-color: var(--border); border-radius: 4px; padding-left: 4px; padding-right: 4px; }
.paired-row__label {
  font-size: 13px;
  color: var(--text-2);
}
.paired-row__input { display: flex; justify-content: center; }
.paired-row__input .param__input { min-width: 0; width: 100%; max-width: 110px; }

/* 输入框通用样式 */
.param__label { font-size: 13px; color: var(--text-2); }
.param__input {
  display: inline-flex; align-items: baseline; gap: 4px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 0 8px;
  transition: all 0.15s;
}
.param__input:focus-within {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.param__input input {
  background: transparent; border: 0; outline: 0;
  width: 60px; padding: 6px 0;
  font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  color: var(--text); text-align: right;
  appearance: textfield; -moz-appearance: textfield;
}
.param__input input::-webkit-outer-spin-button,
.param__input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.param__unit {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--text-4); min-width: 1.5em; text-align: left;
}

.actions {
  padding: 18px; border-top: 1px solid var(--border); background: var(--bg-subtle);
}
.actions__note { margin: 8px 0 0; font-size: 11px; color: var(--text-4); text-align: center; }

/* ==================== 示意图面板 ==================== */
.panel--diagram { display: flex; flex-direction: column; }
.diagram-wrap {
  background: linear-gradient(to bottom, #FAFBFC, var(--bg-elevated));
  padding: 18px; border-bottom: 1px solid var(--border);
}
#cone-diagram { width: 100%; height: 340px; display: block; }
.diagram-legend {
  display: flex; gap: 16px; justify-content: center;
  margin-top: 12px; font-size: 11px; color: var(--text-3); flex-wrap: wrap;
}
.diagram-legend span { display: inline-flex; align-items: center; gap: 6px; }
.diagram-legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

.kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); }
.kpi { padding: 16px 18px; background: var(--bg-elevated); }
.kpi__label { font-size: 11px; font-weight: 500; color: var(--text-3); margin-bottom: 6px; }
.kpi__value {
  font-family: var(--font-mono); font-size: 22px; font-weight: 700;
  color: var(--text); letter-spacing: -0.02em;
  display: flex; align-items: baseline; gap: 4px;
}
.kpi__unit { font-size: 12px; font-weight: 500; color: var(--text-4); }

/* ==================== 结果面板 ==================== */
.panel--results { display: flex; flex-direction: column; }
.results-list { padding: 8px 0; max-height: 900px; overflow-y: auto; }
.result-item { padding: 10px 18px; border-bottom: 1px solid var(--border); }
.result-item:last-child { border-bottom: none; }
.result-item__head {
  display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px;
}
.result-item__label { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.result-item__unit { font-family: var(--font-mono); font-size: 10px; color: var(--text-4); }
.result-item__bars {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px;
  background: var(--border); border-radius: var(--r-sm); overflow: hidden;
}
.result-bar { background: var(--bg-elevated); padding: 6px 4px; text-align: center; min-width: 0; }
.result-bar__label { font-size: 9px; color: var(--text-4); margin-bottom: 2px; }
.result-bar__value {
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.result-bar--total { background: var(--brand-tint); }
.result-bar--total .result-bar__label { color: var(--brand); font-weight: 600; }
.result-bar--total .result-bar__value { color: var(--brand); }
.result-bar__value.flash { animation: flash 0.6s ease-out; }
@keyframes flash { 0% { background-color: var(--accent-tint); } 100% { background-color: transparent; } }

/* 导出 Excel 按钮 */
.export-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; font-size: 12px; font-weight: 500;
  color: white; background: var(--success); border: 1px solid var(--success);
  border-radius: var(--r-sm); transition: all 0.15s;
}
.export-btn:hover:not(:disabled) { background: #047857; border-color: #047857; }
.export-btn:disabled { opacity: 0.6; cursor: progress; }

/* ==================== CAD 命令区 ==================== */
.section { max-width: 1320px; margin: 0 auto; padding: 56px 24px; }
.section--cad { padding-top: 24px; }
.cad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.cad-card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-sm);
  transition: all 0.15s;
}
.cad-card:hover { box-shadow: var(--shadow-md); }
.cad-card__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--bg-subtle);
}
.cad-card__title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text); }
.cad-card__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-4); }
.cad-dot-cone1_L, .cad-dot-cone1_R { background: var(--brand); }
.cad-dot-cone2_L, .cad-dot-cone2_R { background: var(--accent); }
.cad-dot-plat_L, .cad-dot-plat_R   { background: var(--text-3); }
.cad-dot-connect                   { background: var(--success); }
.copy-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px; font-size: 11.5px; font-weight: 500;
  color: var(--text-2); background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--r-sm); transition: all 0.15s;
}
.copy-btn:hover { border-color: var(--brand); color: var(--brand); }
.cad-card__body { padding: 12px 14px; max-height: 130px; overflow-y: auto; background: #FCFCFD; }
.cad-code {
  font-family: var(--font-mono); font-size: 11px; line-height: 1.5;
  color: var(--text-2); white-space: pre-wrap; word-break: break-all; display: block;
}
.cad-tip {
  margin-top: 18px; padding: 12px 16px;
  background: var(--brand-tint); border: 1px solid rgba(37,99,235,0.18);
  border-radius: var(--r); display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; color: var(--brand);
}
.cad-tip code {
  background: rgba(37,99,235,0.12); padding: 1px 6px; border-radius: 4px;
  font-family: var(--font-mono); font-size: 12px;
}

/* ==================== 帮助说明区 ==================== */
.section--help {
  background: var(--bg-elevated); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  max-width: none; padding-left: 0; padding-right: 0;
}
.section--help .section-head,
.section--help .help-grid {
  max-width: 1320px; margin-left: auto; margin-right: auto;
  padding-left: 24px; padding-right: 24px;
}
.help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.help-card { padding: 22px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-md); transition: all 0.15s; }
.help-card:hover { border-color: var(--border-strong); }
.help-card__icon {
  width: 40px; height: 40px; border-radius: var(--r-sm);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.help-card h3 { font-size: 15px; font-weight: 600; margin: 0 0 8px; color: var(--text); }
.help-card p { font-size: 13px; line-height: 1.65; color: var(--text-3); margin: 0; }

/* ==================== 视频教程区 ==================== */
.tutorial-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tutorial-card {
  display: flex; flex-direction: column;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  transition: all 0.15s; box-shadow: var(--shadow-sm);
}
.tutorial-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.tutorial-card__thumb { height: 180px; position: relative; background: linear-gradient(135deg, #1E40AF, #2563EB); display: flex; align-items: center; justify-content: center; }
.tutorial-card__thumb--02 { background: linear-gradient(135deg, #B45309, #F59E0B); }
.tutorial-card__badge {
  position: absolute; top: 14px; left: 14px;
  background: rgba(255,255,255,0.2); color: white;
  padding: 4px 10px; border-radius: 999px;
  font-family: var(--font-mono); font-weight: 600; font-size: 12px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.tutorial-card__body { padding: 18px 20px 20px; }
.tutorial-card__body h3 { font-size: 16px; font-weight: 600; margin: 0 0 6px; color: var(--text); }
.tutorial-card__body p { font-size: 13px; color: var(--text-3); line-height: 1.6; margin: 0 0 10px; }
.tutorial-card__meta { font-size: 12px; font-weight: 500; color: var(--brand); }

/* ==================== 底部 ==================== */
.footer { background: var(--text); color: rgba(255,255,255,0.78); margin-top: 40px; }
.footer__inner {
  max-width: 1320px; margin: 0 auto;
  padding: 48px 24px 32px;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px;
}
.footer__brand { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; color: white; margin-bottom: 14px; }
.footer__about { font-size: 13.5px; line-height: 1.7; color: rgba(255,255,255,0.6); margin: 0; }
.footer__about strong { color: white; font-weight: 500; }
.footer__col h4 { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.55); margin: 0 0 14px; font-weight: 600; }
.footer__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer__list li { display: flex; flex-direction: column; gap: 2px; }
.footer__list li span { font-size: 11px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.04em; }
.footer__list li strong, .footer__list li a { font-size: 13.5px; color: white; font-weight: 500; font-family: var(--font-mono); }
.footer__list li a:hover { color: #93C5FD; }
.footer__bottom {
  max-width: 1320px; margin: 0 auto; padding: 18px 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 12px; color: rgba(255,255,255,0.45); text-align: center;
}

/* ==================== Tooltip & Toast ==================== */
.tooltip {
  position: fixed; z-index: 1000; pointer-events: none;
  background: rgba(15,23,42,0.96); color: white;
  font-size: 12px; padding: 6px 10px; border-radius: var(--r-sm);
  opacity: 0; transform: translateY(4px);
  transition: all 0.15s; max-width: 280px; line-height: 1.5;
  box-shadow: var(--shadow-lg);
}
.tooltip--show { opacity: 1; transform: translateY(0); }

.toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--text); color: white;
  padding: 10px 18px; border-radius: var(--r); font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-lg); z-index: 2000;
  opacity: 0; pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast--show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast--ok  { background: var(--success); }
.toast--err { background: var(--danger); }

/* ==================== 响应式 ==================== */
@media (max-width: 1280px) {
  .workbench__grid { grid-template-columns: 420px 1fr; }
  .panel--results { grid-column: 1 / -1; }
  .results-list { max-height: none; }
}
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; gap: 32px; }
  .hero__visual { justify-self: stretch; max-width: 100%; }
  .hero__title { font-size: 34px; }
  .hero__title-sub { font-size: 22px; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
  .workbench__grid { grid-template-columns: 1fr; }
  .topnav__links { display: none; }
  .tutorial-grid { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; gap: 24px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 36px 18px; }
  .workbench { padding: 36px 18px 24px; }
  .section-head--with-action { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) {
  .topnav__inner { padding: 0 16px; gap: 12px; }
  .hero__inner { padding: 36px 18px; }
  .hero__title { font-size: 28px; }
  .globals { grid-template-columns: 1fr; }
  .paired-row { grid-template-columns: 1.2fr 1fr 1fr; font-size: 12px; }
  .result-item__bars { grid-template-columns: 1fr 1fr; }
  .section-head__title { font-size: 24px; }
}

/* ==================== v4 新增：赞助按钮 + 二维码悬浮 ==================== */
.topnav__right { display: flex; align-items: center; gap: 12px; }

.sponsor { position: relative; }
.sponsor__trigger {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #FB7185, #E11D48);
  color: white; border: none;
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(225, 29, 72, 0.25);
  transition: transform 0.12s, box-shadow 0.12s;
}
.sponsor__trigger:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(225, 29, 72, 0.32); }
.sponsor__trigger:active { transform: translateY(0); }

.sponsor__popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: 0 12px 32px rgba(15,23,42,0.12), 0 2px 6px rgba(15,23,42,0.06);
  padding: 18px 18px 14px;
  width: 240px;
  text-align: center;
  opacity: 0;
  transform: translateY(-6px) scale(0.96);
  pointer-events: none;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 200;
}
.sponsor:hover .sponsor__popover,
.sponsor__popover:hover {
  opacity: 1; transform: translateY(0) scale(1); pointer-events: auto;
}
/* 小三角箭头 */
.sponsor__popover::before {
  content: ''; position: absolute;
  top: -7px; right: 22px;
  width: 12px; height: 12px;
  background: white;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  transform: rotate(45deg);
}
.sponsor__title {
  font-size: 14px; font-weight: 700; color: var(--text);
  margin-bottom: 2px;
}
.sponsor__subtitle {
  font-size: 11px; color: var(--text-3);
  margin-bottom: 12px;
}
.sponsor__qr {
  width: 100%; max-width: 200px;
  height: auto; display: block; margin: 0 auto;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.sponsor__hint {
  margin-top: 10px;
  font-size: 11px; color: var(--text-4);
  letter-spacing: 0.04em;
}

/* ==================== LSP 流程步骤卡片 ==================== */
.lsp-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.lsp-step {
  display: flex; gap: 12px;
  padding: 16px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: all 0.15s;
}
.lsp-step:hover { border-color: var(--brand); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.lsp-step__num {
  flex-shrink: 0;
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-tint); color: var(--brand);
  font-family: var(--font-mono); font-weight: 700; font-size: 16px;
  border-radius: 50%;
}
.lsp-step__body h4 { margin: 2px 0 4px; font-size: 14px; font-weight: 600; color: var(--text); }
.lsp-step__body p  { margin: 0; font-size: 12.5px; color: var(--text-3); line-height: 1.55; }

/* 详情折叠 */
.cad-details {
  margin-top: 28px;
}
.cad-details > summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--text-3);
  padding: 8px 12px;
  border-radius: var(--r-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 500;
  user-select: none;
  list-style: none;
}
.cad-details > summary::-webkit-details-marker { display: none; }
.cad-details > summary::before {
  content: '▸';
  font-family: monospace;
  transition: transform 0.15s;
  display: inline-block;
}
.cad-details[open] > summary::before { transform: rotate(90deg); }
.cad-details > summary:hover { background: var(--border); }
.cad-details > .cad-grid { margin-top: 14px; }

/* ==================== 响应式补丁 ==================== */
@media (max-width: 720px) {
  .sponsor__trigger span { display: none; }
  .sponsor__trigger { padding: 6px 8px; }
  .sponsor__popover { width: 220px; right: -8px; }
}

/* ==================== v6 新增：Hero 区赞助二维码卡片 ==================== */
.hero__sponsor {
  background: linear-gradient(135deg, #FFFFFF 0%, #FFF5F5 100%);
  border: 1px solid rgba(225, 29, 72, 0.15);
  border-radius: var(--r-lg);
  padding: 24px 24px 22px;
  box-shadow:
    0 1px 3px rgba(15,23,42,0.06),
    0 12px 30px rgba(225, 29, 72, 0.08);
  aspect-ratio: auto;
  max-width: 360px;
  justify-self: end;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero__sponsor::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(225,29,72,0.10), transparent 70%);
  pointer-events: none;
}
.hero__sponsor-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px;
  background: linear-gradient(135deg, #FB7185, #E11D48);
  color: white;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
  box-shadow: 0 2px 6px rgba(225, 29, 72, 0.25);
}
.hero__sponsor-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.hero__sponsor-desc {
  font-size: 13px;
  color: var(--text-3);
  margin: 0 0 16px;
  line-height: 1.55;
}
.hero__sponsor-qrbox {
  position: relative;
  padding: 10px;
  background: white;
  border-radius: var(--r);
  box-shadow:
    0 1px 2px rgba(15,23,42,0.06),
    inset 0 0 0 1px var(--border);
}
.hero__sponsor-qr {
  display: block;
  width: 200px;
  height: 200px;
  border-radius: 4px;
}
.hero__sponsor-foot {
  display: flex; align-items: center; gap: 8px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-3);
}
.hero__sponsor-divider {
  color: var(--text-4);
  font-weight: 700;
}

/* 响应式：小屏让赞助卡片更紧凑 */
@media (max-width: 980px) {
  .hero__sponsor { max-width: 100%; justify-self: stretch; padding: 22px 18px; }
  .hero__sponsor-qr { width: 180px; height: 180px; }
}
@media (max-width: 540px) {
  .hero__sponsor-qr { width: 160px; height: 160px; }
  .hero__sponsor-title { font-size: 18px; }
}

/* ==================== v10 新增：角度 DMS 实时预览 ==================== */
.angle-preview {
  margin: 4px 18px 14px;
  padding: 7px 12px;
  background: linear-gradient(135deg, #EFF6FF, #F0F9FF);
  border: 1px solid #BFDBFE;
  border-radius: var(--r-sm);
  font-size: 11.5px;
  color: var(--text-2);
  font-family: var(--font-mono);
  line-height: 1.5;
}
.angle-preview code {
  background: rgba(37,99,235,0.10);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11px;
}
.angle-preview strong {
  color: var(--brand);
  font-weight: 600;
}
.angle-preview__hint {
  color: var(--text-4);
}
.param__hint {
  display: inline-block;
  margin-left: 4px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-tint);
  padding: 1px 5px;
  border-radius: 3px;
  vertical-align: middle;
}
