:root {
  --abp-bg: #f4f1ea;
  --abp-surface: #fffdf8;
  --abp-surface-2: #ebe6dc;
  --abp-ink: #17201c;
  --abp-muted: #69736d;
  --abp-line: #d5cec1;
  --abp-strong-line: #b8ad9d;
  --abp-accent: #176b5d;
  --abp-accent-2: #c54f32;
  --abp-accent-soft: #e6f1ed;
  --abp-code: #101816;
  --abp-code-line: #263632;
  --abp-radius: 8px;
  --abp-shadow: 0 18px 55px rgba(23, 32, 28, 0.10);
  --abp-font: "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --abp-mono: "JetBrains Mono", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, rgba(23, 107, 93, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(23, 107, 93, 0.035) 1px, transparent 1px),
    var(--abp-bg);
  background-size: 36px 36px;
  color: var(--abp-ink);
  font-family: var(--abp-font);
  line-height: 1.7;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.abp-page {
  width: 100%;
  min-height: 100vh;
}

.abp-shell {
  padding: 28px;
}

.abp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 32px;
  min-height: 520px;
  align-items: stretch;
  padding: 46px;
  border: 1px solid var(--abp-strong-line);
  border-radius: var(--abp-radius);
  background:
    radial-gradient(circle at 82% 12%, rgba(197, 79, 50, 0.14), transparent 28%),
    linear-gradient(135deg, #fffdf8 0%, #ede8dd 100%);
  box-shadow: var(--abp-shadow);
  overflow: hidden;
}

.abp-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 720px;
}

.abp-kicker,
.abp-section-label {
  color: var(--abp-accent-2);
  font-family: var(--abp-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

.abp-hero h1 {
  margin: 10px 0 18px;
  max-width: 640px;
  font-size: clamp(42px, 7vw, 88px);
  line-height: 1.02;
  letter-spacing: 0;
}

.abp-hero p {
  max-width: 620px;
  margin: 0;
  color: var(--abp-muted);
  font-size: 20px;
}

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

.abp-button,
.abp-nav-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 15px;
  border: 1px solid var(--abp-strong-line);
  border-radius: var(--abp-radius);
  background: var(--abp-surface);
  color: var(--abp-ink);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.abp-button:hover,
.abp-nav-link:hover {
  transform: translateY(-1px);
  border-color: var(--abp-accent);
  background: #f8fbf8;
}

.abp-button svg,
.abp-nav-link svg,
.abp-icon-btn svg {
  width: 17px;
  height: 17px;
}

.abp-button-primary,
.abp-nav-primary {
  border-color: var(--abp-accent);
  background: var(--abp-accent);
  color: #fffdf8;
}

.abp-button-primary:hover,
.abp-nav-primary:hover {
  background: #12584c;
  color: #fffdf8;
}

#progressFileInput {
  display: none;
}

.abp-terminal {
  align-self: center;
  min-height: 360px;
  border: 1px solid #293a35;
  border-radius: var(--abp-radius);
  background: var(--abp-code);
  color: #c9f4dd;
  box-shadow: 0 24px 80px rgba(16, 24, 22, 0.24);
  overflow: hidden;
}

.abp-terminal-bar {
  display: flex;
  gap: 8px;
  padding: 16px;
  border-bottom: 1px solid var(--abp-code-line);
  background: #17231f;
}

.abp-terminal-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e56b50;
}

.abp-terminal-bar span:nth-child(2) {
  background: #d9a441;
}

.abp-terminal-bar span:nth-child(3) {
  background: #4fb384;
}

.abp-terminal-body {
  padding: 26px;
  font-family: var(--abp-mono);
  font-size: 15px;
}

.abp-terminal-body p {
  margin: 0 0 16px;
  color: #cce8dc;
  word-break: break-word;
}

.abp-terminal-body span {
  color: #f0a07e;
}

.abp-main {
  width: min(1280px, calc(100% - 56px));
  margin: 0 auto;
  padding: 8px 0 80px;
}

.abp-progress-panel,
.abp-toolbar,
.abp-section,
.abp-aside-block,
.abp-stage {
  border: 1px solid var(--abp-line);
  border-radius: var(--abp-radius);
  background: rgba(255, 253, 248, 0.92);
}

.abp-progress-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 32px;
  align-items: center;
  padding: 26px;
}

.abp-progress-panel h2,
.abp-section h2 {
  margin: 4px 0 0;
  font-size: 26px;
  line-height: 1.25;
}

.abp-progress-panel p,
.abp-section-lead {
  margin: 8px 0 0;
  color: var(--abp-muted);
}

.abp-progress-stack {
  display: grid;
  gap: 14px;
}

.abp-progress-large {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
}

.abp-progress-large strong {
  color: var(--abp-accent);
  font-family: var(--abp-mono);
  font-size: 44px;
  line-height: 1;
}

.abp-progress-large span,
.abp-progress-note {
  color: var(--abp-muted);
  font-size: 14px;
}

.abp-progress-line {
  height: 10px;
  border-radius: 999px;
  background: var(--abp-surface-2);
  overflow: hidden;
}

.abp-progress-line > div {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--abp-accent), #53a284);
  transition: width 0.25s ease;
}

.abp-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 18px 0;
  padding: 14px;
}

.abp-search {
  display: flex;
  flex: 1;
  min-width: 260px;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--abp-line);
  border-radius: var(--abp-radius);
  background: var(--abp-surface);
}

.abp-search svg {
  width: 17px;
  height: 17px;
  color: var(--abp-muted);
}

.abp-search input,
.abp-toolbar select {
  min-height: 40px;
  border: 0;
  background: transparent;
  color: var(--abp-ink);
  outline: none;
}

.abp-search input {
  width: 100%;
}

.abp-toolbar select {
  min-width: 170px;
  padding: 0 12px;
  border: 1px solid var(--abp-line);
  border-radius: var(--abp-radius);
  background: var(--abp-surface);
}

.abp-button.is-active {
  border-color: var(--abp-accent);
  background: var(--abp-accent-soft);
}

.abp-stage-list {
  display: grid;
  gap: 14px;
}

.abp-stage {
  overflow: hidden;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.abp-stage:hover {
  border-color: var(--abp-accent);
  box-shadow: 0 14px 36px rgba(23, 32, 28, 0.08);
  transform: translateY(-1px);
}

.abp-stage.is-complete {
  border-color: rgba(23, 107, 93, 0.55);
}

.abp-stage-link {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) minmax(150px, 210px);
  gap: 24px;
  padding: 22px;
  text-decoration: none;
}

.abp-stage-index {
  color: var(--abp-accent);
  font-family: var(--abp-mono);
  font-size: 32px;
  font-weight: 600;
}

.abp-stage-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--abp-muted);
  font-size: 13px;
}

.abp-stage h3 {
  margin: 6px 0 6px;
  font-size: 22px;
  line-height: 1.3;
}

.abp-stage p {
  margin: 0;
  color: var(--abp-muted);
}

.abp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.abp-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border: 1px solid rgba(23, 107, 93, 0.18);
  border-radius: 999px;
  background: var(--abp-accent-soft);
  color: var(--abp-accent);
  font-size: 12px;
  font-weight: 600;
}

.abp-tag-soft {
  border-color: rgba(197, 79, 50, 0.18);
  background: #f7e9e3;
  color: var(--abp-accent-2);
}

.abp-tag-complete {
  background: var(--abp-accent);
  color: white;
}

.abp-stage-progress {
  display: grid;
  align-content: center;
  gap: 8px;
  text-align: right;
}

.abp-stage-progress strong {
  color: var(--abp-accent);
  font-family: var(--abp-mono);
  font-size: 28px;
}

.abp-stage-progress span {
  color: var(--abp-muted);
  font-size: 13px;
}

.abp-empty {
  padding: 30px;
  border: 1px dashed var(--abp-strong-line);
  border-radius: var(--abp-radius);
  background: rgba(255, 253, 248, 0.75);
  color: var(--abp-muted);
  text-align: center;
}

.abp-detail-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px 28px;
  border-bottom: 1px solid var(--abp-line);
  background: rgba(244, 241, 234, 0.92);
  backdrop-filter: blur(16px);
}

.abp-nav-count {
  color: var(--abp-muted);
  font-family: var(--abp-mono);
  font-size: 13px;
  text-align: center;
}

.abp-nav-actions,
.abp-bottom-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.abp-nav-link.is-disabled {
  cursor: default;
  opacity: 0.42;
  pointer-events: none;
}

.abp-detail-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 24px;
  width: min(1320px, calc(100% - 56px));
  margin: 28px auto 80px;
}

.abp-detail-aside {
  position: sticky;
  top: 88px;
  align-self: start;
  display: grid;
  gap: 16px;
}

.abp-aside-block {
  padding: 24px;
}

.abp-stage-number {
  color: var(--abp-accent);
  font-family: var(--abp-mono);
  font-weight: 600;
}

.abp-aside-block h1 {
  margin: 8px 0 12px;
  font-size: 34px;
  line-height: 1.18;
}

.abp-aside-block p {
  margin: 0;
  color: var(--abp-muted);
}

.abp-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.abp-meta-grid div {
  padding: 12px;
  border: 1px solid var(--abp-line);
  border-radius: var(--abp-radius);
  background: #faf7ef;
}

.abp-meta-grid span {
  display: block;
  color: var(--abp-muted);
  font-size: 12px;
}

.abp-meta-grid strong {
  display: block;
  margin-top: 3px;
  font-size: 14px;
}

.abp-detail-content {
  display: grid;
  gap: 18px;
}

.abp-section {
  padding: 24px;
}

.abp-section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.abp-count {
  color: var(--abp-muted);
  font-family: var(--abp-mono);
  font-size: 13px;
}

.abp-task-list,
.abp-acceptance-list,
.abp-warning-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.abp-task-list li,
.abp-acceptance-list li {
  border: 1px solid var(--abp-line);
  border-radius: var(--abp-radius);
  background: #faf7ef;
}

.abp-acceptance-list li {
  padding: 12px 14px;
}

.abp-check-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  cursor: pointer;
}

.abp-check-row input,
.abp-check-mini input {
  width: 17px;
  height: 17px;
  margin-top: 4px;
  accent-color: var(--abp-accent);
  flex: 0 0 auto;
}

.abp-check-row span {
  min-width: 0;
}

.abp-task-list li.is-done {
  border-color: rgba(23, 107, 93, 0.5);
  background: var(--abp-accent-soft);
}

.abp-task-list li.is-done span {
  color: var(--abp-accent);
  text-decoration: line-through;
}

.abp-lab-grid,
.abp-concept-grid,
.abp-day-plan {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.abp-lab,
.abp-concept,
.abp-day-card,
.abp-prompt,
.abp-resource {
  border: 1px solid var(--abp-line);
  border-radius: var(--abp-radius);
  background: #faf7ef;
}

.abp-lab,
.abp-day-card {
  padding: 18px;
}

.abp-lab.is-done {
  border-color: rgba(23, 107, 93, 0.5);
  background: var(--abp-accent-soft);
}

.abp-lab-head,
.abp-prompt-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.abp-check-mini {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--abp-muted);
  font-size: 13px;
  cursor: pointer;
}

.abp-check-mini input {
  margin-top: 0;
}

.abp-lab h3,
.abp-concept h3,
.abp-day-card h3,
.abp-prompt h3 {
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.abp-lab p,
.abp-concept p,
.abp-day-card p,
.abp-resource p {
  margin: 0;
  color: var(--abp-muted);
}

.abp-day-card-head {
  display: grid;
  gap: 4px;
}

.abp-day-index {
  color: var(--abp-accent);
  font-family: var(--abp-mono);
  font-size: 13px;
  font-weight: 700;
}

.abp-day-task-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--abp-ink);
}

.abp-day-task-list li::marker {
  color: var(--abp-accent);
}

.abp-day-output {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(23, 107, 93, 0.18);
  border-radius: var(--abp-radius);
  background: var(--abp-accent-soft);
}

.abp-day-output strong {
  color: var(--abp-accent);
  font-size: 13px;
}

.abp-day-output span {
  color: var(--abp-ink);
  font-size: 14px;
}

.abp-deliverable {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--abp-line);
}

.abp-deliverable strong {
  color: var(--abp-accent);
  font-size: 13px;
}

.abp-deliverable span {
  color: var(--abp-ink);
  font-size: 14px;
}

.abp-concept {
  padding: 18px;
}

.abp-analogy {
  margin-top: 12px;
  padding: 10px 12px;
  border-left: 3px solid var(--abp-accent);
  background: var(--abp-accent-soft);
  color: var(--abp-accent);
  font-size: 14px;
}

.abp-warning {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid rgba(197, 79, 50, 0.28);
  border-radius: var(--abp-radius);
  background: #f9ece6;
}

.abp-warning > strong {
  color: var(--abp-accent-2);
}

.abp-warning-list {
  margin-top: 10px;
}

.abp-warning-list li {
  color: #6d4538;
}

.abp-prompt-list {
  display: grid;
  gap: 14px;
}

.abp-prompt {
  overflow: hidden;
}

.abp-prompt-head {
  padding: 16px 18px;
}

.abp-prompt-head h3 {
  margin: 0;
}

.abp-icon-btn {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--abp-line);
  border-radius: var(--abp-radius);
  background: var(--abp-surface);
  cursor: pointer;
}

.abp-icon-btn:hover {
  border-color: var(--abp-accent);
}

.abp-code-wrap {
  position: relative;
}

.abp-code-wrap pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  border-top: 1px solid var(--abp-code-line);
  background: var(--abp-code);
  color: #d8efe3;
  font-family: var(--abp-mono);
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.abp-copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #d8efe3;
  cursor: pointer;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.18s ease, background 0.18s ease;
}

.abp-code-wrap:hover .abp-copy-btn,
.abp-copy-btn.is-copied {
  opacity: 1;
}

.abp-copy-btn:hover,
.abp-copy-btn.is-copied,
.abp-icon-btn.is-copied {
  background: var(--abp-accent);
  color: white;
}

.abp-resource-list {
  display: grid;
  gap: 12px;
}

.abp-resource {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  padding: 16px;
}

.abp-resource a {
  color: var(--abp-accent);
  font-weight: 700;
  text-decoration: none;
}

.abp-resource a:hover {
  text-decoration: underline;
}

.abp-resource p {
  grid-column: 1 / -1;
}

.abp-bottom-nav {
  justify-content: center;
  padding: 18px 0 6px;
}

.abp-muted {
  color: var(--abp-muted);
}

@media (max-width: 1040px) {
  .abp-hero,
  .abp-progress-panel,
  .abp-detail-layout {
    grid-template-columns: 1fr;
  }

  .abp-detail-aside {
    position: static;
  }
}

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

  .abp-hero {
    min-height: auto;
    padding: 28px 20px;
  }

  .abp-hero p {
    font-size: 17px;
  }

  .abp-terminal {
    min-height: auto;
  }

  .abp-main,
  .abp-detail-layout {
    width: calc(100% - 28px);
  }

  .abp-toolbar,
  .abp-stage-link,
  .abp-detail-nav {
    grid-template-columns: 1fr;
  }

  .abp-toolbar {
    align-items: stretch;
  }

  .abp-toolbar select,
  .abp-search {
    width: 100%;
    min-width: 0;
  }

  .abp-stage-link {
    gap: 12px;
  }

  .abp-stage-progress {
    text-align: left;
  }

  .abp-detail-nav,
  .abp-nav-actions {
    justify-content: stretch;
  }

  .abp-nav-link,
  .abp-button {
    width: 100%;
  }

  .abp-nav-count {
    text-align: left;
  }

  .abp-lab-grid,
  .abp-day-plan,
  .abp-concept-grid,
  .abp-meta-grid {
    grid-template-columns: 1fr;
  }

  .abp-section {
    padding: 18px;
  }

  .abp-resource {
    grid-template-columns: 1fr;
  }
}
