/* ==========================================================================
   WedPlan Practice Score

   Same tokens as /calculators/ on purpose: a planner who used the plate
   calculator on Tuesday and lands here on Thursday should not wonder whether
   it is the same company. Keep the :root block in sync with
   /calculators/assets/css/calculators.css, or lift both into one shared file
   the day a third tool appears.

   The through-line is the ledger. The calculators showed where the money
   went. This shows where the points went, in the same grammar: hairline
   rules, mono tabular figures, a double rule under the total. A score is a
   debit sheet for a practice.
   ========================================================================== */

:root {
  --paper:    #edf0e9;
  --sheet:    #fafbf7;
  --ink:      #16231a;
  --ink-2:    #4a5a4e;
  --ink-3:    #7b8a7e;
  --rule:     #c7d1c4;
  --rule-2:   #e2e8de;
  --marigold: #e8871e;
  --marigold-deep: #c26a0d;
  --kumkum:   #9e2b25;
  --gold:     #a8823c;

  --display: "Fraunces", Georgia, serif;
  --body:    "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --data:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  --wrap: 1180px;
  --r: 3px;
  --shadow: 0 1px 2px rgba(22, 35, 26, .06), 0 12px 32px -18px rgba(22, 35, 26, .3);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--marigold-deep); }

:focus-visible { outline: 2px solid var(--marigold-deep); outline-offset: 2px; border-radius: 2px; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 99;
  background: var(--ink); color: var(--sheet); padding: .75rem 1.25rem; font-weight: 600;
}
.skip:focus { left: 0; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  font-variation-settings: "SOFT" 30, "WONK" 1;
  letter-spacing: -.015em; line-height: 1.08; margin: 0;
  text-wrap: balance;
}

.eyebrow {
  font-family: var(--data);
  font-size: .6875rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 .75rem;
}

/* --- Masthead ------------------------------------------------------------ */

.masthead {
  border-bottom: 1px solid var(--rule);
  background: rgba(250, 251, 247, .8);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 20;
}
.masthead__row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 60px;
}
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; }
.brand__mark {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--marigold);
  box-shadow: 0 0 0 3px rgba(232, 135, 30, .18);
}
.brand__name {
  font-family: var(--display);
  font-variation-settings: "SOFT" 40, "WONK" 1;
  font-weight: 700; font-size: 1.15rem; letter-spacing: -.02em;
}
.masthead__nav { display: flex; align-items: center; gap: 1.25rem; }
.masthead__nav > a { font-size: .875rem; font-weight: 500; text-decoration: none; }

/* --- Buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: var(--marigold);
  color: #21150a;
  border: 1px solid var(--marigold-deep);
  border-radius: var(--r);
  padding: .6rem 1.1rem;
  font-family: var(--body); font-size: .9375rem; font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: transform .12s ease, background-color .12s ease, box-shadow .12s ease;
}
.btn:hover {
  background: #f5972f; color: #21150a; transform: translateY(-1px);
  box-shadow: 0 4px 14px -4px rgba(194, 106, 13, .5);
}
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--sm { padding: .4rem .8rem; font-size: .8125rem; }
.btn--lg { padding: .85rem 1.75rem; font-size: 1.0625rem; }
.btn--ink {
  background: transparent; color: var(--ink); border-color: var(--rule);
}
.btn--ink:hover { background: rgba(22, 35, 26, .04); color: var(--ink); box-shadow: none; }
.btn--ghost { background: transparent; color: var(--sheet); border-color: rgba(250, 251, 247, .35); }
.btn--ghost:hover { background: rgba(250, 251, 247, .1); color: var(--sheet); box-shadow: none; }

.linkbtn {
  background: none; border: 0; padding: .4rem 0;
  font-family: var(--body); font-size: .875rem; color: var(--ink-3);
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.linkbtn:hover { color: var(--ink); }
.linkbtn[hidden] { display: none; }

/* --- Intro --------------------------------------------------------------- */

.screen[hidden] { display: none; }

.intro { padding: 4rem 0 4.5rem; max-width: 44rem; }
.intro__h { font-size: clamp(2rem, 4.6vw, 3.2rem); }
.intro__deck {
  margin: 1.15rem 0 2rem; font-size: 1.0625rem; color: var(--ink-2); max-width: 54ch;
}
.intro__note {
  margin: 1rem 0 0; font-size: .875rem; color: var(--ink-3);
}

.facts {
  list-style: none; margin: 0 0 2.25rem; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.facts li {
  display: flex; align-items: baseline; gap: .6rem;
  padding: .9rem 1.5rem .9rem 0;
  margin-right: 1.5rem;
  border-right: 1px solid var(--rule-2);
  font-size: .875rem; color: var(--ink-2);
}
.facts li:last-child { border-right: 0; margin-right: 0; }
.facts__n {
  font-family: var(--display);
  font-variation-settings: "SOFT" 30, "WONK" 0;
  font-weight: 700; font-size: 1.5rem; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 560px) {
  .facts { flex-direction: column; }
  .facts li { border-right: 0; border-bottom: 1px solid var(--rule-2); margin-right: 0; padding-right: 0; }
  .facts li:last-child { border-bottom: 0; }
}

/* --- Quiz ---------------------------------------------------------------- */

.quiz { padding: 2.5rem 0 4rem; max-width: 44rem; }

.progress {
  height: 3px; background: var(--rule-2); border-radius: 2px; overflow: hidden;
}
.progress__bar {
  height: 100%; width: 0%; background: var(--marigold);
  transition: width .3s cubic-bezier(.22, .61, .36, 1);
}
.progress__label {
  font-family: var(--data);
  font-size: .6875rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3);
  margin: .75rem 0 1.75rem;
}

.card {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 2rem;
  box-shadow: var(--shadow);
}
@media (max-width: 560px) { .card { padding: 1.35rem; } }

.card__q {
  font-family: var(--display);
  font-variation-settings: "SOFT" 30, "WONK" 1;
  font-weight: 600; font-size: clamp(1.3rem, 3.2vw, 1.75rem);
  letter-spacing: -.015em; line-height: 1.2;
  margin: 0 0 1.5rem;
  text-wrap: balance;
}
.card__tag {
  font-family: var(--data);
  font-size: .625rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--marigold-deep);
  margin: 0 0 .85rem;
}

.opts { display: flex; flex-direction: column; gap: .5rem; }

.opt {
  display: flex; align-items: center; gap: .85rem;
  width: 100%; text-align: left;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: .9rem 1rem;
  font-family: var(--body); font-size: .9375rem; font-weight: 500; color: var(--ink);
  cursor: pointer;
  transition: border-color .12s ease, background-color .12s ease, transform .08s ease;
  min-height: 52px;   /* thumb-sized, this is answered on a phone */
}
.opt:hover { border-color: var(--ink-3); background: rgba(232, 135, 30, .04); }
.opt:active { transform: scale(.995); }
.opt__key {
  flex: none;
  display: grid; place-items: center;
  width: 24px; height: 24px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  font-family: var(--data); font-size: .6875rem; color: var(--ink-3);
}
.opt.is-picked {
  border-color: var(--marigold);
  background: rgba(232, 135, 30, .1);
}
.opt.is-picked .opt__key {
  background: var(--marigold); border-color: var(--marigold-deep); color: #21150a;
}

.quiz__nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-top: 1.25rem;
}
.quiz__hint {
  font-family: var(--data); font-size: .6875rem; letter-spacing: .06em;
  color: var(--ink-3);
}
@media (max-width: 560px) { .quiz__hint { display: none; } }

/* --- Result -------------------------------------------------------------- */

.result { padding: 3rem 0 4rem; }

.reveal {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
  padding-bottom: 2.5rem;
  border-bottom: 3px double var(--ink);
}
@media (max-width: 720px) {
  .reveal { grid-template-columns: 1fr; gap: 1.25rem; }
}

.reveal__num {
  font-family: var(--display);
  font-variation-settings: "SOFT" 20, "WONK" 0;
  font-weight: 700;
  font-size: clamp(4.5rem, 13vw, 8rem);
  line-height: .85;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}
.reveal__out {
  font-family: var(--data);
  font-size: .75rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3);
  margin-top: .5rem;
}
.reveal__band {
  font-family: var(--display);
  font-variation-settings: "SOFT" 30, "WONK" 1;
  font-weight: 600;
  font-size: clamp(1.6rem, 3.6vw, 2.35rem);
  letter-spacing: -.02em; line-height: 1.1;
  margin: 0 0 .6rem;
}
.reveal__line { margin: 0 0 1rem; color: var(--ink-2); max-width: 52ch; }
.reveal__bench {
  font-size: .875rem; color: var(--ink-2);
  border-left: 3px solid var(--gold);
  padding: .5rem 0 .5rem .85rem;
  margin: 0; max-width: 56ch;
}

/* Band ladder. Four segments, theirs lit, a marker at the exact score.
   The bands are a real ordered scale, so a numbered ladder earns its place. */
.ladder { margin: 2.5rem 0 3rem; }
.ladder__track {
  display: grid;
  grid-template-columns: 40fr 20fr 20fr 21fr;  /* 0-39, 40-59, 60-79, 80-100 */
  gap: 3px;
  position: relative;
}
.ladder__seg {
  height: 8px; background: var(--rule-2); border-radius: 2px;
}
.ladder__seg.is-here { background: var(--marigold); }
.ladder__seg.is-done { background: var(--rule); }
.ladder__marks {
  display: grid;
  grid-template-columns: 40fr 20fr 20fr 21fr;
  gap: 3px;
  margin-top: .6rem;
}
.ladder__mark {
  font-family: var(--data);
  font-size: .625rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3);
  line-height: 1.35;
}
.ladder__mark.is-here { color: var(--ink); font-weight: 600; }
.ladder__you {
  position: absolute; top: -6px;
  width: 2px; height: 20px; background: var(--ink);
  transform: translateX(-1px);
}
.ladder__you::after {
  content: "You";
  position: absolute; top: -1.15rem; left: 50%; transform: translateX(-50%);
  font-family: var(--data); font-size: .625rem; letter-spacing: .08em;
  color: var(--ink);
}
@media (max-width: 620px) {
  .ladder__marks { grid-template-columns: 1fr; gap: .2rem; }
  .ladder__mark { display: none; }
  .ladder__mark.is-here { display: block; }
}

/* Gaps: the part that has to land */
.gaps { margin: 0 0 3rem; }
.gaps__h { font-size: clamp(1.35rem, 2.8vw, 1.85rem); margin-bottom: 1.25rem; }
.gaps__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.gaps__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.25rem;
  padding: 1.25rem .25rem;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.gaps__cost {
  font-family: var(--data);
  font-size: .8125rem; font-weight: 600;
  color: var(--kumkum);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding-top: .15rem;
}
.gaps__dim {
  font-family: var(--data);
  font-size: .625rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 .3rem;
}
.gaps__text { margin: 0; font-size: 1rem; color: var(--ink); max-width: 62ch; }
.gaps__fix {
  margin: 1.5rem 0 0;
  padding: 1rem 1.25rem;
  background: var(--sheet);
  border-left: 3px solid var(--marigold);
  font-size: .9375rem;
}
.gaps__fix strong { font-weight: 600; }
@media (max-width: 560px) {
  .gaps__item { grid-template-columns: 1fr; gap: .4rem; }
}

/* The points ledger. Same grammar as the calculators. */
.panel {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  margin-bottom: 3rem;
}
.panel__head {
  padding: 1rem 1.25rem .875rem;
  border-bottom: 1px solid var(--rule);
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
}
.panel__title {
  font-family: var(--data);
  font-size: .6875rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-2);
}

.ledger {
  background: repeating-linear-gradient(
    to bottom, transparent 0, transparent 43px, var(--rule-2) 43px, var(--rule-2) 44px
  );
}
.ledger__rows { list-style: none; margin: 0; padding: 0; }
.ledger__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center; gap: .75rem;
  height: 44px; padding: 0 1.25rem;
}
.ledger__row:hover { background: rgba(232, 135, 30, .05); }
.ledger__name {
  font-size: .875rem; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ledger__sub {
  display: block;
  font-family: var(--data); font-size: .6875rem; color: var(--ink-3);
  line-height: 1; margin-top: .15rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ledger__amt {
  font-family: var(--data);
  font-size: .9375rem; font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: right; min-width: 7ch;
}
.ledger__amt--lost { color: var(--kumkum); }
.ledger__amt--full { color: var(--ink-3); }
.ledger__total {
  display: grid; grid-template-columns: 1fr auto;
  align-items: baseline; gap: .75rem;
  margin: 0 1.25rem; padding: .9rem 0 1rem;
  border-top: 3px double var(--ink);   /* accounting: a double rule means total */
}
.ledger__total-label {
  font-family: var(--data);
  font-size: .6875rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
}
.ledger__total-amt {
  font-family: var(--display);
  font-variation-settings: "SOFT" 30, "WONK" 0;
  font-weight: 700; font-size: clamp(1.5rem, 3.2vw, 2rem);
  font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1;
  color: var(--kumkum);
}

/* --- Lead capture -------------------------------------------------------- */

.lead {
  background: var(--ink);
  color: var(--sheet);
  border-radius: var(--r);
  padding: 2.5rem;
}
@media (max-width: 560px) { .lead { padding: 1.5rem; } }

.lead__h {
  color: var(--sheet);
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  margin-bottom: .7rem; max-width: 22ch;
}
.lead__sub { color: rgba(250, 251, 247, .72); margin: 0 0 1.75rem; max-width: 52ch; }

.lead__form { display: grid; gap: .85rem; max-width: 30rem; }
.lead__row { display: grid; gap: .35rem; }
.lead__label { font-size: .8125rem; font-weight: 600; color: rgba(250, 251, 247, .9); }
.lead__input {
  width: 100%;
  font-family: var(--data); font-size: .9375rem;
  color: var(--sheet);
  background: rgba(250, 251, 247, .07);
  border: 1px solid rgba(250, 251, 247, .22);
  border-radius: var(--r);
  padding: .65rem .8rem;
}
.lead__input::placeholder { color: rgba(250, 251, 247, .35); }
.lead__input:focus {
  outline: none;
  border-color: var(--marigold);
  box-shadow: 0 0 0 3px rgba(232, 135, 30, .2);
}
.lead__input.is-bad { border-color: #e8756d; }
.lead__err { font-size: .75rem; color: #f0a29b; min-height: 1em; }

.consent { display: flex; gap: .65rem; align-items: flex-start; margin: .35rem 0 .5rem; }
.consent input {
  flex: none; width: 18px; height: 18px; margin: .2rem 0 0; accent-color: var(--marigold);
}
.consent label { font-size: .8125rem; color: rgba(250, 251, 247, .72); line-height: 1.5; }
.consent a { color: rgba(250, 251, 247, .9); }

.lead__acts { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; }
.lead__note {
  font-family: var(--data); font-size: .6875rem;
  color: rgba(250, 251, 247, .4); margin: 1.25rem 0 0;
}

/* The honeypot must be reachable by nothing and invisible to everyone. */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px; overflow: hidden;
}

.done {
  background: rgba(232, 135, 30, .12);
  border: 1px solid var(--marigold);
  border-radius: var(--r);
  padding: 1.5rem;
  color: var(--sheet);
}
.done__h { color: var(--sheet); font-size: 1.35rem; margin-bottom: .4rem; }
.done p { margin: 0; color: rgba(250, 251, 247, .8); font-size: .9375rem; }

/* --- FAQ ----------------------------------------------------------------- */

.faq { padding: 3.5rem 0; border-top: 1px solid var(--rule); }
.faq__h { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 1.5rem; }
.faq__list { max-width: 68ch; }
.faq__item { border-bottom: 1px solid var(--rule); }
.faq__q {
  cursor: pointer; padding: 1rem 0;
  font-size: 1rem; font-weight: 600; list-style: none;
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after { content: "+"; font-family: var(--data); font-size: 1.1rem; color: var(--marigold-deep); flex: none; }
.faq__item[open] .faq__q::after { content: "\2212"; }
.faq__a { padding: 0 0 1.1rem; }
.faq__a p { margin: 0; color: var(--ink-2); font-size: .9375rem; max-width: 64ch; }

/* --- Colophon ------------------------------------------------------------ */

.colophon { border-top: 1px solid var(--rule); padding: 2.5rem 0; background: var(--sheet); }
.colophon__row {
  display: flex; flex-wrap: wrap; gap: 1rem 3rem;
  justify-content: space-between; align-items: baseline;
}
.colophon__note { margin: 0; font-size: .9375rem; max-width: 46ch; color: var(--ink-2); }
.colophon__legal { margin: 0; font-family: var(--data); font-size: .75rem; color: var(--ink-3); max-width: 34ch; }

.noscript {
  margin: 1rem 0 0; padding: 1rem 1.25rem;
  border: 1px solid var(--kumkum); border-radius: var(--r);
  background: rgba(158, 43, 37, .06); color: #6f231f; font-size: .875rem;
}

/* --- Motion -------------------------------------------------------------- */

@keyframes card-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card.is-new { animation: card-in .22s ease-out; }

@keyframes reveal-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.result.is-new { animation: reveal-in .4s ease-out; }

@media (prefers-reduced-motion: reduce) {
  .card.is-new, .result.is-new { animation: none; }
  .progress__bar { transition: none; }
  .btn:hover { transform: none; }
  .opt:active { transform: none; }
}
