/* Still Relevant. Light only, quietly British: white paper, ink, British racing green for anything you act on,
   pillar-box red for exactly one thing (the postmark). One typeface, Atkinson Hyperlegible Next (drawn by the
   Braille Institute), in two weights and five sizes (14, 16, 18, 20, 26) plus the headline: people send medical
   and legal paperwork from their phones and must read it right first time. */
:root {
  color-scheme: light;
  --bg: #ffffff; --surface: #f6f5f1; --ink: #1c1d1f; --muted: #5b5d61; --line: #dedcd5;
  --blue: #1d4d3a; --blue-hover: #153a2c; --blue-soft: #e6efe9; --red: #b3261e;
  --ok: #1d4d3a; --ok-soft: #eef4ef; --warn: #b42318; --warn-soft: #fdf0ee;
  --font: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  --num: var(--font); --serif: var(--font); --display: var(--font); /* one typeface everywhere */
  --radius: 10px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.55 var(--font); font-variant-numeric: tabular-nums; }
a { color: var(--blue); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Header and footer */
.site { border-bottom: 1px solid var(--line); }
.site .in { max-width: 1120px; margin: 0 auto; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 20px; white-space: nowrap; flex: none; }
.brand svg { width: 28px; height: 28px; }
.site nav { display: flex; gap: 20px; min-width: 0; }
.site nav a { color: var(--ink); text-decoration: none; font-size: 16px; white-space: nowrap; }
.site nav a:hover { text-decoration: underline; }
footer.site-foot { border-top: 1px solid var(--line); margin-top: 72px; }
footer.site-foot .in { max-width: 1120px; margin: 0 auto; padding: 28px 16px 48px; font-size: 16px; color: var(--muted); display: grid; gap: 10px; }
footer.site-foot nav a { color: var(--muted); margin-right: 18px; }

/* Page frames */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; margin: 0 auto; padding: 0 16px; }
h1 { font-weight: 700; font-size: clamp(34px, 5vw, 52px); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 16px; }
h2 { font-weight: 700; font-size: 26px; line-height: 1.2; letter-spacing: -0.01em; margin: 56px 0 14px; }
h3 { font-size: 18px; margin: 22px 0 6px; }
p { margin: 0 0 14px; }
.lede { font-size: 20px; color: var(--muted); max-width: 32em; }

/* Hero: words on the left, the tool on the right (stacked on phones, tool first after the headline) */
.hero { display: grid; grid-template-columns: 1fr minmax(0, 520px); gap: 56px; align-items: start; padding: 48px 0 8px; }
.price-line { font-size: 18px; margin: 18px 0 0; }
.price-line strong { font-size: 20px; }
.promise { margin: 24px 0 0; padding: 18px 20px; background: var(--ok-soft); border-left: 4px solid var(--ok); border-radius: 0 var(--radius) var(--radius) 0; }
.promise strong { display: block; color: var(--ok); font-size: 18px; margin-bottom: 4px; }
.promise p { margin: 0; font-size: 16px; color: var(--ink); }
.facts { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; font-size: 16px; color: var(--muted); }
.facts li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; }
.facts svg { width: 20px; height: 20px; margin-top: 3px; color: var(--ink); }
.after-tool { display: none; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 22px; padding-top: 26px; }
  .hero-copy .promise, .hero-copy .facts { display: none; }
  .after-tool { display: block; }
}

/* The tool */
.tool { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(28, 29, 31, .06), 0 10px 28px rgba(28, 29, 31, .08); padding: 24px; }
@media (max-width: 420px) { .tool { padding: 18px; } }
.field { display: grid; gap: 8px; margin-bottom: 22px; }
.field > label, .field > .lab { font-weight: 700; font-size: 18px; }
.step { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 14px; margin-right: 8px; vertical-align: 1px; }
.drop { position: relative; display: grid; place-items: center; text-align: center; gap: 4px; min-height: 148px; border: 2px dashed #9aa6b8; border-radius: var(--radius); padding: 20px; cursor: pointer; background: var(--surface); transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--blue); background: var(--blue-soft); }
.drop b { font-size: 18px; }
.drop small { color: var(--muted); font-size: 16px; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop svg { width: 30px; height: 30px; color: var(--blue); }
.filebar { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 16px; }
.filebar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.pages { display: flex; gap: 10px; overflow-x: auto; padding: 6px 2px 8px; }
.pages canvas { height: 132px; width: auto; background: #fff; border: 1px solid var(--line); border-radius: 2px; box-shadow: 0 1px 3px rgba(28, 29, 31, .12); flex: none; }
.numrow { display: grid; grid-template-columns: minmax(0, 170px) 1fr; gap: 8px; }
@media (max-width: 480px) { .numrow { grid-template-columns: minmax(0, 38%) 1fr; } }
select, input[type=tel], input[type=text], textarea { width: 100%; font: 18px/1.3 var(--font); color: var(--ink); background: #fff; border: 1.5px solid #9aa6b8; border-radius: 8px; padding: 12px; }
input[type=tel] { font-size: 20px; letter-spacing: .02em; }
select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2312233d'%3E%3Cpath d='M5 7l5 6 5-6z'/%3E%3C/svg%3E") no-repeat right 10px center / 16px; padding-right: 34px; font-size: 16px; }
select:focus, input:focus, textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px var(--blue-soft); }
textarea { min-height: 90px; font-size: 16px; }
.quote { font-size: 16px; color: var(--muted); min-height: 1.5em; }
.quote strong { color: var(--ink); }
.hint { font-size: 16px; color: var(--muted); }
.err { color: var(--warn); font-weight: 700; font-size: 16px; }
.err:empty { display: none; }
details.cover summary { cursor: pointer; font-weight: 700; color: var(--blue); }
details.cover .grid { display: grid; gap: 8px; margin-top: 12px; }
.btn, button.primary { appearance: none; border: 0; border-radius: 8px; background: var(--blue); color: #fff; font: 700 18px/1 var(--font); padding: 18px 20px; width: 100%; cursor: pointer; text-decoration: none; display: inline-block; text-align: center; }
.btn:hover, button.primary:hover { background: var(--blue-hover); }
button[disabled] { opacity: .6; cursor: progress; }
button.link { appearance: none; background: none; border: 0; color: var(--blue); font: 16px var(--font); text-decoration: underline; cursor: pointer; padding: 6px; }
.paynote { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 14px; color: var(--muted); margin-top: 12px; text-align: center; }
.paynote svg { width: 16px; height: 16px; flex: none; }
.spin { display: inline-block; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: s .8s linear infinite; vertical-align: -2px; }
@keyframes s { to { transform: rotate(360deg); } }

/* The transmission report: the confirm step and the status page */
.report { border: 1.5px solid var(--ink); border-radius: 6px; padding: 18px 18px 14px; background: #fff; }
.report h3 { margin: 0 0 12px; font-family: var(--serif); font-size: 18px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.report h3 small { font: 14px var(--num); color: var(--muted); }
.report .body { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
.report canvas { width: 96px; height: auto; border: 1px solid var(--line); box-shadow: 0 1px 3px rgba(28, 29, 31, .12); }
.report dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 16px; }
.report dt { color: var(--muted); }
.report dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.report dd.num { letter-spacing: .01em; }
.report .result { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); font: 16px var(--num); }
.report .result.ok { color: var(--ok); }
.report .result.bad { color: var(--warn); }
.confirm { display: grid; gap: 12px; }
.confirm .actions { display: grid; gap: 4px; justify-items: center; }
@media (max-width: 440px) { .report .body { grid-template-columns: 1fr; } .report canvas { width: 110px; } }

/* Status page */
.status-head { padding: 40px 0 8px; }
.badge { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; padding: 6px 12px; border-radius: 999px; background: var(--surface); margin-bottom: 14px; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.bad { background: var(--warn-soft); color: var(--warn); }
.badge.live { background: var(--blue-soft); color: var(--blue); }
.steps { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 8px; font-size: 16px; }
.steps li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; color: var(--muted); }
.steps li.done, .steps li.now { color: var(--ink); }
.steps li.now { font-weight: 700; }
.steps i { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); margin-top: 3px; display: grid; place-items: center; font-style: normal; font-size: 12px; line-height: 1; }
.steps li.done i { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps li.now i { border-color: var(--blue); border-right-color: transparent; animation: s 1s linear infinite; }
.steps li.fail i { background: var(--warn); border-color: var(--warn); color: #fff; }

/* Content */
.prose p, .prose li { max-width: 40em; }
.prose code { font: 16px var(--num); background: var(--surface); padding: 1px 5px; border-radius: 4px; }
pre { font: 14px/1.5 var(--num); background: var(--surface); border: 1px solid var(--line); padding: 14px; border-radius: 8px; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 16px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 700; background: var(--surface); }
.how { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: s; }
.how li { counter-increment: s; }
.how li::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; margin-bottom: 10px; }
.how b { display: block; font-size: 18px; margin-bottom: 4px; }
.how span { color: var(--muted); font-size: 16px; }
@media (max-width: 700px) { .how { grid-template-columns: 1fr; } }
dl.faq dt { font-weight: 700; margin-top: 22px; font-size: 18px; }
dl.faq dd { margin: 6px 0 0; color: var(--muted); max-width: 40em; }
.services { display: grid; gap: 14px; margin: 28px 0; }
.service { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-decoration: none; color: var(--ink); box-shadow: 0 1px 2px rgba(28, 29, 31, .06); }
.service:hover { border-color: var(--blue); }
.service svg { width: 40px; height: 40px; color: var(--blue); }
.service h3 { margin: 0; font-size: 20px; }
.service p { margin: 2px 0 0; color: var(--muted); font-size: 16px; }
.service .go { font-weight: 700; color: var(--blue); white-space: nowrap; }
@media (max-width: 520px) { .service { grid-template-columns: auto 1fr; } .service .go { grid-column: 2; } }

/* The postmark: the one British flourish. Red ink, stamped on the corner of the "only pay if delivered" promise. */
.promise { position: relative; padding-right: 112px; }
.postmark { position: absolute; top: -26px; right: -14px; width: 116px; height: 116px; color: var(--red); transform: rotate(-11deg); opacity: .9; pointer-events: none; }
.postmark text { font: 700 9.5px var(--font); letter-spacing: .12em; fill: currentColor; }
.postmark .mid { font: 400 18px var(--display); letter-spacing: 0; }
@media (max-width: 520px) { .promise { padding-right: 20px; padding-top: 66px; } .postmark { width: 92px; height: 92px; top: -18px; right: 6px; } }
.how li::before { background: var(--blue); font-family: var(--serif); }

/* Phones, including large-text settings: one calm line of header, nothing breaking mid-phrase. */
@media (max-width: 600px) {
  .site .in { padding: 12px 16px; gap: 12px; }
  .brand { font-size: 18px; gap: 8px; }
  .brand svg { width: 24px; height: 24px; }
  .site nav a:not(:last-child) { display: none; } /* keep Help; the services are one tap away on the home page */
  .lede { font-size: 18px; line-height: 1.5; color: #45474b; }
  .numrow { grid-template-columns: 1fr; }
  .tool { padding: 18px; }
  .service { grid-template-columns: 1fr; gap: 10px; padding: 20px; }
  .service svg { width: 34px; height: 34px; }
  .service .go { grid-column: auto; display: block; text-align: center; background: var(--blue); color: #fff; border-radius: 8px; padding: 14px 16px; margin-top: 6px; }
  footer.site-foot nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
  footer.site-foot nav a { margin: 0; white-space: nowrap; }
  footer.site-foot nav a[href="/fax/api/"] { grid-column: 1 / -1; order: 9; }
}
@media (hover: none) and (pointer: coarse) { .drop .drag { display: none; } }
