:root {
  --ink: #1f2725;
  --muted: #69716e;
  --line: #d9dedb;
  --paper: #f7f8f6;
  --white: #ffffff;
  --green: #0e7557;
  --green-dark: #095a43;
  --green-soft: #e6f2ed;
  --yellow: #f1c95c;
  --red: #c94d45;
  --red-soft: #f8e8e6;
  --radius: 6px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 82px; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; letter-spacing: 0; }
button, input, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
.topbar { height: 68px; padding: 0 clamp(18px, 4vw, 64px); display: flex; align-items: center; justify-content: space-between; gap: 28px; position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.brand { color: var(--ink); display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 150px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; color: var(--white); background: var(--green); font-weight: 700; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; }
.brand small { margin-top: 1px; color: var(--muted); font-size: 10px; }
.step-nav { display: flex; align-self: stretch; }
.step-nav a { position: relative; padding: 0 18px; color: var(--muted); display: flex; align-items: center; gap: 7px; text-decoration: none; font-size: 13px; }
.step-nav a::after { content: ""; position: absolute; left: 18px; right: 18px; bottom: 0; height: 2px; background: transparent; }
.step-nav a.active, .step-nav a:hover { color: var(--green); }
.step-nav a.active::after { background: var(--green); }
.step-nav b { font-size: 10px; font-weight: 500; }
.top-actions { display: flex; align-items: center; gap: 14px; }
.save-status { color: var(--muted); font-size: 11px; white-space: nowrap; }
.save-status span { width: 6px; height: 6px; margin-right: 6px; display: inline-block; border-radius: 50%; background: var(--green); }
.icon-btn { width: 34px; height: 34px; border: 1px solid var(--line); background: var(--white); color: var(--ink); font-size: 18px; }
main { max-width: 1260px; margin: 0 auto; background: var(--white); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.intro-band { min-height: 235px; padding: 48px clamp(24px, 5vw, 72px); color: var(--white); display: flex; align-items: end; justify-content: space-between; gap: 30px; background: var(--green); position: relative; overflow: hidden; }
.intro-band::after { content: "MATCH"; position: absolute; right: -8px; top: -35px; color: rgba(255,255,255,.055); font-family: Georgia, serif; font-size: 148px; line-height: 1; }
.eyebrow { margin: 0 0 17px; color: #a9d9ca; font-size: 10px; letter-spacing: 2.3px; }
.intro-band h1 { max-width: 660px; margin: 0 0 13px; font-family: Georgia, "Songti SC", serif; font-size: clamp(32px, 4vw, 52px); line-height: 1.12; font-weight: 500; letter-spacing: 0; }
.intro-band p:last-child { margin: 0; color: #d4e9e2; font-size: 14px; }
.primary-btn, .secondary-btn, .text-btn, .copy-btn { border-radius: 3px; transition: .18s ease; }
.primary-btn { min-height: 42px; padding: 0 18px; border: 1px solid var(--green); color: var(--white); background: var(--green); white-space: nowrap; }
.primary-btn:hover { background: var(--green-dark); }
.intro-band .primary-btn { position: relative; z-index: 1; border-color: var(--yellow); color: var(--ink); background: var(--yellow); }
.primary-btn span { margin-left: 16px; }
.secondary-btn, .copy-btn { min-height: 36px; padding: 0 15px; color: var(--green); background: var(--white); border: 1px solid var(--green); }
.secondary-btn:hover, .copy-btn:hover { background: var(--green-soft); }
.workspace-section { padding: 56px clamp(24px, 5vw, 72px) 64px; border-bottom: 1px solid var(--line); }
.workspace-section.alt { background: #fafbf9; }
.section-heading { margin-bottom: 34px; display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 15px; }
.section-no { width: 40px; height: 40px; display: grid; place-items: center; color: var(--green); border: 1px solid var(--green); font: 500 12px Georgia, serif; }
.section-heading p { margin: 0 0 3px; color: var(--green); font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; }
.section-heading h2 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: 25px; font-weight: 500; }
.section-hint { color: var(--muted); font-size: 11px; }
.form-grid { display: grid; gap: 18px; }
.form-grid.four { grid-template-columns: repeat(4, 1fr); }
.form-grid.three { grid-template-columns: repeat(3, 1fr); }
.form-grid.two { grid-template-columns: repeat(2, 1fr); }
.form-grid .span-2 { grid-column: span 2; }
label, .full-label { color: #535c58; display: flex; flex-direction: column; gap: 8px; font-size: 12px; font-weight: 500; }
input, textarea { width: 100%; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 3px; outline: none; }
input { height: 42px; padding: 0 12px; }
textarea { padding: 12px; resize: vertical; line-height: 1.7; }
input:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 2px rgba(14,117,87,.1); }
::placeholder { color: #a5aca9; }
.textareas { margin-top: 24px; }
.keyword-box { margin-top: 24px; padding: 18px; background: var(--green-soft); border-left: 3px solid var(--green); }
.keyword-head { margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.keyword-head span { font-size: 12px; font-weight: 500; }
.keyword-head small, .subsection-title small { color: var(--muted); font-size: 10px; }
.tags, .diag-tags { min-height: 27px; display: flex; flex-wrap: wrap; gap: 7px; }
.tag { padding: 5px 8px; color: var(--green-dark); background: var(--white); border: 1px solid #b9d8cd; border-radius: 2px; font-size: 11px; }
button.tag { display: flex; align-items: center; gap: 6px; }
button.tag span { color: var(--muted); }
.tag-input-row { margin-top: 12px; display: flex; gap: 10px; }
.tag-input-row input { height: 36px; background: rgba(255,255,255,.75); }
.text-btn { padding: 0 14px; color: var(--green); background: transparent; border: 1px solid var(--green); white-space: nowrap; }
.subsection-title { margin: 35px 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.subsection-title span { font-family: Georgia, "Songti SC", serif; font-size: 18px; }
.analysis-edit-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.analysis-edit-grid label { padding-top: 12px; border-top: 2px solid var(--green); }
.analysis-edit-grid textarea { background: #fbfcfb; }
.full-label { margin-top: 24px; }
.score-layout { padding: 28px; display: grid; grid-template-columns: 1fr 1.2fr; gap: 54px; background: var(--green); color: var(--white); }
.score-main { display: flex; align-items: center; gap: 24px; }
.score-ring { width: 116px; aspect-ratio: 1; flex: 0 0 auto; border-radius: 50%; border: 8px solid rgba(255,255,255,.18); display: grid; place-content: center; text-align: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.score-ring strong { font: 500 37px Georgia, serif; }
.score-ring span { color: #c7e2d9; font-size: 10px; }
.score-label { margin: 0 0 5px; color: #b6dcd0; font-size: 10px; }
.score-main h3 { margin: 0 0 9px; font-family: Georgia, "Songti SC", serif; font-size: 23px; font-weight: 500; }
.score-main p:last-child { margin: 0; color: #d4e9e2; font-size: 11px; line-height: 1.6; }
.score-breakdown { display: grid; gap: 14px; align-content: center; }
.score-breakdown div { display: grid; grid-template-columns: 92px 38px 1fr; gap: 10px; align-items: center; }
.score-breakdown span, .score-breakdown b { font-size: 11px; font-weight: 500; }
.score-breakdown b { text-align: right; }
.score-breakdown i { height: 5px; overflow: hidden; background: rgba(255,255,255,.18); }
.score-breakdown em { width: 0; height: 100%; display: block; background: var(--yellow); transition: width .5s ease; }
.diagnosis-grid { margin-top: 26px; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.diagnosis-grid article { min-height: 168px; padding: 20px; border-right: 1px solid var(--line); }
.diagnosis-grid article:last-child { border-right: 0; }
.diag-head { margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.diag-head h3 { margin: 0; flex: 1; font-size: 13px; font-weight: 500; }
.diag-head b { color: var(--muted); font: 500 18px Georgia, serif; }
.dot { width: 7px; height: 7px; border-radius: 50%; }.dot.green { background: var(--green); }.dot.red { background: var(--red); }.dot.gray { background: #929996; }
.diag-tags .tag { color: var(--ink); background: var(--paper); border-color: transparent; }
.diag-tags .tag.missing { color: #8d352f; background: var(--red-soft); }
.empty { color: #9ba29f; font-size: 11px; }
.keyword-compare .subsection-title { margin-top: 32px; }
.compare-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 28px; }
.compare-item { padding: 10px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; font-size: 12px; }
.compare-item span:last-child { font-size: 10px; }.hit { color: var(--green); }.miss { color: var(--red); }
.empty-state { grid-column: 1 / -1; margin: 20px 0; color: var(--muted); font-size: 12px; }
.output-section { background: #f6f8f5; }
.output-tabs { display: flex; gap: 0; overflow-x: auto; border-bottom: 1px solid var(--line); }
.output-tabs button { padding: 12px 16px; color: var(--muted); background: transparent; border: 0; border-bottom: 2px solid transparent; white-space: nowrap; font-size: 12px; }
.output-tabs button.active { color: var(--green); border-bottom-color: var(--green); }
.output-panel { margin-top: 18px; background: var(--white); border: 1px solid var(--line); }
.output-meta { min-height: 48px; padding: 0 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.output-meta span { font-family: Georgia, "Songti SC", serif; font-size: 16px; }
.copy-btn { min-height: 30px; font-size: 11px; }
#outputText { min-height: 390px; border: 0; border-radius: 0; padding: 24px; font-family: "Microsoft YaHei", sans-serif; line-height: 1.9; }
.disclaimer { margin: 12px 0 0; color: var(--muted); font-size: 10px; }
footer { max-width: 1260px; margin: 0 auto; padding: 22px 30px; color: var(--muted); display: flex; justify-content: space-between; font-size: 10px; }
.toast { position: fixed; left: 50%; bottom: 25px; z-index: 50; transform: translate(-50%, 20px); padding: 10px 16px; color: var(--white); background: var(--ink); border-radius: 3px; opacity: 0; pointer-events: none; transition: .2s ease; font-size: 12px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 900px) {
  .step-nav { display: none; }
  .form-grid.four, .analysis-edit-grid { grid-template-columns: repeat(2, 1fr); }
  .score-layout { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 640px) {
  .topbar { padding: 0 15px; }.save-status { display: none; }
  .intro-band { min-height: 280px; padding: 36px 22px; align-items: flex-start; flex-direction: column; justify-content: center; }
  .intro-band h1 { font-size: 34px; }.intro-band .primary-btn { width: 100%; }
  .workspace-section { padding: 42px 18px 48px; }
  .section-heading { grid-template-columns: 42px 1fr; }.section-heading > :last-child { grid-column: 1 / -1; width: 100%; }
  .section-hint { display: none; }
  .form-grid.four, .form-grid.three, .form-grid.two, .analysis-edit-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .score-layout { padding: 22px 18px; }.score-main { align-items: flex-start; }.score-ring { width: 92px; }
  .diagnosis-grid { grid-template-columns: 1fr; }.diagnosis-grid article { border-right: 0; border-bottom: 1px solid var(--line); }.diagnosis-grid article:last-child { border-bottom: 0; }
  .compare-list { grid-template-columns: 1fr; }
  #outputText { min-height: 460px; padding: 18px; }
}
