:root {
  --bg: #f6f8f5;
  --card: #ffffff;
  --text: #172019;
  --muted: #627268;
  --line: #d5dfd5;
  --accent: #1f8f4d;
  --accent-2: #15643a;
  --accent-3: #f4a300;
  --danger: #b9382f;
  --radius: 18px;
  --shadow: 0 14px 36px rgba(25, 56, 37, 0.1);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 90% -10%, rgba(244, 163, 0, 0.22), transparent 34%),
    radial-gradient(circle at 5% 0%, rgba(31, 143, 77, 0.2), transparent 30%),
    var(--bg);
}

.site-header {
  padding: 14px 14px 0;
}
.site-header-inner {
  max-width: 980px;
  margin: 0 auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
  border: 1px solid rgba(23, 32, 25, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 28px rgba(25, 56, 37, 0.07);
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #143221;
  text-decoration: none;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}
.brand-icon {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
}
.github-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #143221;
  background: rgba(246, 248, 245, 0.92);
  border: 1px solid rgba(23, 32, 25, 0.08);
}
.github-link svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}
.github-link:hover {
  background: #eef6f1;
}

.app {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 14px 100px;
}

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

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-top: 14px;
}

.pill {
  display: inline-block;
  margin: 0 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 700;
  background: linear-gradient(140deg, #eef8f1, #fff5df);
}

h1, h2, h3, p { margin: 0; }
.hero {
  position: relative;
  overflow: hidden;
  padding: 34px 34px 30px;
  background:
    radial-gradient(circle at 88% 14%, rgba(244, 163, 0, 0.24), transparent 24%),
    radial-gradient(circle at 0% 100%, rgba(31, 143, 77, 0.16), transparent 28%),
    linear-gradient(145deg, #ffffff 0%, #f7fbf8 52%, #fff6e4 100%);
  box-shadow: 0 24px 56px rgba(25, 56, 37, 0.11);
}
.hero::after {
  content: "SBTI";
  position: absolute;
  right: -8px;
  top: -2px;
  font-size: clamp(72px, 12vw, 160px);
  font-weight: 900;
  color: rgba(31, 143, 77, 0.07);
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(38px, 6.2vw, 66px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  max-width: 760px;
  text-wrap: balance;
}
.hero .sub {
  margin-top: 14px;
  max-width: 720px;
  color: #52655a;
  line-height: 1.8;
  font-size: 16px;
}
.hero-tagline {
  margin-top: 14px;
  max-width: 680px;
  color: #234433;
  font-size: 16px;
  line-height: 1.7;
  font-weight: 700;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 18px 0 0;
}
.facts li {
  border: 1px solid rgba(21, 100, 58, 0.12);
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 12px;
  color: #365646;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}
.intro-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.info-chip {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.98), rgba(244, 249, 245, 0.98));
  box-shadow: 0 14px 30px rgba(25, 56, 37, 0.06);
}
.info-chip strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(145deg, #fff5dc, #eef8f1);
  color: var(--accent-2);
  font-size: 16px;
}
.info-chip span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.68;
  font-size: 14px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.actions a {
  text-decoration: none;
}
#startBtn {
  min-width: 224px;
  min-height: 60px;
  padding: 17px 30px;
  font-size: 17px;
  box-shadow: 0 18px 34px rgba(31, 143, 77, 0.24);
}
.btn-quiet {
  min-height: 46px;
  padding: 10px 16px;
  color: #4f6157;
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(23, 32, 25, 0.08);
}
.btn-quiet:hover {
  background: rgba(247, 251, 248, 0.96);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  padding: 11px 14px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}
.btn:hover { background: #f5fbf7; }
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #f4f6f4;
}
.btn:focus-visible {
  outline: 3px solid rgba(46, 125, 82, 0.28);
  outline-offset: 2px;
}
.btn-primary {
  background: linear-gradient(140deg, #1f8f4d, #177e44);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-2); }
.btn-text {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 4px 6px;
}

.history-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.history {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,251,248,0.98));
}
.history-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}
.history-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafdfb;
  padding: 12px 14px;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.history-item:hover {
  background: #f4faf6;
  border-color: rgba(31, 143, 77, 0.18);
}
.credit-block {
  margin-top: 26px;
  padding: 22px 6px 4px;
  border-top: 1px solid rgba(21, 100, 58, 0.14);
}
.credit-block h2 {
  font-size: 16px;
  margin-bottom: 10px;
}
.credit-block p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
  max-width: 900px;
}
.empty { color: var(--muted); font-size: 13px; }

.test-top .progress-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
#progressText { color: var(--muted); font-size: 13px; }
.progress-bar {
  margin-top: 10px;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #edf3ee;
  overflow: hidden;
}
.progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #3a8d5f, #67b284);
  transition: width .25s ease;
}

.question-tag {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}
#questionText { line-height: 1.6; font-size: clamp(14px, 2.5vw, 24px); }
.option-list { margin-top: 16px; display: grid; gap: 10px; }
.option {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
  cursor: pointer;
}
.option .lab {
  display: inline-block;
  margin-right: 8px;
  color: var(--accent-2);
  font-weight: 700;
}
.option.selected {
  border-color: var(--accent);
  background: #f0f8f3;
}
.option:focus-visible { outline: 3px solid rgba(46, 125, 82, 0.28); }
.warn {
  margin-top: 10px;
  color: var(--danger);
  font-size: 13px;
}

.badge {
  margin-top: 8px;
  color: var(--accent-2);
  font-weight: 700;
}
#resultSub { margin-top: 6px; color: var(--muted); }
.result-credit {
  margin-top: 8px;
  color: #6d7f72;
  font-size: 12px;
  line-height: 1.6;
}
.result-credit a {
  color: var(--accent-2);
  font-weight: 700;
  text-decoration: none;
}
.result-credit a:hover {
  text-decoration: underline;
}
.result-head {
  padding: 18px 18px 16px;
  background:
    radial-gradient(circle at 100% 0%, rgba(244, 163, 0, 0.18), transparent 24%),
    radial-gradient(circle at 0% 100%, rgba(31, 143, 77, 0.14), transparent 26%),
    linear-gradient(150deg, #ffffff 0%, #f8fbf8 100%);
}
.result-hero {
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}
.result-hero-figure {
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  /* border: 1px solid rgba(21, 100, 58, 0.12); */
  background: linear-gradient(160deg, #f6fbf8, #fff8ea);
  /* box-shadow: 0 18px 42px rgba(25, 56, 37, 0.08); */
}
.result-hero-figure img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
}
.result-hero-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.result-snapshot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.snapshot-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  color: #325240;
  font-size: 12px;
  font-weight: 700;
}
.site-pill {
  background: linear-gradient(145deg, #1f8f4d, #177e44);
  color: #fff;
  border-color: transparent;
}
.result-intro {
  margin-top: 16px;
  font-size: 19px;
  line-height: 1.55;
  font-weight: 700;
  color: #214131;
}
.result-main-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  align-items: start;
}
.result-copy-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#resultDesc { margin-top: 8px; line-height: 1.8; }
.result-side-note {
  border-radius: 16px;
  padding: 14px;
  background: linear-gradient(145deg, #f7faf8, #eef5f0);
  border: 1px solid var(--line);
}
.side-note-label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent-2);
  text-transform: uppercase;
}

.dim-groups {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}
.dim-group {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fbfefc;
}
.dim-group h4 { margin: 0; font-size: 15px; }
.dim-items { display: grid; gap: 8px; margin-top: 10px; }
.dim-item {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 8px 10px;
}
.dim-item strong { font-size: 13px; }
.dim-item p { margin-top: 6px; font-size: 13px; color: var(--muted); line-height: 1.6; }

.site-url {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent-2);
  text-transform: lowercase;
}

.poster-dialog {
  border: 0;
  border-radius: 14px;
  max-width: min(92vw, 420px);
  width: 100%;
}
.poster-dialog::backdrop { background: rgba(20, 30, 24, 0.5); }
.poster-dialog form { margin: 0; }
.poster-dialog img { margin-top: 10px; width: 100%; border-radius: 8px; border: 1px solid var(--line); }
.poster-dialog menu {
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.types-body {
  background:
    radial-gradient(circle at 100% 0%, rgba(244, 163, 0, 0.18), transparent 26%),
    radial-gradient(circle at 0% 0%, rgba(31, 143, 77, 0.18), transparent 22%),
    linear-gradient(180deg, #f7faf6 0%, #f2f6f2 100%);
}
.types-screen {
  display: block;
}
.types-hero {
  padding-top: 18px;
}
.types-nav {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(23, 32, 25, 0.08);
  background: rgba(255, 255, 255, 0.76);
  color: #355545;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}
.nav-link-strong {
  background: linear-gradient(140deg, #1f8f4d, #177e44);
  color: #fff;
  border-color: transparent;
}
.types-intro-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 16px;
}
.section-head-floating {
  margin: 18px 2px 14px;
}
.eyebrow {
  margin-bottom: 6px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.site-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: linear-gradient(145deg, #1f8f4d, #177e44);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.section-link {
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.types-overview-text,
.types-overview-note {
  max-width: 900px;
  line-height: 1.8;
}
.types-overview-text {
  font-size: 15px;
}
.types-overview-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}
.type-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.type-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(160deg, #ffffff, #f7fbf8);
  box-shadow: 0 16px 36px rgba(25, 56, 37, 0.08);
  text-decoration: none;
  color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.type-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(25, 56, 37, 0.12);
  border-color: rgba(31, 143, 77, 0.22);
}
.type-card-figure {
  margin: 0;
  padding: 14px 14px 0;
}
.type-card-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  background: linear-gradient(145deg, #eef8f1, #fff7e7);
}
.type-card-copy {
  padding: 14px 14px 16px;
}
.type-card-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
}
.type-card-title {
  font-size: 22px;
  line-height: 1;
}
.type-card-name {
  margin-top: 6px;
  color: #355545;
  font-size: 14px;
  font-weight: 700;
}
.type-card-intro {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}
.type-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef6f1;
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.type-badge-hidden {
  background: #fff4e2;
  color: #915400;
}
.type-badge-system {
  background: #f2eefc;
  color: #6242a8;
}
.type-detail-list {
  display: grid;
  gap: 18px;
}
.type-detail-card {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}
.type-detail-media {
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(160deg, #f6fbf8, #fff7e6);
}
.type-detail-media img {
  display: block;
  width: 100%;
  height: auto;
}
.type-detail-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.type-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.type-detail-title {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.02;
}
.type-detail-name {
  margin-top: 8px;
  color: #355545;
  font-size: 16px;
  font-weight: 700;
}
.type-detail-intro {
  margin-top: 14px;
  font-size: 20px;
  line-height: 1.55;
  font-weight: 700;
  color: #214131;
}
.type-detail-desc {
  margin-top: 12px;
  color: #385244;
  line-height: 1.85;
  font-size: 15px;
}
.type-anchor-link {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.types-credit {
  margin-bottom: 40px;
}

@media (max-width: 760px) {
  .site-header {
    padding: 10px 10px 0;
  }
  .site-header-inner {
    min-height: 58px;
    padding: 0 14px;
  }
  .brand-mark {
    font-size: 18px;
  }
  .brand-icon {
    width: 22px;
    height: 22px;
  }
  .app { padding: 12px 10px 86px; }
  .card { padding: 14px; margin-top: 10px; }
  .hero-grid,
  .result-hero,
  .intro-strip,
  .types-intro-strip,
  .type-grid,
  .type-detail-card { grid-template-columns: 1fr; }
  .result-main-grid { grid-template-columns: 1fr; }
  .actions .btn { flex: 1 1 44%; }
  .hero h1 { font-size: clamp(30px, 8.5vw, 42px); }
  .hero { padding: 22px 18px 18px; }
  .hero::after { font-size: 110px; right: -10px; top: 12px; }
  .result-intro { font-size: 17px; }
  #startBtn {
    width: 100%;
    min-width: 0;
  }
  .btn-quiet {
    width: 100%;
  }
  .section-head {
    align-items: start;
    flex-direction: column;
  }
  .type-card-title {
    font-size: 20px;
  }
  .type-detail-intro {
    font-size: 18px;
  }
}
