
/* Layout: a working desk. Intake column on the left, the decoded contract on the right; stacks on phones. */
:root {
  --paper: #f4f5f2;
  --sheet: #ffffff;
  --ink: #1b2228;
  --muted: #5d6870;
  --rule: #d9ddd8;
  --accent: #1d5c63;
  --accent-soft: #e2eeee;
  --good: #2f7a4a; --good-soft: #e3f1e7;
  --warn: #9a6a08; --warn-soft: #f8eed5;
  --bad: #a83a2c; --bad-soft: #f8e3df;
  --display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --body: "Public Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #13181b; --sheet: #1b2226; --ink: #e6ebe8; --muted: #9aa7ad; --rule: #2e383d;
    --accent: #6cb8be; --accent-soft: #1f3336;
    --good: #7ccb97; --good-soft: #1d3326; --warn: #e2b555; --warn-soft: #3a3019; --bad: #ef8a7b; --bad-soft: #3d2420;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #13181b; --sheet: #1b2226; --ink: #e6ebe8; --muted: #9aa7ad; --rule: #2e383d;
  --accent: #6cb8be; --accent-soft: #1f3336;
  --good: #7ccb97; --good-soft: #1d3326; --warn: #e2b555; --warn-soft: #3a3019; --bad: #ef8a7b; --bad-soft: #3d2420;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.5; }
header.top { padding: 28px 24px 8px; max-width: 1240px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; justify-content: space-between; }
h1 { font-family: var(--display); font-size: 30px; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
.tagline { color: var(--muted); margin: 0; max-width: 60ch; }
main { max-width: 1240px; margin: 0 auto; padding: 16px 24px 48px; display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: 24px; align-items: start; }
@media (max-width: 860px) { main { grid-template-columns: 1fr; } }
.panel { background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; padding: 20px; }
.intake { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 860px) { .intake { position: static; } }
h2 { font-family: var(--display); font-size: 19px; margin: 0; text-wrap: balance; }
h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 10px; font-weight: 600; }
.drop { border: 1.5px dashed var(--rule); border-radius: 8px; padding: 22px 14px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop strong { display: block; font-size: 15px; }
.drop span { color: var(--muted); font-size: 13px; }
.files { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.files li { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; background: var(--paper); border-radius: 6px; padding: 6px 10px; }
.files li span:first-child { overflow-wrap: anywhere; }
.files button { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 13px; padding: 0 2px; }
details summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 14px; }
textarea { width: 100%; min-height: 140px; margin-top: 8px; border: 1px solid var(--rule); border-radius: 6px; padding: 10px; font-family: var(--mono); font-size: 12.5px; background: var(--paper); color: var(--ink); resize: vertical; }
button.primary { background: var(--accent); color: var(--sheet); border: none; border-radius: 8px; padding: 12px 16px; font: 600 15px var(--body); cursor: pointer; width: 100%; }
button.primary:disabled { opacity: .5; cursor: not-allowed; }
button.secondary { background: none; color: var(--accent); border: 1px solid var(--accent); border-radius: 8px; padding: 8px 14px; font: 600 13px var(--body); cursor: pointer; }
button:focus-visible, .drop:focus-visible, summary:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.status { font-size: 13px; color: var(--muted); min-height: 1.5em; margin: 0; }
.status.error { color: var(--bad); }
.privacy { font-size: 12.5px; color: var(--muted); margin: 0; border-top: 1px solid var(--rule); padding-top: 12px; }
.results { display: flex; flex-direction: column; gap: 18px; }
.banner { background: var(--warn-soft); color: var(--ink); border-left: 4px solid var(--warn); border-radius: 6px; padding: 10px 14px; font-size: 14px; }
.head-row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.parties { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.pill { display: inline-block; align-self: start; height: fit-content; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.pill.high { background: var(--bad-soft); color: var(--bad); }
.pill.medium { background: var(--warn-soft); color: var(--warn); }
.pill.low { background: var(--good-soft); color: var(--good); }
.pill.neutral { background: var(--accent-soft); color: var(--accent); }
.pill.absent { background: var(--paper); color: var(--muted); border: 1px solid var(--rule); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; }
.tile { background: var(--paper); border-radius: 8px; padding: 12px 14px; }
.tile .label { font-size: 12px; color: var(--muted); }
.tile .value { font-family: var(--mono); font-size: 17px; overflow-wrap: anywhere; font-weight: 500; font-variant-numeric: tabular-nums; margin-top: 2px; }
.tile.emph { background: var(--bad-soft); }
.tile.emph .value { color: var(--bad); }
.tile .note { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.summary-text { font-size: 16px; max-width: 70ch; margin: 0; }
.clauses { display: flex; flex-direction: column; }
.clause { display: grid; grid-template-columns: 6px 1fr auto; gap: 0 14px; padding: 12px 0; border-top: 1px solid var(--rule); }
.clause:first-child { border-top: none; }
.stripe { border-radius: 3px; background: var(--rule); }
.clause.high .stripe { background: var(--bad); }
.clause.medium .stripe { background: var(--warn); }
.clause.low .stripe { background: var(--good); }
.clause .name { font-weight: 600; }
.clause .desc { color: var(--ink); font-size: 14px; margin: 2px 0 0; max-width: 68ch; }
.clause blockquote { margin: 6px 0 0; padding: 6px 10px; border-left: 2px solid var(--rule); color: var(--muted); font-size: 13px; font-family: var(--mono); max-width: 68ch; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 1000px) { .two-col { grid-template-columns: 1fr; } }
ul.plain { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.flags li::marker { color: var(--bad); }
.foot { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
.disclaimer { font-size: 12.5px; color: var(--muted); max-width: 70ch; margin: 0; }
.spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--rule); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.hidden { display: none !important; }

.field-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 12px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 12px; color: var(--muted); font-weight: 500; }
.field input, .field select, .asof input { font: 500 14px var(--mono); color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: 7px 9px; width: 100%; font-variant-numeric: tabular-nums; }
.field input:focus-visible, .field select:focus-visible, .asof input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.inputs-note { font-size: 12.5px; color: var(--muted); margin: 0 0 10px; }
.inputs-box { border: 1px solid var(--rule); border-radius: 8px; padding: 14px; margin-top: 16px; }
.asof { display: flex; flex-direction: column; gap: 4px; }
.asof label { font-size: 13px; font-weight: 600; }
.asof small { color: var(--muted); font-size: 12px; }
.contract { display: flex; flex-direction: column; gap: 14px; }
.contract-card { border-top: 4px solid var(--accent); }
.file-tag { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
table.sched, table.stack { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
table.sched th, table.stack th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--rule); }
table.sched td, table.stack td { padding: 7px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; }
table td.num, table th.num { text-align: right; font-family: var(--mono); }
.tag-double { display: inline-block; background: var(--warn-soft); color: var(--warn); font-size: 11.5px; font-weight: 600; border-radius: 4px; padding: 1px 6px; }
.tag-moved { color: var(--muted); font-size: 12px; }
.table-wrap { overflow-x: auto; }
.stack-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: baseline; }
details.more > summary { margin-top: 2px; }
details.more[open] > summary { margin-bottom: 10px; }
.placeholder { color: var(--muted); font-size: 14px; }
.err { color: var(--bad); font-size: 14px; }
.sub { color: var(--muted); font-size: 13px; margin: 2px 0 0; }
.hint { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }
.field.wide { grid-column: 1 / -1; }
.field textarea { min-height: 120px; margin-top: 0; }


/* Site layout: hero with the upload card beside the pitch; plain bands below. */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.site-head { max-width: 1180px; margin: 0 auto; padding: 18px 24px; display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; }
.brand { font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--ink); text-decoration: none; }
.site-head nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.site-head nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; }
.site-head nav a.nav-cta { color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 6px 14px; }
main#top { max-width: 1180px; margin: 0 auto; padding: 0 24px 40px; display: flex; flex-direction: column; align-items: stretch; gap: 28px; }
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: start; padding-top: 18px; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } }
.hero h1 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.1; margin: 0 0 14px; }
.lede { font-size: 18px; color: var(--ink); max-width: 52ch; margin: 0 0 16px; }
.checks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.checks li { padding-left: 26px; position: relative; color: var(--muted); }
.checks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 14px; height: 8px; border-left: 2.5px solid var(--good); border-bottom: 2.5px solid var(--good); transform: rotate(-45deg); }
.upload { display: flex; flex-direction: column; gap: 12px; box-shadow: 0 10px 30px rgba(20, 40, 45, 0.08); }
.agree { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; }
.agree input { margin-top: 3px; }
.agree a, .quiet-links a, .band a, .site-foot a { color: var(--accent); }
.quiet-links { font-size: 13px; color: var(--muted); margin: 0; text-align: center; }
.link-btn { background: none; border: none; color: var(--accent); font: 600 13px var(--body); cursor: pointer; padding: 0; text-decoration: underline; }
.band { border-top: 1px solid var(--rule); padding-top: 26px; }
.band h2 { font-size: 24px; margin-bottom: 14px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.steps li { counter-increment: s; background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.steps li::before { content: counter(s); font-family: var(--mono); color: var(--accent); font-weight: 500; }
.steps span, .term-grid span { color: var(--muted); font-size: 14px; }
.term-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 20px; }
.term-grid div { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
#faq details { border-bottom: 1px solid var(--rule); padding: 12px 0; }
#faq details p { color: var(--muted); max-width: 70ch; margin: 8px 0 0; }
.contact p { max-width: 60ch; }
.stack { border-top: 4px solid var(--accent); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--rule); }
.cta-row p { margin: 0; max-width: 52ch; }
button.primary.inline { width: auto; padding: 12px 22px; }
.site-foot { max-width: 1180px; margin: 0 auto; padding: 24px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 13px; }
dialog { border: 1px solid var(--rule); border-radius: 12px; padding: 0; width: min(640px, calc(100% - 32px)); background: var(--sheet); color: var(--ink); }
dialog::backdrop { background: rgba(10, 20, 24, 0.45); }
.dialog-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.qe-rows { display: flex; flex-direction: column; gap: 10px; }
.qe-row { display: grid; grid-template-columns: 1fr 120px 1fr auto; gap: 10px; align-items: end; padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
@media (max-width: 560px) { .qe-row { grid-template-columns: 1fr 1fr; } }
.qe-out { margin-top: 8px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }
#results { scroll-margin-top: 16px; }
.legal { max-width: 760px !important; padding-top: 24px !important; gap: 8px !important; }
.legal h1 { font-size: 34px; margin: 0; }
.legal h2 { font-size: 19px; margin-top: 14px; }
.legal p { max-width: 68ch; }
