:root {
  --ink: #17212b;
  --muted: #627282;
  --line: #dce4ea;
  --paper: #ffffff;
  --wash: #f4f6f8;
  --teal: #176b87;
  --teal-soft: #e7f4f7;
  --gold: #b06b18;
  --gold-soft: #fff5e5;
  --red: #b42318;
  --green: #237a57;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--wash);
  font-family: "Microsoft YaHei", system-ui, sans-serif;
}

button,
select,
textarea {
  font: inherit;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 236px 1fr;
}

.rail {
  padding: 22px 16px;
  color: #fff;
  background: #102027;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
}

.mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #d6a85d;
  color: #102027;
  font-weight: 800;
}

.brand h1,
.brand p,
.topbar h2,
.topbar p,
.brand h1 {
  font-size: 22px;
}

.brand p {
  margin-top: 2px;
  color: #c8d7df;
  font-size: 13px;
}

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

.nav-btn {
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  color: #d8e6ec;
  background: transparent;
  cursor: pointer;
  text-align: left;
  padding: 0 14px;
}

.nav-btn.active,
.nav-btn:hover {
  color: #fff;
  background: #1b3a45;
}

.workspace {
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

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

.topbar h2 {
  margin-top: 6px;
  font-size: 28px;
}

.stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.stats span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: var(--muted);
}

.stats strong {
  color: var(--teal);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.controls {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

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

select {
  min-width: 190px;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
}

.question-panel,
.import-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.question-meta {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.question-meta span {
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--teal);
  background: var(--teal-soft);
  font-size: 13px;
}

#questionText {
  margin: 0 0 16px;
  font-size: 22px;
  line-height: 1.55;
}

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

.option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfd;
  cursor: pointer;
}

.option:has(input:disabled) {
  cursor: default;
  opacity: 0.78;
}

.option input {
  margin-top: 4px;
}

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

.actions.compact {
  margin-top: 12px;
}

button {
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  padding: 0 16px;
  color: #fff;
  background: var(--teal);
  cursor: pointer;
}

button.secondary {
  color: var(--teal);
  background: var(--teal-soft);
}

button.ghost {
  color: var(--gold);
  background: var(--gold-soft);
}

.result {
  margin-top: 18px;
  padding: 16px;
  border-radius: 7px;
  line-height: 1.65;
}

.result.right {
  color: var(--green);
  background: #edf8f3;
}

.result.wrong {
  color: var(--red);
  background: #fff0ef;
}

.hidden {
  display: none;
}

.list,
.outline-grid {
  display: grid;
  gap: 12px;
}

.item,
.outline-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.item h3,
.outline-card h3,
.import-panel h3 {
  margin: 0 0 8px;
}

.item p,
.outline-card p,
.import-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.wrong-options {
  display: grid;
  gap: 8px;
  margin: 10px 0 12px;
  padding-left: 0;
  list-style: none;
}

.wrong-options li {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfd;
  line-height: 1.55;
}

textarea {
  width: 100%;
  min-height: 220px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  resize: vertical;
}

.sample {
  overflow: auto;
  padding: 14px;
  border-radius: 7px;
  background: #17212b;
  color: #dce9ef;
}

@media (max-width: 920px) {
  .app {
    grid-template-columns: 1fr;
  }

  .rail {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .brand {
    margin: 0;
  }

  .nav {
    display: flex;
    overflow-x: auto;
  }

  .nav-btn {
    white-space: nowrap;
  }

  .topbar,
  .topbar {
    display: grid;
  }

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