:root {
  color-scheme: light;
  --ink: #18322b;
  --muted: #66756f;
  --line: #d9e2dd;
  --paper: #fffefa;
  --page: #f2f6f3;
  --green: #14745c;
  --green-dark: #0d5946;
  --soft: #e8f3ee;
  --warn: #fff7df;
  --warn-line: #e8ce7b;
  --danger: #a33b32;
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(20, 116, 92, .09), transparent 30rem),
    var(--page);
}

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

button {
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}

button:hover { transform: translateY(-1px); }
button:disabled { cursor: wait; opacity: .55; transform: none; }

.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto 72px; }

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  padding: 54px 4px 26px;
}

.hero h1 { margin: 4px 0 10px; font-size: clamp(30px, 5vw, 52px); letter-spacing: -.04em; }
.hero p:last-child { max-width: 720px; margin: 0; color: var(--muted); line-height: 1.7; }

.eyebrow {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.badge {
  white-space: nowrap;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--green-dark);
  background: var(--soft);
  font-size: 13px;
  font-weight: 700;
}

.hero-actions { display: flex; align-items: center; gap: 10px; }
.link-button { display: inline-flex; align-items: center; text-decoration: none; }

.panel {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 16px 38px rgba(25, 52, 44, .055);
}

.panel h2 { margin: 4px 0 18px; }
.workspace { display: grid; gap: 20px; }
.results { display: grid; gap: 20px; }
.hidden { display: none !important; }
.helper { margin: -8px 0 10px; color: var(--muted); line-height: 1.65; }

.form-panel { display: grid; gap: 9px; }
.series-intake { display: grid; gap: 10px; }
.form-panel label, #gate label { margin-top: 8px; font-size: 13px; font-weight: 750; }
.series-intake label, #review-panel > label, .feedback-panel label {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 750;
}

input, textarea, select {
  width: 100%;
  border: 1px solid #c8d5cf;
  border-radius: 10px;
  padding: 12px 13px;
  color: var(--ink);
  background: white;
  outline: none;
}

textarea { resize: vertical; line-height: 1.65; }
input:focus, textarea:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(20, 116, 92, .12); }

.inline { display: flex; gap: 10px; }
.inline input { flex: 1; }

.primary, #unlock {
  padding: 12px 18px;
  color: white;
  background: var(--green);
  font-weight: 800;
}

.primary:hover, #unlock:hover { background: var(--green-dark); }
.wide { width: 100%; }

.secondary {
  padding: 10px 14px;
  color: var(--green-dark);
  background: var(--soft);
  font-weight: 750;
}

.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.status { min-height: 22px; margin: 4px 0 0; color: var(--muted); }
.status.error { color: var(--danger); }

.decision-grid, .two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.decision-grid div {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-radius: 12px;
  background: var(--soft);
}

.decision-grid span, .publish-section > span { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.decision-grid strong { font-size: 22px; }
.decision-grid small { color: var(--muted); line-height: 1.55; }

.warning-panel { border-color: var(--warn-line); background: var(--warn); }
.depth-panel { border-left: 5px solid var(--green); }
.radar-panel { border-left: 5px solid #c68a2c; }
.source-link { display: inline-block; margin-top: 8px; color: var(--green); font-size: 13px; font-weight: 750; text-decoration: none; }
.revision-panel { border-left: 5px solid var(--gold, #b98900); }
.revision-panel textarea { margin: 10px 0; }
#revision-classification { margin-top: 12px; padding: 12px 14px; border-radius: 11px; background: rgba(255, 255, 255, .72); border: 1px solid var(--line); }
#revision-classification .tag { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .02em; padding: 4px 10px; border-radius: 99px; background: var(--warn); color: #7a5c00; margin-bottom: 6px; }
#revision-classification p:last-child { margin: 0; color: var(--muted); line-height: 1.6; }
.card-list, .instruction-list, .issue-list { display: grid; gap: 10px; }

.content-card, .instruction, .issue, .question-item {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, .72);
}

.content-card b, .instruction b, .issue b { display: block; margin-bottom: 5px; }
.content-card p, .instruction p, .issue p { margin: 0; color: var(--muted); line-height: 1.6; white-space: pre-wrap; }

.publish-panel { border-left: 5px solid var(--green); }
.publish-section { margin-top: 20px; }
.publish-section p { margin: 7px 0 0; line-height: 1.75; }
.script { white-space: pre-wrap; font-size: 17px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.chip { padding: 7px 10px; border-radius: 999px; background: var(--soft); font-size: 13px; font-weight: 700; }

.question-item { margin-bottom: 12px; }
.question-item label { display: block; margin-bottom: 8px; font-weight: 750; line-height: 1.5; }

.series-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.series-card-grid .content-card { background: var(--soft); }

.assumption-box {
  margin: 18px 0;
  padding: 17px;
  border: 1px solid var(--warn-line);
  border-radius: 12px;
  background: var(--warn);
}

.assumption-box > strong { display: block; margin-bottom: 10px; }
.assumption-box #assumptions { display: grid; gap: 9px; }

.direction-picker { margin: 22px 0; }
.direction-picker h3 { margin-bottom: 12px; }
.direction-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

.direction-option {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 100%;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: left;
  color: var(--ink);
  background: white;
}

.direction-option:hover { border-color: var(--green); }
.direction-option.selected { border: 2px solid var(--green); background: var(--soft); }
.direction-option .recommendation {
  width: max-content;
  padding: 4px 7px;
  border-radius: 999px;
  color: white;
  background: var(--green);
  font-size: 11px;
  font-weight: 800;
}
.direction-option strong { font-size: 18px; }
.direction-option span, .direction-option small { color: var(--muted); line-height: 1.5; }
.direction-option small { display: block; }

.series-hero {
  overflow: hidden;
  border-left: 5px solid var(--green);
  background:
    radial-gradient(circle at right top, rgba(20, 116, 92, .13), transparent 24rem),
    var(--paper);
}

.series-promise {
  max-width: 820px;
  margin: -4px 0 22px;
  font-size: clamp(18px, 2.5vw, 25px);
  font-weight: 700;
  line-height: 1.55;
}

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

.series-meta > div {
  display: grid;
  gap: 6px;
  padding: 13px;
  border-radius: 10px;
  background: rgba(232, 243, 238, .82);
}

.series-meta span { color: var(--muted); font-size: 12px; }
.series-meta strong { line-height: 1.45; }

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

.episode-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}

.episode-card:first-child { border-color: var(--green); background: var(--soft); }
.episode-number { color: var(--green); font-size: 24px; font-weight: 850; }
.episode-card h3 { margin: 1px 0 6px; }
.episode-card p { margin: 0 0 8px; line-height: 1.55; }
.episode-card small { color: var(--muted); line-height: 1.55; }

.next-source-panel { border-color: var(--green); background: var(--soft); }
.next-source-panel h2 { max-width: 860px; line-height: 1.5; }
.next-source-panel p:last-child { margin-bottom: 0; color: var(--muted); }

.feedback-panel { border-top: 5px solid var(--green); }
.rating-actions, .reason-list { display: flex; flex-wrap: wrap; gap: 10px; }
.rating-actions { margin: 16px 0; }

.rating-button, .reason-button {
  padding: 10px 15px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: white;
  font-weight: 750;
}

.rating-button.selected, .reason-button.selected {
  border-color: var(--green);
  color: white;
  background: var(--green);
}

#feedback-form { display: grid; gap: 11px; margin-top: 17px; }
.feedback-label { margin: 0; font-weight: 750; }

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: 360px;
  padding: 12px 16px;
  border-radius: 10px;
  color: white;
  background: var(--green-dark);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: .2s ease;
}

.toast.show { opacity: 1; transform: translateY(0); }

.embedded body { background:var(--page); }
.embedded .shell { width:min(100% - 20px,1180px); margin-bottom:24px; }
.embedded .hero { display:none; }
.embedded .workspace { padding-top:10px; }

@media (max-width: 760px) {
  .shell { width: min(100% - 20px, 1180px); }
  .hero { padding-top: 30px; flex-direction: column; }
  .hero-actions { width: 100%; justify-content: space-between; }
  .panel { padding: 19px; border-radius: 14px; }
  .decision-grid, .two-column, .series-card-grid, .series-meta, .direction-options { grid-template-columns: 1fr; }
  .inline { align-items: stretch; flex-direction: column; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .episode-card { grid-template-columns: 36px 1fr; padding: 14px; }
  .episode-number { font-size: 19px; }
}
