/* ============================================================================
 * GEO / SEO Audit - styles (light theme)
 * ========================================================================== */

:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --text: #16191f;
  --text-2: #4b5563;
  --text-3: #8a94a2;
  --border: #e3e7ed;
  --border-2: #eef1f5;

  --primary: #3355e8;
  --primary-dark: #2540c4;
  --primary-soft: #eef1fe;

  --geo: #7c3aed;
  --geo-soft: #f4efff;
  --seo: #2563eb;
  --seo-soft: #eaf1ff;

  --pass: #16a34a;
  --pass-soft: #e9f8ef;
  --warn: #d97706;
  --warn-soft: #fdf3e3;
  --fail: #dc2626;
  --fail-soft: #fdeeee;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 14px rgba(16, 24, 40, 0.05);
  --shadow-lg: 0 2px 6px rgba(16, 24, 40, 0.06), 0 12px 32px rgba(16, 24, 40, 0.09);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.hidden { display: none !important; }

/* ------------------------------- Top bar ------------------------------- */

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 68px;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3355e8, #7c3aed);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800;
  letter-spacing: -0.5px;
  flex: none;
}

.brand-text h1 { font-size: 16px; margin: 0; font-weight: 700; letter-spacing: -0.2px; }
.brand-text p { font-size: 11.5px; margin: 0; color: var(--text-3); }

.tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 10px; border: 1px solid var(--border-2); }

.tab {
  border: none;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 15px;
  border-radius: 7px;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
  white-space: nowrap;
}
.tab:hover { color: var(--text); background: rgba(0,0,0,.03); }
.tab.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow); font-weight: 600; }

/* ------------------------------- Views ------------------------------- */

.view { display: none; padding: 28px 0 60px; }
.view.active { display: block; }

.hero { margin-bottom: 22px; }
.hero h2 { font-size: 22px; margin: 0 0 8px; font-weight: 700; letter-spacing: -0.3px; }
.hero p { margin: 0; color: var(--text-2); font-size: 13.5px; max-width: 860px; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px; flex-wrap: wrap;
}
.panel-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.panel-actions { display: flex; gap: 8px; }
.panel-actions.end { justify-content: flex-end; margin-top: 14px; }

.panel h3 { font-size: 15px; margin: 0 0 12px; font-weight: 700; }
.panel > p { color: var(--text-2); font-size: 13.5px; }

.note { color: var(--text-3) !important; font-size: 12.5px !important; }
.panel code { background: var(--surface-2); border: 1px solid var(--border); padding: 1px 5px; border-radius: 4px; font-family: var(--mono); font-size: 12px; }

/* ------------------------------- Buttons ------------------------------- */

.btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { border-color: #c9d0da; background: var(--surface-2); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.btn.primary:hover:not(:disabled) { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 12px; font-size: 12px; }

.chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-size: 12px;
  padding: 4px 11px;
  border-radius: 20px;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

/* ------------------------------- Input area ------------------------------- */

.mode-switch { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.mode {
  border: none; background: transparent; color: var(--text-2);
  font-family: inherit; font-size: 13px; font-weight: 500;
  padding: 6px 14px; border-radius: 7px; cursor: pointer; transition: all .15s;
}
.mode:hover { background: var(--surface-2); }
.mode.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.mode-hint { font-size: 12px; color: var(--text-3); margin-left: 6px; }

.pane { display: none; }
.pane.active { display: block; }

.input-row { display: flex; gap: 10px; }
.input-row input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  transition: all .15s;
  min-width: 0;
}
.input-row input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(51,85,232,.1); }

textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  font-family: var(--mono);
  color: var(--text);
  background: var(--surface);
  resize: vertical;
  line-height: 1.6;
}
textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(51,85,232,.1); }
#htmlInput { height: 190px; margin-bottom: 10px; }
.validator-input { height: 150px; }

.quick-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.quick-label { font-size: 12px; color: var(--text-3); }

/* ------------------------------- Loading / errors ------------------------------- */

.error-box {
  background: var(--fail-soft);
  border: 1px solid #f6cccc;
  color: #9b1c1c;
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 18px;
  font-size: 13.5px;
}
.error-box strong { display: block; margin-bottom: 4px; }
.error-box .hint { color: #a83a3a; font-size: 12.5px; margin-top: 6px; }

.loading {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px;
  text-align: center;
  box-shadow: var(--shadow);
}
.spinner {
  width: 34px; height: 34px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  margin: 0 auto 14px;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 14px; color: var(--text-2); font-weight: 500; }
.loading-steps { font-size: 12px; color: var(--text-3); margin-top: 10px; font-family: var(--mono); }

/* ------------------------------- Results: overview ------------------------------- */

.overview {
  display: grid;
  grid-template-columns: 1.15fr 2fr;
  gap: 18px;
  margin-bottom: 18px;
}

.score-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.score-card .label { font-size: 12.5px; color: var(--text-3); font-weight: 500; letter-spacing: .3px; }
.ring-wrap { position: relative; margin: 12px 0 6px; }
.ring-value {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.ring-value .num { font-size: 38px; font-weight: 800; line-height: 1; letter-spacing: -1.5px; }
.ring-value .unit { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.score-grade { font-size: 14px; font-weight: 700; margin-top: 4px; }
.score-desc { font-size: 12px; color: var(--text-2); margin-top: 2px; }

.split-card { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.mini-score {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 18px;
}
.mini-score .info { flex: 1; min-width: 0; }
.mini-score h4 { margin: 0 0 4px; font-size: 13px; font-weight: 700; }
.mini-score .sub { font-size: 11.5px; color: var(--text-3); }
.mini-score .mini-num { font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -1px; }

.diagnosis {
  background: var(--primary-soft);
  border: 1px solid #d9e0fd;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 18px;
  font-size: 13.5px;
  color: #1e2a63;
  line-height: 1.7;
}
.diagnosis strong { font-weight: 700; }

.meta-strip {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  font-size: 12px; color: var(--text-3);
  margin-bottom: 18px;
  padding: 0 4px;
}
.meta-strip b { color: var(--text-2); font-weight: 600; }

/* ------------------------------- Radar chart ------------------------------- */

.radar-panel { display: flex; gap: 24px; justify-content: center; align-items: flex-start; flex-wrap: wrap; padding: 8px 0 4px; }
.radar-cell { flex: 0 0 auto; display: flex; justify-content: center; }

.radar-legend { display: flex; flex-direction: column; gap: 10px; }
.legend-item { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.legend-item .dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend-item .lg-name { flex: 1; color: var(--text-2); }
.legend-item .lg-score { font-weight: 700; font-family: var(--mono); font-size: 12.5px; }
.legend-bar { height: 5px; border-radius: 3px; background: var(--border-2); width: 92px; overflow: hidden; flex: none; }
.legend-bar i { display: block; height: 100%; border-radius: 3px; }

/* ------------------------------- Fix list ------------------------------- */

.sugg-summary { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }

.stat-pill {
  border-radius: 9px;
  padding: 10px 16px;
  font-size: 12.5px;
  font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  border: 1px solid transparent;
}
.stat-pill .n { font-size: 18px; font-weight: 800; letter-spacing: -.5px; }
.stat-pill.pass { background: var(--pass-soft); color: #14532d; border-color: #cdeed9; }
.stat-pill.warn { background: var(--warn-soft); color: #78350f; border-color: #f6e0b8; }
.stat-pill.fail { background: var(--fail-soft); color: #7f1d1d; border-color: #f6cccc; }
.stat-pill.total { background: var(--surface-2); color: var(--text-2); border-color: var(--border); }

.sugg-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  overflow: hidden;
  background: var(--surface);
}
.sugg-head {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 16px;
  cursor: pointer;
  transition: background .12s;
}
.sugg-head:hover { background: var(--surface-2); }
.sugg-rank {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--surface-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--text-2); flex: none;
  font-family: var(--mono);
}
.sugg-item.p1 .sugg-rank { background: var(--fail-soft); border-color: #f6cccc; color: #b91c1c; }
.sugg-item.p2 .sugg-rank { background: var(--warn-soft); border-color: #f6e0b8; color: #b45309; }
.sugg-body-main { flex: 1; min-width: 0; }
.sugg-title { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sugg-dim { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.sugg-caret { color: var(--text-3); font-size: 12px; transition: transform .18s; flex: none; padding-top: 4px; }
.sugg-item.open .sugg-caret { transform: rotate(90deg); }
.sugg-detail { display: none; padding: 0 16px 16px 54px; font-size: 13px; color: var(--text-2); }
.sugg-item.open .sugg-detail { display: block; }
.sugg-detail .field { margin-bottom: 10px; }
.sugg-detail .field-label { font-size: 11.5px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 3px; }
.sugg-detail .advice { background: var(--primary-soft); border-left: 3px solid var(--primary); padding: 9px 13px; border-radius: 0 6px 6px 0; color: #1e2a63; }
.sugg-detail pre { background: #f7f8fa; border: 1px solid var(--border); border-radius: 7px; padding: 12px; font-size: 12px; font-family: var(--mono); overflow-x: auto; margin: 4px 0 0; white-space: pre-wrap; word-break: break-all; line-height: 1.6; }

.badge {
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px;
  letter-spacing: .2px;
}
.badge.pass { background: var(--pass-soft); color: #15803d; }
.badge.warn { background: var(--warn-soft); color: #b45309; }
.badge.fail { background: var(--fail-soft); color: #b91c1c; }
.badge.info { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.badge.geo { background: var(--geo-soft); color: #6d28d9; }
.badge.seo { background: var(--seo-soft); color: #1d4ed8; }

/* ------------------------------- Dimension details ------------------------------- */

.dim-group-title { font-size: 13px; font-weight: 700; color: var(--text-2); margin: 22px 0 10px; display: flex; align-items: center; gap: 8px; }
.dim-group-title span.line { flex: 1; height: 1px; background: var(--border); }

.dim-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 9px;
  overflow: hidden;
  background: var(--surface);
}
.dim-head {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 16px;
  cursor: pointer;
  transition: background .12s;
}
.dim-head:hover { background: var(--surface-2); }
.dim-score-bar { width: 78px; height: 6px; border-radius: 3px; background: var(--border-2); overflow: hidden; flex: none; }
.dim-score-bar i { display: block; height: 100%; border-radius: 3px; transition: width .5s; }
.dim-name { flex: 1; font-size: 13.5px; font-weight: 600; min-width: 0; }
.dim-tag { font-size: 11px; color: var(--text-3); font-family: var(--mono); }
.dim-score-num { font-size: 14px; font-weight: 800; font-family: var(--mono); width: 48px; text-align: right; flex: none; }
.dim-counts { display: flex; gap: 4px; flex: none; }
.dim-counts .c { font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 12px; font-family: var(--mono); }
.dim-counts .c.p { background: var(--pass-soft); color: #15803d; }
.dim-counts .c.w { background: var(--warn-soft); color: #b45309; }
.dim-counts .c.f { background: var(--fail-soft); color: #b91c1c; }
.dim-caret { color: var(--text-3); transition: transform .18s; font-size: 12px; }
.dim-card.open .dim-caret { transform: rotate(90deg); }

.dim-body { display: none; border-top: 1px solid var(--border-2); }
.dim-card.open .dim-body { display: block; }

.check-row { padding: 13px 16px; border-bottom: 1px solid var(--border-2); font-size: 13px; }
.check-row:last-child { border-bottom: none; }
.check-top { display: flex; align-items: center; gap: 9px; margin-bottom: 5px; flex-wrap: wrap; }
.check-name { font-weight: 600; font-size: 13px; }
.check-detail { color: var(--text-2); line-height: 1.7; word-break: break-word; }
.check-advice { margin-top: 8px; background: var(--primary-soft); border-left: 3px solid var(--primary); padding: 9px 13px; border-radius: 0 6px 6px 0; color: #1e2a63; line-height: 1.7; }
.check-example { margin-top: 8px; }
.check-example .lbl { font-size: 11px; font-weight: 700; color: var(--text-3); letter-spacing: .4px; margin-bottom: 3px; }
.check-example pre { background: #f7f8fa; border: 1px solid var(--border); border-radius: 7px; padding: 11px; font-size: 12px; font-family: var(--mono); overflow-x: auto; margin: 0; white-space: pre-wrap; word-break: break-all; line-height: 1.6; }

/* ------------------------------- Data tabs ------------------------------- */

.subtabs { display: flex; gap: 4px; margin-bottom: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.subtab {
  border: none; background: transparent; color: var(--text-2); font-family: inherit;
  font-size: 13px; font-weight: 500; padding: 9px 14px; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all .15s;
}
.subtab:hover { color: var(--text); }
.subtab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.subpane { display: none; }
.subpane.active { display: block; }

.kv-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.kv-table th, .kv-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border-2); vertical-align: top; }
.kv-table th { font-weight: 600; color: var(--text-2); width: 190px; background: var(--surface-2); font-size: 12.5px; }
.kv-table td { color: var(--text); word-break: break-word; }
.kv-table tr:last-child th, .kv-table tr:last-child td { border-bottom: none; }

.empty-hint { color: var(--text-3); font-size: 13px; padding: 18px 0; text-align: center; }

.code-block {
  background: #f7f8fa;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0 0 16px;
  max-height: 520px;
  overflow-y: auto;
  color: var(--text);
}

/* ------------------------------- Schema Studio ------------------------------- */

.schema-layout { display: grid; grid-template-columns: 250px 1fr; gap: 18px; align-items: start; }

.schema-types { padding: 10px; position: sticky; top: 90px; }
.schema-type {
  display: block; width: 100%; text-align: left;
  border: 1px solid transparent; background: transparent;
  font-family: inherit; font-size: 13px; color: var(--text-2);
  padding: 11px 13px; border-radius: var(--radius-sm); cursor: pointer;
  transition: all .15s; margin-bottom: 3px;
}
.schema-type:hover { background: var(--surface-2); color: var(--text); }
.schema-type.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; border-color: #d9e0fd; }
.schema-type .t-name { font-weight: 600; font-size: 13px; }
.schema-type .t-scene { font-size: 11.5px; color: var(--text-3); margin-top: 2px; line-height: 1.5; }
.schema-type.active .t-scene { color: #5b6bc4; }

.schema-meta { font-size: 12.5px; color: var(--text-3); margin: 0 0 16px; line-height: 1.7; }
.schema-meta b { color: var(--geo); font-weight: 600; }

.schema-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-field { display: flex; flex-direction: column; gap: 4px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.form-field label .req { color: var(--fail); margin-left: 3px; }
.form-field .hint { font-size: 11.5px; color: var(--text-3); }
.form-field input, .form-field textarea {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 9px 12px; font-size: 13px; font-family: inherit; color: var(--text); background: var(--surface);
}
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(51,85,232,.1); }
.form-field textarea { min-height: 76px; font-family: inherit; resize: vertical; }

.faq-editor, .step-editor { display: flex; flex-direction: column; gap: 10px; grid-column: 1 / -1; }
.faq-row, .step-row {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px; background: var(--surface-2);
  display: grid; grid-template-columns: 1fr 1fr auto; gap: 9px; align-items: start;
}
.faq-row textarea, .step-row textarea { min-height: 62px; }
.faq-row input, .step-row input, .faq-row textarea, .step-row textarea {
  border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px;
  font-size: 12.5px; font-family: inherit; background: var(--surface); color: var(--text); resize: vertical;
}
.faq-row input:focus, .step-row input:focus, .faq-row textarea:focus, .step-row textarea:focus { outline: none; border-color: var(--primary); }
.row-del {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-3);
  width: 30px; height: 30px; border-radius: 6px; cursor: pointer; font-size: 15px; line-height: 1;
  transition: all .15s;
}
.row-del:hover { border-color: #f6cccc; color: var(--fail); background: var(--fail-soft); }
.add-row {
  border: 1px dashed var(--border); background: transparent; color: var(--text-2);
  font-family: inherit; font-size: 12.5px; padding: 9px; border-radius: var(--radius-sm);
  cursor: pointer; transition: all .15s;
}
.add-row:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

.validation { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.v-item { font-size: 12.5px; padding: 8px 13px; border-radius: 7px; line-height: 1.6; display: flex; gap: 8px; align-items: flex-start; }
.v-item .ico { flex: none; font-weight: 700; }
.v-item.ok { background: var(--pass-soft); color: #14532d; border: 1px solid #cdeed9; }
.v-item.warn { background: var(--warn-soft); color: #78350f; border: 1px solid #f6e0b8; }
.v-item.err { background: var(--fail-soft); color: #7f1d1d; border: 1px solid #f6cccc; }
.v-empty { font-size: 12.5px; color: var(--text-3); }

.deploy-note { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 16px; font-size: 12.5px; }
.deploy-note summary { cursor: pointer; font-weight: 600; color: var(--text-2); }
.deploy-note ul { margin: 10px 0 0; padding-left: 20px; color: var(--text-2); line-height: 1.8; }

/* ------------------------------- History ------------------------------- */

.history-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.history-item {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 16px; background: var(--surface); cursor: pointer; transition: all .15s;
}
.history-item:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.history-item .h-url { font-size: 12.5px; font-weight: 600; word-break: break-all; margin-bottom: 8px; line-height: 1.5; }
.history-item .h-scores { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.history-item .h-scores b { font-family: var(--mono); font-weight: 700; }
.history-item .h-time { font-size: 11.5px; color: var(--text-3); }

/* ------------------------------- Guide page ------------------------------- */

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 14px; }
.mini-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 18px; }
.mini-card h4 { margin: 0 0 10px; font-size: 13px; font-weight: 700; }
.mini-card ul { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--text-2); line-height: 1.9; }

.formula {
  background: #f7f8fa; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 16px 20px; font-family: var(--mono); font-size: 12.5px; line-height: 2;
  white-space: pre-wrap; color: var(--text); margin: 14px 0;
}

.grade-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 14px; }
.grade-table th, .grade-table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border-2); }
.grade-table th { background: var(--surface-2); font-weight: 600; font-size: 12.5px; color: var(--text-2); }
.grade-table .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: middle; }

.steps { padding-left: 22px; font-size: 13.5px; color: var(--text-2); line-height: 2; margin: 14px 0 0; }
.steps strong { color: var(--text); }

.faq-dl { margin: 14px 0 0; }
.faq-dl dt { font-weight: 700; font-size: 13.5px; margin-top: 14px; }
.faq-dl dd { margin: 5px 0 0; color: var(--text-2); font-size: 13px; line-height: 1.75; }

/* ------------------------------- Toast / Footer ------------------------------- */

.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: #16191f; color: #fff; padding: 11px 22px; border-radius: 9px;
  font-size: 13px; z-index: 999; box-shadow: var(--shadow-lg);
  animation: toastIn .22s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

.footer {
  border-top: 1px solid var(--border);
  padding: 22px 0;
  font-size: 12px;
  color: var(--text-3);
  background: var(--surface);
}

/* ------------------------------- Responsive ------------------------------- */

@media (max-width: 980px) {
  .overview { grid-template-columns: 1fr; }
  .radar-panel { grid-template-columns: 1fr; }
  .schema-layout { grid-template-columns: 1fr; }
  .schema-types { position: static; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
  .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .wrap { padding: 0 14px; }
  .topbar-inner { height: auto; padding: 12px 0; }
  .tabs { width: 100%; overflow-x: auto; }
  .input-row { flex-direction: column; }
  .score-card .ring-wrap svg { width: 150px; height: 150px; }
  .schema-form { grid-template-columns: 1fr; }
  .faq-row, .step-row { grid-template-columns: 1fr; }
  .sugg-detail { padding-left: 16px; }
}
