:root {
  color-scheme: light;
  --paper: #ffffff;
  --white: #ffffff;
  --ink: #101010;
  --muted: #6c6b65;
  --line: #d9d7ce;
  --red: #c52a25;
  --red-dark: #8e1714;
  --success: #195d38;
  --radius: 18px;
  --shadow: 0 18px 70px rgba(24, 23, 18, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
}
a { color: inherit; text-underline-offset: 0.18em; }
button, input { font: inherit; }
button, input, a { outline-offset: 4px; }
:focus-visible { outline: 3px solid var(--red); }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 20; background: var(--ink); color: white; padding: .8rem 1rem; }
.skip-link:focus { top: 1rem; }

.site-header {
  width: min(1420px, calc(100% - 48px));
  margin: 0 auto;
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand img { width: 34px; height: 34px; object-fit: contain; filter: grayscale(1) brightness(0); }
.brand strong { letter-spacing: .05em; }
.brand span { color: var(--muted); padding-left: 11px; border-left: 1px solid var(--line); }
.site-header nav { display: flex; gap: 24px; font-size: .9rem; }
.site-header nav a { text-decoration: none; }
.site-header nav a:hover { text-decoration: underline; }

main { width: min(1420px, calc(100% - 48px)); margin: 0 auto; }
.hero { padding: 108px 0 92px; border-bottom: 1px solid var(--line); }
.compact-hero { padding-bottom: 70px; }
.eyebrow { margin: 0 0 20px; color: var(--red); font-size: .72rem; font-weight: 750; letter-spacing: .16em; }
h1, h2, h3 { letter-spacing: -.035em; line-height: 1.04; }
.hero h1 { margin: 0; max-width: 930px; font-size: clamp(3.5rem, 8vw, 8.3rem); font-weight: 680; }
.lede { max-width: 670px; margin: 36px 0; color: #33322e; font-size: clamp(1.15rem, 2vw, 1.55rem); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-meta span { border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; color: var(--muted); font-size: .78rem; }

.guardrails { display: grid; grid-template-columns: .75fr 1.25fr; gap: 70px; padding: 72px 0; border-bottom: 1px solid var(--line); }
.guardrails h2 { max-width: 420px; margin: 0; font-size: clamp(2rem, 4vw, 3.7rem); }
.guardrail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); }
.guardrail-grid article { background: var(--paper); padding: 0 28px 10px; }
.guardrail-grid article > span { color: var(--red); font-size: .72rem; font-weight: 750; }
.guardrail-grid h3 { margin: 34px 0 12px; font-size: 1.25rem; }
.guardrail-grid p { margin: 0; color: var(--muted); }

.document-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 64px; padding: 72px 0 120px; }
.document-index { position: sticky; top: 30px; align-self: start; display: grid; gap: 10px; font-size: .85rem; }
.document-index > a { text-decoration: none; padding: 8px 0; border-bottom: 1px solid var(--line); }
.document-index dl { margin: 30px 0 0; }
.document-index dl div { margin-bottom: 20px; }
dt { color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
dd { margin: 4px 0 0; }
.hash { overflow-wrap: anywhere; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: .72rem; }
.document-main { min-width: 0; display: grid; gap: 28px; }
.privacy-layout .terms-section > div { grid-column: 2; }
.privacy-layout .terms-section > div p { grid-column: auto; }
.agreement-card, .signature-card, .receipt-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.agreement-card { padding: clamp(28px, 6vw, 78px); }
.agreement-card > header { padding-bottom: 55px; border-bottom: 2px solid var(--ink); }
.agreement-card h2, .signature-card h2, .receipt-card h2 { margin: 0; font-size: clamp(2.2rem, 5vw, 5.1rem); }
.agreement-intro { max-width: 900px; margin: 34px 0 0; font-size: 1.08rem; }
.terms-section { display: grid; grid-template-columns: minmax(190px, .65fr) 1.35fr; gap: 38px; padding: 42px 0; border-bottom: 1px solid var(--line); }
.terms-section h3 { margin: 0; font-size: 1.2rem; }
.terms-section p { grid-column: 2; margin: 0 0 18px; color: #33322e; }
.agreement-sources { padding-top: 45px; display: flex; flex-wrap: wrap; gap: 14px 24px; }
.agreement-sources h3, .agreement-sources p { width: 100%; margin: 0; }
.agreement-sources a { font-size: .9rem; }

.signature-card, .receipt-card { padding: clamp(28px, 5vw, 64px); }
.signature-card > header p:last-child { color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 42px 0 36px; }
label > span, legend { display: block; margin-bottom: 8px; font-size: .82rem; font-weight: 680; }
label em { color: var(--muted); font-weight: 400; }
input[type="text"], input[type="email"], input:not([type]) {
  width: 100%; min-height: 52px; border: 1px solid #b8b6ad; border-radius: 9px; background: white; color: var(--ink); padding: 12px 14px;
}
.wide { grid-column: 1 / -1; }
fieldset { margin: 0 0 36px; padding: 0; border: 0; }
legend { margin-bottom: 16px; }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; padding: 15px 0; border-top: 1px solid var(--line); }
.check:last-child { border-bottom: 1px solid var(--line); }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--red); }
.check span { margin: 0; font-weight: 450; }
.signature-input { display: block; margin: 38px 0 26px; }
.signature-input input { font-family: Georgia, serif; font-size: 1.45rem; }
.signature-input small { display: block; margin-top: 8px; color: var(--muted); }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.sign-button, .receipt-actions button {
  border: 0; border-radius: 999px; background: var(--ink); color: white; cursor: pointer; padding: 15px 22px; font-weight: 700;
}
.sign-button { width: 100%; min-height: 58px; display: flex; align-items: center; justify-content: space-between; font-size: 1rem; }
.sign-button:hover, .receipt-actions button:hover { background: var(--red-dark); }
.sign-button:disabled { cursor: wait; opacity: .6; }
.signature-note { margin: 12px 0 0; text-align: center; color: var(--muted); font-size: .78rem; }
.form-status { min-height: 28px; margin-bottom: 10px; color: var(--muted); }
.form-status.error { color: var(--red-dark); font-weight: 650; }

.receipt-card { position: relative; overflow: hidden; }
.receipt-seal { position: absolute; right: 32px; top: 32px; border: 3px solid var(--success); color: var(--success); padding: 9px 13px; transform: rotate(5deg); font-weight: 800; letter-spacing: .1em; }
.receipt-lede { color: var(--muted); }
.receipt-card dl { margin: 42px 0; border-top: 1px solid var(--line); }
.receipt-card dl div { display: grid; grid-template-columns: 180px 1fr; gap: 18px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.receipt-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.receipt-private { color: var(--muted); font-size: .78rem; }

.site-footer { width: min(1420px, calc(100% - 48px)); margin: 0 auto; padding: 34px 0 48px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: .78rem; }

@media (max-width: 900px) {
  .site-header nav { display: none; }
  .hero { padding: 70px 0 62px; }
  .guardrails { grid-template-columns: 1fr; gap: 42px; }
  .guardrail-grid { grid-template-columns: 1fr; }
  .guardrail-grid article { padding: 24px 0; }
  .guardrail-grid h3 { margin-top: 15px; }
  .document-layout { grid-template-columns: 1fr; }
  .document-index { position: static; grid-template-columns: repeat(3, 1fr); }
  .document-index .eyebrow, .document-index dl { grid-column: 1 / -1; }
  .terms-section { grid-template-columns: 1fr; gap: 18px; }
  .terms-section p { grid-column: 1; }
  .privacy-layout .terms-section > div { grid-column: 1; }
}

@media (max-width: 620px) {
  .site-header, main, .site-footer { width: min(100% - 28px, 1420px); }
  .brand span { display: none; }
  .hero h1 { font-size: 3.4rem; }
  .form-grid { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .document-index { grid-template-columns: 1fr; }
  .receipt-card dl div { grid-template-columns: 1fr; gap: 4px; }
  .receipt-seal { position: static; display: inline-block; margin-bottom: 26px; }
  .site-footer { flex-direction: column; }
}

@media print {
  body { background: white; }
  .site-header, .hero, .guardrails, .document-index, .agreement-card, .signature-card, .site-footer, .receipt-actions, .receipt-private { display: none !important; }
  main, .document-layout, .document-main { display: block; width: 100%; margin: 0; padding: 0; }
  .receipt-card { display: block !important; border: 0; box-shadow: none; padding: 0; }
  .receipt-card[hidden] { display: none !important; }
}
