/* PureMax Health — shared design system.
   Theme: GREEN + BLUE (fresh health green + trustworthy blue). Mobile-first.
   Palette:
     --blue        #0E63A6  primary blue (links, accents, header CTA)
     --blue-dark   #0A3D68  headings, footer, sticky bar
     --blue-ink    #0B2B44  darkest blue (footer bg gradient base)
     --blue-light  #E8F2FA  tinted section backgrounds
     --green       #0FA47A  primary green (main CTAs)
     --green-dark  #0B7A5C  green hover / emphasis
     --green-bright #35D99A logo pulse accent
     --green-light #E6F7F1  tinted section backgrounds
*/

:root {
  --blue: #0E63A6;
  --blue-dark: #0A3D68;
  --blue-ink: #0B2B44;
  --blue-light: #E8F2FA;
  --blue-mist: #F2F7FB;
  --green: #0FA47A;
  --green-dark: #0B7A5C;
  --green-bright: #35D99A;
  --green-light: #E6F7F1;
  --ink: #16303F;
  --muted: #5A6B76;
  --line: #DCE6EC;
  --bg: #FFFFFF;
  --soft: #F4F8FA;
  --warn: #B3261E;
  --warn-bg: #FDECEA;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(11, 43, 68, 0.08);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}
h1, h2, h3 { color: var(--blue-dark); line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.45rem; margin-top: 0; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li { margin-bottom: 0.35em; }
small, .fine { font-size: 0.85rem; color: var(--muted); }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }
section.block { padding: 28px 0; }
section.band-green { background: var(--green-light); }
section.band-blue { background: var(--blue-light); }
section.band-soft { background: var(--soft); }
section.band-dark { background: var(--blue-dark); color: #fff; }
section.band-dark h2, section.band-dark h3 { color: #fff; }
section.band-dark p { color: #D7E6F2; }
.lede { font-size: 1.08rem; }
.accent-green { color: var(--green-dark); }
.accent-blue { color: var(--blue); }

/* ---------- Header / nav ---------- */
header.site {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand img { display: block; height: 44px; width: auto; }
.header-call {
  flex: 0 0 auto;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 10px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.header-call:hover { background: var(--blue-dark); }
nav.mainnav { background: var(--blue-dark); }
nav.mainnav .wrap {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
nav.mainnav .wrap::-webkit-scrollbar { display: none; }
nav.mainnav a {
  color: #CFE3F2;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 11px 12px;
  white-space: nowrap;
}
nav.mainnav a:hover, nav.mainnav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,0.12); }
.deadline-strip {
  background: var(--green);
  color: #fff;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 9px 12px;
}
.deadline-strip a { color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  padding: 13px 22px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  text-align: center;
  line-height: 1.25;
}
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dark); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-dark); }
.btn-ghost {
  background: #fff;
  color: var(--blue-dark);
  border: 2px solid var(--blue);
}
.btn-ghost:hover { background: var(--blue-light); }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 0.92rem; }

/* ---------- Cards / grids ---------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}
.card h2, .card h3 { margin-top: 0; }
.tool-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .tool-grid { grid-template-columns: 1fr 1fr; } }
.tool-card h3 { margin-bottom: 0.35em; }
.tool-card p { margin-bottom: 0.75em; }

.badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green-dark);
  background: var(--green-light);
  border: 1px solid var(--green);
  border-radius: 999px;
  padding: 3px 10px;
  vertical-align: middle;
}
.badge-blue {
  color: var(--blue-dark);
  background: var(--blue-light);
  border-color: var(--blue);
}
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--blue-dark);
}
.trust-row li { margin: 0; }
.trust-row li::before { content: "✓ "; color: var(--green); font-weight: 800; }

/* ---------- Hero / photo ---------- */
.hero-photo { text-align: center; }
.hero-photo img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--green);
  box-shadow: var(--shadow);
}
.hero-photo figcaption { margin-top: 10px; font-weight: 700; color: var(--blue-dark); }
.hero-photo figcaption span { display: block; font-weight: 400; color: var(--muted); font-size: 0.92rem; }

/* ---------- Forms ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 700; margin-bottom: 5px; color: var(--blue-dark); }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit;
  padding: 11px 12px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 3px var(--blue-light);
}
.field .hint { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }
.field.invalid input, .field.invalid select { border-color: var(--warn); background: var(--warn-bg); }
.field .error { display: none; color: var(--warn); font-size: 0.88rem; font-weight: 600; margin-top: 4px; }
.field.invalid .error { display: block; }
fieldset { border: 0; padding: 0; margin: 0 0 14px; }
legend { font-weight: 700; color: var(--blue-dark); margin-bottom: 6px; padding: 0; }
.checkline { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.checkline input { width: 20px; height: 20px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--green); }
.radio-list, .check-list { list-style: none; padding: 0; margin: 0; }
.radio-list li, .check-list li { margin-bottom: 8px; }
.radio-list label, .check-list label {
  display: flex; gap: 10px; align-items: flex-start;
  border: 2px solid var(--line); border-radius: 10px; padding: 11px 12px;
  cursor: pointer; font-weight: 400;
}
.radio-list label:has(input:checked), .check-list label:has(input:checked) {
  border-color: var(--green); background: var(--green-light);
}
.radio-list input, .check-list input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--green); flex: 0 0 auto; }

/* ---------- Checker result ---------- */
.result {
  border: 2px solid var(--green);
  background: var(--green-light);
  border-radius: var(--radius);
  padding: 18px;
  margin-top: 16px;
}
.result h3 { margin-top: 0; }
.result .big { font-size: 1.25rem; font-weight: 800; color: var(--blue-dark); }
.result dl { margin: 10px 0; }
.result dt { font-weight: 700; color: var(--blue-dark); }
.result dd { margin: 0 0 8px; }
.disclaimer {
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 10px;
}

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  padding-left: 52px;
  position: relative;
  margin-bottom: 18px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.steps h3 { margin-bottom: 0.2em; }

/* ---------- FAQ ---------- */
details.faq {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: #fff;
}
details.faq summary { font-weight: 700; color: var(--blue-dark); cursor: pointer; }
details.faq p { margin: 8px 0 0; }

/* ---------- Spin wheel ---------- */
.wheel-wrap { text-align: center; }
.wheel-stage { position: relative; width: 300px; height: 300px; margin: 10px auto; }
.wheel-stage canvas { width: 300px; height: 300px; border-radius: 50%; box-shadow: var(--shadow); }
.wheel-pointer {
  position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0;
  border-left: 14px solid transparent; border-right: 14px solid transparent;
  border-top: 24px solid var(--blue-dark);
  z-index: 2;
}
.wheel-spin-btn { margin-top: 8px; }

/* ---------- News ---------- */
.news-list { list-style: none; padding: 0; margin: 0; }
.news-list li { border-bottom: 1px solid var(--line); padding: 14px 0; }
.news-list li:last-child { border-bottom: 0; }
.news-date { font-size: 0.85rem; font-weight: 700; color: var(--green-dark); text-transform: uppercase; letter-spacing: 0.04em; }
.news-list h3 { margin: 4px 0; }
.news-list h3 a { color: var(--blue-dark); text-decoration: none; }
.news-list h3 a:hover { color: var(--blue); }

/* ---------- Footer ---------- */
footer.site { background: var(--blue-dark); color: #CFE3F2; padding: 30px 0 110px; }
footer.site .foot-logo img { height: 52px; width: auto; }
footer.site a { color: #fff; }
footer.site h3 { color: #fff; }
footer.site .fine { color: #9DBED6; }
.foot-cols { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 640px) { .foot-cols { grid-template-columns: 1.2fr 1fr 1fr; } }
.foot-license {
  border-top: 1px solid rgba(255,255,255,0.25);
  margin-top: 22px; padding-top: 16px;
  font-size: 0.85rem; color: #B9D2E4;
}

/* ---------- Sticky mobile bar ---------- */
.stickybar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--blue-dark);
  display: flex;
  z-index: 40;
  box-shadow: 0 -2px 12px rgba(11, 43, 68, 0.25);
}
.stickybar a {
  flex: 1;
  text-align: center;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 4px 16px;
}
.stickybar a + a { border-left: 1px solid rgba(255,255,255,0.25); }
.stickybar a.enroll { background: var(--green); }
.stickybar a.enroll:hover { background: var(--green-dark); }
@media (min-width: 721px) {
  .stickybar { display: none; }
  footer.site { padding-bottom: 30px; }
}
body { padding-bottom: 0; }
@media (max-width: 720px) {
  body { padding-bottom: 54px; }
  .bubble { bottom: 68px !important; }
}

/* ---------- Assistant bubble ---------- */
.bubble {
  position: fixed;
  right: 16px; bottom: 20px;
  z-index: 50;
}
.bubble > button {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 0;
  background: var(--green);
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(11, 43, 68, 0.35);
}
.bubble > button:hover { background: var(--green-dark); }
.bubble-panel {
  position: absolute;
  right: 0; bottom: 66px;
  width: min(320px, calc(100vw - 32px));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(11, 43, 68, 0.25);
  padding: 16px;
  display: none;
}
.bubble-panel.open { display: block; }
.bubble-panel h3 { margin-top: 0; }
.bubble-note { font-size: 0.85rem; color: var(--muted); }

/* ---------- API tool pages ---------- */
.api-result { margin-top: 16px; }
.api-result .card { margin-bottom: 10px; }
.api-result h3 { margin-bottom: 0.2em; }
.api-result .meta { font-size: 0.9rem; color: var(--muted); }
.loading { color: var(--muted); font-style: italic; }
.error-box {
  border: 2px solid var(--warn);
  background: var(--warn-bg);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-top: 14px;
}
kbd {
  background: var(--blue-mist);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 7px;
  font-family: inherit;
  font-weight: 700;
}
