@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Libre+Caslon+Text:wght@400;700&family=Work+Sans:wght@400;500;600;700&display=swap');

:root {
  --canvas: #f7f1e6;
  --paper: #fffdf7;
  --ivory: #fdfbf7;
  --ink: #18212f;
  --muted: #637083;
  --hairline: #d9d0c0;
  --forest: #2e6b57;
  --forest-dark: #105340;
  --brass: #a86f1d;
  --brass-soft: #f2deb5;
  --clay: #c86649;
  --clay-soft: #e9c8bd;
  --mist: #dcebe3;
  --shadow: 0 18px 40px rgba(24, 33, 47, 0.08);
  --radius: 4px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  font-family: 'Work Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 10%, rgba(168, 111, 29, 0.09), transparent 30%),
    radial-gradient(circle at 85% 18%, rgba(46, 107, 87, 0.08), transparent 28%),
    linear-gradient(90deg, rgba(217, 208, 192, 0.14) 1px, transparent 1px),
    linear-gradient(rgba(217, 208, 192, 0.12) 1px, transparent 1px);
  background-size: auto, auto, 72px 72px, 72px 72px;
  opacity: 0.85;
  z-index: -1;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--forest); }
img { max-width: 100%; height: auto; }
button, input { font: inherit; }
h1, h2, h3, p, a, button, strong, span { overflow-wrap: anywhere; }
.card, .workbench, .dropzone, .btn, .section, .hero, .page-hero { min-width: 0; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 14px;
  z-index: 1000;
}
.skip-link:focus { top: 16px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 241, 230, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--hairline);
}
.nav-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Libre Caslon Text', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--forest);
  white-space: nowrap;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--hairline);
  background: var(--paper);
  padding: 4px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
  color: var(--muted);
}
.nav-actions { display: flex; align-items: center; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 11px 17px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, opacity 180ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--forest); color: #fff; }
.btn-primary:hover { background: var(--forest-dark); color: #fff; }
.btn-secondary { border-color: var(--hairline); background: rgba(255,253,247,0.5); color: var(--ink); }
.btn-secondary:hover { background: var(--paper); color: var(--forest); }
.btn-ghost { border-color: transparent; color: var(--muted); background: transparent; }
.btn:disabled, .btn[aria-disabled='true'] { opacity: 0.48; cursor: not-allowed; transform: none; }

main { overflow: hidden; }
.section, .hero, .page-hero, .footer-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}
.hero { padding: 54px 0 44px; text-align: center; }
.page-hero { padding: 46px 0 20px; text-align: center; max-width: 860px; }
.eyebrow, .kicker, .mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--forest);
  font-weight: 700;
}
h1, h2, h3 {
  font-family: 'Libre Caslon Text', Georgia, serif;
  color: var(--ink);
  line-height: 1.08;
  margin: 0;
}
h1 { font-size: clamp(34px, 6vw, 68px); letter-spacing: -0.03em; }
.page-hero h1 { font-size: clamp(32px, 5vw, 54px); }
h2 { font-size: clamp(28px, 4vw, 42px); letter-spacing: -0.02em; }
h3 { font-size: 22px; }
p { margin: 0; }
.lede {
  max-width: 820px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
}
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 28px; }

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 22px auto 0;
  max-width: 980px;
}
.trust-chip {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--hairline);
  background: rgba(255,253,247,0.64);
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
}
.trust-chip strong { color: var(--ink); font-weight: 700; }

.workbench {
  width: min(860px, calc(100% - 32px));
  margin: 28px auto 0;
  max-width: 860px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(18px, 4vw, 34px);
  text-align: left;
}
.dropzone {
  border: 2px dashed var(--hairline);
  background: rgba(247,241,230,0.66);
  border-radius: var(--radius);
  padding: clamp(26px, 6vw, 56px);
  text-align: center;
  transition: background 180ms ease, border-color 180ms ease;
}
.dropzone.is-ready, .dropzone:hover { border-color: var(--forest); background: #f2eadc; }
.file-input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; pointer-events: none; }
.file-label { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; }
.upload-icon { font-size: 34px; color: var(--muted); }
.format-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.format-chip { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--forest); background: rgba(46,107,87,0.10); border: 1px solid rgba(46,107,87,0.18); padding: 5px 8px; }
.consent-row { display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start; margin-top: 22px; color: var(--muted); }
.consent-row input { width: 18px; height: 18px; accent-color: var(--forest); margin-top: 3px; }
.workbench-actions { display: grid; gap: 12px; margin-top: 22px; }
.safe-status {
  display: none;
  border: 1px solid rgba(168,111,29,0.36);
  background: rgba(242,222,181,0.45);
  padding: 16px;
  margin-top: 18px;
}
.safe-status.is-visible { display: block; }
.safe-status h3 { font-size: 20px; margin-bottom: 6px; }
.file-name { color: var(--ink); font-weight: 700; word-break: break-word; }

.section { padding: 58px 0; }
.section-header { display: flex; justify-content: space-between; align-items: end; gap: 24px; border-bottom: 1px solid var(--hairline); padding-bottom: 16px; margin-bottom: 24px; }
.section-header p { max-width: 620px; color: var(--muted); }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 6px 22px rgba(24,33,47,0.035);
}
.card h3 { margin-bottom: 10px; }
.card p, .card li { color: var(--muted); }
.risk-card { border-top: 4px solid var(--forest); }
.risk-card.medium { border-top-color: var(--brass); }
.risk-card.high { border-top-color: var(--clay); }
.icon-line { display: flex; gap: 12px; align-items: flex-start; }
.icon-dot { width: 34px; height: 34px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--mist); color: var(--forest); flex: 0 0 auto; }
.icon-dot.brass { background: var(--brass-soft); color: var(--brass); }
.icon-dot.clay { background: var(--clay-soft); color: var(--clay); }
.timeline { display: grid; gap: 14px; counter-reset: steps; }
.timeline-item { display: grid; grid-template-columns: 42px 1fr; gap: 14px; align-items: start; }
.timeline-item::before { counter-increment: steps; content: counter(steps); width: 32px; height: 32px; display: grid; place-items: center; background: var(--paper); border: 1px solid var(--hairline); font-family: 'JetBrains Mono', monospace; color: var(--forest); }
.report-panel {
  background: var(--paper);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow);
}
.report-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding: 20px; border-bottom: 1px solid var(--hairline); }
.report-band { color: var(--brass); font-family: 'Libre Caslon Text', serif; font-weight: 700; font-size: 26px; }
.report-body { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 20px; }
ul.clean { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
ul.clean li { position: relative; padding-left: 20px; }
ul.clean li::before { content: '•'; position: absolute; left: 0; color: var(--forest); font-weight: 700; }
.question-box { background: var(--ivory); border: 1px solid var(--hairline); padding: 16px; }
.copy-area { display: grid; gap: 10px; }
.faq-list { display: grid; gap: 10px; }
details { background: var(--paper); border: 1px solid var(--hairline); padding: 16px 18px; }
summary { cursor: pointer; font-weight: 700; color: var(--ink); }
details p { color: var(--muted); margin-top: 10px; }
.legal-layout { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; }
.legal-index { position: sticky; top: 90px; background: var(--paper); border: 1px solid var(--hairline); padding: 18px; }
.legal-index a { display: block; padding: 6px 0; color: var(--muted); font-size: 14px; }
.legal-copy { display: grid; gap: 18px; }
.legal-copy section { background: var(--paper); border: 1px solid var(--hairline); padding: 24px; }
.legal-copy h2 { font-size: 30px; margin-bottom: 12px; }
.legal-copy p, .legal-copy li { color: var(--muted); }
.footer {
  margin-top: 50px;
  background: #e7eeff;
  border-top: 1px solid var(--hairline);
}
.footer-shell { padding: 34px 0; display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 22px; }
.footer p, .footer a { color: #536274; font-size: 14px; }
.footer h3 { font-size: 18px; margin-bottom: 10px; }
.footer-links { display: grid; gap: 8px; }
.badge { display: inline-flex; align-items: center; padding: 4px 8px; border: 1px solid var(--hairline); background: var(--paper); color: var(--muted); font-family: 'JetBrains Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }

@media (max-width: 920px) {
  .nav-links { display: none; }
  .grid-4, .grid-3, .grid-2, .report-body, .legal-layout, .footer-shell { grid-template-columns: 1fr; }
  .section-header { display: block; }
  .section-header p { margin-top: 10px; }
  .legal-index { position: static; }
}
@media (max-width: 560px) {
  .nav-shell, .section, .hero, .page-hero, .footer-shell { width: min(1180px, calc(100vw - 24px)); }
  .nav-shell { gap: 8px; }
  .brand { min-width: 0; flex: 1 1 auto; }
  .nav-actions { flex: 0 0 auto; gap: 6px; }
  .nav-actions .btn-secondary { display: none; }
  .nav-actions .btn-primary { padding: 10px 10px; min-width: 86px; }
  .brand span:last-child { max-width: min(46vw, 150px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hero { padding-top: 34px; }
  .hero h1, .page-hero h1 { max-width: 100%; font-size: clamp(30px, 8.4vw, 35px); line-height: 1.02; text-wrap: balance; overflow-wrap: normal; word-break: normal; }
  .lede { max-width: 100%; font-size: 16px; }
  h2 { font-size: clamp(28px, 8vw, 34px); text-wrap: balance; }
  .btn { white-space: normal; text-align: center; }
  .hero-actions .btn { width: 100%; }
  .trust-strip { justify-content: center; overflow-x: visible; flex-wrap: wrap; padding-bottom: 0; }
  .trust-chip { flex: 0 1 auto; max-width: 100%; }
  .workbench { width: min(860px, calc(100vw - 24px)); padding: 16px; }
  .dropzone { padding: 24px 14px; }
  .dropzone strong { display: block; max-width: 100%; }
  .format-row { gap: 6px; }
  .report-top { display: grid; }
}

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