/* EZPZ DisputeForge — Playbook #464
   Design doctrine: their uniform, our evidence.
   The signature: every statutory citation renders in monospace.
   Marketing is set in prose. Law is set in code. You can tell them apart at a glance. */

:root {
  --blue: #1d4ed8;
  --blue-2: #2563eb;
  --blue-tint: #eff6ff;
  --blue-line: #bfdbfe;

  --ink: #0b1220;
  --body: #334155;
  --muted: #64748b;
  --faint: #94a3b8;

  --bg: #ffffff;
  --bg-2: #f8fafc;
  --line: #e2e8f0;

  --critical: #dc2626;
  --high: #ea580c;
  --medium: #ca8a04;
  --low: #64748b;
  --good: #059669;
  --good-tint: #ecfdf5;
  --alarm-tint: #fef2f2;

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Menlo, Consolas, monospace;

  --r: 12px;
  --r-sm: 8px;
  --shadow: 0 1px 2px rgba(11, 18, 32, .04), 0 4px 16px rgba(11, 18, 32, .04);
  --shadow-lift: 0 4px 12px rgba(29, 78, 216, .12), 0 12px 32px rgba(11, 18, 32, .08);
  --wrap: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

body {
  font-family: var(--sans);
  color: var(--body);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Signature: law is set in code ---------- */
.stat {
  font-family: var(--mono);
  font-size: .82em;
  background: var(--blue-tint);
  color: var(--blue);
  padding: .15em .45em;
  border-radius: 4px;
  border: 1px solid var(--blue-line);
  white-space: nowrap;
  font-weight: 500;
}
.stat-block {
  font-family: var(--mono);
  font-size: .85rem;
  background: var(--bg-2);
  border-left: 3px solid var(--blue);
  padding: 14px 16px;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--body);
  line-height: 1.65;
  overflow-x: auto;
}
.stat-block .cite { color: var(--blue); font-weight: 600; display: block; margin-bottom: 6px; }

/* ---------- Type ---------- */
h1, h2, h3, h4 { color: var(--ink); line-height: 1.18; letter-spacing: -.022em; font-weight: 800; }
h1 { font-size: clamp(2rem, 5.2vw, 3.1rem); }
h2 { font-size: clamp(1.55rem, 3.6vw, 2.2rem); }
h3 { font-size: 1.16rem; font-weight: 700; letter-spacing: -.01em; }
p { margin-bottom: 1rem; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { color: var(--ink); font-weight: 650; }

.eyebrow {
  color: var(--blue);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  margin-bottom: 10px;
  font-family: var(--mono);
}
.lede { font-size: 1.1rem; color: var(--muted); max-width: 62ch; }
.center { text-align: center; }
.center .lede { margin-inline: auto; }

:focus-visible { outline: 3px solid var(--blue-2); outline-offset: 2px; border-radius: 4px; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section.tint { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { margin-bottom: 40px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-in { max-width: var(--wrap); margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); font-size: 1.08rem; letter-spacing: -.02em; cursor: pointer; user-select: none; }
.brand:hover { text-decoration: none; }
.brand svg { flex: none; }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  color: var(--muted); font-weight: 600; font-size: .88rem;
  padding: 7px 11px; border-radius: var(--r-sm);
}
.nav-links a:hover { color: var(--blue); background: var(--blue-tint); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--blue); background: var(--blue-tint); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); margin: 3px 0; border-radius: 2px; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 8px; gap: 2px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--blue); color: #fff; font-weight: 700; font-size: .96rem;
  padding: 14px 26px; border-radius: var(--r-sm); border: 0; cursor: pointer;
  font-family: var(--sans); transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  text-align: center;
}
.btn:hover { background: var(--blue-2); text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: #fff; color: var(--blue); border: 1.5px solid var(--line); }
.btn.ghost:hover { border-color: var(--blue); background: var(--blue-tint); box-shadow: none; }
.btn.sm { padding: 9px 16px; font-size: .85rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.center .btn-row { justify-content: center; }

/* ---------- Cards ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 24px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card.blue { border-color: var(--blue); border-width: 1.5px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

/* ---------- Severity ---------- */
.sev {
  font-family: var(--mono); font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 3px 8px; border-radius: 4px; white-space: nowrap;
}
.sev-critical { background: #fee2e2; color: var(--critical); }
.sev-high { background: #ffedd5; color: var(--high); }
.sev-medium { background: #fef9c3; color: #854d0e; }
.sev-low { background: #f1f5f9; color: var(--low); }

/* ---------- Hero ---------- */
.hero { padding: 80px 0 64px; background: linear-gradient(180deg, var(--bg-2) 0%, #fff 100%); border-bottom: 1px solid var(--line); }
.hero h1 { margin-bottom: 18px; }
.hero .lede { font-size: 1.16rem; margin-bottom: 28px; }
.price-strike { color: var(--faint); text-decoration: line-through; font-weight: 600; }

/* ---------- The Clock (signature element) ---------- */
.clock {
  border: 2px solid var(--line); border-radius: var(--r);
  padding: 24px; background: #fff; text-align: center;
  transition: border-color .3s ease, background .3s ease;
}
.clock.live { border-color: var(--blue); background: var(--blue-tint); }
.clock.breach { border-color: var(--critical); background: var(--alarm-tint); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { border-color: var(--critical); } 50% { border-color: #fca5a5; } }
.clock-num { font-family: var(--mono); font-size: 3.2rem; font-weight: 700; line-height: 1; color: var(--ink); letter-spacing: -.04em; }
.clock.breach .clock-num { color: var(--critical); }
.clock.live .clock-num { color: var(--blue); }
.clock-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-family: var(--mono); margin-top: 8px; }
.clock-verdict { margin-top: 14px; font-weight: 700; font-size: .92rem; color: var(--ink); }
.clock.breach .clock-verdict { color: var(--critical); }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: #fff; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: .88rem; min-width: 720px; }
th, td { padding: 13px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--bg-2); font-weight: 700; color: var(--ink); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; position: sticky; top: 0; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.us { background: var(--blue-tint); }
tbody tr.us td { font-weight: 650; color: var(--ink); }
.yes { color: var(--good); font-weight: 700; }
.no { color: var(--critical); font-weight: 700; }
td.num { font-family: var(--mono); white-space: nowrap; }

/* ---------- Forms ---------- */
label { display: block; font-weight: 650; font-size: .84rem; color: var(--ink); margin-bottom: 5px; }
.hint { font-size: .78rem; color: var(--muted); font-weight: 400; margin-top: 4px; }
input[type=text], input[type=date], input[type=number], input[type=email], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm);
  font-family: var(--sans); font-size: .92rem; color: var(--ink); background: #fff;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: 2px solid var(--blue-tint); }
textarea { resize: vertical; min-height: 90px; }
.field { margin-bottom: 14px; }
.row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.check { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.check input { width: auto; margin: 0; }
.check label { margin: 0; font-weight: 500; font-size: .88rem; }

/* ---------- Drop zone ---------- */
.drop {
  border: 2px dashed var(--line); border-radius: var(--r); padding: 40px 20px;
  text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
  background: var(--bg-2);
}
.drop:hover, .drop.over { border-color: var(--blue); background: var(--blue-tint); }
.drop strong { display: block; color: var(--ink); margin-bottom: 4px; }

/* ---------- Findings ---------- */
.finding { border: 1px solid var(--line); border-left: 4px solid var(--muted); border-radius: var(--r-sm); padding: 18px; margin-bottom: 12px; background: #fff; }
.finding.critical { border-left-color: var(--critical); }
.finding.high { border-left-color: var(--high); }
.finding.medium { border-left-color: var(--medium); }
.finding.low { border-left-color: var(--low); }
.finding-head { display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; margin-bottom: 8px; flex-wrap: wrap; }
.finding-title { font-weight: 700; color: var(--ink); font-size: .98rem; }
.finding-acct { font-family: var(--mono); font-size: .78rem; color: var(--muted); }

/* ---------- Letter output ---------- */
.letter-paper {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 32px; font-family: var(--mono); font-size: .82rem; line-height: 1.75;
  white-space: pre-wrap; color: var(--ink); max-height: 520px; overflow-y: auto;
}

/* ---------- Accordion ---------- */
details.acc { border: 1px solid var(--line); border-radius: var(--r-sm); margin-bottom: 10px; background: #fff; }
details.acc summary { padding: 15px 18px; cursor: pointer; font-weight: 650; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary::after { content: "+"; color: var(--blue); font-weight: 700; font-size: 1.2rem; flex: none; }
details.acc[open] summary::after { content: "\2212"; }
details.acc[open] summary { border-bottom: 1px solid var(--line); }
.acc-body { padding: 18px; }
.acc-body > *:last-child { margin-bottom: 0; }

/* ---------- Callouts ---------- */
.note { border-radius: var(--r-sm); padding: 16px 18px; font-size: .9rem; margin-bottom: 16px; border: 1px solid; }
.note.warn { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.note.info { background: var(--blue-tint); border-color: var(--blue-line); color: #1e3a8a; }
.note.hard { background: var(--alarm-tint); border-color: #fecaca; color: #7f1d1d; }
.note.good { background: var(--good-tint); border-color: #a7f3d0; color: #065f46; }
.note strong { color: inherit; }
.note > *:last-child { margin-bottom: 0; }

/* ---------- Quote ---------- */
.quote { border-left: 3px solid var(--blue); padding: 4px 0 4px 20px; margin: 28px 0; font-size: 1.06rem; color: var(--ink); font-style: italic; }
.quote cite { display: block; font-style: normal; font-size: .82rem; color: var(--muted); margin-top: 8px; font-weight: 600; }

/* ---------- Counter ---------- */
.counter { display: inline-flex; align-items: center; gap: 8px; background: var(--good-tint); border: 1px solid #a7f3d0; color: #065f46; padding: 6px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; font-family: var(--mono); }
.counter .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }

/* ---------- Footer ---------- */
.foot { background: var(--bg-2); border-top: 1px solid var(--line); padding: 56px 0 32px; font-size: .88rem; }
.foot-grid { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 36px; }
.foot h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 12px; font-family: var(--mono); }
.foot ul { list-style: none; }
.foot li { margin-bottom: 7px; }
.foot a { color: var(--body); }
.foot a:hover { color: var(--blue); }
.foot-bottom { border-top: 1px solid var(--line); padding-top: 24px; color: var(--muted); font-size: .8rem; text-align: center; }
.disclaimer { max-width: 64ch; margin: 0 auto 18px; line-height: 1.65; }

/* ---------- Flag (hand-drawn SVG, never emoji) ---------- */
.flag { display: inline-block; vertical-align: -2px; border: 1px solid var(--line); border-radius: 2px; }

/* ---------- Utility ---------- */
.mono { font-family: var(--mono); }
.mb0 { margin-bottom: 0; }
.mt24 { margin-top: 24px; }
.mt32 { margin-top: 32px; }
.hidden { display: none !important; }
.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

@media print {
  .nav, .foot, .btn, .no-print { display: none !important; }
  body { background: #fff; }
  .letter-paper { border: 0; padding: 0; max-height: none; font-size: 11pt; }
}
