:root {
  --ink: #17211d;
  --muted: #52605a;
  --paper: #f5f2ea;
  --panel: #fffdf8;
  --line: #d9d5ca;
  --forest: #214f40;
  --forest-deep: #15382e;
  --sage: #a8c0b2;
  --gold: #8b672c;
  --danger: #a03d32;
  --shadow: 0 20px 60px rgba(29, 48, 39, 0.11);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 1000; top: 12px; left: 12px; min-height: 44px; display: inline-flex; align-items: center; padding: 12px 16px; color: #fff; background: var(--forest-deep); border-radius: 8px; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }

.site-header, .app-header, .review-header {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { min-height: 44px; display: inline-flex; align-items: center; gap: 11px; font-weight: 760; text-decoration: none; letter-spacing: -0.02em; }
.brand-mark { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 50% 50% 44% 44%; color: #fff; background: var(--forest); font-family: Georgia, serif; }
nav { display: flex; align-items: center; gap: 26px; }
nav > a { min-height: 44px; display: inline-flex; align-items: center; color: #3b4943; text-decoration: none; font-size: 0.92rem; }
nav > a:hover { color: var(--forest); }

.button {
  min-height: 44px;
  border: 1px solid var(--forest);
  border-radius: 999px;
  color: #fff;
  background: var(--forest);
  padding: 13px 22px;
  font-weight: 720;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}
.button:hover { background: var(--forest-deep); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(33, 79, 64, 0.18); }
.button:focus-visible, input:focus-visible, textarea:focus-visible, .tab:focus-visible, .icon-button:focus-visible, .danger-link:focus-visible, a:focus-visible, [tabindex="-1"]:focus-visible { outline: 3px solid #8b672c; outline-offset: 3px; }
.button-small { padding: 9px 16px; font-size: 0.9rem; }
.button-quiet { color: var(--forest); background: transparent; border-color: #6f8278; }
.button-quiet:hover { color: #fff; background: var(--forest); }
.button-full { width: 100%; }
.text-link { color: var(--forest); font-weight: 720; text-underline-offset: 4px; }

.hero { padding: 70px 0 100px; display: grid; grid-template-columns: 1.04fr 0.82fr; align-items: center; gap: 80px; }
.eyebrow { margin: 0 0 12px; color: var(--forest); font-size: 0.74rem; font-weight: 820; letter-spacing: 0.14em; text-transform: uppercase; }
.hero h1, .section h2, .auth-pitch h1, .dashboard-heading h1, .review-proof h1 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: -0.04em; }
.hero h1 { font-size: clamp(3.4rem, 6.3vw, 6.2rem); line-height: 0.94; margin: 0 0 28px; }
.hero h1 span { color: var(--forest); }
.lede { max-width: 680px; color: #4c5953; font-size: 1.14rem; line-height: 1.7; }
.hero-actions { margin: 32px 0 15px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.microcopy, .mock-label, .field-help { color: var(--muted); font-size: 0.82rem; }

.proof-card { background: var(--panel); border: 1px solid #e1ddd3; border-radius: 26px; padding: 24px; box-shadow: var(--shadow); transform: rotate(1.1deg); }
.proof-card-top, .hash-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.proof-card-top > div { display: flex; align-items: center; gap: 9px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #3c8d67; box-shadow: 0 0 0 5px #e8f3ec; }
.pill { padding: 6px 10px; border-radius: 999px; background: #edf1ed; color: #4f6157; font-size: 0.76rem; font-weight: 750; }
.stone-preview { min-height: 220px; margin: 22px 0; border-radius: 14px; display: grid; place-items: end center; overflow: hidden; background: radial-gradient(circle at 50% 30%, #ddd9cf 0, #c4c1b8 55%, #a8a59d 100%); }
.monument-shape { width: 72%; height: 165px; padding: 52px 20px 20px; background: linear-gradient(115deg, #323c38, #58615c 46%, #2b3531); color: #f5f0e5; text-align: center; border-radius: 80px 80px 3px 3px; box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 18px 30px rgba(0,0,0,.2); font-family: Georgia, serif; letter-spacing: 0.08em; }
.monument-shape small, .monument-shape i { display: block; margin-top: 7px; font-size: 0.65rem; }
.monument-shape i { color: #ddd5c5; font-size: 0.55rem; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 10px; font-size: 0.9rem; color: #455149; }
.check-list span { color: #3c8d67; font-weight: 900; }
.hash-row { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 16px; color: var(--muted); font-size: 0.73rem; }
.hash-row code { color: var(--ink); }
.mock-label { margin: 15px 0 0; text-align: center; }

.trust-strip { border-block: 1px solid #d9d4c8; background: #ece8de; }
.trust-grid { min-height: 72px; display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; text-align: center; color: #59645f; font-size: 0.84rem; font-weight: 700; }
.trust-grid span + span { border-left: 1px solid #d2cdc2; }
.section { padding-block: 110px; }
.section-heading { max-width: 720px; margin-bottom: 55px; }
.section h2 { margin: 0 0 18px; font-size: clamp(2.4rem, 4.6vw, 4.4rem); line-height: 1.05; }
.section-heading > p:last-child, .pricing-copy > p:last-child { color: var(--muted); line-height: 1.7; font-size: 1.05rem; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.steps article { min-height: 260px; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255, 253, 248, 0.62); }
.step-number { color: var(--gold); font-family: Georgia, serif; font-size: 1.4rem; }
.steps h3 { margin: 54px 0 12px; font-size: 1.35rem; }
.steps p { color: var(--muted); line-height: 1.65; }
.section-dark { color: #f4f0e7; background: var(--forest-deep); }
.integrity-grid { display: grid; grid-template-columns: 0.85fr 1fr; gap: 90px; align-items: start; }
.eyebrow-light { color: #b9d1c4; }
.boundary-list { display: grid; gap: 0; }
.boundary-list p { margin: 0; padding: 20px 0; border-bottom: 1px solid rgba(255,255,255,.16); color: #cdd8d2; line-height: 1.55; }
.boundary-list strong { color: #fff; }
.pricing-section { display: grid; grid-template-columns: 1fr 440px; gap: 100px; align-items: center; }
.price-card { padding: 34px; border: 1px solid var(--line); border-radius: 24px; background: var(--panel); box-shadow: var(--shadow); }
.price-card > p { margin-top: 0; color: var(--muted); font-weight: 700; }
.price-card > div { display: flex; align-items: baseline; gap: 8px; }
.price-card strong { font-family: Georgia, serif; font-size: 4.2rem; font-weight: 500; }
.price-card ul { list-style: none; padding: 18px 0; display: grid; gap: 13px; }
.price-card li::before { content: "✓"; color: var(--forest); font-weight: 900; margin-right: 10px; }
.price-card .button { width: 100%; }
.price-card small { display: block; margin-top: 14px; text-align: center; color: var(--muted); }
.site-footer { border-top: 1px solid var(--line); min-height: 130px; display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; gap: 20px; color: var(--muted); font-size: 0.82rem; }
.site-footer p:last-child { text-align: right; }
.legal-page { width: min(760px, calc(100% - 40px)); padding-block: 80px 120px; }
.legal-page h1 { margin: 0 0 30px; font-family: Georgia, serif; font-size: clamp(3rem, 6vw, 5rem); font-weight: 500; letter-spacing: -0.04em; }
.legal-page h2 { margin-top: 38px; }
.legal-page p { color: var(--muted); font-size: 1.02rem; line-height: 1.75; }
.legal-page address { color: var(--muted); font-style: normal; line-height: 1.75; }

/* App */
.app-body { background: #f1efe9; }
.app-header { border-bottom: 1px solid var(--line); }
.app-header-actions { display: flex; align-items: center; gap: 14px; }
.app-main { padding-block: 55px 100px; }
.auth-layout { min-height: 650px; display: grid; grid-template-columns: 1fr 450px; gap: 100px; align-items: center; }
.auth-pitch h1 { max-width: 670px; margin: 0 0 24px; font-size: clamp(3rem, 5vw, 5.2rem); line-height: 0.98; }
.auth-pitch p:last-child { color: var(--muted); }
.auth-card, .panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: 0 8px 36px rgba(29, 48, 39, 0.06); }
.auth-card { padding: 28px; }
.tab-row { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: #eeece5; }
.tab { min-height: 44px; border: 0; border-radius: 999px; padding: 10px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 700; }
.tab.active { color: var(--ink); background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
form { margin-top: 24px; }
label { display: grid; gap: 8px; margin-bottom: 17px; color: #37443e; font-size: 0.88rem; font-weight: 700; }
.terms-check { grid-template-columns: auto 1fr; align-items: start; gap: 10px; font-weight: 500; line-height: 1.5; }
.terms-check input { width: 20px; height: 20px; margin-top: 1px; }
button:disabled { cursor: not-allowed; opacity: 0.68; }
input, textarea { width: 100%; border: 1px solid #6f8278; border-radius: 10px; padding: 12px 13px; color: var(--ink); background: #fff; }
textarea { resize: vertical; line-height: 1.5; }
.field-help { margin: -8px 0 18px; }
.form-message { min-height: 1.2rem; margin: 14px 0 0; color: var(--danger); font-size: 0.85rem; }
.form-message.success { color: var(--forest); }
.narrow-panel { width: min(620px, 100%); margin: 70px auto; padding: 40px; }
.narrow-panel h1 { margin-top: 0; font-family: Georgia, serif; font-size: 2.5rem; font-weight: 500; }
.dashboard-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 34px; }
.dashboard-heading h1 { margin: 0; font-size: 3.6rem; }
.dashboard-heading p { margin-bottom: 8px; }
.panel { padding: 28px; }
.upload-panel, .link-panel { margin-bottom: 25px; }
.panel-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.panel-heading h2, .link-panel h2 { margin: 0; font-family: Georgia, serif; font-weight: 500; font-size: 2rem; }
.icon-button { min-width: 44px; min-height: 44px; border: 0; background: transparent; color: var(--muted); font-size: 1.8rem; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.copy-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 18px; }
.empty-state { min-height: 360px; border: 1px dashed #c9c4b9; border-radius: var(--radius); display: grid; place-content: center; justify-items: center; text-align: center; color: var(--muted); }
.empty-state h2 { color: var(--ink); margin-bottom: 0; }
.empty-icon { font-size: 3rem; color: var(--gold); }
.proofs-list { display: grid; gap: 14px; }
.proof-row { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; padding: 22px 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.proof-row h3 { margin: 0 0 7px; }
.proof-row p { margin: 0; color: var(--muted); font-size: 0.82rem; }
.proof-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.proof-actions button, .proof-actions a { min-height: 44px; display: inline-flex; align-items: center; border: 1px solid #6f8278; border-radius: 999px; padding: 8px 12px; color: var(--forest); background: transparent; text-decoration: none; cursor: pointer; font-size: 0.78rem; font-weight: 730; }
.status-approved { color: #26704f; }
.status-changes_requested { color: #a36520; }
.status-revoked, .status-superseded { color: var(--muted); }
.workspace-footer { margin-top: 30px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.workspace-footer h2 { margin: 0 0 6px; font-size: 1.1rem; }
.workspace-footer p { margin: 0; color: var(--muted); }
.workspace-footer-actions { display: flex; align-items: center; gap: 15px; }
.danger-link { min-height: 44px; border: 0; color: var(--danger); background: transparent; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.workspace-footer .form-message { grid-column: 1 / -1; }

/* Review */
.review-body { background: #edeae2; }
.review-header { border-bottom: 1px solid var(--line); }
.secure-label { color: var(--muted); font-size: 0.82rem; }
.review-shell { padding-block: 60px 100px; }
.review-grid { display: grid; grid-template-columns: 0.82fr 1fr; gap: 24px; align-items: start; }
.review-proof, .review-decision { padding: 34px; }
.review-proof h1 { margin: 5px 0 18px; font-size: 3rem; line-height: 1.05; }
.proof-meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.84rem; }
.proof-open { min-height: 190px; margin: 26px 0 18px; border: 1px solid #b9c8c0; border-radius: 14px; display: grid; place-content: center; color: var(--forest); background: linear-gradient(145deg, #eef2ed, #e0e6e1); text-align: center; font-weight: 760; text-underline-offset: 4px; }
.hash-box { display: grid; gap: 8px; padding: 15px; border-radius: 10px; background: #eeece6; }
.hash-box span { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: .1em; }
.hash-box code, .receipt-details code { overflow-wrap: anywhere; font-size: 0.75rem; }
.review-decision h2 { margin: 0 0 20px; font-family: Georgia, serif; font-size: 2.2rem; font-weight: 500; }
.review-checks { border: 0; padding: 0; margin: 0 0 22px; }
.review-checks label { grid-template-columns: 22px 1fr; align-items: start; gap: 11px; margin: 0; padding: 14px 0; border-bottom: 1px solid #e5e1d8; cursor: pointer; }
.review-checks input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--forest); }
.review-checks small { display: block; margin-top: 4px; color: var(--muted); font-weight: 450; line-height: 1.4; }
.decision-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.legal-boundary { color: var(--muted); font-size: 0.76rem; line-height: 1.55; }
.receipt-details { display: grid; gap: 0; }
.receipt-details div { display: grid; grid-template-columns: 90px 1fr; gap: 15px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.receipt-details dt { color: var(--muted); }
.receipt-details dd { margin: 0; }

@media (max-width: 900px) {
  .hero, .pricing-section, .integrity-grid, .auth-layout, .review-grid { grid-template-columns: 1fr; }
  .hero { gap: 50px; padding-top: 45px; }
  .proof-card { transform: none; max-width: 600px; }
  .steps { grid-template-columns: 1fr; }
  .steps article { min-height: auto; }
  .steps h3 { margin-top: 28px; }
  .pricing-section, .integrity-grid, .auth-layout { gap: 45px; }
  .price-card { max-width: 520px; }
  .site-footer { grid-template-columns: 1fr; padding-block: 35px; }
  .site-footer p { margin: 0; }
  .site-footer p:last-child { text-align: left; }
}

@media (max-width: 680px) {
  .shell { width: min(100% - 24px, 1180px); }
  .site-header { min-height: 66px; }
  nav > a:not(.button) { display: none; }
  .hero { padding-bottom: 65px; }
  .hero h1 { font-size: 3.25rem; }
  .trust-grid { grid-template-columns: 1fr 1fr; padding-block: 14px; gap: 12px; }
  .trust-grid span + span { border: 0; }
  .section { padding-block: 75px; }
  .section h2 { font-size: 2.6rem; }
  .form-grid, .workspace-footer { grid-template-columns: 1fr; }
  .dashboard-heading { align-items: start; flex-direction: column; }
  .dashboard-heading h1 { font-size: 2.8rem; }
  .proof-row { grid-template-columns: 1fr; }
  .proof-actions { justify-content: flex-start; }
  .workspace-footer-actions { align-items: stretch; flex-direction: column; }
  .copy-row { grid-template-columns: 1fr; }
  .review-proof, .review-decision, .panel { padding: 22px; }
  .review-shell { padding-top: 28px; }
  .app-header-actions .muted { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

@media (prefers-contrast: more) {
  :root { --line: #6f8278; }
  .panel, .proof-card, .price-card, input, textarea { border-width: 2px; }
}

@media (forced-colors: active) {
  .button, .brand-mark, .pill, .tab.active { forced-color-adjust: auto; }
  .status-dot { border: 1px solid CanvasText; }
}
