/* civara.com/start: the Civara MVP v1 design's lighter funnel (Figma msW9xjg5hfd14ouIzSgqxJ,
   "Option B - Before account", 184:2636) at its own values: Plus Jakarta Sans, the wordmark in
   Ancizar Serif, a white page, #16181d ink; the estimate in government blue (USWDS #1a4480; product owner, 2026-10-27) where the design has green. Desktop sizes are the design's 1440 frames; phones
   stack the header and the estimate. Fonts are self-hosted; nothing loads from another host. */
@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('fonts/plus-jakarta-sans.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: 'Ancizar Serif';
  src: url('fonts/ancizar-serif.woff2') format('woff2');
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --ink: #16181d;
  --mark: #141414;
  --muted: #5b616b;
  --faint: #6b7079;
  --line: #e3e6ea;
  --line-strong: #c9cdd3;
  --soft: #f7f8fa;
  --soft-2: #f2f4f6;
  --blue: #2f5bd3;
  --blue-soft: #eaf0fd;
  --money: #1a4480;
  --money-text: #1f4e94;
  --money-soft: #eaf1fb;
  --money-line: #bcd0ef;
  --error: #b42318;
  --focus: #2491ff;
  --sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Ancizar Serif', Georgia, serif;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100dvh;
  background: #fff;
  color: var(--ink);
  font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
button,
input {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}
a {
  color: inherit;
}
p,
h1,
h2,
dl,
dd,
ul {
  margin: 0;
}
ul {
  padding: 0;
  list-style: none;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
h1:focus {
  outline: none;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.i {
  width: 16px;
  height: 16px;
  flex: none;
}

/* ---- the bar: wordmark, Back, progress, the estimate tally, Exit ---- */
.bar {
  position: relative;
  display: grid;
  grid-template-columns: auto auto auto 1fr auto 1fr auto auto auto;
  align-items: start;
  column-gap: 20px;
  padding: 18px max(40px, env(safe-area-inset-right, 0px)) 0
    max(40px, env(safe-area-inset-left, 0px));
  min-height: 80px;
}
.bar__brand {
  grid-column: 1;
  margin-top: 4px;
  font: 400 22px/1.2 var(--serif);
  color: var(--mark);
  text-decoration: none;
}
.bar__rule {
  width: 1px;
  height: 20px;
  margin-top: 8px;
  background: var(--line);
}
.bar__rule--back {
  grid-column: 2;
}
.bar__back,
.bar__exit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
.bar__back {
  grid-column: 3;
}
body[data-at='situation'] .bar__rule--back {
  visibility: hidden;
}
.bar__progress {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.bar__task {
  font-size: 14px;
  font-weight: 600;
}
.bars {
  display: flex;
  gap: 6px;
}
.bars i {
  width: 64px;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  transition: background 0.2s;
}
.bars i.on {
  background: var(--ink);
}
.bar__time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.bar__time .i {
  width: 14px;
  height: 14px;
}
.tally-wrap {
  grid-column: 7;
  position: relative;
  justify-self: end;
}
.bar > .bar__rule:not(.bar__rule--back) {
  grid-column: 8;
}
.bar__exit {
  grid-column: 9;
}

.tally {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  white-space: nowrap;
}
.tally:disabled {
  cursor: default;
}
.tally__label {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--muted);
}
.tally__amount {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--faint);
}
.tally__empty .i {
  width: 14px;
  height: 14px;
  color: var(--muted);
  display: block;
}
.tally__open {
  display: none;
}
.tally__open .i {
  display: block;
  transition: transform 0.15s;
}
.tally--on {
  background: var(--money-soft);
  border-color: var(--money-line);
}
.tally--on .tally__label {
  color: var(--money-text);
}
.tally--on .tally__amount {
  color: var(--money);
}
.tally--on .tally__empty {
  display: none;
}
.tally--on .tally__open {
  display: block;
}
.tally[aria-expanded='true'] .tally__open .i {
  transform: scaleY(-1);
}

.est {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  width: 300px;
  max-width: calc(100vw - 32px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
}
.est__label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--muted);
}
.est__total {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.56px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.est__rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.est__rows div {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  line-height: 1.45;
}
.est__rows dt {
  color: var(--muted);
}
.est__rows dd {
  font-weight: 600;
}
.est__note,
.est__how-text {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}
.est__how {
  align-self: flex-start;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--blue);
}

/* ---- a question: 560 wide, its heading 110px under the bar ---- */
.steps {
  padding: 110px max(16px, env(safe-area-inset-right, 0px)) 140px var(--gutter);
}
.q {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}
.q h1 {
  font-size: 36px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.9px;
  text-wrap: balance;
}
.q__lede {
  margin-top: -8px;
  font-size: 17px;
  color: var(--muted);
}
.q__hint {
  margin-top: -12px;
  font-size: 13px;
  color: var(--muted);
}
.q__link {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
}
.q__link:hover {
  text-decoration: underline;
}
.q__error {
  margin-top: -12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--error);
}

.roles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 270px));
  gap: 20px;
  width: 100%;
}
.role {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-height: 258px;
  padding: 28px 24px;
  border: 1.5px solid var(--line);
  border-radius: 20px;
  text-align: center;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.role:hover,
.answer:hover {
  border-color: var(--ink);
}
.role.is-picked,
.answer.is-picked {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 0.5px var(--ink);
}
.role__art {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
}
.role__icon {
  width: 48px;
  height: 48px;
}
.role__title {
  font-size: 18px;
  font-weight: 700;
}
.role__hint {
  margin-top: -6px;
  font-size: 14px;
  color: var(--muted);
}

.answers {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}
.answer {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 20px 22px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  text-align: left;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.answer__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.answer__title {
  font-size: 17px;
  font-weight: 600;
}
.answer__hint {
  font-size: 14px;
  color: var(--muted);
}
.answer__go {
  width: 20px;
  height: 20px;
  color: var(--muted);
}

.seg {
  display: inline-flex;
  padding: 4px;
  border-radius: 12px;
  background: var(--soft);
}
.seg__opt {
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}
.seg__opt[aria-checked='true'] {
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgb(0 0 0 / 6%);
}
.pay .seg__opt {
  padding: 11px 14px;
}

.field {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px 18px;
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  background: #fff;
  font-size: 18px;
}
.field:focus-within {
  box-shadow: 0 0 0 3px rgb(36 145 255 / 25%);
}
.field input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: 0;
  background: transparent;
  font-size: 18px;
  line-height: 1.5;
}
.field__icon {
  width: 20px;
  height: 20px;
}
.field input::-webkit-calendar-picker-indicator {
  display: none;
}
.field__pick {
  display: grid;
  color: var(--muted);
}
.field--money {
  width: 260px;
  gap: 6px;
}
.field__unit {
  color: var(--muted);
}
.field ::placeholder,
input.field::placeholder {
  color: var(--faint);
}
.pay {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.weekly {
  width: 100%;
  padding: 18px 22px;
  border-radius: 16px;
  background: var(--soft-2);
}
.weekly__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.weekly__amount {
  font-size: 24px;
  font-weight: 700;
}

.why {
  margin-top: -8px;
}
.why__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
}
.why__icon {
  width: 14px;
  height: 14px;
  transition: transform 0.15s;
}
.why__toggle[aria-expanded='true'] .why__icon {
  transform: scaleY(-1);
}
.why__text {
  max-width: 520px;
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px 24px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}
.cta:hover {
  background: #2b2e35;
}
.cta:disabled {
  opacity: 0.6;
  cursor: default;
}

/* ---- F6: the estimate beside the account box ---- */
.q--wide {
  max-width: 1072px;
  margin-top: -10px;
}
.result {
  display: grid;
  grid-template-columns: minmax(0, 520px) minmax(0, 480px);
  justify-content: space-between;
  gap: 72px;
  width: 100%;
}
.result__money {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.result__lead {
  font-size: 18px;
  color: var(--muted);
}
.q .result__total {
  font-size: 72px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -2.16px;
  color: var(--money);
}
.result__over {
  font-size: 16px;
  color: var(--muted);
}
.q .result__none {
  font-size: 32px;
  margin-bottom: 12px;
}
.result__maybe {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--money-text);
}
.result__rows {
  margin-top: 20px;
}
.result__rows li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-size: 15px;
}
.result__rows li > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.result__rows b {
  font-weight: 600;
  white-space: nowrap;
}
.result__rows small {
  font-size: 13px;
  color: var(--muted);
}
.claim {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  border-radius: 18px;
  background: var(--soft);
}
.claim__title {
  font-size: 22px;
  font-weight: 700;
}
.claim__body {
  font-size: 15px;
  color: var(--muted);
}
.claim__fine {
  font-size: 12px;
  color: var(--muted);
}
.join {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}
input.field {
  font-size: 16px;
  line-height: 1.5;
  outline: 0;
}
input.field:focus {
  box-shadow: 0 0 0 3px rgb(36 145 255 / 25%);
}
.join__hp {
  position: absolute;
  left: -9999px;
}
.join__status:empty {
  display: none;
}
.join__status {
  font-size: 14px;
  font-weight: 500;
}
.join__status[data-state='error'] {
  color: var(--error);
}
.join__status[data-state='saved'] {
  color: var(--money-text);
}
.join.is-done .field,
.join.is-done .cta {
  display: none;
}

/* ---- Ask Civara ---- */
.ask {
  position: fixed;
  z-index: 30;
  right: max(40px, env(safe-area-inset-right, 0px));
  bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}
.ask__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px 12px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgb(0 0 0 / 14%);
}
.ask__btn .i {
  width: 18px;
  height: 18px;
}
.ask__panel {
  width: 360px;
  max-width: calc(100vw - 32px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 24px rgb(0 0 0 / 14%);
}
.ask__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ask__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}
.ask__q {
  width: 18px;
  height: 18px;
  color: var(--blue);
}
.ask__close {
  color: var(--muted);
  display: grid;
}
.ask__body {
  font-size: 14px;
}
.noscript {
  padding: 24px;
  text-align: center;
}

/* ---- narrower screens ---- */
@media (max-width: 1100px) {
  .result {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    max-width: 560px;
    margin: 0 auto;
  }
}
@media (max-width: 860px) {
  .bar {
    grid-template-columns: auto auto auto 1fr auto auto auto;
    row-gap: 14px;
    padding-left: var(--gutter);
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }
  .bar__progress {
    position: static;
    transform: none;
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .tally-wrap {
    grid-column: 5;
  }
  .bar > .bar__rule:not(.bar__rule--back) {
    grid-column: 6;
  }
  .bar__exit {
    grid-column: 7;
  }
  .steps {
    padding-top: 48px;
  }
}
@media (max-width: 560px) {
  .bar {
    column-gap: 10px;
  }
  .bar__rule--back,
  .bar > .bar__rule,
  .tally__label {
    display: none;
  }
  .bar__back {
    font-size: 0;
    gap: 0;
  }
  .bar__back .i {
    width: 18px;
    height: 18px;
  }
  .bars i {
    width: 52px;
  }
  .q h1 {
    font-size: 28px;
    letter-spacing: -0.6px;
  }
  .q .result__total {
    font-size: 56px;
  }
  .roles {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .role {
    min-height: 0;
    flex-direction: row;
    flex-wrap: wrap;
    text-align: left;
    padding: 18px 20px;
    column-gap: 16px;
    row-gap: 2px;
  }
  .role__art {
    width: 56px;
    height: 56px;
    grid-row: span 2;
  }
  .role__icon {
    width: 28px;
    height: 28px;
  }
  .role {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    align-items: center;
  }
  .role__title,
  .role__hint {
    grid-column: 2;
  }
  .role__art {
    grid-row: 1 / span 2;
  }
  .role__hint {
    margin-top: 0;
  }
  .field--money {
    width: 100%;
  }
  .claim {
    padding: 22px;
  }
  .ask {
    right: max(16px, env(safe-area-inset-right, 0px));
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
}
