:root {
  --bg: #f5f5f7;
  --bg-soft: #fbfbfd;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --surface-muted: rgba(255, 255, 255, 0.62);
  --ink: #101114;
  --muted: #6e6e73;
  --line: rgba(15, 23, 42, 0.08);
  --line-strong: rgba(15, 23, 42, 0.14);
  --brand: #0a84ff;
  --brand-deep: #0066cc;
  --brand-soft: rgba(10, 132, 255, 0.1);
  --accent: #111111;
  --success: #1f8f52;
  --danger: #c63b16;
  --shadow-soft: 0 16px 40px rgba(15, 23, 42, 0.05);
  --shadow-strong: 0 28px 80px rgba(15, 23, 42, 0.08);
  --radius-2xl: 36px;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --page-width: 1380px;
  --content-width: 1220px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(10, 132, 255, 0.14), transparent 28%),
    radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.92), transparent 30%),
    linear-gradient(180deg, #fcfcfe 0%, #f1f2f6 44%, #f6f6f8 100%);
}

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

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

.page-shell {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 18px 18px 80px;
}

.page-nav {
  position: sticky;
  top: 14px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 14px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.54);
  box-shadow: 0 18px 60px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(20px);
}

.nav-brand,
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.nav-brand img,
.hero-eyebrow img {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  flex-shrink: 0;
  align-self: center;
}

.nav-brand span,
.hero-eyebrow span {
  display: block;
}

.hero-eyebrow {
  width: fit-content;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.04);
}

.nav-links,
.hero-links,
.page-links,
.hero-actions,
.panel-actions,
.badge-row,
.quiz-controls,
.inline-actions,
.stats-grid,
.reader-actions,
.hero-support {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.nav-links {
  gap: 6px;
}

.nav-links a {
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--muted);
  transition: background-color 0.18s ease, color 0.18s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: rgba(15, 23, 42, 0.06);
  color: var(--ink);
}

.hero-links,
.page-links {
  color: var(--muted);
  font-size: 0.95rem;
  justify-content: center;
}

.hero-links a,
.page-links a {
  color: var(--ink);
}

.hero,
.panel,
.feature-card,
.question-card,
.knowledge-card,
.reader-card,
.quiz-shell,
.empty-state,
.source-item,
.stage-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.46);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.hero,
.panel,
.feature-card,
.question-card,
.knowledge-card,
.reader-card,
.quiz-shell,
.empty-state,
.source-item,
.stage-card {
  animation: rise-in 0.55s ease both;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero {
  max-width: var(--content-width);
  margin: 24px auto 0;
  padding: 42px;
  border-radius: 40px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto auto -24% -10%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(10, 132, 255, 0.16), transparent 68%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 10% -5% auto auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.78), transparent 72%);
  pointer-events: none;
}

.hero-inner,
.hero-grid,
.hero-home-copy,
.hero-home-aside {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 28px;
  align-items: end;
}

.hero-home-copy,
.hero-home-aside {
  display: flex;
  flex-direction: column;
}

.hero-home-copy {
  align-items: center;
  width: 100%;
}

.hero-home .hero-home-aside,
.hero-practice .hero-home-aside,
.hero-reader .hero-home-aside {
  width: min(100%, 1080px);
  margin-top: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-home .hero-grid,
.hero-practice .hero-grid,
.hero-reader .hero-grid {
  grid-template-columns: 1fr;
  align-items: stretch;
  justify-items: center;
  text-align: center;
}

.hero h1,
.hero-demo-title,
.reader-hero h1 {
  margin: 14px 0 18px;
  font-size: clamp(2.8rem, 5.6vw, 5rem);
  line-height: 0.9;
  letter-spacing: -0.065em;
  font-weight: 700;
}

.hero-practice h1,
.hero-reader h1 {
  font-size: clamp(2.6rem, 5vw, 4.4rem);
}

.hero-home h1,
.hero-practice h1 {
  white-space: nowrap;
}

.hero-copy,
.hero p,
.panel-subtitle,
.muted {
  color: var(--muted);
}

.hero-copy {
  max-width: 760px;
  margin: 0 auto;
  font-size: 1.08rem;
  line-height: 1.72;
}

.hero-note {
  max-width: 820px;
  margin: 18px auto 0;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.04);
  color: var(--muted);
  line-height: 1.6;
  text-align: center;
}

.hero-support {
  margin-top: 18px;
}

.hero-actions {
  margin-top: 32px;
  column-gap: 16px;
  row-gap: 14px;
  justify-content: center;
}

.hero-kpi-grid {
  display: grid;
  gap: 14px;
}

.hero-kpi,
.source-item,
.stage-card {
  border-radius: 24px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.hero-kpi h3,
.source-item h3,
.stage-card h3,
.feature-card h3,
.panel h2,
.section-title h2,
.reader-card h3,
.knowledge-card h3,
.question-card h3,
.quiz-shell h3 {
  margin: 0 0 10px;
  letter-spacing: -0.03em;
}

.hero-kpi .value {
  display: block;
  margin-bottom: 10px;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.hero-kpi .label {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--brand-deep);
  font-size: 0.88rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1.1;
  white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.button-primary {
  background: linear-gradient(180deg, #0a84ff, #0071e3);
  color: #ffffff;
  box-shadow: 0 18px 30px rgba(10, 132, 255, 0.22);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  border-color: rgba(15, 23, 42, 0.08);
}

.button-tertiary {
  background: transparent;
  color: var(--brand-deep);
  border-color: rgba(10, 132, 255, 0.18);
}

.button-accent {
  background: #111111;
  color: #ffffff;
}

.button-danger {
  background: rgba(198, 59, 22, 0.08);
  color: var(--danger);
  border-color: rgba(198, 59, 22, 0.16);
}

.section-copy {
  max-width: 760px;
  margin: 14px auto 0;
  color: var(--muted);
  line-height: 1.7;
}

.feature-grid,
.source-grid,
.page-switch-grid,
.guide-strip,
.control-grid,
.knowledge-list,
.question-list,
.reader-list,
.content-stack {
  display: grid;
  gap: 22px;
}

.feature-grid,
.page-switch-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: var(--content-width);
  width: 100%;
  margin: 24px auto 0;
}

.source-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: var(--content-width);
  width: 100%;
  margin: 24px auto 0;
}

.guide-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 20px;
}

.feature-card {
  border-radius: 26px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.feature-card p {
  margin: 0;
}

.section-panel,
.panel {
  border-radius: var(--radius-2xl);
  padding: 26px;
}

.section-panel {
  max-width: var(--content-width);
  width: 100%;
  margin: 24px auto 0;
}

.home-section {
  padding: 0;
}

.home-section .section-title {
  padding: 4px 2px 0;
}

.home-section .page-switch-grid,
.home-section .source-grid {
  max-width: none;
  margin-top: 18px;
}

.section-title,
.panel-title,
.question-header,
.reader-header-meta,
.quiz-headline,
.practice-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.section-title-stack {
  align-items: center;
}

.panel-actions {
  margin-top: 20px;
  column-gap: 14px;
  row-gap: 14px;
}

.workspace-guide .button {
  width: 100%;
}

.workspace-switch.active {
  background: linear-gradient(180deg, #0a84ff, #0071e3);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 18px 30px rgba(10, 132, 255, 0.22);
}

.stage-card .panel-actions,
.feature-card .panel-actions,
.source-item .panel-actions {
  margin-top: auto;
  padding-top: 22px;
}

.stats-grid {
  margin-top: 26px;
}

.stats-grid-wide {
  justify-content: center;
}

.stat-tile {
  min-width: 150px;
  flex: 1 1 150px;
  max-width: 180px;
  padding: 20px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.stat-tile .value {
  display: block;
  font-size: 1.92rem;
  font-weight: 700;
  letter-spacing: -0.06em;
}

.stat-tile .label {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.93rem;
}

.workspace-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  max-width: var(--content-width);
  margin: 24px auto 0;
}

.workspace-sidebar {
  display: grid;
  gap: 18px;
  align-self: start;
  position: sticky;
  top: 92px;
}

.workspace-main,
.reader-main {
  display: grid;
  gap: 22px;
}

.field {
  display: grid;
  gap: 8px;
}

.field + .field {
  margin-top: 16px;
}

.field label {
  font-size: 0.94rem;
  font-weight: 600;
}

.text-input,
.select-input,
.number-input,
.textarea-input {
  width: 100%;
  padding: 14px 15px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

.text-input:focus,
.select-input:focus,
.number-input:focus,
.textarea-input:focus {
  outline: none;
  border-color: rgba(10, 132, 255, 0.3);
  box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.08);
}

.chip-group,
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip,
.tag,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  padding: 8px 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 0.9rem;
}

.chip {
  cursor: pointer;
}

.chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  min-height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: inherit;
  font-size: 0.82rem;
  line-height: 1;
}

.chip.active,
.tree-item.active {
  background: rgba(10, 132, 255, 0.1);
  border-color: rgba(10, 132, 255, 0.18);
  color: var(--brand-deep);
}

.tag-brand {
  background: rgba(10, 132, 255, 0.1);
  color: var(--brand-deep);
  border-color: rgba(10, 132, 255, 0.14);
}

.tag-accent {
  background: rgba(15, 23, 42, 0.05);
  color: var(--ink);
}

.tag-dark {
  background: rgba(110, 110, 115, 0.08);
  color: var(--muted);
}

.tag-origin {
  background: rgba(86, 90, 255, 0.08);
  color: #4a43c5;
  border-color: rgba(86, 90, 255, 0.12);
}

.tag-image {
  background: rgba(31, 143, 82, 0.1);
  color: var(--success);
  border-color: rgba(31, 143, 82, 0.16);
}

.knowledge-list-wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.knowledge-card,
.question-card,
.reader-card,
.quiz-shell {
  border-radius: 28px;
  padding: 24px;
}

.knowledge-card,
.question-card,
.tree-item,
.source-item,
.stage-card {
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.knowledge-card:hover,
.question-card:hover,
.tree-item:hover,
.source-item:hover,
.stage-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-strong);
}

.knowledge-card.active {
  border-color: rgba(10, 132, 255, 0.18);
  box-shadow: 0 20px 48px rgba(10, 132, 255, 0.08);
}

.tabbed-panel.hidden {
  display: none;
}

.question-list {
  grid-template-columns: 1fr;
}

.question-title {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.65;
}

.question-options,
.answer-options {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.answer-options-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.option,
.answer-option {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.84);
}

.answer-option {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: start;
  gap: 12px;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.answer-option input {
  margin-top: 5px;
}

.answer-option:hover {
  border-color: rgba(10, 132, 255, 0.2);
  background: rgba(255, 255, 255, 0.92);
}

.answer-option:has(input:checked) {
  border-color: rgba(10, 132, 255, 0.24);
  background: rgba(10, 132, 255, 0.08);
  box-shadow: 0 12px 24px rgba(10, 132, 255, 0.08);
}

.answer-option-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1;
}

.answer-option-text {
  display: block;
  line-height: 1.55;
}

.question-image,
.reader-image {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.82);
  padding: 10px;
}

.practice-shell,
.analysis-box,
.quiz-result,
.callout,
.reader-summary,
.practice-feedback {
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  background: rgba(255, 255, 255, 0.74);
  padding: 18px;
}

.question-card,
.practice-shell,
.analysis-box,
.quiz-result,
.reader-card {
  display: grid;
  gap: 16px;
}

.question-card .panel-actions {
  margin-top: 6px;
}

.panel-actions + .callout,
.field + .panel-actions {
  margin-top: 18px;
}

.callout {
  background: linear-gradient(180deg, rgba(10, 132, 255, 0.08), rgba(255, 255, 255, 0.82));
}

.practice-feedback.correct {
  border-color: rgba(31, 143, 82, 0.14);
  background: rgba(31, 143, 82, 0.08);
}

.practice-feedback.wrong {
  border-color: rgba(198, 59, 22, 0.16);
  background: rgba(198, 59, 22, 0.08);
}

.analysis-box.hidden,
.quiz-shell.hidden {
  display: none;
}

.progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.08);
}

.progress-value {
  height: 100%;
  background: linear-gradient(90deg, #0a84ff, #54a6ff);
}

.score-badge {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(10, 132, 255, 0.1);
  color: var(--brand-deep);
  font-weight: 600;
}

.reader-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  max-width: var(--content-width);
  margin: 24px auto 0;
}

.reader-sidebar {
  display: grid;
  gap: 18px;
  align-self: start;
  position: sticky;
  top: 92px;
}

.tree-list {
  display: grid;
  gap: 10px;
}

.tree-item {
  text-align: left;
  padding: 15px 16px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
}

.tree-item strong,
.question-card strong,
.reader-card strong {
  letter-spacing: -0.02em;
}

.empty-state {
  border-radius: 28px;
  padding: 54px 28px;
  text-align: center;
}

.footer-note {
  max-width: var(--content-width);
  margin: 26px auto 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

@media (max-width: 1200px) {
  .source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guide-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .hero-grid,
  .feature-grid,
  .source-grid,
  .page-switch-grid,
  .guide-strip,
  .knowledge-list-wide,
  .workspace-shell,
  .reader-layout {
    grid-template-columns: 1fr;
  }

  .page-nav,
  .workspace-sidebar,
  .reader-sidebar {
    position: static;
  }
}

@media (max-width: 760px) {
  .page-shell {
    padding: 14px 12px 56px;
  }

  .page-nav,
  .hero,
  .section-panel,
  .panel,
  .feature-card,
  .question-card,
  .knowledge-card,
  .reader-card,
  .quiz-shell,
  .source-item,
  .stage-card {
    padding: 18px;
  }

  .hero h1,
  .hero-demo-title,
  .reader-hero h1 {
    font-size: 2.9rem;
  }

  .hero-home h1,
  .hero-practice h1 {
    white-space: normal;
  }

  .page-nav,
  .section-title,
  .panel-title,
  .quiz-headline,
  .reader-header-meta,
  .question-header,
  .practice-title-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .stats-grid {
    gap: 10px;
  }

  .stat-tile {
    max-width: none;
  }

  .answer-options-grid {
    grid-template-columns: 1fr;
  }

  .answer-option {
    grid-template-columns: auto auto 1fr;
    gap: 10px;
  }

  .hero-home .hero-home-aside,
  .hero-practice .hero-home-aside,
  .hero-reader .hero-home-aside {
    grid-template-columns: 1fr;
  }
}
