:root {
  color-scheme: light;
  --green: #07c160;
  --green-dark: #059b4c;
  --green-soft: #e9f8ef;
  --blue: #576b95;
  --ink: #181818;
  --muted: #7f7f7f;
  --line: #e8e8e8;
  --paper: #ffffff;
  --canvas: #f3f4f5;
  --warning: #d48a16;
  --warning-soft: #fff7e8;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

button {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 10px 28px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}

.brand,
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  font-size: 17px;
  font-weight: 650;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
}

.brand-mark.large {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  font-size: 24px;
}

.generated-at {
  color: var(--muted);
  font-size: 12px;
}

.button {
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.button-plain {
  background: #fff;
  color: var(--ink);
}

.button-plain:hover {
  background: #f7f7f7;
}

.page {
  width: min(1180px, calc(100% - 40px));
  margin: 30px auto 64px;
}

.hero {
  padding: 42px 46px;
  background: var(--paper);
  border-radius: 16px;
  border-top: 5px solid var(--green);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

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

h1 {
  margin-bottom: 14px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.22;
  letter-spacing: -0.02em;
}

h2 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.35;
}

.hero-summary {
  max-width: 900px;
  margin-bottom: 14px;
  color: var(--blue);
  font-size: 20px;
  line-height: 1.65;
}

.hero-opening,
.body-copy {
  margin-bottom: 0;
  color: #555;
  font-size: 15px;
  line-height: 1.8;
}

section {
  margin-top: 34px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
}

.section-heading.compact {
  align-items: start;
}

.section-heading > p {
  max-width: 520px;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  text-align: right;
}

.dimension-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.dimension-card,
.paper-card,
.finding-card,
.impact-card,
.recommendation-card,
.plan-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.dimension-card {
  padding: 17px;
}

.status {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 650;
}

.status.priority {
  background: #fff0f0;
  color: #c43a3a;
}

.status.watch {
  background: var(--warning-soft);
  color: var(--warning);
}

.dimension-card h3,
.finding-card h3,
.impact-card h3,
.recommendation-card h3,
.plan-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
}

.card-copy,
.card-meta,
.list {
  color: #606060;
  font-size: 13px;
  line-height: 1.65;
}

.card-copy {
  margin: 8px 0 0;
}

.card-meta {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.finding-card,
.impact-card,
.paper-card {
  padding: 20px;
}

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

.recommendation-card {
  padding: 22px;
}

.priority-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.detail-block {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.detail-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
}

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

.plan-card {
  min-height: 210px;
  padding: 17px;
}

.plan-day {
  margin-bottom: 10px;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 700;
}

.list {
  margin: 10px 0 0;
  padding-left: 18px;
}

.positive-card {
  background: var(--green-soft);
  border-color: #cdeed9;
}

.source-list {
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.source-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  padding: 15px 18px;
}

.source-row + .source-row {
  border-top: 1px solid var(--line);
}

.source-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

.source-relevance {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.source-origin {
  margin: 4px 0 0;
  color: #3d5a45;
  font-size: 12px;
  line-height: 1.45;
}

.source-link {
  align-self: center;
  color: var(--blue);
  font-size: 12px;
  text-decoration: none;
}

.source-link:hover {
  text-decoration: underline;
}

.disclaimer {
  margin-top: 34px;
  padding: 18px 20px;
  background: #ececec;
  border-radius: 10px;
  color: #666;
  font-size: 12px;
  line-height: 1.65;
}

.disclaimer p {
  margin: 5px 0 0;
}

.empty-page {
  min-height: calc(100vh - 64px);
  padding: 60px 20px;
}

.empty-card {
  width: min(520px, 100%);
  margin: 8vh auto 0;
  padding: 48px;
  background: #fff;
  border-radius: 16px;
  text-align: center;
}

.empty-card h1 {
  margin-top: 20px;
  font-size: 28px;
}

.empty-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 920px) {
  .dimension-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 640px) {
  .topbar {
    padding: 10px 14px;
  }

  .generated-at {
    display: none;
  }

  .page {
    width: min(100% - 24px, 1180px);
    margin-top: 14px;
  }

  .hero {
    padding: 28px 22px;
  }

  .hero-summary {
    font-size: 17px;
  }

  .section-heading,
  .content-grid {
    display: block;
  }

  .section-heading > p {
    margin-top: 8px;
    text-align: left;
  }

  .content-grid > div + div {
    margin-top: 28px;
  }

  .dimension-grid,
  .recommendation-grid,
  .plan-grid {
    grid-template-columns: 1fr;
  }

  .plan-card {
    min-height: auto;
  }
}

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

  .topbar {
    display: none;
  }

  .page {
    width: 100%;
    margin: 0;
  }

  section,
  .paper-card,
  .recommendation-card,
  .plan-card {
    break-inside: avoid;
  }
}

/* Human-readable report */
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-bottom: 14px;
}

.hero-meta .eyebrow {
  margin: 0;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.hero-meta .sec-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background-size: 18px 18px;
}

.period-pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.overview-stat {
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.overview-stat strong {
  display: block;
  margin-bottom: 5px;
  font-size: 28px;
}

.overview-stat span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

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

.chart-card {
  min-width: 0;
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.chart-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.chart-card > p {
  margin: 5px 0 16px;
  color: var(--muted);
  font-size: 12px;
}

.chart-host {
  min-height: 220px;
}

.chart-host svg {
  display: block;
  width: 100%;
  height: 220px;
  overflow: visible;
}

.chart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  color: var(--muted);
  font-size: 13px;
}

.portrait-card {
  padding: 32px 36px;
  background: var(--green-soft);
  border: 1px solid #cdeed9;
  border-radius: 16px;
}

.portrait-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  gap: 36px;
}

.portrait-card h2 {
  font-size: 36px;
}

.portrait-sentence {
  margin: 10px 0 0;
  color: var(--green-dark);
  font-size: 18px;
  line-height: 1.6;
}

.portrait-story {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.story-line {
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.78);
  border-radius: 9px;
  color: #4f4f4f;
  font-size: 14px;
  line-height: 1.6;
}

.finding-list {
  counter-reset: finding;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.human-finding {
  counter-increment: finding;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px;
  padding: 24px;
}

.human-finding + .human-finding {
  border-top: 1px solid var(--line);
}

.human-finding::before {
  content: "0" counter(finding);
  color: var(--green);
  font-size: 18px;
  font-weight: 700;
}

.human-finding h3 {
  margin: 0;
  font-size: 19px;
}

.human-finding p {
  margin: 8px 0 0;
  color: #555;
  font-size: 14px;
  line-height: 1.7;
}

.human-finding .data-example {
  padding: 10px 12px;
  background: #f7f7f7;
  border-radius: 8px;
  color: var(--blue);
}

.human-finding .cannot-conclude {
  color: var(--muted);
  font-size: 12px;
}

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

.life-impact {
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.impact-level {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 11px;
  font-weight: 650;
}

.impact-level.cannot_tell {
  background: #f0f0f0;
  color: #777;
}

.impact-level.no_clear_signal {
  background: var(--green-soft);
  color: var(--green-dark);
}

.life-impact h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.5;
}

.direct-answer {
  margin: 9px 0 0;
  color: var(--blue);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
}

.impact-detail {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.impact-detail span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
}

.impact-detail p {
  margin: 0;
  color: #555;
  font-size: 13px;
  line-height: 1.6;
}

.content-card {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 36px;
  padding: 30px 34px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.theme-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.theme-pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: #f2f3f5;
  color: #4f4f4f;
  font-size: 13px;
}

blockquote {
  margin: 18px 0 0;
  padding: 14px 18px;
  border-left: 4px solid var(--green);
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 16px;
  line-height: 1.7;
}

.primary-action {
  position: relative;
  overflow: hidden;
  padding: 36px;
  background: var(--ink);
  color: #fff;
  border-radius: 16px;
}

.primary-action .eyebrow {
  color: #70dc99;
}

.primary-action .body-copy {
  color: #cfcfcf;
}

.action-number {
  position: absolute;
  top: 18px;
  right: 24px;
  color: rgba(255, 255, 255, 0.13);
  font-size: 42px;
  font-weight: 750;
}

.action-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 40px;
}

.action-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.action-detail > div {
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9px;
}

.action-detail span,
.action-detail strong {
  display: block;
}

.action-detail span {
  margin-bottom: 6px;
  color: #a8a8a8;
  font-size: 11px;
}

.action-detail strong {
  font-size: 13px;
  font-weight: 550;
  line-height: 1.6;
}

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

.challenge-phase {
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.challenge-days {
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 700;
}

.challenge-phase h3 {
  margin: 8px 0 0;
  font-size: 16px;
}

.checkin-card {
  margin-top: 12px;
  padding: 16px 20px;
  background: var(--green-soft);
  border-radius: 10px;
  color: var(--green-dark);
}

.checkin-card span {
  margin-left: 5px;
}

.checkin-card p {
  margin: 7px 0 0;
  color: #63806e;
  font-size: 12px;
}

.closing-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--green-soft);
  border-color: #cdeed9;
}

.closing-message {
  margin: 10px 0 0;
  color: var(--green-dark);
  font-size: 22px;
  font-weight: 650;
  line-height: 1.6;
}

.state-page {
  min-height: calc(100vh - 64px);
  padding: 60px 20px;
}

.state-card {
  width: min(620px, 100%);
  margin: 7vh auto 0;
  padding: 46px;
  background: #fff;
  border-radius: 16px;
  text-align: center;
}

.state-card h1 {
  margin: 20px 0 10px;
  font-size: 28px;
}

.state-card > p {
  color: var(--muted);
  line-height: 1.7;
}

.progress-track {
  position: relative;
  height: 10px;
  margin-top: 28px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef1f0;
}

.progress-fill {
  position: relative;
  height: 100%;
  width: 4%;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(90deg, #059b4c, #07c160 60%, #3dcc7a);
  transition: width 0.18s linear;
}

.progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.38), transparent);
  animation: progressShine 1.4s ease-in-out infinite;
}

@keyframes progressShine {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(120%);
  }
}

.progress-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 560;
  text-align: left;
}

#progressHint {
  min-width: 0;
  line-height: 1.5;
}

#progressPercent {
  flex: none;
  color: var(--green-dark);
  font-variant-numeric: tabular-nums;
}

.progress-eta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  text-align: left;
}

.authority-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.authority-strip.start {
  justify-content: flex-start;
  margin-top: 14px;
}

.authority-chip {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7f8f8;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
}

.authority-chip.ai {
  border-color: #cdeed9;
  background: var(--green-soft);
  color: var(--green-dark);
}

.loading-card {
  margin-top: 3vh;
  padding: 32px 36px 36px;
}

.loading-card .progress-track {
  margin-top: 20px;
}

.loading-card .progress-steps {
  margin-top: 20px;
}

.authority-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.authority-band {
  margin: 28px 0 0;
  padding: 22px 24px;
  background: var(--paper);
  border-radius: 14px;
}

.authority-band h2 {
  margin: 6px 0 10px;
  font-size: 28px;
  line-height: 1.35;
}

.authority-band-lead {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.source-group-title {
  margin: 18px 0 8px;
  font-size: 13px;
  color: var(--muted);
}

.progress-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 30px;
}

.progress-step {
  color: #aaa;
  font-size: 12px;
}

.progress-step span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: #eee;
}

.progress-step.active {
  color: var(--green-dark);
}

.progress-step.active span {
  background: var(--green);
  color: #fff;
}

.error-mark {
  background: #fa5151;
}

.button-primary {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.auth-card {
  text-align: left;
}

.auth-card .brand-mark {
  margin: 0 auto;
}

.auth-card h1,
.auth-card > p {
  text-align: center;
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.auth-form label {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.auth-form input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.auth-code-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}

.auth-code-row input {
  margin-top: 0;
  flex: 1;
  min-width: 0;
}

.auth-send-code {
  flex-shrink: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(7, 193, 96, 0.35);
  background: #fff;
  color: #059a4c;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.auth-send-code:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.auth-verify-msg {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.auth-verify-msg.is-error {
  color: #c62828;
}

.auth-verify-msg.is-success {
  color: #059a4c;
}

.auth-verify-countdown {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.auth-form .button-primary {
  width: 100%;
  height: 44px;
}

.auth-switch {
  margin: 0;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.auth-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--green);
  font: inherit;
  font-weight: 560;
  cursor: pointer;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-error {
  margin: 0;
  color: #fa5151;
  font-size: 13px;
}

@media (max-width: 920px) {
  .stat-grid,
  .impact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-card,
  .portrait-layout,
  .action-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero-meta,
  .section-heading {
    align-items: flex-start;
  }

  .period-pill {
    flex: none;
  }

  .stat-grid,
  .chart-grid,
  .impact-grid,
  .challenge-grid,
  .action-detail,
  .survey-row,
  .choice-list,
  .score-grid {
    grid-template-columns: 1fr;
  }

  .portrait-card,
  .primary-action,
  .content-card {
    padding: 24px 20px;
  }

  .human-finding {
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 20px 16px;
  }

  .action-number {
    display: none;
  }

  .state-card {
    padding: 34px 22px;
  }

  .progress-steps {
    grid-template-columns: 1fr;
  }

  .progress-step {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
  }

  .progress-step span {
    flex: none;
    margin: 0;
  }
}

@media print {
  .chart-card,
  .life-impact,
  .human-finding,
  .challenge-phase,
  .primary-action,
  .survey-form {
    break-inside: avoid;
  }

  #surveyState {
    display: none !important;
  }
}

#surveyState.page {
  width: min(720px, calc(100% - 40px));
}

#surveyState .hero {
  padding: 28px 28px 24px;
}

.survey-form {
  display: grid;
  gap: 14px;
  margin: 18px 0 48px;
}

.survey-block {
  margin: 0;
  padding: 18px 20px 20px;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--line);
  min-width: 0;
}

.survey-block h2 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
}

.legend-hint {
  margin-left: 6px;
  font-weight: 500;
  color: var(--muted);
}

.survey-error {
  margin: 8px 0 0;
  color: #c2410c;
  font-size: 13px;
}

.followup-group + .followup-group {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.followup-title {
  margin: 0 0 10px;
  font-weight: 600;
}

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

.survey-form label,
.survey-form select,
.choice-list label {
  display: block;
  width: 100%;
}

.survey-form select {
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  width: 100%;
}

.followup-inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.followup-inline select,
.followup-group > select {
  width: auto;
  min-width: 140px;
  margin-top: 0;
}

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

.choice-list label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.choice-list label:has(input:checked) {
  border-color: var(--green);
  background: var(--green-soft);
}

.survey-submit {
  justify-self: start;
  padding: 12px 18px;
}

.hero-findings h1 {
  font-size: clamp(26px, 3.2vw, 34px);
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin-bottom: 0;
}

.lead-finding,
.support-finding,
.relief-finding,
.feeling-band,
.primary-change,
.experiment-card,
.burst-card,
.consumption-pattern {
  margin-top: 16px;
  border-radius: 16px;
}

.lead-finding {
  padding: 32px 36px 28px;
  background: var(--paper);
  border-top: 6px solid var(--green);
}

.burst-card {
  padding: 28px 32px 24px;
  background: var(--paper);
  border-top: 6px solid var(--green);
}

.burst-card.worth-watching {
  border-top-color: var(--warning);
}

.burst-card .kicker {
  margin: 0 0 8px;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.burst-card.worth-watching .kicker {
  color: #b36b00;
}

.burst-card h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1.35;
}

.burst-card .burst-research {
  margin: 10px 0 0;
  color: #555;
  font-size: 14px;
  line-height: 1.7;
}

.consumption-pattern {
  padding: 28px 32px 24px;
  background: var(--paper);
  border-top: 6px solid var(--warning);
}

.consumption-pattern .kicker {
  margin: 0 0 8px;
  color: #b36b00;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.consumption-pattern h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.35;
}

.consumption-synthesis {
  margin: 12px 0 0;
  font-size: 16px;
  line-height: 1.7;
}

.alert-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.alert-card {
  padding: 16px 18px;
  border-radius: 12px;
  background: #f7f7f7;
}

.alert-card.green {
  background: var(--green-soft);
}

.duration-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.legend-chip {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f3f4f5;
  color: #555;
  font-size: 12px;
}

.legend-chip.green {
  background: var(--green-soft);
  color: var(--green-dark);
}

.legend-chip.yellow {
  background: var(--warning-soft);
  color: #b36b00;
}

.legend-chip.orange {
  background: #fff1e4;
  color: #c45c12;
}

.legend-chip.red {
  background: #fdeeee;
  color: #b42318;
}

.legend-basis {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.alert-card.orange {
  background: #fff1e4;
}

.alert-card.red {
  background: #fdeeee;
}

.alert-title {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.alert-card strong {
  display: block;
  margin: 6px 0 4px;
  font-size: 28px;
  line-height: 1.1;
}

.alert-caption,
.alert-detail {
  display: block;
  color: #666;
  font-size: 13px;
  line-height: 1.5;
}

.alert-detail {
  margin: 8px 0 0;
}

.consumption-research {
  margin-top: 16px;
}

.consumption-research summary {
  cursor: pointer;
  font-weight: 650;
}

.research-note {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.research-note p {
  margin: 0;
  line-height: 1.7;
  font-size: 14px;
}

.research-cite {
  display: inline-block;
  margin-top: 6px;
  color: var(--blue);
  font-size: 13px;
}

.lead-finding .kicker,
.support-finding .kicker,
.relief-finding .kicker,
.primary-change .kicker,
.experiment-card .kicker {
  margin: 0;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.lead-finding h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1.3;
}

.lead-stat {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 20px 0 16px;
}

.lead-stat strong {
  font-size: 52px;
  line-height: 1;
  color: var(--green-dark);
  font-weight: 750;
}

.lead-stat span,
.support-finding .data-example,
.experiment-card .data-example {
  color: var(--muted);
  font-size: 14px;
}

.lead-finding p,
.support-finding p,
.relief-finding p {
  margin: 8px 0 0;
  line-height: 1.7;
}

.cannot-conclude {
  color: var(--muted);
  font-size: 13px;
}

.support-finding {
  padding: 24px 28px;
  background: var(--paper);
}

.experiment-match {
  margin-top: 20px;
  padding: 18px 18px 16px;
  border-radius: 14px;
  background: var(--warning-soft);
  border-left: 5px solid var(--warning);
}

.experiment-kicker {
  margin: 0 0 6px;
  color: #b36b00;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.experiment-match h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.4;
  color: var(--ink);
}

.experiment-block {
  margin-top: 12px;
}

.experiment-block .advice-label {
  display: block;
  margin-bottom: 6px;
}

.experiment-facts,
.experiment-steps {
  margin: 0;
  padding-left: 1.2em;
  line-height: 1.7;
  font-size: 14px;
}

.experiment-steps {
  list-style: none;
  padding-left: 0;
}

.experiment-steps li {
  position: relative;
  padding: 0 0 12px 18px;
}

.experiment-steps li:last-child {
  padding-bottom: 0;
}

.experiment-steps li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warning);
}

.experiment-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 16px;
  bottom: 0;
  width: 1px;
  background: #f0d7a8;
}

.experiment-result {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
  color: #8a5a00;
  font-weight: 650;
  line-height: 1.65;
}

.experiment-source {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.support-finding h2,
.relief-finding h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.35;
}

.relief-finding {
  padding: 22px 28px;
  background: #f4f4f4;
}

.relief-finding .kicker {
  color: #666;
}

.feeling-band {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 28px;
  background: var(--paper);
}

.feeling-compare {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1.4fr);
  grid-template-rows: auto auto;
  column-gap: 16px;
  row-gap: 8px;
  align-items: start;
}

.feeling-compare > .feeling-label:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
}

.feeling-compare > .feeling-label:nth-child(2) {
  grid-column: 3;
  grid-row: 1;
}

.feeling-compare > .feeling-value:nth-of-type(1) {
  grid-column: 1;
  grid-row: 2;
}

.feeling-compare > .feeling-value:nth-of-type(2) {
  grid-column: 3;
  grid-row: 2;
}

.feeling-label {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.feeling-value {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  font-weight: 700;
}

.feeling-divider {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.feeling-verdict {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-weight: 700;
  line-height: 1.65;
}

.advice-section {
  margin-top: 28px;
  padding: 28px 28px 24px;
  background: var(--green-soft);
  border-radius: 20px;
}

.advice-section .section-heading {
  margin-bottom: 16px;
}

.advice-section .section-heading h2 {
  font-size: 34px;
}

.advice-section .section-heading > p {
  color: #3d6b4f;
}

.action-band {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 0;
}

.primary-change,
.experiment-card {
  margin-top: 0;
  padding: 28px 26px 24px;
  background: var(--paper);
  border-radius: 16px;
  border-top: 6px solid var(--green);
}

.primary-change {
  box-shadow: none;
}

.primary-change h2,
.experiment-card h2 {
  margin: 10px 0 16px;
  font-size: 30px;
  line-height: 1.35;
}

.advice-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.advice-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  font-size: 14px;
  font-weight: 750;
}

.advice-mark .sec-icon {
  width: 40px;
  height: 40px;
}

.advice-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.advice-block.action {
  padding: 12px 14px 14px;
  border: 0;
  border-radius: 12px;
  background: var(--green-soft);
}

.advice-label {
  display: block;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.advice-block p,
.advice-success {
  margin: 4px 0 0;
  font-size: 16px;
  line-height: 1.65;
}

.advice-success {
  margin-top: 14px;
  font-weight: 650;
}

.evidence-table {
  background: var(--paper);
  border-radius: 14px;
  padding: 8px 22px;
}

.evidence-row {
  display: grid;
  grid-template-columns: 140px 110px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

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

.evidence-row p {
  margin: 0;
  color: #555;
  font-size: 13px;
  line-height: 1.6;
}

.status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f0f0f0;
  color: #555;
  font-size: 12px;
  font-weight: 700;
}

.status-pill.very_clear,
.status-pill.clear {
  background: var(--green-soft);
  color: var(--green-dark);
}

.status-pill.worth_watching {
  background: var(--warning-soft);
  color: var(--warning);
}

.compact-portrait {
  padding: 22px 28px;
}

.research-fold {
  margin-top: 28px;
  padding: 18px 22px;
  background: var(--paper);
  border-radius: 14px;
}

.research-fold summary {
  cursor: pointer;
  font-weight: 700;
}

.fold-note {
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.research-tag {
  margin-top: 12px;
  font-size: 13px;
}

.research-tag summary {
  color: var(--blue);
  cursor: pointer;
}

.tag-source {
  margin: 8px 0 0;
  color: #555;
  font-size: 12px;
}

@media (max-width: 640px) {
  .feeling-compare {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .feeling-vs-slot,
  .feeling-divider {
    display: none;
  }

  .feeling-compare > .feeling-label:nth-child(1),
  .feeling-compare > .feeling-label:nth-child(2),
  .feeling-compare > .feeling-value:nth-of-type(1),
  .feeling-compare > .feeling-value:nth-of-type(2) {
    grid-column: 1;
    grid-row: auto;
  }

  .action-band,
  .evidence-row {
    grid-template-columns: 1fr;
  }

  .advice-section {
    padding: 20px 16px 16px;
  }

  .advice-section .section-heading h2,
  .primary-change h2,
  .experiment-card h2 {
    font-size: 22px;
  }

  .lead-stat strong {
    font-size: 40px;
  }

  .burst-card h2 {
    font-size: 22px;
  }

  .alert-grid {
    grid-template-columns: 1fr;
  }
}

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

.score-card {
  padding: 18px 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.score-card strong {
  display: block;
  margin: 4px 0 8px;
  font-size: 32px;
}

.score-card p {
  margin: 0;
  color: #555;
  font-size: 13px;
  line-height: 1.6;
}

.score-card .score-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.impact-stack {
  display: grid;
  gap: 12px;
}

.life-impact.compact {
  display: grid;
  grid-template-columns: minmax(120px, 0.4fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.life-impact.expanded {
  padding: 24px;
}

.notice-list,
.research-q,
.advice-grid {
  display: grid;
  gap: 10px;
}

.notice-list div,
.research-q article,
.advice-grid article {
  padding: 16px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.notice-list.calm div {
  background: #f7f7f7;
}

.appendix-title {
  margin: 28px 0 12px;
  font-size: 16px;
}

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

.advice-grid h3 {
  margin: 0 0 8px;
}

@media (max-width: 920px) {
  .survey-row,
  .score-grid,
  .advice-grid {
    grid-template-columns: 1fr;
  }

  .life-impact.compact {
    grid-template-columns: 1fr;
  }
}

.feedback-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 0;
  padding: 22px 24px;
  background: var(--paper);
  border-radius: 16px;
}

.feedback-cta h2 {
  margin: 0;
  font-size: 26px;
}

.feedback-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(24, 24, 24, 0.35);
}

.feedback-overlay[hidden] {
  display: none !important;
}

.feedback-card {
  width: min(480px, 100%);
  padding: 24px;
  background: #fff;
  border-radius: 16px;
  display: grid;
  gap: 12px;
}

.feedback-card h2 {
  margin: 0;
  font-size: 20px;
}

.feedback-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.feedback-card label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.feedback-card select,
.feedback-card textarea,
#inviteCode {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

#inviteCode {
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 18px;
}

.feedback-success-toast {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(24, 24, 24, 0.28);
  animation: feedback-toast-in 0.22s ease-out;
}

.feedback-success-toast[hidden] {
  display: none !important;
}

.feedback-success-card {
  width: min(320px, 100%);
  padding: 28px 24px 24px;
  background: #fff;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.feedback-success-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 24px;
  line-height: 48px;
  font-weight: 700;
}

.feedback-success-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
  color: #181818;
}

.feedback-success-card p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

@keyframes feedback-toast-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* —— 报告分区图标与标题强化 —— */
.section-title-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title-block > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.section-title-block .eyebrow {
  margin: 0;
  line-height: 1.2;
}

.section-title-block h2 {
  margin: 0;
  line-height: 1.3;
}

.section-title-block .sec-icon {
  align-self: center;
}

.kicker-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  min-height: 36px;
}

.kicker-row .sec-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background-size: 18px 18px;
}

.kicker-row .kicker {
  margin: 0 !important;
  line-height: 1.2;
  display: flex;
  align-items: center;
}

.chart-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  min-height: 34px;
}

.chart-card-head h3 {
  margin: 0;
  line-height: 1.3;
}

.chart-card-head .sec-icon {
  flex: 0 0 auto;
}

.advice-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.advice-head .kicker {
  margin: 0;
  line-height: 1.2;
}

.sec-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background-color: var(--green-soft);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px 20px;
}

.sec-icon--sm {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background-size: 18px 18px;
}

.sec-icon--spotlight {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23059b4c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4'/%3E%3C/svg%3E");
}

.sec-icon--spark {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23059b4c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l1.8 5.2L19 10l-5.2 1.8L12 17l-1.8-5.2L5 10l5.2-1.8L12 3z'/%3E%3Cpath d='M18 15l.8 2.2L21 18l-2.2.8L18 21l-.8-2.2L15 18l2.2-.8L18 15z'/%3E%3C/svg%3E");
}

.sec-icon--bulb {
  background-color: #eef3ff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23576b95' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 21h4'/%3E%3Cpath d='M12 3a6 6 0 0 0-3.5 10.8c.6.5 1 1.2 1.1 2h4.8c.1-.8.5-1.5 1.1-2A6 6 0 0 0 12 3z'/%3E%3C/svg%3E");
}

.sec-icon--shield {
  background-color: var(--green-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23059b4c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 3v6c0 5-3.5 8.5-8 9-4.5-.5-8-4-8-9V6l8-3z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E");
}

.sec-icon--clock,
.sec-icon--timer {
  background-color: var(--warning-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d48a16' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='13' r='8'/%3E%3Cpath d='M12 9v4l2.5 1.5M9 2h6'/%3E%3C/svg%3E");
}

.sec-icon--balance {
  background-color: #f3eef8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a5ea8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v18M5 7h14'/%3E%3Cpath d='M7 7l-3 7h6L7 7zM17 7l-3 7h6l-3-7z'/%3E%3C/svg%3E");
}

.sec-icon--foot,
.sec-icon--rocket {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23059b4c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 19c4-1 7-4 9-9 1-2 2-5 2-7-2 0-5 1-7 2-5 2-8 5-9 9 2 1 4 3 5 5z'/%3E%3Cpath d='M9 15l-4 4'/%3E%3C/svg%3E");
}

.sec-icon--calendar {
  background-color: #eef8f2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23059b4c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M8 3v4M16 3v4M3 10h18'/%3E%3C/svg%3E");
}

.sec-icon--grid {
  background-color: #eef3ff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23576b95' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E");
}

.sec-icon--chart,
.sec-icon--day {
  background-color: #e8f6ff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233d7ea6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19V5M4 19h16'/%3E%3Cpath d='M8 16v-5M12 16V8M16 16v-8'/%3E%3C/svg%3E");
}

.sec-icon--hour {
  background-color: var(--warning-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d48a16' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
}

.sec-icon--streak {
  background-color: #fff0eb;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c45c3e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3c2 4 6 5 6 10a6 6 0 1 1-12 0c0-3 2-5 4-7 0 3 1 4 2 5z'/%3E%3C/svg%3E");
}

.sec-icon--tag {
  background-color: #f3eef8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a5ea8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12l-8 8-9-9V4h7l10 8z'/%3E%3Ccircle cx='7.5' cy='7.5' r='1.2' fill='%237a5ea8' stroke='none'/%3E%3C/svg%3E");
}

.sec-icon--user {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23059b4c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='3.5'/%3E%3Cpath d='M5 20c1.5-3.5 4-5 7-5s5.5 1.5 7 5'/%3E%3C/svg%3E");
}

.sec-icon--book {
  background-color: #eef3ff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23576b95' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5a2 2 0 0 1 2-2h12v16H6a2 2 0 0 0-2 2V5z'/%3E%3Cpath d='M8 7h6M8 11h8'/%3E%3C/svg%3E");
}

.sec-icon--note {
  background-color: var(--green-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23059b4c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3h8l4 4v14H7V3z'/%3E%3Cpath d='M15 3v4h4M9 12h6M9 16h6'/%3E%3C/svg%3E");
}

.sec-icon--chat {
  background-color: #e8f6ff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233d7ea6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-8 8H7l-4 3V12a8 8 0 1 1 18 0z'/%3E%3Cpath d='M8 12h.01M12 12h.01M16 12h.01'/%3E%3C/svg%3E");
}

.sec-icon--target {
  background-color: #fff0eb;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c45c3e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Ccircle cx='12' cy='12' r='1.2' fill='%23c45c3e' stroke='none'/%3E%3C/svg%3E");
}

.sec-icon--moon {
  background-color: #eef3ff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23576b95' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 14.3A8.5 8.5 0 1 1 9.7 3 7 7 0 0 0 21 14.3z'/%3E%3C/svg%3E");
}

.sec-icon--sparkle {
  background-color: #f3eef8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a5ea8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l1.4 4.2L18 8.6l-4.6 1.4L12 14.2 10.6 10 6 8.6l4.6-1.4L12 3z'/%3E%3Cpath d='M18.5 14l.7 2.1 2.1.7-2.1.7-.7 2.1-.7-2.1-2.1-.7 2.1-.7.7-2.1z'/%3E%3C/svg%3E");
}

@media print {
  .feedback-cta,
  .feedback-overlay,
  .feedback-success-toast,
  #downloadHistoryBtn,
  #feedbackBtn {
    display: none !important;
  }
}

body:not(.habit-mode) #habitSurveyState,
body:not(.habit-mode) .habit-only {
  display: none !important;
}

body.habit-mode .history-only,
body.habit-mode .compact-portrait,
body.habit-mode #printBtn,
body.habit-mode #downloadHistoryBtn,
body.habit-mode #reportRoot {
  display: none !important;
}

body.habit-mode {
  -webkit-text-size-adjust: 100%;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  overflow-x: hidden;
}

body.habit-mode .topbar {
  padding-top: calc(10px + env(safe-area-inset-top));
  background: #fff;
}

body.habit-mode .button,
body.habit-mode .auth-link,
body.habit-mode .habit-choices label {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(7, 193, 96, 0.18);
}

body.habit-mode .state-page {
  width: min(100% - 24px, 520px);
  min-height: calc(100dvh - 72px);
  padding: 12px 0 calc(24px + env(safe-area-inset-bottom));
}

body.habit-mode .state-card,
body.habit-mode .auth-card {
  width: 100%;
  padding: 28px 20px 24px;
}

body.habit-mode .auth-card > .brand-mark,
body.habit-mode .loading-card > .brand-mark,
body.habit-mode .state-card > .brand-mark {
  display: none;
}

body.habit-mode .auth-card h1 {
  margin-top: 0;
}

body.habit-mode .auth-form input,
body.habit-mode .habit-form select {
  font-size: 16px;
  min-height: 48px;
  border-radius: 12px;
}

body.habit-mode .auth-code-row {
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  body.habit-mode .auth-code-row {
    flex-direction: column;
    align-items: stretch;
  }

  body.habit-mode .auth-send-code {
    width: 100%;
  }
}

body.habit-mode .auth-send-code {
  min-height: 48px;
}

body.habit-mode .button-primary,
body.habit-mode .habit-nav .button {
  min-height: 48px;
  font-size: 16px;
}

#habitSurveyState.page {
  width: min(720px, calc(100% - 24px));
  margin-bottom: 24px;
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}

body.habit-mode #habitSurveyState .habit-hero {
  padding: 20px 18px 16px;
}

.habit-hero-title {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.habit-hero-title .sec-icon {
  margin-top: 6px;
}

body.habit-mode #habitSurveyState .habit-hero h1 {
  font-size: 26px;
  line-height: 1.25;
  margin: 0;
}

body.habit-mode .habit-q-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 20px;
  line-height: 1.4;
}

body.habit-mode .habit-q-title .sec-icon {
  margin-top: 1px;
}

.habit-q-text {
  flex: 1;
  min-width: 0;
}

.habit-required {
  flex: none;
  display: inline-block;
  margin: 2px 0 0;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: #059b4c;
  background: var(--green-soft);
}

body.habit-mode #habitSurveyState .hero-opening {
  font-size: 15px;
  margin: 8px 0 0;
}

.habit-step-meta {
  margin: 14px 0 8px;
  font-size: 13px;
  color: var(--muted);
}

.habit-dots {
  display: flex;
  gap: 6px;
}

.habit-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
}

.habit-dot.is-done {
  background: rgba(7, 193, 96, 0.45);
}

.habit-dot.is-current {
  width: 18px;
  border-radius: 8px;
  background: var(--green);
}

body.habit-mode .habit-form select:invalid {
  color: var(--muted);
}

body.habit-mode .habit-step h2 {
  font-size: 20px;
  line-height: 1.4;
}

.habit-hint {
  display: block;
  margin: -4px 0 12px;
}

body.habit-mode .survey-row-two {
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 640px) {
  body.habit-mode .survey-row-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body.habit-mode .habit-choices {
  grid-template-columns: 1fr;
  gap: 10px;
}

body.habit-mode .habit-choices label {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 14px 16px;
  font-size: 16px;
  line-height: 1.4;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

body.habit-mode .habit-choices label:has(input:checked) {
  border-color: var(--green);
  background: rgba(7, 193, 96, 0.08);
  box-shadow: 0 0 0 1px var(--green);
}

body.habit-mode .habit-choices input {
  width: 20px;
  height: 20px;
  margin: 0 10px 0 0;
  flex: none;
}

.habit-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  gap: 10px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -1px 0 var(--line);
}

#habitSurveyState[hidden] .habit-nav {
  display: none !important;
}

.habit-nav .button {
  flex: 1;
}

body.habit-mode .plugin-nudge {
  margin: 8px 0 28px;
  padding: 22px 20px;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--line);
}

body.habit-mode .plugin-nudge .button {
  display: inline-flex;
  margin-top: 8px;
  text-decoration: none;
}

body.habit-mode .action-band {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.habit-once-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

body.habit-mode #reportRoot {
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
}

body.habit-mode #reportRoot .lead-finding,
body.habit-mode #reportRoot .support-finding,
body.habit-mode #reportRoot .relief-finding,
body.habit-mode #reportRoot .primary-change,
body.habit-mode #reportRoot .experiment-card {
  padding: 16px 14px 14px;
  margin-top: 12px;
}

body.habit-mode #reportRoot .lead-finding h2,
body.habit-mode #reportRoot .support-finding h2,
body.habit-mode #reportRoot .relief-finding h2,
body.habit-mode #reportRoot .primary-change h2,
body.habit-mode #reportRoot .experiment-card h2,
body.habit-mode #reportRoot .advice-section .section-heading h2 {
  font-size: 18px;
  line-height: 1.4;
}

body.habit-mode #reportRoot .advice-section {
  margin-top: 12px;
  padding: 14px 10px 12px;
}

body.habit-mode #reportRoot .content-grid {
  grid-template-columns: 1fr;
}

body.habit-mode #reportRoot .feedback-cta .button,
body.habit-mode #reportRoot .plugin-nudge .button {
  width: 100%;
  justify-content: center;
  min-height: 48px;
  box-sizing: border-box;
}

body.habit-mode .loading-card h1 {
  margin-top: 0;
}

body.habit-mode .loading-card .authority-strip {
  display: none;
}

body.habit-mode .loading-card .progress-steps {
  margin-top: 16px;
}

body.habit-mode #reportRoot .lead-stat-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin: 10px 0 12px;
}

body.habit-mode #reportRoot .lead-stat-text strong {
  font-size: 15px;
  line-height: 1.45;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green-dark);
}

body.habit-mode #reportRoot .lead-stat-text span {
  font-size: 13px;
}

body.habit-mode #reportRoot .research-fold summary {
  min-height: 44px;
  display: flex;
  align-items: center;
}

body.habit-mode .habit-hero.is-compact .habit-hero-title .sec-icon,
body.habit-mode .habit-hero.is-compact h1 {
  display: none;
}

body.habit-mode .habit-hero.is-compact {
  padding: 12px 16px 10px;
}

body.habit-mode .habit-hero.is-compact .eyebrow {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  body.habit-mode .page {
    width: calc(100% - 16px);
    margin-top: 8px;
  }

  body.habit-mode .hero-findings {
    padding: 16px 14px 12px;
  }

  body.habit-mode .hero-findings h1,
  body.habit-mode #reportTitle {
    font-size: 20px;
    line-height: 1.4;
  }

  body.habit-mode .topbar {
    align-items: center;
    min-height: 56px;
    padding-left: 12px;
    padding-right: 12px;
  }

  body.habit-mode .top-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
  }

  body.habit-mode .top-actions .button-plain {
    min-height: 40px;
    font-size: 13px;
    padding: 8px 10px;
  }

  body.habit-mode #habitSurveyState .habit-hero:not(.is-compact) {
    padding: 14px 14px 12px;
  }

  body.habit-mode #habitSurveyState .habit-hero:not(.is-compact) h1 {
    font-size: 22px;
  }

  body.habit-mode #reportRoot .section-title-block {
    align-items: flex-start;
  }

  body.habit-mode #reportRoot .authority-band,
  body.habit-mode #reportRoot .research-fold,
  body.habit-mode #reportRoot .feedback-cta,
  body.habit-mode #reportRoot .closing-card,
  body.habit-mode #reportRoot .disclaimer {
    padding-left: 14px;
    padding-right: 14px;
  }

  body.habit-mode #reportRoot .kicker-row {
    flex-wrap: wrap;
  }

  body.habit-mode #reportRoot p {
    font-size: 15px;
    line-height: 1.65;
  }

  body.habit-mode #reportRoot .authority-strip {
    flex-wrap: wrap;
  }

  body.habit-mode .loading-card {
    padding: 22px 16px 18px;
  }

  body.habit-mode .loading-card h1 {
    font-size: 22px;
  }

  body.habit-mode .feedback-overlay .state-card {
    width: calc(100% - 24px);
    max-height: calc(100dvh - 24px);
    overflow: auto;
  }
}

.habit-once-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

body.habit-mode #reportRoot {
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
}

body.habit-mode #reportRoot .lead-finding,
body.habit-mode #reportRoot .support-finding,
body.habit-mode #reportRoot .relief-finding,
body.habit-mode #reportRoot .primary-change,
body.habit-mode #reportRoot .experiment-card {
  padding: 18px 16px 16px;
}

body.habit-mode #reportRoot .lead-finding h2,
body.habit-mode #reportRoot .support-finding h2,
body.habit-mode #reportRoot .relief-finding h2,
body.habit-mode #reportRoot .primary-change h2,
body.habit-mode #reportRoot .experiment-card h2,
body.habit-mode #reportRoot .advice-section .section-heading h2 {
  font-size: 20px;
  line-height: 1.4;
}

body.habit-mode #reportRoot .advice-section {
  margin-top: 16px;
  padding: 16px 12px 14px;
}

body.habit-mode #reportRoot .content-grid {
  grid-template-columns: 1fr;
}

body.habit-mode #reportRoot .feedback-cta .button,
body.habit-mode #reportRoot .plugin-nudge .button {
  width: 100%;
  justify-content: center;
  min-height: 48px;
  box-sizing: border-box;
}

body.habit-mode .loading-card h1 {
  margin-top: 0;
}

@media (max-width: 640px) {
  body.habit-mode .page {
    width: calc(100% - 16px);
    margin-top: 8px;
  }

  body.habit-mode .hero-findings {
    padding: 18px 16px 14px;
  }

  body.habit-mode .hero-findings h1,
  body.habit-mode #reportTitle {
    font-size: 22px;
    line-height: 1.35;
  }

  body.habit-mode .topbar {
    align-items: flex-start;
  }

  body.habit-mode .top-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
  }

  body.habit-mode .top-actions .button-plain {
    min-height: 40px;
    font-size: 13px;
  }

  body.habit-mode #reportRoot .section-title-block {
    align-items: flex-start;
  }

  body.habit-mode #reportRoot .authority-band,
  body.habit-mode #reportRoot .research-fold,
  body.habit-mode #reportRoot .feedback-cta,
  body.habit-mode #reportRoot .closing-card,
  body.habit-mode #reportRoot .disclaimer {
    padding-left: 16px;
    padding-right: 16px;
  }

  body.habit-mode #reportRoot .kicker-row {
    flex-wrap: wrap;
  }

  body.habit-mode #reportRoot .lead-stat {
    display: grid;
    gap: 4px;
  }

  body.habit-mode #reportRoot .lead-stat strong,
  body.habit-mode #reportRoot .lead-stat span {
    font-size: 14px;
  }

  body.habit-mode #reportRoot p {
    font-size: 15px;
    line-height: 1.65;
  }

  body.habit-mode #reportRoot .authority-strip {
    flex-wrap: wrap;
  }
}

.habit-type-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 12px 0 8px;
}

.habit-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.habit-type--red { background: rgba(220, 38, 38, 0.12); color: #b91c1c; }
.habit-type--orange { background: rgba(234, 88, 12, 0.12); color: #c2410c; }
.habit-type--yellow { background: rgba(202, 138, 4, 0.16); color: #a16207; }
.habit-type--blue { background: rgba(37, 99, 235, 0.12); color: #1d4ed8; }
.habit-type--purple { background: rgba(147, 51, 234, 0.12); color: #7e22ce; }

.habit-type-secondary {
  font-size: 13px;
  color: var(--muted);
}

.habit-as-reference {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
}

.habit-chain {
  margin: 12px 0 0;
  padding-left: 1.2em;
}

.habit-chain li {
  margin: 0 0 14px;
}

.habit-extra-papers {
  margin-top: 12px;
}

body.habit-mode #habitReportRoot {
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
}

body.habit-mode #habitReportRoot .habit-card,
body.habit-mode #habitReportRoot .plugin-nudge,
body.habit-mode #habitReportRoot .authority-band,
body.habit-mode #habitReportRoot .research-fold,
body.habit-mode #habitReportRoot .closing-card,
body.habit-mode #habitReportRoot .feedback-cta,
body.habit-mode #habitReportRoot .disclaimer {
  margin-top: 12px;
  padding: 16px 14px 14px;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--line);
}

body.habit-mode #habitReportRoot .habit-card h2,
body.habit-mode #habitReportRoot .plugin-nudge h2,
body.habit-mode #habitReportRoot .authority-band h2,
body.habit-mode #habitReportRoot .feedback-cta h2 {
  font-size: 18px;
  line-height: 1.4;
}

body.habit-mode #habitReportRoot .habit-card h3 {
  font-size: 16px;
  line-height: 1.4;
  margin: 0 0 6px;
}

.habit-answer-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.habit-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(7, 193, 96, 0.08);
  font-size: 14px;
  line-height: 1.4;
}

.habit-chip em {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
}

.habit-main-action {
  font-size: 16px;
  line-height: 1.55;
}

.habit-why-this {
  color: var(--muted);
}

.habit-practice {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.habit-practice-index,
.habit-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.habit-cite {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(7, 193, 96, 0.06);
}

.habit-cite-org {
  font-weight: 600;
  font-size: 13px;
  margin: 0 0 4px;
}

.habit-cite-quote {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}

.habit-cite-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 13px;
}

.habit-experiment,
.habit-paper {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.habit-paper-title {
  font-weight: 600;
  margin: 0 0 4px;
}

.habit-exp-list,
.habit-skip-list,
.habit-check-list {
  margin: 8px 0 0;
  padding-left: 1.2em;
}

.habit-exp-list li,
.habit-skip-list li,
.habit-check-list li {
  margin: 0 0 6px;
}

@media (max-width: 720px) {
  body.habit-mode #habitReportRoot .habit-card,
  body.habit-mode #habitReportRoot .plugin-nudge,
  body.habit-mode #habitReportRoot .authority-band,
  body.habit-mode #habitReportRoot .research-fold,
  body.habit-mode #habitReportRoot .closing-card,
  body.habit-mode #habitReportRoot .feedback-cta,
  body.habit-mode #habitReportRoot .disclaimer {
    padding-left: 16px;
    padding-right: 16px;
  }

  body.habit-mode #habitReportRoot h1,
  body.habit-mode #habitReportTitle {
    font-size: 22px;
    line-height: 1.35;
  }

  body.habit-mode #habitReportRoot p {
    font-size: 15px;
    line-height: 1.65;
  }
}
