/* Ambar-specific styling. Deliberately small: awp-admin.css is the source of
 * truth, and a rule here is one that will not follow the design system. */

/* The design system's `.tbl th { text-align:left }` outranks `.num`. */
.tbl th.num { text-align: right; }
.tbl td.num input { text-align: right; }

/* The voucher line editor: controls fill their cells, the picker's dropdown
 * escapes the card's scroll clipping. */
.lines select, .lines input { width: 100%; }
.lines .affix .unit { min-width: 2.6em; justify-content: center; }
.lines .ts-wrapper { width: 100%; min-width: 200px; }
.lines .scroll, .card .scroll:has(.lines) { overflow: visible; }
.lines td { vertical-align: top; }
.lines .sub-line { display: block; margin-top: 2px; }

/* Stacked rows on a phone: a two-line cell (name + small print) takes its
 * label as a column spanning both lines. */
@media (max-width: 560px) {
  .tbl-stack td[data-label]:has(> div) { display: grid; grid-template-columns: 38% 1fr; gap: 2px var(--sp-3); }
  .tbl-stack td[data-label]:has(> div)::before { grid-column: 1; grid-row: 1 / span 2; }
  .tbl-stack td[data-label]:has(> div) > * { grid-column: 2; }
}

/* Totals block on a voucher form and view. */
.totals { display: grid; grid-template-columns: 1fr auto; gap: 4px 24px; justify-content: end; max-width: 360px; margin-left: auto; }
.totals b.grand { font-size: 1.15rem; }
.totals .sub { text-align: right; }

/* Planner sheets: a picture per design; a ticked tile is the pick, an unticked one fades. */
tr.muted td { opacity: .55; }
tr.muted td:first-child, tr.muted td:last-child { opacity: 1; }
.text-danger { color: var(--danger, #dc2626); }
.gallery .tile.pick { border-color: var(--ok); }
.gallery .tile.pick .body b a { color: inherit; }
.gallery .tile.pick .ctl { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.gallery .tile.pick .ctl.one { grid-template-columns: 1fr auto; align-items: stretch; }
.gallery .tile.pick .ctl label { display: block; min-width: 0; }
.gallery .tile.pick .ctl input { width: 100%; min-width: 0; }
.gallery .tile.pick .ctl .btn { height: auto; align-self: stretch; padding: 0 12px; }
.gallery .tile.pick .ctl .sub { display: block; margin-bottom: 2px; }
/* The browser: a design's tile says how it sells; one already on the sheet is marked. */
.gallery .tile.browse { cursor: pointer; }
.gallery .tile.browse.in { border-color: var(--ok); }
.gallery .tile.browse .add { display: grid; grid-template-columns: 72px 1fr; gap: 6px; margin-top: 8px; }
.gallery .tile.browse .add input { width: 100%; min-width: 0; }
.gallery .tile.browse .age { position: absolute; top: 8px; left: 8px; }
.gallery .tile.browse { position: relative; }

/* Barcode thumbnails in the inventory list. */
.thumb { width: 40px; height: 40px; border-radius: var(--r-sm); object-fit: cover; background: var(--sunken); display: inline-block; }
.thumb-lg { width: 120px; height: 120px; border-radius: var(--r); object-fit: cover; background: var(--sunken); }

/* Print template column editor. */
.colrows li { display: grid; grid-template-columns: 24px 1fr 1fr 90px; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.colrows .grip { cursor: grab; color: var(--faint); }

/* Label editor. */
.label-editor { display: grid; grid-template-columns: 220px 1fr 260px; gap: var(--sp-4); align-items: start; }
.label-editor .canvas-wrap { background: var(--sunken); padding: var(--sp-5); border-radius: var(--r); overflow: auto; display: flex; justify-content: center; }
.label-editor .canvas-container { background: #fff; }   /* not the canvases: fabric's upper canvas must stay transparent */
.label-editor .tools .btn { justify-content: flex-start; width: 100%; }
@media (max-width: 1100px) { .label-editor { grid-template-columns: 1fr; } }

/* Debit/credit columns in the GL table read as a pair. */
.gl td.num { font-variant-numeric: tabular-nums; }

/* Report galleries: photos of pieces. */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--sp-3); align-items: stretch; }
.gallery .tile { height: 100%; }
.gallery .tile, .gallery .card + .card { margin: 0; padding: 0; overflow: hidden; color: inherit; text-decoration: none; display: flex; flex-direction: column; }
.gallery .tile .sub { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gallery .tile img, .gallery .tile .noimg { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: var(--sunken); display: grid; place-items: center; color: var(--faint); font-size: 2rem; }
.gallery .tile .body { padding: 10px 12px; }
.tabs { white-space: nowrap; }

/* Dashboards: two charts to a row, a full-width one on its own. */
.dash { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
.dash .chart.full { grid-column: 1 / -1; }
.dash .chart { min-width: 0; }
@media (max-width: 900px) { .dash { grid-template-columns: 1fr; } }

/* KPI tiles and rank rows that drill down. */
a.kpi { text-decoration: none; color: inherit; display: block; }
a.kpi:hover { border-color: var(--primary); }
.rank li[data-row-href] { cursor: pointer; }
.rank .name a { color: inherit; text-decoration: none; }
.rank li:hover .name a { text-decoration: underline; }

/* The apps registry: colour tile, name, kind, blurb. */
.app-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.gallery a.card.app-tile { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: start; margin: 0; padding: 16px; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.gallery a.card.app-tile:hover { border-color: var(--app); transform: translateY(-1px); }
.app-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--app); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.7rem; box-shadow: 0 6px 16px color-mix(in srgb, var(--app) 35%, transparent); }
.app-body { min-width: 0; }
.app-body > b { font-size: 1.05rem; margin-right: 8px; }
.app-body > .sub { display: block; margin-top: 4px; line-height: 1.4; }
.app-open { color: var(--muted); font-size: 1.1rem; }

/* Files on a voucher or package: square tiles, the name under, remove in the corner. */
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin-top: 12px; }
.att { position: relative; min-width: 0; }
.att-thumb { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 100%; aspect-ratio: 1 / 1; min-height: 120px; border-radius: 10px; background: var(--sunken, #eef0f4); overflow: hidden; color: var(--muted); font-size: 2rem; text-decoration: none; border: 1px solid var(--line); box-sizing: border-box; }
.att-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att-thumb span { font-size: .7rem; font-weight: 700; letter-spacing: .06em; }
.att-meta { margin-top: 6px; line-height: 1.3; }
.att-meta b { display: block; font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-meta .sub { display: block; font-size: .7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-x { position: absolute; top: 6px; right: 6px; margin: 0; }
.att-x button { width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 1rem; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .15s; }
.att:hover .att-x button, .att-x button:focus-visible { opacity: 1; }
@media (hover: none) { .att-x button { opacity: 1; } }
.att-kind { position: absolute; left: 6px; top: 6px; font-size: .65rem; padding: 2px 6px; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; }

/* By-category reports: a row that opens the level below it. */
.tbl-tree tr.opens { cursor: pointer; }
.tbl-tree .twist { display: inline-flex; width: 1em; color: var(--faint); vertical-align: -2px; }
.tbl-tree .twist i { transition: transform .12s; }
.tbl-tree tr[aria-expanded="true"] > td .twist i { transform: rotate(90deg); }

/* The inbox: conversations on the left, the thread in the middle (the design system's
   .thread/.msg/.bubble), the customer on the right once one is open. It owns the height
   under the top bar; the list and the thread scroll inside. Colours come from the theme
   tokens, so dark mode holds. */
.inbox { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: var(--sp-4); align-items: stretch; height: calc(100dvh - 150px); min-height: 480px; }
.inbox.with-side { grid-template-columns: minmax(280px, 340px) minmax(0, 1fr) minmax(240px, 300px); }
.inbox > .card, .inbox > .stack { margin: 0; min-height: 0; }
.inbox-list { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.inbox-list .toolbar { padding: var(--sp-3) var(--sp-4); margin: 0; border-bottom: 1px solid var(--line); gap: var(--sp-2); flex: none; }
.inbox-list .convos { flex: 1; min-height: 0; overflow-y: auto; }
.convo { display: flex; gap: var(--sp-3); align-items: center; padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line-soft); color: inherit; text-decoration: none; }
.convo:hover { background: var(--sunken); text-decoration: none; }
.convo.on { background: var(--brand-wash); }
.convo .grow { flex: 1; min-width: 0; }
.convo b, .convo .sub { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.convo b { font-size: var(--fs-md); }
.convo.unread b { font-weight: 800; }
.convo .when { font-size: var(--fs-xs); color: var(--faint); white-space: nowrap; align-self: flex-start; text-align: right; }
.convo .count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-full); background: var(--brand); color: var(--on-brand); font-size: 10px; font-weight: 800; display: inline-grid; place-items: center; }
.avatar.ch { position: relative; overflow: visible; }
.avatar.ch i { position: absolute; right: -4px; bottom: -4px; font-size: .8rem; line-height: 1; background: var(--surface); border-radius: 50%; padding: 2px; }
.avatar.ch i.whatsapp { color: #25d366; } .avatar.ch i.instagram { color: #e1306c; }
.inbox-thread { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.inbox-thread .empty { margin: auto; }
.inbox-thread > .card-head { padding: var(--sp-3) var(--sp-4); margin: 0; border-bottom: 1px solid var(--line); flex-wrap: nowrap; flex: none; }
.inbox-thread .thread { flex: 1; min-height: 0; overflow-y: auto; padding: var(--sp-4) var(--sp-5); }
.inbox-thread .msg { max-width: 70%; }
.inbox-thread .msg .bubble { max-width: 100%; }
.inbox-thread .msg.tpl .bubble { border: 1px dashed var(--line); }
.inbox-thread .msg .text { white-space: pre-wrap; word-break: break-word; }
.inbox-thread .msg img, .inbox-thread .msg video { max-width: 320px; border-radius: var(--r-sm); display: block; margin-bottom: var(--sp-2); }
.inbox-thread .msg time .read { color: var(--brand); } .inbox-thread .msg time .failed { color: var(--danger); }
.compose { display: flex; gap: var(--sp-2); align-items: flex-end; padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--line); flex: none; }
.compose textarea { flex: 1; min-height: var(--ctl-h); resize: vertical; }
.inbox-side { overflow-y: auto; }
.wa-preview { background: var(--sunken); border-radius: var(--r); padding: var(--sp-3); }
.wa-preview pre { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r-sm); padding: var(--sp-3) var(--sp-4); white-space: pre-wrap; font-family: inherit; margin: 0; }
.inbox-back, .inbox-who { display: none; }
/* Tablet: list and thread; the customer lives in a drawer behind Details. */
@media (max-width: 1280px) { .inbox.with-side { grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); } .inbox-side { display: none; } .inbox-who { display: inline-flex; } }
/* Phone: one screen at a time. The list, or the thread with a way back. */
@media (max-width: 860px) {
  .inbox, .inbox.with-side { grid-template-columns: 1fr; height: calc(100dvh - 118px); min-height: 0; }
  .inbox.with-side .inbox-list, .inbox:not(.with-side) .inbox-thread { display: none; }
  .page-head .chip.mode { display: none; }
  .inbox-back { display: inline-flex; }
  .inbox-thread > .card-head { gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); }
  .inbox-thread > .card-head h3 { font-size: var(--fs-md); }
  .inbox-thread .thread { padding: var(--sp-3); }
  .inbox-thread .msg { max-width: 88%; }
  .inbox-list .toolbar .search { flex: 1 1 100%; }
  .compose { padding: var(--sp-2) var(--sp-3); }
  .compose textarea { min-height: 40px; }
  .compose .btn span, .compose .btn.btn-primary i + span { display: none; }
}

/* The shop's screens. The storefront itself is themed by store.css. */
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 4px; vertical-align: -1px; border: 1px solid rgba(0,0,0,.15); }
.no-swatch .sw-col { display: none; }
/* Categories nest, so each row carries the list of its children under it. */
.cat-list > li { display: block; padding: 0; }
.cat-list > li > .cat-row { padding: 10px 0; align-items: center; gap: var(--sp-3); }
.cat-children { margin: 0 0 4px 34px; padding-left: 14px; border-left: 2px solid var(--line); min-height: 10px; }
.cat-children:empty { min-height: 16px; border-left-style: dashed; }
.cat-list .sortable-ghost { opacity: .4; }
.cat-list .sortable-drag { background: var(--surface); box-shadow: 0 8px 24px rgba(0,0,0,.15); border-radius: var(--r); }
/* Appearance: the form on the left, the shop itself in a frame on the right. */
.appearance { display: grid; grid-template-columns: minmax(340px, 440px) minmax(0, 1fr); gap: var(--sp-5); align-items: start; }
/* One shape control per row, each filling the column: five options split evenly
   across the full width rather than wrapping a lone pill onto a second line. */
.appearance .segmented-block { flex-wrap: nowrap; }
.appearance .preview-pane { position: sticky; top: 70px; }
.preview-frame { background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r); padding: var(--sp-3); display: flex; justify-content: center; }
.preview-frame iframe { width: 100%; max-width: 100%; height: calc(100vh - 190px); border: 0; background: #fff; border-radius: var(--r-sm); transition: width .2s; }
@media (max-width: 1100px) { .appearance { grid-template-columns: 1fr; } .appearance .preview-pane { position: static; } }
/* A slide, roughly, beside the form that builds it. */
.slide-preview { position: relative; aspect-ratio: 16 / 9; background-size: cover; background-position: center; background-color: var(--sunken); border-radius: var(--r); overflow: hidden; display: flex; padding: 8%; }
.slide-preview::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,var(--o, .35)); }
.slide-preview .sp-text { position: relative; max-width: 60%; }
.slide-preview b { display: block; font-size: 1.3rem; color: var(--h); line-height: 1.15; }
.slide-preview p { color: var(--t); font-size: .8rem; margin: 6px 0 10px; }
.slide-preview .sp-btn { display: inline-block; background: var(--bb); color: var(--bc); font-size: .75rem; font-weight: 600; padding: 6px 12px; border-radius: 6px; }
.slide-preview.pos-top-left { align-items: flex-start; justify-content: flex-start; }
.slide-preview.pos-top-center { align-items: flex-start; justify-content: center; text-align: center; }
.slide-preview.pos-top-right { align-items: flex-start; justify-content: flex-end; text-align: right; }
.slide-preview.pos-center-left { align-items: center; justify-content: flex-start; }
.slide-preview.pos-center { align-items: center; justify-content: center; text-align: center; }
.slide-preview.pos-center-right { align-items: center; justify-content: flex-end; text-align: right; }
.slide-preview.pos-bottom-left { align-items: flex-end; justify-content: flex-start; }
.slide-preview.pos-bottom-center { align-items: flex-end; justify-content: center; text-align: center; }
.slide-preview.pos-bottom-right { align-items: flex-end; justify-content: flex-end; text-align: right; }

/* The shop's product gallery: the design system's .shot is one picture in a
   field, this is a grid of them that reorders by drag. */
.thumb-blank { display: inline-grid; place-items: center; color: var(--muted); }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-3); }
.shots figure { position: relative; margin: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--sunken); }
.shots figure img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.shots .shot-flag { position: absolute; top: var(--sp-2); left: var(--sp-2); }
.shots figcaption { display: flex; align-items: center; gap: 4px; padding: var(--sp-2); }
.shots figcaption input { height: 30px; font-size: var(--fs-sm); padding: 0 var(--sp-2); min-width: 0; }
.choice .swatch, .chip .swatch { width: 12px; height: 12px; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: -1px; flex: none; }
/* An attribute's values under its name: chips wrap, and .list's tight line height
   would otherwise have them touching. */
.vals { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* The preset picker: a swatch trio and the preset's own heading face, so the
   choice is made by looking rather than by reading thirty names. */
.preset-group { margin: var(--sp-4) 0 var(--sp-2); font-size: var(--fs-xs); font-weight: 700;
                text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.preset-group:first-of-type { margin-top: var(--sp-2); }
/* Scoped to this screen: .presets is a design-system class, a wrapping row of
   small chips, and the report filter bar uses it as one. Redefining it here as
   a card grid laid the period shortcuts out two to a column. */
.appearance .presets { display: grid; gap: var(--sp-2); grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.appearance .presets .preset { display: flex; flex-direction: column; gap: 6px; padding: var(--sp-2); cursor: pointer;
                   background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-align: left; }
.appearance .presets .preset:hover { border-color: var(--brand); }
.appearance .presets .preset[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-wash); }
.preset-chip { display: flex; gap: 3px; align-items: center; padding: 7px 8px; border-radius: var(--r-sm);
               border: 1px solid var(--line); }
.preset-chip i { width: 14px; height: 14px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.preset-name, .preset-font { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.preset-name { font-size: var(--fs-sm); font-weight: 600; color: var(--ink); }
.preset-font { font-size: var(--fs-xs); color: var(--muted); margin-top: -4px; }

/* A product sold one way answers the stock question on the product, in the
   sidebar card — so the column that asks it again comes off the table. */
#variants.one-line .stock-col { display: none; }
.stock-cell .link-stock { max-width: 100%; }
.stock-cell .have { display: block; margin-top: 2px; }

/* The rule builder shared by coupons and combo offers. */
.rule-group { border: 1px solid var(--line); border-radius: var(--r); padding: var(--sp-4); background: var(--surface); }
.rule-group + .rule-group { margin-top: var(--sp-3); }
.rule-row { display: flex; align-items: flex-start; gap: var(--sp-2);
            padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm); background: var(--sunken); }
/* The controls wrap; the remove button does not go with them, so it stays on the
   row's first line however many lines the conditions take. */
.rule-bits { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.rule-row > .btn { flex: none; }
.rule-row .check { margin: 0; white-space: nowrap; }
.rule-blurb { flex-basis: 100%; }

/* A .field sets display:flex, which out-ranks the browser's own [hidden] rule at
   equal specificity — so a field hidden by script stayed on screen. */
[hidden] { display: none !important; }

/* Two switches in a row are two settings, not one sentence: .switch is
   inline-flex, so a stack of them needs to be told to break the line. */
.stack > .switch { display: flex; }

/* A list whose rows are more than one line — a person plus the facts a message
   would quote them. `.list` cannot do it (its rows are one nowrap line) and
   `.feed` is a timeline, which this is not. */
.facts-list { margin: 0; padding: 0; list-style: none; }
.facts-list > li { padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); }
.facts-list > li:first-child { padding-top: var(--sp-2); }
.facts-list > li:last-child { border-bottom: 0; padding-bottom: 0; }

/* An automation read top to bottom. A sequence has a shape and a two-column
   layout hides it, so the nodes are one column strung together by the line
   between them — the line is the point, not decoration. */
/* Everything about one automation sits in the same column, the KPIs and the
   runs table included — a flow centred inside a full-width page reads as two
   pages. */
.flow-page { max-width: 760px; margin-inline: auto; }
.flow { margin-top: var(--sp-4); display: flex; flex-direction: column; align-items: stretch; }
.flow-node { position: relative; background: var(--surface); border: 1px solid var(--line);
             border-radius: var(--r); padding: var(--sp-4); }
/* The gap is the arrow's room. Sized in one place so the line, the head and
   the space they live in cannot drift apart. */
.flow { --arrow: 44px; }
.flow-node + .flow-node { margin-top: var(--arrow); }
/* The connector: a line down from the node above, with a head on it. Drawn in
   a grey with some weight to it — --line is a border colour and disappears
   entirely as a 1px run across a gap. */
/* A dotted run between the two, edge to edge. A line plus a separate arrowhead
   never quite met — dots need no join and say "and then" just as well. */
.flow-node + .flow-node::before { content: ""; position: absolute; left: 50%; margin-left: -1px;
             top: calc(var(--arrow) * -1); height: var(--arrow);
             border-left: 2px dotted color-mix(in srgb, var(--muted) 55%, transparent); }
.flow-edit .flow-node .field { margin-bottom: var(--sp-3); }
.flow-msg { color: var(--muted); font-size: var(--fs-sm); white-space: pre-line;
             padding: var(--sp-3); background: var(--sunken); border-radius: var(--r-sm); }
.flow-node > h4 { display: flex; align-items: baseline; gap: var(--sp-2); margin: 0 0 var(--sp-3);
             font-size: var(--fs-xs); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.flow-count { font-size: var(--fs-md); font-weight: 800; letter-spacing: 0; text-transform: none; color: var(--text); }
.flow-tpl { display: inline-block; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .04em;
             background: var(--sunken); border-radius: var(--r-sm); padding: 2px 8px; }
.flow-branch { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap;
             padding: var(--sp-2) 0; border-bottom: 1px dashed var(--line); font-size: var(--fs-sm); }
.flow-branch:last-of-type { border-bottom: 0; }
.flow-branch code { font-size: var(--fs-xs); background: var(--sunken); border-radius: var(--r-sm); padding: 2px 8px; }
@media (max-width: 860px) { .flow-page { max-width: none; } }

/* The Ambar wordmark in the topbar, in place of the trade name. Sized by height
   so the viewBox keeps its own aspect ratio; the colour comes from .topbar .brand. */
.topbar .brand .logo { display: block; height: 19px; width: auto;
  /* Optically centred, not box-centred. "ambar" has one ascender and no
     descender, so four of five letters sit in the x-height band (y 16.4-68.4 of
     a 68-unit box): the ink's centre is at 42.4 where the box's is at 34.
     Centring the box leaves the word sitting low beside text that centres on
     its line. 8.4/68 of 19px is the difference. */
  transform: translateY(-2px); }

/* The topbar's location and counter menus sit at the left, so their panel hangs
   from the left edge — the design system anchors .menu-list to the right, which
   is correct for the menus at the other end of the bar and off-screen here. */
.topbar .menu.at-left .menu-list { left: 0; right: auto; }

/* A menu whose items mark the current choice. The tick keeps its space when it
   is not showing, or every other label shifts left by an icon's width. */
.menu-list .tick { visibility: hidden; }
.menu-list [aria-current="true"] { color: var(--brand); }
.menu-list [aria-current="true"] .tick { visibility: visible; }

/* ==========================================================================
   Guides
   --------------------------------------------------------------------------
   A page's guide, read in the drawer beside it or on a page of its own. The
   markdown renderer emits nothing the design system does not already style —
   headings, lists, tables, .callout, <code> — so what is left is the rhythm of
   a run of prose, which the app has nowhere else: the shell's own h1..h3 rules
   set margin: 0, because everywhere else a heading sits in a .page-head or a
   .card-head that spaces it.
   ========================================================================== */

.guide-body > :first-child { margin-top: 0; }
.guide-body h3, .guide-body h4, .guide-body h5 { margin: var(--sp-5) 0 var(--sp-2); }
.guide-body h3 { font-size: var(--fs-lg); }
.guide-body h4 { font-size: var(--fs-md); }
.guide-body h5 { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.guide-body p { margin: 0 0 var(--sp-3); line-height: 1.65; }
.guide-body ul, .guide-body ol { margin: 0 0 var(--sp-3); padding-left: var(--sp-5); }
.guide-body li { margin-bottom: var(--sp-2); line-height: 1.6; }
.guide-body li > ul, .guide-body li > ol { margin: var(--sp-2) 0 0; }
.guide-body hr { border: 0; border-top: 1px solid var(--line); margin: var(--sp-5) 0; }
.guide-body .callout { margin: 0 0 var(--sp-4); }
.guide-body .callout p:last-child { margin-bottom: 0; }
.guide-body .scroll { margin-bottom: var(--sp-4); }
.guide-body pre { background: var(--sunken); border-radius: var(--r-sm); padding: var(--sp-3);
                  overflow-x: auto; margin: 0 0 var(--sp-3); font-size: var(--fs-sm); }
.guide-body pre code { background: none; padding: 0; }

/* What to read next, told apart from the guide itself by a rule rather than a
   card: inside the drawer a card would be a panel inside a panel. */
.guide-more { margin-top: var(--sp-5); padding-top: var(--sp-4); border-top: 1px solid var(--line); }

/* The drawer is wide enough to read in. min() keeps the phone case whole, where
   the design system's own rule already takes it to full width. */
#guide-drawer { width: min(560px, 100vw); }
#guide-drawer header .grow { flex: 1; min-width: 0; }
