:root {
  color-scheme: light;
  --ink: #33302a;
  --muted: #6c675b;
  --line: #e3ddce;
  --line-soft: #efebdf;
  --surface: #ffffff;
  --paper: #fcfaf5;
  --cyan: #2e567f;
  --cyan-dark: #22405e;
  --green: #06c755;
  --danger: #af4e3b;
  --shadow: 0 24px 60px rgba(48, 45, 38, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(90deg, rgba(46, 86, 127, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(46, 86, 127, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 42px 42px;
  color: var(--ink);
  font-family: "Noto Serif TC", "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 240px 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 74px;
  padding: 12px clamp(18px, 4vw, 58px);
  border-bottom: 1px solid #efebdf;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
}

.brand-link img {
  display: block;
  width: 38px;
  height: auto;
}

.brand-text {
  display: grid;
  gap: 2px;
  line-height: 1.1;
}

.brand-text strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-text small {
  color: #bcb6a7;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: clamp(22px, 4vw, 64px);
  color: #6c675b;
  font-size: 15px;
}

.site-nav a:hover {
  color: var(--cyan-dark);
}

.line-button,
.primary-button,
.accent-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0 22px;
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
}

.line-button {
  background: var(--green);
  color: #fff;
  box-shadow: 0 14px 30px rgba(6, 199, 85, 0.25);
}

.line-button.large {
  min-width: 220px;
}

.primary-button,
.accent-button {
  background: linear-gradient(135deg, var(--cyan), #5e80a6);
  color: #fff;
  box-shadow: 0 14px 26px rgba(46, 86, 127, 0.22);
}

.ghost-button {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.74);
  color: var(--cyan-dark);
}

main {
  width: min(1480px, calc(100vw - 48px));
  margin: 0 auto;
}

.hero-section {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(28px, 5vw, 68px);
  align-items: center;
  min-height: calc(100vh - 74px);
  padding: 54px 0 68px;
}

.hero-copy h1,
.section-heading h2,
.panel-title h2,
.cta-band h2 {
  margin: 0;
  color: var(--ink);
  font-weight: 900;
  letter-spacing: 0;
}

.hero-copy h1 {
  max-width: 760px;
  font-size: clamp(44px, 5.2vw, 76px);
  line-height: 1.05;
  white-space: nowrap;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan-dark);
  font-family: "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.lead {
  max-width: 600px;
  margin: 24px 0 24px;
  color: #6c675b;
  font-size: 19px;
  line-height: 1.9;
}

.diagnosis-form {
  display: grid;
  gap: 10px;
  max-width: 620px;
  margin: 24px 0 18px;
}

.diagnosis-form label {
  color: #6c675b;
  font-family: "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
  font-size: 14px;
  font-weight: 800;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input[type="text"],
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 15px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  outline: none;
  font-family: "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
}

input[type="text"]::placeholder {
  color: #a39c8c;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) 20px,
    calc(100% - 15px) 20px;
  background-size: 7px 7px, 7px 7px;
  background-repeat: no-repeat;
}

input[type="text"]:focus,
select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(46, 86, 127, 0.12);
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 2px;
  color: var(--muted);
  line-height: 1.5;
}

.consent-row input {
  width: 17px;
  height: 17px;
  margin-top: 3px;
  accent-color: var(--cyan);
}

.hero-actions,
.source-note {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.source-note {
  margin-top: 14px;
  color: #6c675b;
  font-family: "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
  font-size: 14px;
}

.source-note span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.72);
}

.data-card,
.panel,
.cta-band,
.document-shell {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.data-card {
  padding: clamp(20px, 3vw, 34px);
  background:
    linear-gradient(90deg, rgba(46, 86, 127, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(46, 86, 127, 0.06) 1px, transparent 1px),
    rgba(246, 243, 235, 0.72);
  background-size: 42px 42px;
}

.card-header,
.panel-title,
.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.card-header h2,
.panel-title h2,
.section-heading h2 {
  font-size: clamp(28px, 3vw, 42px);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 13px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--cyan-dark);
  font-family: "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
  font-size: 13px;
  font-weight: 800;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 26px 0;
}

.kpi-grid article {
  min-height: 116px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.78);
}

.kpi-grid span,
.kpi-grid small {
  display: block;
  color: var(--muted);
  font-family: "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
}

.kpi-grid strong {
  display: block;
  margin: 9px 0 6px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1;
}

.kpi-grid small {
  color: var(--cyan-dark);
  font-weight: 800;
}

.line-chart {
  position: relative;
  min-height: 300px;
  border: 1px solid rgba(46, 86, 127, 0.2);
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(46, 86, 127, 0.08), rgba(46, 86, 127, 0.02)),
    repeating-linear-gradient(0deg, transparent, transparent 47px, rgba(46, 86, 127, 0.14) 48px),
    repeating-linear-gradient(90deg, transparent, transparent 79px, rgba(46, 86, 127, 0.1) 80px);
}

.line-chart svg {
  width: 100%;
  height: 300px;
  display: block;
}

.empty-state {
  display: grid;
  min-height: 300px;
  place-items: center;
  padding: 24px;
  color: #6c675b;
  font-family: "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
  font-weight: 700;
  line-height: 1.7;
  text-align: center;
}

.report-section,
.split-section,
.cta-band {
  margin: 38px 0;
}

.issue-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.issue-card,
.content-item,
.recommendation {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  padding: 18px;
}

.empty-card {
  background: rgba(255, 255, 255, 0.68);
}

.issue-card strong,
.content-item strong,
.recommendation strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.issue-card p,
.content-item p,
.recommendation p,
.cta-band p,
.document-shell p {
  margin: 0;
  color: #6c675b;
  line-height: 1.75;
}

.impact {
  display: inline-flex;
  min-height: 28px;
  margin-top: 14px;
  border-radius: 999px;
  padding: 0 10px;
  align-items: center;
  background: rgba(46, 86, 127, 0.1);
  color: var(--cyan-dark);
  font-family: "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
  font-size: 13px;
  font-weight: 800;
}

.split-section {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 18px;
}

.panel {
  padding: 22px;
}

.content-list,
.recommendation-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.content-item header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.content-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.content-stats span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  background: #f6f3eb;
  color: var(--cyan-dark);
  font-family: "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;
  font-size: 13px;
  font-weight: 800;
}

.cta-band {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 24px;
}

.legal-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 0 0 48px;
  color: var(--muted);
  font-size: 14px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  max-width: min(380px, calc(100vw - 36px));
  border-radius: 12px;
  padding: 12px 16px;
  background: var(--ink);
  color: #fff;
  opacity: 0;
  transform: translateY(10px);
  transition: 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.document-page {
  background: var(--paper);
}

.document-shell {
  width: min(820px, calc(100vw - 32px));
  margin: 42px auto;
  padding: 28px;
}

.document-shell h1 {
  margin-top: 18px;
  font-size: 42px;
}

.document-shell h2 {
  margin-top: 26px;
}

.document-shell a {
  color: var(--cyan-dark);
  font-weight: 800;
}

@media (max-width: 1100px) {
  .site-header {
    grid-template-columns: 1fr;
  }

  .site-nav {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .hero-section,
  .split-section {
    grid-template-columns: 1fr;
  }

  .kpi-grid,
  .issue-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  main {
    width: min(100vw - 28px, 1480px);
  }

  .site-header {
    padding: 12px 16px;
  }

  .site-nav {
    gap: 16px;
    font-size: 14px;
  }

  .hero-section {
    min-height: 0;
    padding: 34px 0;
  }

  .hero-copy h1 {
    white-space: normal;
    font-size: clamp(42px, 12vw, 62px);
  }

  .input-row,
  .kpi-grid,
  .issue-grid {
    grid-template-columns: 1fr;
  }

  .cta-band {
    align-items: flex-start;
    flex-direction: column;
  }
}
