/* base.css -- the layout the three themes share (the redesign, 2026-09-29).

   Mechanics only: the app shell, sections, tables that reflow into labelled
   rows on a phone, fields, dialogs. No colour and no type beyond what the
   theme's variables say; each theme file (theme-scribble.css, theme-rack.css,
   theme-laminate.css) sets the variables, dresses the parts, and gives them a
   dark version that follows the device (prefers-color-scheme, Emil
   2026-09-29). Lifted from the prototype's css/base.css
   (~/Projects/dontfeedback-design), which Emil used to choose. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font-family: var(--font-text); font-size: var(--fs-body, 15px); line-height: var(--lh-body, 1.55);
  -webkit-font-smoothing: antialiased; overflow-wrap: break-word;
}
body.has-dlg, body.has-drawer { overflow: hidden; }
img, svg { display: block; }
p { margin: 0 0 10px; }
p:last-child { margin-bottom: 0; }
a { color: var(--link, var(--accent)); text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
code { font-family: var(--font-mono); font-size: .9em; overflow-wrap: anywhere; }
[hidden] { display: none !important; }
/* No italics anywhere: in Macedonian the system fonts draw Russian italic
   forms of б г д п т, which read wrong (IDENTITY.md, "Things the three share"). */
em, i, cite { font-style: normal; }

.vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
      clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.ico { width: 20px; height: 20px; flex: none; }
.ico-sm { width: 15px; height: 15px; }
.num { font-variant-numeric: tabular-nums; }
/* Mono only for what is read out or compared character by character: keys,
   fingerprints, SHA-256 (IDENTITY.md, review against the defaults). */
.key { font-family: var(--font-mono); font-size: var(--fs-key, 14px); letter-spacing: .02em; white-space: nowrap; }
.key-sm { font-size: 12.5px; letter-spacing: 0; }
.mono-text, .mono-input { font-family: var(--font-mono); }
.sha { font-family: var(--font-mono); font-size: 12.5px; word-break: break-all; }
.center { text-align: center; }

/* Keyboard focus, always visible. A theme may recolour it, never remove it. */
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
main:focus-visible, .dlg:focus-visible { outline: none; }

.skip { position: absolute; left: 12px; top: -80px; z-index: 200; padding: 10px 14px;
        background: var(--ink); color: var(--bg); text-decoration: none; font-weight: 600; border-radius: 4px; }
.skip:focus { top: 12px; }

/* ------------------------------------------------------------------ the shell */
.shell { display: grid; grid-template-columns: var(--side-w, 260px) minmax(0, 1fr); min-height: 100vh;
         background: linear-gradient(90deg, var(--side-bg) 0 var(--side-w, 260px), transparent 0); }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column;
        background: var(--side-bg); color: var(--side-ink); }
.side-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 18px 16px 14px; }
.nav { padding: 4px 10px 12px; flex: 1; }
.nav-list { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 2px; }
.nav-list-end { margin-top: 14px; }
.nav-group { margin: 16px 10px 6px; font-size: 12.5px; font-weight: 600; color: var(--side-ink-2); }
.nav-link { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 10px; color: inherit; text-decoration: none; }
.nav-label { flex: 1; min-width: 0; }
.nav-count { margin-left: auto; font-size: 12px; font-weight: 700; min-width: 22px; height: 22px; padding: 0 6px;
             display: inline-grid; place-items: center; border-radius: 11px; font-variant-numeric: tabular-nums; }
.side-foot { padding: 14px 16px 18px; display: grid; gap: 12px; }
.side-who { display: none; }
.side-note { font-size: 12.5px; color: var(--side-ink-2); margin: 0; }
.side-note a { color: inherit; }
.main-col { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px var(--gutter, 32px); }
.menu-btn, .top-brand { display: none; }
.who { margin-left: auto; display: flex; align-items: center; gap: 14px; min-width: 0; }
.who form { margin: 0; }
.who-text { display: grid; text-align: right; line-height: 1.25; min-width: 0; }
.who-name { font-weight: 600; font-size: 14px; }
.who-mail { font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
main { flex: 1; padding: 8px var(--gutter, 32px) 64px; }
.page { max-width: var(--page-max, 1080px); margin: 0 auto; }
.area-portal .page { max-width: var(--page-max-portal, 880px); }

.side-close { display: none !important; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; background: none; cursor: pointer; border-radius: 6px; color: inherit; }
.scrim { display: none; }

/* Phone and small tablet: the sidebar becomes a drawer from the left. */
@media (max-width: 899px) {
  :root { --gutter: 16px; }
  .shell { display: block; background: none; }
  .side { position: fixed; z-index: 60; inset: 0 auto 0 0; width: min(86vw, 320px); height: 100%;
          transform: translateX(-104%); visibility: hidden; transition: transform .22s ease, visibility 0s linear .22s; }
  .shell.drawer-open .side { transform: none; visibility: visible; transition: transform .22s ease; }
  .side-close { display: inline-grid !important; }
  .side-who { display: block; }
  .side-who .who-text { text-align: left; }
  .side-who .who-mail { color: var(--side-ink-2); }
  .scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .45); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .shell.drawer-open .scrim { opacity: 1; pointer-events: auto; }
  .top { position: sticky; top: 0; z-index: 40; padding: 8px 12px; min-height: 56px; }
  .menu-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 10px; cursor: pointer; }
  .top-brand { display: block; min-width: 0; }
  .who .who-text { display: none; }
  main { padding: 8px var(--gutter) 56px; }
}
/* Without JavaScript the drawer cannot open: the menu is then simply shown
   at the top of the page (the head's one-line script adds .js to <html>). */
@media (max-width: 899px) {
  html:not(.js) .side { position: static; transform: none; visibility: visible; width: auto; height: auto; }
  html:not(.js) .menu-btn, html:not(.js) .side-close { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* ------------------------------------------------------------------ page parts */
.page-head { margin: 8px 0 28px; }
.page-head-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.page-title { margin: 0; flex: 1 1 auto; min-width: 0; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.page-lead { margin: 10px 0 0; color: var(--ink-2); max-width: 68ch; }
.page-lead .status { margin-right: 16px; }
.crumb { margin: 0 0 6px; font-size: 14px; }

.sec { position: relative; min-width: 0; }
.sec-head { display: flex; align-items: center; gap: 10px; }
.sec-title { margin: 0; }
.sec-aside { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.sec-lead { color: var(--ink-2); max-width: 70ch; }
.sub-title { margin: 22px 0 8px; font-size: 15px; }
.sub-title:first-child { margin-top: 0; }
.ear { display: none; }
.led { display: none; }
.two { display: grid; grid-template-columns: 1fr; gap: var(--sec-gap, 32px); }

.actions, .row-actions, .dlg-actions, .form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.actions { margin-top: 14px; }
.row-actions form, .actions form, .dlg-actions form, .page-actions form { margin: 0; }
.footnote { font-size: 13px; color: var(--ink-2); margin-top: 14px; max-width: 72ch; }
.footnote.center { margin-left: auto; margin-right: auto; }
.plain-list { margin: 6px 0 14px; padding-left: 20px; color: var(--ink-2); }
.plain-list li { margin: 4px 0; }
.empty-line { color: var(--ink-2); }
.cell-sub { display: block; font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.cell-muted { color: var(--ink-2); }
.quote { white-space: pre-wrap; max-width: 64ch; }
.nowrap { white-space: nowrap; }
.cmd { font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6; margin: 6px 0 8px; padding: 8px 12px; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; }

/* Buttons: sizes here, looks in the theme. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px;
       cursor: pointer; text-decoration: none; white-space: nowrap; line-height: 1.2; }
.btn-sm { min-height: 32px; padding: 5px 11px; font-size: 13.5px; }
.btn { max-width: 100%; }
/* A full-width button wraps rather than widen the page: the longest
   Macedonian labels (35 characters) pushed a 320-360px phone sideways. */
.btn-block { width: 100%; white-space: normal; text-align: center; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.linkish { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; color: var(--link, var(--accent)); text-align: left; }

/* Fields */
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .field .label { font-size: 13.5px; font-weight: 600; }
.hint { font-size: 12.5px; color: var(--ink-2); margin: 0; }
input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea { width: 100%; min-height: 40px; padding: 8px 11px; }
textarea { resize: vertical; min-height: 140px; }
.stack { display: grid; gap: 14px; margin: 0; }
.inline-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 12px; margin-top: 14px; }
.inline-form .field { flex: 1 1 220px; max-width: 360px; }
.sec-body > .inline-form:first-child { margin-top: 0; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 14px 16px; margin: 0; }
.form-grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); margin: 6px 0 4px; }
.form-grid .form-actions, .form-grid .dlg-actions, .form-grid .span-all { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; min-height: 40px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.search-wrap { position: relative; display: block; }
.search-wrap .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-2); pointer-events: none; }
.search-wrap input { padding-left: 34px !important; }

/* Status: a lamp and a word. Colour is never the only signal. */
.status { display: inline-flex; align-items: flex-start; gap: 7px; font-weight: 600; font-size: 13.5px; line-height: 1.3; }
.status .lamp { flex: none; width: 9px; height: 9px; border-radius: 50%; margin-top: .3em; }
.tag { display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 600; padding: 1px 8px; line-height: 1.6; white-space: nowrap; }
.count-pill { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.notice { padding: 12px 16px; margin: 0 0 18px; font-size: 14px; }
.card .notice { margin: 0; }

/* Pairs: a label above its value; wraps on a phone. */
.pairs { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0; }
.pair { min-width: 0; }
.pairs dt { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.pairs dd { margin: 1px 0 0; font-size: 14px; font-weight: 500; }

/* Rows: the portal's lists. */
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 12px 0; }
.row-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; flex: 1 1 280px; min-width: 0; }
.row-name { font-weight: 600; }
.row-meta { font-size: 13.5px; color: var(--ink-2); }
.row-act { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.row-act form { margin: 0; }
.row-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 18px; width: 100%; font-size: 13.5px; color: var(--ink-2); }
.row.log { display: grid; grid-template-columns: 170px minmax(0, 1.4fr) minmax(0, 1fr) 150px; gap: 4px 16px; align-items: baseline; }
.log-when { font-size: 13.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.log-where, .log-ip { font-size: 13.5px; color: var(--ink-2); }
.row.is-past .row-name { font-weight: 500; }
@media (max-width: 699px) {
  .row-cols { grid-template-columns: 1fr; }
  .row.log { grid-template-columns: 1fr; gap: 2px; }
  .row-act { margin-left: 0; }
}

/* Tables: dense on a desk; each row becomes a labelled block on a phone. */
.tbl-wrap { position: relative; max-width: 100%; overflow-x: auto; }
.tbl .cell-sub { overflow-wrap: anywhere; }
.tbl td, .tbl th { overflow-wrap: normal; }
.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-table, 13.5px); }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: var(--cell-pad, 10px 12px); }
.tbl thead th { font-weight: 600; white-space: nowrap; }
.tbl tbody th { font-weight: 500; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .row-actions { flex-wrap: nowrap; justify-content: flex-end; }
.tbl .row-actions .cell-sub { white-space: normal; max-width: 220px; }
.tbl .status { white-space: nowrap; }
.tbl .cell-sub .status { white-space: normal; }
.tbl-empty td { color: var(--ink-2); }
.mac { display: flex; align-items: flex-start; gap: 6px; }
.mac .ico { margin-top: 2px; }
.mac + .mac { margin-top: 3px; }
@media (max-width: 1180px) {
  .tbl .row-actions { flex-wrap: wrap; justify-content: flex-start; }
}
@media (max-width: 699px) {
  .tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tbl, .tbl tbody, .tbl tr, .tbl th, .tbl td { display: block; width: 100%; }
  .tbl tr { padding: 10px 0; }
  .tbl tbody th, .tbl td { display: grid; grid-template-columns: minmax(92px, 34%) minmax(0, 1fr); gap: 10px; padding: 4px 12px; text-align: left !important; }
  .tbl tbody th::before, .tbl td::before { content: attr(data-label); font-weight: 600; font-size: 12.5px; color: var(--ink-2); padding-top: 1px; }
  .tbl td[data-label=""] { grid-template-columns: 1fr; }
  .tbl td[data-label=""]::before { content: none; }
  .tbl .key { white-space: normal; overflow-wrap: anywhere; }
  .tbl .key:not(.key-sm) { white-space: nowrap; font-size: 13px; letter-spacing: 0; }
  .tbl .cell { min-width: 0; overflow-wrap: anywhere; }
  .tbl .num .cell { text-align: left; }
  .tbl tr.tbl-empty td { grid-template-columns: 1fr; }
  .tbl tr.tbl-empty td::before { content: none; }
}

/* The row menu: a <details>, so it opens without a script. */
.menu-wrap { position: relative; display: inline-block; }
.menu-wrap > summary { list-style: none; }
.menu-wrap > summary::-webkit-details-marker { display: none; }
.menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 190px; display: grid; padding: 4px; }
.menu-item { display: block; width: 100%; text-align: left; min-height: 38px; padding: 8px 12px; border: 0; background: none; cursor: pointer; font-size: 14px; font-weight: 500; white-space: nowrap; text-decoration: none; color: inherit; }
@media (max-width: 699px) { .menu { right: auto; left: 0; } }
/* With the script the menu is placed `fixed` at its button (app.js placeMenu);
   hidden until then, so it never flashes inside the table first. */
html.js .menu-wrap[open] > .menu:not(.is-placed) { visibility: hidden; }

/* Toolbar above a table */
.toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 14px; margin: 0 0 16px; }
.toolbar .field { flex: 0 1 180px; }
.toolbar .field-search { flex: 1 1 280px; max-width: 420px; }
.toolbar-count { margin: 0 0 0 auto; align-self: center; font-size: 13.5px; color: var(--ink-2); }
@media (max-width: 699px) { .toolbar .field { flex: 1 1 100%; max-width: none; } .toolbar-count { margin-left: 0; } }

/* A row of pressed keys: the period, the source, "needs you" or all. */
.seg { display: inline-flex; flex-wrap: wrap; gap: 0; margin: 0 0 14px; }
.seg-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 14px; cursor: pointer; text-decoration: none; color: inherit; }

/* ------------------------------------------------------------------ portal: licences */
.lics { display: grid; gap: var(--sec-gap, 32px); }
.lic-top { display: flex; flex-wrap: wrap; gap: 18px 36px; align-items: flex-start; }
.figs { display: flex; flex-wrap: wrap; gap: 14px 28px; }
.fig { display: flex; flex-direction: column; }
/* "14 days" reads as "14 / Days": the unit word is lower case in a sentence. */
.fig-days .fig-label::first-letter { text-transform: uppercase; }
.lic-words { flex: 1 1 320px; display: grid; gap: 10px; min-width: 0; }
.lic-words .pairs dd { font-size: 15px; }
.lic-sentence, .lic-seats { margin: 0; max-width: 60ch; }
.lic-seats { color: var(--ink-2); font-size: 14px; }
.machines { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 12px; }
.machine { display: grid; gap: 12px; padding: 14px 0 0; scroll-margin-top: 80px; }
.machine-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.machine-body { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 28px; }
.machine-act { margin-left: auto; display: flex; }
.machine-act form { margin: 0; }
.fp { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-2); margin-left: auto; }
.nick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; margin: 0; }
.nick-field { position: relative; display: inline-flex; align-items: center; max-width: 100%; }
.nick-ico { display: none; }
.nick-input { max-width: 100%; }
.nick-view { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; min-width: 0; }
.nick-name { font-weight: 700; font-size: 18px; min-width: 0; overflow-wrap: anywhere; }
.nick-name.is-unnamed { font-weight: 500; color: var(--ink-2); }
/* Without a script, Rename cannot open the field: the field is simply there. */
html:not(.js) .nick-view .nick-rename { display: none; }
html:not(.js) .nick[hidden] { display: flex !important; }

/* The theme keys: pressed like the language switch, one of three. */
.theme-pick { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.theme-btn { min-height: 48px; padding: 8px 16px 8px 10px; gap: 10px; }
.theme-sw { display: inline-flex; flex: none; border-radius: 4px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0,0,0,.28); }
.theme-sw span { display: block; width: 11px; height: 26px; }
@media (max-width: 599px) { .theme-pick { display: grid; } .theme-btn { justify-content: flex-start; } }
.crossgrade { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-top: 18px; padding-top: 14px; }
.crossgrade p { margin: 0; flex: 1 1 320px; }
.empty { padding: 28px; max-width: 640px; }
.empty-title { font-weight: 700; font-size: 17px; }

/* Security */
.codes-meter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 12px; }
.segs { display: inline-flex; gap: 4px; }
.segs .cseg { width: 14px; height: 22px; }
.codes-left { font-weight: 700; font-size: 16px; }
/* Two columns where they fit, else one -- never wider than the card: two
   fixed max-content columns (about 420px) pushed a phone's card past its own
   border (Emil's iPhone, 2026-09-29). A code is 19 characters; 21ch holds one
   with its spacing, and a column is never under half the row, so never three. */
.codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, max(21ch, calc((100% - 24px) / 2))), 1fr)); gap: 8px 24px; font-family: var(--font-mono);
         font-size: 16px; letter-spacing: .5px; padding: 6px 0 14px; }

/* Downloads */
.artifact { display: grid; gap: 8px; }
.artifact + .artifact { margin-top: 18px; }
.art-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.art-os { font-weight: 700; font-size: 17px; }
.art-size { color: var(--ink-2); font-size: 14px; }
.art-btn { margin-left: auto; }
.art-file, .art-sha { margin: 0; }
.art-sha .lab { display: block; font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.notes { margin: 0; padding-left: 20px; max-width: 70ch; }
.notes li { margin: 5px 0; }

/* Buy */
.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; margin-bottom: 14px; }
.product { display: grid; gap: 8px; padding: 22px; align-content: start; margin: 0; }
.product p { margin: 0; }
.product-name { font-weight: 700; font-size: 17px; }

/* ------------------------------------------------------------------ console: overview */
.svcs { list-style: none; margin: 0; padding: 0; display: grid; }
.svc { position: relative; display: grid; grid-template-columns: 200px 150px minmax(0, 1fr); gap: 8px 22px; align-items: start; padding: 14px 0; }
.svc-name { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.svc-fig { display: flex; flex-direction: column; }
.svc-text p { margin: 0 0 4px; }
.svc-how { font-size: 13.5px; color: var(--ink-2); }
.svc.is-ok .svc-text, .svc.is-info .svc-text { color: var(--ink-2); }
@media (max-width: 799px) { .svc { grid-template-columns: 1fr; gap: 6px; } }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 20px 24px; }
.kpi p { margin: 0; }
.kpi-label { font-weight: 600; font-size: 14px; }
.kpi-label a { color: inherit; }
.kpi-text { font-size: 13px; color: var(--ink-2); margin-top: 4px !important; max-width: 36ch; }
.kpi-wide { grid-column: span 2; }
@media (max-width: 599px) { .kpi-wide { grid-column: auto; } }
.of { font-size: .55em; }

.member-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--sec-gap, 32px); align-items: start; }
.member-main, .member-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sec-gap, 32px); min-width: 0; }
.member-side .pairs { display: grid; gap: 10px; }
@media (max-width: 1299px) { .member-grid { grid-template-columns: minmax(0, 1fr); } }

.msgs { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.msg { padding: 16px 18px; }
.msg-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; justify-content: space-between; }
.guide { margin-top: 20px; max-width: 76ch; font-size: 14px; }
.guide p { margin-bottom: 8px; }

/* The restore-mode banner, above every console page while it is on. */
.banner { padding: 14px var(--gutter, 32px); }
.banner-in { max-width: var(--page-max, 1080px); margin: 0 auto; font-size: 14px; }
.banner-in p { margin: 0 0 6px; max-width: 110ch; }
.banner-title .status { font-size: 16px; }

/* ------------------------------------------------------------------ sign-in and other card pages */
.card-page { min-height: 100vh; display: grid; }
.card-stage { display: none; }
.card-col { display: grid; place-items: center; padding: 64px 16px 32px; position: relative; }
.card-lang { position: absolute; top: 14px; right: 16px; }
.card { position: relative; width: min(420px, 100%); display: grid; gap: 16px; }
.card-wide .card { width: min(480px, 100%); }
.card-head { display: grid; gap: 14px; margin-bottom: 4px; }
.card-title { margin: 0; }
.card-lead, .card-note { margin: 0; }
.card-note { font-size: 13px; color: var(--ink-2); }
.card-sub { font-size: 14px; margin: 0; font-weight: 600; }
.card-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; font-size: 14px; }
.card-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.or { height: 1px; margin: 2px 0; background: var(--line); }
/* "Neither with you?": the password and a recovery code, behind a disclosure. */
details.lost > summary { list-style: none; cursor: pointer; font-size: 14px; }
details.lost > summary::-webkit-details-marker { display: none; }
details.lost[open] > summary { margin-bottom: 14px; }
.totp-key-box .key { white-space: normal; word-break: break-all; font-size: 17px; letter-spacing: 1px; }
.qr { background: #fff; padding: 10px; border-radius: 8px; width: 220px; max-width: 100%; }
.qr svg { display: block; width: 100%; height: auto; }
.totp-key { font-family: var(--font-mono); font-size: 17px; letter-spacing: 1px; word-break: break-all; }

.lang { display: inline-flex; gap: 4px; margin: 0; }
.lang-btn { min-width: 40px; min-height: 32px; padding: 3px 9px; cursor: pointer; font-size: 13px; font-weight: 700; }

/* ------------------------------------------------------------------ dialogs
   One per action on the console, and the "are you sure" before a portal form
   that ends something. Opened by app.js; without a script a link to its
   #id opens it too (:target), and the form inside works the same. */
.dlg-root { position: fixed; inset: 0; z-index: 90; display: none; place-items: center; padding: 16px; overflow-y: auto; }
.dlg-root.is-open, .dlg-root:target { display: grid !important; }
.dlg-backdrop { position: fixed; inset: 0; }
.dlg { position: relative; width: min(460px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; display: grid; gap: 14px; padding: 26px; }
.dlg-wide .dlg { width: min(560px, 100%); }
.dlg p { margin: 0; }
.dlg form { margin: 0; }
.dlg form:not(.form-grid):not(.inline-form) { display: grid; gap: 14px; }
.dlg-title { margin: 0; }
.dlg-foot { display: flex; justify-content: flex-end; }
.dlg-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.dlg-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; justify-content: space-between; }

@media print {
  .side, .top, .skip, .scrim, .noprint, .card-lang { display: none !important; }
  .shell { display: block; background: none; }
  body { background: #fff; color: #000; }
}
