:root {
  --bg: #f4f2ee; --card: #ffffff; --ink: #1c1b19; --muted: #6b6760; --line: #e2ded6;
  --accent: #0b6e4f; --accent-ink: #ffffff; --error: #a3261c; --error-bg: #fbeceb; --ok-bg: #e6f4ee; --warn-bg: #fdf3d7;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171614; --card: #22211e; --ink: #f0ede7; --muted: #a39e94; --line: #37352f;
    --accent: #4fc79d; --accent-ink: #0d1f18; --error: #ff9b91; --error-bg: #3a1c19; --ok-bg: #173227; --warn-bg: #3a3116;
  }
}
* { box-sizing: border-box; }
/* `hidden` hides, also where a rule below gives the element a display of its own (the navigation before an account exists). */
[hidden] { display: none !important; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 system-ui, sans-serif; }
#banner { margin: 0; padding: 6px 16px; background: var(--warn-bg); font-size: 13px; text-align: center; }
header, nav, main { max-width: 520px; margin: 0 auto; padding: 0 16px; }
header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 16px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 24px; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -0.5px; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
header .links { display: flex; gap: 14px; align-items: center; font-size: 14px; }
header .links a { color: var(--muted); text-decoration: none; }
header .links a:hover { color: var(--ink); }
#who { color: var(--muted); font-size: 13px; }
nav { display: flex; gap: 4px 16px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
nav a { padding: 6px 10px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 14px; }
nav a.current { background: var(--ink); color: var(--bg); }
/* Three groups: money, the shop, the account; the operator's link stands apart at the right. */
nav .group { display: flex; gap: 4px; }
nav a.apart { margin-left: auto; }
main { padding-bottom: 64px; }
h1 { font-size: 22px; margin: 16px 0 12px; }
h2 { font-size: 15px; margin: 24px 0 8px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 12px 0; }
.balance { font-size: 34px; font-weight: 700; letter-spacing: -1px; }
.card.minor .balance { font-size: 22px; letter-spacing: -0.5px; }
.muted, small { color: var(--muted); font-size: 13px; }
.mono { font-family: ui-monospace, monospace; font-size: 13px; word-break: break-all; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row > :first-child { min-width: 0; }
.right { text-align: right; }
.row > .buttons { flex: none; flex-wrap: nowrap; }
.amount { font-weight: 600; white-space: nowrap; }
.amount.in { color: var(--accent); }
button, .button { font: inherit; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 10px 16px; cursor: pointer; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; width: 100%; }
button.quiet { padding: 4px 10px; font-size: 13px; }
button.danger { color: var(--error); }
button:disabled { opacity: 0.5; cursor: wait; }
/* button.secondary is the plain button above: an action beside the main one. */
button[aria-busy=true]::after { content: ""; display: inline-block; width: 0.85em; height: 0.85em; margin-left: 0.5em; vertical-align: -0.1em;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: working 0.7s linear infinite; }
@keyframes working { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { button[aria-busy=true]::after { animation: none; } }
/* In a row of buttons and in a table, the main button is as wide as its words. */
.buttons button.primary, td button.primary { width: auto; }
.buttons .action { margin: 0; }
.loading { color: var(--muted); }
.action { margin: 12px 0; }
.buttons { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: center; }
.field { display: block; margin: 12px 0; }
.field > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=date], textarea, select { width: 100%; font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
textarea { min-height: 96px; resize: vertical; }
/* A choice beside an amount in a row, such as the category of a payee, is as wide as its words. */
.row select { width: auto; padding: 4px 8px; font-size: 13px; }
/* What a user is told before they agree to something, point by point. */
.card ul { margin: 12px 0; padding-left: 20px; color: var(--muted); font-size: 13px; }
.card li { margin: 6px 0; }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; }
.check input { margin-top: 4px; }
.notice { padding: 10px 12px; border-radius: 10px; margin: 12px 0; font-size: 14px; }
.notice.error { background: var(--error-bg); color: var(--error); }
.notice.ok { background: var(--ok-bg); }
.notice.warn { background: var(--warn-bg); }
.notice.info { background: var(--card); border: 1px solid var(--line); color: var(--muted); }
.qr { background: #fff; border-radius: 12px; padding: 12px; max-width: 280px; margin: 12px auto; }
.qr svg { display: block; width: 100%; height: auto; }
.phrase { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0; margin: 12px 0; list-style: none; counter-reset: word; }
.phrase li { counter-increment: word; background: var(--bg); border-radius: 8px; padding: 6px 8px; font-family: ui-monospace, monospace; font-size: 13px; }
.phrase li::before { content: counter(word) ". "; color: var(--muted); }
.chip { display: inline-block; padding: 2px 8px; margin: 2px 4px 2px 0; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-size: 12px; }
button.chip { cursor: pointer; }
a.chip { color: inherit; text-decoration: none; cursor: pointer; }
.paid { text-align: center; font-size: 20px; font-weight: 700; color: var(--accent); }
video { width: 100%; border-radius: 12px; background: #000; }
/* Swint is a simulated payment app. Its own plain look keeps it apart from any real one. */
.swint { border: 2px dashed var(--muted); }
.swint-brand { font-weight: 800; letter-spacing: 1px; }
.swint-brand small { font-weight: 400; letter-spacing: 0; margin-left: 6px; }
fieldset { border: 0; padding: 0; margin: 0 0 12px; }
fieldset .check { display: inline-flex; margin: 4px 16px 4px 0; }
a.button { display: inline-block; text-decoration: none; }
a.button.wide { display: block; text-align: center; margin: 12px 0; }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
button.link { border: 0; background: none; padding: 4px 0; color: var(--accent); text-decoration: underline; font-size: 15px; }
/* The shop: the cashier and the orders use the width of a tablet, with touch targets of at least 44 px. */
body[data-page=cashier] :is(header, nav, main), body[data-page=orders] :is(header, nav, main) { max-width: 1100px; }
.cashier { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; font-size: 18px; }
@media (max-width: 760px) { .cashier { grid-template-columns: 1fr; } }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.tabs button { min-height: 44px; text-transform: capitalize; }
.tabs button.current { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 12px; }
button.product { min-height: 96px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; text-align: left; font-size: 18px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button.product .price { color: var(--muted); font-size: 15px; }
button.product:active { background: var(--ok-bg); }
.basket { position: sticky; top: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.basket h2 { margin-top: 0; }
.line { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.qty { display: flex; align-items: center; gap: 6px; }
.qty button { min-width: 44px; min-height: 44px; padding: 0; font-size: 20px; touch-action: manipulation; }
.qty span { min-width: 24px; text-align: center; font-weight: 600; }
.total { display: flex; justify-content: space-between; align-items: baseline; font-size: 24px; font-weight: 700; padding: 12px 0; border-top: 1px solid var(--line); }
button.charge { min-height: 56px; font-size: 20px; }
.orders-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.order { margin: 0; }
.order-number { font-size: 32px; font-weight: 800; }
.order-lines { margin: 8px 0; padding-left: 0; list-style: none; font-size: 18px; }
.order .action button { min-height: 48px; }
details { margin: 12px 0; }
/* The shop's public pages. */
body[data-page=store] :is(header, main) { max-width: 1100px; }
body[data-page=store] main, body[data-page=order] main { padding-top: 8px; }
a.back { display: inline-block; margin-top: 12px; color: var(--muted); text-decoration: none; font-size: 14px; }
a.back:hover { color: var(--ink); }
.no-image { background: linear-gradient(135deg, var(--line), var(--bg)); }
/* The directory: a card per shop with its picture. */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 12px; }
a.shop-entry { display: flex; flex-direction: column; margin: 0; padding: 0; overflow: hidden; color: inherit; text-decoration: none; transition: border-color 0.15s, transform 0.15s; }
a.shop-entry:hover { border-color: var(--muted); transform: translateY(-2px); }
a.shop-entry img, a.shop-entry .no-image { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.shop-entry-text { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.shop-entry-text strong { font-size: 18px; }
.shop-entry .chip { text-transform: capitalize; }
/* Public profiles by category, below the shops. */
.search-row { display: flex; gap: 8px; margin: 8px 0; max-width: 520px; }
.search-row input { flex: 1; }
.chip.current { background: var(--ink); color: var(--bg); border-color: var(--ink); }
/* A shop: every product by category beside the basket; on a phone the basket follows the products. */
.pickup { margin: 0 0 8px; font-size: 14px; }
.store { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.store-nav { position: sticky; top: 0; z-index: 2; display: flex; gap: 6px; overflow-x: auto; padding: 10px 0; background: var(--bg); scrollbar-width: none; }
.store-nav a { flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; font-size: 15px; text-transform: capitalize; }
.store-nav a:hover { border-color: var(--muted); }
.store-section { scroll-margin-top: 64px; }
.store-section h2 { text-transform: capitalize; margin-top: 20px; }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 12px; }
.store-card { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.store-card img, .store-card .no-image { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--bg); }
.store-name { font-weight: 600; }
.store-buy { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; min-height: 52px; }
.store-buy > :last-child { margin-left: auto; }
.store-buy button { min-height: 44px; }
.store-buy .qty button { min-width: 40px; min-height: 40px; }
.store .basket { font-size: 17px; }
.store-bar { display: none; }
@media (max-width: 760px) {
  .store { grid-template-columns: 1fr; }
  .store-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .store-card { padding: 10px; }
  body[data-page=store] main { padding-bottom: 104px; }
  .store-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 3; justify-content: space-between; align-items: center; gap: 12px;
               padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); font-weight: 600; }
  .store-bar button.primary { width: auto; min-height: 44px; }
  .store-bar[hidden], .store-bar.away { display: none; }
}
/* An order: paying first, then the number to pick up with. */
.pay-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0 8px; }
.pay-actions .button { text-align: center; min-height: 48px; display: flex; align-items: center; justify-content: center; }
@media (max-width: 420px) { .pay-actions { grid-template-columns: 1fr; } }
.scan { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--line); text-align: center; }
.scan .qr { margin-top: 4px; max-width: 220px; }
.pickup-number { text-align: center; margin: 8px 0 16px; }
.pickup-number small { display: block; }
.pickup-number strong { font-size: 64px; line-height: 1.1; font-weight: 800; }
img.thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; flex: none; }
.product-summary { display: flex; gap: 10px; align-items: center; }
.preview { display: flex; gap: 10px; align-items: center; margin: 8px 0; }
.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 760px) { .columns { grid-template-columns: 1fr; } }
.columns .orders-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
/* The pickup board: numbers to read from across a room. */
body[data-page=board] main { max-width: none; }
.board { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.board h2 { font-size: 28px; }
.board ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 16px; }
.board li { font-size: 64px; font-weight: 800; min-width: 2.2em; text-align: center; padding: 8px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.board .ready li { background: var(--ok-bg); color: var(--accent); }
/* The operator's pages: the coin (tokenomics.html) and the live sales (sales.html). */
:root { --series-issuer: #2a78d6; --series-public: #eb6834; --series-private: #1baf7a; --grid: #ece9e2; }
@media (prefers-color-scheme: dark) {
  :root { --series-issuer: #3987e5; --series-public: #d95926; --series-private: #199e70; --grid: #2e2c28; }
}
body[data-page=operator] :is(header, main) { max-width: 1100px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.tiles .card { margin: 0; }
.tile-label { color: var(--muted); font-size: 13px; }
.tile-value { font-size: 28px; font-weight: 650; letter-spacing: -0.5px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.tile-note { color: var(--muted); font-size: 12px; margin-top: 2px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); background: var(--card); }
td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; padding-right: 20px; }
td.time { white-space: nowrap; font-variant-numeric: tabular-nums; }
td .mono { white-space: nowrap; word-break: normal; }
td .action { margin: 0 0 6px; }
.table-wrap { overflow-x: auto; }
/* A long list keeps to a height of its own and scrolls there; its headings stay in sight. */
.table-wrap.capped { max-height: 420px; overflow-y: auto; }
.table-wrap.capped th { position: sticky; top: 0; }
.split { display: flex; gap: 2px; height: 28px; margin: 8px 0 12px; }
.split > div { min-width: 0; height: 100%; }
.split > div:first-child { border-radius: 4px 0 0 4px; }
.split > div:last-child { border-radius: 0 4px 4px 0; }
.split > div:only-child { border-radius: 4px; }
.split.empty { background: var(--line); border-radius: 4px; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: baseline; }
.key.issuer, .split .issuer { background: var(--series-issuer); }
.key.public, .split .public { background: var(--series-public); }
.key.private, .split .private { background: var(--series-private); }
.check-yes::before { content: "✓ "; color: var(--accent); font-weight: 700; }
.check-no::before { content: "✗ "; color: var(--error); font-weight: 700; }
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--series-issuer); stroke-width: 2; }
.chart .dot { fill: var(--series-issuer); stroke: var(--card); stroke-width: 2; }
.chart .hit { fill: transparent; cursor: default; }
.tooltip { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); font-size: 12px; padding: 6px 8px; border-radius: 8px; white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); }
.wrap { white-space: normal; text-align: right; display: inline-block; }
.layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 0 16px; align-items: start; }
@media (max-width: 820px) { .layout { grid-template-columns: minmax(0, 1fr); } }
.lines { margin: 0; padding: 0; list-style: none; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.status.live { color: var(--accent); }
.status.live::before { background: var(--accent); }
.problem { color: var(--error); font-size: 12px; display: block; }
@keyframes arrive { from { background: var(--ok-bg); } to { background: transparent; } }
tr.new td { animation: arrive 4s ease-out; }
@media (prefers-reduced-motion: reduce) { tr.new td { animation: none; } }
/* The reading of the coin's history: a line that fills as it goes. */
progress { width: 100%; height: 6px; accent-color: var(--accent); }

/* The landing page: the introduction, wider and larger than a page of the app. */
body[data-page=landing] :is(header, main) { max-width: 720px; }
.hero { padding: 40px 0 24px; }
.hero h1 { margin: 0 0 16px; font-size: clamp(30px, 7vw, 46px); line-height: 1.1; letter-spacing: -1px; text-wrap: balance; }
.lead { margin: 0 0 24px; font-size: 19px; color: var(--muted); max-width: 34em; }
.points { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.points li { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; color: var(--muted); }
.points strong { display: block; margin-bottom: 4px; color: var(--ink); font-size: 17px; }
.closing { margin: 32px 0 0; font-size: 19px; font-weight: 600; }
#access { max-width: 520px; margin-top: 32px; scroll-margin-top: 16px; }
