:root {
  color-scheme: light;
  --ink: #282334;
  --muted: #655f6c;
  --purple: #4a1f73;
  --purple-deep: #371653;
  --purple-soft: #f1ebf5;
  --cream: #f8f5ef;
  --paper: #fffefa;
  --line: #e4dce8;
  --red: #9d332e;
  --yellow: #805b12;
  --green: #32634c;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--cream);
}

body {
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 83% 0%, rgba(225, 214, 234, .38), transparent 34rem),
    var(--cream);
}

a {
  color: var(--purple);
  text-underline-offset: .2em;
}

a:hover {
  color: var(--purple-deep);
}

:focus-visible {
  outline: 3px solid #8e69ab;
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.page-shell {
  width: min(100% - 48px, 1100px);
  margin-inline: auto;
}

.site-header {
  min-height: 85px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(74, 31, 115, .14);
}

.firm-mark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.firm-logo {
  display: block;
  width: auto;
  height: 36px;
  max-width: 100%;
}

.firm-monogram {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--paper);
  background: var(--purple);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  font-weight: 700;
}

.firm-name {
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -.04em;
}

.firm-name span {
  color: var(--purple);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
}

.header-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--purple);
  font-weight: 650;
}

.nav-divider {
  width: 1px;
  height: 18px;
  background: #d8cedf;
}

.nav-current {
  color: var(--muted);
}

main {
  padding: 53px 0 45px;
}

.intro {
  max-width: 680px;
  margin: 0 auto 36px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--purple);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .19em;
  text-transform: uppercase;
}

h1, h2, h3, p {
  margin-top: 0;
}

.intro h1 {
  margin-bottom: 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 6vw, 57px);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: 1.05;
}

.intro-copy {
  max-width: 590px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.decoder-layout {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  align-items: start;
  gap: 22px;
}

.entry-panel,
.result-panel {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 254, 250, .92);
  box-shadow: 0 12px 34px rgba(50, 33, 62, .055);
}

.lead-panel {
  margin-top: 22px;
  padding: 27px 29px 30px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--purple);
  border-radius: 13px;
  background: rgba(255, 254, 250, .96);
  box-shadow: 0 12px 34px rgba(50, 33, 62, .055);
  animation: reveal .28s ease both;
}

.lead-heading { max-width: 650px; margin-bottom: 24px; }
.lead-heading .eyebrow { margin-bottom: 8px; text-align: left; }
.lead-heading h2 { margin: 0 0 7px; font: 500 clamp(25px, 3vw, 32px)/1.15 Georgia, "Times New Roman", serif; letter-spacing: -.03em; }
.lead-heading p:last-child { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.lead-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.lead-field { display: grid; gap: 7px; color: #37313f; font-size: 13px; font-weight: 700; line-height: 1.4; }
.lead-wide { grid-column: 1 / -1; }
.lead-field input, .lead-field select { width: 100%; min-width: 0; min-height: 49px; padding: 12px 14px; border: 1px solid #cec3d5; border-radius: 6px; color: var(--ink); background: #fff; font: inherit; font-size: 15px; }
.lead-field input:focus, .lead-field select:focus { border-color: var(--purple); outline: none; box-shadow: 0 0 0 3px rgba(74, 31, 115, .12); }
.lead-choice-group, .lead-consents { min-width: 0; margin: 23px 0 0; padding: 0; border: 0; }
.lead-choice-group legend, .lead-consents legend { margin-bottom: 11px; color: #37313f; font-size: 13px; font-weight: 750; }
.worry-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.worry-options label, .lead-consents label { display: flex; align-items: flex-start; gap: 9px; color: #514a57; font-size: 13px; line-height: 1.5; }
.worry-options input, .lead-consents input { flex: 0 0 auto; width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--purple); }
.attached-line { margin: 22px 0 0; padding: 12px 14px; border-left: 3px solid #9475aa; color: #514a57; background: var(--purple-soft); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.lead-consents { display: grid; gap: 11px; }
.lead-disclosure { margin: 18px 0 0; color: #5b5361; font-size: 12px; line-height: 1.55; }
.lead-privacy { margin: 9px 0 0; font-size: 13px; }
.lead-status { margin: 17px 0 0; padding: 12px 14px; border-left: 3px solid var(--green); color: #315943; background: #edf5ef; font-size: 14px; line-height: 1.5; }
.lead-status[data-error="true"] { border-color: var(--red); color: #702b27; background: #faf0ee; }
.lead-submit { margin-top: 17px; }
.lead-submit:disabled { opacity: .65; cursor: wait; }

.entry-panel {
  padding: 27px 28px 30px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 25px;
}

.step-mark {
  flex: 0 0 auto;
  color: #8d6ca5;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  letter-spacing: .04em;
}

.panel-heading h2 {
  margin: -4px 0 5px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -.025em;
}

.panel-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.fields {
  display: grid;
  gap: 19px;
}

.field label {
  display: block;
  margin-bottom: 7px;
  color: #37313f;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.field {
  min-width: 0;
}

/* iOS date controls otherwise retain a native intrinsic minimum width. */
.field input[type="date"] {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-inline-size: 0;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.field input[type="date"]::-webkit-date-and-time-value,
.field input[type="date"]::-webkit-datetime-edit {
  min-width: 0;
  padding: 0;
  text-align: left;
}

.optional {
  color: var(--muted);
  font-weight: 500;
}

.field select,
.field input,
.field textarea {
  width: 100%;
  min-height: 49px;
  padding: 12px 14px;
  border: 1px solid #cec3d5;
  border-radius: 6px;
  color: var(--ink);
  background-color: #fff;
  font: inherit;
  font-size: 15px;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.field select {
  padding-right: 40px;
}

.field textarea {
  min-height: 102px;
  resize: vertical;
  line-height: 1.5;
}

.field select:focus,
.field input:focus,
.field textarea:focus {
  border-color: var(--purple);
  outline: none;
  box-shadow: 0 0 0 3px rgba(74, 31, 115, .12);
}

.field textarea::placeholder {
  color: #817987;
}

.field-help {
  margin: 7px 0 0;
  color: #716b77;
  font-size: 12px;
  line-height: 1.45;
}

.error-message {
  margin: 18px 0 0;
  padding: 11px 13px;
  border-left: 3px solid var(--red);
  color: #702b27;
  background: #faf0ee;
  font-size: 14px;
  line-height: 1.5;
}

.result-panel {
  overflow: hidden;
  padding: 27px 29px 30px;
  border-top: 3px solid var(--purple);
  animation: reveal .28s ease both;
}

.call-banner {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: -27px -29px 24px;
  padding: 16px 20px;
  color: #fffaf1;
  background: #752d2b;
}

.call-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f2c16b;
}

.call-banner p {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
}

.call-banner a {
  color: #fffaf1;
  font: inherit;
  white-space: nowrap;
}

.result-topline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 17px;
}

.result-kicker,
.next-step-label,
.clock-label {
  color: #746b79;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.notice-band {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 6px 11px;
  border: 1px solid currentColor;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
}

.notice-band[data-band="RED"] {
  color: var(--red);
  background: #fbefec;
}

.notice-band[data-band="YELLOW"] {
  color: var(--yellow);
  background: #faf4e3;
}

.notice-band[data-band="GREEN"] {
  color: var(--green);
  background: #edf5ef;
}

.band-symbol {
  width: 8px;
  height: 8px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.notice-band[data-band="RED"] .band-symbol {
  border-radius: 1px;
  background: currentColor;
}

.notice-band[data-band="YELLOW"] .band-symbol {
  transform: rotate(45deg);
  border-radius: 1px;
  background: currentColor;
}

.notice-band[data-band="GREEN"] .band-symbol {
  background: currentColor;
}

#result-name {
  margin: 0 0 9px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(25px, 3vw, 32px);
  font-weight: 500;
  letter-spacing: -.03em;
  line-height: 1.15;
}

.result-meaning {
  margin: 0;
  color: #514a57;
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.clock {
  margin-top: 23px;
  padding: 17px 18px 15px;
  border-left: 3px solid #9475aa;
  background: var(--purple-soft);
}

.clock-label {
  margin-bottom: 8px;
  color: var(--purple);
}

#deadline-line {
  margin-bottom: 3px;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.45;
}

#days-left {
  margin-bottom: 12px;
  color: #5b5361;
  font-size: 13px;
  line-height: 1.5;
}

.clock-warning {
  margin: 0;
  color: #3f3945;
  font-size: 12px;
  line-height: 1.55;
}

.expired-warning {
  margin: 12px 0 0;
  padding: 11px 13px;
  border: 1px solid #d9aaa2;
  color: #702b27;
  background: #fbefec;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.5;
}

.reflection {
  margin-top: 20px;
  padding: 17px 18px;
  border: 1px solid #e5dce9;
  border-radius: 5px;
  background: #fcf9fd;
}

.reflection h3 {
  margin-bottom: 8px;
  color: var(--purple);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 500;
}

#reflection-text {
  margin: 0;
  color: #514a57;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.review-next-step {
  margin-top: 21px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
}

.next-step-label {
  display: block;
  margin-bottom: 8px;
}

.review-link {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: 5px;
  color: #fff;
  background: var(--purple);
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
  transition: background-color .15s ease, transform .15s ease;
}

.review-link:hover {
  color: #fff;
  background: var(--purple-deep);
  transform: translateY(-1px);
}

.review-next-step p {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.phone-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-weight: 750;
}

.entry-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 19px;
}

.button {
  min-height: 46px;
  padding: 10px 15px;
  border: 1px solid var(--purple);
  border-radius: 5px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: color .15s ease, background-color .15s ease, transform .15s ease;
}

.button:active {
  transform: translateY(1px);
}

.button-quiet {
  color: var(--purple);
  background: transparent;
}

.button-quiet:hover {
  background: var(--purple-soft);
}

.button-print {
  color: #fff;
  background: var(--purple);
}

.button-print:hover {
  background: var(--purple-deep);
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  max-width: 680px;
  margin: 24px auto 0;
  color: #6b6571;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  justify-content: center;
}

.privacy-mark {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #9d91a4;
  border-radius: 50%;
  color: var(--purple);
  font-size: 10px;
  font-weight: 800;
}

.site-footer {
  min-height: 85px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-top: 1px solid rgba(74, 31, 115, .14);
}

.footer-brand {
  flex: 0 0 auto;
  color: var(--purple);
  font-size: 12px;
  font-weight: 800;
}

.footer-brand span {
  color: #77717c;
  font-weight: 500;
}

.site-footer p {
  max-width: 620px;
  margin: 0;
  color: #716b77;
  font-size: 11px;
  line-height: 1.5;
  text-align: right;
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 32px, 560px);
  }

  .site-header {
    min-height: 72px;
  }

  .header-nav {
    gap: 10px;
    font-size: 12px;
  }

  main {
    padding-top: 39px;
  }

  .intro {
    margin-bottom: 28px;
  }

  .intro-copy {
    font-size: 15px;
  }

  .decoder-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 17px;
  }

  .entry-panel,
  .result-panel,
  .lead-panel {
    padding: 23px 20px 24px;
  }

  .call-banner {
    margin: -23px -20px 21px;
    padding: 14px 15px;
  }

  .call-banner p {
    font-size: 13px;
  }

  .entry-actions {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
  }
  .lead-fields { grid-template-columns: minmax(0, 1fr); }
  .lead-wide { grid-column: auto; }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 19px 0;
  }

  .site-footer p {
    text-align: left;
  }
}

@media (max-width: 420px) {
  .page-shell {
    width: min(100% - 24px, 560px);
  }

  .firm-name {
    font-size: 15px;
  }

  .firm-monogram {
    width: 31px;
    height: 31px;
  }

  .nav-divider,
  .nav-current {
    display: none;
  }

  .intro h1 {
    font-size: 39px;
  }

  .entry-actions {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

.print-summary-footer {
  display: none;
}

@media print {
  @page {
    margin: 8mm;
  }

  :root {
    color-scheme: light;
  }

  html,
  body {
    min-width: 0;
    min-height: 0;
    height: auto;
    color: #000;
    background: #fff;
    font-size: 10pt;
    line-height: 1.35;
  }

  body::before,
  .header-nav,
  .entry-panel,
  .lead-panel,
  .entry-actions,
  .privacy-note,
  .review-next-step,
  .step-mark,
  .result-kicker,
  .clock-label {
    display: none !important;
  }

  .page-shell {
    width: 100%;
  }

  .site-header {
    min-height: 0;
    justify-content: flex-start;
    padding-bottom: 8px;
    border-bottom: 1px solid #777;
  }

  .firm-mark,
  .firm-name,
  .firm-name span,
  .footer-brand,
  .footer-brand span {
    color: #000;
  }

  main {
    padding: 12px 0;
  }

  .intro {
    margin: 0 0 12px;
    text-align: left;
  }

  .intro .eyebrow,
  .intro-copy {
    display: none;
  }

  .intro h1 {
    margin: 0;
    color: #000;
    font-size: 22px;
  }

  .decoder-layout {
    display: block;
  }

  body[data-future-date="true"] {
    display: none !important;
  }

  #decoder-result:not([hidden]) {
    display: block !important;
    padding: 0;
    overflow: visible;
    border: 0;
    color: #000;
    background: #fff;
    box-shadow: none;
    animation: none;
  }

  .result-panel {
    margin-bottom: 0;
  }

  .call-banner:not([hidden]) {
    display: grid !important;
    margin: 0 0 10px;
    padding: 7px 10px;
    border: 1px solid #000;
    color: #000;
    background: #fff;
  }

  .call-banner a {
    color: #000;
  }

  .result-topline {
    margin: 0;
  }

  .notice-band,
  .notice-band[data-band] {
    min-height: 0;
    margin-bottom: 8px;
    padding: 4px 8px;
    color: #000;
    background: #fff;
    border-color: #000;
    print-color-adjust: exact;
  }

  #result-name,
  .result-meaning,
  #deadline-line,
  #days-left,
  .clock-warning,
  .expired-warning,
  #reflection-text,
  .reflection h3 {
    color: #000;
  }

  .clock,
  .reflection,
  .expired-warning {
    margin-top: 12px;
    padding: 10px 12px;
    border-color: #555;
    color: #000;
    background: #fff;
  }

  .reflection {
    break-inside: avoid;
  }

  #result-name {
    margin-bottom: 8px;
    font-size: 22px;
  }

  .result-meaning,
  #reflection-text {
    font-size: 10pt;
    line-height: 1.4;
  }

  #result-printed-date,
  #deadline-line,
  #days-left,
  .clock-warning {
    margin-bottom: 7px;
  }

  .clock-warning,
  .expired-warning {
    font-size: 9pt;
    line-height: 1.35;
  }

  .site-footer {
    min-height: 0;
    display: block;
    padding: 8px 0 0;
    border-top: 1px solid #777;
  }

  .site-footer p {
    max-width: none;
    margin-top: 7px;
    color: #000;
    text-align: left;
    font-size: 8pt;
    line-height: 1.35;
  }

  .site-footer .print-summary-footer {
    display: block;
    white-space: pre-line;
  }

  a {
    color: #000;
    text-decoration: none;
  }
}
