:root {
  --ink: #11110f;
  --paper: #fffaf0;
  --paper-soft: #f5ead4;
  --white: #f8f6ef;
  --muted: rgba(255, 255, 255, 0.68);
  --line: rgba(255, 255, 255, 0.22);
  --glass: rgba(18, 18, 15, 0.48);
  --glass-strong: rgba(18, 18, 15, 0.7);
  --coral: #ff6b57;
  --lime: #d7ff4f;
  --mint: #70f0c6;
  --rose: #ff9cb3;
  --sky: #91d8ff;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--white);
  font-family:
    "Arial Rounded MT Bold", "Trebuchet MS", "PingFang SC", "Microsoft YaHei",
    system-ui, sans-serif;
  letter-spacing: 0;
}

button,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.34;
  mix-blend-mode: multiply;
  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='0.9' numOctaves='3' seed='8' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E");
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 82px;
  padding: 0 clamp(18px, 5vw, 68px);
}

.brand,
.ghost-link {
  color: var(--white);
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 18px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  font-size: 13px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ghost-link {
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.glass-button,
.icon-button,
.nav-button,
.record-button {
  border: 0;
  transition:
    transform 180ms ease,
    background 180ms ease,
    color 180ms ease,
    opacity 180ms ease;
}

.glass-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    0 12px 26px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(20px);
  font-weight: 900;
}

.glass-button:hover,
.record-button:hover,
.nav-button:hover:not(:disabled),
.icon-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.glass-button.light {
  background: var(--white);
  color: var(--ink);
}

.hero {
  position: relative;
  min-height: 100svh;
  overflow-x: hidden;
  overflow-y: visible;
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-image {
  background-image: url("assets/voice-hero.jpg");
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
}

.hero-shade {
  background:
    radial-gradient(circle at 74% 12%, rgba(255, 156, 179, 0.18), transparent 28%),
    radial-gradient(circle at 18% 22%, rgba(215, 255, 79, 0.12), transparent 30%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.58) 45%, rgba(0, 0, 0, 0.35) 100%),
    linear-gradient(0deg, rgba(17, 17, 15, 0.92) 0%, transparent 34%);
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 520px);
  align-items: center;
  gap: clamp(26px, 5vw, 76px);
  min-height: 100svh;
  padding: 104px clamp(18px, 5vw, 68px) 42px;
}

.hero-copy {
  display: grid;
  align-content: center;
  max-width: 760px;
  min-height: 520px;
}

.eyebrow,
.mini-label,
.question-axis {
  margin: 0;
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 900;
}

.eyebrow.dark {
  color: #4f6b11;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 14px 0 20px;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: clamp(64px, 8.8vw, 132px);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: 0;
  text-shadow: 0 7px 0 rgba(0, 0, 0, 0.22);
}

h1 span {
  display: block;
}

.lede {
  max-width: 650px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(17px, 1.7vw, 23px);
  line-height: 1.65;
  font-weight: 700;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.trust-row span {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  font-size: 13px;
  font-weight: 900;
  backdrop-filter: blur(18px);
}

.quiz-shell {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: min(720px, calc(100svh - 150px));
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 26px;
  padding: clamp(18px, 2vw, 26px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06)),
    var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(26px);
}

.quiz-topline,
.quiz-nav,
.result-actions,
.recorder-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.step-count {
  margin: 4px 0 0;
  color: var(--white);
  font-size: 20px;
  font-weight: 900;
}

.progress-dots {
  display: flex;
  align-items: center;
  gap: 7px;
}

.progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.progress-dot.is-active {
  width: 28px;
  border-radius: 999px;
  background: var(--lime);
}

.progress-dot.is-done {
  background: var(--mint);
}

.question-view,
.result-view {
  padding-top: clamp(18px, 4svh, 34px);
}

.question-view h2 {
  min-height: 3.7em;
  margin: 10px 0 10px;
  color: var(--white);
  font-size: clamp(25px, 3.2vw, 40px);
  line-height: 1.15;
  letter-spacing: 0;
}

.question-prompt {
  min-height: 3.2em;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 15px;
  line-height: 1.6;
}

.voice-pad {
  position: relative;
  overflow: hidden;
  height: 164px;
  border-radius: 20px;
  background:
    linear-gradient(90deg, rgba(255, 107, 87, 0.2), rgba(112, 240, 198, 0.16)),
    rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.voice-pad canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.record-status {
  position: absolute;
  left: 14px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.34);
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(12px);
}

.recorder-actions {
  margin-top: 16px;
}

.record-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  width: min(100%, 275px);
  min-height: 54px;
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
  font-size: 16px;
  font-weight: 900;
}

.record-button.is-recording {
  background: var(--coral);
  color: #fff;
}

.record-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 5px rgba(255, 107, 87, 0.18);
}

.record-button.is-recording .record-icon {
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.18);
}

.icon-button,
.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  font-weight: 900;
}

.icon-button:disabled,
.nav-button:disabled {
  opacity: 0.42;
}

.icon-button.light {
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
}

.note-field {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 900;
}

.note-field textarea {
  width: 100%;
  min-height: 76px;
  resize: vertical;
  border: 0;
  border-radius: 17px;
  padding: 13px 14px;
  outline: none;
  background: rgba(0, 0, 0, 0.28);
  color: var(--white);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  line-height: 1.5;
}

.note-field textarea:focus {
  box-shadow:
    inset 0 0 0 1px var(--lime),
    0 0 0 3px rgba(215, 255, 79, 0.18);
}

audio {
  width: 100%;
  margin-top: 12px;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.metric-strip div {
  min-width: 0;
  border-radius: 16px;
  padding: 11px 10px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.metric-strip span,
.confidence-ring small {
  display: block;
  color: rgba(255, 255, 255, 0.58);
  font-size: 11px;
  font-weight: 900;
}

.metric-strip strong {
  display: block;
  margin-top: 4px;
  color: var(--white);
  font-size: clamp(14px, 2vw, 20px);
}

.quiz-nav {
  padding-top: 18px;
}

.nav-button {
  min-width: 106px;
}

.nav-button.primary {
  background: var(--lime);
  color: var(--ink);
  box-shadow: none;
}

.nav-button.primary:disabled {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.result-view {
  display: grid;
  align-content: start;
  gap: 14px;
}

.result-view[hidden] {
  display: none;
}

.result-view h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  color: var(--lime);
  font-size: clamp(74px, 10vw, 118px);
  line-height: 0.9;
  letter-spacing: 0;
}

.type-name {
  margin: 0;
  color: var(--white);
  font-size: 24px;
  font-weight: 900;
}

.result-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.65;
}

.confidence-ring {
  display: grid;
  place-items: center;
  justify-self: start;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(0, 0, 0, 0.42) 55%, transparent 56%),
    conic-gradient(var(--lime) var(--score, 64%), rgba(255, 255, 255, 0.14) 0);
}

.confidence-ring span {
  font-size: 28px;
  font-weight: 900;
}

.axis-list {
  display: grid;
  gap: 12px;
  margin: 6px 0;
}

.axis-row {
  display: grid;
  grid-template-columns: 28px 1fr 28px;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 900;
}

.axis-track {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.axis-track::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: rgba(255, 255, 255, 0.45);
}

.axis-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--axis-width);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--rose), var(--lime), var(--mint));
}

.result-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 6px;
}

.signal-band {
  position: relative;
  background: var(--paper);
  color: var(--ink);
}

.signal-band::before {
  content: "";
  position: absolute;
  top: -16px;
  left: 0;
  right: 0;
  height: 32px;
  background:
    linear-gradient(135deg, transparent 12px, var(--paper) 0) top left / 24px 32px repeat-x,
    linear-gradient(225deg, transparent 12px, var(--paper) 0) top right / 24px 32px repeat-x;
}

.section-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(24px, 5vw, 58px);
  max-width: 1180px;
  margin: 0 auto;
  padding: 86px clamp(18px, 5vw, 46px) 78px;
}

.section-inner h2 {
  margin: 12px 0 0;
  max-width: 520px;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: clamp(34px, 4.8vw, 72px);
  line-height: 0.98;
  letter-spacing: 0;
}

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

.signal-grid article {
  min-height: 230px;
  border-radius: 22px;
  padding: 22px;
  background: #fff4cf;
  box-shadow: inset 0 0 0 1px rgba(17, 17, 15, 0.08);
}

.signal-grid article:nth-child(2) {
  background: #dcfbec;
}

.signal-grid article:nth-child(3) {
  background: #ffe1e7;
}

.signal-grid span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  font-size: 13px;
  font-weight: 900;
}

.signal-grid h3 {
  margin: 26px 0 10px;
  font-size: 24px;
}

.signal-grid p {
  margin: 0;
  color: rgba(17, 17, 15, 0.68);
  line-height: 1.65;
}

@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    padding-top: 96px;
  }

  .hero-copy {
    min-height: auto;
    padding-top: 20px;
  }

  .quiz-shell {
    min-height: 690px;
  }

  .section-inner,
  .signal-grid {
    grid-template-columns: 1fr;
  }

  .signal-grid article {
    min-height: 170px;
  }
}

@media (max-width: 620px) {
  .site-header {
    height: 72px;
    padding: 0 16px;
  }

  .ghost-link {
    display: none;
  }

  .hero-grid {
    padding: 82px 14px 28px;
  }

  h1 {
    font-size: clamp(58px, 19vw, 88px);
  }

  .lede {
    font-size: 15px;
  }

  .trust-row span {
    min-height: 32px;
    font-size: 12px;
  }

  .quiz-shell {
    min-height: 720px;
    border-radius: 22px;
  }

  .question-view h2 {
    min-height: 4.8em;
    font-size: 25px;
  }

  .question-prompt {
    min-height: 4.8em;
  }

  .recorder-actions,
  .quiz-nav {
    align-items: stretch;
    flex-direction: column;
  }

  .record-button,
  .icon-button,
  .nav-button {
    width: 100%;
  }

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

  .result-view h2 {
    font-size: 72px;
  }

  .axis-row {
    grid-template-columns: 22px 1fr 22px;
    gap: 8px;
  }
}

@media (max-height: 760px) and (min-width: 981px) {
  .hero-grid {
    padding-top: 88px;
    padding-bottom: 28px;
  }

  .hero-copy {
    min-height: 460px;
  }

  h1 {
    font-size: clamp(64px, 7.8vw, 112px);
  }

  .quiz-shell {
    padding: 18px;
  }

  .question-view {
    padding-top: 18px;
  }

  .voice-pad {
    height: 132px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
