:root {
  color-scheme: light;
  --ink: #2f2a24;
  --muted: #71685f;
  --forest: #40573d;
  --forest-dark: #2e442d;
  --sage: #dfe8d9;
  --cream: #fbf7ef;
  --paper: #ffffff;
  --line: #e7ddcf;
  --gold: #c58a1a;
  --gold-soft: #fff2d4;
  --rust: #a94d32;
  --danger-soft: #fff2ee;
  --shadow: 0 16px 42px rgba(65, 48, 28, 0.1);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 0;
  background: transparent;
  color: var(--ink);
}

body {
  padding: 8px;
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

button,
summary,
label,
select {
  -webkit-tap-highlight-color: transparent;
}

.gge-shell {
  width: 100%;
  max-width: 760px;
  min-width: 0;
  margin: 0 auto;
}

.meter-card {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 8% 0%, rgba(197, 138, 26, 0.09), transparent 30%),
    var(--cream);
  box-shadow: var(--shadow);
}

.meter-header {
  padding: clamp(24px, 6vw, 44px) clamp(18px, 6vw, 42px) 24px;
  text-align: center;
}

.eyebrow,
.section-kicker {
  margin: 0 0 7px;
  color: #96640c;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.3;
  text-transform: uppercase;
}

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

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
}

.meter-header h1 {
  margin: 0;
  font-size: clamp(2.35rem, 10vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.intro {
  max-width: 590px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 3.5vw, 1.08rem);
  line-height: 1.55;
}

.product-panel,
.tab-panel {
  margin: 0 clamp(12px, 4vw, 28px) 22px;
  min-width: 0;
  padding: clamp(18px, 5vw, 30px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.93);
}

.product-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.product-heading > div {
  min-width: 0;
}

.product-heading h2,
.panel-heading h2 {
  margin: 0;
  font-size: clamp(1.45rem, 5.5vw, 2rem);
  line-height: 1.12;
}

.size-pill {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid #d8c7a7;
  border-radius: 999px;
  background: #fffaf0;
  color: #6f521c;
  font-size: 0.79rem;
  font-weight: 750;
  white-space: nowrap;
}

.gauge {
  position: relative;
  margin: 46px 0 8px;
  padding-top: 10px;
}

.gauge-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  height: 24px;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 1px #d8d0c6, inset 0 1px 4px rgba(0, 0, 0, 0.12);
}

.gauge-segment {
  min-width: 0;
}

.segment-gentle {
  background: #82ae72;
}

.segment-moderate {
  background: #d2b648;
}

.segment-strong {
  background: #df8b37;
}

.segment-power {
  background: #b9563a;
}

.gauge-pointer {
  position: absolute;
  top: -30px;
  left: 0%;
  z-index: 2;
  width: 34px;
  height: 40px;
  transform: translateX(-50%);
  transition: left 800ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gauge-pointer::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 0;
  border-right: 8px solid transparent;
  border-left: 8px solid transparent;
  border-top: 11px solid var(--ink);
  transform: translateX(-50%);
}

.gauge-pointer span {
  position: absolute;
  top: 0;
  left: 50%;
  width: 28px;
  height: 28px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 4px 12px rgba(47, 42, 36, 0.28);
  transform: translateX(-50%);
}

.gauge-labels {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 8px;
  color: var(--muted);
  font-size: clamp(0.63rem, 2.5vw, 0.76rem);
  font-weight: 700;
  text-align: center;
}

.house-rating {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding: 13px 15px;
  border-radius: 13px;
  background: #f3f6f0;
  color: var(--forest-dark);
}

.house-rating span {
  font-size: 0.86rem;
  font-weight: 700;
}

.house-rating strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
}

.microcopy,
.field small,
.choice-question small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.microcopy {
  margin: 10px 0 0;
}

.meter-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 clamp(12px, 4vw, 28px) 14px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #efe8dc;
}

.tab-button {
  min-width: 0;
  min-height: 48px;
  padding: 10px 9px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #665e55;
  cursor: pointer;
  font-size: clamp(0.79rem, 3vw, 0.94rem);
  font-weight: 780;
  line-height: 1.25;
}

.tab-button.is-active {
  background: var(--paper);
  color: var(--forest-dark);
  box-shadow: 0 3px 12px rgba(56, 44, 30, 0.1);
}

.tab-button:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(197, 138, 26, 0.35);
  outline-offset: 2px;
}

.tab-panel[hidden] {
  display: none;
}

.panel-heading {
  margin-bottom: 20px;
}

.panel-heading > p:last-child {
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.compact-form,
.report-form {
  min-width: 0;
}

.field-grid {
  display: grid;
  min-width: 0;
  gap: 16px;
}

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

.full-width {
  grid-column: 1 / -1;
}

.field {
  min-width: 0;
}

.field label,
.choice-question > span {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 760;
  line-height: 1.35;
}

input,
select {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid #cfc3b5;
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
}

input::placeholder {
  color: #aaa198;
}

input:focus,
select:focus {
  border-color: var(--forest);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(64, 87, 61, 0.12);
}

.input-suffix {
  position: relative;
  min-width: 0;
}

.input-suffix input {
  padding-right: 48px;
}

.input-suffix > span {
  position: absolute;
  top: 50%;
  right: 13px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
  transform: translateY(-50%);
  pointer-events: none;
}

.field small {
  margin-top: 6px;
}

.hint-box {
  margin: 15px 0;
  padding: 12px 14px;
  border: 1px solid #dce5d8;
  border-radius: 12px;
  background: #f6f9f4;
  color: #4b5e48;
  font-size: 0.82rem;
}

.hint-box summary {
  cursor: pointer;
  font-weight: 780;
}

.hint-box ul {
  margin: 11px 0 0;
  padding-left: 20px;
  line-height: 1.48;
}

.hint-box li + li {
  margin-top: 6px;
}

.primary-button {
  display: inline-flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  margin-top: 15px;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--forest);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  line-height: 1.25;
  box-shadow: 0 7px 16px rgba(46, 68, 45, 0.18);
}

.primary-button:hover {
  background: var(--forest-dark);
}

.primary-button:disabled {
  background: #a7afa4;
  cursor: not-allowed;
  box-shadow: none;
}

.community-result {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #e2d4ba;
  border-radius: 15px;
  background: #fffaf0;
}

.community-result.has-data {
  border-color: #cbdac5;
  background: #f4f8f2;
}

.result-icon {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--gold-soft);
  font-size: 1.05rem;
}

.community-result strong {
  display: block;
  margin-top: 1px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  line-height: 1.3;
}

.community-result p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.community-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 11px;
}

.community-metrics span {
  padding: 8px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.75);
  color: #4e5f4b;
  font-size: 0.75rem;
  line-height: 1.35;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

fieldset + fieldset {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

legend {
  width: 100%;
  margin: 0 0 14px;
  padding: 0;
  color: var(--forest-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.35;
}

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

.choice-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 48px;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid #cfc3b5;
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
}

.choice-card:has(input:checked) {
  border-color: var(--forest);
  background: #f1f6ef;
  box-shadow: 0 0 0 2px rgba(64, 87, 61, 0.09);
}

.choice-card input,
.consent-row input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--forest);
}

.choice-card span {
  font-weight: 750;
}

.choice-question small {
  margin-top: 8px;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 17px;
  color: #554f48;
  cursor: pointer;
  font-size: 0.82rem;
  line-height: 1.45;
}

.consent-row input {
  margin-top: 2px;
}

.verification-wrap {
  min-width: 0;
  margin-top: 22px;
  overflow: hidden;
}

#turnstileContainer {
  min-height: 65px;
  max-width: 100%;
}

.configuration-note {
  margin: 0;
  padding: 12px;
  border: 1px solid #edd69d;
  border-radius: 10px;
  background: #fff7df;
  color: #72571e;
  font-size: 0.82rem;
  line-height: 1.45;
}

.form-status {
  min-height: 1.4em;
  margin: 10px 0 0;
  color: var(--forest-dark);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

.form-status.is-error {
  color: #9c3f2b;
}

.safety-note {
  display: flex;
  gap: 13px;
  margin: 0 clamp(12px, 4vw, 28px) 20px;
  padding: 17px;
  border: 1px solid #e5cf9a;
  border-radius: 16px;
  background: var(--gold-soft);
}

.safety-icon {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  font-weight: 900;
}

.safety-note h2 {
  margin: 1px 0 5px;
  font-size: 1.08rem;
}

.safety-note p {
  margin: 0;
  color: #675638;
  font-size: 0.81rem;
  line-height: 1.5;
}

.meter-footer {
  padding: 0 clamp(20px, 6vw, 42px) 26px;
  color: #81786e;
  font-size: 0.72rem;
  line-height: 1.45;
  text-align: center;
}

.meter-footer p {
  margin: 0;
}

@media (max-width: 540px) {
  body {
    padding: 4px;
  }

  .meter-card {
    border-radius: 18px;
  }

  .two-column {
    grid-template-columns: minmax(0, 1fr);
  }

  .full-width {
    grid-column: auto;
  }

  .product-heading {
    align-items: center;
  }

  .house-rating {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .gauge-labels span:first-child {
    text-align: left;
  }

  .gauge-labels span:last-child {
    text-align: right;
  }

  .community-metrics {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 360px) {
  .product-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .meter-tabs {
    grid-template-columns: minmax(0, 1fr);
  }

  .radio-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

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