:root {
  --bg: #061a28;
  --ink: #0b2434;
  --ink-soft: #4b6577;
  --blue: #0b3b5a;
  --blue-2: #1a739d;
  --blue-3: #45a7c9;
  --teal: #2a9d8f;
  --gold: #d7a44a;
  --paper: #ffffff;
  --card: rgba(255, 255, 255, 0.955);
  --line: rgba(11, 59, 90, 0.13);
  --shadow: 0 34px 90px rgba(1, 13, 23, 0.4);
  --radius: 24px;
  --sans: "Inter", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

.survey-body {
  padding-bottom: 0;
}

/* ------------------------------------------------------------------ */
/* Background                                                          */
/* ------------------------------------------------------------------ */

.bg-layers {
  position: fixed;
  inset: 0;
  z-index: -3;
  background: #061a28;
  overflow: hidden;
}

.bg-layer {
  position: absolute;
  inset: -2.5%;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.015);
  filter: blur(1.6px) saturate(0.88) brightness(0.69);
  transition: opacity 1.15s ease;
}

.bg-layer.is-active {
  opacity: 1;
}

.bg-layer[data-bg="cost.jpg"] {
  filter: blur(3.4px) saturate(0.72) brightness(0.55);
}

.bg-shade {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(1100px 600px at 14% 4%, rgba(31, 118, 154, 0.32), transparent 62%),
    linear-gradient(180deg, rgba(3, 16, 26, 0.66) 0%, rgba(3, 16, 26, 0.28) 32%, rgba(3, 16, 26, 0.82) 100%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.25;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  font-size: 13px;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.is-hidden {
  display: none !important;
}

/* ------------------------------------------------------------------ */
/* Top bar                                                             */
/* ------------------------------------------------------------------ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  color: #fff;
  background: rgba(5, 25, 39, 0.74);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 11px 28px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  color: #fff;
  text-align: left;
}

.brand-mark {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: linear-gradient(145deg, #1f7ea7, #0a3550);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.brand-text {
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.progress-wrap {
  flex: 1;
  max-width: 440px;
  margin-left: auto;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.72);
}

.progress-track {
  height: 3px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.16);
}

.progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #5bc1d8, #d9b06a);
  transition: width 0.5s ease;
}

.dim-nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px 9px;
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.dim-nav::-webkit-scrollbar {
  display: none;
}

.dim-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 5px 11px;
  background: transparent;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.dim-chip:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.dim-chip .num {
  font-size: 9.5px;
  letter-spacing: 0.1em;
  opacity: 0.7;
}

.dim-chip.is-current {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.12);
}

.dim-chip.is-complete {
  color: #a9e0d5;
}

.dim-chip.is-complete::after {
  content: "✓";
  font-size: 10px;
}

/* ------------------------------------------------------------------ */
/* Layout                                                              */
/* ------------------------------------------------------------------ */

.stage {
  position: relative;
  z-index: 2;
  padding: 44px 24px 150px;
  min-height: 60vh;
}

.container {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
}

.boot {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  letter-spacing: 0.1em;
}

.boot-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  animation: pulse 1.8s ease-in-out infinite;
}

/* ------------------------------------------------------------------ */
/* Home                                                                */
/* ------------------------------------------------------------------ */

.home {
  min-height: calc(100vh - 90px);
  display: flex;
  align-items: center;
  padding: 48px 24px 80px;
}

.home-grid {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(340px, 0.82fr);
  gap: 64px;
  align-items: center;
  animation: rise 0.75s ease both;
}

.home-copy {
  color: #fff;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.28);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #75c6dc;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.home-title {
  margin: 22px 0 18px;
  font-size: clamp(38px, 4.9vw, 62px);
  font-weight: 650;
  line-height: 1.14;
  letter-spacing: 0.015em;
}

.home-title .title-nowrap {
  white-space: nowrap;
}

.home-title > span:not(.title-nowrap) {
  display: block;
  margin-top: 14px;
  font-size: 0.4em;
  font-weight: 400;
  letter-spacing: 0.14em;
  color: rgba(226, 244, 251, 0.86);
}

.home-sub {
  max-width: 590px;
  font-size: 15px;
  line-height: 1.85;
  color: rgba(232, 245, 251, 0.82);
}

.home-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 26px;
}

.home-meta span {
  padding: 7px 13px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(6, 28, 44, 0.25);
  color: rgba(235, 248, 255, 0.86);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  backdrop-filter: blur(8px);
}

.home-route {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 34px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 10.5px;
  letter-spacing: 0.12em;
}

.home-route .line {
  width: 26px;
  height: 1px;
  background: rgba(255, 255, 255, 0.26);
}

.home-route .stop {
  color: rgba(255, 255, 255, 0.78);
}

.home-card {
  position: relative;
  padding: 36px 34px 32px;
  border-radius: 28px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: rise 0.75s 0.08s ease both;
}

.home-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 34px;
  right: 34px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--blue-2), var(--gold));
}

.home-card .eyebrow {
  color: var(--blue-2);
}

.home-card .eyebrow::before {
  display: none;
}

.home-card h2 {
  margin: 12px 0 14px;
  font-size: 21px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.home-card p {
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.85;
}

.home-points {
  margin: 20px 0 24px;
  display: grid;
  gap: 9px;
}

.home-points li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: #365264;
  font-size: 12.5px;
  line-height: 1.6;
}

.home-points li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--blue-3);
  box-shadow: 0 0 0 3px rgba(69, 167, 201, 0.15);
}

.home-card .btn {
  width: 100%;
}

.home-card-foot {
  margin-top: 14px;
  text-align: center;
  font-size: 11px;
  color: #78909f;
}

.text-link {
  border: 0;
  padding: 0;
  background: none;
  color: var(--blue-2);
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.draft-banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #cbe4ed;
  background: #eef8fb;
  color: #2a596d;
  font-size: 12px;
  line-height: 1.6;
}

.draft-banner strong {
  color: var(--blue);
}

/* ------------------------------------------------------------------ */
/* Cards & pages                                                       */
/* ------------------------------------------------------------------ */

.card {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.56);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: rise 0.55s ease both;
}

.page-head {
  position: relative;
  overflow: hidden;
  padding: 44px 46px 30px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(500px 220px at 100% 0%, rgba(69, 167, 201, 0.12), transparent 70%),
    linear-gradient(180deg, rgba(11, 59, 90, 0.035), transparent);
}

.ghost-num {
  position: absolute;
  top: 4px;
  right: 34px;
  font-size: 108px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.06em;
  color: rgba(11, 59, 90, 0.055);
  pointer-events: none;
  user-select: none;
}

.page-head h1 {
  position: relative;
  margin: 12px 0 10px;
  font-size: clamp(27px, 3.2vw, 36px);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.page-head .lead {
  position: relative;
  max-width: 620px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.8;
}

.section-note {
  position: relative;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 22px;
  padding: 12px 16px;
  border-left: 3px solid var(--blue-3);
  border-radius: 0 10px 10px 0;
  background: #edf7fb;
  color: #31576b;
  font-size: 12.5px;
  line-height: 1.7;
}

.section-note b {
  color: var(--blue);
}

.page-body {
  padding: 6px 46px 36px;
}

.basic-list {
  padding: 8px 0 0;
}

.basic-q {
  padding: 28px 0;
  border-bottom: 1px dashed var(--line);
}

.basic-q:last-child {
  border-bottom: 0;
}

.q-title {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.q-num {
  flex: none;
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 25px;
  padding: 0 9px;
  border-radius: 13px;
  background: var(--blue);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.q-title h3 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.65;
}

.option-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding-left: 57px;
}

.option-list.is-single {
  grid-template-columns: 1fr;
}

.option-card {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 48px;
  padding: 11px 14px;
  border: 1.5px solid #d8e4ec;
  border-radius: 13px;
  background: #fff;
  color: #2e4b5d;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease,
    box-shadow 0.2s ease;
}

.option-card:hover {
  border-color: #9cc4d6;
  transform: translateY(-1px);
}

.option-marker {
  flex: none;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1.5px solid #c7d8e2;
  border-radius: 50%;
  color: #7d97a7;
  font-size: 10px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.option-card.is-selected {
  border-color: var(--blue-2);
  background: #eef8fc;
  color: var(--blue);
  box-shadow: 0 8px 18px rgba(26, 115, 157, 0.1);
}

.option-card.is-selected .option-marker {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.option-card.is-selected .option-marker::after {
  content: "✓";
  font-size: 11px;
}

.option-card.is-selected .option-marker .letter {
  display: none;
}

.term-note {
  display: none;
  align-items: flex-start;
  gap: 12px;
  margin: 16px 0 0 57px;
  padding: 16px 18px;
  border: 1px solid #edd3a0;
  border-radius: 13px;
  background: #fff8eb;
  color: #76511a;
  font-size: 12.5px;
  line-height: 1.7;
}

.term-note.is-visible {
  display: flex;
}

.term-note b {
  color: #684512;
}

.hidden-q {
  display: none !important;
}

/* ------------------------------------------------------------------ */
/* Rating questions                                                    */
/* ------------------------------------------------------------------ */

.questions {
  padding: 0 46px 20px;
}

.q-item {
  padding: 30px 0 26px;
  border-bottom: 1px dashed var(--line);
  border-radius: 8px;
}

.q-item:last-child {
  border-bottom: 0;
}

.q-item.is-missing {
  padding-left: 10px;
  margin-left: -10px;
  background: linear-gradient(90deg, rgba(200, 78, 46, 0.06), transparent 70%);
  box-shadow: inset 3px 0 0 #bd5a3b;
  animation: nudge 0.38s ease;
}

.q-item.is-missing .q-title h3 {
  color: #a3442b;
}

.basic-q.is-missing {
  padding-left: 10px;
  margin-left: -10px;
  background: linear-gradient(90deg, rgba(200, 78, 46, 0.06), transparent 70%);
  box-shadow: inset 3px 0 0 #bd5a3b;
  animation: nudge 0.38s ease;
}

.basic-q.is-missing .q-title h3 {
  color: #a3442b;
}

.rating-row {
  display: grid;
  grid-template-columns: 194px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-top: 13px;
}

.rating-side {
  padding-right: 4px;
}

.rating-title {
  display: block;
  color: var(--blue);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.rating-hint {
  display: block;
  margin-top: 3px;
  color: #7b93a2;
  font-size: 10.5px;
}

.rating-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.rating-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 46px;
  padding: 5px 2px;
  border: 1.5px solid #d7e3eb;
  border-radius: 12px;
  background: #fff;
  color: #2d4a5c;
  cursor: pointer;
  transition: all 0.18s ease;
}

.rating-btn b {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--blue);
}

.rating-btn span {
  font-size: 9px;
  line-height: 1.2;
  color: #7c94a3;
  white-space: nowrap;
}

.rating-btn:hover {
  border-color: #89b9cd;
  transform: translateY(-2px);
  box-shadow: 0 7px 15px rgba(11, 59, 90, 0.08);
}

.rating-btn:active {
  transform: translateY(0);
}

.rating-row[data-kind="i"] .rating-btn.is-selected {
  border-color: transparent;
  background: linear-gradient(145deg, #1c78a2, #0b3b5a);
  box-shadow: 0 10px 20px rgba(11, 59, 90, 0.26);
}

.rating-row[data-kind="s"] .rating-btn.is-selected {
  border-color: transparent;
  background: linear-gradient(145deg, #33a99a, #177266);
  box-shadow: 0 10px 20px rgba(23, 114, 102, 0.24);
}

.rating-btn.is-selected b,
.rating-btn.is-selected span {
  color: #fff;
}

.rating-btn:focus-visible,
.na-btn:focus-visible,
.option-card:focus-visible,
.btn:focus-visible,
.dim-chip:focus-visible,
.brand:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.na-line {
  display: flex;
  justify-content: flex-end;
  margin: 8px 0 0 212px;
}

.na-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px dashed #b9cdd9;
  border-radius: 999px;
  background: transparent;
  color: #638091;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.na-btn span {
  opacity: 0.75;
}

.na-btn:hover {
  border-color: #d0a75e;
  color: #8e651d;
}

.na-btn.is-selected {
  border-style: solid;
  border-color: #e2b469;
  background: #fff4e0;
  color: #815a13;
  font-weight: 600;
}

/* ------------------------------------------------------------------ */
/* Overall                                                             */
/* ------------------------------------------------------------------ */

.overall-block {
  padding: 28px 0 30px;
  border-bottom: 1px dashed var(--line);
}

.overall-block:last-child {
  border-bottom: 0;
}

.overall-block .option-list {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding-left: 57px;
}

.overall-block .option-card {
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 15px 8px;
  text-align: center;
  font-size: 12.5px;
}

.overall-block .option-marker {
  width: 26px;
  height: 26px;
}

.page-head .mini-progress {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: #567383;
  font-size: 11px;
}

.mini-progress .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b8cdd9;
}

.mini-progress .dot.is-on {
  background: var(--teal);
}

/* ------------------------------------------------------------------ */
/* Action bar                                                          */
/* ------------------------------------------------------------------ */

.actionbar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 38;
  padding: 16px 24px calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(4, 18, 30, 0), rgba(4, 18, 30, 0.82) 46%);
  pointer-events: none;
}

.action-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 55px rgba(1, 13, 23, 0.32);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  pointer-events: auto;
}

.action-hint {
  flex: 1;
  text-align: center;
  color: #688191;
  font-size: 11.5px;
  letter-spacing: 0.02em;
}

/* ------------------------------------------------------------------ */
/* Buttons                                                             */
/* ------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease,
    opacity 0.18s ease;
  white-space: nowrap;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none !important;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(145deg, #1e7ba6, #0b3b5a);
  box-shadow: 0 12px 26px rgba(11, 59, 90, 0.26);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(11, 59, 90, 0.32);
}

.btn-ghost {
  color: #36576b;
  border-color: #d4e1e9;
  background: #fff;
}

.btn-ghost:hover:not(:disabled) {
  border-color: #a9c7d7;
  background: #f7fbfd;
}

.btn .arrow {
  font-size: 15px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.btn:hover .arrow {
  transform: translateX(2px);
}

.btn-link {
  min-height: auto;
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue-2);
  font-size: 11.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn.is-loading {
  color: transparent;
  pointer-events: none;
}

.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn-primary.is-loading {
  position: relative;
}

.btn-ghost.is-loading::after {
  border-color: rgba(11, 59, 90, 0.2);
  border-top-color: var(--blue);
}

/* ------------------------------------------------------------------ */
/* Done                                                                */
/* ------------------------------------------------------------------ */

.done {
  min-height: calc(100vh - 120px);
  display: grid;
  place-items: center;
  padding: 60px 24px 90px;
}

.done-card {
  width: 100%;
  max-width: 640px;
  padding: 50px 46px 42px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: var(--card);
  box-shadow: var(--shadow);
  text-align: center;
  animation: rise 0.6s ease both;
}

.done-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  margin: 0 auto 24px;
  border-radius: 50%;
  color: #fff;
  font-size: 32px;
  background: linear-gradient(145deg, #35b0a0, #176f65);
  box-shadow: 0 18px 36px rgba(23, 111, 101, 0.28);
}

.done-card .eyebrow {
  color: var(--blue-2);
}

.done-card .eyebrow::before {
  display: none;
}

.done-card h1 {
  margin: 14px 0 14px;
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 650;
  letter-spacing: 0.01em;
}

.done-card > p {
  max-width: 480px;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.85;
}

.code-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 26px 0 8px;
  padding: 10px 18px;
  border: 1px solid #d4e6ee;
  border-radius: 999px;
  background: #f2f9fc;
  color: #5d7787;
  font-size: 11.5px;
}

.code-chip strong {
  color: var(--blue);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.done-card .small {
  margin-top: 8px;
  color: #8399a6;
  font-size: 11px;
}

.done-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}

.done-note {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: #7d929f;
  font-size: 11px;
  line-height: 1.7;
}

/* ------------------------------------------------------------------ */
/* Footer / toast / misc                                               */
/* ------------------------------------------------------------------ */

.site-foot {
  position: relative;
  z-index: 3;
  padding: 28px 24px 36px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
}

.foot-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.foot-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  line-height: 1.7;
}

.foot-dot {
  opacity: 0.45;
}

.credit-fold {
  margin-top: 9px;
}

.credit-fold summary {
  display: inline-block;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.46);
  font-size: 10.5px;
  list-style: none;
}

.credit-fold summary::-webkit-details-marker {
  display: none;
}

.credit-fold summary::before {
  content: "+ ";
  opacity: 0.7;
}

.credit-fold[open] summary::before {
  content: "− ";
}

.credit-list {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  padding-left: 12px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 10px;
  line-height: 1.65;
}

.credit-more {
  margin-top: 6px;
  font-size: 10px;
}

.credit-more a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.foot-copy {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 9.5px;
  letter-spacing: 0.05em;
}

.toast {
  position: fixed;
  bottom: 104px;
  left: 50%;
  z-index: 70;
  max-width: min(92vw, 560px);
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(9, 32, 48, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #eaf6fc;
  font-size: 12.5px;
  line-height: 1.5;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.is-error {
  background: rgba(116, 45, 27, 0.97);
  border-color: rgba(255, 194, 171, 0.24);
}

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  overflow: hidden !important;
}

.noscript {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 30px;
  background: #071e2d;
  color: #fff;
  text-align: center;
  font-size: 14px;
  line-height: 1.8;
}

.error-page {
  min-height: 70vh;
  display: grid;
  place-items: center;
  padding: 40px 24px;
}

.error-card {
  max-width: 520px;
  padding: 42px;
  border-radius: 24px;
  background: var(--card);
  text-align: center;
  box-shadow: var(--shadow);
}

.error-card h1 {
  margin: 10px 0;
  color: var(--blue);
  font-size: 48px;
}

.error-card p {
  margin-bottom: 22px;
  color: var(--ink-soft);
}

/* ------------------------------------------------------------------ */
/* Animations                                                          */
/* ------------------------------------------------------------------ */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes nudge {
  0%,
  100% {
    transform: translateX(0);
  }
  30% {
    transform: translateX(-4px);
  }
  60% {
    transform: translateX(4px);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */

@media (max-width: 1000px) {
  .home-grid {
    grid-template-columns: 1fr;
    gap: 34px;
    max-width: 680px;
  }

  .home {
    padding-top: 40px;
  }

  .home-card {
    padding: 30px 28px;
  }
}

@media (max-width: 820px) {
  .topbar-inner {
    gap: 14px;
    padding: 10px 16px;
  }

  .brand-text {
    display: none;
  }

  .progress-wrap {
    max-width: none;
  }

  .dim-nav {
    padding: 0 14px 9px;
  }

  .stage {
    padding: 20px 12px 132px;
  }

  .home {
    padding: 28px 16px 40px;
  }

  .home-title {
    font-size: clamp(34px, 8vw, 48px);
  }

  .home-sub {
    font-size: 14px;
  }

  .home-card {
    border-radius: 22px;
  }

  .page-head {
    padding: 30px 22px 22px;
  }

  .ghost-num {
    right: 16px;
    font-size: 76px;
  }

  .questions {
    padding: 0 20px 14px;
  }

  .page-body {
    padding: 4px 20px 28px;
  }

  .q-item {
    padding: 24px 0 22px;
  }

  .rating-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .na-line {
    margin-left: 0;
    justify-content: flex-start;
  }

  .rating-btn {
    min-height: 44px;
  }

  .rating-btn span {
    display: none;
  }

  .option-list,
  .term-note {
    padding-left: 0;
    margin-left: 0;
  }

  .option-list {
    grid-template-columns: 1fr;
  }

  .overall-block .option-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-left: 0;
  }

  .overall-block .option-card {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
  }

  .actionbar {
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  }

  .action-inner {
    gap: 8px;
    padding: 8px;
  }

  .action-hint {
    display: none;
  }

  .btn {
    min-height: 42px;
    padding: 0 15px;
    font-size: 12.5px;
  }

  .btn-ghost {
    flex: 0 0 auto;
  }

  .btn-primary {
    flex: 1;
  }

  .done {
    padding: 32px 14px 70px;
  }

  .done-card {
    padding: 36px 22px 30px;
    border-radius: 22px;
  }

  .site-foot {
    padding: 22px 16px 28px;
  }
}

@media (max-width: 520px) {
  .progress-meta .pct {
    display: none;
  }

  .dim-chip {
    padding: 5px 9px;
  }

  .dim-chip .name {
    max-width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .page-head h1 {
    font-size: 26px;
  }

  .rating-options {
    gap: 5px;
  }

  .rating-btn {
    border-radius: 10px;
  }

  .rating-btn b {
    font-size: 15px;
  }

  .q-title h3 {
    font-size: 14px;
  }

  .toast {
    bottom: 90px;
    border-radius: 14px;
  }

  .home-route {
    margin-top: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
