:root {
  --ink: #202842;
  --deep: #101728;
  --navy: #293452;
  --slate: #64708c;
  --mist: #eef3fb;
  --line: rgba(255, 255, 255, 0.22);
  --cyan: #a8eff4;
  --green: #9fe8c2;
  --gold: #f2d27d;
  --rose: #e9b8c7;
  --shadow: 0 26px 90px rgba(16, 22, 42, 0.24);
  font-family:
    "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--deep);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: #f4f7fb;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

.demo-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 30px;
  height: 86px;
  padding: 0 clamp(22px, 4vw, 72px);
  color: #fff;
  background: linear-gradient(180deg, rgba(16, 23, 40, 0.62), rgba(16, 23, 40, 0));
}

.demo-brand {
  width: clamp(168px, 13vw, 216px);
}

.brand-logo {
  display: block;
  width: 100%;
  height: auto;
  filter: brightness(0) invert(1);
}

.demo-nav {
  justify-self: center;
  display: flex;
  gap: clamp(24px, 4vw, 60px);
  font-size: 15px;
  font-weight: 700;
}

.demo-nav a {
  opacity: 0.82;
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.demo-nav a:hover,
.demo-nav a:focus-visible {
  opacity: 1;
  transform: translateY(-2px);
}

.demo-home,
.primary-link,
.step-button,
.ghost-button,
.save-button,
.print-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  font-weight: 800;
  white-space: nowrap;
}

.demo-home {
  padding: 0 24px;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.86);
}

.demo-hero {
  position: relative;
  min-height: 740px;
  height: 92svh;
  overflow: hidden;
  display: grid;
  align-items: center;
  color: #fff;
  background: var(--deep);
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% center;
  transform: scale(1.02);
  animation: heroDrift 12s ease-in-out infinite alternate;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(13, 20, 36, 0.88) 0%, rgba(13, 20, 36, 0.58) 46%, rgba(13, 20, 36, 0.18) 100%),
    linear-gradient(180deg, rgba(13, 20, 36, 0.18), rgba(13, 20, 36, 0.62));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(960px, calc(100% - 48px));
  margin-left: clamp(24px, 8vw, 138px);
  padding-top: 70px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(46px, 6.6vw, 92px);
  line-height: 1.04;
  letter-spacing: 0.06em;
}

.hero-content p:not(.eyebrow) {
  width: min(620px, 100%);
  margin: 28px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.65;
}

.primary-link {
  margin-top: 34px;
  padding: 0 28px;
  color: var(--deep);
  background: var(--cyan);
  box-shadow: 0 18px 42px rgba(168, 239, 244, 0.25);
}

.index-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  color: #fff;
  background: var(--deep);
}

.index-band article {
  min-height: 210px;
  padding: clamp(28px, 4vw, 54px);
  background: rgba(255, 255, 255, 0.08);
}

.index-band span,
.score-card small,
.report-generated,
.report-save-status,
.saved-report-link {
  display: block;
  color: rgba(255, 255, 255, 0.64);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.index-band strong {
  display: block;
  margin-top: 16px;
  font-size: 31px;
}

.index-band p {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.7;
}

.assessment-section {
  display: grid;
  grid-template-columns: minmax(250px, 0.9fr) minmax(420px, 1.7fr) minmax(250px, 0.85fr);
  gap: 22px;
  padding: clamp(32px, 6vw, 92px) clamp(18px, 5vw, 80px);
  background: linear-gradient(180deg, #f4f7fb 0%, #eef3fb 100%);
}

.assessment-rail,
.question-stage,
.live-panel,
.analysis-panel,
.score-card,
.model-grid article {
  border: 1px solid rgba(35, 45, 74, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 20px 70px rgba(32, 40, 66, 0.08);
}

.assessment-rail,
.live-panel {
  align-self: start;
  position: sticky;
  top: 18px;
  padding: 28px;
}

.assessment-rail h2,
.live-panel h2,
.report-heading h2,
.model-section h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.18;
}

.live-panel h2 {
  font-size: clamp(24px, 2.2vw, 34px);
}

.progress-shell {
  margin-top: 26px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  color: var(--slate);
  font-weight: 800;
}

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

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  transition: width 240ms ease;
}

.dimension-nav {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

.dimension-nav button {
  min-height: 72px;
  padding: 14px;
  border-radius: 8px;
  color: var(--ink);
  text-align: left;
  background: #eef3fb;
  cursor: pointer;
}

.dimension-nav button.is-active {
  color: #fff;
  background: var(--navy);
}

.dimension-nav small {
  display: block;
  margin-top: 6px;
  color: inherit;
  opacity: 0.72;
}

.rail-actions {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

.ghost-button {
  width: 100%;
  color: #fff;
  background: var(--navy);
  cursor: pointer;
}

.ghost-button--quiet {
  color: var(--navy);
  background: #e2e8f4;
}

.question-stage {
  display: flex;
  flex-direction: column;
  min-height: 620px;
  padding: clamp(24px, 4vw, 48px);
}

.question-topline {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--slate);
  font-weight: 900;
}

.question-panel {
  display: grid;
  align-content: center;
  flex: 1;
}

.question-panel h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.28;
  letter-spacing: 0;
}

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

.answer-option {
  min-height: 118px;
  padding: 16px 10px;
  border: 1px solid #d8e0ef;
  border-radius: 8px;
  color: var(--ink);
  background: #f8fbff;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.answer-option:hover,
.answer-option:focus-visible {
  transform: translateY(-4px);
  border-color: var(--navy);
}

.answer-option.is-selected {
  color: #fff;
  border-color: var(--navy);
  background: var(--navy);
}

.answer-option strong,
.answer-option span {
  display: block;
}

.answer-option strong {
  font-size: 34px;
  line-height: 1;
}

.answer-option span {
  margin-top: 10px;
  font-weight: 800;
  line-height: 1.35;
}

.question-controls {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.step-button {
  min-width: 128px;
  padding: 0 24px;
  color: var(--navy);
  background: #e3e9f4;
  cursor: pointer;
}

.step-button--primary {
  color: #fff;
  background: var(--navy);
}

.step-button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.live-score {
  margin-top: 26px;
  padding: 24px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--navy), #4d5d7b);
}

.live-score span,
.live-score strong {
  display: block;
}

.live-score span {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.live-score strong {
  margin-top: 10px;
  font-size: 64px;
  line-height: 1;
}

.mini-bars {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.mini-bar span,
.dimension-bar span {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--slate);
  font-weight: 900;
}

.meter {
  display: block;
  height: 10px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe6f2;
}

.meter i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--gold), var(--rose));
}

.report-section {
  padding: clamp(42px, 7vw, 108px) clamp(18px, 5vw, 80px);
  color: #fff;
  background: var(--deep);
}

.report-heading {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 34px;
}

.report-heading__copy {
  width: min(720px, 100%);
}

.report-heading h2 {
  color: #fff;
  font-size: clamp(38px, 6vw, 82px);
  letter-spacing: 0.04em;
}

.report-heading p:not(.eyebrow),
.quadrant-text,
.analysis-panel > p {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.75;
}

.report-actions {
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 10px;
}

.report-save-status[data-status="saved"],
.saved-report-link {
  color: var(--green);
}

.report-save-status[data-status="warning"],
.report-save-status[data-status="error"] {
  color: var(--gold);
}

.report-actions__buttons {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.save-button,
.print-button {
  padding: 0 22px;
  color: var(--deep);
  background: var(--cyan);
  cursor: pointer;
}

.save-button {
  background: var(--green);
}

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

.score-card {
  display: grid;
  justify-items: center;
  min-height: 330px;
  padding: 32px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line);
}

.score-ring {
  --score: 0;
  display: grid;
  place-items: center;
  width: min(190px, 44vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--deep) 0 58%, transparent 59%),
    conic-gradient(var(--cyan) calc(var(--score) * 1%), rgba(255, 255, 255, 0.16) 0);
}

.score-ring--risk {
  background:
    radial-gradient(circle at center, var(--deep) 0 58%, transparent 59%),
    conic-gradient(var(--rose) calc(var(--score) * 1%), rgba(255, 255, 255, 0.16) 0);
}

.score-ring span {
  font-size: 56px;
  font-weight: 900;
}

.score-card p {
  margin: 22px 0 0;
  font-size: 24px;
  font-weight: 900;
}

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

.analysis-panel {
  padding: 28px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--line);
}

.analysis-panel--wide {
  grid-column: 1 / -1;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 20px;
}

.panel-heading strong {
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: 0.04em;
}

.dimension-bars {
  display: grid;
  gap: 18px;
}

.dimension-bar span {
  color: rgba(255, 255, 255, 0.78);
}

.dimension-bar .meter {
  background: rgba(255, 255, 255, 0.14);
}

.risk-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.risk-list li {
  min-height: 180px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.risk-list strong,
.risk-list span {
  display: block;
}

.risk-list strong {
  color: var(--cyan);
}

.risk-list span {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.6;
}

.model-section {
  padding: clamp(48px, 7vw, 112px) clamp(18px, 5vw, 80px);
  background: #f4f7fb;
}

.model-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}

.model-grid article {
  min-height: 230px;
  padding: 28px;
}

.model-grid strong {
  display: block;
  font-size: 26px;
}

.model-grid p {
  margin: 16px 0 0;
  color: var(--slate);
  line-height: 1.8;
}

.demo-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(22px, 5vw, 80px);
  color: rgba(255, 255, 255, 0.72);
  background: var(--deep);
}

.demo-footer .brand-logo {
  width: 190px;
  filter: brightness(0) invert(1);
}

.demo-footer a {
  color: var(--cyan);
  font-weight: 900;
}

@keyframes heroDrift {
  from {
    transform: scale(1.02) translate3d(0, 0, 0);
  }

  to {
    transform: scale(1.08) translate3d(-1.5%, 0, 0);
  }
}

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

  .assessment-rail,
  .live-panel {
    position: static;
  }

  .live-panel {
    order: 2;
  }
}

@media (max-width: 860px) {
  .demo-header {
    grid-template-columns: 1fr auto;
    height: auto;
    min-height: 78px;
    padding: 18px 22px;
  }

  .demo-nav {
    grid-column: 1 / -1;
    justify-self: start;
    flex-wrap: wrap;
    gap: 16px 24px;
    font-size: 14px;
  }

  .demo-home {
    min-height: 38px;
    padding: 0 16px;
  }

  .demo-hero {
    min-height: 700px;
  }

  .hero-content {
    width: calc(100% - 36px);
    margin-left: 18px;
    padding-top: 126px;
  }

  .index-band,
  .score-board,
  .report-grid,
  .model-grid,
  .risk-list {
    grid-template-columns: 1fr;
  }

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

  .answer-option {
    min-height: 86px;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 14px;
    text-align: left;
  }

  .answer-option span {
    margin-top: 0;
  }

  .question-controls,
  .report-heading,
  .report-actions__buttons,
  .demo-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .report-heading {
    display: grid;
  }

  .report-actions {
    justify-items: stretch;
  }
}

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

  .demo-header,
  .demo-hero,
  .index-band,
  .assessment-section,
  .model-section,
  .demo-footer,
  .report-actions__buttons {
    display: none !important;
  }

  .report-section {
    padding: 0;
    color: #111;
    background: #fff;
  }

  .report-heading h2,
  .analysis-panel,
  .score-card,
  .report-heading p:not(.eyebrow),
  .analysis-panel > p {
    color: #111;
  }

  .score-board,
  .report-grid,
  .risk-list {
    grid-template-columns: 1fr;
  }

  .score-card,
  .analysis-panel {
    border: 1px solid #ccd3e0;
    background: #fff;
    box-shadow: none;
    page-break-inside: avoid;
  }
}
