/* No web fonts and no CDN: the content security policy forbids external
   origins, because a page that asks for a contract has no business talking to
   anyone else. */
:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --line: #e2ded7;
  --ink: #14100c;
  --muted: #6b6257;
  --accent: #8a3d1f;
  --accent-ink: #ffffff;
  --good: #1f6b43;
  --warn: #8a5a00;
  --bad: #9c2a1c;
  --good-bg: #e9f4ed;
  --warn-bg: #fdf3dd;
  --bad-bg: #fbe9e6;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 16, 12, .06), 0 8px 24px rgba(20, 16, 12, .05);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14120f;
    --surface: #1d1a16;
    --line: #342f28;
    --ink: #f3efe8;
    --muted: #a39887;
    --accent: #e2805a;
    --accent-ink: #1b1208;
    --good: #7fd3a3;
    --warn: #e6bb63;
    --bad: #f0907f;
    --good-bg: #162a1f;
    --warn-bg: #2d2415;
    --bad-bg: #2d1a17;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-feature-settings: "kern";
}
.wrap { max-width: 44rem; margin: 0 auto; padding: 0 16px; }
.wide { max-width: 56rem; }

header.site { border-bottom: 1px solid var(--line); background: var(--surface); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; }
.logo { font-weight: 700; letter-spacing: -.02em; text-decoration: none; color: var(--ink); font-size: 1.05rem; }
.logo span { color: var(--accent); }
nav.site a { color: var(--muted); text-decoration: none; margin-left: 1.1rem; font-size: .92rem; }
nav.site a:hover, nav.site a:focus { color: var(--ink); text-decoration: underline; }

h1 { font-size: clamp(1.9rem, 6vw, 2.9rem); line-height: 1.12; letter-spacing: -.025em; margin: 2.2rem 0 .6rem; }
h2 { font-size: 1.35rem; letter-spacing: -.015em; margin: 2.4rem 0 .6rem; }
h3 { font-size: 1.05rem; margin: 1.6rem 0 .4rem; }
p { margin: 0 0 1rem; }
.lead { font-size: 1.16rem; color: var(--muted); max-width: 34rem; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.tiny { font-size: .82rem; }
a { color: var(--accent); }

.btn {
  display: inline-block; border: 0; cursor: pointer; font: inherit; font-weight: 600;
  background: var(--accent); color: var(--accent-ink);
  padding: .7rem 1.15rem; border-radius: var(--radius); text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow); }
.cards { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; margin: 1.8rem 0; }
.cards .card { display: flex; flex-direction: column; }
.cards .card p { flex: 1; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); margin-bottom: .5rem; }

label { display: block; font-weight: 600; font-size: .92rem; margin: 1rem 0 .3rem; }
label .hint { font-weight: 400; color: var(--muted); }
input, select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: .6rem .7rem;
}
textarea { min-height: 15rem; resize: vertical; font-size: .95rem; line-height: 1.5; }
input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.row { display: grid; gap: .9rem; grid-template-columns: 1fr 1fr; }
fieldset { border: 0; padding: 0; margin: 0; }

.result { margin-top: 1.5rem; }
.verdict { font-size: 1.25rem; font-weight: 600; letter-spacing: -.01em; margin-bottom: 1rem; }
.meter { height: 9px; background: var(--line); border-radius: 99px; overflow: hidden; margin: .5rem 0 1.2rem; }
.meter i { display: block; height: 100%; background: var(--accent); }

ul.findings { list-style: none; padding: 0; margin: 0; }
ul.findings li { display: grid; grid-template-columns: 5.2rem 1fr; gap: .8rem; padding: .7rem 0; border-top: 1px solid var(--line); align-items: start; }
.pill { font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: .2rem .4rem; border-radius: 5px; text-align: center; }
.pill.present { background: var(--good-bg); color: var(--good); }
.pill.weak { background: var(--warn-bg); color: var(--warn); }
.pill.missing { background: var(--bad-bg); color: var(--bad); }
/* Louder than "missing" on purpose: a contradiction is a sentence to delete,
   and it outranks everything else on the page. */
.pill.contradicted { background: var(--bad); color: var(--surface); }
.contra { color: var(--bad); font-weight: 600; }
.findings .why { color: var(--muted); font-size: .9rem; margin: .2rem 0 0; }

.clause { background: var(--bg); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 6px; padding: .7rem .8rem; margin: .5rem 0 0; font-size: .92rem; }
.clause .copy { margin-top: .5rem; }
.copybtn { font: inherit; font-size: .8rem; font-weight: 600; background: transparent; border: 1px solid var(--line); color: var(--muted); border-radius: 6px; padding: .25rem .55rem; cursor: pointer; }
.copybtn:hover { color: var(--ink); }

.hazard { background: var(--bad-bg); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; margin: .7rem 0; }
.hazard q { font-weight: 600; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: 1rem; margin: 1.2rem 0; }
.stat .k { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.stat .v { font-size: 1.7rem; font-weight: 700; letter-spacing: -.02em; }
.stat .v.bad { color: var(--bad); }

/* Spacing utilities exist because the content security policy forbids inline
   style attributes, and loosening it to 'unsafe-inline' for the sake of a few
   margins would weaken the one page on this site that asks for a contract. */
.m0 { margin: 0; }
.mt0 { margin-top: 0; }
.mb-xs { margin: 0 0 .3rem; }
.mb-sm { margin: 0 0 .6rem; }
.mb-md { margin: 0 0 1rem; }
.mb-card { margin-bottom: .9rem; }
.mt-sm { margin: .7rem 0 0; }
.mt-md { margin: 1.1rem 0 0; }
.mt-lg { margin-top: 2rem; }
.mt-xl { margin-top: 2.5rem; }
.gap-top { margin: 1.6rem 0 0; }
.short { min-height: 5rem; }

.note { border-left: 3px solid var(--line); padding-left: .9rem; color: var(--muted); font-size: .92rem; }
.error { background: var(--bad-bg); color: var(--bad); border-radius: 8px; padding: .6rem .8rem; font-size: .92rem; margin: .8rem 0; }
.ok { background: var(--good-bg); color: var(--good); border-radius: 8px; padding: .8rem .9rem; margin: .8rem 0; }
[hidden] { display: none !important; }

/* The file picker. A dashed box is the one piece of UI that reliably reads as
   "you can drop something here", and the input itself is hidden rather than
   styled because a styled file input never behaves the same twice. */
.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 1.1rem; text-align: center; display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; justify-content: center; margin: .4rem 0 .9rem; transition: border-color .12s, background .12s; }
.drop.over { border-color: var(--accent); background: var(--good-bg); }
.filebtn { display: inline-block; cursor: pointer; font-weight: 600; font-size: .92rem; margin: 0; padding: .5rem .9rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.filebtn:hover { border-color: var(--accent); color: var(--accent); }
.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; }
.drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }

/* The price buttons. They are a fake door and have to look like a choice, not
   like a checkout: no card, no basket, nothing that implies a transaction. */
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: .8rem; margin: 1.2rem 0; }
.tier { font: inherit; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: .25rem; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem; }
.tier:hover { border-color: var(--accent); }
.tier strong { font-size: 1.05rem; letter-spacing: -.01em; }
.tier span { color: var(--muted); font-size: .85rem; line-height: 1.4; }
.tier.picked { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.linkish { font: inherit; background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; }

pre.doc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; overflow-x: auto; font: 13.5px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; word-wrap: break-word; }

/* The after-the-contract flow. A vertical timeline rather than a row of boxes,
   because it has to stay readable on a phone, which is where most of a Reddit
   audience will meet it. */
.flow-head { margin: 3rem 0 .5rem; }
.flow-head h2 { margin-bottom: .5rem; }
.flow-steps { list-style: none; counter-reset: flowstep; margin: 1.5rem 0; padding: 0 0 0 2.1rem; position: relative; }
/* The spine, stopping short of the last marker so it does not dangle. */
.flow-steps::before { content: ""; position: absolute; left: .55rem; top: .55rem; bottom: 3.2rem; width: 2px; background: var(--line); }
.flow-step { position: relative; counter-increment: flowstep; padding-bottom: 1.6rem; }
.flow-step::before {
  content: counter(flowstep); position: absolute; left: -2.1rem; top: 0;
  width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  font-size: .72rem; font-weight: 700; display: grid; place-items: center;
}
.flow-tag { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: .35rem; }
.flow-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; }
.flow-card p { margin: 0 0 .3rem; }
.flow-card p:last-child { margin-bottom: 0; }
.flow-note { color: var(--muted); font-size: .88rem; margin: .45rem 0 0; }

.flow-meta { color: var(--muted); font-size: .82rem; }
.flow-said { font-size: 1.02rem; }
.flow-chat .flow-card { border-left: 3px solid var(--line); }
.flow-title { font-weight: 700; letter-spacing: -.01em; }
.flow-verdict { font-weight: 700; color: var(--accent); }
.flow-url { font: .85rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--muted); word-break: break-all; }
.flow-row { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; border-top: 1px solid var(--line); }
.flow-row:first-of-type { border-top: 0; }
.flow-change .flow-card { border-left: 3px solid var(--accent); }
.flow-approve {
  display: inline-block; margin: .4rem 0 .35rem; padding: .45rem .9rem; border-radius: 8px;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: .92rem;
}
.flow-record .flow-card { border-left: 3px solid var(--good); background: var(--good-bg); }

.flow-ledger { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin: .5rem 0 1rem; box-shadow: var(--shadow); }
.flow-ledger .k { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.flow-figures { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: .6rem 0 .8rem; }
.flow-figures .v { font-size: 1.3rem; letter-spacing: -.02em; }
.flow-figures s { color: var(--muted); font-weight: 400; }
.flow-punch { margin: 0; font-size: 1.02rem; }

@media (max-width: 36rem) {
  .flow-figures { grid-template-columns: 1fr; gap: .6rem; }
  .flow-steps { padding-left: 1.9rem; }
  .flow-step::before { left: -1.9rem; }
}

footer.site { border-top: 1px solid var(--line); margin-top: 3.5rem; padding: 1.5rem 0 2.5rem; color: var(--muted); font-size: .88rem; }
footer.site a { color: var(--muted); }

@media (max-width: 36rem) {
  body { font-size: 16px; }
  .cards, .row { grid-template-columns: 1fr; }
  ul.findings li { grid-template-columns: 1fr; gap: .25rem; }
  .pill { justify-self: start; }
}
