/* Every component on monokulo's server-rendered pages, and the parts the
   POS and the checkout share with them (buttons, badges, the app bar). It
   names roles from `theme.css`, never a colour: retheme there. */
/* The typeface's `@font-face` rules come first in the page's style, from
   `views::font_faces`: the font files' URLs carry their version, like every
   file baked into the binary (`crate::assets`). */

* { box-sizing: border-box; }
/* Minimal reset for form controls - browsers (and this file's own later,
   more specific `button` rule) give buttons/inputs/etc. their own
   default margin/font, which silently leaks into any context that isn't
   "a standalone block-level control with space below it" - e.g. a
   <button> in a row of links inheriting a form button's `margin-top` and
   sitting visibly out of line with its sibling <a> tags. Reset the baseline here;
   components that genuinely want spacing (the real `button` rule
   below) declare it themselves, deliberately, rather than relying on a
   default nothing else was meant to inherit. */
button, input, textarea, select { margin: 0; font: inherit; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
}
body { padding-bottom: 4rem; }
a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-text); }
/* Every <details> opens with a pointer, without the browser's marker, and
   shows a focus ring from the keyboard; ui::Disclosure draws the rest. */
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.01em; margin: 1.4em 0 0.6em; }
/* A block taking us over two minutes: slow, not broken (docs/engine_scaling.md section 5). */
.notice[data-slow-block] { background: var(--tint-warning); border-color: var(--warning); }
h1 { font-size: var(--text-xl); border-bottom: 2px solid var(--line); padding-bottom: 0.3em; margin: var(--space-lg) 0 var(--space-sm); }
h2 { font-size: var(--text-lg); border-bottom: 1px solid var(--line); padding-bottom: 0.2em; }
p { margin: 0.6em 0; }
/* Code/addresses/txids stay monospace regardless of the UI font choice -
   a legibility need (character-width alignment, telling 0/O and 1/l/I
   apart), not a style preference `--font-ui` should override. */
code, pre {
  font-family: var(--font-mono);
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.1em 0.35em;
}
pre { padding: var(--space-md); overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
/* The status page's network card (`views::status`): the network's name as
   its title with its states beside it and "Watch it live" at the right,
   then small-caps section heads, well under the title's size. */
/* A node's proof-of-work verdict: a dot of its tone, then the words. */
.verdict { display: inline-flex; align-items: flex-start; gap: var(--space-xs); }
.verdict::before { content: ""; flex: none; margin-top: 0.45em; width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--pow-verdict-quiet); }
.verdict.is-ok::before { background: var(--pow-verdict-ok); }
.verdict.is-watch::before { background: var(--pow-verdict-watch); }
.verdict.is-bad::before { background: var(--pow-verdict-bad); }
table[data-table="nodes"] .sub { display: block; color: var(--muted); font-size: var(--text-sm); overflow-wrap: anywhere; }
table[data-table="nodes"] td.card-meta { font-size: inherit; color: inherit; }
/* Proof of work: the sentence with its chip, then the last blocks at a
   fixed scale (filled proven, outlined seen, ringed where orders settle
   to, a bar at the tip), the legend and figures on their own line. */
.pline { margin: var(--space-xs) 0; }
.pips { display: flex; align-items: center; gap: 2px; margin: var(--space-sm) 0 var(--space-xs); }
.pip { display: inline-block; flex: 1 1 0; max-width: 12px; height: 12px; border-radius: 3px; background: var(--pow-proven); border: 1px solid var(--pow-proven); }
.pip.seen { background: transparent; border: 1px dashed var(--pow-seen-edge); }
.pip.before { background: var(--pow-before); border-color: var(--pow-before); }
/* The ring reaches 3px past its block (2px outline, 1px offset); the 3px
   margin each side, on top of the 2px gap, keeps it 2px clear of its
   neighbours. Every block keeps the same width. */
.pip[data-settles] { outline: 2px solid var(--pow-mark); outline-offset: 1px; margin: 0 3px; }
.pip-tip { display: inline-block; flex: none; width: 2px; height: 18px; margin-left: 3px; border-radius: 1px; background: var(--pow-mark); }
.pip-legend { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-md); margin: var(--space-sm) 0 0; font-size: var(--text-xs); color: var(--muted); }
.pip-legend > span { display: inline-flex; align-items: center; gap: var(--space-xs); }
.pip-legend .pip { flex: none; width: 10px; height: 10px; }
.pip-legend .pip-tip { height: 12px; margin: 0; }
.pip-figures { margin: var(--space-xs) 0 0; font-size: var(--text-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
[data-pip-anchor] { margin: var(--space-xs) 0 0; }
/* Settlement held: the reason and the way out, in one calm box; the
   header's tag says it in red. */
.proof-held { border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface-sunken); padding: var(--space-sm) var(--space-md); margin: var(--space-sm) 0; }
.proof-held p { margin: var(--space-xs) 0; }
.proof-held form { margin: var(--space-sm) 0 0; }
[data-proof-facts] { margin: var(--space-md) 0 0; }
[data-proof-facts] > .facts { margin-top: var(--space-sm); }
/* The Monero nodes tab: a card per network, a row per node, closed to a
   line until opened. */
[data-node-rows] { margin-bottom: var(--space-lg); }
.node-add-another { margin: calc(-1 * var(--space-xs)) 0 var(--space-xl); }
[data-node-row].is-changed > .disclosure-row { border-color: var(--card-changed); }
[data-node-row]:has(.setting-problem) > .disclosure-row { border-color: var(--card-failed); }
.node-add-mark { font-weight: 800; color: var(--accent-text); width: 1em; text-align: center; }
.node-row-name { font-weight: 700; min-width: 5.5em; }
.node-row-address { min-width: 0; overflow-wrap: anywhere; }
.node-row-status { margin-left: auto; font-size: var(--text-sm); color: var(--muted); }
.node-row-status.is-problem { color: var(--error); font-weight: 700; }
.node-row-mark:empty { display: none; }
[data-node-rows] .setting-field input[type="text"] { width: 100%; }
.node-status { margin: var(--space-xs) 0; color: var(--muted); }
.node-status.is-problem { color: var(--error); }
/* How the engine is performing (`views::scaling`), on the engine page: the
   "Machine and links" strip's stacked charts and sparklines, the Scanning
   panel's figures. The Monero nodes tab links there from each network. */
.card-head .engine-link { font-size: var(--text-sm); }
.scan-figures { display: grid; grid-template-columns: max-content 1fr; gap: var(--space-xs) var(--space-md); margin: 0; }
.scan-figures dt { color: var(--muted); }
.scan-figures dd { margin: 0; min-width: 0; }
@media (max-width: 30rem) {
  .scan-figures { grid-template-columns: 1fr; }
  .scan-figures dd { margin-bottom: var(--space-xs); }
}
.dns-record { display: grid; grid-template-columns: max-content 1fr; gap: 2px var(--space-sm); margin: var(--space-sm) 0 0; }
.dns-record dt { color: var(--muted); font-size: var(--text-sm); }
.dns-record dd { margin: 0; overflow-wrap: anywhere; }
.domain-actions { white-space: nowrap; }
.embed-restriction { display: grid; gap: var(--space-sm); justify-items: start; margin: 1em 0; }
.embed-restriction p { margin: 0; }
.domain-actions form { display: inline-block; margin: 0 var(--space-xs) var(--space-xs) 0; }
/* The one-time "just deleted" row an admin table shows right after a real
   delete (`admin_invites.html.hbs`) - struck through and faded so it reads
   as gone-but-still-visible-for-confirmation, not a live row. */
tr[data-deleted] td { opacity: 0.45; text-decoration: line-through; }
.nowrap { white-space: nowrap; }
@media (max-width: 640px) {
  /* The status page's nodes: the verdict beside the height, then what
     went wrong across the card; reachability only when it's a problem. */
  table[data-table="nodes"] td.card-amount { display: contents; font-weight: 400; }
  table[data-table="nodes"] td.card-amount > .verdict { grid-column: 1; grid-row: 2; }
  table[data-table="nodes"] td.card-amount > .sub { grid-column: 1 / -1; }
  table[data-table="nodes"] .card-meta[data-quiet] { display: none; }
}
/* Highlights the whole row containing a native browser find-in-page match
   (Ctrl+F / Cmd+F) - no JS. `::target-text` is the pseudo-element the
   browser itself paints over a find match; `:has()` lets a plain selector
   react to an arbitrary descendant existing, reaching up from the matched
   text to the row around it. `@supports selector(...)` makes this a no-op,
   not a parse error, in a browser that doesn't understand
   `:has(::target-text)` yet. */
@supports selector(:has(::target-text)) {
  tr:has(::target-text) { background: var(--tint-highlight); }
}
form label { display: block; margin: 0.9em 0 0.6em; font-weight: 700; }
/* Where a setting's value comes from: a chip beside its name, with the
   icon of its source (options file, runtime, command line, environment);
   dashed for the default, which nothing has chosen. */
.setting-label-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5em; }
.src-icon { width: 1.15em; height: 1.15em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.src-icon .filled { fill: currentColor; stroke: none; }
/* Each process's options file, above the tabs, with its Reload button. */
.options-files { display: grid; gap: 0.5em; margin-bottom: 1em; }
.options-file { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75em; }
.options-file-where { display: grid; gap: 0.15em; min-width: 0; }
.options-file-path { display: flex; align-items: center; gap: 0.45em; overflow-wrap: anywhere; }
.options-file-where > .hint { margin: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus-ring); outline-offset: 1px; border-color: var(--focus-ring); }
/* A hand-written button (ui::Button is .mk-btn, with no margins).
   `margin-right`: two buttons written as separate Maud
   markup expressions (a Save beside a Discard, say) render
   with no whitespace text node between them - unlike a hand-written .hbs
   template's literal newline/indentation, Maud never inserts one - so an
   explicit horizontal gap is the only thing keeping adjacent buttons from
   touching. */
button {
  display: inline-block;
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  background: var(--btn-bg);
  color: var(--btn-ink);
  border: 1px solid var(--btn-border);
  border-radius: var(--radius-sm);
  padding: calc(var(--space-sm) + 1px) calc(var(--space-lg) + 1px);
  cursor: pointer;
  text-decoration: none;
  margin-top: 0.9em;
  margin-right: var(--space-md);
}
button:hover { background: var(--btn-hover-bg); color: var(--btn-ink); border-color: var(--btn-hover-border); }
button:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
/* The store page's launch tiles (`ui::LaunchTile`) in a row above the
   Recent orders table, each opening its own full-screen tool. */
.widget-links { display: flex; flex-wrap: wrap; gap: var(--space-md); margin: 1em 0 1.4em; }
/* Each tile takes its share of the row, and the whole row once they wrap. */
.widget-links > .mk-launch-tile { flex: 1 1 14rem; }
/* The confirmations-required count never needs more than 720's own 3
   digits (`scanner::http::admin::MAX_CONFIRMATIONS_REQUIRED`) - overrides
   the site-wide `input[type=text] { width: 100% }` default, which would
   otherwise stretch it to the full cell. */
[data-input="confirmations"] { width: 4.5em; }
/* Highlight the entry row while keeping it in the same table. */
[data-table="thresholds"] .new-threshold-row td {
  background: var(--tint-highlight);
  border-top: 3px solid var(--accent);
  padding-block: var(--space-sm);
}
[data-table="thresholds"] .new-threshold-row [data-input="confirmations"] { width: min(100%, 11em); }
.rule { border: none; border-top: 2px dashed var(--line); margin: 1.6em 0; }
.steps { padding-left: 1.4em; }
.steps li { margin: 0.5em 0; }
/* Store overview: status stays left, with Settings then Help at the right.
   The disclosure spans the container so its content matches other panels. */
.store-header-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto 5.5em; align-items: center; column-gap: var(--space-sm); margin-bottom: 1.2em; }
.store-header-status { min-width: 0; display: flex; align-items: center; gap: .4em; white-space: nowrap; }
.store-header-status .store-site { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.store-header-row [data-store-link] { white-space: nowrap; }
/* A phone: the status line gets the width to itself, above Settings and
   Help (which keep their places: Settings left, Help's slot right). */
@media (max-width: 640px) {
  .store-header-row { grid-template-columns: auto minmax(0, 1fr) 5.5em; padding-top: 2.4em; }
  .store-header-status { position: absolute; top: 0; left: 0; right: 0; height: 1.9em; }
}
/* The Orders page's search: field and button on one line. */
.orders-search { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0.5em; margin: 0 0 1em; }
.orders-search input[type="search"] { flex: 1 1 16em; min-width: 0; padding: 0.5em 0.7em; font: inherit; }
.orders-search button { margin: 0; }
.orders-search a { align-self: center; }
[data-table="orders"] td:nth-child(2) { max-width: 14em; overflow-wrap: anywhere; }
.orders-pages { display: flex; gap: 0.5em; }
/* Visually hidden but still readable by assistive tech: the theme toggle's
   labels, the checkout's heading, the Logs page's search label. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
/* A shortened value (`views::short_id`): the short text shows; the whole
   value lies over it, transparent and clipped to the short text's box. An
   id is one word, so a double-click selects it all and a copy takes exactly
   the whole value; a screen reader reads it (the short text is
   `aria-hidden`); find-in-page matches it. `user-select: text`, not `all`:
   Firefox's double-click on a `user-select: all` element selects nothing. Inside a link it keeps the link's underline
   (`text-decoration: inherit`: an inline-block doesn't get it otherwise). */

/* A small manual refresh alongside page actions, also usable without JS. */
[data-reload] { flex: none; }


.engine-network { display: flex; align-items: center; gap: .5rem; margin: 0; }
.engine-network label, .tl-modes label { margin: 0; }
.engine-network select, .tl-modes select { width: auto; margin: 0; padding: .25rem .5rem; }
.tl-modes { border: 0 !important; overflow: visible !important; height: auto !important; align-items: center; }

.sync-motion-note { display: none; }
.catching-up .sync-motion-note { display: block; }
.catching-up .cell, .catching-up .cell .fill, .catching-up .cell .pool,
.catching-up .pill, .catching-up .bar, .catching-up .ruler-label { transition: none; }
.engine-summary .v, .engine-summary .s, .lane-time, .round-state { font-variant-numeric: tabular-nums; }
.engine-summary .v { min-height: 1.6em; }
.engine-page .node .call { min-height: 1.3em; }

/* Step footer: Back on the left, the one way on to the right. */
.step-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm) var(--space-md); margin-top: var(--space-lg); padding-top: var(--space-md); border-top: 1px solid var(--line); }
.step-foot .spacer { flex: 1; }
.step-foot button, .step-foot form { margin: 0; }
.inline-form { display: inline; margin: 0; }
.inline-form button { margin: 0; }
@media (max-width: 640px) {
  .step-foot { flex-direction: column-reverse; align-items: stretch; }
  .step-foot .spacer { display: none; }
  .step-foot .mk-btn, .step-foot form .mk-btn { width: 100%; text-align: center; }
}

/* A field's check, under it: right, wrong, or just a hint. */
input[aria-invalid="true"] { border-color: var(--error); }
/* Two fields side by side read as one form: the labels, the help, the
   boxes and any error each share a row across both columns (subgrid), so a
   longer help text or one field's error never pushes the other out of line.
   One column on a phone. */
.two-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-xl); row-gap: var(--space-xs); margin: 0 0 var(--space-lg); }
.two-fields > .setting-field { display: grid; grid-row: span 4; grid-template-rows: subgrid; align-content: start; margin: 0; min-width: 0; }
.two-fields > .setting-field > * { margin: 0; }
.two-fields > .setting-field > .setting-label-row { align-self: end; }
.two-fields > .setting-field > input { width: 100%; }
@media (max-width: 640px) {
  .two-fields { grid-template-columns: minmax(0, 1fr); }
  .two-fields > .setting-field + .setting-field { margin-top: var(--space-md); }
}

/* The wallet step's choice: today's pick cards, after "use a wallet you
   already added" and an "or". */
.wallet-choice [hidden], [data-wallet-setup] [hidden] { display: none !important; }
/* A screen's heading takes focus when the screen opens, for screen readers:
   it isn't something to act on, so it shows no ring. */
[data-wallet-setup] h1[tabindex="-1"]:focus, [data-wallet-setup] h2[tabindex="-1"]:focus { outline: none; }
.wallet-choice .mk-card-grid { margin: var(--space-lg) 0; }
.wallet-name-field { max-width: 28rem; }
.already { margin: var(--space-md) 0; }
.pick-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); }
.pick-row > .mk-select, .pick-row > select { flex: 1 1 16rem; min-width: 0; width: auto; margin: 0; }
.pick-row > button { flex: none; margin: 0; }
.or-divider { display: flex; align-items: center; gap: var(--space-md); margin: var(--space-lg) 0; color: var(--muted); font-size: var(--text-xs); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.logo-row { display: flex; gap: var(--space-md); align-items: center; }
.app-logo { display: block; flex: none; border-radius: 22%; object-fit: contain; }
.hw-logo { display: block; flex: none; color: var(--ink); }
.icon-tile { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: var(--radius-md); background: var(--tint-highlight); color: var(--ink); }

/* A boxed disclosure: "Where do I find these keys?", the store's public key
   and "More options", help that opens in place. Its summary keeps the
   site's link-with-a-caret look (Disclosures, top) but is a block row inset
   like the box's body, a step (md) from the top and bottom edges and lg
   from the sides, so its text lines up with what opens under it. The
   summary rule matches the site-wide one's specificity (it comes later) so
   its display wins over that rule's inline, which would let the padding
   spill over the box's border. */

/* Back up: each tab shows its words and QR code straight away. The phrase
   gets the main column (4 columns for 16 words, 5 for 25, 2 on a phone);
   the QR sits beside it. */
.app-tab { display: inline-flex; align-items: center; gap: var(--space-sm); }
.phrase-split { display: grid; grid-template-columns: minmax(0, 1fr) 16rem; gap: var(--space-xl); align-items: start; }
.phrase-box { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-lg); margin: var(--space-md) 0; }
.phrase-box .seed-words { margin: var(--space-md) 0; }
.phrase-box .steps { margin: var(--space-sm) 0 0; }
.phrase-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm) var(--space-md); }
.phrase-head h3 { margin: 0; font-size: var(--text-lg); }
.phrase-head .card-spacer { flex: 1; }
.phrase-head button { margin: 0; }
.qr-col { display: grid; justify-items: center; gap: var(--space-xs); margin: var(--space-md) 0; }
.qr-col .hint { margin: 0; text-align: center; }
.qr-frame { background: var(--qr-bg); padding: var(--space-md); border-radius: var(--radius-sm); border: 1px solid var(--line); }
.qr-frame svg { display: block; width: 13rem; height: 13rem; }
.seed-words { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-sm); list-style: none; padding: 0; margin: 0 0 var(--space-md); }
.seed-words.legacy { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.seed-words li { display: flex; gap: var(--space-sm); align-items: baseline; padding: var(--space-sm) var(--space-md); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper-raised); font-family: var(--font-mono); font-weight: 600; overflow-wrap: anywhere; }
.seed-words li::before { content: attr(data-n); min-width: 1.3rem; text-align: right; color: var(--muted); font-size: var(--text-xs); }

/* Check: each word picked from four. */
.word-quiz { display: grid; gap: var(--space-lg); margin: var(--space-md) 0; }
.word-q h3 { margin: 0 0 var(--space-sm); font-size: var(--text-base); }
.word-q .picks { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.word-q .picks button { margin: 0; min-width: 6.5rem; font-family: var(--font-mono); }
.word-q .picks button.is-right { border-color: var(--success); background: var(--tint-success); }
.word-q .picks button.is-wrong { border-color: var(--error); background: var(--tint-error); text-decoration: line-through; }
.word-q .picks button[disabled]:not(.is-right) { opacity: .45; }
.word-q .q-note { margin: var(--space-xs) 0 0; font-size: var(--text-sm); font-weight: 700; min-height: 1.2em; }
.word-q .q-note.bad { color: var(--error); }
.word-q .q-note.ok { color: var(--success); }
.countdown { font-variant-numeric: tabular-nums; }
.field-error { display: block; color: var(--error); font-weight: 700; font-size: var(--text-sm); margin-top: .15em; }
.field-ok { display: block; color: var(--success); font-weight: 700; font-size: var(--text-sm); margin-top: .15em; }
.skip-warning { border: 2px solid var(--error); border-radius: var(--radius-md); background: var(--paper-raised); padding: var(--space-xl); margin: 1.2rem 0; }
.skip-warning h2 { border-bottom: 0; margin-top: var(--space-sm); }

/* Done: never "you can take payments" for a website; what's left, in order. */
.store-summary { margin: var(--space-md) 0; }
[data-not-yet] { margin-right: var(--space-xs); }
.todo { list-style: none; padding: 0; margin: var(--space-md) 0; display: grid; gap: var(--space-sm); }
.todo li { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; gap: var(--space-md); align-items: center; padding: var(--space-md) var(--space-lg); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--paper-raised); }
.todo .num { display: inline-flex; align-items: center; justify-content: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; border: 1px solid var(--line-strong); font-weight: 800; font-size: var(--text-sm); }
.todo li p { margin: 0; }
.todo li .hint { display: block; }
.external-icon { flex: none; }

/* A paper backup, printed: the words and their facts, nothing else. */
@media print {
  .site-nav, .mk-breadcrumbs, .mk-wizard-steps, [data-wallet-setup] .mk-tabs, .step-foot, .check-line,
  .phrase-head button, .phrase-box .steps, .qr-col, [data-wallet-setup] > section > p,
  [data-wallet-setup] [hidden] { display: none !important; }
  .phrase-box { border: 0; padding: 0; }
  .phrase-split { display: block; }
  .seed-words, .seed-words.legacy { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .seed-words li { break-inside: avoid; }
}

@media (max-width: 760px) {
  .phrase-split { grid-template-columns: 1fr; }
  .todo li { grid-template-columns: 2rem minmax(0, 1fr); }
  .todo li > :last-child { grid-column: 2; justify-self: start; }
}

/* Wallets (docs/wallets.md): radio cards and a wallet's page. */
/* The theme as three radio cards, each with a small picture of a page in
   it (`views::account::theme_choice`). The pictures keep their own look
   whatever theme the page is in, so they're drawn from the two roles that
   don't change between themes. */
.mini-page { --mini-light: var(--qr-bg); --mini-dark: color-mix(in srgb, var(--media-bg) 82%, var(--qr-bg)); flex: none; display: grid; grid-template-rows: 0.6rem 1fr; width: 2.6rem; height: 1.9rem; overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }
.mini-page .bar { border-bottom: 2px solid var(--brand-orange); }
.mini-page.light, .mini-page.light .bar { background: var(--mini-light); }
.mini-page.dark { background: var(--mini-dark); }
.mini-page.dark .bar { background: color-mix(in srgb, var(--mini-dark) 80%, var(--mini-light)); }
.mini-page.system { background: linear-gradient(135deg, var(--mini-light) 50%, var(--mini-dark) 50%); }
/* The Account page (`views::account`). */
.email-confirm-page { max-width: 34rem; }
.signup-form .setting-field { margin: var(--space-lg) 0; }

@media (max-width: 640px) {
  .seed-words, .seed-words.legacy { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* The store's Wallet section (`views::store_settings::wallet_section`):
   shown in place, a confirmation before a change, the history folded. */
.change-confirm { margin: var(--space-md) 0 0; padding: var(--space-md) var(--space-lg); border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--tint-neutral); }
.change-confirm h3 { margin: 0 0 var(--space-xs); }
.change-confirm p { margin: 0 0 var(--space-md); }
[data-disclosure="wallet-history"] { margin-top: var(--space-lg); }
[data-disclosure="wallet-history"] table { margin-top: var(--space-sm); }
[data-disclosure="wallet-history"] .num { text-align: right; }
[data-disclosure="wallet-history"] tr.current td { background: var(--tint-highlight); font-weight: 600; }

/* A retired wallet: its keys deleted, in the wallets list. */
.key-gone { flex: none; color: var(--ink); }
.keys-deleted { display: inline-flex; gap: var(--space-xs); align-items: center; }
[data-disclosure="retired-wallets"] { margin: var(--space-lg) 0; }

/* The wallets list (`views::wallets::list_section`): mainnet wallets
   under a head of their own, the test networks' folded in a dashed box,
   and on a phone each row a card (`.table-cards`). */
.net-section-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm) var(--space-md); margin-top: var(--space-xl); padding-bottom: var(--space-xs); border-bottom: 1px solid var(--line); }
.net-section-head h2 { margin: 0; border: 0; padding: 0; font-size: var(--text-lg); }
.net-section-head .hint { margin: 0; }
.test-wallets { margin: var(--space-lg) 0; border: 1px dashed var(--line-strong); border-radius: var(--radius-md); background: var(--paper-raised); }
.test-wallets > summary { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); padding: var(--space-sm) var(--space-md); border-radius: var(--radius-md); }
.test-wallets > summary:hover { background: var(--btn-hover-bg); }
.test-wallets[open] > summary { border-bottom: 1px dashed var(--line-strong); border-radius: var(--radius-md) var(--radius-md) 0 0; }
.test-wallets > div { padding: 0 var(--space-md) var(--space-sm); }
table[data-table="wallets"] .card-unit { display: none; }
.list-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-sm); margin-top: var(--space-lg); }
.list-foot p { margin: 0; }
@media (max-width: 640px) {
  table[data-table="wallets"] .card-unit { display: inline; }
}
/* A wallet's page (`views::wallets::detail_page`), one column: its name
   and network; where it lives; Stores, Details and History; Retire (or
   Restore) at the bottom, each opening a dialog. */
.wallet-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-sm); margin: 0 0 var(--space-lg); color: var(--muted); }
.where-banner { display: flex; gap: var(--space-md); align-items: flex-start; margin: var(--space-md) 0 var(--space-lg); padding: var(--space-md) var(--space-lg); border: 1px solid var(--card-border); border-radius: var(--radius-md); background: var(--card-bg); }
.where-banner.is-warn { background: var(--tint-warning); border-color: var(--warning); }
.where-banner p { margin: var(--space-xs) 0 0; }
.where-banner .app-logo { flex: none; border-radius: 22%; object-fit: contain; }
.where-glyph { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px dashed var(--line-strong); border-radius: 22%; color: var(--muted); }
.where-banner.is-warn .where-glyph { border: 1px solid var(--warning); color: var(--ink); }
.store-rows { list-style: none; margin: 0; padding: 0; }
.store-rows li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-xs) var(--space-md); padding: var(--space-sm) 0; border-top: 1px solid var(--line); }
.store-rows li:first-child { border-top: 0; padding-top: 0; }
.sr-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-sm); min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.sr-host { font-weight: 400; font-size: var(--text-sm); color: var(--muted); }
.sr-act { font-size: var(--text-sm); }
.store-rows.past li, .store-rows.past a { color: var(--muted); }
.store-rows.past .sr-name { font-weight: 400; }
.wallet-page .facts { margin: var(--space-lg) 0 0; }
[data-disclosure="history"] { margin: 0 0 var(--space-lg); }
[data-disclosure="history"] > summary { cursor: pointer; font-weight: 700; padding: var(--space-xs) 0; }
[data-disclosure="history"] .timeline { margin-top: var(--space-sm); }
.wallet-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-sm) var(--space-lg); margin-top: var(--space-xl); padding-top: var(--space-lg); border-top: 1px solid var(--line); }
.wallet-foot p { margin: var(--space-xs) 0 0; }
.confirm-dialog .setting-field, .confirm-dialog-page .setting-field { margin: var(--space-md) 0 0; }
.confirm-dialog .setting-field .setting-label-row, .confirm-dialog-page .setting-field .setting-label-row { margin: 0 0 var(--space-sm); }
.confirm-dialog .setting-field.first, .confirm-dialog-page .setting-field.first { margin-top: 0; }
/* A store's plugins (`views::store_site`): the Connections card, one row each. */
.int-rows { list-style: none; margin: 0; padding: 0; }
.int-rows li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-xs) var(--space-md); align-items: center; padding: var(--space-sm) 0; border-top: 1px solid var(--line); }
.int-rows li:first-child { border-top: 0; padding-top: 0; }
.int-rows .int-name { font-weight: 700; }
.int-rows .int-meta { display: block; color: var(--muted); font-size: var(--text-sm); overflow-wrap: anywhere; }
.int-rows.past .int-name { font-weight: 400; color: var(--muted); }
.int-rows.past .int-mark { opacity: .6; }
.int-mark { display: inline-flex; align-items: center; justify-content: center; width: 2.2rem; height: 2.2rem; flex: none; border-radius: var(--radius-md); background: var(--surface-sunken); color: var(--ink); }
.int-mark svg { width: 1.7rem; height: 1.3rem; }
.woo-bubble { fill: currentColor; }
.woo-text { fill: var(--paper-raised); font: 800 10.5px var(--font-ui); letter-spacing: -.03em; }
.tag-active { font-size: var(--text-xs); font-weight: 700; border: 1px solid var(--line-strong); border-radius: 999px; padding: var(--pill-pad-y) var(--pill-pad-x); color: var(--ink); }
@media (max-width: 640px) {
  .wallet-foot .mk-btn { flex-basis: 100%; text-align: center; }
  .int-rows li { grid-template-columns: auto minmax(0, 1fr); }
  .int-rows li > .mk-btn { grid-column: 1 / -1; text-align: center; }
}

/* A store's webhooks (views::webhooks): one per block, a health line, its
   deliveries folded under it; a delivery's detail as a dialog or a page. */
.wh { padding: var(--space-md) 0; border-top: 1px solid var(--card-border); }
.wh:first-child { padding-top: 0; border-top: 0; }
.wh-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); }
.wh-url { background: none; border: 0; padding: 0; overflow-wrap: anywhere; font-weight: 700; }
.wh-health { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-sm); margin: var(--space-xs) 0 var(--space-sm); }
.wh-health .hint { margin: 0; }
[data-table="deliveries"] { font-size: var(--text-sm); }
[data-table="deliveries"] td, [data-table="deliveries"] th { white-space: nowrap; }
.row-acts { text-align: right; }
/* Fixed slots: Details, then the Send again icon or an empty slot. */
.act-slots { display: grid; grid-template-columns: max-content 1.75rem; gap: var(--space-sm); align-items: center; justify-content: end; }
.act-slot { width: 1.75rem; }
/* "Send again" as an icon: a 28px target, the row's own height. */
.row-acts .icon-only { width: 1.75rem; height: 1.75rem; min-height: 0; }
[data-disclosure="deliveries"] { margin-top: var(--space-xs); }
[data-disclosure="deliveries"] > .table-scroll { margin-top: var(--space-sm); }
.mini-h { margin: var(--space-md) 0 var(--space-xs); font-size: var(--text-xs); font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
[data-disclosure="request"] { margin-top: var(--space-sm); }
[data-disclosure="request"] pre { margin: var(--space-xs) 0; font-size: var(--text-sm); white-space: pre-wrap; overflow-wrap: anywhere; }
/* A delivery's head: its title, then its status at the top right (beside
   the dialog's close button); on a phone the status goes under it. */
.event-name { font-family: var(--font-mono); font-weight: 600; font-size: var(--text-sm); overflow-wrap: anywhere; }
[data-facts="delivery"] { margin: 0 0 var(--space-lg); }
[data-facts="delivery"] dd { font-weight: 400; }
[data-facts="delivery"] .endpoint { font-family: var(--font-mono); font-size: var(--text-sm); }
[data-facts="delivery"] + .mini-h { margin-top: 0; }
.deliveries-page { margin: var(--space-lg) 0; }
@media (max-width: 640px) {
  /* A delivery on a phone is a compact two-column card, not a tall list. */
  table[data-table="deliveries"] tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 var(--space-md); }
  table[data-table="deliveries"] td.row-acts { grid-column: 1 / -1; text-align: left; }
  table[data-table="deliveries"] .act-slots { justify-content: start; }
  [data-table="deliveries"] td, [data-table="deliveries"] th { white-space: normal; }
}

/* On the settings page it sits at the right edge, where the other controls
   end, its word before it. */
.setting-field .switch { display: flex; width: fit-content; margin-left: auto; }
/* The theme form navigates to a freshly rendered page. A named cross-document
   view transition (the theme switch names its thumb, `ui`) carries the old
   indicator to its new position, with no script or delay before form
   submission. */
@view-transition { navigation: auto; }
:root { view-transition-name: none; }

/* A cell with nothing in it (views::no_reference): a dash in a table, words
   on a phone's card. */
.no-value-card { display: none; }
@media (max-width: 640px) {
  .table-cards .no-value-table { display: none; }
  .table-cards .no-value-card { display: inline; }
}

/* The live view is for a big screen: a phone doesn't offer it. */
@media (max-width: 640px) {
  [data-watch-live] { display: none; }
}
