/* Herbal Synergies review page. Mobile-first, neutral review-form styling. */
:root {
  --ink: #191919;
  --mute: #6C6B66;
  --bar: #1C1C1C;
  --panel: #F8F7F4;
  --star-off: #DCDCE6;
  --star-on: #00B67A;
  --burst: #4ACF88;
  --line: #C6C0BB;
  --line-strong: #605E56;
  --notice-bg: #FCFBF3;
  --notice-line: #DCD6D1;
  --link: #3C57BC;
  --btn: #141414;
  --red: #C0362C;
  --red-wash: #FDF1F0;
  --focus: #3C57BC;
  --col: 480px;
  --font: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --star-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12 2.2l2.9 6.6 7.1.6-5.4 4.7 1.6 7L12 17.4l-6.2 3.7 1.6-7L2 9.4l7.1-.6z'/%3E%3C/svg%3E");
  --burst-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%234ACF88' d='M12 1l3.2 7.4 8 .7-6.1 5.3 1.9 7.9L12 18.1l-7 4.2 1.9-7.9L.8 9.1l8-.7z'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
body[data-step="3"] { background: var(--panel); }
img { max-width: 100%; display: block; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Slim dark header bar */
.topbar {
  position: relative;
  z-index: 2;
  flex: none;
  background: var(--bar);
  height: 12px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--col) + 32px);
  margin: 0 auto;
  padding: 18px 16px 48px;
  flex: 1;
}
body[data-step="3"] .wrap { display: none; }

/* Site card */
.site-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--panel);
  border-radius: 16px;
  padding: 16px;
}
.site-card__thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  object-position: top;
  border-radius: 6px;
  border: 1px solid #E3E1DC;
  background: #fff;
  flex: none;
}
.site-card__text { min-width: 0; }
.site-card__name, .site-card__url {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.site-card__url { display: block; font-weight: 400; text-decoration: none; }
.site-card__url:hover { text-decoration: underline; }

/* Steps */
.step--rate { padding-top: 112px; }
.step__title {
  margin: 0 0 16px;
  font-size: 23.5px;
  line-height: 1.25;
  font-weight: 600;
}

/* Star boxes */
.stars { display: flex; gap: 4px; }
.star, .star-radio__box {
  display: block;
  background: var(--star-off) var(--star-svg) center / 78% no-repeat;
  transition: background-color .12s ease;
}
.star {
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.star.is-on { background-color: var(--star-on); }

.stars--form { gap: 3px; }
.star-radio { position: relative; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.star-radio input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.star-radio__box { width: 40px; height: 40px; }
.star-radio.is-on .star-radio__box { background-color: var(--star-on); }
.stars--form:hover .star-radio .star-radio__box { background-color: var(--star-off); }
.stars--form:hover .star-radio:has(~ .star-radio:hover) .star-radio__box,
.stars--form .star-radio:hover .star-radio__box { background-color: var(--star-on); }
.star-radio input:focus-visible + .star-radio__box { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Form */
form { margin-top: 36px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.field { margin: 0 0 30px; }
.field--body { margin-bottom: 56px; }
.field--rating { margin-bottom: 34px; }
.field__label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.3;
  font-weight: 500;
}
.info { display: inline-flex; color: var(--ink); cursor: help; }
.field__help { margin: 6px 0 0; font-size: 14px; color: var(--mute); }

input[type="text"], input[type="email"], input[type="date"], textarea {
  display: block;
  width: 100%;
  margin: 0;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 11px 13px;
  -webkit-appearance: none;
  appearance: none;
}
input[type="text"], input[type="email"] { height: 48px; }
input[type="date"] {
  height: 44px;
  padding: 0 14px 0 13px;
  min-width: 0;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%233C57BC' stroke-width='1.3'%3E%3Crect x='2.5' y='3.5' width='15' height='14' rx='1'/%3E%3Cpath d='M2.5 7.5h15M6.5 1.8v3.4M13.5 1.8v3.4'/%3E%3C/svg%3E") right 15px center / 20px 20px no-repeat;
}
input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  width: 22px;
  height: 22px;
  margin: 0;
  padding: 0;
  cursor: pointer;
}
input::-webkit-date-and-time-value { text-align: left; }
textarea {
  min-height: 186px;
  resize: vertical;
  border-color: var(--line-strong);
  line-height: 1.5;
  padding: 13px;
}
::placeholder { color: #7A7974; opacity: 1; }
input:focus, textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 1px var(--ink); }
[aria-invalid="true"] { border-color: var(--red) !important; }
[aria-invalid="true"]:focus { box-shadow: 0 0 0 1px var(--red); }

.field__error {
  display: flex;
  gap: 6px;
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--red);
}
.field__error::before {
  content: "!";
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

/* "Other people mention" */
.mentions {
  margin-top: 6px;
  background: var(--panel);
  border-radius: 12px;
  padding: 10px 12px 12px;
}
.mentions__label { margin: 0 0 8px; font-size: 13px; color: #4A4A45; }
.mentions__chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
  font: inherit;
  font-size: 13px;
  line-height: 1.3;
  color: var(--ink);
  background: transparent;
  border: 1px solid #DAD7D1;
  border-radius: 4px;
  padding: 3px 7px;
  cursor: pointer;
}
.chip:hover { background: #fff; border-color: var(--line); }

/* Notice box */
.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 26px;
  background: var(--notice-bg);
  border: 1px solid var(--notice-line);
  border-radius: 12px;
  padding: 16px 14px;
  min-height: 84px;
}
.notice__icon { flex: none; color: #4A4A45; }
.notice__text { margin: 0; font-size: 15px; line-height: 1.45; }

/* Checkbox */
.field--check { margin-bottom: 38px; }
.check { position: relative; display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check input { position: absolute; left: 0; top: 0; width: 22px; height: 22px; opacity: 0; margin: 0; }
.check__box {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 2px 0 0 1px;
  border: 1px solid #8C8C8A;
  border-radius: 3px;
  background: #fff center / 12px no-repeat;
}
.check input:checked + .check__box {
  background-color: var(--ink);
  border-color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.2l2.6 2.6L10 3.4' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.check input:focus-visible + .check__box { outline: 2px solid var(--focus); outline-offset: 2px; }
.check input[aria-invalid="true"] + .check__box { border-color: var(--red); }
.check__text { font-size: 15px; line-height: 1.45; }
.check__link { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid var(--btn);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn--block { display: flex; width: 100%; }
.btn--primary { background: var(--btn); color: #fff; }
.btn--primary:hover { background: #333; border-color: #333; }
.btn--primary:disabled { opacity: .75; cursor: progress; }

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form-alert {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid #F0C9C5;
  border-radius: 8px;
  background: var(--red-wash);
  color: var(--red);
  font-size: 15px;
}

/* Step 3: thank you */
.step--thanks {
  position: relative;
  flex: 1;
  background: var(--panel);
  overflow: hidden;
  outline: none;
}
.burst { position: absolute; left: 0; top: 0; width: 260px; height: 76px; pointer-events: none; }
.burst span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  background: var(--burst-svg) center / contain no-repeat;
  transform: rotate(var(--r));
  animation: burst-in .55s cubic-bezier(.2, .8, .25, 1.15) var(--d) both;
}
@keyframes burst-in {
  from { transform: translate(-90px, -90px) rotate(calc(var(--r) - 90deg)) scale(.2); opacity: 0; }
}
.thanks__inner {
  max-width: calc(var(--col) + 32px);
  margin: 0 auto;
  padding: 86px 16px 48px;
}
.thanks__title {
  margin: 0 0 14px;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -.01em;
  color: #000;
}
.thanks__stars { display: flex; gap: 3px; margin-bottom: 18px; }
.thanks__stars span {
  width: 28px;
  height: 28px;
  background: var(--star-off) var(--star-svg) center / 78% no-repeat;
}
.thanks__stars span.is-on { background-color: var(--star-on); }
.thanks__msg { margin: 0; font-size: 16px; color: #3A3A36; }

#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 50; }

@media (min-width: 720px) {
  .topbar { height: 14px; }
  .step--rate { padding-top: 113px; }
  .burst { left: max(0px, calc(50% - var(--col) / 2 - 60px)); transform: scale(1.2); transform-origin: 0 0; }
  .thanks__inner { padding-top: 100px; }
}

@media (prefers-reduced-motion: reduce) {
  .burst span { animation: none; }
  .star, .star-radio__box { transition: none; }
}
