/* The cloud's own stylesheet (brindola-pos docs/52 §6). It only uses what site.css
 * defines — the app's tokens, FiraGO — and it mirrors the site's site.css
 * where the two draw the same thing: the charcoal header with the gold
 * wordmark, the card with its keyline, the two buttons, the reading measure.
 *
 * Two rules stand over everything here, the site's own (docs/53 §8.2):
 *   - every rule is LOGICAL — margin-inline, padding-inline, inset-inline,
 *     text-align: start; never left/right — so Arabic needs no patch;
 *   - no letter-spacing and no upper-casing transform, which break shaping.
 *
 * And one of this repo's: the primary viewer is the till's iframe at
 * 1024 × 600 on a venue's Wi-Fi (docs/52 §6). Nothing here assumes a mouse,
 * a wide window or a second request beyond the fonts.
 */

:root {
  color-scheme: light dark;
  --font-sans: "Manrope", "FiraGO", system-ui, sans-serif;
  --line-height-text: 1.5;

  /* The charcoal band and the terracotta, the site's values (site.css of
     brindola-site; docs/63 §2.6 owns them — the amber before 2026-09-10).
     `--accent` is the tint and draws; `--accent-text` is the ink and is the
     only one that carries words. */
  --ink: #2a2e2b;
  --ink-2: #242826;
  --ink-fg: #f7f4ee;
  --ink-fg-muted: #b3b0a8;
  --ink-line: #3f4441;
  --accent: #b97b5a;
  --accent-text: #9a5e43;

  --radius: 0.625rem;
  --measure: 42rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --accent-text: #d6a287;
  }
}
:root:lang(ar),
:root:lang(he) {
  --line-height-text: 1.7;
}

* {
  box-sizing: border-box;
}
html {
  font-family: var(--font-sans);
  background-color: var(--color-app-bg);
  color: var(--color-fg);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-size: 1rem;
  line-height: var(--line-height-text);
  text-align: start;
  min-block-size: 100dvh;
  display: flex;
  flex-direction: column;
}
body > main {
  flex: 1 0 auto;
}
a {
  color: inherit;
}

/* ---------------------------------------------------------------- header */

.top {
  background-color: var(--ink);
  color: var(--ink-fg);
  border-block-end: 1px solid var(--ink-line);
}
.top .bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.875rem;
  padding-block: 0.625rem;
}
.top a {
  color: var(--ink-fg);
  text-decoration: none;
  font-size: 0.9375rem;
}
.top a:hover {
  text-decoration: underline;
}
.wordmark {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}
.wordmark img {
  display: block;
  block-size: 1.25rem; /* the horizontal lockup, as on the site (2026-09-10) */
  inline-size: auto;
}
.wordmark .label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-fg-muted);
  padding-inline-start: 0.75rem;
  border-inline-start: 1px solid var(--ink-line);
}
.top .env {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink);
  background-color: var(--accent);
  border-radius: 999px;
  padding-inline: 0.5rem;
  padding-block: 0.125rem;
}
.top .who {
  margin-inline-start: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--ink-fg-muted);
}
.top .who form {
  display: inline;
}
.top .who button,
.top .who a.button {
  min-block-size: 36px;
  padding-block: 0.375rem;
  padding-inline: 0.875rem;
  font-size: 0.875rem;
  color: var(--ink-fg);
  border-color: var(--ink-line);
  background: none;
}

/* ---------------------------------------------------------------- layout */

.bar {
  inline-size: min(64rem, 100% - 2rem);
  margin-inline: auto;
}
main.bar {
  padding-block: 1.5rem 2.5rem;
}
h1 {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 1.875rem);
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
  margin-block: 0 1.25rem;
}
h2 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.2;
  margin-block: 0 0.5rem;
}
p {
  margin-block: 0 0.75rem;
  max-inline-size: var(--measure);
}
.muted {
  color: var(--color-fg-muted);
}
.small {
  font-size: 0.875rem;
}
/* The one line under a page heading that says what the page is for. */
.lead {
  color: var(--color-fg-muted);
  font-size: 1.0625rem;
  margin-block: -0.5rem 1.25rem;
}

/* A card, as on the site: the surface, the border, the radius; the amber only
   as the rule above it. */
.card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-block-end: 1rem;
}
.card > :last-child {
  margin-block-end: 0;
}
.card-keyline {
  border-block-start: 3px solid var(--accent);
}
.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  margin-block-end: 1rem;
}
.cards .card {
  margin-block-end: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.cards .card p {
  margin: 0;
}
.cards .actions {
  margin-block-start: auto;
  padding-block-start: 0.5rem;
}
.two {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  align-items: start;
}
@media (max-width: 40rem) {
  .two {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The install code, the way a person reads it aloud. It is always Latin and
   always left-to-right, whatever the page's language — the markup wraps it in
   <bdi dir="ltr">, so the paragraph itself still aligns with the page. */
.code {
  font-family: ui-monospace, "FiraGO", monospace;
  font-size: 1.25rem;
  font-weight: 600;
}

/* Status words. The amber is the brand and never a warning (docs/53 §8.1);
   trouble is said in words and in the app's status colours. */
.ok {
  color: var(--color-status-ok-fg, #15803d);
}
.warn {
  color: var(--color-status-warn-fg, #b45309);
}
.danger {
  color: var(--color-status-danger-fg, #b91c1c);
}
.notice {
  border-inline-start: 4px solid var(--accent);
  padding-block: 0.5rem;
  padding-inline: 0.875rem;
  background-color: var(--color-surface);
  margin-block-end: 1rem;
}
.dev {
  border: 1px dashed var(--accent);
  color: var(--accent-text);
  padding-block: 0.5rem;
  padding-inline: 0.875rem;
  border-radius: var(--radius);
  margin-block-end: 1rem;
  font-size: 0.875rem;
}

/* ----------------------------------------------------------------- forms */

label {
  display: block;
  margin-block: 0.75rem 0.25rem;
  font-size: 0.875rem;
  color: var(--color-fg-muted);
}
input,
select {
  font: inherit;
  color: var(--color-fg);
  background-color: var(--color-bg-base);
  border: 1px solid var(--color-border-strong);
  border-radius: calc(var(--radius) - 0.125rem);
  padding-block: 0.6rem;
  padding-inline: 0.75rem;
  min-block-size: 44px;
  inline-size: 100%;
  max-inline-size: 26rem;
}
input:focus-visible,
select:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
input[type="checkbox"],
input[type="radio"] {
  inline-size: auto;
  min-block-size: 0;
  margin-inline-end: 0.4rem;
}
input.short {
  max-inline-size: 8rem;
}
input[inputmode="numeric"] {
  font-size: 1.5rem;
  font-weight: 600;
  max-inline-size: 12rem;
}
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: end;
}
.row > * {
  flex: 1 1 12rem;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
  margin-block: 1rem 0;
}
.check {
  display: inline-flex;
  align-items: center;
  margin-inline-end: 1rem;
  margin-block: 0.25rem;
  color: var(--color-fg);
}

/* The two buttons, the site's. */
button,
.button {
  font: inherit;
  font-weight: 600;
  font-size: 0.9375rem;
  min-block-size: 44px;
  padding-inline: 1.375rem;
  padding-block: 0.6875rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background-color: var(--color-fg);
  color: var(--color-app-bg);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
button.secondary,
.button.secondary {
  background: none;
  border-color: var(--color-border-strong);
  color: var(--color-fg);
}
@media (hover: hover) {
  button:hover,
  .button:hover {
    text-decoration: underline;
  }
}

/* --------------------------------------------------------------- tables */

table {
  border-collapse: collapse;
  inline-size: 100%;
  font-size: 0.9375rem;
}
td,
th {
  text-align: start;
  padding-block: 0.5rem;
  padding-inline: 0.5rem;
  border-block-end: 1px solid var(--color-border);
  vertical-align: top;
}
th {
  font-weight: 600;
  color: var(--color-fg-muted);
  font-size: 0.8125rem;
}
.scroll {
  overflow-x: auto;
}
pre {
  white-space: pre-wrap;
  word-break: break-all;
  background-color: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  padding: 0.75rem;
  border-radius: var(--radius);
  font-size: 0.8125rem;
}

/* The QR that hands the frame to the owner's phone (docs/52 §4, §6). */
.qr {
  /* A grid, not a block: the SVG's percentage height does not resolve
     against an aspect-ratio box in WebKit and it sat at the top (Roger,
     2026-09-07); centred, and sized by its own aspect ratio instead. */
  display: grid;
  place-items: center;
  inline-size: min(100%, 11rem);
  aspect-ratio: 1;
  box-sizing: border-box;
  margin-block: 0.5rem 0.75rem;
  background: #fff;
  padding: 0.5rem;
  border-radius: calc(var(--radius) - 0.125rem);
  border: 1px solid var(--color-border);
}
.qr svg {
  display: block;
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 1;
}

/* ---------------------------------------------------------------- footer */

.foot {
  border-block-start: 1px solid var(--color-border);
  color: var(--color-fg-muted);
  font-size: 0.8125rem;
}
.foot .bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-items: center;
  padding-block: 0.875rem;
}
.foot a {
  color: inherit;
}
/* The site's legal pages, the labels the site's own footer uses. */
.foot .legal {
  display: inline-flex;
  gap: 0.75rem;
}
/* The language switcher: a select and a button, fed from the registry. */
.foot .lang {
  margin-inline-start: auto;
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
}
.foot .lang select,
.foot .lang button {
  min-block-size: 36px;
  padding-block: 0.25rem;
  font-size: 0.8125rem;
  inline-size: auto;
}
.foot .lang button {
  padding-inline: 0.75rem;
}

/* The tier chooser (docs/52 §6 item 1): three cards, the price large. */
.price {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.1;
}
.price small {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--color-fg-muted);
}
.toggle {
  display: inline-flex;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius);
  padding: 0.25rem;
  gap: 0.25rem;
  margin-block-end: 1rem;
}
.toggle a {
  text-decoration: none;
  padding-inline: 0.875rem;
  padding-block: 0.375rem;
  border-radius: calc(var(--radius) - 0.25rem);
  font-weight: 600;
  font-size: 0.875rem;
}
.toggle a[aria-current="true"] {
  background-color: var(--color-fg);
  color: var(--color-app-bg);
}
.visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.foot .region {
  white-space: nowrap;
}

h2 .rename {
  font-weight: 400;
  margin-inline-start: 0.5rem;
  color: var(--color-fg-muted);
}

/* The menu: the account's sections on the bar, the current one underlined in the amber as on the site. */
.top .menu ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.top .menu a {
  display: inline-flex;
  align-items: center;
  min-block-size: 40px;
  padding-inline: 0.625rem;
  border-radius: 999px;
  font-size: 0.875rem;
  white-space: nowrap;
}
.top .menu a:hover {
  text-decoration: none;
  background-color: var(--ink-2);
}
.top .menu a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.4em;
}

.top a.label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-fg-muted);
  padding-inline-start: 0.75rem;
  border-inline-start: 1px solid var(--ink-line);
}

/* Ops: its own menu under the title, the filter row, the pager. */
.subnav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  list-style: none;
  margin: -0.5rem 0 1rem;
  padding: 0;
}
.subnav a {
  display: inline-flex;
  align-items: center;
  min-block-size: 36px;
  padding-inline: 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--color-border-strong);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
}
.subnav a[aria-current="page"] {
  background-color: var(--color-fg);
  color: var(--color-app-bg);
  border-color: transparent;
}
.filters .row > div {
  flex: 1 1 10rem;
}
.filters .row > div:first-child {
  flex: 3 1 18rem;
}
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-block-start: 1rem;
}
.pager span {
  margin-inline-end: auto;
}
th a {
  text-decoration: none;
}

.actions form {
  display: contents;
}

.terms {
  padding-inline-start: 1.25rem;
}
.terms li {
  margin-block: 0.5rem;
}

/* The venue list is a stack, not a grid (Roger, 2026-09-07): a venue card has many lines and is read, not compared. */
.stack {
  display: grid;
  gap: 1rem;
  margin-block-end: 1rem;
}
.stack .card {
  margin-block-end: 0;
}

/* A venue row in the list: a native accordion — name, code and the licence word closed, the rest behind. */
.fold {
  padding: 0;
}
.fold > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  list-style: none;
}
.fold > summary::-webkit-details-marker {
  display: none;
}
.fold > summary::before {
  content: "";
  inline-size: 0.5rem;
  block-size: 0.5rem;
  border-inline-end: 2px solid currentColor;
  border-block-end: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.15s;
  flex: none;
  align-self: center;
}
[dir="rtl"] .fold > summary::before {
  transform: rotate(135deg);
}
.fold[open] > summary::before {
  transform: rotate(45deg);
}
.fold-name {
  font-weight: 600;
  flex: 1 1 12rem;
}
.fold > summary .code {
  font-size: inherit;
  margin: 0;
}
.fold-state {
  flex: none;
}
.fold-body {
  padding: 0 1.25rem 1.25rem;
  border-block-start: 1px solid var(--color-border);
  padding-block-start: 0.75rem;
}
.tag {
  font-size: 0.8em;
  font-weight: 500;
  padding: 0.1em 0.5em;
  border-radius: 999px;
  background: var(--accent);
  color: #1a1206;
  margin-inline-start: 0.25rem;
  vertical-align: middle;
}
/* The tag must read as a badge in the till's WebKit too: explicit colours, no inheritance. */
.fold .tag {
  display: inline-block;
  background-color: var(--accent);
  color: #1a1206;
  border: 1px solid var(--accent);
}

/* The meter's chart: bars in the accent, the month in progress outlined. */
.chart {
  margin-block: 0.5rem 0.25rem;
  max-inline-size: 40rem;
}
.chart svg {
  display: block;
  inline-size: 100%;
  block-size: auto;
}
.chart .axis {
  stroke: var(--color-border);
  stroke-width: 1;
}
.chart .bar.counted {
  fill: var(--accent);
}
.chart .bar.live {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: 4 3;
}
.chart .bar.empty {
  fill: var(--color-border);
}
.chart .m.now {
  fill: var(--color-fg);
  font-weight: 600;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin-block: 0 0.75rem;
}
.legend .sw {
  display: inline-block;
  inline-size: 0.8rem;
  block-size: 0.8rem;
  border-radius: 2px;
  margin-inline-end: 0.35rem;
  vertical-align: -0.1em;
}
.legend .sw.counted {
  background: var(--accent);
}
.legend .sw.live {
  border: 2px dashed var(--accent);
  box-sizing: border-box;
}
.legend .sw.empty {
  background: var(--color-border);
}
.chart .n {
  font-size: 12px;
  fill: var(--color-fg);
}
.chart .m {
  font-size: 11px;
  fill: var(--color-fg-muted);
}

button.small,
.button.small {
  font-size: 0.85em;
  min-block-size: 0;
  padding: 0.25rem 0.6rem;
}
table form {
  display: inline;
}

/* A choice among radios: one per line, the input beside the words, not styled as a text field. */
.check.choice {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-inline-end: 0;
}
.check.choice input {
  margin-block-start: 0.3rem;
  padding: 0;
}

/* Selects look like our inputs everywhere, with our own chevron (WebKitGTK drew the OS menu button over the border). */
select {
  appearance: none;
  -webkit-appearance: none;
  padding-inline-end: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23888' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 12px 8px;
}
[dir="rtl"] select {
  background-position: left 0.75rem center;
}
/* Controls inside a table row sit on one line at a smaller height. */
td .row {
  align-items: center;
  gap: 0.5rem;
}
td .row > * {
  flex: 0 1 auto;
}
td select,
td input {
  min-block-size: 36px;
  padding-block: 0.3rem;
  inline-size: auto;
  min-inline-size: 11rem;
}
td .row label {
  display: none;
}
/* A platform's mark beside its name. */
td.platform {
  white-space: nowrap;
}
.mark {
  display: inline-block;
  block-size: 1.375rem;
  inline-size: calc(1.375rem * var(--ratio, 3));
  vertical-align: middle;
  color: var(--color-fg);
}
.mark svg {
  display: block;
  inline-size: 100%;
  block-size: 100%;
}

/* Rows with marks and buttons align on the middle; the action column hugs the end. */
td {
  vertical-align: middle;
}
/* A row's action sits at the end of its cell, a link the same as a form. */
td:last-child form:not(.row) {
  display: flex;
  justify-content: flex-end;
}
td:last-child > a.button {
  float: inline-end;
}
td:last-child form:not(.row) > label,
td:last-child form:not(.row) > input,
td:last-child form:not(.row) > p {
  flex: 1 1 100%;
}
td:last-child form:not(.row) {
  flex-wrap: wrap;
}

/* Values to copy into another site's form: label over value, the value selectable as one line. */
.copy {
  margin: 0.5rem 0;
}
.copy dt {
  font-size: 0.8125rem;
  color: var(--color-fg-muted);
  margin-block-start: 0.4rem;
}
.copy dd {
  margin: 0.1rem 0 0;
}
.copy code {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-bg-base);
  user-select: all;
  white-space: normal;
}

/* ------------------------------------------------------------- dialogs */
/* A card that opens over the page (Roger, 2026-09-07: the platform's
   how-to and the credential pair as a modal, not a section under the table). */
dialog.modal {
  inline-size: min(100% - 2rem, 34rem);
  max-block-size: min(100% - 2rem, 90vh);
  overflow: auto;
  padding: 1.25rem;
  margin: auto;
  background-color: var(--color-surface);
  color: var(--color-fg);
  border: 1px solid var(--color-border);
  border-block-start: 3px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: 0 1rem 3rem rgb(0 0 0 / 0.25);
}
dialog.modal::backdrop {
  background: rgb(20 17 15 / 0.55);
}
dialog.modal > :first-child {
  margin-block-start: 0;
}
dialog.modal > :last-child {
  margin-block-end: 0;
}
/* Without script the dialog is not modal; keep it in the flow as a card. */
dialog.modal[open]:not(:modal) {
  position: static;
  margin-block: 1rem;
}
/* Paddle's inline checkout (public/paddle-inline.js): its iframe fills the card's width. */
.paddle-checkout {
  margin-block: 1rem;
}
.paddle-checkout iframe {
  width: 100% !important;
  min-height: 450px;
}
