/* Mattress Finder Quiz — scoped to the custom page template. */
.dr-mattress-finder-page {
	min-height: 70vh;
	background:
		radial-gradient(circle at 14% 12%, rgba(255, 255, 255, 0.82) 0, rgba(255, 255, 255, 0) 20%),
		radial-gradient(circle at 88% 18%, rgba(255, 255, 255, 0.56) 0, rgba(255, 255, 255, 0) 24%),
		linear-gradient(180deg, #fbf8f1 0%, #f0e6d6 100%);
}

.dr-mattress-finder-page,
.dr-mattress-finder-page * {
	-webkit-tap-highlight-color: transparent;
}

.mattress-finder-container {
	width: min(1180px, calc(100% - 40px));
	margin-inline: auto;
}

.dr-mattress-finder-page h1,
.dr-mattress-finder-page h2,
.dr-mattress-finder-page h3,
.dr-mattress-finder-page p,
.dr-mattress-finder-page ul {
	margin: 0;
	padding: 0;
}

.dr-mattress-finder-page fieldset {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.dr-mattress-finder-page button {
	border: 0;
}

.dr-mattress-finder-page a {
	text-decoration: none;
}

.dr-mattress-finder-page{
  padding:calc(var(--announce-height) + 88px + 36px) 0 56px;
}

.quiz-hero{
  margin-bottom:28px;
}

.quiz-hero-card{
  position:relative;
  overflow:hidden;
  padding:44px clamp(24px,5vw,56px) 38px;
  border:1px solid rgba(184,155,104,.18);
  border-radius:32px;
  background:
    radial-gradient(circle at 88% 24%,rgba(255,255,255,.56) 0,rgba(255,255,255,0) 22%),
    linear-gradient(160deg,rgba(255,255,255,.86) 0%,rgba(248,246,241,.98) 44%,rgba(239,232,214,.96) 100%);
  box-shadow:0 28px 60px rgba(86,67,36,.08);
}

.quiz-hero-card::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(135deg,rgba(79,114,150,.08) 0,transparent 28%),
    radial-gradient(circle at 75% 25%,rgba(201,178,140,.16) 0,transparent 25%);
  pointer-events:none;
}

.quiz-kicker{
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:10px;
  margin-bottom:16px;
  color:var(--blue);
  letter-spacing:.18em;
  font-size:10px;
  text-transform:uppercase;
}

.quiz-kicker::before{
  content:"";
  width:24px;
  height:1px;
  background:currentColor;
}

.quiz-title{
  position:relative;
  font-family:var(--serif);
  font-size:clamp(48px,7vw,88px);
  font-weight:300;
  line-height:.96;
  letter-spacing:-.03em;
  color:var(--dark);
  margin-bottom:16px;
}

.quiz-title em{
  display:block;
  font-style:italic;
  color:var(--blue2);
}

.quiz-sub{
  position:relative;
  max-width:760px;
  font-size:18px;
  line-height:1.8;
  color:rgba(26,26,24,.68);
}

.quiz-meta{
  position:relative;
  margin-top:22px;
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}

.quiz-pill{
  padding:10px 14px;
  border:1px solid rgba(184,155,104,.18);
  border-radius:999px;
  background:rgba(255,255,255,.64);
  font-size:11px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:rgba(47,42,34,.72);
}

.quiz-shell{
  display:grid;
  grid-template-columns:minmax(0,1.2fr) minmax(300px,.8fr);
  gap:22px;
  align-items:start;
}

.quiz-panel,
.result-panel{
  border:1px solid rgba(184,155,104,.16);
  border-radius:28px;
  background:rgba(255,255,255,.74);
  box-shadow:0 18px 40px rgba(92,72,40,.07);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}

.quiz-panel{
  padding:32px clamp(20px,4vw,36px) 34px;
}

.quiz-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:26px;
}

.quiz-head h2{
  font-family:var(--serif);
  font-size:40px;
  font-weight:300;
  line-height:1;
  color:var(--dark);
}

.quiz-head p{
  margin-top:8px;
  color:rgba(26,26,24,.58);
  font-size:14px;
  line-height:1.8;
}

.quiz-progress{
  min-width:108px;
  text-align:right;
}

.quiz-progress-label{
  display:block;
  margin-bottom:10px;
  font-size:11px;
  color:var(--muted);
  letter-spacing:.14em;
  text-transform:uppercase;
}

.quiz-progress-bar{
  width:100%;
  height:7px;
  overflow:hidden;
  border-radius:999px;
  background:rgba(201,178,140,.22);
}

.quiz-progress-fill{
  height:100%;
  width:0;
  border-radius:999px;
  background:linear-gradient(90deg,var(--blue),var(--blue3));
  transition:width .25s var(--ease);
}

.quiz-form{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.question-card{
  padding:22px;
  border:1px solid rgba(184,155,104,.16);
  border-radius:24px;
  background:linear-gradient(180deg,rgba(255,255,255,.82) 0%,rgba(248,246,241,.78) 100%);
}

.question-top{
  display:flex;
  align-items:flex-start;
  gap:14px;
  margin-bottom:16px;
}

.question-num{
  width:34px;
  height:34px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  font-size:12px;
  font-weight:600;
  color:#fff;
  background:var(--blue);
  box-shadow:0 10px 20px rgba(79,114,150,.18);
}

.question-title{
  font-size:28px;
  font-family:var(--serif);
  font-weight:300;
  line-height:1.08;
  color:var(--dark);
}

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

.option-card{
  position:relative;
  display:block;
}

.option-card input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}

.option-card span{
  min-height:74px;
  display:flex;
  align-items:center;
  padding:18px 18px 18px 20px;
  border-radius:20px;
  border:1px solid rgba(184,155,104,.18);
  background:#fff;
  color:rgba(26,26,24,.78);
  line-height:1.5;
  transition:transform .22s var(--ease), border-color .22s var(--ease), box-shadow .22s var(--ease), background .22s var(--ease), color .22s var(--ease);
}

.option-card:hover span{
  transform:translateY(-2px);
  border-color:rgba(79,114,150,.34);
  box-shadow:0 14px 28px rgba(70,84,104,.08);
}

.option-card input:checked + span{
  border-color:var(--blue);
  color:var(--dark);
  background:linear-gradient(180deg,rgba(79,114,150,.12) 0%,rgba(255,255,255,1) 100%);
  box-shadow:0 0 0 3px rgba(79,114,150,.12);
}

.quiz-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  margin-top:6px;
}

.quiz-message{
  font-size:13px;
  line-height:1.7;
  color:rgba(47,42,34,.58);
}

.quiz-btn,
.quiz-btn-ghost{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:15px 24px;
  border-radius:999px;
  letter-spacing:.14em;
  text-transform:uppercase;
  font-size:11px;
}

.quiz-btn{
  background:var(--blue);
  color:#fff;
  box-shadow:0 14px 26px rgba(79,114,150,.2);
}

.quiz-btn-ghost{
  border:1px solid rgba(184,155,104,.2);
  background:rgba(255,255,255,.6);
  color:rgba(47,42,34,.72);
}

.result-panel{
  padding:30px 24px;
  position:sticky;
  top:102px;
}

.result-panel.is-empty{
  display:flex;
  flex-direction:column;
  justify-content:center;
  min-height:580px;
}

.result-empty-mark{
  width:68px;
  height:68px;
  margin-bottom:18px;
  border-radius:24px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(160deg,rgba(79,114,150,.16) 0%,rgba(201,178,140,.18) 100%);
}

.result-empty-mark svg{
  width:30px;
  height:30px;
  stroke:var(--blue2);
  fill:none;
  stroke-width:1.5;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.result-eyebrow{
  color:var(--blue);
  font-size:11px;
  letter-spacing:.18em;
  text-transform:uppercase;
  margin-bottom:12px;
}

.result-title{
  font-family:var(--serif);
  font-size:40px;
  font-weight:300;
  line-height:1.02;
  color:var(--dark);
  margin-bottom:12px;
}

.result-body{
  color:rgba(26,26,24,.64);
  line-height:1.85;
  font-size:14px;
}

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

.result-tag{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-bottom:16px;
  padding:9px 12px;
  border-radius:999px;
  background:rgba(79,114,150,.12);
  color:var(--blue2);
  font-size:10px;
  letter-spacing:.16em;
  text-transform:uppercase;
}

.result-product{
  font-family:var(--serif);
  font-size:46px;
  font-weight:300;
  line-height:.96;
  color:var(--dark);
  margin-bottom:8px;
}

.result-feel{
  color:rgba(47,42,34,.66);
  font-size:15px;
  margin-bottom:18px;
}

.result-desc{
  color:rgba(26,26,24,.68);
  font-size:14px;
  line-height:1.85;
  margin-bottom:18px;
}

.result-list{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-bottom:20px;
}

.result-list li{
  list-style:none;
  position:relative;
  padding-left:16px;
  color:rgba(47,42,34,.72);
  font-size:13px;
  line-height:1.7;
}

.result-list li::before{
  content:"";
  position:absolute;
  left:0;
  top:8px;
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--blue);
}

.result-summary-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin-bottom:20px;
}

.result-summary-cell{
  padding:14px 12px;
  border-radius:18px;
  background:rgba(255,255,255,.82);
  border:1px solid rgba(184,155,104,.14);
}

.result-summary-label{
  display:block;
  margin-bottom:6px;
  font-size:10px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--muted);
}

.result-summary-value{
  font-size:15px;
  color:var(--dark);
}

.result-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:24px;
}

.result-btn,
.result-btn-ghost{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:14px 20px;
  border-radius:999px;
  font-size:11px;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.result-btn{
  background:var(--blue);
  color:#fff;
}

.result-btn-ghost{
  border:1px solid rgba(184,155,104,.2);
  background:rgba(255,255,255,.72);
  color:rgba(47,42,34,.74);
}

.runner-section{
  padding-top:22px;
  border-top:1px solid rgba(184,155,104,.14);
}

.runner-heading{
  margin-bottom:14px;
  font-size:11px;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--muted);
}

.runner-grid{
  display:grid;
  gap:12px;
}

.runner-card{
  padding:16px;
  border-radius:20px;
  border:1px solid rgba(184,155,104,.14);
  background:rgba(255,255,255,.8);
}

.runner-card strong{
  display:block;
  margin-bottom:4px;
  font-size:18px;
  font-family:var(--serif);
  font-weight:400;
  color:var(--dark);
}

.runner-card p{
  color:rgba(47,42,34,.62);
  font-size:13px;
  line-height:1.6;
}

.runner-meter{
  margin-top:10px;
  height:6px;
  overflow:hidden;
  border-radius:999px;
  background:rgba(201,178,140,.2);
}

.runner-meter span{
  display:block;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,var(--blue3),var(--wood));
}

@media (max-width: 1023px){
  .quiz-shell{
    grid-template-columns:1fr;
  }

  .result-panel{
    position:static;
  }
}

@media (max-width: 767px){
  .mattress-finder-container{
    width:min(100%,calc(100% - 28px));
  }

  .dr-mattress-finder-page{
    padding:calc(var(--announce-height) + 78px + 24px) 0 44px;
  }

  .quiz-hero-card{
    padding:34px 20px 28px;
    border-radius:28px;
  }

  .quiz-title{
    font-size:54px;
  }

  .quiz-sub{
    font-size:15px;
  }

  .quiz-head{
    flex-direction:column;
  }

  .quiz-progress{
    width:100%;
    text-align:left;
  }

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

  .question-title{
    font-size:24px;
  }

  .result-summary-grid{
    grid-template-columns:1fr;
  }

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


.quiz-action-buttons {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 10px;
}

.quiz-btn,
.quiz-btn-ghost,
.result-btn,
.result-btn-ghost,
.runner-card {
	transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), border-color 180ms var(--ease), background 180ms var(--ease);
}

.quiz-btn:hover,
.result-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 16px 30px rgba(79, 114, 150, 0.22);
}

.quiz-btn-ghost:hover,
.result-btn-ghost:hover,
.runner-card:hover {
	transform: translateY(-1px);
	border-color: rgba(79, 114, 150, 0.34);
	background: rgba(255, 255, 255, 0.92);
}

.option-card input:focus-visible + span,
.quiz-btn:focus-visible,
.quiz-btn-ghost:focus-visible,
.result-btn:focus-visible,
.result-btn-ghost:focus-visible,
.runner-card:focus-visible {
	outline: 2px solid var(--blue);
	outline-offset: 3px;
}

.result-panel:focus {
	outline: none;
}

.runner-card {
	display: block;
	color: inherit;
}

.runner-card-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.runner-card-label {
	color: var(--blue2);
	font-size: 10px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.mattress-finder-noscript {
	margin-top: 22px;
	padding: 20px;
	border: 1px solid rgba(184, 155, 104, 0.16);
	border-radius: 20px;
	background: rgba(255, 255, 255, 0.72);
	color: rgba(47, 42, 34, 0.72);
	font-size: 14px;
	line-height: 1.7;
}

.mattress-finder-noscript a {
	color: var(--blue2);
	text-decoration: underline;
	text-underline-offset: 3px;
}

@media (max-width: 767px) {
	.quiz-action-buttons {
		width: 100%;
		flex-direction: column;
	}

	.quiz-action-buttons > * {
		width: 100%;
	}

	.result-actions > * {
		flex: 1 1 100%;
	}
}

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