:root {
  --ink: #17211b;
  --muted: #5f6e66;
  --line: #d8e0db;
  --paper: #fbfcf8;
  --panel: #ffffff;
  --green: #1d6b55;
  --green-dark: #114838;
  --coral: #c9543d;
  --blue: #2c5d91;
  --gold: #b98222;
  --soft-green: #e8f3ee;
  --soft-coral: #fff0ec;
  --soft-blue: #edf4fb;
  --shadow: 0 16px 40px rgba(25, 39, 31, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--green-dark);
  font-weight: 800;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 250px;
  height: 100px;
  object-fit: contain;
  border-radius: 4px;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.language-switcher select {
  width: auto;
  min-width: 126px;
  max-width: none;
  padding: 9px 10px;
  background: #fff;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 14px;
}

.nav a,
.internal-links a {
  text-decoration: none;
}

.nav a:hover,
.internal-links a:hover {
  color: var(--green-dark);
}

.checker-band {
  padding: clamp(24px, 4vw, 48px);
}

.checker-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 28px;
  max-width: 1240px;
  margin: 0 auto;
  align-items: start;
}

.writer,
.seo-grid article,
.ad-slot {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.writer {
  padding: clamp(20px, 3vw, 32px);
}

.results {
  padding: 0;
}

.eyebrow {
  color: var(--coral);
  font-size: 13px;
  font-weight: 700;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 12px;
  font-size: clamp(30px, 4.5vw, 54px);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: 22px;
}

.intro {
  max-width: 760px;
  color: var(--muted);
}

.score-form {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.topic-picker {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 20px;
  border: 2px solid rgba(201, 52, 47, 0.28);
  border-radius: 8px;
  background: #fff8f6;
}

.topic-picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.topic-picker h2 {
  margin-bottom: 4px;
  font-size: 24px;
}

.topic-kicker {
  margin-bottom: 4px;
  color: var(--coral);
  font-size: 13px;
  font-weight: 800;
}

.topic-picker p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.topic-mode,
.topic-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topic-mode {
  flex-direction: column;
}

.mode-button,
.secondary-action {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--green-dark);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.mode-button {
  min-width: 82px;
}

.mode-button.active,
.secondary-action.strong {
  border-color: var(--green);
  background: var(--soft-green);
}

.secondary-action {
  padding: 0 12px;
}

.topic-text {
  min-height: 104px;
  padding: 14px;
  border: 1px solid #c9d4ce;
  border-radius: 8px;
  background: #fff;
  color: #28352f;
}

.task1-visual {
  padding: 14px;
  border: 1px solid #e2c8c3;
  border-radius: 8px;
  background: #fff;
}

.visual-title {
  margin-bottom: 8px;
  color: var(--coral);
  font-size: 13px;
  font-weight: 800;
}

.task1-visual svg {
  display: block;
  width: 100%;
  max-height: 230px;
}

.task1-visual line,
.task1-visual path,
.task1-visual polyline,
.task1-visual rect,
.task1-visual circle {
  fill: none;
  stroke: var(--green-dark);
  stroke-width: 5;
}

.task1-visual rect,
.task1-visual circle {
  fill: var(--soft-green);
}

.task1-visual path,
.task1-visual polyline {
  stroke-linecap: round;
  stroke-linejoin: round;
}

.task1-visual .accent {
  stroke: var(--coral);
  fill: rgba(201, 84, 61, 0.16);
}

.task1-visual .secondary {
  stroke: #6f89b8;
}

.task1-visual text {
  fill: var(--muted);
  font-size: 18px;
  font-weight: 700;
}

.visual-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 14px;
}

.visual-table th,
.visual-table td {
  padding: 10px;
  border: 1px solid var(--line);
  text-align: center;
}

.visual-table th {
  background: var(--soft-green);
}

.topic-note {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--soft-blue);
}

label,
.essay-head {
  font-weight: 700;
}

.essay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

textarea,
select {
  width: 100%;
  border: 1px solid #c9d4ce;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

textarea {
  min-height: 92px;
  padding: 13px 14px;
  resize: vertical;
}

#prompt {
  background: #f7f8f7;
}

textarea::placeholder {
  color: #a5b0aa;
}

#essay {
  min-height: 340px;
}

select {
  max-width: 220px;
  padding: 11px 12px;
}

textarea:focus,
select:focus {
  outline: 3px solid rgba(29, 107, 85, 0.18);
  border-color: var(--green);
}

.privacy-note {
  padding: 12px 14px;
  border-left: 4px solid var(--blue);
  background: var(--soft-blue);
  color: #244761;
  font-size: 14px;
}

.primary-action {
  width: min(220px, 100%);
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.primary-action:hover {
  background: var(--green-dark);
}

.primary-action:disabled {
  cursor: wait;
  opacity: 0.7;
}

.form-error {
  min-height: 24px;
  margin: 0;
  color: var(--coral);
  font-weight: 700;
}

.results {
  position: sticky;
  top: 86px;
}

.usage-card,
.result-empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.usage-card {
  margin-bottom: 14px;
  padding: 16px;
}

.usage-card h2 {
  font-size: 20px;
}

.usage-card ol {
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
}

.usage-card li {
  margin-bottom: 6px;
}

.result-empty {
  min-height: 300px;
  display: grid;
  align-content: center;
  color: var(--muted);
  padding: 20px;
}

.hidden {
  display: none;
}

.score-summary {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 20px;
}

.band-circle {
  display: grid;
  width: 140px;
  height: 140px;
  place-items: center;
  border-radius: 50%;
  background: var(--soft-green);
  color: var(--green-dark);
  border: 10px solid #cfe7dc;
}

.band-circle strong {
  display: block;
  font-size: 44px;
  line-height: 1;
}

.band-circle span {
  font-size: 13px;
  font-weight: 700;
}

.metric-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.metric {
  padding: 7px 10px;
  border-radius: 8px;
  background: #f4f7f5;
  color: var(--muted);
  font-size: 13px;
}

.topic-warning {
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid #f0b7aa;
  border-left: 4px solid var(--coral);
  border-radius: 8px;
  background: var(--soft-coral);
  color: #7a3326;
}

.topic-warning p,
.topic-warning ul {
  margin: 8px 0 0;
}

.model-evidence {
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: #f8fbf8;
}

.model-evidence h3 {
  margin-top: 0;
}

.model-evidence ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.scored-topic {
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid #6b7f91;
  border-radius: 8px;
  background: #f7f9fb;
}

.scored-topic h3 {
  margin-top: 0;
}

.scored-topic p {
  margin: 8px 0;
  color: var(--ink);
}

.scored-topic small {
  color: var(--muted);
  line-height: 1.6;
}

.category-list,
.issue-list,
.fix-list,
.next-list {
  display: grid;
  gap: 10px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.category,
.issue,
.fix {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.category-head,
.issue strong,
.fix strong {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-weight: 800;
}

.category-band {
  color: var(--blue);
}

.category p,
.issue p,
.fix p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.issue {
  background: var(--soft-coral);
}

.fix {
  background: #fffaf0;
}

.fix-code {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  color: #38443e;
  font-size: 14px;
}

.fix-code span {
  display: block;
  padding: 9px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
}

.next-list {
  padding-left: 20px;
  list-style: disc;
  color: var(--muted);
}

.result-actions {
  margin-bottom: 18px;
}

.example-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--coral);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.example-button:hover {
  background: #a93f2e;
}

.disclaimer {
  margin: 0;
  padding: 12px;
  border-radius: 8px;
  background: #f4f7f5;
  color: var(--muted);
  font-size: 14px;
}

.ad-slot {
  display: grid;
  gap: 4px;
  max-width: 1240px;
  margin: 0 auto 28px;
  padding: 18px clamp(18px, 4vw, 28px);
  color: var(--muted);
  text-align: center;
}

.ad-slot-top {
  margin-top: 18px;
  margin-bottom: 0;
}

.ad-slot-result {
  margin: 14px 0;
  padding: 14px;
  box-shadow: none;
}

.ad-slot-resource {
  margin-bottom: 18px;
}

.ad-slot span {
  color: var(--gold);
  font-weight: 800;
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(24px, 4vw, 48px) 32px;
}

.seo-grid article {
  padding: 22px;
}

.seo-grid p,
footer p {
  color: var(--muted);
}

.internal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 1240px;
  margin: 0 auto 40px;
  padding: 0 clamp(24px, 4vw, 48px);
}

.internal-links a {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--green-dark);
  font-weight: 700;
}

footer {
  border-top: 1px solid var(--line);
  padding: 24px clamp(18px, 4vw, 56px);
}

@media (max-width: 920px) {
  .checker-layout,
  .seo-grid {
    grid-template-columns: 1fr;
  }

  .results {
    position: static;
  }
}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-logo {
    width: 190px;
    height: 76px;
  }

  .nav {
    gap: 8px 12px;
  }

  .checker-band {
    padding: 18px;
  }

  .score-summary {
    grid-template-columns: 1fr;
  }

  .band-circle {
    width: 124px;
    height: 124px;
  }

  #essay {
    min-height: 300px;
  }

  .topic-picker-head {
    flex-direction: column;
  }
}
