:root {
  --paper: #f6f7f5;
  --sheet: #ffffff;
  --ink: #18211d;
  --muted: #59625d;
  --rule: #d3d9d5;
  --field: #eef1ee;
  --green: #1e6b48;
  --green-dark: #154d34;
  --green-tint: #e3efe8;
  --red: #a8322a;
  --red-tint: #f6e4e2;
  --measure: 40rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.55 "Public Sans", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}
a { color: var(--green-dark); text-underline-offset: .18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
code, pre { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .875rem; }
p { margin: 0 0 1em; max-width: var(--measure); }

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.5rem; }

/* header and footer */
.top { border-bottom: 1px solid var(--rule); background: var(--sheet); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.75rem; }
.mark { font-weight: 700; font-size: 1.05rem; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.mark span { color: var(--green); }
.top nav { display: flex; gap: 1.5rem; font-size: .95rem; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--ink); text-decoration: underline; }
.foot { border-top: 1px solid var(--rule); margin-top: 4rem; padding: 2rem 0 3rem; color: var(--muted); font-size: .9rem; }
.foot p { max-width: 52rem; }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 27rem); gap: 3.5rem; align-items: start; padding: 4rem 0 3.5rem; }
h1 { font-size: clamp(2rem, 4.2vw, 2.85rem); line-height: 1.1; letter-spacing: -.025em; font-weight: 700; margin: 0 0 1.1rem; max-width: 15ch; text-wrap: balance; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 33rem; margin-bottom: 2rem; }

/* upload */
.upload { background: var(--sheet); border: 1px solid var(--rule); border-radius: 6px; padding: 1.25rem; max-width: 33rem; }
.drop { position: relative; display: block; border: 1.5px dashed #a9b3ad; border-radius: 4px; padding: 1.4rem 1rem; text-align: center; color: var(--muted); background: var(--paper); cursor: pointer; }
.drop strong { color: var(--ink); font-weight: 600; }
.drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop:hover, .drop.has-file { border-color: var(--green); background: var(--green-tint); }
.drop:focus-within { outline: 3px solid var(--green); outline-offset: 2px; }
.drop .chosen { display: block; margin-top: .3rem; color: var(--green-dark); font-weight: 600; word-break: break-all; }
label.field { display: block; font-size: .9rem; font-weight: 600; margin: 1rem 0 .35rem; }
input[type=email] { width: 100%; font: inherit; padding: .6rem .7rem; border: 1px solid #b9c2bd; border-radius: 4px; background: var(--sheet); color: var(--ink); }
.actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.1rem; }
button, .button { font: inherit; font-weight: 600; background: var(--green); color: #fff; border: 0; border-radius: 4px; padding: .7rem 1.3rem; cursor: pointer; text-decoration: none; display: inline-block; }
button:hover, .button:hover { background: var(--green-dark); color: #fff; }
button[disabled] { opacity: .7; cursor: progress; }
.hint { font-size: .9rem; color: var(--muted); margin: 0; }

/* the form-sheet: ruled field boxes like the CF1R itself */
.sheet { background: var(--sheet); border: 1px solid var(--ink); border-radius: 2px; box-shadow: 6px 6px 0 var(--field); }
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .6rem .85rem; border-bottom: 1px solid var(--ink); font-size: .85rem; }
.sheet-head b { font-weight: 700; }
.sheet-head span { color: var(--muted); }
.cells { display: grid; grid-template-columns: 1fr 1fr; }
.cell { padding: .55rem .85rem .65rem; border-bottom: 1px solid var(--rule); min-width: 0; }
.cell:nth-child(odd) { border-right: 1px solid var(--rule); }
.cell.wide { grid-column: 1 / -1; border-right: 0; }
.cell small { display: block; font-size: .78rem; color: var(--muted); line-height: 1.3; margin-bottom: .1rem; }
.cell div { font-weight: 600; overflow-wrap: anywhere; }
.verdict { padding: 1rem .85rem 1.1rem; border-bottom: 1px solid var(--ink); }
.verdict small { display: block; font-size: .78rem; color: var(--muted); }
.verdict .big { font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.verdict .margin { color: var(--muted); margin-top: .15rem; }
.verdict.pass { background: var(--green-tint); } .verdict.pass .big { color: var(--green-dark); }
.verdict.fail { background: var(--red-tint); } .verdict.fail .big { color: var(--red); }
.sheet-foot { padding: .7rem .85rem; font-size: .92rem; }
.sheet-foot:has(.downloads) { padding: 0; }
.sheet-label { font-size: .85rem; color: var(--muted); margin: 0 0 .5rem; }

/* sections: heading in a narrow left column */
.section { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: 2.5rem; padding: 2.75rem 0; border-top: 1px solid var(--rule); }
.section h2 { font-size: 1.2rem; line-height: 1.3; margin: .1rem 0 0; letter-spacing: -.01em; }
.section ul, .section ol { margin: 0 0 1em; padding-left: 1.2rem; max-width: var(--measure); }
.section li { margin-bottom: .55rem; }
.section li::marker { color: var(--muted); }
.steps { list-style: none; padding: 0 !important; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding-left: 2.4rem; margin-bottom: 1rem; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: .05rem; width: 1.6rem; height: 1.6rem; border: 1px solid var(--ink); border-radius: 50%; display: grid; place-items: center; font-size: .85rem; font-weight: 600; }
dl.files { margin: 0; max-width: var(--measure); }
dl.files dt { font-weight: 600; }
dl.files dd { margin: 0 0 .8rem; color: var(--muted); }
pre { white-space: pre; background: var(--ink); color: #e8efe9; padding: 1rem 1.1rem; border-radius: 4px; overflow-x: auto; max-width: 46rem; line-height: 1.5; }
p code, li code, dd code { background: var(--field); padding: .05rem .3rem; border-radius: 3px; }

/* run page */
.run { padding: 3rem 0 1rem; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 27rem); gap: 3.5rem; align-items: start; }
.run h1 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); max-width: none; overflow-wrap: anywhere; }
.progress { list-style: none; padding: 0; margin: 1.5rem 0; max-width: 30rem; }
.progress li { display: flex; gap: .75rem; align-items: baseline; padding: .7rem 0; border-bottom: 1px solid var(--rule); color: var(--muted); }
.progress li::before { content: ""; flex: none; width: .7rem; height: .7rem; border-radius: 50%; border: 1.5px solid #a9b3ad; transform: translateY(.05rem); }
.progress li.done { color: var(--ink); } .progress li.done::before { background: var(--green); border-color: var(--green); }
.progress li.now { color: var(--ink); font-weight: 600; } .progress li.now::before { border-color: var(--green); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { background: var(--green-tint); box-shadow: 0 0 0 4px var(--green-tint); } }
.downloads { list-style: none; padding: 0; margin: 0; }
.downloads li { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; padding: .65rem .85rem; border-bottom: 1px solid var(--rule); }
.downloads li:last-child { border-bottom: 0; }
.downloads span { color: var(--muted); font-size: .88rem; flex: none; }
.note { border-left: 3px solid var(--green); padding: .2rem 0 .2rem 1rem; color: var(--muted); max-width: var(--measure); }
.note.fail { border-color: var(--red); }

@media (max-width: 880px) {
  .hero, .run { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; padding-top: 2.5rem; }
  .section { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .top nav a:not(:last-child) { display: none; }
}
@media (max-width: 420px) {
  .cells { grid-template-columns: 1fr; }
  .cell:nth-child(odd) { border-right: 0; }
}
@media (prefers-reduced-motion: reduce) { .progress li.now::before { animation: none; background: var(--green-tint); } }

/* guides */
.article { max-width: 46rem; padding: 3rem 0 1rem; }
.article h1 { max-width: none; font-size: clamp(1.9rem, 3.6vw, 2.5rem); }
.article h2 { font-size: 1.35rem; line-height: 1.3; letter-spacing: -.01em; margin: 2.4rem 0 .7rem; }
.article h3 { font-size: 1.08rem; margin: 1.6rem 0 .5rem; }
.article ul, .article ol { padding-left: 1.2rem; max-width: var(--measure); }
.article li { margin-bottom: .45rem; }
.crumbs { font-size: .9rem; margin-bottom: .6rem; }
.checked { color: var(--muted); font-size: .92rem; }
.answer { font-size: 1.12rem; border-left: 3px solid var(--green); padding: .1rem 0 .1rem 1rem; max-width: var(--measure); }
.table-wrap { overflow-x: auto; margin: 1.2rem 0 1.4rem; border: 1px solid var(--rule); border-radius: 4px; background: var(--sheet); }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { text-align: left; vertical-align: top; padding: .55rem .7rem; border-bottom: 1px solid var(--rule); }
th { background: var(--field); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
.src { font-size: .85rem; color: var(--muted); }
.cta { margin-top: 3rem; padding: 1.2rem 1.3rem; background: var(--green-tint); border-radius: 6px; }
.cta p { margin: 0 0 .7rem; }
.guide-list { list-style: none; padding: 0 !important; }
.guide-list li { padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.guide-list a { font-weight: 600; font-size: 1.1rem; }
.guide-list p { margin: .25rem 0 0; color: var(--muted); }
