/* DocReady — mobile-first, no framework, no build step */
:root {
  color-scheme: light;
  --ink: #14161a;
  --muted: #5c6570;
  --line: #e3e6ea;
  --bg: #ffffff;
  --soft: #f6f8fa;
  --card: #ffffff;
  --field-bg: #ffffff;
  --brand: #1d4ed8;
  --brand-ink: #ffffff;
  --good: #0a7d32;
  --good-soft: #e8f6ec;
  --mid: #a05a00;
  --mid-soft: #fdf3e3;
  --bad: #b00020;
  --bad-soft: #fdeaee;
  --radius: 12px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e8eaed;
  --muted: #9aa4b0;
  --line: #272c34;
  --bg: #0f1216;
  --soft: #16191f;
  --card: #14181e;
  --field-bg: #1b2027;
  --brand: #7aa2ff;
  --brand-ink: #08131f;
  --good: #7ee787;
  --good-soft: #12281a;
  --mid: #e3b341;
  --mid-soft: #2a2312;
  --bad: #ff7b72;
  --bad-soft: #2b1618;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
.wrap { max-width: 900px; margin: 0 auto; padding: 0 16px 64px; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 8px; }
h1 { font-size: clamp(24px, 6vw, 34px); }
h2 { font-size: clamp(19px, 4.5vw, 24px); margin-top: 26px; }
h3 { font-size: 17px; }
p { margin: 0 0 12px; }
ul { padding-left: 20px; }
li { margin-bottom: 6px; }
.lede { color: var(--muted); }
.hint { font-size: 13px; color: var(--muted); }

header.site { border-bottom: 1px solid var(--line); background: var(--soft); }
header.site .bar {
  max-width: 900px; margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.brand { font-weight: 700; text-decoration: none; color: var(--ink); }
.brand span { color: var(--brand); }
nav.site { margin-left: auto; display: flex; gap: 14px; font-size: 15px; }
nav.site a { text-decoration: none; }
nav.site a:hover { text-decoration: underline; }

.theme-wrap { position: relative; display: inline-flex; }
.theme-toggle,
button.theme-toggle {
  width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
}
.theme-toggle:hover { border-color: var(--muted); }
.ti { display: none; line-height: 0; }
:root[data-theme-mode="system"] .ti-system,
:root[data-theme-mode="light"] .ti-light,
:root[data-theme-mode="dark"] .ti-dark { display: block; }
.theme-toast {
  position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--ink); color: var(--bg);
  font-size: 12px; padding: 5px 9px; border-radius: 8px;
  opacity: 0; pointer-events: none; transition: opacity .18s ease;
  white-space: nowrap; z-index: 20;
}
.theme-toast.show { opacity: 1; }

.hero { padding: 22px 0 6px; }
.picker {
  margin: 14px 0 0; padding: 14px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--soft);
}
.picker label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
input[type=file], input[type=email], input[type=text] {
  width: 100%; min-height: 46px; padding: 11px 12px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--field-bg); color: var(--ink);
}
::placeholder { color: var(--muted); opacity: 1; }
.status { min-height: 1.3em; font-size: 14px; color: var(--muted); margin: 12px 0 0; }

.report { margin-top: 22px; }
.score-card {
  display: flex; align-items: center; gap: 16px;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; background: var(--card);
}
.score { font-size: 44px; font-weight: 700; line-height: 1; }
.score small { font-size: 16px; color: var(--muted); font-weight: 500; }
.band { font-weight: 700; font-size: 17px; }
.band.good { color: var(--good); }
.band.mid { color: var(--mid); }
.band.bad { color: var(--bad); }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.check { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--card); }
.check.critical { border-left: 4px solid var(--bad); }
.check.serious { border-left: 4px solid var(--mid); }
.check.moderate { border-left: 4px solid var(--muted); }
.check.ok { border-left: 4px solid var(--good); }
.check-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.check-head strong { font-size: 15px; }
.check p { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.clause { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }
.badge {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: 3px 8px; border-radius: 999px;
}
.badge.ok { background: var(--good-soft); color: var(--good); }
.badge.critical { background: var(--bad-soft); color: var(--bad); }
.badge.serious { background: var(--mid-soft); color: var(--mid); }
.badge.moderate { background: var(--soft); color: var(--muted); }

.report-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 0; }

button, .btn {
  display: inline-block; min-height: 46px; padding: 12px 16px; font-size: 16px; font-weight: 600;
  background: var(--brand); color: var(--brand-ink); border: 0; border-radius: 10px;
  cursor: pointer; text-decoration: none; text-align: center; width: 100%;
}
.signup {
  margin: 30px 0 0; padding: 16px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--soft);
}
.signup form { display: grid; gap: 10px; margin-top: 10px; }
.signup label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }

footer.site {
  margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}

@media (min-width: 640px) {
  .signup form { grid-template-columns: 1fr 1fr; }
  .signup form button { grid-column: 1 / -1; width: auto; justify-self: start; }
  button, .btn { width: auto; }
}
