/* Social Matter Payments — inside surfaces (merchant dashboard, partner portal). Identity v1, nothing new:
   paper ground, ink type, chartreuse only as decoration on paper, Zilla Slab text, Martian Mono figures, radius 0. */
@font-face { font-family: 'Zilla Slab'; font-weight: 400; font-display: swap; src: url('/assets/fonts/ZillaSlab-400.woff2') format('woff2') }
@font-face { font-family: 'Zilla Slab'; font-weight: 500; font-display: swap; src: url('/assets/fonts/ZillaSlab-500.woff2') format('woff2') }
@font-face { font-family: 'Zilla Slab'; font-weight: 600; font-display: swap; src: url('/assets/fonts/ZillaSlab-600.woff2') format('woff2') }
@font-face { font-family: 'Zilla Slab'; font-weight: 700; font-display: swap; src: url('/assets/fonts/ZillaSlab-700.woff2') format('woff2') }
@font-face { font-family: 'Martian Mono'; font-weight: 400; font-display: swap; src: url('/assets/fonts/MartianMono-400.woff2') format('woff2') }
@font-face { font-family: 'Martian Mono'; font-weight: 500; font-display: swap; src: url('/assets/fonts/MartianMono-500.woff2') format('woff2') }

:root {
  color-scheme: light;
  --ink: #0A0A0B; --paper: #F2EEE3; --chartreuse: #B4BD00; --steel: #B9BCC0;
  --muted: #5E5A52; --line: #D6D0C2; --ink-2: #1A1916; --ink-muted: #A39E92;
  --ok: #007066; --progress: #2D4E86; --warn: #965000; --stop: #C0103F;
  --text: 'Zilla Slab', Rockwell, 'Roboto Slab', Georgia, serif;
  --mono: 'Martian Mono', ui-monospace, Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 48px);
}
* { box-sizing: border-box }
html { -webkit-text-size-adjust: 100% }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--text); min-height: 100vh; display: flex; flex-direction: column }
main { flex: 1 0 auto; outline: none }
a { color: inherit; text-underline-offset: 3px }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid currentColor; outline-offset: 3px }
code, .mono { font-family: var(--mono); font-size: .86em }
h1[tabindex="-1"]:focus { outline: none }
h1, h2, h3 { font-weight: 600; line-height: 1.1; margin: 0 }
h1 { font-size: clamp(30px, 4vw, 42px) }
h2 { font-size: 24px; margin-bottom: 12px }
h3 { font-size: 18px; margin-bottom: 8px }
h2.mt { margin-top: 28px }
p { margin: 0 }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }
.skip { position: absolute; left: 8px; top: -60px; background: var(--paper); color: var(--ink); padding: 10px 14px; z-index: 10; border: 2px solid var(--ink) }
.skip:focus { top: 8px }

/* Top bar — ink, the lockup, the sections, the account. */
.top { background: var(--ink); color: var(--paper); display: flex; align-items: center; gap: 8px 28px; padding: 0 var(--gutter); min-height: 64px; flex-wrap: wrap }
.top .home { display: inline-flex; align-items: center; min-height: 48px; padding: 6px 0 }
.top .home svg { height: 26px; width: auto; display: block }
.top nav { display: flex; gap: 2px; margin-right: auto }
.top nav a { text-decoration: none; padding: 10px 12px; min-height: 44px; display: inline-flex; align-items: center; color: var(--ink-muted); white-space: nowrap }
.top nav a:hover { color: var(--paper) }
.top nav a[aria-current] { color: var(--paper); box-shadow: inset 0 -2px 0 var(--chartreuse) }
.acct { display: flex; gap: 12px; align-items: center; font-size: 15px; margin-left: auto }
.env { font: 500 10.5px var(--mono); letter-spacing: .14em; border: 1px solid currentColor; padding: 3px 7px; white-space: nowrap }
.env-sandbox { color: var(--chartreuse) }
.linkbtn { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; padding: 0 4px }

/* The band: text in the calm left 40% on solid paper; the magnet field fills the rest; the departure board sits on it. */
.band { position: relative; display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); min-height: 232px; border-bottom: 1px solid var(--line); overflow: hidden }
.band__field { position: absolute; top: 0; bottom: 0; right: 0; aspect-ratio: 2560 / 600; z-index: 0 }
.smp-field { position: relative; width: 100%; height: 100%; overflow: hidden }
.smp-field__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: right center; display: block }
.band__who { position: relative; z-index: 1; background: var(--paper); padding: 30px var(--gutter); display: grid; gap: 8px; align-content: center }
.band__who .sub { color: var(--muted) }
.band__board { position: relative; z-index: 1; align-self: center; justify-self: start; margin: 24px 0 24px clamp(16px, 4vw, 56px) }
.kicker { font: 500 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted) }
.acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px }

/* The departure board: flat, square, unshadowed. */
.board { background: var(--ink); color: var(--paper); padding: 18px 22px; width: min(440px, 100%); display: grid; gap: 6px; border-top: 4px solid var(--chartreuse) }
.board .lbl { font: 500 11px var(--mono); letter-spacing: .16em; color: var(--ink-muted); text-transform: uppercase }
.board .amt { font: 500 32px var(--mono); color: var(--chartreuse); letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15 }
.board .meta { font: 400 13px var(--mono); color: var(--paper); display: grid; gap: 2px }
.board .why { font: 400 14px var(--text); color: var(--paper) }

/* Page body */
.wrap { padding: 28px var(--gutter) 64px }
.wrap > * + * { margin-top: 36px }
.crumbs { font-size: 14px; color: var(--muted) }
.crumbs a { color: var(--muted) }
.head { display: flex; gap: 12px 24px; align-items: end; justify-content: space-between; flex-wrap: wrap }
.head .lede { color: var(--muted); max-width: 64ch }

/* Figures: a row of definitions, rules not boxes. */
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); margin: 0 }
.kpis > div { padding: 18px 20px 20px 0; display: grid; gap: 2px; align-content: start }
.kpis > div + div { padding-left: 20px; border-left: 1px solid var(--line) }
.kpis dt { font-size: 14px; color: var(--muted) }
.kpis dd { margin: 0; font: 500 26px var(--mono); letter-spacing: -.02em; font-variant-numeric: tabular-nums }
.kpis dd small { display: block; font: 400 12.5px var(--text); color: var(--muted); letter-spacing: 0; margin-top: 4px }
.kpis.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)) }
.kpis.k5 { grid-template-columns: repeat(5, minmax(0, 1fr)) }

/* The line: two ink rails with chartreuse sleepers, five stations. */
.line { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding-top: 34px }
.line::before { content: ''; position: absolute; left: 0; right: 0; top: 4px; height: 22px;
  background:
    linear-gradient(var(--ink), var(--ink)) 0 6px / 100% 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) 0 14px / 100% 2px no-repeat,
    repeating-linear-gradient(90deg, var(--chartreuse) 0 4px, transparent 4px 13px) 0 0 / 100% 22px no-repeat }
.stn { position: relative; display: grid; gap: 1px; padding-right: 12px; min-width: 0 }
.stn::before { content: ''; position: absolute; top: -33px; left: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); box-shadow: inset 0 0 0 5px var(--ink), inset 0 0 0 10px var(--paper) }
.stn b { font-size: 16px; font-weight: 600 }
.stn .n { font: 500 20px var(--mono); font-variant-numeric: tabular-nums }
.stn .v, .stn .t { font: 400 12.5px var(--mono); color: var(--muted); overflow-wrap: anywhere }
.stn.here::before { background: var(--chartreuse); box-shadow: inset 0 0 0 3px var(--ink), 0 0 0 3px var(--paper), 0 0 0 5px var(--ink) }
.stn.ahead b, .stn.ahead .t { color: var(--muted) }
.stn.ahead::before { background: var(--paper); box-shadow: inset 0 0 0 2px var(--ink) }
.sidings { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 14px; font-size: 14px; color: var(--muted) }
.sidings span { display: inline-flex; gap: 8px; align-items: center }
.sidings span::before { content: ''; width: 22px; border-top: 2px dashed var(--ink) }
.legend { font-size: 13px; color: var(--muted); margin-top: 10px }

/* Notices */
.notice { border: 1.5px dashed var(--warn); padding: 14px 18px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center }
.notice svg { width: 22px; height: 22px; color: var(--warn) }
.notice.stop { border: 0; border-left: 6px solid var(--stop); grid-template-columns: minmax(0, 1fr) auto }
.notice.info { border: 1.5px solid var(--ink); grid-template-columns: minmax(0, 1fr) auto }
.notice a, .notice button { white-space: nowrap }

/* Columns */
.cols { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); gap: 40px; align-items: start }
.cols.even { grid-template-columns: repeat(2, minmax(0, 1fr)) }

/* Tables: tabular figures, right-aligned money. */
.tbl { overflow-x: auto }
table { border-collapse: collapse; width: 100%; font-size: 15px }
caption { text-align: left; font-size: 13px; color: var(--muted); padding-bottom: 8px }
th { text-align: left; font: 600 13px var(--text); color: var(--muted); padding: 0 12px 8px 0; white-space: nowrap }
td { border-top: 1px solid var(--line); padding: 11px 12px 11px 0; vertical-align: middle }
td.amt, th.amt { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 14px; white-space: nowrap }
th.amt { font: 600 13px var(--text) }
td.mono { font-family: var(--mono); font-size: 13px }
td { overflow-wrap: anywhere }
.band__who code, .sub code { overflow-wrap: anywhere }
td a { font-weight: 600 }
/* Tap targets >= 44 px: a link in a table keeps its text and grows its hit area; the negative margin keeps the row height
   (the same rule as the CRM; Gate A WARN 2026-10-26: "From this payout" was 18 px tall at 390). */
td a:not(.rowlink) { display: inline-flex; align-items: center; min-height: 44px; margin-block: -13px }
tr.total td { border-top: 2px solid var(--ink); font-weight: 600 }
.rowlink { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px }
/* Small text links keep their look but get a thumb-sized target: padding grows the box, a matching negative margin keeps the layout. */
.crumbs a, .head a, .notice a, .plist a, footer.site a { padding-block: 11px; margin-block: -11px }

/* Status: icon + label + shape, never colour alone. */
.pill { display: inline-flex; align-items: center; gap: 6px; font: 500 12px var(--mono); padding: 4px 8px; border: 1.5px solid currentColor; white-space: nowrap }
.pill svg { width: 12px; height: 12px; flex: none }
.p-ok { color: var(--ok) } .p-pr { color: var(--ink) } .p-wa { color: var(--warn); border-style: dashed }
/* In progress is ink with its own icon, not blue: the same rule as the CRM (apps/admin/DESIGN-CONTRACT.md, amendment 2026-10-26). */
.p-st { color: var(--paper); background: var(--stop); border-color: var(--stop) }
.p-ne { color: var(--muted) } .p-in { color: var(--paper); background: var(--ink); border-color: var(--ink) }

/* Lists of payouts and facts */
.plist { list-style: none; margin: 0; padding: 0 }
.plist li { border-top: 1px solid var(--line); padding: 12px 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px }
.plist .a { font: 500 16px var(--mono); text-align: right; font-variant-numeric: tabular-nums }
.plist .m { grid-column: 1 / -1; font-size: 13px; color: var(--muted) }
.facts { display: grid; grid-template-columns: minmax(0, 13em) minmax(0, 1fr); margin: 0; border-top: 1px solid var(--line) }
.facts dt, .facts dd { margin: 0; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line) }
.facts dt { color: var(--muted); font-size: 14px }
.facts dd { overflow-wrap: anywhere }
.quote { font: 400 13.5px/1.7 var(--mono); background: var(--ink); color: var(--paper); padding: 18px 20px; border-left: 6px solid var(--chartreuse); white-space: pre-wrap }

/* Buttons and forms */
.btn { background: var(--ink); color: var(--paper); text-decoration: none; font: 600 16px var(--text); padding: 0 18px; min-height: 46px; display: inline-flex; align-items: center; gap: 10px; border: 0; border-left: 6px solid var(--chartreuse); cursor: pointer }
.btn2 { background: transparent; color: var(--ink); font: 600 16px var(--text); padding: 0 14px; min-height: 46px; display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--ink); text-decoration: none; cursor: pointer }
.btn-stop { color: var(--stop); border-color: var(--stop) }
.btn:active, .btn2:active { transform: scale(.97); transition: transform 120ms }
button[disabled] { opacity: .55; cursor: not-allowed }
.form { display: grid; gap: 16px; max-width: 520px }
.form.wide { max-width: 760px }
.field { display: grid; gap: 6px }
.field label, .field legend { font-weight: 600; font-size: 15px }
.field .hint { font-size: 13.5px; color: var(--muted) }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=tel], input[type=number], input[type=month], select {
  font: 16px var(--text); color: var(--ink); background: #fbf9f3; border: 1.5px solid var(--ink); border-radius: 0; min-height: 46px; padding: 0 12px; width: 100% }
input.mono { font-family: var(--mono); font-size: 14px }
fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 8px }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 0 18px }
.checks label { display: flex; gap: 10px; align-items: center; min-height: 44px; font: 400 13px var(--mono); cursor: pointer; overflow-wrap: anywhere }
.checks input { flex: none; width: 20px; height: 20px; accent-color: var(--ink) }
.formerr { color: var(--stop); font-weight: 600 }
.agree { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; font-size: 16px; cursor: pointer; min-height: 44px }
.agree input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink) }
details { border-top: 1px solid var(--line); margin-top: 14px }
/* Signing in: the steps, the QR code and its key, the one-time backup codes. */
.signin { max-width: 640px }
.steps { margin: 0; padding: 0 0 0 1.4em; display: grid; gap: 22px }
.steps > li { padding-left: 6px }
.steps > li::marker { font: 600 18px var(--mono) }
.qr { width: 216px; margin: 14px 0 10px; border: 1.5px solid var(--ink); padding: 8px; background: #fff }
.qr svg { display: block; width: 100%; height: auto }
.key { font-size: 15px; letter-spacing: .06em; overflow-wrap: anywhere; margin: 0 0 4px }
input.code { font-size: 22px; letter-spacing: .3em; max-width: 12ch }
.codes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 8px 28px; font-size: 16px }
.codes li { padding: 6px 10px; border: 1px solid var(--line); background: var(--paper) }
.btn-board { margin-top: 14px; background: var(--paper); color: var(--ink); border-left-color: var(--chartreuse); justify-self: start }
details > summary { cursor: pointer; list-style: none; font: 500 13px var(--mono); min-height: 44px; display: flex; align-items: center; gap: 10px }
details > summary::-webkit-details-marker { display: none }
details > summary::before { content: '+'; font: 500 16px var(--mono); width: 1ch }
details[open] > summary::before { content: '−' }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px }
.chips a { text-decoration: none; border: 1.5px solid var(--line); padding: 0 12px; min-height: 44px; display: inline-flex; align-items: center; font-size: 14px }
.chips a[aria-current] { border-color: var(--ink); font-weight: 600 }
.pager { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin-top: 12px }

/* A secret shown once */
.once { border: 1.5px solid var(--ink); padding: 16px; display: grid; gap: 10px }
.once code { font-size: 13px; background: var(--ink); color: var(--paper); padding: 12px; overflow-wrap: anywhere; display: block }

/* Empty, loading and error states */
.empty { padding: 28px 0 8px; display: grid; gap: 8px; justify-items: start; color: var(--muted) }
.empty::before { content: ''; width: min(320px, 100%); height: 10px; border-top: 2px dashed var(--line); border-bottom: 2px dashed var(--line) }
.empty b { color: var(--ink); font-size: 17px }
.loading { color: var(--muted); padding: 24px 0 }

dialog { border: 2px solid var(--ink); border-radius: 0; padding: 0; max-width: min(560px, calc(100vw - 32px)); background: var(--paper); color: var(--ink) }
dialog::backdrop { background: rgba(10, 10, 11, .6) }
.dlg { padding: 22px; display: grid; gap: 14px }
.dlg .row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end }

.toast { position: fixed; right: 16px; bottom: 16px; background: var(--ink); color: var(--paper); padding: 12px 16px; border-left: 6px solid var(--chartreuse); max-width: min(420px, calc(100vw - 32px)); z-index: 20 }

footer.site { padding: 22px var(--gutter) 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; display: flex; gap: 8px 24px; flex-wrap: wrap }

/* The organisation as track: the partner's siding off SMP's line, an agent's siding off the partner's. */
.org { display: grid; gap: 0; font-size: 15px }
.org .rail { position: relative; padding: 14px 0 14px 34px; border-left: 0 }
.org .rail::before { content: ''; position: absolute; left: 6px; top: 0; bottom: 0; width: 14px;
  background: linear-gradient(var(--ink), var(--ink)) 0 0 / 2px 100% no-repeat, linear-gradient(var(--ink), var(--ink)) 12px 0 / 2px 100% no-repeat,
  repeating-linear-gradient(180deg, var(--chartreuse) 0 4px, transparent 4px 13px) 0 0 / 14px 100% no-repeat }
.org .rail.sub { margin-left: 34px }
.org .rail b { display: block }
.org .rail span { font: 400 13px var(--mono); color: var(--muted) }

@media (max-width: 900px) {
  .band { grid-template-columns: minmax(0, 1fr); min-height: 0 }
  .band__field { position: relative; inset: auto; aspect-ratio: auto; height: 132px; order: 0 }
  .band__who { order: 1 }
  .band__board { order: 2; margin: 0 var(--gutter) 24px; justify-self: stretch }
  .board { width: 100% }
  .cols, .cols.even { grid-template-columns: minmax(0, 1fr) }
  .kpis.k4, .kpis.k5 { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .kpis.k4 > div:nth-child(3), .kpis.k5 > div:nth-child(3), .kpis.k5 > div:nth-child(5) { padding-left: 0; border-left: 0 }
}
@media (max-width: 640px) {
  .top { gap: 0 16px; padding-block: 4px }
  .top nav { order: 3; width: 100%; overflow-x: auto; margin-right: 0 }
  .acct { gap: 8px }
  .kpis, .kpis.k4, .kpis.k5 { grid-template-columns: minmax(0, 1fr) }
  .kpis > div + div, .kpis.k4 > div + div, .kpis.k5 > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line) }
  .line { grid-template-columns: minmax(0, 1fr); padding-top: 0; padding-left: 40px; gap: 16px }
  .line::before { left: 0; right: auto; top: 0; bottom: 0; width: 22px; height: auto;
    background:
      linear-gradient(var(--ink), var(--ink)) 6px 0 / 2px 100% no-repeat,
      linear-gradient(var(--ink), var(--ink)) 14px 0 / 2px 100% no-repeat,
      repeating-linear-gradient(180deg, var(--chartreuse) 0 4px, transparent 4px 13px) 0 0 / 22px 100% no-repeat }
  .stn::before { top: 2px; left: -39px }
  .notice { grid-template-columns: auto minmax(0, 1fr) } .notice > :last-child { grid-column: 2 }
  .notice.stop, .notice.info { grid-template-columns: minmax(0, 1fr) } .notice.stop > :last-child, .notice.info > :last-child { grid-column: 1 }
  .facts { grid-template-columns: minmax(0, 1fr) }
  .facts dt { border-bottom: 0; padding-bottom: 0 }
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0) }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100% }
  table.stack tr { border-top: 1px solid var(--line); padding: 10px 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 12px }
  table.stack td { border: 0; padding: 0 }
  table.stack td.amt { text-align: left }
  table.stack.two tr { grid-template-columns: minmax(0, 1fr) auto }
  table.stack.two td.amt { text-align: right }
  table.stack.two td.wide { grid-column: 1 / -1 }
  table.stack td[data-l]::before { content: attr(data-l) ' '; color: var(--muted); font: 400 12px var(--text) }
  table.stack tr.total { border-top: 2px solid var(--ink) }
}
@media (prefers-reduced-motion: reduce) { .btn:active, .btn2:active { transform: none } }
