/* PayoutParse: the adding-machine tape world. Desk = slate ground, tape = pale thermal strip, red ink for negatives. */
@font-face { font-family: "Schibsted Grotesk"; src: url(/fonts/schibsted.woff2) format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Doto"; src: url(/fonts/doto.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --desk: #2a2e35; --desk-2: #23262c; --desk-line: #3a3f48;
  --paper: #f7f5ee; --paper-2: #efece2; --paper-line: #d9d5c8;
  --ink: #17181a; --ink-2: #4b4d52; --ink-3: #7d8087;
  --red: #d0021b; --red-2: #a30115;
  --pale: #ebe9e1; --pale-2: #b9bec8;
  --focus: #ffd23f; --white: #ffffff; --black: #000000; --red-desk: #ff5c6c;
  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --tape: "Doto", "Courier New", monospace;
  --measure: 62ch;
}
* { box-sizing: border-box; }
html { color-scheme: dark; background: var(--desk); }
body { margin: 0; overflow-x: clip; font-family: var(--sans); font-size: 17px; line-height: 1.5; color: var(--pale); background: var(--desk); -webkit-font-smoothing: antialiased; }
::selection { background: var(--red); color: var(--white); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
a { color: inherit; text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--white); }
h1, h2, h3 { line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.75rem, 3.2vw, 2.7rem); }
.h-title { font-size: clamp(1.4rem, 2.4vw, 2rem); }
.hero h1.hook { font-size: clamp(1.75rem, 3.2vw, 2.7rem); }
h2 { font-size: clamp(1.4rem, 2.4vw, 2rem); margin-top: 2.5rem; }
h3 { font-size: 1.15rem; margin-top: 1.6rem; }
p { max-width: var(--measure); margin: 0 0 1em; }
small, .muted { color: var(--pale-2); }
code { font-family: var(--tape); font-size: 15px; background: var(--desk-2); padding: 0.05em 0.35em; border-radius: 2px; }
hr { border: 0; border-top: 1px solid var(--desk-line); margin: 2.5rem 0; }

.wrap { max-width: 1180px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 40px); }
header.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.1rem; border-bottom: 1px solid var(--desk-line); }
.wordmark { font-weight: 700; letter-spacing: -0.02em; text-decoration: none; font-size: 1.15rem; display: inline-flex; align-items: center; gap: 0.5rem; }
.wordmark svg { width: 22px; height: 22px; }
nav.main { display: flex; gap: 1.4rem; flex-wrap: wrap; }
nav.main a { text-decoration: none; color: var(--pale-2); }
nav.main a:hover, nav.main a[aria-current] { color: var(--white); }
footer.bottom { border-top: 1px solid var(--desk-line); margin-top: 4rem; padding-block: 2rem 3rem; color: var(--pale-2); font-size: 0.92rem; }
footer.bottom p { max-width: none; }
footer.bottom nav { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-bottom: 0.8rem; }

/* Home first viewport: offer | tape | formats */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.9fr) minmax(0, 0.75fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; padding-block: clamp(2rem, 5vw, 4.5rem) 2rem; }
.hero .offer p.lead { font-size: 1.2rem; color: var(--pale); }
.hero .formats { padding-top: 0.6rem; }
.ruled { list-style: none; margin: 0; padding: 0; }
.ruled li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--desk-line); }
.ruled li:first-child { border-top: 1px solid var(--desk-line); }
.ruled .k { color: var(--pale-2); }
.price { font-family: var(--tape); font-weight: 800; font-size: 1.6rem; color: var(--paper); letter-spacing: 0.02em; }
@media (max-width: 960px) { .hero { grid-template-columns: minmax(0, 1fr); } .hero .tape-wrap { order: 2; margin-top: 0; } .hero .formats { order: 3; } }

/* The tape */
.tape-wrap { display: flex; justify-content: center; margin: 0; }
.tape { --w: 372px; width: min(100%, var(--w)); background: var(--paper); color: var(--ink); font-family: var(--tape); font-weight: 700; font-size: 15px; letter-spacing: 0; padding: 1.4rem 1.1rem 1.6rem; position: relative; box-shadow: 0 18px 40px -18px rgba(0,0,0,0.7), 0 2px 6px rgba(0,0,0,0.35);
  background-image: repeating-linear-gradient(0deg, transparent 0 3px, rgba(0,0,0,0.018) 3px 4px); }
.tape::before, .tape::after { content: ""; position: absolute; left: 0; right: 0; height: 9px; background: var(--paper); }
.tape::before { top: -8px; mask: radial-gradient(circle at 6px 100%, transparent 5px, var(--black) 5.5px) -6px 0 / 12px 100% repeat-x; -webkit-mask: radial-gradient(circle at 6px 100%, transparent 5px, var(--black) 5.5px) -6px 0 / 12px 100% repeat-x; }
.tape::after { bottom: -8px; mask: radial-gradient(circle at 6px 0, transparent 5px, var(--black) 5.5px) -6px 0 / 12px 100% repeat-x; -webkit-mask: radial-gradient(circle at 6px 0, transparent 5px, var(--black) 5.5px) -6px 0 / 12px 100% repeat-x; }
.tape .head { display: flex; justify-content: space-between; color: var(--ink-2); font-size: 13px; margin-bottom: 0.8rem; text-transform: uppercase; }
.tape ol { list-style: none; margin: 0; padding: 0; }
.tape li { display: grid; grid-template-columns: 3.2em minmax(0, 1fr) auto; gap: 0.7em; padding: 0.22em 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tape li .d { color: var(--ink-2); }
.tape li .desc { overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; color: var(--ink); }
.tape li .amt { text-align: right; font-weight: 800; }
.tape li .amt.neg, .tape .neg { color: var(--red); }
.tape li.rule { padding: 0; margin: 0.5em 0; border-top: 1px solid var(--ink); }
.tape li.sub { grid-template-columns: minmax(0,1fr) auto; color: var(--ink-2); }
.tape li.sub > span:first-child, .tape li.total > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.tape li.total { grid-template-columns: minmax(0,1fr) auto; font-weight: 800; font-size: 1.12em; padding-top: 0.6em; margin-top: 0.5em; position: relative; border-top: 1px solid var(--red); }
.tape li.total::before { content: ""; position: absolute; left: 0; right: 0; top: 3px; border-top: 1px solid var(--red); }
.tape li.total.off { border-top-style: dashed; color: var(--red); }
.tape li.total.off::before { border-top-style: dashed; }
.tape .foot { margin-top: 0.9rem; font-size: 13px; color: var(--ink-2); display: flex; justify-content: space-between; gap: 1rem; text-transform: uppercase; flex-wrap: wrap; }
.tape .foot .agree { color: var(--ink); font-weight: 800; }
.tape .foot .off { color: var(--red); font-weight: 800; }
.tape-wrap.left { justify-content: flex-start; }
.tape-wrap.roll { align-self: start; margin-top: calc(-1 * clamp(2rem, 5vw, 4.5rem)); padding-top: 24px; }
/* the print head: the tape's top pseudo becomes an ink band with a paper slot line, instead of a tear */
.tape.roll::before { display: block; top: -24px; left: -14px; right: -14px; height: 24px; background: var(--ink); mask: none; -webkit-mask: none; box-shadow: inset 0 -9px 0 0 var(--ink), inset 0 -11px 0 0 var(--paper), 0 8px 14px -6px rgba(0,0,0,0.7); z-index: 1; }
.tape.roll { padding-top: 1.2rem; }
.tape.wide { --w: 520px; }
.tape li.buy { display: block; padding: 0.15em 0 0.5em; }
.btn.ink { background: var(--ink); color: var(--paper); font-family: var(--sans); font-size: 0.85rem; padding: 0.45rem 0.9rem; }
.btn.ink:hover { background: var(--black); }
.tape.printing li { animation: print 0.35s cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: calc(var(--i, 0) * 90ms); }
@keyframes print { from { clip-path: inset(0 0 100% 0); transform: translateY(-3px); } to { clip-path: inset(0 0 0 0); transform: none; } }
@media (prefers-reduced-motion: reduce) { .tape.printing li { animation: none; } }

/* Feed slot: the upload control */
.feed { margin-top: 1.4rem; }
.feed label.slot { display: block; position: relative; background: var(--desk-2); border: 1px solid var(--desk-line); border-top: 6px solid var(--paper); padding: 1.2rem 1.2rem 1.1rem; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.feed label.slot:hover, .feed label.slot.over { border-color: var(--pale-2); background: #1f2227; }
.feed label.slot input[type=file] { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.feed .slot-title { font-weight: 700; font-size: 1.05rem; display: block; }
.feed .slot-sub { color: var(--pale-2); font-size: 0.92rem; display: block; margin-top: 0.2rem; }
.feed .picked { color: var(--paper); font-family: var(--tape); font-weight: 600; margin-top: 0.4rem; display: none; }
.feed .row { display: flex; gap: 0.8rem; align-items: center; margin-top: 0.9rem; flex-wrap: wrap; }
.btn { font: inherit; font-weight: 700; background: var(--paper); color: var(--ink); border: 0; padding: 0.75rem 1.2rem; cursor: pointer; border-radius: 2px; text-decoration: none; display: inline-block; transition: transform 0.12s, background 0.12s; }
.btn:hover { background: var(--white); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--pale); border: 1px solid var(--desk-line); }
.btn.ghost:hover { border-color: var(--pale-2); background: transparent; }
.btn[disabled] { opacity: 0.55; cursor: progress; }
select, input[type=email], input[type=text] { max-width: 100%; font: inherit; background: transparent; color: var(--pale); border: 0; border-bottom: 1px solid var(--pale-2); padding: 0.6rem 0.2rem; border-radius: 0; min-width: 0; }
select option { background: var(--desk-2); }
select:focus, input:focus { border-bottom-color: var(--paper); }
input::placeholder { color: var(--ink-3); }

/* Process figure: one tape through four stations */
.process { margin: 1rem 0 0; }
.process svg { width: 100%; height: auto; display: block; }
.stations { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem 2rem; margin-top: 0.5rem; }
.stations h3 { margin-top: 0; }
.stations p { font-size: 0.95rem; color: var(--pale-2); }
@media (max-width: 860px) { .stations { grid-template-columns: repeat(2, minmax(0, 1fr)); } .process { overflow-x: auto; } .process svg { min-width: 760px; } }
.cur-switch { font-size: 0.85rem; margin-top: 0.8rem; }

/* States: drawn keyframes */
.states { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.6rem 2rem; margin-top: 1rem; }
.state svg { width: 100%; height: auto; display: block; margin-bottom: 0.6rem; }
.state h3 { margin-top: 0; }
.state p { font-size: 0.95rem; color: var(--pale-2); }

.two { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 3rem; align-items: start; margin-top: 0.5rem; }
@media (max-width: 860px) { .two { grid-template-columns: minmax(0, 1fr); } }
main > h1:first-child { margin-top: 2.2rem; }
.feed { max-width: 720px; }

/* Prose sections */
.section { padding-block: 2.5rem 0; }
.prose p, .prose li { max-width: var(--measure); }
.prose ul, .prose ol { padding-left: 1.2em; }
.faq dt { font-weight: 700; margin-top: 1.2rem; }
.faq dd { margin: 0.3rem 0 0; max-width: var(--measure); color: var(--pale-2); }

/* Notices */
.notice { background: var(--desk-2); border: 1px solid var(--desk-line); padding: 0.9rem 1.1rem; margin: 1rem 0; max-width: 70ch; }
.notice.bad { border-color: var(--red); }
.notice.good { border-color: var(--paper); }

/* App / result */
.result { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 2.5rem; align-items: start; margin-top: 1.5rem; }
@media (max-width: 860px) { .result { grid-template-columns: 1fr; } }
table.txns { width: 100%; border-collapse: collapse; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
table.txns th, table.txns td { text-align: left; padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--desk-line); vertical-align: top; }
table.txns th { color: var(--pale-2); font-weight: 500; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }
table.txns td.n, table.txns th.n { text-align: right; white-space: nowrap; font-family: var(--tape); font-weight: 600; }
table.txns td.n.neg { color: var(--red-desk); }
.table-wrap { overflow-x: auto; }
.downloads { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 0.5rem; }
.downloads a { display: flex; justify-content: space-between; gap: 1rem; text-decoration: none; padding: 0.7rem 0.9rem; background: var(--desk-2); border: 1px solid var(--desk-line); }
.downloads a:hover { border-color: var(--pale-2); }
.downloads .ext { font-family: var(--tape); font-weight: 800; color: var(--paper); }
.credits { font-family: var(--tape); font-weight: 800; font-size: 1.4rem; color: var(--paper); }
.jobs td, .jobs th { padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--desk-line); text-align: left; }
.jobs { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.tag { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.1em 0.45em; border: 1px solid currentColor; border-radius: 2px; }
.tag.ok { color: var(--paper); }
.tag.rev { color: var(--red-desk); }

/* Programmatic page grid */
.grid-links { columns: 3; column-gap: 2rem; }
.grid-links a { display: block; padding: 0.3rem 0; text-decoration: none; color: var(--pale-2); break-inside: avoid; }
.grid-links a:hover { color: var(--white); }
@media (max-width: 760px) { .grid-links { columns: 2; } }
@media (max-width: 480px) { .grid-links { columns: 1; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
