:root {
  --ink: #173b3a;
  --muted: #647b79;
  --teal: #2d7f78;
  --teal-dark: #1f6862;
  --blue: #6f93a7;
  --blue-soft: #dce8ee;
  --mint: #dff3ef;
  --mint-light: #f2fbf8;
  --sky: #e6f4fa;
  --line: #cfe3df;
  --paper: #fbfdfc;
  --white: #fff;
  --danger: #a74444;
  --shadow: 0 24px 60px rgba(27, 82, 77, .10);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--teal-dark); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 99; background: var(--ink); color: white; padding: 8px 14px; }
.skip-link:focus { top: 12px; }
.site-header {
  width: min(1180px, calc(100% - 40px));
  min-height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 50% 46% 48% 42%;
  display: grid; place-items: center; color: white; background: var(--teal);
  transform: rotate(-5deg); font-weight: 700;
}
.brand span:last-child { display: grid; line-height: 1.25; }
.brand strong { font-size: 18px; letter-spacing: .04em; }
.brand small { color: var(--muted); font-size: 11px; margin-top: 3px; }
.text-link { text-decoration: none; font-size: 14px; font-weight: 650; border-bottom: 1px solid var(--line); }
.header-note, .header-actions { color: var(--muted); font-size: 13px; }
.header-actions { display: flex; gap: 18px; align-items: center; }
.shell { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.eyebrow { margin: 0 0 12px; color: var(--teal); font-size: 12px; font-weight: 750; letter-spacing: .15em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.22; letter-spacing: -.025em; }
.card { background: rgba(255,255,255,.9); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.button {
  min-height: 48px; padding: 11px 22px; border-radius: 999px; border: 1px solid transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  text-decoration: none; font-weight: 700; cursor: pointer; transition: .2s ease;
}
.button:hover { transform: translateY(-1px); }
.button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(45,127,120,.24); outline-offset: 2px; }
.button.primary { background: var(--teal); color: white; box-shadow: 0 10px 25px rgba(45,127,120,.22); }
.button.primary:hover { background: var(--teal-dark); }
.button.secondary { background: white; border-color: var(--line); color: var(--ink); }
.button.danger { color: var(--danger); background: #fff6f6; border-color: #e9c1c1; }
.button.wide { width: 100%; }
.messages { width: min(1120px, calc(100% - 40px)); margin: 4px auto 18px; }
.message { padding: 12px 16px; border-radius: 12px; background: var(--mint); margin: 0; }
.site-footer {
  width: min(1120px, calc(100% - 40px)); min-height: 92px; margin: 80px auto 0;
  border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between;
  color: var(--muted); font-size: 12px;
}

.home-page { background: linear-gradient(180deg, #edf6f7 0, #f4f9f8 44%, var(--paper) 100%); }
.hero { min-height: 570px; display: grid; grid-template-columns: 1.35fr .65fr; gap: 80px; align-items: center; padding: 70px 0 90px; }
.hero-copy h1 { font-size: clamp(45px, 6vw, 76px); margin-bottom: 28px; font-weight: 650; }
.hero-copy h1 em { color: var(--teal); font-style: normal; font-weight: 540; }
.hero-lead { max-width: 660px; color: var(--muted); font-size: 18px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.trust-row span { background: rgba(255,255,255,.8); border: 1px solid var(--line); border-radius: 99px; padding: 7px 13px; font-size: 13px; }
.breathing-card { justify-self: center; text-align: center; color: var(--muted); }
.breathing-orbit {
  width: 230px; height: 230px; margin-bottom: 28px; border-radius: 45% 55% 48% 52%;
  display: grid; place-items: center; background: rgba(180,205,214,.46); border: 1px solid rgba(45,127,120,.12);
  animation: breathe 6s ease-in-out infinite; box-shadow: inset 0 0 70px rgba(255,255,255,.8);
}
.breathing-orbit::before { content:""; width: 145px; height: 145px; position: absolute; border-radius: 50%; border: 1px solid rgba(45,127,120,.25); }
.breathing-orbit span { color: var(--teal-dark); font-size: 13px; letter-spacing: .16em; }
@keyframes breathe { 0%,100% { transform: scale(.92) rotate(-2deg); } 50% { transform: scale(1.06) rotate(2deg); } }
.consent-section { padding: 70px 0 40px; }
.section-heading { max-width: 650px; margin-bottom: 36px; }
.section-heading h2 { font-size: clamp(32px, 4vw, 48px); margin-bottom: 14px; }
.section-heading > p:last-child { color: var(--muted); }
.consent-grid { display: grid; grid-template-columns: .92fr 1.08fr; gap: 28px; align-items: start; }
.consent-copy { padding: 34px; box-shadow: none; background: var(--mint-light); }
.consent-copy h3 { font-size: 16px; margin: 26px 0 8px; }
.consent-copy h3:first-child { margin-top: 0; }
.consent-copy p { color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.consent-form, .login-card { padding: 36px; }
.field { margin-bottom: 22px; }
.field > label, .field legend { display: block; font-weight: 700; margin-bottom: 7px; }
.field-help { color: var(--muted); font-size: 12px; margin: -4px 0 8px; }
.field input[type="text"], .field input[type="email"], .field input[type="password"], .field input[type="number"], .field select, .field textarea, .filter-bar input, .filter-bar select {
  width: 100%; min-height: 50px; border-radius: 13px; border: 1px solid var(--line); background: white; padding: 10px 14px; color: var(--ink);
}
.field textarea { resize: vertical; line-height: 1.8; }
.field input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--teal); }
.demographic-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.choice-field { border: 0; padding: 0; margin-inline: 0; }
.choice-field ul { display: flex; gap: 10px; margin: 0; padding: 0; list-style: none; }
.choice-field li { flex: 1; }
.choice-field li label { display: flex; gap: 8px; align-items: center; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.checks { display: grid; gap: 13px; margin: 28px 0; }
.checks label { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); font-size: 13px; cursor: pointer; }
.checks input { width: 18px; height: 18px; accent-color: var(--teal); flex: none; margin-top: 2px; }
.errorlist { color: var(--danger); font-size: 12px; margin: 6px 0 0; padding-left: 18px; }
.form-alert { background: #fff1f1; color: #842e2e; border: 1px solid #f0caca; border-radius: 12px; padding: 12px 14px; margin-bottom: 20px; font-size: 13px; }
.form-footnote { text-align: center; color: var(--muted); font-size: 11px; margin: 12px 0 0; }

.survey-shell, .report-shell, .dashboard-shell, .detail-shell, .writing-shell { width: min(980px, calc(100% - 40px)); margin: 30px auto 0; }
.progress-wrap { position: sticky; top: 10px; z-index: 10; padding: 11px 15px; background: rgba(251,253,252,.9); border: 1px solid var(--line); border-radius: 14px; backdrop-filter: blur(14px); }
.progress-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 7px; }
.progress-meta strong { color: var(--teal); }
.progress-track { height: 6px; background: var(--mint); border-radius: 9px; overflow: hidden; }
.progress-track span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), var(--blue)); border-radius: inherit; transition: width .25s; }
.survey-intro { text-align: center; padding: 88px 0 70px; }
.survey-intro h1 { font-size: clamp(38px, 6vw, 60px); margin-bottom: 16px; }
.survey-intro > p:last-child { color: var(--muted); }
.invite-note { display: inline-block; margin-top: 12px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 99px; background: white; color: var(--teal-dark) !important; font-size: 13px; }
.sticky-alert { position: sticky; top: 78px; z-index: 9; }
.scale-section { margin-bottom: 90px; }
.scale-heading { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 28px; }
.section-number { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, var(--teal), var(--blue)); color: white; font-size: 12px; }
.scale-heading h2 { margin: 0 0 4px; font-size: 31px; }
.scale-heading p { color: var(--muted); margin: 0; }
.question-card { border: 1px solid var(--line); border-radius: 19px; padding: 25px 26px 20px; margin: 0 0 16px; background: white; transition: border-color .2s, box-shadow .2s; }
.question-card:focus-within { border-color: var(--teal); box-shadow: 0 10px 30px rgba(45,127,120,.08); }
.question-card.has-error { border-color: #d68d8d; }
.question-card legend { width: 100%; padding: 0; font-weight: 650; line-height: 1.6; }
.question-card legend > span { display: inline-block; color: var(--teal); font-size: 11px; margin-right: 12px; letter-spacing: .1em; }
.option-row ul { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; padding: 18px 0 0; margin: 0; list-style: none; }
.option-row label {
  min-height: 48px; display: flex; justify-content: center; align-items: center; text-align: center;
  border: 1px solid var(--line); border-radius: 12px; color: var(--muted); font-size: 12px; cursor: pointer; padding: 7px;
  transition: .16s;
}
.option-row input { position: absolute; opacity: 0; pointer-events: none; }
.option-row label:has(input:checked) { background: var(--teal); border-color: var(--teal); color: white; box-shadow: 0 7px 18px rgba(45,127,120,.2); }
.option-row label:has(input:focus-visible) { outline: 3px solid rgba(45,127,120,.24); }
.submit-panel { padding: 25px 28px; background: var(--ink); color: white; border-radius: 20px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.submit-panel p { margin: 4px 0 0; color: #b7cfcc; font-size: 12px; }

.suggestion-field { padding: 26px; background: white; border: 1px solid var(--line); border-radius: 19px; }

.writing-shell {
  max-width: 880px;
  --day-a: #edf6f7;
  --day-b: #dce8ee;
  --day-ink: #4f8490;
}
.writing-shell.day-1 { --day-a: #edf6f7; --day-b: #dce8ee; --day-ink: #4f8490; }
.writing-shell.day-2 { --day-a: #f0f7f3; --day-b: #dbe9df; --day-ink: #5f8a76; }
.writing-shell.day-3 { --day-a: #f3f5f8; --day-b: #dedee8; --day-ink: #6f7f9d; }
.writing-shell.day-4 { --day-a: #f6f4f1; --day-b: #e8ddd9; --day-ink: #8a746b; }
.writing-shell.day-5 { --day-a: #eef7f4; --day-b: #d8e7e1; --day-ink: #4f8778; }
.writing-shell.day-6 { --day-a: #eef5f8; --day-b: #d8e5ec; --day-ink: #5d8498; }
.writing-shell.day-7 { --day-a: #f1f6f5; --day-b: #d9e3df; --day-ink: #6f8b83; }
.writing-hero { text-align: center; padding: 62px 0 36px; }
.writing-hero h1 { font-size: clamp(36px, 6vw, 58px); margin-bottom: 14px; }
.writing-hero > p:not(.eyebrow) { color: var(--muted); max-width: 660px; margin-inline: auto; }
.day-track { display: flex; justify-content: center; gap: 10px; margin-top: 28px; }
.day-track span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); background: white; color: var(--muted); font-size: 12px; font-weight: 700; }
.day-track .is-done { background: var(--day-b); color: var(--day-ink); border-color: rgba(45,127,120,.14); }
.day-track .is-current { background: var(--day-ink); color: white; border-color: var(--day-ink); box-shadow: 0 10px 25px rgba(77,120,134,.18); }
.writing-card { padding: 34px; }
.prompt-panel { margin-bottom: 26px; padding: 24px; border-radius: 18px; background: linear-gradient(135deg, var(--day-a), var(--day-b)); border: 1px solid var(--line); }
.prompt-panel span { display: inline-flex; margin-bottom: 10px; color: var(--day-ink); font-size: 12px; font-weight: 750; letter-spacing: .14em; }
.prompt-panel p { margin: 0; color: var(--ink); font-size: 17px; }
.writing-submit { margin-top: 18px; }

.report-shell { max-width: 900px; }
.report-hero { min-height: 265px; padding: 50px; border-radius: 32px; display: flex; align-items: center; justify-content: space-between; background: linear-gradient(135deg, #dce8ee, #e2f1ed); overflow: hidden; position: relative; }
.report-hero::after { content:""; position:absolute; width: 300px; height: 300px; right:-60px; bottom:-190px; background:rgba(255,255,255,.45); border-radius:50%; }
.report-hero h1 { font-size: clamp(48px, 8vw, 78px); margin: 0; color: var(--teal-dark); }
.report-eyebrow { color: var(--muted); margin: 10px 0 0; }
.report-ring { width: 135px; height: 135px; border-radius: 50%; border: 11px solid rgba(255,255,255,.8); display: grid; place-content: center; text-align: center; z-index: 1; box-shadow: 0 12px 30px rgba(45,127,120,.12); }
.report-ring span { font-size: 36px; font-weight: 750; line-height: 1; }
.report-ring small { color: var(--muted); margin-top: 7px; }
.report-summary { padding: 34px 12px; border-bottom: 1px solid var(--line); }
.report-summary p { font-size: 18px; max-width: 760px; margin-bottom: 12px; }
.report-summary span { color: var(--muted); font-size: 11px; }
.score-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 30px 0; }
.score-grid.three-columns { grid-template-columns: repeat(3, 1fr); }
.score-card { padding: 28px; background: white; border: 1px solid var(--line); border-radius: 21px; }
.score-label { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }
.score-card > strong { display: block; font-size: 42px; margin: 13px 0; }
.score-card > strong small { color: var(--muted); font-size: 14px; font-weight: 500; }
.score-track { height: 8px; background: #edf3f2; border-radius: 10px; overflow: hidden; }
.score-track span { height: 100%; display: block; border-radius: inherit; background: #6ba9c4; }
.score-track.reward span { background: #4f9fc1; }
.score-track.resilience span { background: #62a99e; }
.score-card p { color: var(--muted); font-size: 12px; margin: 12px 0 0; }
.change-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin: 22px 0 34px; }
.change-grid article { padding: 20px; background: white; border: 1px solid var(--line); border-radius: 16px; }
.change-grid span { display: block; color: var(--muted); font-size: 12px; }
.change-grid strong { display: block; font-size: 30px; color: var(--teal-dark); margin-top: 6px; }
.advice-card { padding: 44px; background: var(--mint-light); border-radius: 27px; margin: 32px 0; }
.advice-card h2 { font-size: 30px; }
.advice-card ol { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 13px; }
.advice-card li { display: flex; align-items: flex-start; gap: 15px; background: white; border: 1px solid var(--line); border-radius: 15px; padding: 16px; }
.advice-card li > span { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; background: var(--teal); color: white; flex: none; font-size: 12px; }
.advice-card li p { margin: 2px 0 0; }
.report-note { display: flex; gap: 35px; align-items: center; justify-content: space-between; padding: 35px 0; }
.report-note h2 { font-size: 23px; }
.report-note p { color: var(--muted); margin: 0; max-width: 620px; font-size: 14px; }
.report-note .button { flex: none; }
.references { border-top: 1px solid var(--line); padding: 22px 0; color: var(--muted); font-size: 12px; }
.references summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.references p { margin: 12px 0; }

.login-shell { width: min(900px, calc(100% - 40px)); min-height: 670px; margin: 10px auto; display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.login-shell.single-column { max-width: 860px; grid-template-columns: .85fr 1.15fr; }
.login-copy h1 { font-size: 54px; margin-bottom: 18px; }
.login-copy p:last-child { color: var(--muted); }
.login-card { background: white; }
.dashboard-shell { max-width: 1120px; }
.dashboard-heading, .detail-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; padding: 55px 0 35px; }
.dashboard-heading h1, .detail-heading h1 { font-size: 46px; margin-bottom: 8px; }
.dashboard-heading p:last-child, .detail-heading p:last-child { color: var(--muted); margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 13px; }
.stat-grid article { padding: 20px; background: white; border: 1px solid var(--line); border-radius: 16px; }
.stat-grid span { display: block; color: var(--muted); font-size: 12px; }
.stat-grid strong { display: block; font-size: 28px; margin-top: 7px; }
.filter-bar { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 10px; margin: 24px 0 14px; }
.filter-bar input, .filter-bar select { min-height: 44px; font-size: 13px; }
.study-tools { margin: 0 0 18px; padding: 22px; box-shadow: none; }
.study-tools p { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.inline-form { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; }
.inline-form label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.inline-form input { width: 130px; min-height: 42px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 11px; color: var(--ink); }
.url-field { width: min(560px, 52vw); min-height: 38px; border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; color: var(--muted); background: #fbfdfc; font-size: 12px; }
.muted { color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 17px; background: white; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: var(--muted); font-size: 11px; font-weight: 650; background: #f5faf8; }
th, td { padding: 15px 17px; border-bottom: 1px solid #e7efed; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfefd; }
.table-email { display: block; color: var(--ink); }
td small { display: block; color: var(--muted); }
.status { display: inline-block; border-radius: 99px; padding: 5px 10px; font-size: 11px; font-weight: 700; }
.status-safe { background: #e6f5ec; color: #277049; }
.status-controlled { background: #e7f3f8; color: #2d6b85; }
.status-attention { background: #fff0e6; color: #9a5529; }
.row-link { font-weight: 700; text-decoration: none; }
.empty-state { text-align: center; color: var(--muted); padding: 50px; }
.limit-note { color: var(--muted); font-size: 11px; }
.detail-shell { max-width: 900px; }
.detail-meta { padding: 25px; display: grid; grid-template-columns: repeat(3,1fr); gap: 23px; box-shadow: none; }
.detail-meta span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 5px; }
.detail-meta strong { word-break: break-word; }
.answer-section { margin-top: 48px; }
.answer-section h2 { font-size: 25px; }
.answer-section h3 { margin: 28px 0 8px; font-size: 17px; }
.answer-list { padding-left: 30px; }
.answer-list li { padding: 12px 0 12px 8px; border-bottom: 1px solid var(--line); }
.answer-list li::marker { color: var(--teal); font-weight: 700; }
.answer-list p { margin: 0; }
.answer-list strong { color: var(--muted); font-size: 11px; }
.danger-zone { margin-top: 60px; padding: 24px; display: flex; justify-content: space-between; gap: 20px; align-items: center; border: 1px solid #edcccc; background: #fffafa; border-radius: 18px; }
.danger-zone h2 { font-size: 17px; margin-bottom: 5px; }
.danger-zone p { color: var(--muted); font-size: 12px; margin: 0; }
.error-shell { min-height: 600px; display: grid; place-content: center; text-align: center; padding: 40px; }
.error-shell h1 { font-size: 44px; }
.error-shell p { color: var(--muted); }

@media (max-width: 800px) {
  .site-header { width: min(100% - 28px, 1180px); }
  .brand small, .header-note, .header-actions span { display: none; }
  .shell, .survey-shell, .report-shell, .dashboard-shell, .detail-shell { width: min(100% - 28px, 1120px); }
  .hero { grid-template-columns: 1fr; min-height: 0; gap: 25px; padding: 60px 0 70px; }
  .hero-copy h1 { font-size: 46px; }
  .breathing-card { display: none; }
  .consent-grid, .login-shell { grid-template-columns: 1fr; gap: 35px; }
  .demographic-grid { grid-template-columns: 1fr; gap: 0; }
  .login-shell.single-column { grid-template-columns: 1fr; }
  .login-shell { padding: 70px 0; min-height: 0; }
  .option-row ul { grid-template-columns: 1fr; }
  .option-row label { justify-content: flex-start; padding-inline: 15px; }
  .option-row input { position: static; opacity: 1; pointer-events: auto; accent-color: var(--teal); }
  .submit-panel, .report-note, .dashboard-heading, .detail-heading, .danger-zone { align-items: stretch; flex-direction: column; }
  .score-grid, .score-grid.three-columns, .change-grid { grid-template-columns: 1fr; }
  .report-hero { padding: 35px 28px; }
  .report-ring { width: 105px; height: 105px; }
  .advice-card { padding: 28px 20px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .filter-bar { grid-template-columns: 1fr; }
  .url-field { width: 72vw; }
  .detail-meta { grid-template-columns: 1fr 1fr; }
  .site-footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; scroll-behavior: auto !important; }
}
