:root {
  --ink: #17211d;
  --muted: #68736d;
  --paper: #fffdf8;
  --line: rgba(23, 33, 29, .12);
  --green: #246b50;
  --green-dark: #174b39;
  --lime: #d8f05a;
  --orange: #ff8a5b;
  --shadow: 0 24px 70px rgba(31, 54, 44, .13);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: #f2f0e8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; overflow-x: hidden; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }

.page-glow {
  position: fixed;
  z-index: -1;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .24;
  pointer-events: none;
}
.glow-one { top: -12rem; left: -8rem; background: #9cd6a7; }
.glow-two { top: 18rem; right: -14rem; background: #f5bb8e; }

.site-header {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: white;
  background: var(--green);
  box-shadow: 0 8px 24px rgba(36, 107, 80, .25);
  font-weight: 800;
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; letter-spacing: .08em; }
.brand small { margin-top: 2px; color: var(--muted); font: 9px/1.2 ui-monospace, monospace; letter-spacing: .13em; text-transform: uppercase; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.live-pill, .safe-tag, .credit-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .52);
  font-size: 12px;
  font-weight: 700;
}
.live-pill { padding: 9px 13px; }
.live-pill i { width: 7px; height: 7px; border-radius: 50%; background: #45a979; box-shadow: 0 0 0 5px rgba(69, 169, 121, .13); }
.safe-tag { padding: 7px 10px; color: var(--green); background: #edf7f0; }
.credit-badge { padding: 7px 10px; color: var(--muted); }
.credit-badge.active { color: var(--green-dark); background: #e8f5ec; border-color: rgba(36, 107, 80, .25); }

.ghost-button, .secondary-button, .dark-button, .text-button {
  border: 0;
  border-radius: 11px;
  font-weight: 750;
}
.ghost-button { padding: 10px 14px; color: var(--ink); background: rgba(255, 255, 255, .58); border: 1px solid var(--line); }
.secondary-button { padding: 11px 14px; color: var(--green-dark); background: #edf5ef; }
.dark-button { padding: 11px 15px; color: white; background: var(--ink); }
.text-button { padding: 7px 0; color: var(--green); background: transparent; }
.ghost-button:hover, .secondary-button:hover, .dark-button:hover { transform: translateY(-1px); }

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.hero { padding: 88px 0 82px; max-width: 900px; }
.eyebrow, .step-label, .result-kicker {
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.eyebrow {
  display: inline-flex;
  padding: 9px 13px;
  border-radius: 999px;
  background: var(--lime);
  color: #344516;
}
.hero h1 {
  margin: 24px 0 20px;
  font-family: "STSong", "SimSun", serif;
  font-size: clamp(54px, 8.4vw, 108px);
  line-height: .96;
  letter-spacing: -.075em;
  font-weight: 900;
}
.hero h1 span { color: var(--green); }
.hero > p { max-width: 690px; color: var(--muted); font-size: 18px; line-height: 1.8; }
.hero-points { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 30px; }
.hero-points span { padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, .48); font-size: 12px; font-weight: 700; }

.workspace, .results, .how-it-works {
  margin-bottom: 32px;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 30px;
  background: rgba(255, 253, 248, .78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}
.workspace-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.workspace-heading > div:first-child { display: flex; align-items: center; gap: 12px; }
.workspace-heading h2 { margin: 0; font-size: 25px; letter-spacing: -.04em; }
.workspace-heading p { margin: 0; max-width: 520px; color: var(--muted); font-size: 12px; line-height: 1.7; text-align: right; }
.section-index {
  min-width: 38px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: var(--green);
  font: 700 11px/1 ui-monospace, monospace;
}
.input-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel, .mini-panel, .result-paper {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .72);
}
.panel { padding: 20px; }
.license-panel { grid-column: 1 / -1; }
.panel-title, .paper-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
}
.panel-title h3, .paper-toolbar h3, .mini-panel h3 { margin: 5px 0 0; font-size: 16px; }
.license-row { display: grid; grid-template-columns: 1fr auto; gap: 9px; }
input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  color: var(--ink);
  background: rgba(249, 249, 245, .78);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
input { padding: 12px 13px; }
textarea { min-height: 220px; padding: 14px; resize: vertical; line-height: 1.8; }
input:focus, textarea:focus { border-color: rgba(36, 107, 80, .58); background: white; box-shadow: 0 0 0 4px rgba(36, 107, 80, .08); }
.field-note, .submit-note, .paper-note { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.claim-box { margin-top: 16px; padding: 15px; border: 1px dashed rgba(36, 107, 80, .28); border-radius: 15px; background: #f2f7f1; }
.claim-box > div:first-child { display: grid; gap: 4px; margin-bottom: 11px; }
.claim-box strong { font-size: 13px; }
.claim-box span { color: var(--muted); font-size: 10px; line-height: 1.6; }
.claim-row { display: grid; grid-template-columns: 1fr auto; gap: 9px; }
.textarea-footer { display: flex; justify-content: space-between; margin-top: 8px; color: #87918b; font-size: 10px; }

.drop-zone {
  min-height: 90px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px dashed rgba(36, 107, 80, .35);
  border-radius: 15px;
  background: #f2f7f1;
  cursor: pointer;
  transition: .2s;
}
.drop-zone:hover, .drop-zone.dragging { border-color: var(--green); transform: translateY(-1px); background: #eaf4ed; }
.drop-zone.working { opacity: .7; }
.drop-zone.done { border-style: solid; }
.drop-zone input { display: none; }
.upload-icon { width: 47px; height: 47px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 13px; color: white; background: var(--green); font: 800 11px/1 ui-monospace, monospace; }
.drop-zone strong, .drop-zone small { display: block; }
.drop-zone strong { font-size: 13px; }
.drop-zone small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.divider { display: flex; align-items: center; gap: 10px; margin: 12px 0; color: #9aa19d; font-size: 9px; }
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }

.primary-button {
  min-height: 58px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 17px;
  color: white;
  background: var(--green);
  box-shadow: 0 18px 38px rgba(36, 107, 80, .25);
  font-weight: 800;
  transition: transform .2s, background .2s;
}
.primary-button:hover { transform: translateY(-2px); background: var(--green-dark); }
.primary-button:disabled { cursor: wait; opacity: .72; transform: none; }
.button-arrow { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; color: var(--green-dark); background: var(--lime); }
.submit-note { align-self: center; margin: 0; padding: 0 8px; }

.results[hidden] { display: none; }
.result-actions { display: flex; gap: 8px; }
.result-hero {
  min-height: 180px;
  padding: 25px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-radius: 23px;
  color: #fff;
  background: var(--green);
  overflow: hidden;
  position: relative;
}
.result-hero::after { content: ""; position: absolute; width: 280px; height: 280px; right: -80px; top: -110px; border-radius: 50%; border: 42px solid rgba(216, 240, 90, .16); }
.result-kicker { color: var(--lime); }
.result-hero h3 { margin: 9px 0; font: 800 clamp(25px, 4vw, 40px)/1.1 "STSong", serif; }
.result-hero p { max-width: 650px; margin: 0; color: rgba(255, 255, 255, .72); font-size: 12px; line-height: 1.7; }
.score-orbit { z-index: 1; width: 116px; height: 116px; flex: 0 0 auto; display: grid; place-content: center; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; background: rgba(255,255,255,.1); text-align: center; }
.score-orbit strong { font: 800 42px/1 ui-monospace, monospace; }
.score-orbit span { margin-top: 7px; color: rgba(255,255,255,.7); font-size: 9px; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 13px 0; }
.metrics article { padding: 15px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.7); }
.metrics span, .metrics small { display: block; color: var(--muted); font-size: 9px; }
.metrics strong { display: block; margin: 7px 0 9px; font: 800 24px/1 ui-monospace, monospace; }
.meter { height: 4px; margin-bottom: 8px; border-radius: 99px; background: #e4e8e4; overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.result-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 13px; }
.result-paper { padding: 20px; }
#revisedResume { min-height: 620px; border: 0; border-radius: 15px; background: #f5f3eb; font-family: "Noto Serif SC", "STSong", serif; font-size: 14px; line-height: 2; }
.result-side { display: grid; align-content: start; gap: 13px; }
.mini-panel { padding: 18px; }
.change-list { display: grid; gap: 9px; margin-top: 14px; max-height: 430px; overflow: auto; }
.change-list article { padding: 11px; border-radius: 13px; background: #f5f4ee; }
.change-list p { margin: 0; font-size: 10px; line-height: 1.55; }
.change-before { color: #9d7161; text-decoration: line-through; }
.change-after { margin-top: 6px !important; color: var(--green-dark); font-weight: 750; }
.change-list small { display: block; margin-top: 7px; color: var(--muted); font-size: 8px; }
.empty-state { color: var(--muted); text-decoration: none !important; }
.checklist { margin: 13px 0 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.checklist li { padding: 10px 10px 10px 29px; position: relative; border-radius: 12px; background: #fff6e8; color: #765f3e; font-size: 10px; line-height: 1.65; }
.checklist li::before { content: "✓"; position: absolute; left: 10px; top: 10px; font-weight: 900; color: var(--orange); }

.how-it-works { box-shadow: none; background: rgba(255,255,255,.42); }
.principle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.principle-grid article { min-height: 150px; padding: 20px; border-radius: 20px; background: var(--ink); color: white; }
.principle-grid article:nth-child(2) { background: var(--green); }
.principle-grid article:nth-child(3) { color: var(--ink); background: var(--lime); }
.principle-grid strong { font-size: 17px; }
.principle-grid p { margin: 35px 0 0; opacity: .68; font-size: 11px; line-height: 1.8; }

footer { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 25px 0 38px; display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
dialog { width: min(480px, calc(100% - 32px)); padding: 28px; border: 0; border-radius: 24px; color: var(--ink); background: var(--paper); box-shadow: 0 30px 100px rgba(15,30,22,.3); }
dialog::backdrop { background: rgba(18,29,24,.55); backdrop-filter: blur(5px); }
dialog h2 { margin: 8px 0 18px; font-size: 25px; }
dialog ol { padding-left: 20px; color: var(--muted); font-size: 12px; line-height: 2; }
.dialog-close { position: absolute; right: 14px; top: 13px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: #efeee8; }
.dialog-buy { margin-top: 18px; text-decoration: none; }
.dialog-buy[aria-disabled="true"] { opacity: .5; }
dialog p { color: var(--muted); font-size: 10px; }
.toast { position: fixed; z-index: 20; right: 22px; bottom: 22px; max-width: 340px; padding: 13px 16px; border-radius: 13px; color: white; background: var(--ink); box-shadow: var(--shadow); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .25s; font-size: 11px; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast[data-tone="success"] { background: var(--green); }
.toast[data-tone="error"] { background: #9b493f; }

@media (max-width: 820px) {
  .live-pill { display: none; }
  .hero { padding: 55px 0; }
  .hero h1 { font-size: clamp(46px, 16vw, 76px); }
  .workspace, .results, .how-it-works { padding: 18px; border-radius: 23px; }
  .workspace-heading { align-items: flex-start; }
  .workspace-heading p { display: none; }
  .input-grid, .result-layout { grid-template-columns: 1fr; }
  .license-panel { grid-column: auto; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .principle-grid { grid-template-columns: 1fr; }
  .principle-grid article { min-height: 125px; }
  .principle-grid p { margin-top: 20px; }
  .submit-note { text-align: center; }
}

@media (max-width: 520px) {
  .site-header, main, footer { width: min(100% - 24px, 1180px); }
  .brand small, .ghost-button { display: none; }
  .hero > p { font-size: 14px; }
  .hero-points span { font-size: 10px; }
  .workspace-heading, .result-heading, .result-hero, footer { align-items: flex-start; flex-direction: column; }
  .license-row { grid-template-columns: 1fr; }
  .claim-row { grid-template-columns: 1fr; }
  .result-actions { width: 100%; }
  .result-actions button { flex: 1; }
  .score-orbit { width: 88px; height: 88px; }
  .score-orbit strong { font-size: 30px; }
  .metrics { grid-template-columns: 1fr; }
}
