/* Crossfoot. Ledger paper, ink navy, the auditor's tick, and the double rule under a total. See docs/identity.md. */
[hidden] { display: none !important; }

@font-face { font-family: 'Source Serif 4'; src: url(/fonts/SourceSerif4-opsz.woff2) format('woff2-variations'); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Source Serif 4'; src: url(/fonts/SourceSerif4-opsz-italic.woff2) format('woff2-variations'); font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url(/fonts/IBMPlexMono-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url(/fonts/IBMPlexMono-600.woff2) format('woff2'); font-weight: 600; font-display: swap; }

:root {
  --paper: #f2f0e3;       /* buff columnar-pad paper */
  --sheet: #fbfaf3;       /* a fresh working paper laid on it */
  --ink: #17284a;         /* ledger ink */
  --ink-2: #45526b;
  --rule: #bccbb4;        /* the pad's green rules */
  --rule-2: #8ea788;
  --margin: #d39b92;      /* the pad's red margin rules */
  --red: #a8261c;         /* the accountant's red */
  --tick: #2b6638;        /* the auditor's tick */
  --serif: 'Source Serif 4', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.125rem/1.62 var(--serif); font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
code, pre, .fig, .num, .num-l { font-family: var(--mono); font-variant-numeric: tabular-nums; }
code { font-size: .88em; background: rgba(23, 40, 74, .06); padding: .06em .32em; border-radius: 2px; overflow-wrap: break-word; }
pre code { background: none; padding: 0; font-size: inherit; overflow-wrap: normal; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 1.5rem; }
.wrap.narrow { max-width: 880px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: .5rem .9rem; z-index: 10; }
.skip:focus { left: 1rem; top: .5rem; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- type ---- */
h1, h2, h3 { font-weight: 600; line-height: 1.12; letter-spacing: -.012em; margin: 0 0 .6em; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 4.4vw, 3.7rem); font-variation-settings: 'opsz' 60; margin-top: 3.2rem; }
h2 { font-size: clamp(1.5rem, 2.4vw, 1.95rem); font-variation-settings: 'opsz' 40; margin-top: 2.4rem; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.05em; }
.lede { font-size: 1.27rem; line-height: 1.55; color: var(--ink-2); }
.small { font-size: .95rem; color: var(--ink-2); }
.asof { font-style: italic; color: var(--ink-2); margin-bottom: 1.2rem; }
.red { color: var(--red); }
.pending { font-style: italic; color: var(--ink-2); font-size: .95rem; white-space: nowrap; }

/* ---- the signature: a total's rules ---- */
hr.total {
  border: 0; height: 12px; margin: 4rem 0 0;
  background:
    linear-gradient(var(--ink), var(--ink)) top / 100% 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) bottom 3px left / 100% 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) bottom / 100% 1px no-repeat;
}
hr.total + section > h2:first-child, hr.total + h2, hr.total + section > h2 { margin-top: 1.6rem; }

/* ---- header / footer ---- */
.top { border-bottom: 1px solid var(--rule-2); background: var(--paper); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: .8rem 2rem; min-height: 4.4rem; flex-wrap: wrap; padding-top: .5rem; padding-bottom: .5rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; font-size: 1.42rem; font-weight: 650; letter-spacing: -.01em; font-variation-settings: 'opsz' 36; }
.brand .mark { width: 30px; height: 30px; color: var(--ink); }
.top nav { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem 1.4rem; font-size: 1rem; }
.top nav a:not(.btn) { text-decoration: none; padding: .2rem 0; border-bottom: 3px double transparent; }
.top nav a:not(.btn):hover { border-bottom-color: var(--rule-2); }
.top nav a[aria-current='page'] { border-bottom-color: var(--ink); }

.foot { margin-top: 5rem; border-top: 3px double var(--ink); }
.foot-in { padding-top: 1.6rem; padding-bottom: 3rem; font-size: .95rem; color: var(--ink-2); }
.foot-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }

/* ---- buttons ---- */
.btn {
  display: inline-block; background: var(--ink); color: var(--sheet); text-decoration: none;
  font: 600 1.02rem/1.2 var(--serif); padding: .78rem 1.2rem; border: 1.5px solid var(--ink); border-radius: 2px; cursor: pointer;
}
.btn:hover { background: #0d1a35; color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: rgba(23, 40, 74, .07); }
.btn.small { font-size: .95rem; padding: .5rem .85rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.6rem 0 1rem; }

/* ---- hero + working paper ---- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); gap: 3.5rem; align-items: center; padding: 1.5rem 0 1rem; }
.hero h1 { margin-top: 1.8rem; }
.paper {
  margin: 1.5rem 0 0; background-color: var(--sheet); position: relative;
  padding: 1.1rem 1.4rem 1.2rem 3.4rem;
  background-image:
    linear-gradient(to right, transparent 2.3rem, var(--margin) 2.3rem, var(--margin) calc(2.3rem + 1px), transparent calc(2.3rem + 1px), transparent calc(2.3rem + 4px), var(--margin) calc(2.3rem + 4px), var(--margin) calc(2.3rem + 5px), transparent calc(2.3rem + 5px));
  box-shadow: 0 1px 0 rgba(23, 40, 74, .08), 0 22px 40px -26px rgba(23, 40, 74, .45);
  transform: rotate(-.7deg);
  border: 1px solid #e2e1cf;
}
.paper-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .9rem; font-style: italic; color: var(--ink-2); border-bottom: 1px solid var(--rule); padding-bottom: .5rem; margin-bottom: .2rem; }
.wp { width: 100%; border-collapse: collapse; font-size: 1rem; }
.wp th, .wp td { padding: .48rem .4rem; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
.wp thead th { font-weight: 600; text-align: left; font-size: .95rem; line-height: 1.25; }
.wp thead th.num { text-align: right; font-family: var(--serif); }
.wp tbody th { font-weight: 400; text-align: left; }
.wp td.num { text-align: right; white-space: nowrap; }
.wp tr.grand th { font-weight: 600; }
.wp tr.grand td, .wp tr.grand th { border-bottom: 0; padding-top: .7rem; }
.dbl { border-top: 1px solid var(--ink); border-bottom: 3px double var(--ink); padding: .12rem 0 .08rem; }
.ring { border: 1.6px solid var(--red); border-radius: 48% 52% 50% 46% / 60% 55% 58% 52%; padding: .05rem .32rem; margin: -.05rem -.1rem; }
.wp sup { font-family: var(--serif); font-style: italic; font-size: .72em; margin-left: .1rem; }
.wp-note { font-size: .92rem; margin: .8rem 0 .7rem; line-height: 1.45; }
.wp-note sup { font-style: italic; margin-right: .2rem; }
.legend { display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; font-size: .9rem; color: var(--ink-2); border-top: 1px solid var(--rule); padding-top: .6rem; }

/* tick marks */
.tm { width: 1.05em; height: .95em; vertical-align: -.08em; margin-left: .2rem; flex: none; }
.tm.ok { color: var(--tick); }
.tm.bad { color: var(--red); width: .8em; height: .8em; vertical-align: -.02em; }

/* ---- ledger tables ---- */
.ledger-scroll { overflow-x: auto; margin: 0 0 1.2rem; position: relative; }
.ledger { width: 100%; border-collapse: collapse; background: var(--sheet); font-size: 1.02rem; border-top: 1px solid var(--ink); }
.ledger caption { caption-side: bottom; text-align: left; font-size: .92rem; color: var(--ink-2); padding: .6rem 0 0; font-style: italic; }
.ledger th, .ledger td { padding: .6rem .8rem; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: baseline; }
.ledger th + th, .ledger td, .ledger th + td { border-left: 1px solid var(--rule); }
.ledger thead th { font-weight: 600; font-size: .95rem; line-height: 1.25; border-bottom: 1px solid var(--ink); background: #f6f5e9; }
.ledger tbody th { font-weight: 600; }
.ledger .num, .ledger thead th.num { text-align: right; white-space: nowrap; }
.ledger thead th.num { font-family: var(--serif); }
.ledger .mk { text-align: center; white-space: nowrap; }
.ledger .mk .tm { margin: 0; width: 1.2em; height: 1.1em; }
.ledger tfoot th, .ledger tfoot td { border-bottom: 0; font-weight: 600; }
.ledger tfoot td.num:not(:empty) { box-shadow: inset 0 1px 0 var(--ink), inset 0 -4px 0 var(--sheet), inset 0 -5px 0 var(--ink), inset 0 -6px 0 var(--sheet), inset 0 -7px 0 var(--ink); }
.ledger .dash { color: var(--ink-2); }
.schedule td:nth-child(3), .schedule td:nth-child(4) { white-space: nowrap; }
.versus tbody th { width: 15rem; }
.versus td.fig { font-size: 1.15rem; font-weight: 600; }
.opts th { white-space: nowrap; }
.numbers + .small, .ledger-scroll + .small { margin-top: -.4rem; }

/* ---- definition pairs ---- */
.pairs { display: grid; grid-template-columns: minmax(12rem, 17rem) minmax(0, 1fr); margin: 0; }
.pairs dt, .pairs dd { border-top: 1px solid var(--rule); padding: 1rem 0; margin: 0; }
.pairs dt { font-weight: 600; padding-right: 1.5rem; }
.pairs dt:last-of-type, .pairs dd:last-of-type { border-bottom: 1px solid var(--rule); }

/* ---- pricing ---- */
.tiers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 2.4rem; background: var(--sheet); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.tier { padding: 1.4rem 1.3rem 1.5rem; display: flex; flex-direction: column; }
.tier + .tier { border-left: 1px solid var(--rule); }
.tier h2 { margin: 0 0 .9rem; font-size: 1.45rem; }
.amount { margin: 0 0 1rem; }
.amount .fig { display: inline-block; font-size: 2.15rem; font-weight: 600; line-height: 1.15; border-bottom: 3px double var(--ink); padding-bottom: .1rem; }
.amount .per { display: block; font-size: .95rem; color: var(--ink-2); margin-top: .45rem; }
.tier p { font-size: 1rem; }
.tier-cta { margin-top: auto; padding-top: .5rem; }
.tier-pro { background: #fffef8; box-shadow: inset 0 3px 0 var(--ink); }
.api-tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.api-errors td code { overflow-wrap: anywhere; }
table.opts + h3, .ledger-scroll + h2 { margin-top: 1.9rem; }

/* ---- conformance ---- */
.claim h2 { scroll-margin-top: 1rem; }
.facts { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr); margin: 0 0 1.4rem; background: var(--sheet); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.facts dt { grid-row: 1; font-size: .9rem; color: var(--ink-2); padding: .55rem .9rem 0; }
.facts dd { grid-row: 2; margin: 0; padding: .15rem .9rem .7rem; font-size: 1.1rem; }
.facts dt:not(:first-of-type), .facts dd:not(:first-of-type) { border-left: 1px solid var(--rule); }
.facts dd:first-of-type { font-family: var(--serif); font-size: 1rem; }
.cmd { background: var(--sheet); border: 1px solid var(--rule); border-left: 3px solid var(--ink); padding: .9rem 1.1rem; overflow-x: auto; font-size: .88rem; line-height: 1.6; margin: 0 0 1.3rem; }

ul.ticks { list-style: none; padding: 0; margin: 0 0 1.4rem; }
ul.ticks li { position: relative; padding: .45rem 0 .45rem 2rem; border-bottom: 1px solid var(--rule); }
ul.ticks li::before { content: ''; position: absolute; left: .2rem; top: .78rem; width: 1.15rem; height: 1rem; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 16'%3E%3Cpath d='M1.5 8.5 C3.5 9.5 5 11.5 6.2 14 C8.5 8.5 12 4.5 16.5 1.5' fill='none' stroke='%232b6638' stroke-width='2.1' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain; }

/* ---- app placeholder ---- */
.dropzone { border: 2px dashed var(--rule-2); background: var(--sheet); padding: 3.5rem 1.5rem; text-align: center; margin: 1.5rem 0 1.8rem; color: var(--ink-2); }
.dropzone p { margin: 0 0 .3rem; font-size: 1.15rem; }

/* ---- licence pages (Worker) ---- */
.ticket { background: var(--sheet); border-top: 1px solid var(--ink); border-bottom: 3px double var(--ink); padding: 1.2rem 1.3rem 1.3rem; margin: 1.8rem 0 2rem; }
.ticket-head { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; font-size: .98rem; margin-bottom: 1rem; }
.ticket-head .paid { color: var(--tick); font-weight: 600; display: inline-flex; align-items: center; gap: .2rem; }
.ticket label, form label { display: block; font-weight: 600; margin-bottom: .4rem; }
.ticket textarea { width: 100%; min-height: 7.5rem; font: .9rem/1.5 var(--mono); color: var(--ink); background: #fff; border: 1px solid var(--rule-2); padding: .7rem .8rem; resize: vertical; word-break: break-all; }
.row { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; margin-top: .9rem; }
form input[type=email] { font: 1.05rem var(--serif); padding: .72rem .8rem; border: 1px solid var(--rule-2); background: #fff; color: var(--ink); min-width: min(22rem, 100%); border-radius: 2px; }
.err { color: var(--red); margin-top: .8rem; }
.sandbox-banner { background: var(--ink); color: var(--sheet); font-size: .9rem; text-align: center; padding: .45rem 1rem; }

/* ---- small screens ---- */
@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .paper { transform: none; }
  .tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tier:nth-child(3) { border-left: 0; }
  .tier:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
@media (max-width: 640px) {
  .api-tiers { grid-template-columns: minmax(0, 1fr); }
  .api-tiers .tier + .tier { border-left: 0; border-top: 1px solid var(--rule); }
  body { font-size: 1.06rem; }
  .wrap { padding: 0 1.1rem; }
  .top-in { gap: .2rem; }
  .top nav { gap: .2rem 1rem; font-size: .95rem; }
  .top nav .btn { display: none; }
  .lede { font-size: 1.15rem; }
  .paper { padding: .9rem .8rem 1rem 2.3rem; background-position: -1rem 0; }
  .paper { padding-right: .55rem; }
  .wp { font-size: .74rem; }
  .wp th, .wp td { padding: .42rem .15rem; }
  .wp td + td { padding-left: 1rem; }
  .wp thead th:first-child { font-size: .85rem; }
  .wp .tm { margin-left: .1rem; }
  .numbers th:nth-child(5), .numbers td:nth-child(5) { display: none; }
  .numbers tbody th { min-width: 7rem; }
  .tiers { grid-template-columns: minmax(0, 1fr); }
  .tier + .tier { border-left: 0; border-top: 1px solid var(--rule); }
  .pairs { grid-template-columns: minmax(0, 1fr); }
  .pairs dd { border-top: 0; padding-top: 0; }
  .pairs dt { padding-bottom: .3rem; }
  .pairs dt:last-of-type { border-bottom: 0; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts dt:nth-of-type(n+3) { grid-row: 3; border-top: 1px solid var(--rule); }
  .facts dd:nth-of-type(n+3) { grid-row: 4; }
  .facts dt:nth-of-type(3), .facts dd:nth-of-type(3) { border-left: 0; }
  hr.total { margin-top: 3rem; }
  .ledger { font-size: .95rem; }
  .ledger th, .ledger td { padding: .5rem .55rem; }
  .schedule thead { display: none; }
  .schedule, .schedule tbody, .schedule tr { display: block; }
  .schedule tr { display: grid; grid-template-columns: auto 1fr; gap: .1rem .8rem; padding: .7rem .8rem; border-bottom: 1px solid var(--rule); }
  .schedule th, .schedule td { border: 0 !important; padding: 0; }
  .schedule th { grid-column: 1 / -1; }
  .schedule td:nth-child(2) { grid-column: 1 / -1; }
  .schedule td:nth-child(3) { font-style: italic; color: var(--ink-2); }
  .schedule td:nth-child(4) { color: var(--ink-2); }
  .versus thead { display: none; }
  .versus, .versus tbody, .versus tr, .versus th, .versus td { display: block; }
  .versus tr { padding: .7rem .8rem; border-bottom: 1px solid var(--rule); }
  .versus th, .versus td { border: 0 !important; padding: .1rem 0; }
  .versus tbody th { width: auto; }
  .versus td::before { font-family: var(--serif); font-weight: 600; font-size: .9rem; color: var(--ink-2); display: block; }
  .versus td:nth-of-type(1)::before { content: 'Arelle'; }
  .versus td:nth-of-type(2)::before { content: 'Crossfoot'; margin-top: .4rem; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
@media print { .top nav, .foot-links { display: none; } body { background: #fff; } }
