:root {
  --ink: #111827;
  --ink-soft: #253244;
  --muted: #667085;
  --line: #d8dee8;
  --paper: #f7f8fb;
  --white: #ffffff;
  --blue: #1d4ed8;
  --teal: #0f766e;
  --amber: #b45309;
  --rose: #be123c;
  --green: #15803d;
  --shadow: 0 16px 40px rgba(17, 24, 39, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75em;
  height: 1.75em;
  margin: 0 0.08em;
  padding: 0 0.38em;
  border: 1px solid #c4ccd8;
  border-bottom-width: 2px;
  border-radius: 5px;
  background: #fff;
  color: #172033;
  font: 700 0.86em/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  min-height: 64px;
  padding: 10px clamp(16px, 4vw, 44px);
  border-bottom: 1px solid rgba(216, 222, 232, 0.85);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.nav-links a {
  padding: 8px 10px;
  border-radius: 7px;
  color: var(--ink-soft);
  font-size: 0.94rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links a:hover {
  background: #eef2f7;
}

.top-progress {
  display: grid;
  grid-template-columns: auto 72px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.top-progress-track,
.progress-track {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #e5eaf2;
}

.top-progress-track span,
.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--blue));
  transition: width 0.25s ease;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: min(680px, 76vh);
  display: flex;
  align-items: center;
  color: #fff;
  background: #101827;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url("assets/hero-macbook.jpg");
  background-position: center;
  background-size: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(12, 18, 30, 0.84), rgba(12, 18, 30, 0.28)),
    linear-gradient(0deg, rgba(12, 18, 30, 0.58), rgba(12, 18, 30, 0.04));
}

.hero-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 82px 0 64px;
}

.eyebrow,
.section-kicker,
.panel-label {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #a7f3d0;
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.35rem, 6vw, 5.7rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 690px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1rem, 1.8vw, 1.22rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

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

.button.primary {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.button.reset {
  width: 100%;
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.button.nav-button {
  min-height: 38px;
  padding: 8px 12px;
  border-color: var(--line);
  background: #fff;
  color: var(--ink-soft);
  box-shadow: none;
  font-size: 0.9rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 860px;
  margin-top: 42px;
}

.hero-stats div {
  min-height: 92px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.hero-stats strong,
.hero-stats span {
  display: block;
}

.hero-stats strong {
  font-size: 1.4rem;
}

.hero-stats span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.92rem;
}

.band {
  padding: clamp(58px, 9vw, 92px) clamp(16px, 4vw, 44px);
}

.intro-band,
.roadmap-band,
.mastery-band,
.sources-band,
.ladder-band,
.workflow-band,
.pitfalls-band {
  background: var(--paper);
}

.setup-band,
.migration-band,
.deploy-band,
.trusted-band,
.ai-band,
.file-band,
.smooth-band {
  background: #fff;
}

.section-head {
  width: min(960px, 100%);
  margin: 0 auto 28px;
}

.section-head.compact {
  width: min(820px, 100%);
}

.section-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.8rem, 3.5vw, 3.15rem);
  line-height: 1.14;
  letter-spacing: 0;
}

.section-head p:not(.section-kicker) {
  max-width: 800px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.trust-grid,
.ladder,
.phase-grid,
.file-grid,
.workflow-grid,
.smooth-grid {
  display: grid;
  gap: 16px;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.trust-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ladder {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.phase-grid {
  margin-top: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

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

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

.model-grid,
.decision-grid,
.practice-grid,
.deploy-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.ai-tool-main {
  min-height: calc(100vh - 64px);
}

.ai-tool-band {
  padding-top: clamp(36px, 6vw, 70px);
}

.ai-tool-band .section-head h1 {
  max-width: 920px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.ai-workbench {
  display: grid;
  gap: 18px;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.key-reference {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: min(1180px, 100%);
  margin: -10px auto 18px;
}

.key-reference span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 760;
}

.ai-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.06);
}

.translator-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 16px;
  align-items: start;
}

.translator-presets,
.coach-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.translator-presets button,
.coach-suggestions button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 750;
  cursor: pointer;
}

.translator-presets button:hover,
.coach-suggestions button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.translator-result {
  min-height: 156px;
  padding: 16px;
  border: 1px solid #d9e1ec;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink-soft);
}

.translator-result p {
  margin: 0;
  color: var(--muted);
}

.translator-result.is-loading {
  border-color: rgba(29, 78, 216, 0.45);
  background: #f6f9ff;
}

.translator-result.is-error {
  border-color: rgba(190, 18, 60, 0.32);
  background: #fff7f8;
  color: #9f1239;
}

.coach-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 16px;
  min-height: 620px;
}

.coach-sidebar,
.coach-main {
  min-width: 0;
  border: 1px solid #d9e1ec;
  border-radius: var(--radius);
  background: #fff;
}

.coach-sidebar {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 12px;
  padding: 14px;
}

.coach-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.button.ai-small {
  min-height: 36px;
  padding: 7px 10px;
  border-color: var(--line);
  background: #fff;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.button.ai-small.danger {
  color: var(--rose);
}

.history-search {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
}

.history-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.coach-history {
  display: grid;
  align-content: start;
  gap: 8px;
  overflow-y: auto;
  max-height: 490px;
}

.history-item {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-soft);
  text-align: left;
  cursor: pointer;
}

.history-item.active {
  border-color: #0f172a;
  background: #f1f5f9;
}

.history-item strong,
.history-item span,
.history-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-item strong {
  color: var(--ink);
  font-size: 0.96rem;
}

.history-item span,
.history-empty {
  color: var(--muted);
  font-size: 0.88rem;
}

.history-item small {
  color: #8a95a6;
  font-size: 0.76rem;
}

.coach-main {
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 12px;
  padding: 14px;
}

.coach-messages {
  display: grid;
  align-content: start;
  gap: 12px;
  overflow-y: auto;
  min-height: 360px;
  max-height: 460px;
  padding-right: 4px;
}

.coach-empty {
  padding: 18px;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius);
  background: #f8fafc;
  color: var(--muted);
}

.coach-empty strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

.coach-empty p {
  margin: 0;
}

.coach-message {
  display: grid;
  gap: 6px;
  max-width: 86%;
}

.coach-message > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.coach-message > div {
  padding: 12px 14px;
  border-radius: 8px;
  background: #f1f5f9;
  color: var(--ink-soft);
}

.coach-message.from-user {
  justify-self: end;
}

.coach-message.from-user > span {
  text-align: right;
}

.coach-message.from-user > div {
  background: #0f172a;
  color: #fff;
}

.coach-message.from-ai > div {
  border: 1px solid #e2e8f0;
  background: #fff;
}

.coach-compose {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.coach-compose label {
  grid-column: 1 / -1;
  color: var(--ink-soft);
  font-weight: 850;
}

.coach-compose textarea {
  min-height: 74px;
  resize: vertical;
  padding: 12px 13px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius);
  color: var(--ink);
  font: inherit;
}

.coach-compose textarea:focus {
  outline: 3px solid rgba(15, 118, 110, 0.16);
  border-color: var(--teal);
}

.ai-card-head h3,
.ai-card-head p {
  margin: 0;
}

.ai-card-head h3 {
  margin-top: 10px;
  color: var(--ink);
  font-size: 1.28rem;
  line-height: 1.25;
}

.ai-card-head p {
  margin-top: 8px;
  color: var(--muted);
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(29, 78, 216, 0.1);
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
}

.ai-badge.teal {
  background: rgba(15, 118, 110, 0.1);
  color: var(--teal);
}

.ai-form {
  display: grid;
  gap: 12px;
}

.ai-form label {
  color: var(--ink-soft);
  font-weight: 850;
}

.ai-form textarea {
  width: 100%;
  min-height: 132px;
  resize: vertical;
  padding: 13px 14px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
  line-height: 1.55;
}

.ai-form textarea:focus {
  outline: 3px solid rgba(29, 78, 216, 0.18);
  border-color: var(--blue);
}

.button.ai-submit {
  width: fit-content;
  border-color: #0f172a;
  background: #0f172a;
  color: #fff;
}

.button.ai-submit[disabled] {
  opacity: 0.62;
  cursor: wait;
  transform: none;
}

.ai-response {
  min-height: 156px;
  padding: 16px;
  border: 1px solid #d9e1ec;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink-soft);
  white-space: pre-wrap;
}

.ai-response p {
  margin: 0;
  color: var(--muted);
}

.ai-response.is-loading {
  border-color: rgba(29, 78, 216, 0.45);
  background: #f6f9ff;
}

.ai-response.is-error {
  border-color: rgba(190, 18, 60, 0.32);
  background: #fff7f8;
  color: #9f1239;
}

.ai-answer h4 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 1rem;
}

.ai-answer p,
.ai-answer ul,
.ai-answer ol {
  margin: 0 0 12px;
}

.ai-answer ul,
.ai-answer ol {
  padding-left: 1.15rem;
}

.ai-answer li + li {
  margin-top: 5px;
}

.ai-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  width: min(1180px, 100%);
  margin: 16px auto 0;
  padding: 14px 16px;
  border: 1px solid #bee3dc;
  border-radius: var(--radius);
  background: #f0fdfa;
  color: #134e4a;
}

.ai-note strong {
  white-space: nowrap;
}

.model-card,
.decision-card,
.practice-card,
.deploy-step,
.day-card,
.check-card,
.trust-card,
.ladder-step,
.phase-card,
.file-card,
.workflow-card,
.smooth-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.06);
}

.model-card {
  padding: 20px;
}

.model-card h3,
.decision-card h3,
.practice-card h3,
.deploy-step h3,
.day-card h3 {
  margin: 10px 0 8px;
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1.28;
}

.model-card p,
.decision-card p,
.practice-card p,
.deploy-step p,
.day-card p,
.trust-card p,
.ladder-step p,
.phase-card p,
.file-card p,
.workflow-card p,
.smooth-card p {
  margin: 0;
  color: var(--muted);
}

.trust-card,
.ladder-step,
.phase-card,
.file-card,
.workflow-card,
.smooth-card {
  padding: 20px;
}

.trust-card span,
.ladder-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 7px;
  background: #edf3ff;
  color: var(--blue);
  font-weight: 900;
}

.trust-card h3,
.ladder-step h3,
.phase-card h3,
.file-card h3,
.workflow-card h3,
.smooth-card h3 {
  margin: 12px 0 10px;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.3;
}

.trust-card label,
.day-card label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 14px;
  color: var(--ink-soft);
  font-weight: 750;
}

.trust-card label input,
.day-card input {
  margin-top: 2px;
}

.trust-card p,
.ladder-step p,
.phase-card p,
.file-card p,
.workflow-card p,
.smooth-card p {
  font-size: 0.96rem;
}

.trust-card {
  display: flex;
  flex-direction: column;
}

.ladder-step ul {
  margin: 14px 0 0;
  padding-left: 1.08rem;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.phase-card {
  min-height: 100%;
}

.phase-card h3 {
  margin-top: 0;
}

.phase-card p {
  margin-top: 10px;
}

.file-grid .file-card,
.workflow-grid .workflow-card,
.smooth-grid .smooth-card {
  min-height: 100%;
}

.workflow-card ol {
  margin: 12px 0 0;
  padding-left: 1.15rem;
  color: var(--ink-soft);
}

.workflow-card li + li {
  margin-top: 8px;
}

.smooth-card p {
  margin-top: 8px;
}

.pitfall-list {
  display: grid;
  gap: 10px;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.pitfall-list details {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.06);
}

.pitfall-list summary {
  list-style: none;
  padding: 18px 20px;
  color: var(--ink);
  font-weight: 850;
  cursor: pointer;
}

.pitfall-list summary::-webkit-details-marker {
  display: none;
}

.pitfall-list details[open] summary {
  border-bottom: 1px solid #e8edf4;
}

.pitfall-list p {
  margin: 0;
  padding: 16px 20px 20px;
  color: var(--muted);
}

.model-tag {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(29, 78, 216, 0.1);
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 850;
}

.model-tag.teal {
  background: rgba(15, 118, 110, 0.1);
  color: var(--teal);
}

.model-tag.amber {
  background: rgba(180, 83, 9, 0.12);
  color: var(--amber);
}

.model-tag.rose {
  background: rgba(190, 18, 60, 0.1);
  color: var(--rose);
}

.micro-action {
  margin-top: 16px !important;
  padding-top: 14px;
  border-top: 1px solid #e8edf4;
  color: var(--ink-soft) !important;
  font-size: 0.94rem;
}

.setup-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
  width: min(1180px, 100%);
  margin: 0 auto;
  align-items: start;
}

.progress-panel {
  position: sticky;
  top: 86px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
  box-shadow: var(--shadow);
}

.progress-panel strong {
  display: block;
  margin-bottom: 10px;
  font-size: 3rem;
  line-height: 1;
}

.progress-panel p:not(.panel-label) {
  color: var(--muted);
  font-size: 0.96rem;
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.check-card {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  min-height: 122px;
  padding: 18px;
}

.check-card input,
.day-card input {
  width: 20px;
  height: 20px;
  accent-color: var(--teal);
}

.check-card strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
}

.check-card span {
  color: var(--muted);
}

.week-tabs,
.shortcut-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: min(1180px, 100%);
  margin: 0 auto 18px;
}

.week-tab,
.chip {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-soft);
  font-weight: 800;
  cursor: pointer;
}

.week-tab.active,
.chip.active {
  border-color: #0f172a;
  background: #0f172a;
  color: #fff;
}

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.day-card {
  display: flex;
  flex-direction: column;
  min-height: 224px;
  padding: 18px;
}

.day-card > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 34px;
  border-radius: 7px;
  background: #eaf2ff;
  color: var(--blue);
  font-weight: 900;
}

.day-card p {
  flex: 1;
  margin-top: 4px;
  font-size: 0.94rem;
}

.day-card label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--ink-soft);
  font-weight: 800;
}

.day-card.is-hidden {
  display: none;
}

.shortcut-tools {
  width: min(1180px, 100%);
  margin: 0 auto 16px;
}

.search-box {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.06);
}

.search-box span {
  color: var(--muted);
  font-size: 1.25rem;
  font-weight: 900;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  font: inherit;
}

.shortcut-chips {
  width: 100%;
  margin-top: 12px;
  margin-bottom: 0;
}

.shortcut-table {
  overflow: hidden;
  width: min(1180px, 100%);
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.table-head,
.shortcut-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.35fr;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
}

.table-head {
  background: #111827;
  color: #fff;
  font-weight: 900;
}

.shortcut-row {
  border-top: 1px solid #e8edf4;
  color: var(--muted);
}

.shortcut-row strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.shortcut-row.is-hidden {
  display: none;
}

.empty-state {
  width: min(1180px, 100%);
  margin: 14px auto 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
}

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

.decision-card {
  padding: 22px;
}

.decision-card ul {
  margin: 16px 0 0;
  padding-left: 1.1rem;
  color: var(--ink-soft);
}

.decision-card li + li {
  margin-top: 8px;
}

.practice-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.practice-card {
  padding: 20px;
}

.flashcard {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  width: min(1180px, 100%);
  margin: 18px auto 0;
  padding: 24px;
  border: 1px solid #b7c4d8;
  border-radius: var(--radius);
  background: #101827;
  color: #fff;
  box-shadow: var(--shadow);
}

.flashcard h3,
.flashcard p {
  margin: 0;
}

.flashcard h3 {
  font-size: 1.55rem;
}

.flashcard .section-kicker {
  color: #93c5fd;
}

#cardQuestion {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.08rem;
}

.card-answer {
  margin-top: 12px !important;
  padding: 12px 14px;
  border-left: 4px solid #34d399;
  background: rgba(255, 255, 255, 0.08);
  color: #d1fae5 !important;
}

.card-actions {
  display: flex;
  gap: 10px;
}

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

.deploy-step {
  position: relative;
  padding: 22px;
}

.deploy-step > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #0f766e;
  color: #fff;
  font-weight: 900;
}

.note-panel {
  width: min(1180px, 100%);
  margin: 18px auto 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.note-panel h3,
.note-panel p {
  margin: 0;
}

.note-panel p {
  color: var(--muted);
}

.note-panel pre {
  overflow-x: auto;
  margin: 12px 0;
  padding: 14px 16px;
  border-radius: 8px;
  background: #101827;
  color: #e5e7eb;
}

.source-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: min(960px, 100%);
  margin: 0 auto;
}

.source-list a {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink-soft);
  font-weight: 750;
  text-decoration: none;
}

.source-list a:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(16px, 4vw, 44px);
  border-top: 1px solid var(--line);
  background: #101827;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.92rem;
}

.footer p {
  margin: 0;
}

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

  .trust-grid,
  .ladder,
  .phase-grid,
  .file-grid,
  .workflow-grid,
  .smooth-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .topbar {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    grid-column: 1 / -1;
    justify-content: flex-start;
    order: 3;
  }
}

@media (max-width: 820px) {
  .hero {
    min-height: 620px;
  }

  .hero-stats,
  .setup-layout,
  .decision-grid,
  .deploy-grid,
  .source-list,
  .trust-grid,
  .ladder,
  .phase-grid,
  .file-grid,
  .workflow-grid,
  .smooth-grid {
    grid-template-columns: 1fr;
  }

  .progress-panel {
    position: static;
  }

  .checklist-grid,
  .roadmap-grid {
    grid-template-columns: 1fr;
  }

  .table-head {
    display: none;
  }

  .shortcut-table {
    border: 0;
    background: transparent;
  }

  .shortcut-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin-bottom: 10px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
  }

  .shortcut-row span:first-child::before {
    content: "Windows：";
    color: var(--muted);
    font-weight: 800;
  }

  .shortcut-row strong::before {
    content: "Mac：";
    color: var(--muted);
    font-weight: 800;
  }

  .flashcard {
    grid-template-columns: 1fr;
  }

  .translator-layout,
  .coach-layout,
  .coach-compose {
    grid-template-columns: 1fr;
  }

  .coach-layout {
    min-height: auto;
  }

  .coach-history {
    max-height: 240px;
  }

  .coach-messages {
    min-height: 320px;
    max-height: 420px;
  }

  .coach-message {
    max-width: 94%;
  }

  .card-actions {
    flex-wrap: wrap;
  }

  .ai-note {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .topbar {
    min-height: 58px;
    gap: 8px;
  }

  .brand span:last-child {
    max-width: 138px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .top-progress {
    grid-template-columns: auto 54px;
  }

  .hero {
    min-height: 590px;
  }

  .hero-inner {
    width: min(100% - 28px, 1120px);
    padding-top: 58px;
  }

  .hero-actions,
  .card-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .button.ai-submit {
    width: 100%;
  }

  .coach-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .translator-presets button,
  .coach-suggestions button {
    flex: 1 1 calc(50% - 8px);
  }

  .ai-card {
    padding: 18px;
  }

  .model-grid,
  .practice-grid {
    grid-template-columns: 1fr;
  }

  .band {
    padding-left: 14px;
    padding-right: 14px;
  }

  .check-card {
    min-height: auto;
  }

  .footer {
    display: grid;
  }
}
