:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --panel-soft: #eef2f7;
  --ink: #17202a;
  --muted: #5f6b7a;
  --line: #d8dee8;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --gold: #b7791f;
  --danger: #b84a3a;
  --blue: #2f6fed;
  --shadow: 0 18px 50px rgba(24, 38, 56, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, -apple-system, BlinkMacSystemFont,
    sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 22px clamp(18px, 4vw, 44px);
  background: rgba(246, 248, 251, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand-block {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

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

h1 {
  margin-bottom: 4px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: 0;
}

.lead,
.section-band > p,
.module-heading p,
.item-copy p,
.status-card span,
.disclaimer {
  color: var(--muted);
}

.lead {
  margin-bottom: 0;
}

.header-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.primary-button,
.ghost-button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-weight: 700;
}

.primary-button {
  color: #ffffff;
  background: var(--accent);
}

.primary-button:hover {
  background: var(--accent-strong);
}

.ghost-button {
  color: var(--ink);
  background: #ffffff;
  border-color: var(--line);
}

.ghost-button:hover {
  border-color: var(--accent);
}

.app-shell {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  gap: 28px;
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 28px clamp(18px, 4vw, 44px) 56px;
}

.sidebar {
  position: sticky;
  top: 116px;
  align-self: start;
}

.status-card {
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.status-card p {
  margin-bottom: 4px;
}

.status-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
}

.status-card span {
  display: block;
  font-size: 14px;
}

.module-nav {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.nav-link {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.nav-link span {
  color: var(--accent);
  font-weight: 800;
}

.nav-link:hover {
  background: #ffffff;
  border-color: var(--accent);
}

.workspace {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.section-band,
.module-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.section-band {
  padding: clamp(18px, 3vw, 28px);
}

.intro-band {
  display: grid;
  grid-template-columns: minmax(220px, 0.65fr) minmax(360px, 1fr);
  gap: 24px;
  align-items: start;
}

.company-grid,
.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  color: var(--ink);
  background: #fbfdfb;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
}

input,
select {
  min-height: 42px;
  padding: 8px 10px;
}

textarea {
  resize: vertical;
  min-height: 82px;
  padding: 10px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.result-band {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(420px, 1.1fr);
  gap: 20px;
  align-items: center;
  background: #222b3a;
  color: #ffffff;
}

.result-band .eyebrow,
.result-band p {
  color: #c9d7e8;
}

.result-main h2 {
  margin-bottom: 10px;
  font-size: clamp(28px, 4vw, 44px);
}

.result-main p:last-child {
  margin-bottom: 0;
}

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

.score-card {
  display: grid;
  gap: 4px;
  min-height: 118px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
}

.score-card span,
.score-card small {
  color: #c7ddd2;
}

.score-card strong {
  font-size: 25px;
  line-height: 1.1;
}

.score-card.high strong {
  color: #8de2b8;
}

.score-card.middle strong {
  color: #f1d18b;
}

.score-card.low strong {
  color: #ffa08d;
}

.score-card.pending strong {
  color: #dbe8e1;
}

.modules-form {
  display: grid;
  gap: 22px;
}

.module-panel {
  overflow: hidden;
}

.module-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
  background: var(--panel-soft);
  border-bottom: 1px solid var(--line);
}

.module-heading p:last-child {
  margin-bottom: 0;
}

.module-score {
  display: flex;
  align-items: baseline;
  gap: 3px;
  min-width: 100px;
  justify-content: flex-end;
}

.module-score strong {
  font-size: 36px;
  line-height: 1;
}

.module-score span {
  color: var(--muted);
  font-weight: 700;
}

.items-list {
  display: grid;
}

.score-item {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) minmax(360px, 1.1fr);
  gap: 18px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.score-item.answered {
  background: linear-gradient(90deg, rgba(15, 118, 110, 0.06), rgba(255, 255, 255, 0));
}

.score-item:last-child {
  border-bottom: 0;
}

.item-area {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-bottom: 10px;
  padding: 1px 8px;
  color: var(--accent-strong);
  background: #dff0ec;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.item-copy p {
  margin-bottom: 10px;
}

.item-copy small {
  display: block;
  color: #6b5b2e;
  background: #fff6d9;
  border: 1px solid #f0dfa5;
  border-radius: 6px;
  padding: 9px 10px;
}

.item-inputs {
  min-width: 0;
}

.choice-control {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-control legend {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.choice-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.choice-option {
  display: block;
  min-width: 0;
}

.choice-option input {
  position: absolute;
  width: 1px;
  min-height: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.choice-option > span {
  display: grid;
  align-content: center;
  min-height: 92px;
  padding: 12px;
  background: #fbfdfb;
  border: 1px solid var(--line);
  border-radius: 8px;
  transition:
    border-color 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease;
}

.choice-option strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.3;
}

.choice-option small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.choice-option:hover > span {
  border-color: var(--accent);
}

.choice-option input:focus-visible + span {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.choice-option input:checked + span {
  background: #e5f3ed;
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.choice-option input:checked + span strong {
  color: var(--accent-strong);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

#reportText {
  min-height: 420px;
  background: #fbfdfb;
  line-height: 1.7;
}

#reportText:disabled {
  color: var(--muted);
  background: #f0f4f0;
}

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

.pitfall-card {
  padding: 16px;
  background: #fbfdfb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pitfall-card span {
  display: inline-block;
  margin-bottom: 9px;
  color: var(--danger);
  font-size: 12px;
  font-weight: 800;
}

.pitfall-card h3 {
  min-height: 44px;
}

.pitfall-card p {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
}

.pitfall-card p:last-child {
  margin-bottom: 0;
}

.pitfall-card strong {
  color: var(--ink);
}

.question-list {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.question-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) minmax(180px, 0.38fr);
  gap: 12px;
  align-items: center;
  padding: 13px 16px;
  background: #fbfdfb;
  border-bottom: 1px solid var(--line);
}

.question-row:last-child {
  border-bottom: 0;
}

.question-row span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #ffffff;
  background: var(--blue);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}

.question-row p {
  margin-bottom: 0;
}

.question-row small {
  color: var(--muted);
}

.disclaimer {
  margin: 0;
  padding: 0 4px 20px;
  font-size: 13px;
}

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

  .sidebar {
    position: static;
  }

  .module-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .intro-band,
  .result-band,
  .score-item {
    grid-template-columns: 1fr;
  }

  .score-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pitfall-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .app-header {
    position: static;
    align-items: stretch;
    flex-direction: column;
  }

  .header-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .module-nav,
  .company-grid,
  .profile-grid,
  .score-grid,
  .pitfall-grid,
  .choice-options,
  .question-row {
    grid-template-columns: 1fr;
  }

  .module-heading,
  .section-heading {
    flex-direction: column;
  }

  .module-score {
    justify-content: flex-start;
  }

  .score-item,
  .module-heading {
    padding: 18px;
  }

  .question-row span {
    display: none;
  }
}

@media print {
  body {
    background: #ffffff;
  }

  .app-header,
  .sidebar,
  .modules-form,
  .pitfalls-band,
  .questions-band,
  .header-actions,
  .section-heading button {
    display: none !important;
  }

  .app-shell {
    display: block;
    padding: 0;
  }

  .section-band {
    border: 0;
    box-shadow: none;
  }

  .result-band {
    color: #000000;
    background: #ffffff;
  }

  .result-band .eyebrow,
  .result-band p {
    color: #000000;
  }

  .score-card {
    color: #000000;
    border-color: #cccccc;
    background: #ffffff;
  }

  .score-card span,
  .score-card small,
  .score-card strong {
    color: #000000 !important;
  }

  #reportText {
    border: 0;
    min-height: 900px;
  }
}
