:root {
  --bg: #f4f7fa;
  --text: #1b2328;
  --muted: #60707a;
  --panel: #ffffff;
  --panel-soft: #f8fafb;
  --line: #d8e1e7;
  --ink: #162932;
  --teal: #087f8c;
  --teal-dark: #075f69;
  --amber: #b97317;
  --rose: #b63b4a;
  --green: #2f7d4f;
  --shadow: 0 14px 34px rgba(27, 35, 40, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px clamp(16px, 4vw, 44px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(23px, 3vw, 36px);
  line-height: 1.1;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(23px, 3.2vw, 38px);
  line-height: 1.16;
}

h3 {
  margin-bottom: 8px;
  font-size: 15px;
  line-height: 1.35;
}

.layout {
  width: min(1160px, calc(100vw - 28px));
  margin: 22px auto 60px;
}

.heroPanel,
.panel,
.taskItem,
.metric,
.teachingDesk,
.trackPanel,
.progressPanel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.heroPanel {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr);
  gap: 22px;
  padding: clamp(20px, 3vw, 30px);
  border-top: 5px solid var(--teal);
  background:
    linear-gradient(135deg, rgba(8, 127, 140, 0.08), rgba(255, 255, 255, 0) 42%),
    #fff;
}

.heroCopy p:last-child {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.75;
}

.teachingDesk {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.86fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
  padding: clamp(18px, 3vw, 26px);
  border-top: 5px solid var(--teal);
}

.deskIntro {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.72;
}

.deskLinks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.deskGrid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 12px;
}

.deskCard {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.deskCard h3 {
  color: var(--ink);
}

.commandList {
  margin: 0;
  padding-left: 20px;
  color: var(--text);
  line-height: 1.7;
}

.privacyNotice {
  border-color: #ebccd1;
  background: #fdf5f6;
}

.privacyNotice p {
  margin-bottom: 0;
  color: var(--text);
  line-height: 1.72;
}

.profileGrid {
  display: grid;
  gap: 13px;
  align-self: center;
}

.trackPanel {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
  gap: 18px;
  align-items: stretch;
  margin: 16px 0;
  padding: clamp(18px, 2.5vw, 24px);
  border-left: 5px solid var(--ink);
}

.trackPanel h2 {
  margin-bottom: 0;
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.22;
}

.trackGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.trackGrid article {
  display: grid;
  gap: 8px;
  min-height: 120px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.trackGrid strong {
  color: var(--teal-dark);
  font-size: 18px;
}

.trackGrid span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.68;
}

.pathStrip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.pathStep {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

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

.pathStep strong {
  color: var(--ink);
  font-size: 16px;
}

.pathStep p {
  grid-column: 1 / -1;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.66;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--text);
  background: #fbfcfd;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(8, 127, 140, 0.15);
}

.dashboardLink,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  background: var(--teal);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.topActions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.subtleLink {
  background: #e8f1f3;
  color: var(--teal-dark);
}

.subtleLink:hover {
  background: #d8e9ec;
}

button:hover,
.dashboardLink:hover {
  background: var(--teal-dark);
}

.dangerBtn {
  background: var(--rose);
}

.dangerBtn:hover {
  background: #912f3b;
}

.kitStrip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.kitStrip span {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.progressPanel {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  padding: 16px 18px;
}

.progressPanel > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#progressText {
  color: var(--teal-dark);
  font-weight: 900;
}

.progressBar {
  height: 12px;
  overflow: hidden;
  background: #dbe5e9;
  border-radius: 999px;
}

#progressFill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--green), var(--amber));
  transition: width 0.25s ease;
}

.taskList {
  display: grid;
  gap: 18px;
}

.taskItem {
  padding: clamp(18px, 2.5vw, 26px);
}

.taskItem.coreTask {
  border-left: 5px solid var(--teal);
}

.taskItem.coreTask .taskNumber {
  background: var(--teal-dark);
}

.taskTopline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.taskNumber,
.taskKicker,
.taskTag,
.durationText {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
}

.taskNumber {
  background: var(--ink);
  color: #fff;
}

.taskKicker {
  background: #eef6f7;
  color: var(--teal-dark);
}

.taskTag {
  background: #fff4e5;
  color: var(--amber);
}

.durationText {
  background: #f7e9ec;
  color: var(--rose);
}

.taskHeader,
.sectionHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.taskHeader h2 {
  max-width: 840px;
  margin-bottom: 16px;
  font-size: clamp(21px, 2.4vw, 30px);
}

.doneBox {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  min-width: 92px;
  color: var(--text);
}

.doneBox input {
  width: 18px;
  height: 18px;
}

.learningGrid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 0.86fr) minmax(0, 1.18fr);
  grid-template-areas:
    "theory method output"
    "case case case"
    "steps steps steps";
  gap: 12px;
  margin-bottom: 16px;
}

.miniSection {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.miniSection h3 {
  color: var(--ink);
}

.miniSection p,
.miniSection li {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.78;
}

.miniSection p {
  margin-bottom: 0;
}

.theoryBox {
  grid-area: theory;
}

.methodBox {
  grid-area: method;
  border-color: #cddbf2;
  background: #f2f7ff;
}

.caseBox {
  grid-area: case;
}

.stepBox {
  grid-area: steps;
}

.outputBox {
  grid-area: output;
}

.caseText {
  white-space: pre-line;
}

.caseBox {
  background: #fffaf2;
  border-color: #ead7b8;
}

.stepBox {
  background: #f5fbf8;
  border-color: #cfe3d8;
}

.outputBox {
  background: #fdf5f6;
  border-color: #ebccd1;
}

.sampleGrid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr) minmax(0, 0.9fr);
  gap: 12px;
  margin: 0 0 16px;
}

.sampleSection {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.sampleSection h3 {
  margin-bottom: 8px;
  color: var(--ink);
}

.sampleSection p,
.sampleSection li {
  color: var(--text);
  font-size: 14px;
  line-height: 1.72;
}

.sampleSection p {
  margin-bottom: 0;
  white-space: pre-line;
}

.inputSampleBox {
  border-color: #cddbf2;
  background: #f7faff;
}

.outputSampleBox {
  border-color: #d8dfc8;
  background: #f8fbf2;
}

.reviewBox {
  border-color: #ead7b8;
  background: #fffaf2;
}

.reviewPointList {
  margin: 0;
  padding-left: 20px;
}

.stepList {
  margin: 0;
  padding-left: 22px;
}

.promptBlock {
  overflow: hidden;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfc;
}

.promptHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-weight: 900;
}

pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  white-space: pre-wrap;
  color: #233034;
  font-size: 14px;
  line-height: 1.7;
}

.copyBtn {
  min-height: 36px;
  background: #e8f1f3;
  color: var(--teal-dark);
}

.copyBtn:hover {
  background: #d8e9ec;
}

.taskActions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.saveStatus {
  color: var(--muted);
  font-size: 14px;
}

.metricGrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric {
  padding: 18px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.metric strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 32px;
}

.panel {
  padding: 20px;
  margin-bottom: 18px;
}

.panelNote {
  align-self: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.tipList {
  display: grid;
  gap: 10px;
}

.tipItem {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.tipLevel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-radius: 8px;
  background: #eef6f7;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 900;
}

.tipItem p {
  margin-bottom: 0;
  color: var(--text);
  line-height: 1.7;
}

.taskBars {
  display: grid;
  gap: 12px;
}

.barRow {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

.barTrack {
  height: 12px;
  overflow: hidden;
  background: #dbe5e9;
  border-radius: 999px;
}

.barFill {
  height: 100%;
  background: var(--teal);
}

.tableWrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 13px;
}

td {
  line-height: 1.6;
}

.entryPanel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.62fr);
  gap: 24px;
  align-items: center;
  padding: clamp(22px, 4vw, 34px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  border-top: 5px solid var(--teal);
}

.entryCopy p {
  color: var(--muted);
  line-height: 1.76;
}

.entryActions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.qrBox {
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.qrImage {
  width: min(100%, 280px);
  aspect-ratio: 1;
  object-fit: contain;
  border: 10px solid #fff;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(27, 35, 40, 0.1);
}

.linkBox {
  width: 100%;
  padding: 12px;
  border: 1px dashed var(--teal);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-size: 14px;
  line-height: 1.65;
  word-break: break-all;
}

@media (max-width: 860px) {
  .topbar,
  .taskHeader,
  .sectionHeader {
    align-items: stretch;
    flex-direction: column;
  }

  .topActions {
    justify-content: flex-start;
  }

  .dashboardLink,
  button {
    width: 100%;
  }

  .heroPanel,
  .entryPanel,
  .trackPanel,
  .pathStrip,
  .learningGrid,
  .sampleGrid,
  .teachingDesk,
  .deskGrid {
    grid-template-columns: 1fr;
  }

  .learningGrid {
    grid-template-areas:
      "theory"
      "method"
      "case"
      "steps"
      "output";
  }

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

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

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

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

  .doneBox {
    min-width: 0;
  }
}

@media print {
  body {
    background: #fff;
  }

  .topbar {
    position: static;
    box-shadow: none;
  }

  .topActions,
  .copyBtn,
  .saveBtn,
  .dashboardLink,
  button {
    display: none !important;
  }

  .layout {
    width: calc(100vw - 24px);
    margin: 12px auto;
  }

  .heroPanel,
  .panel,
  .taskItem,
  .metric,
  .teachingDesk,
  .deskCard,
  .trackPanel,
  .pathStep,
  .progressPanel,
  .entryPanel,
  .qrBox {
    box-shadow: none;
    break-inside: avoid;
  }
}

@media (max-width: 560px) {
  .layout {
    width: min(100vw - 20px, 1160px);
    margin-top: 14px;
  }

  .heroPanel,
  .taskItem,
  .panel,
  .teachingDesk,
  .progressPanel {
    padding: 16px;
  }

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

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

  .pathStep {
    min-height: 0;
  }

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

  .barRow {
    grid-template-columns: 68px minmax(0, 1fr) 42px;
    gap: 8px;
  }

  pre {
    font-size: 13px;
  }
}
