:root {
  --adq-ink: #172331;
  --adq-muted: #667177;
  --adq-soft: #f7f1e9;
  --adq-paper: rgba(255, 252, 247, 0.92);
  --adq-line: rgba(23, 35, 49, 0.12);
  --adq-deep: #203447;
  --adq-accent: #6f9f91;
  --adq-accent-2: #dfaa8b;
  --adq-mood-a: #f7f1e9;
  --adq-mood-b: #e8f1ec;
  --adq-radius: 8px;
  --adq-shadow: 0 24px 70px rgba(32, 52, 71, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--adq-mood-a);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--adq-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(135deg, var(--adq-mood-a) 0%, var(--adq-mood-b) 52%, #fffaf3 100%);
  transition: background 700ms ease;
}

button,
input,
a {
  font: inherit;
}

button {
  border: 0;
}

.adq-page-shell {
  min-height: 100svh;
  padding: clamp(12px, 2vw, 26px);
}

.adq {
  --adq-local-a: var(--adq-mood-a);
  --adq-local-b: var(--adq-mood-b);
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  width: min(1180px, 100%);
  min-height: calc(100svh - clamp(24px, 4vw, 52px));
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.48)),
    linear-gradient(135deg, var(--adq-local-a), var(--adq-local-b));
  box-shadow: var(--adq-shadow);
  transition: background 700ms ease;
}

.adq * {
  box-sizing: border-box;
}

.adq-brand-rail {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(18px, 3vw, 30px);
  border-right: 1px solid var(--adq-line);
  background: rgba(255, 252, 247, 0.56);
  backdrop-filter: blur(18px);
}

.adq-logo-lockup {
  display: grid;
  gap: 8px;
}

.adq-logo-mark {
  color: var(--adq-deep);
  font-size: clamp(1.28rem, 2vw, 1.76rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-transform: lowercase;
}

.adq-logo-sub,
.adq-rail-note,
.adq-kicker,
.adq-step-count,
.adq-meta,
.adq-field-note {
  color: var(--adq-muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.adq-logo-sub,
.adq-kicker,
.adq-step-count {
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.adq-rail-line {
  width: 1px;
  min-height: 160px;
  margin: auto 0;
  background: linear-gradient(180deg, transparent, var(--adq-accent), var(--adq-accent-2), transparent);
}

.adq-rail-note {
  max-width: 145px;
  margin: 0;
}

.adq-experience {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 0.62fr) minmax(0, 1fr);
  min-height: inherit;
}

.adq-visual-panel {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(32, 52, 71, 0.12), rgba(32, 52, 71, 0.54)),
    linear-gradient(135deg, rgba(247, 241, 233, 0.24), rgba(111, 159, 145, 0.28)),
    var(--adq-visual-image, url("assets/sleep-hero.png"));
  background-position: center;
  background-size: cover;
  filter: saturate(0.92) contrast(0.96);
  transition: filter 700ms ease, opacity 700ms ease;
  animation: adqVisualBreathe 12s ease-in-out infinite alternate;
}

.adq-visual-panel::after {
  position: absolute;
  inset: auto 22px 22px 22px;
  height: 132px;
  border: 1px solid rgba(255, 252, 247, 0.34);
  border-radius: var(--adq-radius);
  background:
    linear-gradient(135deg, rgba(255, 252, 247, 0.28), rgba(255, 252, 247, 0.08)),
    linear-gradient(135deg, rgba(111, 159, 145, 0.2), rgba(223, 170, 139, 0.16));
  backdrop-filter: blur(14px);
  content: "";
}

.adq-stage {
  display: flex;
  min-height: inherit;
  padding: clamp(18px, 4vw, 48px);
}

.adq-view {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  animation: adqIn 460ms ease both;
}

.adq-view-result {
  justify-content: flex-start;
}

.adq-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: clamp(28px, 6vw, 54px);
}

.adq-progress {
  flex: 1;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(23, 35, 49, 0.1);
}

.adq-progress span {
  display: block;
  width: var(--adq-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--adq-accent), var(--adq-accent-2));
  transition: width 360ms ease;
}

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

.adq h1 {
  max-width: 720px;
  margin-bottom: 22px;
  color: var(--adq-deep);
  font-size: clamp(2.45rem, 7vw, 5.8rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.adq h2 {
  max-width: 760px;
  margin-bottom: 18px;
  color: var(--adq-deep);
  font-size: clamp(2rem, 5.8vw, 4.35rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.adq h3 {
  margin-bottom: 10px;
  color: var(--adq-deep);
  font-size: 1rem;
  line-height: 1.35;
}

.adq-copy {
  max-width: 650px;
  margin-bottom: 28px;
  color: #4f5e65;
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.75;
}

.adq-copy strong {
  color: var(--adq-deep);
}

.adq-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 30px;
  padding: 0;
  list-style: none;
}

.adq-meta-row li {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(32, 52, 71, 0.12);
  border-radius: 999px;
  color: #465861;
  font-size: 0.82rem;
  font-weight: 800;
  background: rgba(255, 252, 247, 0.62);
}

.adq-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.adq-button,
.adq-answer,
.adq-back {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.adq-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 22px;
  border-radius: var(--adq-radius);
  color: #fffaf7;
  font-weight: 900;
  text-decoration: none;
  background: var(--adq-deep);
  box-shadow: 0 16px 36px rgba(32, 52, 71, 0.2);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.adq-button:hover {
  transform: translateY(-2px);
  background: #16293a;
  box-shadow: 0 20px 44px rgba(32, 52, 71, 0.24);
}

.adq-button:active,
.adq-answer:active,
.adq-back:active {
  transform: scale(0.985);
}

.adq-button-secondary {
  color: var(--adq-deep);
  background: rgba(255, 252, 247, 0.72);
  box-shadow: none;
}

.adq-button-secondary:hover {
  background: #fffaf7;
}

.adq-back {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(32, 52, 71, 0.1);
  border-radius: 50%;
  color: var(--adq-deep);
  background: rgba(255, 252, 247, 0.68);
  transition: transform 180ms ease, background 180ms ease;
}

.adq-back:hover {
  background: #fffaf7;
}

.adq-question-hint {
  max-width: 620px;
  min-height: 54px;
  margin-bottom: 26px;
  color: var(--adq-muted);
  font-size: 0.98rem;
  line-height: 1.65;
}

.adq-answers {
  display: grid;
  gap: 12px;
}

.adq-answer {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 74px;
  padding: 16px;
  border: 1px solid rgba(32, 52, 71, 0.1);
  border-radius: var(--adq-radius);
  color: var(--adq-ink);
  text-align: left;
  background: var(--adq-paper);
  box-shadow: 0 14px 34px rgba(32, 52, 71, 0.07);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.adq-answer:hover,
.adq-answer.is-selected {
  border-color: color-mix(in srgb, var(--adq-accent), #172331 14%);
  background: #fffdf8;
  transform: translateY(-2px);
}

.adq-answer-index {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: var(--adq-deep);
  font-size: 0.82rem;
  font-weight: 900;
  background: linear-gradient(135deg, rgba(111, 159, 145, 0.2), rgba(223, 170, 139, 0.18));
}

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

.adq-answer strong {
  color: var(--adq-deep);
  font-size: 0.99rem;
  line-height: 1.3;
}

.adq-answer span {
  margin-top: 4px;
  color: var(--adq-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.adq-gate-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 0.72fr);
  gap: 18px;
  align-items: start;
}

.adq-insight-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.adq-insight-list li,
.adq-form,
.adq-result-block,
.adq-score-card,
.adq-dimension,
.adq-memory-card,
.adq-signal-card,
.adq-dashboard,
.adq-trend-card {
  border: 1px solid rgba(32, 52, 71, 0.1);
  border-radius: var(--adq-radius);
  background: var(--adq-paper);
  box-shadow: 0 16px 40px rgba(32, 52, 71, 0.08);
}

.adq-memory-card {
  max-width: 640px;
  margin: 0 0 26px;
  padding: 16px;
}

.adq-memory-label,
.adq-dashboard-label {
  display: block;
  margin-bottom: 7px;
  color: var(--adq-muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-transform: uppercase;
}

.adq-memory-card strong {
  display: block;
  color: var(--adq-deep);
  font-size: 1.05rem;
  line-height: 1.35;
}

.adq-memory-card p,
.adq-signal-card p,
.adq-trend-card p {
  margin: 8px 0 0;
  color: #526268;
  font-size: 0.9rem;
  line-height: 1.55;
}

.adq-insight-list li {
  padding: 15px;
  color: #4d5d64;
  line-height: 1.55;
}

.adq-form {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.adq-field {
  display: grid;
  gap: 6px;
}

.adq-field label {
  color: var(--adq-deep);
  font-size: 0.8rem;
  font-weight: 900;
}

.adq-field input {
  width: 100%;
  min-height: 50px;
  padding: 0 13px;
  border: 1px solid rgba(32, 52, 71, 0.16);
  border-radius: var(--adq-radius);
  color: var(--adq-ink);
  background: #fffdf8;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.adq-field input:focus {
  border-color: var(--adq-accent);
  box-shadow: 0 0 0 4px rgba(111, 159, 145, 0.16);
}

.adq-checkbox {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 9px;
  align-items: start;
  color: var(--adq-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.adq-checkbox input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--adq-accent);
}

.adq-form-message {
  min-height: 18px;
  margin: 0;
  color: #a04b38;
  font-size: 0.82rem;
  line-height: 1.4;
}

.adq-analysis-wrap {
  width: min(100%, 760px);
}

.adq-breath-orb {
  width: clamp(92px, 18vw, 142px);
  aspect-ratio: 1;
  margin: 0 0 30px;
  border: 1px solid rgba(32, 52, 71, 0.1);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 252, 247, 0.78) 0 34%, transparent 35%),
    conic-gradient(from 160deg, rgba(111, 159, 145, 0.12), rgba(223, 170, 139, 0.2), rgba(111, 159, 145, 0.12));
  box-shadow: 0 24px 70px rgba(32, 52, 71, 0.12);
  animation: adqBreathe 4.8s ease-in-out infinite;
}

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

.adq-signal-card {
  min-height: 142px;
  padding: 16px;
}

.adq-signal-card span {
  display: block;
  color: var(--adq-muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.adq-signal-card strong {
  display: block;
  margin-top: 10px;
  color: var(--adq-deep);
  font-size: clamp(2rem, 5vw, 3.15rem);
  line-height: 0.95;
}

.adq-result-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.48fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.adq-score-card {
  padding: 18px;
}

.adq-score-number {
  display: block;
  color: var(--adq-deep);
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 950;
  line-height: 0.95;
}

.adq-score-label {
  display: block;
  margin-top: 10px;
  color: var(--adq-muted);
  font-size: 0.85rem;
  font-weight: 900;
}

.adq-severity {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin-top: 14px;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--adq-deep);
  font-size: 0.78rem;
  font-weight: 900;
  background: linear-gradient(135deg, rgba(111, 159, 145, 0.2), rgba(223, 170, 139, 0.18));
}

.adq-trend-card {
  margin-top: 14px;
  padding: 13px;
  box-shadow: none;
}

.adq-trend-card span {
  display: block;
  color: var(--adq-muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.adq-trend-card strong {
  display: block;
  margin-top: 7px;
  color: var(--adq-deep);
  font-size: 1.05rem;
  line-height: 1.25;
}

.adq-dimensions {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}

.adq-dimension {
  padding: 12px;
  box-shadow: none;
}

.adq-dimension-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--adq-deep);
  font-size: 0.82rem;
  font-weight: 900;
}

.adq-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(32, 52, 71, 0.1);
}

.adq-bar span {
  display: block;
  width: var(--adq-bar-value, 0%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--adq-accent), var(--adq-accent-2));
}

.adq-result-block {
  padding: 17px;
}

.adq-result-block + .adq-result-block {
  margin-top: 12px;
}

.adq-result-block p {
  margin-bottom: 0;
  color: #526268;
  line-height: 1.65;
}

.adq-dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 12px;
  padding: 0;
}

.adq-dashboard > div {
  min-height: 112px;
  padding: 16px;
  background: rgba(255, 252, 247, 0.44);
}

.adq-dashboard strong {
  display: block;
  color: var(--adq-deep);
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  line-height: 1;
}

.adq-checkin-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.adq-checkin-button {
  display: grid;
  min-height: 44px;
  place-items: center;
  border: 1px solid rgba(32, 52, 71, 0.1);
  border-radius: var(--adq-radius);
  color: var(--adq-deep);
  font-weight: 900;
  background: rgba(255, 252, 247, 0.78);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.adq-checkin-button:hover,
.adq-checkin-button.is-active {
  border-color: rgba(32, 52, 71, 0.18);
  background: linear-gradient(135deg, rgba(111, 159, 145, 0.2), rgba(223, 170, 139, 0.16));
  transform: translateY(-1px);
}

.adq-axis-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.adq-axis-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  color: #526268;
  line-height: 1.5;
}

.adq-axis-list li::before {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: #fffaf7;
  font-size: 0.78rem;
  font-weight: 900;
  background: var(--adq-accent);
  content: counter(axis);
}

.adq-axis-list {
  counter-reset: axis;
}

.adq-axis-list li {
  counter-increment: axis;
}

.adq-disclaimer {
  margin: 16px 0 0;
  color: var(--adq-muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.adq-final-actions {
  margin-top: 16px;
}

@media (max-width: 960px) {
  .adq {
    grid-template-columns: 1fr;
  }

  .adq-brand-rail {
    flex-direction: row;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid var(--adq-line);
  }

  .adq-rail-line {
    display: none;
  }

  .adq-rail-note {
    max-width: 240px;
    text-align: right;
  }

  .adq-experience {
    grid-template-columns: 1fr;
  }

  .adq-visual-panel {
    min-height: 190px;
  }

  .adq-visual-panel::after {
    display: none;
  }
}

@media (max-width: 720px) {
  .adq-page-shell {
    padding: 0;
  }

  .adq {
    min-height: 100svh;
    border: 0;
    border-radius: 0;
  }

  .adq-brand-rail {
    padding: 16px;
  }

  .adq-rail-note {
    display: none;
  }

  .adq-stage {
    padding: 22px 16px 28px;
  }

  .adq-topline {
    margin-bottom: 28px;
  }

  .adq h1 {
    font-size: clamp(2.35rem, 13vw, 4rem);
  }

  .adq h2 {
    font-size: clamp(1.95rem, 10vw, 3.2rem);
  }

  .adq-gate-grid,
  .adq-result-grid,
  .adq-signal-grid,
  .adq-dashboard {
    grid-template-columns: 1fr;
  }

  .adq-actions,
  .adq-button {
    width: 100%;
  }

  .adq-button {
    min-height: 54px;
  }
}

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

@keyframes adqIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes adqBreathe {
  0%,
  100% {
    opacity: 0.72;
    transform: scale(0.92);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes adqVisualBreathe {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.035);
  }
}
