/* Palette taken from the We Care logo: charcoal wordmark, orange "CARE",
   and the red → orange → gold gradient of the sun. */
:root {
  --ink:        #231F20;   /* logo charcoal */
  --ink-2:      #5a5250;
  --ink-3:      #8d8583;
  --line:       #eae5e1;
  --line-2:     #d8d0cb;
  --bg:         #faf7f4;
  --card:       #ffffff;

  --brand:      #F7941E;   /* logo orange */
  --brand-2:    #E4032E;   /* logo red */
  --brand-gold: #FFC800;   /* logo gold */
  --brand-ink:  #231F20;
  --brand-soft: #fff3e3;
  --brand-line: #fadfbc;

  --green:      #1e8e3e;
  --amber:      #E09400;
  --red:        #E4032E;

  --radius:     14px;
  --shadow:     0 1px 2px rgba(35,31,32,.05), 0 8px 28px rgba(35,31,32,.08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body { min-height: 100vh; display: flex; flex-direction: column; }

.shell {
  width: 100%;
  max-width: 660px;
  margin: 0 auto;
  padding: 24px 18px 64px;
  flex: 1;
}

/* ------------------------------------------------------------------ header */

.masthead {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 22px 18px 4px;
  max-width: 660px;
  margin: 0 auto;
  width: 100%;
}
.masthead img { height: 78px; width: auto; display: block; }
@media (max-width: 520px) { .masthead img { height: 64px; } }

/* Fallback mark, used only when no logo file is present. */
.logo {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--brand-2), var(--brand) 55%, var(--brand-gold));
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 13px; letter-spacing: .3px;
}
.masthead span { font-size: 14px; color: var(--ink-2); font-weight: 600; }

/* A thin ribbon of the logo gradient across the top of the page. */
body::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-2), var(--brand) 45%, var(--brand-gold));
}

/* -------------------------------------------------------------------- card */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

@media (max-width: 520px) { .card { padding: 20px; } .shell { padding: 16px 12px 48px; } }

.eyebrow {
  font-size: 13px;
  color: var(--ink-3);
  text-transform: none;
  margin: 0 0 6px;
}

h1 { font-size: 27px; line-height: 1.25; margin: 0 0 14px; letter-spacing: -.02em; }
h2 { font-size: 20px; line-height: 1.3; margin: 0 0 10px; letter-spacing: -.01em; }
p  { margin: 0 0 14px; color: var(--ink-2); }
.muted { color: var(--ink-3); font-size: 13.5px; }

/* ------------------------------------------------------------------ button */

.btn {
  appearance: none;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #F7941E, #F26522);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 15.5px;
  padding: 13px 22px;
  cursor: pointer;
  transition: filter .15s ease, transform .06s ease;
  width: 100%;
}
.btn:hover:not(:disabled) { filter: brightness(1.07) saturate(1.05); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

a.btn { display: block; text-align: center; text-decoration: none; }

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--line-2);
  width: auto;
  padding: 10px 16px;
  font-size: 14.5px;
}
.btn-ghost:hover:not(:disabled) { background: #fff; color: var(--ink); }

/* -------------------------------------------------------------------- form */

.field { margin-bottom: 15px; }
.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}
.field .opt { font-weight: 400; color: var(--ink-3); }
.field input {
  width: 100%;
  font: inherit;
  font-size: 16px; /* keeps iOS from zooming */
  padding: 12px 13px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(247,148,30,.22);
}
.field.invalid input { border-color: var(--red); }
.err { color: var(--red); font-size: 12.5px; margin-top: 5px; display: none; }
.field.invalid .err { display: block; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 460px) { .row { grid-template-columns: 1fr; gap: 0; } }

/* ---------------------------------------------------------------- progress */

.progress-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--ink-3);
}
.progress-head strong { color: #C2611A; font-weight: 700; }
.bar { height: 5px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-gold), var(--brand) 60%, var(--brand-2)); border-radius: 99px; transition: width .3s ease; }

.dimtag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #C2611A;
  background: var(--brand-soft);
  padding: 4px 9px;
  border-radius: 6px;
  margin-bottom: 12px;
}

/* ----------------------------------------------------------------- options */

.options { display: flex; flex-direction: column; gap: 9px; margin: 18px 0 22px; }

.option {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 14px;
  border: 1px solid var(--line-2);
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  transition: border-color .12s ease, background .12s ease;
  width: 100%;
}
.option:hover { border-color: var(--brand); background: #fffdfa; }
.option .dot {
  flex: 0 0 auto;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  margin-top: 3px;
  position: relative;
  transition: border-color .12s ease;
}
.option[aria-checked="true"] { border-color: var(--brand); background: var(--brand-soft); }
.option[aria-checked="true"] .dot { border-color: var(--brand); }
.option[aria-checked="true"] .dot::after {
  content: '';
  position: absolute; inset: 3px;
  border-radius: 50%;
  background: var(--brand);
}

.nav { display: flex; gap: 10px; align-items: center; }
.nav .btn { flex: 1; }

/* ------------------------------------------------------------------ result */

.score-wrap { text-align: center; padding: 6px 0 18px; }
.ring { position: relative; width: 168px; height: 168px; margin: 0 auto 16px; }
.ring svg { transform: rotate(-90deg); }
.ring .val {
  position: absolute; inset: 0;
  display: grid; place-content: center; text-align: center;
}
.ring .val b { font-size: 44px; font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.ring .val small { font-size: 12px; color: var(--ink-3); display: block; margin-top: 4px; }

.band-pill {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  padding: 6px 15px;
  border-radius: 99px;
  color: #fff;
}

.dim { padding: 15px 0; border-top: 1px solid var(--line); }
.dim:first-of-type { border-top: 0; }
.dim-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 7px; }
.dim-head h3 { font-size: 15.5px; margin: 0; font-weight: 600; }
.dim-head b { font-size: 15.5px; font-variant-numeric: tabular-nums; }
.dim .bar { margin-bottom: 9px; }
.dim p { font-size: 14px; margin: 0; color: var(--ink-2); }

.callout {
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  border-radius: 11px;
  padding: 18px 20px;
  margin: 22px 0 0;
  text-align: center;
}
.callout h3 { margin: 0 0 6px; font-size: 16px; font-weight: 700; }
.callout p { margin: 0; font-size: 14.5px; color: var(--ink-2); }

.divider { height: 1px; background: var(--line); margin: 24px 0; border: 0; }

/* ------------------------------------------------------------------- misc */

.center { text-align: center; }
.spinner {
  width: 26px; height: 26px;
  border: 3px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  margin: 26px auto;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.fade { animation: fade .22s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.footnote { text-align: center; font-size: 12.5px; color: var(--ink-3); margin-top: 18px; }

[hidden] { display: none !important; }
