/**
 * ═══════════════════════════════════════════════════════════════
 *  MEDICARE ASSISTANT — DESIGN TOKENS
 *  Mobile-first. No horizontal overflow ever.
 *  Warm coral + white + cream palette.
 *  No border-radius. No shadows. Safari-safe (-webkit- prefixes).
 * ═══════════════════════════════════════════════════════════════
 */
:root {
  /* PALETTE */
  --c-bg:        #FFFFFF;
  --c-bg-soft:   #FAF7F2;
  --c-text:      #1F2937;
  --c-muted:     #4B5563;
  --c-light:     #9CA3AF;
  --c-accent:    #E07A5F;
  --c-accent-dk: #C96D54;
  --c-link:      #C2410C;
  --c-link-h:    #9F2F0F;
  --c-border:    #E5E7EB;
  --c-border-dk: #D1D5DB;
  --c-white:     #FFFFFF;

  /* TYPOGRAPHY */
  --ff:        Verdana, Arial, Helvetica, system-ui, sans-serif;
  --fs-xs:     0.78rem;
  --fs-sm:     0.89rem;
  --fs-base:   1rem;
  --fs-md:     1.1rem;
  --fs-lg:     1.35rem;
  --fs-xl:     1.7rem;
  --fs-2xl:    2.1rem;
  --fw-n:      400;
  --fw-m:      500;
  --fw-s:      600;
  --fw-b:      700;
  --lh:        1.65;
  --lh-tight:  1.2;

  /* SPACING */
  --sp1:0.25rem; --sp2:0.5rem;  --sp3:0.75rem;
  --sp4:1rem;    --sp5:1.25rem; --sp6:1.5rem;
  --sp8:2rem;    --sp10:2.5rem; --sp12:3rem;
  --sp16:4rem;   --sp20:5rem;

  /* LAYOUT */
  --w-max:  1080px;
  --w-form: 560px;

  /* INTERACTION */
  --t:     150ms ease;
  --focus: 0 0 0 3px rgba(224,122,95,0.35);
}

/* ══════════════════════════════════════════════
   RESET — overflow-x NEVER happens
══════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0; padding: 0;
  /* flex children won't overflow: */
  min-width: 0;
}
html {
  font-size: 18px;
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  font-family: var(--ff);
  font-size: var(--fs-base);
  font-weight: var(--fw-n);
  line-height: var(--lh);
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }

/* ── Type ── */
h1,h2,h3,h4 {
  font-family: var(--ff);
  color: var(--c-text);
  line-height: var(--lh-tight);
  font-weight: var(--fw-b);
  letter-spacing: -0.01em;
  word-break: break-word;
}
h1 { font-size: clamp(1.5rem, 5vw, var(--fs-2xl)); }
h2 { font-size: clamp(1.2rem, 3.5vw, var(--fs-xl)); font-weight: var(--fw-s); }
h3 { font-size: clamp(1rem, 2.5vw, var(--fs-lg)); font-weight: var(--fw-s); }
p  { line-height: var(--lh); }

/* ── Links ── */
a {
  color: var(--c-link);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  font-weight: var(--fw-m);
  -webkit-transition: color var(--t);
  transition: color var(--t);
}
a:hover { color: var(--c-link-h); }
a:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 3px; }

/* ── Buttons ── */
.btn {
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-align-items: center; align-items: center;
  -webkit-justify-content: center; justify-content: center;
  gap: 0.4rem;
  font-family: var(--ff);
  font-size: var(--fs-md);
  font-weight: var(--fw-s);
  line-height: 1.2;
  padding: 0.85rem 1.5rem;
  border: 2px solid transparent;
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
  -webkit-transition: background var(--t), color var(--t), border-color var(--t);
  transition: background var(--t), color var(--t), border-color var(--t);
  min-height: 52px;
  white-space: nowrap;
  letter-spacing: 0.01em;
  -webkit-appearance: none;
  appearance: none;
  /* Never overflow container */
  max-width: 100%;
}
.btn:focus-visible { outline: none; box-shadow: var(--focus); }

.btn-primary { background: var(--c-accent); color: var(--c-text); border-color: var(--c-accent); }
.btn-primary:hover { background: var(--c-accent-dk); border-color: var(--c-accent-dk); color: var(--c-text); text-decoration: none; }

.btn-dark { background: var(--c-text); color: var(--c-white); border-color: var(--c-text); }
.btn-dark:hover { background: #374151; color: var(--c-white); text-decoration: none; }

.btn-outline { background: transparent; color: var(--c-text); border-color: var(--c-text); }
.btn-outline:hover { background: var(--c-text); color: var(--c-white); text-decoration: none; }

.btn-ghost-white { background: transparent; color: var(--c-white); border-color: rgba(255,255,255,0.5); }
.btn-ghost-white:hover { background: rgba(255,255,255,0.1); border-color: var(--c-white); color: var(--c-white); text-decoration: none; }

.btn-sm { font-size: var(--fs-sm); padding: 0.55rem 1rem; min-height: 40px; }
.btn-lg { font-size: var(--fs-lg); padding: 0.9rem 1.75rem; min-height: 56px; }

/* ── Form elements ── */
.label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-s);
  color: var(--c-text);
  margin-bottom: 0.35rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.input, .select {
  display: block;
  width: 100%;
  max-width: 100%;
  font-family: var(--ff);
  font-size: var(--fs-base);
  color: var(--c-text);
  background: var(--c-white);
  border: 2px solid var(--c-border-dk);
  border-radius: 0;
  padding: 0.8rem 1rem;
  min-height: 52px;
  -webkit-transition: border-color var(--t);
  transition: border-color var(--t);
  -webkit-appearance: none;
  appearance: none;
}
.input::-webkit-input-placeholder { color: var(--c-light); }
.input::placeholder { color: var(--c-light); }
.input:focus, .select:focus { outline: none; border-color: var(--c-accent); box-shadow: var(--focus); }
.input.err { border-color: #C00; }
.err-msg { color: #C00; font-size: var(--fs-xs); margin-top: 4px; display: block; min-height: 1em; }

/* Choice tiles */
.tile {
  display: -webkit-flex; display: flex;
  -webkit-align-items: center; align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 2px solid var(--c-border);
  border-radius: 0;
  cursor: pointer;
  background: var(--c-white);
  line-height: 1.4;
  width: 100%;
  -webkit-transition: border-color var(--t), background var(--t);
  transition: border-color var(--t), background var(--t);
}
.tile:hover   { border-color: var(--c-accent); background: rgba(224,122,95,0.04); }
.tile.checked { border-color: var(--c-accent); background: rgba(224,122,95,0.06); }

.tile input[type="radio"] {
  width: 20px; height: 20px; min-width: 20px;
  -webkit-appearance: none; appearance: none;
  border: 2px solid var(--c-border-dk);
  border-radius: 50%;
  background: var(--c-white);
  cursor: pointer;
  -webkit-flex-shrink: 0; flex-shrink: 0;
  position: relative;
}
.tile input[type="radio"]:checked { border-color: var(--c-accent); background: var(--c-accent); }
.tile input[type="radio"]:checked::after {
  content: '';
  position: absolute; top: 50%; left: 50%;
  width: 7px; height: 7px;
  background: var(--c-white); border-radius: 50%;
  -webkit-transform: translate(-50%,-50%); transform: translate(-50%,-50%);
}

/* ── Layout ── */
.container {
  width: 100%;
  max-width: var(--w-max);
  margin-left: auto; margin-right: auto;
  padding-left: var(--sp6); padding-right: var(--sp6);
}
.section      { padding-top: var(--sp16); padding-bottom: var(--sp16); }
.section-soft { background: var(--c-bg-soft); }

/* ── Progress bar ── */
.prog-track { height: 4px; background: var(--c-border); }
.prog-fill  { height: 4px; background: var(--c-accent); -webkit-transition: width 0.35s ease; transition: width 0.35s ease; }

/* ── Mobile ── */
@media (max-width: 640px) {
  html { font-size: 17px; }
  .container { padding-left: var(--sp4); padding-right: var(--sp4); }
  .section { padding-top: var(--sp10); padding-bottom: var(--sp10); }
}
