/* Graphite and gold: the world dineraya.com shipped in (its DESIGN.md is
   the source), carried into the app's own screens. Loaded after
   tokens.css, theme.css and experience.css on the pages that have moved
   (render.go, graphitePages), so rastrillo's partials (buttons, fields,
   callouts, pills) take the new look through their own custom
   properties, and the shell below replaces the old one.

   Mobile navigation, Paul's rule (2026-09-30): the app opens on its
   dashboard, a back button leads to a full-page list of sections, and
   there is no hamburger, kebab or dropdown anywhere. */

@font-face {
  font-family: "Onest";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("fonts/onest-latin.woff2") format("woff2");
}

:root {
  --g-ink: #111113;
  --g-ink-hover: #2a2a2e;
  --g-ink-2: #4c4c55;
  --g-ink-3: #5f5f68;
  --g-ground: #fbfbfa;
  --g-panel: #f4f4f2;
  --g-card: #fff;
  --g-line: #e8e8e4;
  --g-line-soft: #f0f0ed;
  --g-line-strong: #d6d6d1;
  --g-gold: #c7860f;
  --g-gold-light: #f2c35a;
  --g-gold-deep: #9d6609;
  --g-gold-soft: #fbf1dc;
  --g-ok: #157a4a;

  --rst-font: "Onest", system-ui, sans-serif;
  --rst-font-mono: ui-monospace, "SF Mono", Menlo, monospace;
  --rst-bg: var(--g-ground);
  --rst-surface: var(--g-card);
  --rst-surface-2: var(--g-panel);
  --rst-line: var(--g-line);
  --rst-line-strong: #8d8d87;
  --rst-header-rule: var(--g-line);
  --rst-text: var(--g-ink);
  --rst-text-muted: var(--g-ink-2);
  --rst-text-faint: var(--g-ink-3);
  --rst-accent: var(--g-ink);
  --rst-accent-strong: var(--g-ink-hover);
  --rst-accent-soft: #efefec;
  --rst-on-accent: #fff;
  --rst-radius: 12px;
  --rst-radius-sm: 9px;
  --rst-radius-pill: 999px;
  --rst-tone-positive-bg: #e1f4e9;
  --rst-tone-positive-fg: #146c43;
  --rst-tone-warning-bg: #fcf0da;
  --rst-tone-warning-fg: #7f4d00;
  --rst-tone-negative-bg: #fdeceb;
  --rst-tone-negative-fg: #a61f15;
  --rst-tone-neutral-bg: #f0f0ed;
  --rst-tone-neutral-fg: #4c4c55;
}

body { background: var(--g-panel); color: var(--g-ink); font-family: var(--rst-font); -webkit-font-smoothing: antialiased; caret-color: var(--g-gold); }
::selection { background: #f6e2b4; color: var(--g-ink); }
:focus-visible { outline: 2px solid var(--g-ink); outline-offset: 3px; }
a { color: var(--g-ink); text-underline-offset: .18em; text-decoration-color: color-mix(in srgb, var(--g-ink) 35%, transparent); }
a:hover { text-decoration-color: var(--g-ink); }
data, time { font-variant-numeric: tabular-nums; }

/* ---- The shell ------------------------------------------------------- */

[dnr-app] { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100dvh; }
[dnr-side] { position: sticky; top: 0; height: 100dvh; box-sizing: border-box; padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; }
[dnr-mark] { display: inline-flex; align-items: center; gap: 9px; padding: 6px 10px 16px; font-weight: 650; font-size: 16px; letter-spacing: -.015em; color: var(--g-ink); text-decoration: none; }
[dnr-coin] { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; background: radial-gradient(circle at 35% 30%, var(--g-gold-light), var(--g-gold) 60%, var(--g-gold-deep)); box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), 0 1px 3px rgb(0 0 0 / .18); }
[dnr-coin] svg { width: 13px; height: 13px; }
[dnr-account] { display: flex; align-items: center; gap: 10px; padding: 10px; margin: 0 0 10px; border-radius: 12px; background: var(--g-card); box-shadow: 0 0 0 1px var(--g-line), 0 1px 2px rgb(0 0 0 / .04); }
[dnr-account-av] { width: 30px; height: 30px; border-radius: 9px; background: var(--g-ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
[dnr-account] b { display: block; font-weight: 620; font-size: 14px; line-height: 1.25; }
[dnr-account] small { display: block; color: var(--g-ink-3); font-size: 12.5px; }
[dnr-nav] a { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 10px; border-radius: 9px; color: var(--g-ink-2); text-decoration: none; font-weight: 520; font-size: 14.5px; }
[dnr-nav] a:hover { background: #eaeae6; color: var(--g-ink); }
[dnr-nav] a[aria-current="page"] { background: var(--g-card); color: var(--g-ink); box-shadow: 0 1px 2px rgb(0 0 0 / .06), 0 0 0 1px rgb(0 0 0 / .03); }
[dnr-nav] .icon { width: 17px; height: 17px; }
[dnr-side-foot] { margin-top: auto; display: grid; gap: 2px; }
[dnr-side-foot] form { margin: 0; }
[dnr-side-foot] button { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: var(--g-ink-2); font: 520 14.5px/1 var(--rst-font); cursor: pointer; }
[dnr-side-foot] button:hover { background: #eaeae6; color: var(--g-ink); }
[dnr-side-foot] .icon { width: 17px; height: 17px; }

[dnr-main] { margin: 8px 8px 8px 0; background: var(--g-card); border-radius: 18px; box-shadow: 0 0 0 1px var(--g-line), 0 1px 3px rgb(0 0 0 / .04); min-width: 0; display: flex; flex-direction: column; }
[dnr-bar] { min-height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 32px; border-bottom: 1px solid var(--g-line-soft); }
[dnr-bar] [dnr-back] { display: none; }
[dnr-crumbs] { display: flex; align-items: center; gap: 6px; color: var(--g-ink-3); font-size: 14px; }
[dnr-crumbs] a { color: var(--g-ink-3); text-decoration: none; }
[dnr-crumbs] a:hover { color: var(--g-ink); }
[dnr-crumbs] b { color: var(--g-ink); font-weight: 580; }
[dnr-crumbs] .icon { width: 14px; height: 14px; }
[dnr-app] [dnr-page] { width: 100%; max-width: 1200px; margin: 0; padding: 32px; box-sizing: border-box; }

/* ---- Page furniture -------------------------------------------------- */

[dnr-app] [rst-page-header] { border-bottom: 0; padding: 0; margin: 0 0 22px; }
[dnr-app] [rst-page-header] h1 { font-size: 26px; font-weight: 650; letter-spacing: -.03em; line-height: 1.15; }
[dnr-app] [rst-page-header-sub] { color: var(--g-ink-2); font-size: 15px; margin-top: 6px; }
[dnr-app] h2 { font-size: 15.5px; font-weight: 620; letter-spacing: -.01em; margin: 32px 0 10px; }
[dnr-app] p { max-width: 68ch; }
[dnr-app] code { font-family: var(--rst-font-mono); font-size: .88em; background: var(--g-panel); border: 1px solid var(--g-line); border-radius: 7px; padding: .12em .4em; overflow-wrap: anywhere; }

[dnr-app] [rst-btn] { border-radius: 999px; font-weight: 600; min-height: 38px; padding-inline: 16px; }
[dnr-app] [rst-btn~="primary"] { background: var(--g-ink); border-color: var(--g-ink); color: #fff; }
[dnr-app] [rst-btn~="primary"]:hover { background: var(--g-ink-hover); }
[dnr-app] [rst-input], [dnr-app] [rst-textarea], [dnr-app] select { border-radius: 10px; border-color: var(--g-line-strong); background: var(--g-card); }
[dnr-app] [rst-input]:focus, [dnr-app] [rst-textarea]:focus { outline: none; border-color: var(--g-ink); box-shadow: 0 0 0 3px rgb(17 17 19 / .08); }
[dnr-app] [rst-callout] { border-radius: 14px; }
[dnr-app] [rst-empty] { border: 1px dashed var(--g-line-strong); border-radius: 14px; background: var(--g-ground); }

/* A card: the one container, never nested. */
[dnr-card] { background: var(--g-card); border: 1px solid var(--g-line); border-radius: 14px; padding: 18px 20px; }
[dnr-card] > h2:first-child, [dnr-card] > h3:first-child { margin-top: 0; }
[dnr-card] h3 { font-size: 14.5px; font-weight: 620; margin: 0 0 6px; display: flex; align-items: center; gap: 8px; }
[dnr-card] h3 .icon { width: 16px; height: 16px; color: var(--g-ink-3); }
[dnr-card] p { color: var(--g-ink-2); font-size: 14px; margin: 6px 0 0; }
[dnr-card][data-accent="gold"] h3 .icon { color: var(--g-gold); }

/* ---- Overview -------------------------------------------------------- */

[dnr-overview] { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; align-items: start; }
[dnr-said] { font-size: 17px; color: var(--g-ink-2); letter-spacing: -.01em; margin: 6px 0 0; }
[dnr-said] strong { color: var(--g-ink); font-weight: 620; font-variant-numeric: tabular-nums; }
[dnr-checks] { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--g-line); border-radius: 14px; overflow: hidden; }
[dnr-checks] li { padding: 14px 16px; display: grid; gap: 4px; align-content: start; }
[dnr-checks] li + li { border-left: 1px solid var(--g-line-soft); }
[dnr-checks] b { display: flex; align-items: center; gap: 8px; font-weight: 580; font-size: 14px; }
[dnr-checks] li > span { color: var(--g-ink-3); font-size: 13px; overflow-wrap: anywhere; }
[dnr-tick] { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--g-ok); color: #fff; }
[dnr-tick][data-state="todo"] { background: var(--g-gold-soft); color: var(--g-gold-deep); box-shadow: inset 0 0 0 1.5px var(--g-gold); }
[dnr-tick] .icon { width: 11px; height: 11px; stroke-width: 3; }
[dnr-rail] { display: grid; gap: 14px; }
[dnr-rail] [rst-btn] { margin-top: 12px; }
[dnr-app] [dnr-snippet] { display: block; border: 0; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--g-ink); color: #ececea; font: 12px/1.55 var(--rst-font-mono); white-space: pre-wrap; overflow-wrap: anywhere; }
[dnr-tags] { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
[dnr-tags] span { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 7px; background: var(--g-panel); color: var(--g-ink-2); font-size: 12.5px; }
[dnr-kv] { display: grid; gap: 8px; margin: 10px 0 0; font-size: 13.5px; }
[dnr-kv] div { display: flex; justify-content: space-between; gap: 12px; }
[dnr-kv] dt { color: var(--g-ink-3); }
[dnr-kv] dd { margin: 0; font-weight: 540; text-align: right; }

/* ---- Payments: rows, the feed, the in-row trail ---------------------- */

[dnr-feed] { list-style: none; margin: 0; padding: 0; }
[dnr-feed] > li + li { border-top: 1px solid var(--g-line-soft); }
[dnr-feed] details > summary { list-style: none; }
[dnr-feed] details > summary::-webkit-details-marker { display: none; }
[dnr-prow] { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 12px 8px; border-radius: 10px; cursor: pointer; text-decoration: none; color: inherit; }
[dnr-prow]:hover { background: var(--g-ground); }
[dnr-prow] [dnr-chev] { color: #b7b7b0; display: grid; }
[dnr-prow] [dnr-chev] .icon { width: 15px; height: 15px; transition: transform .2s cubic-bezier(.16, 1, .3, 1); }
details[open] > [dnr-prow] [dnr-chev] .icon { transform: rotate(90deg); color: var(--g-ink-2); }
[dnr-prow] b { font-weight: 590; font-size: 14.5px; }
[dnr-prow] small { display: block; color: var(--g-ink-3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[dnr-amt] { font-weight: 620; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
[dnr-amt] time { display: block; color: var(--g-ink-3); font-weight: 450; font-size: 12.5px; }
[dnr-steps] { list-style: none; margin: 4px 8px 16px 38px; padding: 14px 16px; border: 1px solid var(--g-line); border-radius: 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px 8px; }
[dnr-steps] li { position: relative; padding-top: 20px; }
[dnr-steps] li::before { content: ""; position: absolute; top: 4px; left: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--g-ink); }
[dnr-steps] li::after { content: ""; position: absolute; top: 8px; left: 16px; right: 4px; height: 2px; border-radius: 2px; background: var(--g-line); }
[dnr-steps] li:last-child::after { display: none; }
[dnr-steps] li[data-tone="positive"]::before { background: var(--g-ok); }
[dnr-steps] li[data-tone="negative"]::before { background: var(--rst-tone-negative-fg); }
[dnr-steps] b { display: block; font-size: 13px; font-weight: 580; }
[dnr-steps] time { display: block; color: var(--g-ink-3); font-size: 12.5px; }
[dnr-feed-more] { display: flex; justify-content: space-between; align-items: center; margin: 32px 0 8px; }
[dnr-feed-more] h2 { margin: 0; }
[dnr-feed-more] a { font-size: 14px; color: var(--g-ink-2); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
[dnr-feed-more] a:hover { color: var(--g-ink); }
[dnr-feed-more] .icon { width: 14px; height: 14px; }

/* ---- Payments page: filter, list, detail ------------------------------ */

[dnr-filter] { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 16px; }
[dnr-chips] { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; background: var(--g-panel); border-radius: 11px; }
[dnr-chips] a { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 8px; color: var(--g-ink-2); font-size: 13.5px; font-weight: 540; text-decoration: none; white-space: nowrap; }
[dnr-chips] a[aria-current] { background: var(--g-card); color: var(--g-ink); box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 0 0 1px rgb(0 0 0 / .04); }
[dnr-search] { margin-left: auto; display: flex; gap: 6px; }
[dnr-search] input { height: 36px; width: 240px; box-sizing: border-box; border: 1px solid var(--g-line-strong); border-radius: 10px; padding: 0 12px; font: inherit; font-size: 14px; background: var(--g-card); }
[dnr-search] input:focus { outline: none; border-color: var(--g-ink); box-shadow: 0 0 0 3px rgb(17 17 19 / .08); }

[dnr-transactions] { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 24px; align-items: start; }
[dnr-transaction-list] { list-style: none; margin: 0; padding: 6px; border: 1px solid var(--g-line); border-radius: 14px; background: var(--g-card); }
[dnr-transaction-list] li { border: 0; }
[dnr-transaction] { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; padding: 11px 12px; border-radius: 10px; text-decoration: none; color: inherit; }
[dnr-transaction]:hover { background: var(--g-ground); }
[dnr-transaction][aria-current="page"] { background: #efefec; box-shadow: inset 0 0 0 1px var(--g-line-strong); }
[dnr-transaction] b { font-weight: 590; }
[dnr-transaction] small { color: var(--g-ink-3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; margin: 0; }
[dnr-transaction] [dnr-amt] { align-self: start; }
[dnr-transaction] [rst-badge], [dnr-transaction] [rst-status] { justify-self: end; }
[dnr-receipt] { border: 1px solid var(--g-line); border-radius: 14px; padding: 22px 24px; background: var(--g-card); position: sticky; top: 16px; }
[dnr-detail-amt] { font-size: 34px; font-weight: 650; line-height: 1.1; font-variant-numeric: tabular-nums; margin: 4px 0 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
[dnr-detail-sub] { color: var(--g-ink-2); margin: 0; }

/* The vertical trail, on the payment page and beside the list. */
[dnr-trail] { list-style: none; margin: 8px 0 0; padding: 0; }
[dnr-trail] li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 14px; padding: 11px 0; position: relative; }
[dnr-trail] li::before { content: ""; position: absolute; left: 10px; top: 33px; bottom: -11px; width: 2px; background: var(--g-line); }
[dnr-trail] li:last-child::before { display: none; }
[dnr-dot] { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #efefec; color: var(--g-ink-2); position: relative; z-index: 1; }
[dnr-dot][data-tone="positive"] { background: #e1f4e9; color: var(--g-ok); }
[dnr-dot][data-tone="negative"] { background: #fdeceb; color: #a61f15; }
[dnr-dot] .icon { width: 12px; height: 12px; stroke-width: 3; }
[dnr-trail] b { font-weight: 580; font-size: 14.5px; }
[dnr-trail] p { margin: 1px 0 0; color: var(--g-ink-3); font-size: 13px; }
[dnr-trail] time { color: var(--g-ink-3); font-size: 13px; white-space: nowrap; }
[dnr-record-note] { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--g-line-soft); margin-top: 8px; padding-top: 12px; color: var(--g-ink-3); font-size: 13px; }
[dnr-record-note] .icon { width: 14px; height: 14px; flex: none; }

/* ---- Lists: keys, sections ------------------------------------------- */

[dnr-rows] { list-style: none; margin: 0; padding: 0; border: 1px solid var(--g-line); border-radius: 14px; background: var(--g-card); overflow: hidden; }
[dnr-rows] > li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
[dnr-rows] > li + li { border-top: 1px solid var(--g-line-soft); }
[dnr-rows] form { margin: 0 0 0 auto; }
[dnr-rows] [rst-form-foot] { margin: 0; padding: 0; border: 0; }
[dnr-sections] a { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 0 16px; text-decoration: none; color: var(--g-ink); font-weight: 560; font-size: 16px; }
[dnr-sections] a .icon { width: 19px; height: 19px; color: var(--g-ink-2); }
[dnr-sections] a [dnr-chev] { margin-left: auto; color: #b7b7b0; display: grid; }
[dnr-sections] li { padding: 0 !important; }

/* ---- Narrow screens: dashboard first, back to the sections -------------- */

@media (max-width: 900px) {
  body { background: var(--g-card); }
  [dnr-app] { display: block; }
  [dnr-side] { display: none; }
  [dnr-main] { margin: 0; border-radius: 0; box-shadow: none; min-height: 100dvh; }
  [dnr-bar] { position: sticky; top: 0; z-index: 5; padding: 0 12px; background: rgb(255 255 255 / .92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
  [dnr-bar] [dnr-back] { display: inline-flex; align-items: center; gap: 2px; height: 40px; padding: 0 10px 0 4px; margin-left: -4px; border-radius: 10px; color: var(--g-ink); font-weight: 560; font-size: 15px; text-decoration: none; }
  [dnr-bar] [dnr-back]:hover { background: var(--g-panel); }
  [dnr-bar] [dnr-back] .icon { width: 20px; height: 20px; }
  [dnr-bar] [dnr-crumbs] { display: none; }
  [dnr-app] [dnr-page] { padding: 20px 16px 40px; }
  [dnr-overview] { grid-template-columns: 1fr; gap: 8px; }
  [dnr-checks] { grid-template-columns: 1fr 1fr; }
  [dnr-checks] li:nth-child(3) { border-left: 0; }
  [dnr-checks] li:nth-child(n+3) { border-top: 1px solid var(--g-line-soft); }
  [dnr-rail] { margin-top: 24px; }
  [dnr-steps] { margin-left: 8px; grid-template-columns: 1fr; }
  [dnr-steps] li::after { display: none; }
  [dnr-transactions] { grid-template-columns: 1fr; }
  [dnr-receipt] { position: static; }
  [dnr-search] { margin-left: 0; width: 100%; }
  [dnr-search] input { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  [dnr-prow] [dnr-chev] .icon { transition: none; }
}

[dnr-title] { font-size: 26px; font-weight: 650; letter-spacing: -.03em; line-height: 1.15; margin: 0; }
[dnr-card] form { margin-top: 12px; }
[dnr-card] [rst-form-foot] { border: 0; padding: 0; margin: 12px 0 0; }
[dnr-settings] { display: grid; gap: 16px; max-width: 680px; }
[dnr-settings] fieldset { border: 1px solid var(--g-line); border-radius: 14px; padding: 16px 20px; margin: 0; }
[dnr-settings] legend { font-weight: 620; padding: 0 6px; }
[dnr-key-prefix] { color: var(--g-ink-3); font-size: 13px; }
[dnr-rows] > li > div { min-width: 0; }
[dnr-rows] b { font-weight: 590; }
/* Only the primary action is black. rastrillo's plain button fills with
   the accent, which is ink here, so every other button is set quiet. */
[dnr-app] [rst-btn]:not([rst-btn~="primary"]) { background: var(--g-card); color: var(--g-ink); border: 1px solid var(--g-line-strong); box-shadow: 0 1px 1px rgb(0 0 0 / .03); }
[dnr-app] [rst-btn]:not([rst-btn~="primary"]):hover { border-color: var(--g-ink); background: var(--g-card); }
[dnr-settings] fieldset { display: grid; gap: 10px; }
[dnr-settings] fieldset p { margin: 0 0 4px; font-size: 14px; color: var(--g-ink-2); }
[dnr-transaction] b, [dnr-prow] b { white-space: nowrap; }
[dnr-receipt] { scroll-margin-top: 72px; }
[dnr-menu-signout] { margin-top: 24px; }
[dnr-account-av] .icon { width: 16px; height: 16px; }

/* ---- The focused layout: one task, a card, nothing else --------------- */

[dnr-focus] { min-height: 100dvh; box-sizing: border-box; padding: 28px 20px 48px; display: flex; flex-direction: column; align-items: center; background: radial-gradient(60vmax 40vmax at 50% -10%, #f5e3bd 0%, transparent 60%), var(--g-panel); }
[dnr-focus] > [dnr-mark] { padding: 6px 10px 22px; }
[dnr-focus-card] { width: 100%; max-width: 560px; box-sizing: border-box; background: var(--g-card); border-radius: 22px; padding: 34px 36px 32px; box-shadow: 0 0 0 1px var(--g-line), 0 24px 48px -28px rgb(0 0 0 / .28); }
[dnr-focus-card] [rst-page-header] { border-bottom: 0; padding: 0; margin: 0 0 20px; }
[dnr-focus-card] [rst-page-header] h1 { font-size: 26px; font-weight: 650; letter-spacing: -.03em; }
[dnr-focus-card] [rst-page-header-sub] { color: var(--g-ink-2); font-size: 15px; margin-top: 6px; }
[dnr-focus-card] p { color: var(--g-ink-2); font-size: 14.5px; }
[dnr-focus-card] h2 { font-size: 15.5px; font-weight: 620; margin: 24px 0 10px; }
[dnr-focus-card] fieldset { border: 1px solid var(--g-line); border-radius: 14px; padding: 14px 18px; margin: 16px 0; }
[dnr-focus-card] legend { font-weight: 620; padding: 0 6px; }
[dnr-focus-card] [rst-btn] { border-radius: 999px; font-weight: 600; min-height: 42px; padding-inline: 20px; }
[dnr-focus-card] [rst-btn~="primary"], [dnr-focus-card] form [rst-form-foot] [rst-btn]:only-child { background: var(--g-ink); border-color: var(--g-ink); color: #fff; }
[dnr-focus-card] [rst-input] { border-radius: 10px; border-color: var(--g-line-strong); }
[dnr-focus-card] [rst-input]:focus { outline: none; border-color: var(--g-ink); box-shadow: 0 0 0 3px rgb(17 17 19 / .08); }
[dnr-focus-card] [rst-callout] { border-radius: 14px; }
[dnr-focus-card] ul { padding-left: 0; list-style: none; }
[dnr-focus-card] ul li label { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--g-line); border-radius: 10px; margin-bottom: 6px; cursor: pointer; }
[dnr-focus-card] ul li a { display: block; padding: 10px 12px; border: 1px solid var(--g-line); border-radius: 10px; margin-bottom: 6px; text-decoration: none; }
[dnr-focus-card] ul li a:hover, [dnr-focus-card] ul li label:hover { border-color: var(--g-ink); }
[dnr-focus-card] code { font-family: var(--rst-font-mono); background: var(--g-panel); border: 1px solid var(--g-line); border-radius: 8px; padding: .2em .45em; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  [dnr-focus] { padding: 16px 0 0; background: var(--g-card); }
  [dnr-focus-card] { border-radius: 0; box-shadow: none; padding: 8px 18px 36px; }
}

/* ---- The buyer's wallet ----------------------------------------------- */

[dnr-wallet] { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
[dnr-wallet] > div { display: grid; gap: 14px; align-content: start; }
[dnr-app] #profile { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; margin: 12px 0 0; }
[dnr-app] #profile dt { color: var(--g-ink-3); }
[dnr-app] #profile dd { margin: 0; font-weight: 540; overflow-wrap: anywhere; }
[dnr-app] [dnr-card] ul:not([dnr-rows]) { list-style: none; padding: 0; margin: 10px 0 0; }
[dnr-app] [dnr-card] ul:not([dnr-rows]) li { padding: 8px 0; border-bottom: 1px solid var(--g-line-soft); }
@media (max-width: 900px) { [dnr-wallet] { grid-template-columns: 1fr; } }

/* The setup wizard: four segments, the current one named in full. */
[dnr-wizard] { margin: 0 0 22px; }
[dnr-wizard] > p { margin: 0 0 10px; font-size: 13px; color: var(--g-ink-3); }
[dnr-wizard] ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
[dnr-wizard] li { padding-top: 12px; position: relative; font-size: 13px; color: var(--g-ink-3); }
[dnr-wizard] li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; border-radius: 4px; background: var(--g-line); }
[dnr-wizard] li[data-done]::before { background: var(--g-ink); }
[dnr-wizard] li[aria-current]::before { background: var(--g-gold); }
[dnr-wizard] li strong { display: flex; align-items: center; gap: 4px; font-weight: 560; color: inherit; }
[dnr-wizard] li[aria-current] strong { color: var(--g-ink); font-weight: 620; }
[dnr-wizard] li[data-done] strong { color: var(--g-ink-2); }
[dnr-wizard] li strong .icon { width: 13px; height: 13px; stroke-width: 3; }
[dnr-wizard] li span { display: block; margin-top: 3px; color: var(--g-ink-2); }
/* On a phone the four segments stay in order and wordless; the current
   step is named once, underneath them. */
[dnr-wizard-now] { display: none; }
@media (max-width: 600px) {
  [dnr-wizard] li strong, [dnr-wizard] li span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  [dnr-wizard-now] { display: block; margin: 12px 0 0; font-size: 13.5px; color: var(--g-ink-2); }
  [dnr-wizard-now] strong { color: var(--g-ink); font-weight: 620; }
}

[dnr-detail-amt] data { letter-spacing: -.035em; }
[dnr-detail-amt] > :not(data) { font-size: 12.5px; letter-spacing: normal; }

/* Rows as named areas, so a long status never squeezes the reference. */
[dnr-prow] { grid-template-columns: 16px minmax(0, 1fr) auto auto; grid-template-areas: "chev main pill amt"; }
[dnr-prow] > :nth-child(1) { grid-area: chev; }
[dnr-prow] > :nth-child(2) { grid-area: main; min-width: 0; }
[dnr-prow] > :nth-child(3) { grid-area: pill; }
[dnr-prow] > :nth-child(4) { grid-area: amt; }
[dnr-transaction] { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "ref amt" "sum pill"; }
[dnr-transaction] > b { grid-area: ref; overflow: hidden; text-overflow: ellipsis; }
[dnr-transaction] > [dnr-amt] { grid-area: amt; }
[dnr-transaction] > small { grid-area: sum; min-width: 0; }
[dnr-transaction] > :last-child { grid-area: pill; justify-self: end; }
[dnr-older] { margin: 10px 0 0; text-align: center; font-size: 14px; }

/* The overview stacks its rail before the columns get tight. */
@media (max-width: 1180px) {
  [dnr-overview] { grid-template-columns: 1fr; gap: 8px; }
  [dnr-rail] { margin-top: 24px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
@media (max-width: 1100px) {
  [dnr-checks] { grid-template-columns: 1fr 1fr; }
  [dnr-checks] li:nth-child(3) { border-left: 0; }
  [dnr-checks] li:nth-child(n+3) { border-top: 1px solid var(--g-line-soft); }
  [dnr-transactions] { grid-template-columns: 1fr; }
  [dnr-receipt] { position: static; }
}
@media (max-width: 900px) {
  [dnr-prow] { grid-template-columns: 16px minmax(0, 1fr) auto; grid-template-areas: "chev main amt" "chev pill amt"; row-gap: 6px; }
  [dnr-prow] > :nth-child(3) { display: inline-flex !important; justify-self: start; }
  [dnr-rail] { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  [dnr-transaction] { grid-template-areas: "ref amt" "sum sum" "pill pill"; }
  [dnr-transaction] > :last-child { justify-self: start; }
}
[dnr-wizard] { padding: 0; margin-inline: 0; }
/* Native controls in the palette: a blue radio is the one colour here
   nobody chose. */
[dnr-app] input[type="radio"], [dnr-app] input[type="checkbox"], [dnr-focus-card] input[type="radio"], [dnr-focus-card] input[type="checkbox"] { accent-color: var(--g-ink); }
/* The recovery code is the one thing a buyer must copy by hand. */
[dnr-focus-card] [dnr-recovery] { display: block; text-align: center; font-size: 20px; letter-spacing: .08em; padding: 16px 12px; border-radius: 14px; background: var(--g-panel); color: var(--g-ink); user-select: all; }
[dnr-focus-card] a[rst-btn] { display: inline-flex; align-items: center; text-decoration: none; min-height: 42px; height: 42px; padding-block: 0; box-sizing: border-box; }

/* ---- The full-page checkout: the floor under the sheet ----------------- */

[dnr-focus-card] [dnr-payment] { display: block; min-height: 0; }
[dnr-focus-card] [dnr-order] { background: none; padding: 0 0 20px; margin: 0 0 20px; border-bottom: 1px solid var(--g-line); }
[dnr-focus-card] [dnr-order] h1 { font-size: 17px; font-weight: 620; margin: 0; letter-spacing: -.01em; }
[dnr-focus-card] [dnr-order] p { margin: 4px 0 0; }
[dnr-focus-card] [dnr-total] { font-size: 40px !important; font-weight: 650; letter-spacing: -.035em; line-height: 1.05; margin: 14px 0 8px !important; color: var(--g-ink); font-variant-numeric: tabular-nums; }
[dnr-focus-card] [dnr-order] dl { margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--g-line-soft); display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 14px; }
[dnr-focus-card] [dnr-order] dd { margin: 0; overflow-wrap: anywhere; }
[dnr-focus-card] [dnr-options] { padding: 0; max-width: none; }
[dnr-focus-card] [dnr-options] h2 { margin-top: 0; font-size: 16px; }
[dnr-focus-card] [dnr-options] ul { margin: 8px 0 14px; }
[dnr-focus-card] [dnr-options] ul li { padding: 8px 0; border-bottom: 1px solid var(--g-line-soft); color: var(--g-ink-2); font-size: 14.5px; }
[dnr-focus-card] [dnr-options] [rst-btn~="primary"], [dnr-focus-card] [dnr-options] button[rst-btn] { width: 100%; justify-content: center; }
[dnr-focus-card] details { margin-top: 18px; border-top: 1px solid var(--g-line-soft); padding-top: 14px; }
[dnr-focus-card] summary { cursor: pointer; font-weight: 560; color: var(--g-ink-2); }
[dnr-focus-card] dl#payment-profile { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; }
[dnr-focus-card] dl#payment-profile dd { margin: 0; font-weight: 540; }
[dnr-focus-card] dl:not([dnr-kv]):not(#payment-profile) dt { color: var(--g-ink-3); }
[dnr-focus-card] table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 14px; }
[dnr-focus-card] th { text-align: left; font-weight: 560; color: var(--g-ink-3); border-bottom: 1px solid var(--g-line); padding: 8px 0; }
[dnr-focus-card] td { padding: 8px 0; border-bottom: 1px solid var(--g-line-soft); }
[dnr-focus-card] td:last-child, [dnr-focus-card] th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
[dnr-app] [dnr-claim] { display: block; padding: 12px 14px; font-size: 13.5px; user-select: all; }
/* Once the buyer's own details are showing, the list of what the shop
   asked for has said its piece: the values replace it. */
[dnr-focus-card] [dnr-options]:has(#payment-choices:not([hidden])) #pay-steps > [dnr-selection] { display: none; }

/* Wallet pages open from the session on arrival; this is the moment
   before they have. */
#opening { color: var(--g-ink-3); }

/* Payment in progress, on the full page: the sheet's ring (sheet.css),
   turning while the bank confirms, then a drawn tick. */
[dnr-progress] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 48px 0; min-height: 260px; }
[dnr-progress][hidden] { display: none; }
[dnr-progress] svg { width: 88px; height: 88px; overflow: visible; }
[dnr-progress] [dnr-ring-track] { fill: none; stroke: var(--g-line); stroke-width: 4; }
[dnr-progress] [dnr-ring-arc] { fill: none; stroke: var(--g-ink); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 170; stroke-dashoffset: 120; transform-origin: 32px 32px; animation: dnr-ring-turn 1s linear infinite; transition: stroke-dashoffset .5s cubic-bezier(.16,1,.3,1), stroke .3s; }
[dnr-progress] [dnr-ring-check] { fill: none; stroke: #fff; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; }
[dnr-progress] p { margin: 0; font-size: 16px; font-weight: 560; color: var(--g-ink); }
[dnr-progress][data-state="paid"] [dnr-ring-arc] { animation: none; stroke: var(--g-ok); stroke-dashoffset: 0; fill: var(--g-ok); transition: stroke-dashoffset .5s cubic-bezier(.16,1,.3,1), fill .3s .35s, stroke .3s; }
[dnr-progress][data-state="paid"] [dnr-ring-check] { animation: dnr-ring-draw .45s .45s cubic-bezier(.16,1,.3,1) forwards; }
@keyframes dnr-ring-turn { to { transform: rotate(360deg); } }
@keyframes dnr-ring-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  [dnr-progress] [dnr-ring-arc] { animation: none; }
  [dnr-progress][data-state="paid"] [dnr-ring-check] { animation: none; stroke-dashoffset: 0; }
}

/* Dressed as the sheet (present=sheet): reached from a shop's Pay where
   the sheet could not be used over the shop. It slid up anyway, showed a
   beat, and the tab carried on (embed.js); this page opens on the same
   white sheet in the same place, and its contents arrive into it. Behind
   it, a ghost of the shop's page, pushed back as the loader pushes the
   real one — on leaving, the sheet slides back down and the ghost comes
   forward, so the shop's page loading next reads as it returning. */
body[dnr-presented] { background: #0b0b0c; }
body[dnr-presented]::before { content: ""; position: fixed; inset: 0; background: #c4c4c2; border-radius: 12px; transform-origin: 50% 0; transform: translateY(10px) scale(.94); transition: transform .5s cubic-bezier(.16,1,.3,1), background-color .5s, border-radius .5s; }
body[dnr-presented][data-leaving]::before { transform: none; background-color: #f4f4f2; border-radius: 0; }
[dnr-presented] [dnr-focus] { position: relative; background: transparent; padding: 22px 0 0; }
[dnr-presented] [dnr-focus] > [dnr-mark] { display: none; }
[dnr-presented] [dnr-focus-card] { position: relative; z-index: 1; max-width: none; flex: 1; min-height: calc(100dvh - 22px); border-radius: 28px 28px 0 0; box-shadow: none; padding: 26px 22px 28px; transition: transform .46s cubic-bezier(.32,0,.67,0); }
[dnr-presented][data-leaving] [dnr-focus-card] { transform: translateY(calc(100% + 40px)); }
[dnr-presented] [dnr-focus-card] > :not([dnr-presented-close]):not(script) { animation: dnr-arrive .38s .05s cubic-bezier(.16,1,.3,1) both; }
@keyframes dnr-arrive { from { opacity: 0; transform: translateY(10px); } }
[dnr-presented-close] { position: absolute; z-index: 2; top: 18px; right: 18px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: #f1f1ee; color: var(--g-ink-2); display: grid; place-items: center; cursor: pointer; }
[dnr-presented-close] .icon { width: 16px; height: 16px; }
[dnr-presented-close]:disabled { opacity: .4; cursor: default; }
/* The shop's name never runs under the close button. */
[dnr-presented] [dnr-focus-card] h1 { padding-right: 48px; }
@media (min-width: 560px) {
  body[dnr-presented]::before { transform-origin: 50% 50%; transform: scale(.94); border-radius: 18px; }
  [dnr-presented] [dnr-focus] { padding: 32px 20px; min-height: 100dvh; justify-content: center; }
  /* The same box the sheet slid up as (embed.js): 420 wide, up to 700 tall. */
  [dnr-presented] [dnr-focus-card] { flex: none; max-width: 420px; min-height: min(700px, calc(100dvh - 48px)); border-radius: 28px; box-shadow: 0 40px 80px -24px rgb(0 0 0 / .55); }
  [dnr-presented][data-leaving] [dnr-focus-card] { transform: translateY(calc(50vh + 50%)); }
}
@media (prefers-reduced-motion: reduce) {
  body[dnr-presented]::before, [dnr-presented] [dnr-focus-card] { transition: none; }
  [dnr-presented] [dnr-focus-card] > * { animation: none; }
}
