/* My Expungement Lawyer - McDonald Law Firm LLC */
:root {
  --bg: #f3f6f1;
  --bg-deep: #e4ebe3;
  --paper: #fbfaf6;
  --ink: #1a2a22;
  --ink-soft: #5a675f;
  --accent: #2a6a55;
  --accent-dark: #1e5241;
  --accent-soft: #dcebe4;
  --teal: #2a6a55;
  --teal-dark: #1e5241;
  --teal-soft: #dcebe4;
  --gold: #b8893d;
  --line: #d5ddd4;
  --danger: #9b1c1c;
  --shadow: 0 20px 50px rgba(26, 42, 34, 0.1);
  --shadow-sm: 0 8px 24px rgba(26, 42, 34, 0.06);
  --radius: 1.5rem;
  --radius-sm: 0.9rem;
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --max: 70rem;
  --header-h: 4.25rem;
  --focus: 0 0 0 3px var(--paper), 0 0 0 6px var(--accent);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html.js {
  scroll-padding-top: calc(var(--header-h) + 0.5rem);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 8% -12%, #e7f0e6 0%, transparent 55%),
    radial-gradient(900px 420px at 100% 0%, #f3ead3 0%, transparent 52%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--teal-dark);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--accent-dark);
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
  box-shadow: var(--focus);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
}

.wordmark-mark {
  width: 2.35rem;
  height: 2.35rem;
  flex: none;
}

.wordmark-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.wordmark-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}

.wordmark-name {
  font-weight: 700;
  font-size: 0.98rem;
}

.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
}

.header-phone:hover {
  background: var(--teal-dark);
  color: #fff;
}

.hero {
  padding: 2.35rem 0 2.6rem;
}

.hero-grid {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 900px) {
  .hero {
    padding: 3.4rem 0 3.4rem;
  }

  .hero-grid {
    grid-template-columns: 1fr min(28.5rem, 46%);
    gap: 3rem;
    align-items: center;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin: 0 0 0.85rem;
}

.hero h1 {
  font-family: var(--display);
  font-weight: 650;
  font-size: clamp(2.05rem, 4.2vw, 3.15rem);
  line-height: 1.14;
  letter-spacing: -0.02em;
  margin: 0 0 0.85rem;
  text-wrap: balance;
}

.lede {
  font-size: 1.2rem;
  color: var(--ink);
  margin: 0 0 1.25rem;
  max-width: 34rem;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.1rem;
  padding: 0;
  margin: 0 0 0.5rem;
  list-style: none;
}

.trust-row li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.trust-row li::before {
  content: "";
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0.22rem var(--teal-soft);
  flex: none;
}

.hero-aside {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin: 1rem 0 0;
  max-width: 34rem;
}

.quiz-card {
  scroll-margin-top: calc(var(--header-h) + 0.75rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 0.15rem);
  box-shadow: var(--shadow);
  padding: 1.2rem 1.15rem 1.3rem;
  position: relative;
}

.quiz-card.ticket-edge {
  background:
    radial-gradient(circle at 0 3.15rem, var(--bg) 0.55rem, transparent 0.57rem),
    radial-gradient(circle at 100% 3.15rem, var(--bg) 0.55rem, transparent 0.57rem),
    var(--paper);
}

.quiz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.quiz-label {
  font-weight: 700;
  font-size: 0.92rem;
}

.progress-text {
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 600;
}

.progress {
  height: 0.42rem;
  background: var(--bg-deep);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1.1rem;
}

.progress-bar {
  height: 100%;
  width: 8%;
  background: linear-gradient(90deg, var(--accent) 0%, #b8893d 100%);
  border-radius: inherit;
  transition: width 0.35s ease;
}

.step {
  display: block;
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.js .step {
  display: none;
}

.js .step.is-active {
  display: block;
  animation: rise 0.35s ease;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.step legend,
.step-title {
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 650;
  line-height: 1.25;
  margin: 0 0 0.9rem;
  padding: 0;
}

.hint {
  margin: -0.35rem 0 0.9rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.choices {
  display: grid;
  gap: 0.55rem;
}

.choice {
  position: relative;
}

.choice input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.choice span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  min-height: 3.35rem;
  padding: 0.7rem 0.95rem;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.3;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.choice span::after {
  content: "";
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--line);
  border-radius: 50%;
  flex: none;
  background: #fff;
}

.choice input:hover + span,
.choice span:hover {
  border-color: color-mix(in srgb, var(--teal) 55%, var(--line));
}

.choice input:checked + span {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.choice input:checked + span::after {
  border-color: var(--teal);
  background: var(--teal);
  box-shadow: inset 0 0 0 3px #fff;
}

.choice input:focus-visible + span {
  box-shadow: var(--focus);
}

.reveal {
  margin-top: 0.85rem;
}

.reveal[hidden] {
  display: none;
}

label.field,
.field-label {
  display: block;
  font-weight: 650;
  font-size: 0.92rem;
  margin: 0 0 0.4rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
  width: 100%;
  font: inherit;
  color: inherit;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 0.8rem;
  padding: 0.7rem 0.8rem;
  margin-bottom: 0.85rem;
}

textarea {
  min-height: 6.5rem;
  resize: vertical;
}

input:hover,
select:hover,
textarea:hover {
  border-color: color-mix(in srgb, var(--teal) 40%, var(--line));
}

.quiz-nav {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1rem;
}

.js .nojs-only {
  display: none;
}

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 3.05rem;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
}

.btn:hover {
  background: var(--accent-dark);
  color: #fff;
}

.btn-teal {
  background: var(--teal);
}

.btn-teal:hover {
  background: var(--teal-dark);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--line);
}

.btn-ghost:hover {
  background: var(--bg-deep);
  color: var(--ink);
}

.btn-wide {
  width: 100%;
}

.link-back {
  background: none;
  border: 0;
  font: inherit;
  font-weight: 650;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 0.4rem 0.2rem;
}

.link-back:hover {
  color: var(--ink);
}

.js .link-back[hidden] {
  display: none;
}

.btn[hidden] {
  display: none !important;
}


.checking {
  text-align: center;
  padding: 1.5rem 0.5rem 1rem;
}

.checking-mark {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 0.9rem;
  border-radius: 50%;
  border: 3px solid var(--teal-soft);
  border-top-color: var(--teal);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.result-box {
  background: var(--teal-soft);
  border: 1px solid color-mix(in srgb, var(--teal) 28%, var(--line));
  border-radius: var(--radius-sm);
  padding: 0.95rem 1rem;
  margin: 0 0 1.1rem;
}

.result-box h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.result-box p {
  margin: 0 0 0.55rem;
  font-size: 0.98rem;
}

.result-box p:last-child {
  margin-bottom: 0;
}

.fine-print {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0.15rem 0 0.85rem;
}

.honeypot {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

.error-note {
  display: none;
  color: var(--danger);
  font-size: 0.9rem;
  font-weight: 650;
  margin: 0 0 0.6rem;
}

.show-errors .error-note {
  display: block;
}

.band {
  background: var(--ink);
  color: #fff;
  padding: 1.35rem 0;
}

.band-inner {
  display: grid;
  gap: 0.35rem 2rem;
}

@media (min-width: 800px) {
  .band-inner {
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
  }
}

.band h2 {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 0.25rem;
  letter-spacing: -0.02em;
}

.band p {
  margin: 0;
  color: #e8e4dc;
}

.band strong {
  color: #fff;
}

.section {
  padding: 3rem 0;
}

.section h2 {
  font-family: var(--display);
  font-size: clamp(1.7rem, 3.2vw, 2.25rem);
  margin: 0 0 1.25rem;
  letter-spacing: -0.02em;
}

.steps {
  display: grid;
  gap: 1rem;
}

@media (min-width: 800px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.15rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 0.7rem;
}

.step-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.12rem;
}

.step-card p {
  margin: 0;
  color: var(--ink-soft);
}

.price-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 800px) {
  .price-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.price-card,
.about-card,
.matter-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.2rem;
  box-shadow: var(--shadow-sm);
}

.price-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.price-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.price-list li:last-child {
  border-bottom: 0;
}

.price-list strong {
  font-variant-numeric: tabular-nums;
}

.note {
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.split {
  display: grid;
  gap: 1rem;
}

@media (min-width: 800px) {
  .split {
    grid-template-columns: 1fr 1fr;
  }
}

.monogram {
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 1.1rem;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 650;
  font-size: 1.5rem;
  margin-bottom: 0.85rem;
}

.about-card h3,
.matter-card h3 {
  margin: 0 0 0.4rem;
}

.about-card p,
.matter-card p {
  margin: 0 0 0.7rem;
}

.about-card p:last-child,
.matter-card p:last-child {
  margin-bottom: 0;
}

.faq-list {
  display: grid;
  gap: 0.65rem;
}

details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.15rem 1rem;
}

summary {
  cursor: pointer;
  font-weight: 700;
  padding: 0.85rem 0;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  float: right;
  font-weight: 500;
  color: var(--ink-soft);
}

details[open] summary::after {
  content: "\2212";
}

details p {
  margin: 0 0 0.95rem;
  color: var(--ink-soft);
}

.cross {
  padding: 0 0 3rem;
}

.cross-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  background: var(--teal-soft);
  border: 1px solid color-mix(in srgb, var(--teal) 25%, var(--line));
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
}

.cross-card h2 {
  font-size: 1.35rem;
  margin: 0 0 0.25rem;
}

.cross-card p {
  margin: 0;
  color: var(--ink-soft);
}

.site-footer {
  background: var(--ink);
  color: #d9d3c7;
  padding: 2.4rem 0 2rem;
  font-size: 0.95rem;
}

.site-footer a {
  color: #fff;
}

.footer-grid {
  display: grid;
  gap: 1.4rem;
}

@media (min-width: 800px) {
  .footer-grid {
    grid-template-columns: 1.2fr 1fr;
  }
}

.site-footer h2 {
  font-family: var(--display);
  color: #fff;
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
}

.site-footer p {
  margin: 0 0 0.55rem;
}

.legal {
  margin-top: 1.3rem;
  padding-top: 1.2rem;
  border-top: 1px solid #334;
  font-size: 0.86rem;
  color: #c4bdb0;
}

.legal p {
  margin: 0 0 0.65rem;
}

.thanks-main {
  padding: 3rem 0 4rem;
  min-height: 60vh;
}

.thanks-card {
  max-width: 38rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.6rem 1.4rem;
}

.thanks-card h1 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 0 0 0.75rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


@media (max-width: 520px) {
  .header-phone {
    white-space: nowrap;
    flex: none;
    font-size: 0.8rem;
    padding: 0.48rem 0.65rem;
    gap: 0.28rem;
  }

  .header-phone svg {
    width: 14px;
    height: 14px;
  }

  .wordmark {
    min-width: 0;
  }

  .wordmark-name {
    font-size: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .step.is-active,
  .checking-mark,
  .progress-bar {
    animation: none;
    transition: none;
  }
}


/* Case intake pages */
.page-main {
  padding: 0 0 3rem;
}

.page-hero {
  padding: 2.1rem 0 1.15rem;
}

.page-hero h1 {
  font-family: var(--display);
  font-weight: 650;
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.65rem;
}

.page-hero .wrap {
  max-width: 48rem;
}

.page-hero .lede {
  margin-bottom: 0;
  max-width: none;
}

.intake-card {
  scroll-margin-top: calc(var(--header-h) + 0.75rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 0.15rem);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.15rem 1.4rem;
  max-width: 48rem;
  margin: 0 auto 2.5rem;
}

.stepper {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1.15rem;
  padding: 0;
}

.stepper li {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  background: var(--bg-deep);
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
}

.stepper li.is-current {
  color: #fff;
  background: var(--teal);
}

.stepper li.is-done {
  color: var(--teal-dark);
  background: var(--teal-soft);
}

.intake-step {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.js .intake-step {
  display: none;
}

.js .intake-step.is-active {
  display: block;
  animation: rise 0.35s ease;
}

.intake-step legend,
.intake-title {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 650;
  line-height: 1.25;
  margin: 0 0 0.45rem;
  padding: 0;
}

.fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 1rem;
}

@media (min-width: 700px) {
  .fields.two {
    grid-template-columns: 1fr 1fr;
  }

  .fields.three {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .span-2 {
    grid-column: 1 / -1;
  }
}

.fields .field,
.fields .field-label {
  margin-top: 0.15rem;
}

.check-grid {
  display: grid;
  gap: 0.45rem;
  margin: 0 0 0.9rem;
}

@media (min-width: 700px) {
  .check-grid.two {
    grid-template-columns: 1fr 1fr;
  }
}

.check-item {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 0.8rem;
  padding: 0.65rem 0.75rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.check-item input {
  margin-top: 0.2rem;
  flex: none;
}

.repeat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.95rem 0.9rem 0.7rem;
  margin-bottom: 0.85rem;
}

.repeat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.repeat-head h3 {
  margin: 0;
  font-size: 1.02rem;
}

.btn-small {
  min-height: 2.2rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.88rem;
}

.consent {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  background: var(--teal-soft);
  border: 1px solid color-mix(in srgb, var(--teal) 25%, var(--line));
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.9rem;
  margin: 0.4rem 0 0.9rem;
}

.consent input {
  margin-top: 0.25rem;
  flex: none;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1rem 0 0;
}

.result-hire {
  margin: 0.85rem 0 1rem;
}

@media (prefers-reduced-motion: reduce) {
  .js .intake-step.is-active {
    animation: none;
  }
}


.js .js-submit-early {
  display: none;
}

.gate-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1rem 1.15rem;
  margin: 0.35rem 0 0.2rem;
}

.gate-panel h2 {
  margin: 0 0 0.65rem;
  font-family: var(--display);
  font-size: clamp(1.45rem, 3vw, 1.95rem);
  line-height: 1.2;
}

.gate-panel p {
  margin: 0 0 0.7rem;
}

.gate-panel-ok {
  border-color: color-mix(in srgb, var(--teal) 35%, var(--line));
  background: color-mix(in srgb, var(--teal-soft) 70%, #fff);
}

.gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: stretch;
  margin-top: 1rem;
}

.gate-actions .btn,
.gate-actions .btn-ghost {
  margin: 0;
  text-align: center;
}

.gate-actions .btn-ghost {
  text-decoration: none;
}

@media (max-width: 640px) {
  .gate-actions .btn,
  .gate-actions .btn-ghost {
    width: 100%;
  }
}

/* Sign and consult pages */
.sign-main,
.consult-main {
  padding: 0 0 3.5rem;
}

.sign-card,
.consult-card {
  scroll-margin-top: calc(var(--header-h) + 0.75rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 0.15rem);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.15rem 1.5rem;
  max-width: 48rem;
  margin: 0 auto 2rem;
}

.agreement-label {
  font-weight: 650;
  font-size: 0.92rem;
  margin: 0 0 0.45rem;
}

.agreement-box {
  max-height: min(28rem, 65vh);
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 0.9rem;
  padding: 1rem 1.05rem;
  margin: 0 0 1.15rem;
  font-size: 0.92rem;
  line-height: 1.55;
  -webkit-overflow-scrolling: touch;
}

.signature-input {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 500;
}

.field-error {
  color: var(--danger);
  font-size: 0.9rem;
  font-weight: 650;
  margin: -0.55rem 0 0.85rem;
}

.pay-panel {
  background: color-mix(in srgb, var(--teal-soft) 65%, #fff);
  border: 1px solid color-mix(in srgb, var(--teal) 30%, var(--line));
  border-radius: var(--radius-sm);
  padding: 1.1rem 1rem 1.2rem;
  margin: 0.35rem 0 0.5rem;
}

.pay-panel h2 {
  font-family: var(--display);
  font-size: clamp(1.45rem, 3vw, 1.95rem);
  line-height: 1.2;
  margin: 0 0 0.7rem;
}

.pay-amount {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0.2rem 0 0.85rem;
}

.pay-reference {
  font-weight: 700;
  word-break: break-word;
}

.btn-pay {
  width: 100%;
  min-height: 3.6rem;
  font-size: 1.12rem;
  margin: 0.35rem 0 0.9rem;
}

.pay-thanks {
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px solid color-mix(in srgb, var(--teal) 20%, var(--line));
}

@media (max-width: 640px) {
  .sign-card,
  .consult-card {
    padding: 1.05rem 0.9rem 1.25rem;
  }

  .agreement-box {
    max-height: min(22rem, 60vh);
    padding: 0.85rem 0.8rem;
  }
}
