@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  src: url('/fonts/atkinson-next-latin.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
  /* Everything except the digits: this font slashes its zero, which looks like code on money,
     so digits fall through to the computer's own font, which has a plain zero. */
  unicode-range: U+0000-002F, U+003A-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #f2f4f1;
  --stock: #ffffff;
  --ink: #1b2330;
  --ink-soft: #4a5463;
  --kraft: #c59a63;
  --kraft-deep: #8f6a3c;
  --kraft-pale: #ead9c1;
  --green: #0e6e5c;
  --green-pale: #dcefe9;
  --amber: #9a5b00;
  --amber-pale: #f6e8d2;
  --line: #cfd4cc;
  --focus: #2f5fd0;
  --radius-label: 10px;
  --measure: 66ch;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Atkinson Hyperlegible Next', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}

a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green); }

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

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 3.8vw, 2.75rem); font-weight: 700; max-width: 20ch; }
h2 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; max-width: var(--measure); }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--stock); padding: 8px 12px; z-index: 10; }

/* Header */
.top { padding: 22px 0; }
.top .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.mark { font-weight: 800; font-size: 1.2rem; text-decoration: none; letter-spacing: -0.01em; }
.mark small { font-weight: 450; color: var(--ink-soft); font-size: 0.85rem; margin-left: 6px; }
.top nav { display: flex; gap: 20px; font-size: 0.95rem; }

/* Hero and drop zone */
.hero { padding: 28px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: start; }
.lede { font-size: 1.2rem; color: var(--ink-soft); }
.promise { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.promise li { padding-left: 28px; position: relative; }
.promise li::before { content: ''; position: absolute; left: 0; top: 0.45em; width: 14px; height: 8px;
  border-left: 3px solid var(--green); border-bottom: 3px solid var(--green); transform: rotate(-45deg); }

/* The label: the one bold thing on the page */
.label {
  background: var(--stock);
  border: 2px solid var(--ink);
  border-radius: var(--radius-label);
  box-shadow: 0 0 0 10px var(--kraft), 0 0 0 12px var(--kraft-deep);
  margin: 12px;
  position: relative;
}
.label-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px;
  border-bottom: 2px solid var(--ink); font-weight: 700; font-size: 0.95rem; }
.label-head span:last-child { font-weight: 500; color: var(--ink-soft); }
.label-body { padding: 22px 18px; }

.drop {
  display: grid; place-items: center; text-align: center; gap: 10px;
  min-height: 230px; padding: 24px;
  border: 2px dashed var(--kraft-deep); border-radius: 8px;
  background: repeating-linear-gradient(135deg, #fff 0 14px, #fbf7f1 14px 28px);
  cursor: pointer; transition: background-color .15s, border-color .15s;
}
.drop.over { border-color: var(--green); background: var(--green-pale); }
.drop strong { font-size: 1.3rem; font-weight: 700; }
.drop p { margin: 0; color: var(--ink-soft); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.btn {
  font: inherit; font-weight: 650; cursor: pointer;
  padding: 12px 20px; border-radius: 8px; border: 2px solid var(--ink);
  background: var(--ink); color: #fff; text-decoration: none; display: inline-block;
}
.btn:hover { background: #2c3747; color: #fff; }
.btn.quiet { background: transparent; color: var(--ink); }
.btn.quiet:hover { background: var(--stock); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.small { font-size: 0.9rem; color: var(--ink-soft); }
.files { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 6px; font-size: 0.95rem; }
.files li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px;
  background: var(--paper); border-radius: 6px; }
.files .bad { color: var(--amber); }

/* Results */
.results { padding: 8px 0 64px; }
.results[hidden] { display: none; }
.verdict { font-weight: 700; font-size: clamp(1.35rem, 2.6vw, 1.9rem); line-height: 1.2; max-width: 28ch; margin: 0 0 12px; }
.verdict.over { color: var(--ink); }
.pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-weight: 650; font-size: 0.9rem; }
.pill.under { background: var(--green-pale); color: var(--green); }
.pill.over { background: var(--amber-pale); color: var(--amber); }

.yearbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 0 0 28px; }
select, input[type=text], input[type=email], input[type=number], textarea {
  font: inherit; padding: 10px 12px; border: 2px solid var(--line); border-radius: 8px; background: var(--stock); color: var(--ink);
}
select:focus, input:focus, textarea:focus { border-color: var(--ink); outline: none; }
/* Tick boxes and the hidden file input have no border to change, so they keep a visible ring. */
input[type=checkbox]:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.drop:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }

table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 650; }
td.num, th.num { text-align: right; white-space: nowrap; }
tr.total td { font-weight: 750; border-bottom: 2px solid var(--ink); }
tr.muted td { color: var(--ink-soft); }

.costs { display: grid; gap: 14px; margin-top: 8px; }
.costs label { display: grid; gap: 4px; font-weight: 600; }
.costs label span { font-weight: 400; font-size: 0.9rem; color: var(--ink-soft); }
.money { position: relative; }
.money::before { content: '£'; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-soft); }
.money input { padding-left: 26px; width: 100%; }

/* The return boxes */
.boxes { display: grid; gap: 0; border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; background: var(--stock); }
.box { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.box:last-child { border-bottom: 0; }
.box b { font-size: 0.9rem; background: var(--ink); color: #fff; border-radius: 4px; text-align: center; padding: 3px 0; }
.box output { font-weight: 750; font-size: 1.1rem; }
.locked .box output { filter: blur(6px); user-select: none; }

.unlock { margin-top: 18px; padding: 18px; background: var(--kraft-pale); border-radius: 8px; }
.unlock p { margin-bottom: 12px; }
.unlock .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.93rem; margin: 10px 0 14px; }
.check input { margin-top: 4px; width: 18px; height: 18px; flex: none; }

.downloads { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

details.tx { margin-top: 32px; }
details.tx summary { cursor: pointer; font-weight: 650; }
.txwrap { max-height: 520px; overflow: auto; margin-top: 12px; background: var(--stock); border-radius: 8px; border: 1px solid var(--line); }
.txwrap table th { position: sticky; top: 0; background: var(--stock); }

.notice { padding: 14px 16px; border-left: 4px solid var(--amber); background: var(--amber-pale); border-radius: 0 8px 8px 0; margin: 16px 0; max-width: var(--measure); }
.notice.ok { border-color: var(--green); background: var(--green-pale); }
.notice label { display: block; font-size: 0.93rem; }
.notice .keyout { width: 100%; margin-top: 6px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.85rem; }

/* Content sections */
.section { padding: 56px 0; border-top: 1px solid var(--line); }
.platforms { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px 40px; }
.platforms details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.platforms summary { cursor: pointer; font-weight: 680; }
.platforms ol { margin: 10px 0 0; padding-left: 22px; }

.price { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.price .amount { font-weight: 700; font-size: 2.6rem; line-height: 1; margin: 6px 0 12px; }
.price ul { padding-left: 20px; }

.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; max-width: 820px; }
.faq summary { cursor: pointer; font-weight: 650; }
.faq details p { margin: 10px 0 0; }

.feedback form { display: grid; gap: 10px; max-width: 560px; }
.feedback textarea { min-height: 110px; }
.hp { position: absolute; left: -9999px; }

.foot { padding: 32px 0 48px; border-top: 1px solid var(--line); font-size: 0.92rem; color: var(--ink-soft); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }

.prose { padding: 32px 0 64px; }
.prose h1 { max-width: 24ch; }
.prose h2 { margin-top: 1.6em; }
.prose li { max-width: var(--measure); margin-bottom: 0.4em; }

@media (max-width: 860px) {
  .hero .wrap, .grid2, .price { grid-template-columns: 1fr; gap: 28px; }
  .label { margin: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

@media print {
  .top, .hero, .section, .foot, .unlock, .downloads { display: none !important; }
  body { background: #fff; }
}

.mt-xs { margin-top: 6px; }
.mt-s { margin-top: 12px; }
.mt-l { margin-top: 28px; }
.mt-xl { margin-top: 44px; }
.grow { flex: 1; min-width: 220px; }

.grid2 > *, .hero .wrap > * { min-width: 0; }
.box { grid-template-columns: 52px 1fr auto; }
@media (max-width: 520px) {
  .label-head { flex-wrap: wrap; gap: 2px 12px; }
  .label-head span:last-child { font-size: 0.85rem; }
  .box { grid-template-columns: 44px 1fr; }
  .box output { grid-column: 2; }
  #reported th:nth-child(4), #reported td:nth-child(4) { display: none; }
}

/* Sales with no file: rows for totals, the quarterly block, and the sales sheet link */
#manual .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
#manual .row .grow { flex: 1 1 160px; min-width: 0; }
#manual .quarters { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line, #d8d2c6); border-radius: 8px; }
#manual .quarters label { display: grid; gap: 4px; font-weight: 600; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: pointer; }
.linkish:hover { color: var(--green); }
.preview-banner { max-width: none; margin: 0; padding: 8px 16px; text-align: center; background: var(--amber-pale); color: var(--amber); font-weight: 600; }

/* "Remind me before the deadline" */
.remind { background: var(--kraft-pale); border-top: 0; }
.remind h2 { max-width: 34ch; }
.remind-form { display: grid; gap: 8px; max-width: 620px; }
.remind-form label { font-weight: 650; }
.remind-form .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.remind-form .row .grow { flex: 1 1 220px; min-width: 0; }
.remind-form .small { margin: 4px 0 0; }

/* Guide pages */
.prose .byline { color: var(--ink-soft); font-size: 0.9rem; }
.prose table { max-width: 760px; margin: 0 0 1.2em; }
.prose .example { background: var(--stock); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin: 0 0 1.2em; max-width: var(--measure); }
.prose .example h3 { margin-top: 0; }
.prose .example p:last-child, .prose .example ul:last-child { margin-bottom: 0; }
.prose .related { margin-top: 2em; padding-top: 1em; border-top: 1px solid var(--line); }
.prose .sources { font-size: 0.92rem; color: var(--ink-soft); }
.prose .sources li { margin-bottom: 0.25em; }
.tablewrap { overflow-x: auto; max-width: 100%; }
