:root {
  --bg: #f5f1e8;
  --paper: #fbf9f3;
  --ink: #1c1b18;
  --muted: #6a655a;
  --line: #d9d2c1;
  --shade: #ece4d0;
  --accent: #b4410f;
  --ok: #2c6a3d;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); }
a { color: var(--accent); }
code, pre { font-family: var(--mono); }
code { font-size: .9em; background: var(--shade); padding: .05em .35em; border-radius: 3px; }
pre { background: var(--ink); color: #efe9d8; padding: 1rem 1.1rem; border-radius: 4px; overflow: auto; font-size: .82rem; line-height: 1.5; margin: .5rem 0; }

.top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 1.1rem clamp(1rem, 4vw, 3rem); border-bottom: 1px solid var(--line); }
.mark { font: 700 1.25rem var(--serif); color: var(--ink); text-decoration: none; letter-spacing: .01em; }
.mark b { color: var(--accent); font-weight: 700; }
.top nav { display: flex; gap: 1.2rem; font-size: .9rem; flex-wrap: wrap; }
.top nav a { color: var(--ink); text-decoration: none; padding: .5rem 0; }
.top nav a:hover, .top nav a:focus-visible { color: var(--accent); text-decoration: underline; }

main { max-width: 1180px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 3rem) 4rem; }
section { padding-top: 3.2rem; }
h1 { font: 700 clamp(2rem, 5.2vw, 3.6rem)/1.08 var(--serif); letter-spacing: -.015em; margin: .3rem 0 1rem; max-width: 18ch; text-wrap: balance; }
h2 { font: 700 1.6rem/1.2 var(--serif); margin: 0 0 .4rem; }
h3 { font: 600 1rem var(--sans); margin: 0 0 .3rem; }
.kicker { text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; color: var(--accent); font-weight: 600; margin: 0; }
.sub { font-size: 1.12rem; max-width: 62ch; color: #35322b; text-wrap: pretty; }
.sub2 { color: var(--muted); max-width: 62ch; margin: 0 0 1.2rem; }
.status { font: .85rem var(--mono); color: var(--muted); border-top: 1px solid var(--line); padding-top: .8rem; margin-top: 1.4rem; }

.demo { margin-top: 1rem; }
.demo-head p { color: var(--muted); margin: .1rem 0 1rem; max-width: 62ch; }
.controls { display: flex; flex-wrap: wrap; gap: .8rem 1rem; align-items: end; padding: 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; }
.controls label { display: flex; flex-direction: column; gap: .25rem; font-size: .8rem; font-weight: 600; }
.controls .opt { font-weight: 400; color: var(--muted); }
.controls input[type=text], .controls input[type=number], .controls select { font: 1rem var(--sans); padding: .55rem .6rem; border: 1px solid var(--line); border-radius: 3px; background: #fff; min-width: 11rem; min-height: 44px; color: var(--ink); }
.controls .check { flex-direction: row; align-items: center; gap: .5rem; font-weight: 500; min-height: 44px; }
.controls .check input { width: 20px; height: 20px; accent-color: var(--accent); }
button { font: 600 1rem var(--sans); background: var(--ink); color: #fff; border: 0; border-radius: 3px; padding: .7rem 1.4rem; min-height: 44px; cursor: pointer; }
button:hover { background: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.note { min-height: 1.5rem; font-size: .85rem; color: var(--muted); margin: .7rem 0 .3rem; }
.note.err { color: #9b1c1c; }

.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); }
table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: .92rem; }
th, td { text-align: left; vertical-align: top; padding: .65rem .85rem; border-bottom: 1px solid var(--line); }
thead th { font-weight: 600; background: var(--paper); vertical-align: bottom; min-width: 190px; border-bottom: 2px solid var(--ink); }
thead th:first-child { min-width: 130px; }
thead .brand { display: block; font: .72rem var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
thead .ttl { display: block; font: 600 .95rem/1.3 var(--serif); margin: .15rem 0 .3rem; }
thead a.go { font-size: .8rem; }
tbody th { font-weight: 600; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; width: 130px; position: sticky; left: 0; background: var(--paper); }
tbody tr.diff th { background: var(--shade); color: var(--ink); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
td.na { color: #a39c8c; }
td.yes { color: var(--ok); font-weight: 600; }
td.best { font-weight: 700; }
td .tag { display: inline-block; font-size: .7rem; border: 1px solid var(--ok); color: var(--ok); padding: 0 .35rem; border-radius: 2px; margin-left: .35rem; vertical-align: 1px; }
.fine { font-size: .8rem; color: var(--muted); margin: .6rem 0; max-width: 70ch; }
.raw summary { cursor: pointer; font-size: .85rem; color: var(--muted); padding: .4rem 0; }
.raw pre { max-height: 22rem; }

.toolist { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); margin: 0; }
.toolist .row { display: grid; grid-template-columns: 13rem 1fr; gap: .4rem 2rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.toolist dt { font: 600 .95rem var(--mono); color: var(--ink); }
.toolist dd { margin: 0; color: #35322b; max-width: 70ch; }
.toolist dd .args { display: block; font: .78rem var(--mono); color: var(--muted); margin-top: .3rem; }
@media (max-width: 720px) { .toolist .row { grid-template-columns: 1fr; } }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } }

.rules { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.rules li { padding: .9rem 0; border-bottom: 1px solid var(--line); max-width: 75ch; }

footer { border-top: 1px solid var(--line); padding: 1.4rem clamp(1rem, 4vw, 3rem); font-size: .8rem; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

h1 { max-width: 22ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.4rem 0 0; }
.btn { display: inline-block; background: var(--ink); color: #fff; text-decoration: none; font-weight: 600; padding: .8rem 1.4rem; border-radius: 3px; min-height: 44px; }
.btn:hover, .btn:focus-visible { background: var(--accent); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn.ghost:hover, .btn.ghost:focus-visible { background: var(--ink); color: #fff; }
.plain { margin: .5rem 0 0; padding-left: 1.2rem; max-width: 62ch; }
.plain li { margin: .4rem 0; }
.plain.big { font-size: 1.1rem; }
.gap { margin-top: 2rem; }
.steps { margin: .5rem 0 0; padding-left: 1.3rem; max-width: 62ch; }
.steps li { margin: .5rem 0; }
.honest p, .close p { max-width: 62ch; }
.faq details { border-top: 1px solid var(--line); padding: .8rem 0; max-width: 70ch; }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.faq details p { margin: .2rem 0 .4rem; color: #35322b; }
.ps { color: var(--muted); }
