/* EstiSeries client web flow — warm spa palette, mobile first.
   Hand-written CSS, no frameworks. Big type + strong contrast throughout
   (readability is a requirement, not a preference). */
:root {
  --cream: #FBF4EC;
  --cream-deep: #F3E6D7;
  --card: #FFFFFF;
  --terra: #B0714F;
  --terra-dark: #7E4E30;
  --terra-soft: #F6E7DB;
  --sage: #5F7263;
  --sage-soft: #EAF1E4;
  --ink: #241B14;
  --muted: #5D4C3F;
  --line: #E3D5C6;
  --good-text: #2F5D23;
  --good-bg: #EAF1E4;
  --down-text: #9C4A1F;
  --down-bg: #FBEEE6;
  --gold: #B07E1E;
  --gold-bg: #FFF6E0;
  --shadow: 0 12px 32px rgba(62, 42, 26, 0.10), 0 2px 6px rgba(62, 42, 26, 0.06);
  --ui: system-ui, -apple-system, "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 50% -120px, #F7E9D8 0%, rgba(247, 233, 216, 0) 60%),
    var(--cream);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.6;
}

/* ---------- Header ---------- */
.site-header {
  background: linear-gradient(135deg, #6E4527 0%, var(--terra-dark) 34%, var(--terra) 72%, #C08A63 100%);
  color: #FFF7EF;
  text-align: center;
  padding: 30px 16px 26px;
  box-shadow: 0 4px 18px rgba(62, 42, 26, 0.25);
}
.header-inner { max-width: 600px; margin: 0 auto; }
.practice-mark {
  width: 54px; height: 54px;
  margin: 0 auto 10px;
  border: 2px solid rgba(255, 247, 239, 0.85);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ui);
  font-size: 19px; font-weight: bold; letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.12);
}
.practice-name {
  margin: 0;
  font-size: 32px;
  font-weight: bold;
  letter-spacing: 0.02em;
  line-height: 1.15;
}
.practice-tagline { margin: 5px 0 0; font-style: italic; font-size: 18px; color: #F3DFCE; }
.demo-badge {
  display: inline-block;
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 247, 239, 0.65);
  color: #FFF7EF;
  font-family: var(--ui);
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
}

/* ---------- Progress ---------- */
.flow { max-width: 600px; margin: 0 auto; padding: 14px 16px 28px; }
.progress-wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 4px 2px 16px;
}
.progress {
  font-family: var(--ui);
  font-size: 14px; font-weight: bold;
  color: var(--terra-dark);
  margin: 0;
}
.progress-dots { list-style: none; display: flex; gap: 7px; margin: 0; padding: 0; }
.progress-dots li {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--line);
  transition: background 0.25s ease, transform 0.25s ease;
}
.progress-dots li.is-done { background: var(--sage); }
.progress-dots li.is-active { background: var(--terra); transform: scale(1.35); }

/* ---------- Step cards ---------- */
.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px 22px 30px;
  box-shadow: var(--shadow);
  animation: step-in 0.35s ease;
}
@keyframes step-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.step h1 { margin: 0 0 10px; font-size: 31px; line-height: 1.2; }
.step h2 { margin: 0 0 10px; font-size: 26px; line-height: 1.25; }
.step h3 { margin: 24px 0 8px; font-size: 20px; }
.step h4 { margin: 18px 0 6px; font-size: 17px; }
.lede { font-size: 20px; }
.step-sub { color: var(--muted); margin-top: -4px; }
.hint { color: var(--muted); font-size: 16px; }
.disclaimer {
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}

/* ---------- Hero (welcome) ---------- */
.hero-eyebrow {
  margin: 0 0 8px;
  font-family: var(--ui);
  font-size: 13px; font-weight: bold;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--terra);
}
.series-preview {
  margin: 22px 0 24px;
  padding: 20px 16px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--terra-soft) 0%, #FDF9F4 78%);
}
.series-preview-title { margin: 0; font-size: 21px; }
.series-preview-sub { margin: 3px 0 0; color: var(--muted); font-size: 15px; font-family: var(--ui); }
.arc {
  display: flex; align-items: flex-start;
  margin: 18px 2px 6px;
}
.arc-stop { text-align: center; flex: none; width: 92px; }
.arc-link {
  flex: 1 1 auto; height: 4px; min-width: 12px;
  margin-top: 42px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--line), var(--terra), var(--line));
}
.arc-label { margin: 8px 0 0; font-weight: bold; font-size: 16px; line-height: 1.25; }
.arc-date { margin: 0; color: var(--muted); font-size: 14px; font-family: var(--ui); }
.hero-deltas-title { margin: 16px 0 8px; font-size: 17px; }
.hero-deltas { display: flex; flex-wrap: wrap; gap: 8px; }
.delta-chip {
  display: inline-block;
  font-family: var(--ui); font-size: 15px; font-weight: bold;
  border-radius: 999px; padding: 6px 12px;
}
.delta-chip-up { background: var(--good-bg); color: var(--good-text); }
.delta-chip-down { background: var(--down-bg); color: var(--down-text); }
.series-preview-note { margin: 14px 0 2px; font-size: 16px; color: var(--muted); }
.hero-points {
  list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px;
  margin: 18px 0 0; padding: 0;
  font-family: var(--ui); font-size: 15px; font-weight: bold; color: var(--terra-dark);
}
.hero-points li::before { content: "✓ "; color: var(--sage); }
.hero-explainer { color: var(--muted); margin: 16px 0 0; }

/* ---------- Score rings ---------- */
.score-ring {
  --p: 0;
  width: 138px; height: 138px;
  border-radius: 50%;
  margin: 0 auto;
  background: conic-gradient(var(--terra) calc(var(--p) * 1%), var(--cream-deep) 0);
  display: flex; align-items: center; justify-content: center;
}
.score-ring-value {
  width: 108px; height: 108px;
  border-radius: 50%;
  background: #FFFFFF;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ui);
  font-size: 46px; font-weight: bold; line-height: 1;
  color: var(--terra-dark);
  box-shadow: inset 0 0 0 1px var(--line);
}
.score-ring-sm { width: 84px; height: 84px; }
.score-ring-sm .score-ring-value { width: 63px; height: 63px; font-size: 25px; }

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--ui);
  font-size: 17px;
  font-weight: bold;
  border-radius: 999px;
  padding: 15px 24px;
  border: 2px solid var(--terra-dark);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-block;
}
.btn-primary {
  background: linear-gradient(180deg, var(--terra) 0%, var(--terra-dark) 100%);
  border-color: var(--terra-dark);
  color: #fff;
  box-shadow: 0 4px 12px rgba(126, 78, 48, 0.30);
}
.btn-primary:hover, .btn-primary:focus { filter: brightness(1.07); }
.btn-primary:disabled { background: #CBB7A9; border-color: #CBB7A9; box-shadow: none; cursor: not-allowed; }
.btn-ghost { background: #fff; color: var(--terra-dark); }
.btn-ghost:hover, .btn-ghost:focus { background: var(--terra-soft); }
.btn-link {
  background: none; border: none; color: var(--terra-dark);
  text-decoration: underline; padding: 10px 4px; font-weight: normal;
}
.btn-block { display: block; width: 100%; margin-top: 18px; }
.btn-row { display: flex; gap: 10px; margin-top: 20px; }
.btn-row .btn { flex: 1; }
.btn-row-wrap { flex-wrap: wrap; }
.btn:focus-visible, input:focus-visible, a:focus-visible {
  outline: 3px solid var(--sage); outline-offset: 2px;
}

/* ---------- Consent ---------- */
.check-row {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 15px 10px;
  border-bottom: 1px solid var(--line);
  border-radius: 10px;
}
.check-row:last-child { border-bottom: none; }
.check-row:hover { background: var(--cream); }
.check-row input { width: 26px; height: 26px; margin-top: 2px; flex: none; accent-color: var(--terra-dark); }
.check-row label { cursor: pointer; }

/* ---------- Capture ---------- */
.camera-panel {
  background: linear-gradient(180deg, #FFFDF9 0%, var(--terra-soft) 100%);
  border: 2px solid var(--terra);
  border-radius: 16px;
  padding: 20px 12px;
  text-align: center;
}
#cameraVideo { width: 100%; max-width: 360px; border-radius: 12px; background: #000; }
.face-placeholder { padding: 6px 0 2px; }
.face-oval {
  position: relative;
  width: 158px; height: 200px;
  margin: 0 auto;
  border: 3px solid var(--terra);
  border-radius: 50%;
  background: #FBEFE3;
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.55);
}
.face-eye {
  position: absolute; top: 82px;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--ink);
}
.face-eye-left { left: 44px; }
.face-eye-right { right: 44px; }
.face-smile {
  position: absolute; left: 50%; top: 124px;
  width: 56px; height: 30px;
  transform: translateX(-50%);
  border-bottom: 4px solid var(--ink);
  border-radius: 0 0 56px 56px;
}
.face-placeholder-text {
  font-family: var(--ui);
  font-size: 13px; font-weight: bold; color: var(--muted); margin: 12px 0 0;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.camera-note { color: var(--muted); font-size: 16px; min-height: 1.2em; margin: 12px 0 0; }
.tips-heading { margin-top: 20px; }
.tips-list {
  list-style: none;
  margin: 8px 0 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.tips-list li {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 12px;
  font-family: var(--ui); font-size: 15px; font-weight: bold; text-align: center;
  color: var(--terra-dark);
}
.coaching-card {
  margin-top: 20px;
  background: var(--gold-bg);
  border: 1px solid var(--gold);
  border-left: 8px solid var(--gold);
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 17px;
}
.coaching-title { margin: 0 0 4px; font-weight: bold; font-family: var(--ui); font-size: 17px; }
.coaching-text { margin: 0; }
.status-line { min-height: 1.4em; font-family: var(--ui); font-weight: bold; color: var(--terra-dark); }

/* ---------- Report ---------- */
.score-hero {
  background: linear-gradient(180deg, var(--terra-soft) 0%, #FDF9F4 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  text-align: center;
  padding: 24px 14px 20px;
}
.score-hero-label {
  margin: 12px 0 0; font-family: var(--ui);
  font-size: 14px; font-weight: bold; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted);
}
.score-delta {
  display: inline-block;
  margin: 10px 0 0;
  font-family: var(--ui); font-size: 16px; font-weight: bold;
  background: var(--good-bg); color: var(--good-text);
  border-radius: 999px; padding: 5px 14px;
}
.score-delta:empty { display: none; }
.score-hero-meta { margin: 12px 0 0; font-size: 18px; }
.focus-card {
  border: 1px solid var(--line);
  border-left: 6px solid var(--terra);
  border-radius: 12px;
  padding: 15px 17px;
  margin: 12px 0;
  background: #FFFDF9;
}
.focus-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.focus-card-name { font-weight: bold; font-size: 19px; }
.focus-card-score { font-family: var(--ui); font-weight: bold; font-size: 18px; color: var(--terra-dark); }
.band-chip {
  display: inline-block;
  font-family: var(--ui); font-size: 13px; font-weight: bold;
  background: var(--good-bg); color: var(--good-text);
  border-radius: 999px; padding: 4px 10px; margin-top: 5px;
}
.focus-card p { margin: 9px 0 0; }
.concern-list { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.concern-row {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px;
  padding: 12px 15px; border-bottom: 1px solid var(--line); align-items: center;
}
.concern-row:nth-child(even) { background: #FFFDF9; }
.concern-row:last-child { border-bottom: none; }
.concern-row-name { font-weight: bold; font-size: 17px; }
.concern-row-band { grid-column: 1; color: var(--muted); font-size: 15px; }
.concern-row-score { grid-row: 1 / span 2; font-family: var(--ui); font-weight: bold; font-size: 21px; color: var(--terra-dark); }
.bar-track { grid-column: 1 / -1; height: 10px; background: var(--cream-deep); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--sage) 0%, var(--terra) 100%); border-radius: 999px; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 10px 0 0; padding: 0 0 0 26px; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 8px; top: 12px; bottom: 12px;
  width: 4px; border-radius: 4px;
  background: linear-gradient(180deg, var(--line) 0%, var(--terra) 100%);
}
.timeline-stop {
  position: relative;
  padding: 14px 16px;
  margin-bottom: 14px;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.timeline-stop::before {
  content: ""; position: absolute; left: -26px; top: 20px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--terra); border: 3px solid #FFFFFF;
  box-shadow: 0 0 0 2px var(--line);
}
.timeline-stop-label { font-weight: bold; font-size: 19px; margin: 0; }
.timeline-stop-date { color: var(--muted); margin: 0; font-size: 15px; }
.timeline-stop-score { margin: 5px 0 0; font-family: var(--ui); font-size: 16px; }
.timeline-bar { margin-top: 9px; }
.delta-table { width: 100%; border-collapse: collapse; font-family: var(--ui); font-size: 16px; }
.delta-table th, .delta-table td { padding: 10px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.delta-table th { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; }
.delta-table tbody tr:nth-child(even) { background: #FFFDF9; }
.delta-table td.num, .delta-table th.num { text-align: right; }
.delta-up { color: var(--good-text); font-weight: bold; }
.delta-down { color: var(--down-text); font-weight: bold; }
.delta-flat { color: var(--muted); }
.focus-tag {
  font-family: var(--ui); font-size: 11px; font-weight: bold;
  background: var(--down-bg); color: var(--terra-dark);
  border-radius: 999px; padding: 3px 8px; margin-left: 6px; vertical-align: middle;
  white-space: nowrap;
}
.plan-card, .next-card {
  border: 1px solid var(--line); border-radius: 16px;
  padding: 20px; margin-top: 24px; background: var(--cream);
}
.plan-card { border-left: 8px solid var(--terra); }
.next-card { border-left: 8px solid var(--sage); }
.plan-card h3, .next-card h3 { margin-top: 0; }
.plan-series { font-size: 20px; font-weight: bold; margin: 0; }
.plan-focus-item { margin: 10px 0; }
.plan-focus-item strong { display: block; }
.product-list { list-style: none; margin: 6px 0; padding: 0; }
.product-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.product-list li:last-child { border-bottom: none; }
.product-total { font-weight: bold; text-align: right; font-family: var(--ui); font-size: 17px; }

.site-footer { text-align: center; color: var(--muted); font-size: 15px; padding: 6px 16px 30px; }

@media (max-width: 420px) {
  .btn-row { flex-direction: column; }
  .arc-stop { width: 80px; }
  .arc-link { margin-top: 36px; }
  .step h1 { font-size: 27px; }
  .score-ring { width: 124px; height: 124px; }
  .score-ring-value { width: 96px; height: 96px; font-size: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .step { animation: none; }
  .progress-dots li { transition: none; }
}
