/* ProTitser website — the signed-in desk (account + distributor + admin), in the desktop app's look ("Fresh Green & White",
   ProTitser 2.0.1, 2026-10-03). Loaded after styles.css on account/index.html and admin/index.html (body.app).
   Layout = the app's shell: a solid green menu band with every page's icon and name (white on green); the page showing is
   the row painted in the page colour, running to the band's edge so it reads as a tab joined to the page. The ☰ burger at
   its top folds it to an icon rail and back on laptops; phones open it as a drawer from the top bar's burger. Pages start
   with the app's module header (a plain green icon + the title), then flat white cards with square corners.
   Text is the app's size: 15px on laptops and on phones; nothing heavier than 600. */

:root { --side-w: 248px; --rail-w: 64px; }

body.app { font-size: var(--fs-md); line-height: 1.55; }
@media (max-width: 640px) { body.app { font-size: .9375rem; } }

/* Until the account (or admin) data has arrived, show nothing but a quiet "Loading" line — never an empty shell
   with the footer floating at the top (Rom 09-30: "when I log in, this will appear first"). */
body.app:has(main[data-dash][hidden]) :is(.side, .topbar, .main-col > *),
body.app:has([data-admin][hidden]):has([data-denied][hidden]) :is(.side, .topbar, .main-col > *) { visibility: hidden; }
body.app:has(main[data-dash][hidden]) .main-col::before,
body.app:has([data-admin][hidden]):has([data-denied][hidden]) .main-col::before {
  content: "Loading your account…"; position: fixed; inset: 0; display: grid; place-items: center;
  color: var(--ink-3); font-size: var(--fs-md); animation: boot-wait .3s ease .4s both;
}
@keyframes boot-wait { from { opacity: 0; } to { opacity: 1; } }

/* ============================================================ sidebar */
.side {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 50;
  display: flex; flex-direction: column;
  width: var(--side-w); padding: 12px 12px 10px;
  background: var(--nav-bg); color: var(--nav-ink-muted);
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--nav-rule) transparent;
}
/* The brand on the green band: the name all white (one colour since the new logo, 2026-10-14: Rom, "dont add yellow to
   the logo"); the ADMIN pill beside it is white with green letters, no gold. */
.side .brand, .side .wm-row { color: var(--nav-ink); }
.side .wm-accent { color: inherit; }
.side .wm-tag { color: var(--nav-ink-muted); }
.side .wm-pill { background: #FFFFFF; color: #187A48; }
.side-brand { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 2px 8px 0; }
.side-brand .brand { min-width: 0; gap: 9px; }
.side-brand .brand-mark { width: 30px; height: 30px; }
/* The ☰ burger (the same button as the phones' one: [data-menu], js/shell.js). */
.side-toggle { display: grid; place-items: center; width: 40px; height: 36px; flex: none; border: 0; border-radius: var(--r); background: none; color: var(--nav-ink); cursor: pointer; }
.side-toggle:hover { background: var(--nav-hover); color: var(--nav-ink); }
.side-toggle .ico { width: 19px; height: 19px; }
.side-group { display: flex; flex-direction: column; gap: 2px; margin-top: 16px; }
.side-label { margin: 0 0 4px; padding: 0 12px; color: var(--nav-ink-muted); font-size: .6875rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.side-link {
  position: relative; display: flex; align-items: center; gap: 11px;
  width: 100%; min-height: 36px; padding: 7px 10px 7px 12px;
  border: 0; border-radius: var(--r); background: none;
  color: var(--nav-ink); font: 500 var(--fs-md)/1.2 var(--sans); text-align: left; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background-color .15s, color .15s;
}
.side-link:hover { background: var(--nav-hover); color: var(--nav-ink); }
/* The page showing: the page colour, out to the band's right edge (the band has 12px of padding). */
.side-link[aria-current] { width: calc(100% + 12px); border-radius: var(--r) 0 0 var(--r); background: var(--bg); color: var(--ink); font-weight: 600; }
.side-txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* The icon in each row: one colour, soft white; green on the page showing. (.c-green, .c-blue… are hooks only.) */
.side-ico { display: grid; place-items: center; width: 18px; height: 18px; flex: none; color: var(--nav-ink-muted); transition: color .15s; }
.side-ico .ico { width: 17px; height: 17px; }
.side-link:hover .side-ico { color: var(--nav-ink); }
.side-link[aria-current] .side-ico { color: var(--brand-ink); }
.side-badge, .side-link .count { margin-left: auto; display: inline-grid; place-items: center; min-width: 22px; height: 19px; padding: 0 6px; border-radius: 999px; background: var(--nav-hover); color: var(--nav-ink); box-shadow: inset 0 0 0 1px var(--nav-rule); font-size: .6875rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.side-link .count { background: var(--gold); color: #17201B; box-shadow: none; }
.side-link[aria-current] .side-badge { background: var(--surface); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
.side-badge:empty, .side-link .count:empty { display: none; }
.side-foot { display: flex; flex-direction: column; gap: 2px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--nav-rule); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 10px; min-width: 0; }
.side-user .avatar { width: 32px; height: 32px; background: var(--nav-hover); color: var(--nav-ink); box-shadow: inset 0 0 0 1px var(--nav-rule); }
.side-user-text { display: flex; flex-direction: column; min-width: 0; }
.side-user strong { color: var(--nav-ink); font-size: var(--fs-sm); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user-text > span { color: var(--nav-ink-muted); font-size: var(--fs-xs); overflow-wrap: anywhere; line-height: 1.35; }
.side-group[hidden] + .side-group { margin-top: 16px; }

.scrim { display: none; }
.main-col { display: flex; flex-direction: column; min-height: 100vh; margin-left: var(--side-w); }
.page { flex: 1 0 auto; width: 100%; max-width: 1200px; margin: 0 auto; padding: 22px 28px 44px; }
.main-col > .site-footer .wrap { max-width: 1200px; }
.main-col > .site-footer .foot-bottom { padding-top: 12px; padding-bottom: 16px; font-size: var(--fs-xs); }

/* Phones' top bar (menu button · brand · avatar); hidden on laptops. */
.topbar { display: none; }
.burger { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); color: var(--ink-1); cursor: pointer; }
.burger .ico { width: 19px; height: 19px; }

/* Laptops: the ◧ button shrinks the sidebar to an icon rail (remembered: localStorage pt_side, js/shell.js). */
@media (min-width: 900px) {
  .side-ready .side { transition: width .18s ease; }
  .side-ready .main-col { transition: margin-left .18s ease; }
  .side-collapsed .side { width: var(--rail-w); padding-left: 8px; padding-right: 8px; }
  .side-collapsed .main-col { margin-left: var(--rail-w); }
  .side-collapsed .side-brand .brand, .side-collapsed .side-label, .side-collapsed .side-txt, .side-collapsed .side-user-text { display: none; }
  .side-collapsed .side-brand { justify-content: center; padding: 0 0 6px; }
  .side-collapsed .side-link { justify-content: center; padding: 9px 0; }
  .side-collapsed .side-link[aria-current] { width: calc(100% + 8px); padding-right: 8px; }
  .side-collapsed .side-badge, .side-collapsed .side-link .count { position: absolute; top: 1px; right: 3px; min-width: 16px; height: 16px; padding: 0 4px; font-size: .625rem; }
  .side-collapsed .side-user { justify-content: center; padding: 6px 0; }
  .side-collapsed .side-group { margin-top: 12px; }
}
@media (max-width: 899px) {
  .main-col { margin-left: 0; }
  .topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
  .topbar .brand-mark { width: 30px; height: 30px; }
  .topbar .wm-row { font-size: 1rem; }
  .topbar .avatar { margin-left: auto; }
  .side { width: min(290px, 86vw); transform: translateX(-102%); visibility: hidden; transition: transform .22s ease, visibility .22s; }
  .menu-open .side { transform: none; visibility: visible; box-shadow: 0 0 48px rgba(13, 19, 16, .28); }
  .menu-open .app .scrim { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(13, 19, 16, .4); }
  body.menu-lock { overflow: hidden; }
  .side-toggle { display: none; }
  .side-link { min-height: 42px; }
  .page { padding: 16px 14px 36px; }
}
/* Small phones: a little more room inside the cards, so a whole 29-letter laptop code fits in its box. */
@media (max-width: 400px) {
  .page { padding-left: 10px; padding-right: 10px; }
  .panel { padding: 16px 14px; }
  .panel-foot { margin: 12px -14px -16px; padding: 12px 14px; }
}
@media (prefers-reduced-motion: reduce) { .side, .main-col { transition: none !important; } }

/* One page at a time (#hash); a short fade when it changes. */
.app [data-panel]:not([hidden]), .app [data-pane]:not([hidden]) { animation: page-in .18s ease both; }
@keyframes page-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .app [data-panel], .app [data-pane] { animation: none !important; } }

/* ============================================================ page head (the app's module header) */
.page-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 40px; margin: 0 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.page-head .itile { width: 24px; height: 30px; }
.page-head .itile .ico { width: 20px; height: 20px; }
.page-title { margin: 0; font-size: 1.375rem; line-height: 1.2; letter-spacing: -.01em; }
.page-sub { margin: 1px 0 0; color: var(--ink-3); font-size: var(--fs-sm); }
.page-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.page-head-text { min-width: 0; }
.hello .avatar { width: 40px; height: 40px; font-size: var(--fs-md); }
@media (max-width: 640px) {
  .page-head { gap: 10px; margin-bottom: 14px; padding-bottom: 12px; }
  .page-title { font-size: 1.25rem; }
  .page-tools { margin-left: 0; width: 100%; }
}
.sec-title { display: flex; align-items: center; gap: 8px; margin: 26px 0 12px; font-family: var(--sans); font-size: .9375rem; font-weight: 600; }
.stack-lg > * + * { margin-top: 16px; }

/* ============================================================ KPI strip (one card cut into cells, like the app's summary bands) */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0; margin: 0 0 16px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.kpis:empty { display: none; }
/* The hairlines between cells: each cell draws its left and top edge; the ones on the outside are clipped. */
.kpi { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 14px 18px 16px; box-shadow: -1px 0 0 var(--line), 0 -1px 0 var(--line); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi-top .itile { display: none; }
.kpi-label { margin: 0; color: var(--ink-3); font-size: var(--fs-sm); font-weight: 500; }
.kpi-value { margin: 0; color: var(--ink); font-family: var(--serif); font-size: 1.75rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-value small { margin-left: 4px; color: var(--ink-3); font-family: var(--sans); font-size: var(--fs-sm); font-weight: 400; letter-spacing: 0; }
.kpi-sub { margin: 0; color: var(--ink-3); font-size: var(--fs-xs); }
.kpi-sub b { color: var(--ink-2); font-weight: 600; }
.kpi.low .kpi-value { color: var(--bad); }
/* A meter: how much of a whole (credits left of all received, licenses in use of all made). */
.meter { height: 6px; overflow: hidden; border-radius: 999px; background: var(--surface-3); }
.meter > span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--viz-1); transition: width .5s ease; }
.meter.amber > span { background: var(--viz-wait); }
.meter.red > span { background: var(--viz-bad); }
@media (max-width: 640px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi { padding: 12px 14px 14px; }
  .kpi-value { font-size: 1.5rem; }
}

/* ============================================================ charts (js/charts.js) */
.dash-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 0 0 16px; }
@media (min-width: 1100px) { .dash-grid { grid-template-columns: 1.5fr 1fr; } }
.dash-grid:empty { display: none; }
.chart-card { margin: 0; min-width: 0; padding: 16px 18px 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.chart-head { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.chart-title { margin: 0; font-family: var(--sans); font-size: .9375rem; font-weight: 600; }
.chart-note { margin-left: auto; color: var(--ink-3); font-size: var(--fs-xs); font-weight: 400; }
.chart { position: relative; min-width: 0; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--viz-grid); stroke-width: 1; shape-rendering: crispEdges; }
.chart .base { stroke: var(--viz-axis); stroke-width: 1; shape-rendering: crispEdges; }
.chart .tick { fill: var(--ink-3); font: 400 11px var(--sans); }
.chart .val { fill: var(--ink-2); font: 500 11px var(--sans); }
.chart .bar { fill: var(--viz-1); transition: opacity .15s; }
.chart .bar.dim { opacity: .5; }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:focus { outline: none; }
.chart .hit:focus-visible { stroke: var(--ring); stroke-width: 3; }
.chart .line { fill: none; stroke: var(--viz-1); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--viz-wash); }
.chart .dot { fill: var(--viz-1); stroke: var(--surface); stroke-width: 2; }
.chart .dot.pin { opacity: 0; }
.chart.hover .dot.pin { opacity: 1; }
.chart .cross { stroke: var(--ink-3); stroke-width: 1; opacity: 0; shape-rendering: crispEdges; }
.chart.hover .cross { opacity: .5; }
.chart-empty { display: grid; place-items: center; gap: 6px; min-height: 150px; padding: 16px; border-radius: var(--r); background: var(--surface-2); color: var(--ink-3); text-align: center; font-size: var(--fs-md); }
.chart-empty .ico { width: 24px; height: 24px; }
.chart-tip { position: fixed; z-index: 150; pointer-events: none; padding: 7px 10px; border-radius: var(--r); background: #17201B; color: #F6F8F7; font-size: var(--fs-xs); line-height: 1.35; box-shadow: var(--shadow-2); white-space: nowrap; }
.chart-tip b { display: block; color: #fff; font-size: var(--fs-sm); font-weight: 600; }
/* Part of a whole: one bar split into parts, a 2px gap between them, legend with numbers under it. */
.stackbar { display: flex; gap: 2px; height: 14px; overflow: hidden; border-radius: var(--r-sm); background: var(--surface-3); }
.stackbar > span { height: 100%; min-width: 6px; background: var(--c-fill, var(--viz-1)); }
.stackbar > span:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.stackbar > span:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.stackbar > span:only-child { border-radius: var(--r-sm); }
.fill-good { --c-fill: var(--viz-1); }
.fill-wait { --c-fill: var(--viz-wait); }
.fill-bad { --c-fill: var(--viz-bad); }
.legend { display: grid; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.legend li { display: grid; grid-template-columns: 10px 1fr auto auto; align-items: center; gap: 10px; font-size: var(--fs-md); color: var(--ink-2); }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; background: var(--c-fill, var(--viz-1)); }
.legend b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.legend .pct { min-width: 40px; text-align: right; color: var(--ink-3); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.big-figure { display: flex; align-items: baseline; gap: 8px; margin: 0 0 12px; }
.big-figure b { font-family: var(--serif); font-size: 2rem; font-weight: 600; letter-spacing: -.01em; line-height: 1; color: var(--ink); }
.big-figure span { color: var(--ink-3); font-weight: 400; }

/* ============================================================ the teacher's Home (Overview) */
/* Next step: a flat card with the app's forest edge — what to do now, in one line, and the button for it. */
.next-box {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px;
  margin: 0 0 16px; padding: 14px 16px 14px 14px;
  border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: var(--r-lg);
  background: var(--surface);
}
.next-art { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); color: var(--brand-ink); }
.next-art .ico { width: 19px; height: 19px; }
.next-body { min-width: 0; }
.next-kicker { margin: 0; color: var(--ink-3); font-size: var(--fs-xs); font-weight: 500; }
.next-title { display: flex; align-items: center; gap: 8px; margin: 1px 0 0; color: var(--ink); font-size: 1rem; font-weight: 600; line-height: 1.3; }
.next-hint { margin: 3px 0 0; color: var(--ink-3); font-size: var(--fs-sm); line-height: 1.5; }
.next-hint:empty { display: none; }
.next-action { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 700px) {
  .next-box { grid-template-columns: auto 1fr; }
  .next-action { grid-column: 1 / -1; }
  .next-action .btn { flex: 1; }
}

/* The at-a-glance strip under it: license, laptop, requests, account — label, value, one detail line. */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 16px; padding: 0; list-style: none; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.fact { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 12px 16px 13px; box-shadow: -1px 0 0 var(--line), 0 -1px 0 var(--line); }
.fact-label { display: flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: var(--fs-xs); font-weight: 500; }
.fact-label .ico { width: 14px; height: 14px; color: var(--ink-4); }
.fact-value { color: var(--ink); font-size: .9375rem; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.fact-value.mono { font-size: var(--fs-md); font-weight: 500; letter-spacing: .02em; }
.fact-value.ok { color: var(--ok); }
.fact-value.warn { color: var(--warn); }
.fact-sub { color: var(--ink-3); font-size: var(--fs-xs); overflow-wrap: anywhere; }
@media (max-width: 1000px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .fact { padding: 10px 12px 11px; } .fact-value { font-size: var(--fs-md); } .fact-value.mono { font-size: var(--fs-sm); } }
@media (max-width: 340px) { .facts { grid-template-columns: 1fr; } }

/* The 4 steps (hidden once everything is set): the app's step bar — numbered circles joined by a line. */
.journey { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; padding: 2px 0 0; list-style: none; }
.journey li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 8px; text-align: center; }
.journey li::before { content: ""; position: absolute; top: 15px; left: calc(-50% + 22px); right: calc(50% + 22px); height: 2px; border-radius: 2px; background: var(--line); }
.journey li:first-child::before { display: none; }
/* The line into a step turns forest once the step before it is done. */
.journey li.is-done + li::before { background: var(--brand); }
.j-circle { position: relative; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink-3); transition: background-color .2s, border-color .2s, color .2s; }
.j-circle .ico { display: none; }
.is-done .j-circle { border-color: var(--brand); background: var(--brand); color: var(--on-brand); }
.is-current .j-circle { border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 0 0 4px var(--brand-soft); }
/* The number (or ✓) sits in the circle itself. */
.p-dot { position: static; display: block; width: auto; height: auto; border: 0; background: none; color: inherit; font-size: var(--fs-sm); font-weight: 600; line-height: 1; }
.journey strong { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-1); font-size: var(--fs-md); font-weight: 500; line-height: 1.3; }
.is-current strong { color: var(--ink); font-weight: 600; }
.journey .step-go { margin-top: 2px; }
.j-label { display: flex; align-items: center; justify-content: center; gap: 4px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .journey { grid-template-columns: 1fr; gap: 12px; }
  .journey li { flex-direction: row; text-align: left; padding: 0; gap: 12px; }
  .journey li::before { top: -12px; bottom: auto; left: 15px; right: auto; width: 2px; height: 12px; }
  .j-label { justify-content: flex-start; }
  .journey .step-go { margin: 0 0 0 auto; }
}

.home-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 16px; align-items: start; }
@media (min-width: 1100px) { .home-grid { grid-template-columns: 1.25fr 1fr; } }
.home-side { display: grid; gap: 16px; min-width: 0; }
.home-side > .panel + .panel { margin-top: 0; }
.home-lic .lic-card { height: 100%; }
/* Shortcuts: a short list of rows (icon · what · where) — like the app's settings rows. */
.qtiles { display: flex; flex-direction: column; padding: 4px 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.qtile { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 10px 16px; color: var(--ink-1); text-decoration: none; transition: background-color .15s; }
.qtile + .qtile { border-top: 1px solid var(--line); }
.qtile:hover { background: var(--surface-2); color: var(--ink); }
.qtile .itile { width: 30px; height: 30px; }
.qtile .itile .ico { width: 16px; height: 16px; }
.qtile b { display: block; font-size: var(--fs-md); font-weight: 500; color: var(--ink); }
.qtile small { display: block; color: var(--ink-3); font-size: var(--fs-xs); }
.qtile-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex: 1; min-width: 0; }
.qtile-foot > .ico { width: 16px; height: 16px; color: var(--ink-4); transition: transform .15s, color .15s; }
.qtile:hover .qtile-foot > .ico { transform: translateX(2px); color: var(--brand-ink); }

/* Details as label/value rows (the license on Home, the account on Home, the license cards). */
.kv-table { display: grid; grid-template-columns: minmax(110px, auto) 1fr; margin: 0; }
.kv-table > dt, .kv-table > dd { margin: 0; padding: 9px 0; border-top: 1px solid var(--line); min-width: 0; }
.kv-table > dt:first-of-type, .kv-table > dt:first-of-type + dd { border-top: 0; }
.kv-table > dt { padding-right: 16px; color: var(--ink-3); font-size: var(--fs-sm); }
.kv-table > dd { color: var(--ink-1); overflow-wrap: anywhere; }
.kv-table > dd .mono { font-size: var(--fs-md); letter-spacing: .02em; color: var(--ink); }
.kv-table .lic-sub { display: block; }
/* Phones: the label sits above its value, so keys, codes and emails get the whole width (never cut). */
@media (max-width: 520px) {
  .kv-table { grid-template-columns: 1fr; }
  .kv-table > dt { padding: 9px 0 0; border-top: 1px solid var(--line); font-size: var(--fs-xs); }
  .kv-table > dd { padding: 1px 0 9px; border-top: 0; }
  .kv-table > dt:first-of-type { border-top: 0; }
  .lic-keyrow code { white-space: normal; overflow-wrap: anywhere; }
}
.panel-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px -18px -18px; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
@media (min-width: 720px) { .panel-foot { margin: 14px -22px -20px; padding: 12px 22px; } }
.panel-foot:empty { display: none; }
/* Recent requests on Home: compact rows. */
.row-list { margin: 0; padding: 0; list-style: none; }
.row-list li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.row-list li:first-child { border-top: 0; padding-top: 2px; }
.row-list .cell { flex: 1; }
.row-list .cell b { font-weight: 500; color: var(--ink); }
.row-list .cell span { color: var(--ink-3); font-size: var(--fs-xs); }

/* ============================================================ license cards (teacher) */
/* One license = one flat card: number + status on top, its details as rows, the buttons in a tinted footer. */
.lic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); gap: 16px; }
.lic-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.lic-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px 12px; border-bottom: 1px solid var(--line); }
.lic-head .itile { width: 30px; height: 30px; }
.lic-head .itile .ico { width: 16px; height: 16px; }
.lic-head .cell { flex: 1; }
.lic-no-label { color: var(--ink-3); font-size: var(--fs-xs); }
.lic-id { color: var(--ink); font-family: var(--serif); font-size: 1.25rem; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.lic-card.is-off .lic-id { color: var(--ink-3); }
.lic-body { padding: 4px 18px 6px; }
.lic-keyrow { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lic-keyrow code { flex: 1; min-width: 0; padding: 0; border: 0; background: none; color: var(--ink); font-size: var(--fs-md); letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lic-keyrow .icon-btn { width: 28px; height: 28px; }
@media (max-width: 480px) { .lic-keyrow code { font-size: var(--fs-xs); letter-spacing: 0; } }
.lic-line { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.lic-line .mono { font-size: var(--fs-md); letter-spacing: .02em; color: var(--ink); }
.lic-sub { color: var(--ink-3); font-size: var(--fs-xs); font-weight: 400; }
/* "Paid until" once its date has come (the yearly fee): due and still working in full, or not paid and read-only. */
.lic-sub.fee-due { color: var(--warn); }
.lic-sub.fee-over { color: var(--bad); font-weight: 500; }
/* The last backup of a laptop or a phone (server/lastbackup.js): older than 30 days, or none yet, says what to do. */
.lic-sub.backup-old { color: var(--warn); font-weight: 500; }
.backup-warn { margin-top: 4px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--warn-soft); color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.45; }
.backup-warn b { color: var(--warn); font-weight: 600; }
.backup-warn a { font-weight: 500; }
.lic-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.lic-card > .lic-actions { margin-top: auto; padding: 10px 18px; border-top: 1px solid var(--line); background: var(--surface-2); }
.lic-card > .lic-actions:empty { display: none; }
.lic-mini { display: flex; flex-direction: column; gap: 14px; }

/* My requests: a short list of rows. */
.req-list-t { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.req-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 12px 2px; border-top: 1px solid var(--line); }
.req-card:first-child { border-top: 0; padding-top: 2px; }
.req-card .itile { width: 30px; height: 30px; }
.req-card .itile .ico { width: 16px; height: 16px; }
.req-card .cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.req-card .req-title { font-weight: 500; color: var(--ink); }
.req-card .note { margin-top: 4px; padding: 7px 10px; border-radius: var(--r); background: var(--surface-2); color: var(--ink-2); font-size: var(--fs-sm); }
@media (max-width: 560px) { .req-card { grid-template-columns: auto 1fr; } .req-card > :last-child { grid-column: 1 / -1; justify-self: start; } }

/* ============================================================ request page */
.req-layout { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
@media (min-width: 1000px) { .req-layout { grid-template-columns: 1.2fr 1fr; } }
.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 18px; }
@media (max-width: 480px) { .choice-row { grid-template-columns: 1fr; } }
.choice { position: relative; display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--surface); cursor: pointer; transition: border-color .15s, background-color .15s, box-shadow .15s; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice b { display: block; font-size: var(--fs-md); font-weight: 600; color: var(--ink); }
.choice small { display: block; margin-top: 1px; color: var(--ink-3); font-size: var(--fs-xs); }
.choice:hover { border-color: var(--ink-4); }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.choice:has(input:focus-visible) { outline: 2px solid var(--ring); outline-offset: 2px; }
.choice:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.check-dot { position: absolute; top: 8px; right: 8px; display: none; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--brand); color: var(--on-brand); }
.check-dot .ico { width: 11px; height: 11px; stroke-width: 3; }
.choice:has(input:checked) .check-dot { display: grid; }
.send-btn { width: 100%; margin-top: 6px; }
.help-card { display: flex; flex-direction: column; gap: 14px; }
.help-card .mock-win { max-width: 420px; }
.mini-steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: ms; }
.mini-steps li { position: relative; min-height: 22px; padding: 1px 0 0 32px; font-size: var(--fs-md); line-height: 1.5; counter-increment: ms; }
.mini-steps li::before { content: counter(ms); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--brand-ink); font-weight: 600; font-size: var(--fs-xs); }

/* ============================================================ help page */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; align-items: start; }
.guide { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.guide > summary { display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; list-style: none; font-weight: 500; color: var(--ink); }
.guide > summary .itile { width: 28px; height: 28px; }
.guide > summary .itile .ico { width: 15px; height: 15px; }
.guide > summary::-webkit-details-marker { display: none; }
.guide > summary::after { content: ""; margin-left: auto; width: 14px; height: 14px; flex: none; background: var(--ink-3); -webkit-mask: var(--m-chev) center / contain no-repeat; mask: var(--m-chev) center / contain no-repeat; transform: rotate(90deg); transition: transform .15s; }
.guide[open] > summary::after { transform: rotate(-90deg); }
.guide > summary:hover { background: var(--surface-2); border-radius: var(--r-lg); }
.guide > :not(summary) { margin: 0 14px 14px; }
.steps-plain { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: sp; }
.steps-plain li { position: relative; padding-left: 32px; font-size: var(--fs-md); line-height: 1.5; counter-increment: sp; }
.steps-plain li::before { content: counter(sp); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--brand-ink); font-size: var(--fs-xs); font-weight: 600; }
.contact-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 20px 0 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); }

/* ============================================================ account page */
.profile-card { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.profile-card .avatar { width: 56px; height: 56px; font-size: 1.125rem; }
.profile-card h2 { margin: 0; font-size: 1.25rem; }
.profile-card .who-line { margin: 3px 0 0; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sec-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 16px; }
@media (min-width: 900px) { .sec-grid { grid-template-columns: 1fr 1fr; } }
.sec-grid > form { margin: 0; }
/* With the Backup email card (server/backupmail.js): three cards side by side on a wide window. */
@media (min-width: 1200px) { .sec-grid.sec-three { grid-template-columns: 1fr 1fr 1fr; } }
.bk-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 12px; }
.bk-line .mono { overflow-wrap: anywhere; }
.bk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
@media (max-width: 640px) { .bk-actions .btn { flex: 1 1 0; } }
.mfa-box, .danger-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 18px; }
.mfa-box-text, .danger-text { flex: 1 1 260px; min-width: 0; }
.mfa-box-text p, .danger-text p { margin: 2px 0 0; }
.mfa-box-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.row-ico { display: flex; align-items: center; gap: 12px; }
.qr-box { display: grid; place-items: center; width: 210px; max-width: 100%; margin: 14px auto; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; }
.qr-box svg { width: 100%; height: auto; }
.mfa-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.backup-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 14px 0; padding: 14px 14px 14px 36px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); font-family: var(--mono); font-size: var(--fs-md); }

/* ============================================================ distributor pages */
.credits-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px 0 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink-3); font-weight: 400; font-size: var(--fs-md); white-space: nowrap; }
.credits-pill .itile { width: auto; height: auto; border: 0; background: none; color: var(--gold); }
.credits-pill .itile .ico { width: 16px; height: 16px; }
.credits-pill b { font-size: .9375rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.credits-pill.low { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); color: var(--bad); }
.credits-pill.low .itile { color: var(--bad); }
.lock-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 0 0; color: var(--ink-3); font-size: var(--fs-sm); }
.lock-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who .cell { min-width: 0; }
.owner { font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.key-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.key-mask { min-width: 0; padding: 0; border: 0; background: none; color: var(--ink-2); font-size: var(--fs-sm); letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.key-cell .icon-btn { width: 28px; height: 28px; }
.laptop-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.laptop-cell > .ico { width: 15px; height: 15px; color: var(--ink-4); }
.laptop-cell .mono { white-space: nowrap; font-size: var(--fs-sm); color: var(--ink-1); }
.lic-add { display: flex; align-items: center; gap: 8px; }
.lic-add input { width: min(260px, 58vw) !important; font-family: var(--mono); letter-spacing: .03em; }
@media (max-width: 640px) { .lic-add { width: 100%; } .lic-add input { flex: 1; width: auto !important; min-width: 0; } }
.made-day { font-weight: 400; color: var(--ink-3); font-size: var(--fs-xs); }
table.lic-list td:first-child { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
/* The distributor's list is a table at every size now (a tap on a row opens Manage); on a laptop its cells wrap as they always did. */
@media (max-width: 640px) { table.data.compact.lic-list .who .cell { max-width: 230px; } table.data.compact.lic-list .who .cell span { overflow-wrap: normal; white-space: nowrap; } }
@media (min-width: 641px) { table.data.compact.lic-list td { white-space: normal; } table.data.compact.lic-list .key-mask, table.data.compact.lic-list .status, table.data.compact.lic-list td.num { white-space: nowrap; } }
@media (min-width: 641px) { table.lic-list td:nth-child(2) { min-width: 160px; } }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
.log-more { display: flex; justify-content: center; margin: 12px 0 0; }
.log-more:not(:has(> :not([hidden]))) { display: none; }
.tx-what { min-width: 0; }
.tx-row { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.tx-row .itile { width: 28px; height: 28px; }
.tx-row .itile .ico { width: 15px; height: 15px; }
.tx-lines { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.tx-lines strong { font-weight: 500; color: var(--ink); }
.tx-lines span { color: var(--ink-3); font-size: var(--fs-xs); overflow-wrap: anywhere; }
.tx-bad { color: var(--bad); }
.tx-by { margin-left: 8px; padding: 1px 7px; border-radius: var(--r-sm); background: var(--surface-3); color: var(--ink-2); font-size: .6875rem; font-weight: 500; vertical-align: 1px; }
.tx-ref { color: var(--ink-3); font-family: var(--mono); font-size: var(--fs-xs); white-space: nowrap; }
table.tx-table td.num { text-align: right; font-weight: 600; }

/* Confirm it's you */
.unlock-wrap { max-width: 480px; margin: 0 auto; }
.unlock-art { position: relative; display: grid; place-items: center; width: 64px; height: 64px; margin: 4px auto 14px; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface-2); color: var(--brand-ink); }
.unlock-art .ico { width: 30px; height: 30px; stroke-width: 1.6; }
.unlock-art .badge { position: absolute; right: -7px; bottom: -7px; display: grid; place-items: center; width: 26px; height: 26px; border: 2px solid var(--surface); border-radius: 50%; background: var(--brand); color: var(--on-brand); }
.unlock-art .badge .ico { width: 13px; height: 13px; stroke-width: 2.2; }
.unlock-wrap .panel-head { justify-content: center; }
.unlock-wrap .panel-title { font-family: var(--serif); font-size: 1.375rem; }
.unlock-wrap .panel { text-align: left; }
.unlock-intro { text-align: center; margin: 0 0 16px; }
.unlock-resend { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 0 0; }
.unlock-alt { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }

/* Generate dialog */
.gen-head-art { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); }
.gen-head-art p { margin: 0; color: var(--ink-3); font-size: var(--fs-sm); }
.gen-head-art b { display: block; color: var(--ink); font-size: .9375rem; font-weight: 600; }
.qty-row { display: flex; align-items: stretch; gap: 6px; }
.qty-row input { max-width: 96px; text-align: center; font-size: 1rem !important; font-weight: 600; }
.qty-btn { display: grid; place-items: center; width: 38px; flex: none; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.qty-btn:hover:not(:disabled) { background: var(--surface-3); color: var(--ink); }
.qty-btn:disabled { opacity: .45; cursor: not-allowed; }
.gen-done { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-weight: 600; font-size: .9375rem; color: var(--ok); }
.gen-done::before { content: ""; width: 20px; height: 20px; flex: none; background: currentColor; -webkit-mask: var(--m-ok) center / contain no-repeat; mask: var(--m-ok) center / contain no-repeat; }
.mail-line { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; font-size: var(--fs-md); font-weight: 500; }
.mail-line.ok { color: var(--ok); }
.mail-line.bad { color: var(--bad); }
.gen-list { display: grid; gap: 0; margin: 0 0 14px; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.gen-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 12px; background: var(--surface); }
.gen-list li + li { border-top: 1px solid var(--line); }
.gen-no { padding: 1px 7px; border-radius: var(--r-sm); background: var(--surface-3); color: var(--ink-1); font-weight: 600; font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.gen-key { flex: 1; min-width: 0; padding: 0; border: 0; background: none; font-size: var(--fs-md); font-weight: 500; letter-spacing: .03em; color: var(--ink); overflow-wrap: anywhere; }
.gen-dl { font-weight: 500; }

/* Manage dialog */
.manage-card { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); }
div.who-cell, td.who-cell > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.who-cell strong { font-size: var(--fs-md); font-weight: 600; color: var(--ink); }
.who-cell span { color: var(--ink-3); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.manage-state { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.manage-actions > .made-actions { margin-bottom: 4px; }
.kv-list { display: grid; gap: 6px; }
.kv-list .kv { padding: 7px 10px; border-radius: var(--r); background: var(--surface); }

/* ============================================================ admin desk */
.req-item { padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.req-item + .req-item { margin-top: 12px; }
.req-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.req-head .num { font-weight: 600; color: var(--ink); }
.req-who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.req-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 16px; padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); }
.req-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.code-input { font-family: var(--mono); font-size: var(--fs-sm); }
.inline-select { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-3); font-weight: 400; font-size: var(--fs-sm); }
.inline-select select { width: auto; min-height: 34px; }
.search { display: flex; gap: 8px; }
.search input { min-width: min(300px, 60vw); min-height: 36px; }
.activity-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.activity-list li { display: flex; align-items: flex-start; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: var(--fs-md); }
.activity-list li:last-child { border-bottom: 0; }
.activity-list .itile { width: 28px; height: 28px; }
.activity-list .itile .ico { width: 15px; height: 15px; }
.activity-list .cell { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.activity-list .cell span { color: var(--ink-3); font-size: var(--fs-xs); overflow-wrap: anywhere; }
.activity-list time { color: var(--ink-3); font-size: var(--fs-xs); white-space: nowrap; }
.dash-grid.top { align-items: start; }
.rank { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.rank li { display: grid; grid-template-columns: minmax(90px, 30%) 1fr auto; align-items: center; gap: 12px; font-size: var(--fs-md); }
.rank .rank-name { overflow-wrap: anywhere; line-height: 1.3; font-weight: 500; color: var(--ink-1); }
.rank .rank-track { height: 8px; border-radius: 0 4px 4px 0; background: var(--surface-3); overflow: hidden; }
.rank .rank-bar { display: block; height: 100%; min-width: 4px; border-radius: 0 4px 4px 0; background: var(--viz-1); }
.rank b { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 32px; text-align: right; }
.waiting-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.waiting-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); }
.waiting-list .cell { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.waiting-list .cell span { color: var(--ink-3); font-size: var(--fs-xs); overflow-wrap: anywhere; }

/* ============================================================ sales tracking (admin desk, 2026-09-30) */
/* The second series in a two-series chart (ochre, checked next to forest: styles.css --viz-2). */
.chart .bar.s2 { fill: var(--viz-2); }
.fill-1 { --c-fill: var(--viz-1); }
.fill-2 { --c-fill: var(--viz-2); }
.legend-inline { display: flex; flex-wrap: wrap; gap: 6px 26px; margin-top: 12px; }
.legend-inline li { display: inline-grid; grid-template-columns: 10px auto auto auto; gap: 8px; }
.chart-tip div { color: #F6F8F7; font-weight: 400; }

/* Money. Right-aligned, digits the same width; a refund reads as minus; "not written down yet" is a quiet button. */
td.money, .money { font-variant-numeric: tabular-nums; white-space: nowrap; }
td.money { text-align: right; }
th.money-h { text-align: right; }
.money.neg { color: var(--bad); }
.money.free { color: var(--ink-3); }
.money-sub { display: block; color: var(--ink-3); font-size: var(--fs-xs); font-weight: 400; }
.amount-add { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 0 9px; border: 1px dashed var(--line-2); border-radius: var(--r-sm); background: none; color: var(--ink-3); font: 500 var(--fs-xs)/1 var(--sans); cursor: pointer; white-space: nowrap; }
.amount-add:hover { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); }
.amount-add .ico { width: 13px; height: 13px; }
.amount-edit { display: inline-flex; align-items: center; gap: 6px; }
.icon-btn.plain { display: inline-grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink-3); cursor: pointer; }
.icon-btn.plain:hover { background: var(--surface-3); color: var(--ink); }
.icon-btn.plain .ico { width: 14px; height: 14px; }

/* KPI strips with six tiles: 3 × 2 on laptops, 2 × 3, then one column (an auto-fit strip would leave one orphan tile). */
.kpis.kpis-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 899px) { .kpis.kpis-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 519px) { .kpis.kpis-6 { grid-template-columns: 1fr; } }
.kpis.kpis-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1099px) { .kpis.kpis-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 719px) { .kpis.kpis-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 439px) { .kpis.kpis-5 { grid-template-columns: 1fr; } }
.kpis.kpis-sm .kpi { padding: 11px 14px 12px; }
.kpis.kpis-sm .kpi-value { font-size: 1.375rem; }
.kpi-sub .up, .kpi-sub .down, .kpi-sub .flat { font-weight: 600; white-space: nowrap; }
.kpi-sub .up { color: var(--ok); }
.kpi-sub .down { color: var(--bad); }
.kpi-sub .link-btn { font-size: inherit; }
.dlg-kpis { margin: 0 0 16px; }

/* Needs attention / renewals: the waiting-list rows with a small line icon and a state word. */
.attn-list .itile { width: 28px; height: 28px; flex: none; }
.attn-list .itile .ico { width: 15px; height: 15px; }
.attn-list .cell b { font-weight: 600; color: var(--ink); }
.attn-list .state { flex: none; }
.panel-empty { margin: 0; padding: 6px 2px; color: var(--ink-3); font-size: var(--fs-md); }
.panel-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 12px 0 0; color: var(--ink-3); font-size: var(--fs-xs); }

/* One payment: amount + how it was paid, side by side (stacked on phones). */
.pay-row { display: grid; grid-template-columns: 3fr 2fr; gap: 12px; align-items: start; }
@media (max-width: 519px) { .pay-row { grid-template-columns: 1fr; gap: 0; } }
.pay-lines { margin: 0 0 14px; }
.pay-lines p { margin: 0 0 4px; }
/* What to check before pressing the button (approving a payment). */
.pay-warn { margin: 0 0 14px; }

/* The receipt picture a teacher sent with a payment (server/buy.js): small on the request, large in its dialog. */
.req-proof { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.req-proof + p { margin-top: 10px; }
.req-proof-thumb { flex: none; padding: 0; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface-2); line-height: 0; overflow: hidden; cursor: zoom-in; }
.req-proof-thumb img { display: block; width: 84px; height: 112px; object-fit: cover; }
.req-proof-thumb:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.receipt-full { display: block; max-width: 100%; max-height: 60vh; margin: 0 auto 12px; border: 1px solid var(--line); border-radius: var(--r); }

/* Sales list. */
.sale-what { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sale-what .chip { align-self: flex-start; }
.sale-note { max-width: 240px; color: var(--ink-3); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.tool-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Distributor table: credits left, with a warning word at zero; a small meter for how much was used. */
.use-cell { display: flex; flex-direction: column; gap: 4px; min-width: 96px; }
.use-cell .meter { height: 5px; }
.left-zero { color: var(--bad); font-weight: 600; }

/* One account / one distributor dialog. */
.acct-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.acct-head .avatar { width: 44px; height: 44px; font-size: 1rem; }
.acct-head .cell { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.acct-head .cell strong { font-size: 1.0625rem; font-weight: 600; color: var(--ink); }
.acct-head .cell span { color: var(--ink-3); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.acct-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.acct-block { margin: 0 0 4px; }
.acct-dist { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); }
.acct-dist span { flex: 1; min-width: 0; }
.acct-events { margin: 0; }
.dlg-chart { margin: 0 0 16px; }
.req-paid { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; }
table.data th.money-h { text-align: right; }
.money-sub { white-space: nowrap; }
.row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 176px; margin-left: auto; }
.use-cell { min-width: 84px; }
td.money .cell { align-items: flex-end; }
table.data.stack td.money .cell { align-items: flex-start; }
/* Money ranks: every row's number gets the same room, so the bars stay comparable. */
.rank.rank-wide li { grid-template-columns: minmax(90px, 30%) 1fr 84px; }
.rank.rank-wide b { min-width: 0; }
@media (max-width: 520px) {
  .attn-list li { flex-wrap: wrap; }
  .attn-list .cell { flex: 1 1 calc(100% - 42px); }
  .attn-list .state { margin-left: 40px; }
  .attn-list .btn { margin-left: auto; }
}

/* ============================================================ phones: the admin desk is used mostly on a phone (2026-09-30) */
.bottom-nav { display: none; }
.req-who span { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  /* The five pages used most, one thumb-tap away. The ☰ menu keeps Activity, My account and Sign out. */
  .bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 1px; padding: 5px 3px calc(5px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); }
  .bottom-nav[hidden] { display: none; }
  .bottom-nav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px; border-radius: var(--r); color: var(--ink-3); font: 500 .6875rem/1.1 var(--sans); text-decoration: none; -webkit-tap-highlight-color: transparent; }
  .bottom-nav a .ico { width: 22px; height: 22px; }
  .bottom-nav a[aria-current] { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
  .bottom-nav .count { position: absolute; top: 3px; left: calc(50% + 6px); display: grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--gold); color: #17201B; font-size: .625rem; font-weight: 700; line-height: 1; }
  .bottom-nav .count:empty { display: none; }
  /* Leave room under the page for the bar. */
  body.app:has(.bottom-nav:not([hidden])) .main-col { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }

  /* Fingers, not a mouse: 44px buttons and fields, a bigger reach for the info button, the x and the small pencil. */
  body.app .btn, body.app .btn-sm { min-height: 44px; }
  body.app .btn-sm { padding: 0 16px; font-size: var(--fs-md); }
  body.app select, body.app input:not([type="checkbox"]):not([type="radio"]) { min-height: 44px; }
  .tip { position: relative; }
  .tip::after { content: ""; position: absolute; inset: -10px; }
  .amount-add { min-height: 44px; padding: 0 14px; font-size: var(--fs-sm); }

  /* KPI tiles two by two (one long column of tiles is a lot of scrolling); a lone last tile takes the full row. */
  .kpis, .kpis.kpis-5, .kpis.kpis-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis > .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .kpi, .kpis.kpis-sm .kpi { padding: 12px 14px 13px; }
  .kpi-value, .kpis.kpis-sm .kpi-value { font-size: 1.375rem; }
  .kpi-label { font-size: var(--fs-xs); }

  /* Request cards: Reject and Approve share the row (see the phone rules at the end of this file). */
  .req-facts { grid-template-columns: 1fr; }

  /* ---- Lists as real tables, like KiTifi's License List (Rom: "tabular … for space saving and easy to spot"): every column is
     there, ONE line a row, the table scrolls sideways inside its box with its first column pinned, and a tap on a row opens
     the rest (the buttons a row used to carry). ---- */
  .table-wrap:has(> table.compact) { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
  table.data.compact { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-md); }
  table.data.compact .hide-sm { display: none; }
  table.data.compact th, table.data.compact td { padding: 9px 12px; white-space: nowrap; border-bottom: 1px solid var(--line); }
  table.data.compact thead th { background: var(--surface-3); }
  table.data.compact tbody tr { --row: var(--surface); }
  table.data.compact tbody tr:nth-child(even) { --row: var(--surface-2); }
  table.data.compact tbody td { background: var(--row); line-height: 1.3; }
  table.data.compact tbody tr:last-child td { border-bottom: 0; }
  table.data.compact tr.row-tap:active td { background: var(--surface-3); }
  table.data.compact th:first-child, table.data.compact td:first-child { position: sticky; left: 0; z-index: 2; box-shadow: 1px 0 0 var(--line); }
  table.data.compact th:first-child { z-index: 3; }
  table.data.compact .who { gap: 0; }
  table.data.compact .who .avatar { display: none; }
  table.data.compact .cell { display: block; max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
  table.data.compact .lic-sub, table.data.compact .money-sub { display: none; }
  table.data.compact td.clip { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
  table.data.compact td.money, table.data.compact th.money-h { text-align: right; }
  table.data.compact .amount-add { min-height: 32px; padding: 0 9px; }
  table.data.compact .status { white-space: nowrap; }
  table.data.compact .icon-btn { width: 28px; height: 28px; }
  table.data.compact th, table.data.compact td { padding-top: 8px; padding-bottom: 8px; }
  table.data.compact .tx-row { align-items: center; gap: 8px; }
  table.data.compact .tx-row .itile { width: 24px; height: 24px; }
  table.data.compact .tx-row .itile .ico { width: 13px; height: 13px; }
  table.data.compact .use-cell { min-width: 0; }
  table.data.compact .use-cell .meter { display: none; }

  /* The five-tile strips (licenses, accounts, distributors, sales) become one row you swipe: half the height. */
  .kpis.kpis-5, .kpis.kpis-6 { display: flex; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .kpis.kpis-5::-webkit-scrollbar, .kpis.kpis-6::-webkit-scrollbar { display: none; }
  .kpis.kpis-5 > .kpi, .kpis.kpis-6 > .kpi { flex: 0 0 150px; }
  .kpis.kpis-5 .kpi-sub, .kpis.kpis-6 .kpi-sub { white-space: normal; }

  /* Secondary tools (Export, Move an older license) as icon buttons: the label goes, the tap target stays. */
  .btn-tool .btn-text { display: none; }
  .btn-tool { width: 44px; padding: 0; justify-content: center; }
}
@media (max-width: 640px) {
  /* A long email wraps inside its column instead of running under the amount. */
  .who .cell span, .who .cell strong { overflow-wrap: anywhere; }
}
/* A wide table scrolls inside its own box: its hidden (sr-only, absolutely placed) headings must not widen the page. */
body.app .table-wrap { position: relative; }

.date-short { display: none; }
@media (max-width: 640px) { .date-full { display: none; } .date-short { display: inline; } }

/* ============================================================ the ProLicense menu on the admin pages (2026-09-30) */
/* Filter chips (All licenses): one row that scrolls sideways on a phone, each with how many. */
.chip-row { display: flex; gap: 8px; margin: 0 0 14px; padding: 2px 1px 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chip-row::-webkit-scrollbar { display: none; }
.chip-btn { display: inline-flex; flex: none; align-items: center; gap: 7px; min-height: 38px; padding: 0 13px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); color: var(--ink-2); font: 500 var(--fs-md)/1 var(--sans); cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.chip-btn:hover { background: var(--surface-3); }
.chip-btn .n { min-width: 22px; padding: 2px 6px; border-radius: 999px; background: var(--surface-3); color: var(--ink-3); font-size: var(--fs-xs); font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.chip-btn[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.chip-btn[aria-pressed="true"] .n { background: var(--surface); color: var(--brand-ink); }
.lic-search { margin: 0 0 12px; }
.lic-search input { flex: 1; min-width: 0; }
.load-more { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 12px 0 0; }
.load-more:has(.btn[hidden]) { justify-content: center; }
.flag-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 3px; font-size: var(--fs-sm); color: var(--ink-2); }
tr.row-tap { cursor: pointer; }
tr.row-tap:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
.waiting-list li.tap { cursor: pointer; }
.waiting-list li.tap:hover { background: var(--surface-3); }
.waiting-list li.tap:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }

/* One license's page: the buttons in a grid, two across on a phone. */
.lic-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; margin: 14px 0 4px; }
.lic-actions .btn { justify-content: center; }

/* Sell a license, Check a code. */
.sell-panel form > .btn { margin-top: 6px; }
.check-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.check-buttons .btn[type="submit"] { margin-left: auto; }
[data-check-result] { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.check-verdict { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px; font-size: 1rem; font-weight: 600; line-height: 1.4; }
.check-verdict .ico { width: 24px; height: 24px; flex: none; }
.check-verdict.ok { color: var(--ok); }
.check-verdict.bad { color: var(--bad); }

/* The phone's bottom bar: the button ("More") looks like the links. Sell (the key) is drawn like the others: no filled
   circle behind it (Rom, 2026-10-04, U-5). */
@media (max-width: 640px) {
  .bottom-nav button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px; padding: 0; border: 0; border-radius: var(--r); background: none; color: var(--ink-3); font: 500 .6875rem/1.1 var(--sans); cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .bottom-nav button .ico { width: 22px; height: 22px; }
  .bottom-nav button[aria-expanded="true"] { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
}

td.col-primary, td.col-primary strong { color: var(--brand-ink); font-weight: 600; }
td.clip { max-width: 360px; overflow-wrap: anywhere; }

/* The lists are tables, not paragraphs: one line a cell at every size; the box scrolls sideways when a row is wider (long notes may wrap). */
table.data.compact th, table.data.compact td { white-space: nowrap; }
table.data.compact td.clip { white-space: normal; }
@media (max-width: 640px) { table.data.compact td.clip { white-space: nowrap; } }

@media (max-width: 520px) {
  /* "Sold by you recently": one line a row, like the tables. */
  .attn-list li.tap { flex-wrap: nowrap; }
  .attn-list li.tap .cell { flex: 1 1 0; min-width: 0; }
  .attn-list li.tap .cell b, .attn-list li.tap .cell span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .attn-list li.tap .status { margin-left: 0; }
}

/* ============================================================ fewer tabs (2026-09-30): People, Licenses, one distributor */
/* The switch at the top of People (Distributors · Accounts · Activity), and the tabs in a distributor's page. */
.seg.seg-nav, .seg.seg-tabs { display: flex; gap: 0; width: 100%; margin: 0 0 14px; padding: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; }
.seg-nav > a, .seg-tabs > button { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; min-height: 38px; margin-bottom: -1px; padding: 4px 14px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--ink-3); font: 500 var(--fs-md)/1.2 var(--sans); text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.seg-nav > a:hover, .seg-tabs > button:hover { color: var(--ink); }
.seg-nav > a[aria-current], .seg-tabs > button[aria-selected="true"] { border-bottom-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
.seg-nav > a:focus-visible, .seg-tabs > button:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.dlg-kpis + .seg-tabs { margin-top: 2px; }
.view-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; }
.view-actions p { margin: 0; }
.view-actions [hidden] + .btn { margin-left: auto; }
.sus-note { margin: 0 0 10px; }
.chip-btn.warn .n { background: var(--bad-soft); color: var(--bad); }

/* Licenses: the search and the distributor picker sit on one line on a laptop, one under the other on a phone. */
[data-lic-bar] { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
[data-lic-bar][hidden] { display: none; }
[data-lic-bar] .lic-search { flex: 1 1 320px; margin: 0; }
.lic-dist { flex: 0 1 260px; }
.lic-dist select { min-width: 0; width: 100%; }
.check-result { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.check-result[hidden] { display: none; }
/* Check a code: the release code with its Copy button on one line, and the sentence that says what a release code is. */
.check-release { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.check-note { margin: 10px 0 12px; }
/* …and the optional laptop box under Paste / Clear stands a field's own gap below them. */
.check-buttons + .field { margin-top: 14px; }

/* ============================================================ the developer's old ledger and old log on the desk (2026-10-09, server/ledger.js) */
/* The column "In your ledger" is in the Licenses table always and is shown only in its two ledger views (Older codes, Ledger to check). */
.lic-table:not(.show-ledger) .col-ledger { display: none; }
/* What the ledger says of a license, as small tags: Active, Released, Lost, and "Needs a look". */
.led-tags { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
td.col-ledger .led-tags { flex-wrap: nowrap; }
.how-tag.led-active { background: var(--ok-soft); color: var(--ok); }
.how-tag.led-released { background: none; box-shadow: inset 0 0 0 1px var(--line-2); }
.how-tag.led-lost { background: var(--bad-soft); color: var(--bad); }
.how-tag.led-look { background: var(--warn-soft); color: var(--warn); font-weight: 600; }
/* On the license's page: what needs the developer's eyes, above the ledger's own rows. */
.led-look-box { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); border-radius: var(--r); background: var(--warn-soft); }
.led-look-words { display: flex; align-items: flex-start; gap: 10px; flex: 1 1 320px; min-width: 0; }
.led-look-words .ico { flex: none; margin-top: 2px; color: var(--warn); }
.led-look-words p { margin: 0; font-size: var(--fs-md); line-height: 1.5; }
.led-look-words p + p { margin-top: 6px; }
.led-table .btn { white-space: nowrap; }
.led-note { margin: 8px 0 0; }
/* School years: when teachers can pay the yearly fee, one row for a June 15 (the desk's own row, .acct-dist). */
[data-fee-panel] { margin-top: 16px; }
.fee-list { display: grid; gap: 8px; }
.fee-row { margin: 0; }
.fee-row > span { display: grid; gap: 2px; }
.fee-row .lic-sub { display: block; }
/* The desk as an app: the one line for an iPhone at the foot of the menu (never shown when the menu is folded to icons). */
.side-note { margin: 4px 10px 6px; color: var(--nav-ink-muted); font-size: var(--fs-xs); line-height: 1.4; }
.side-collapsed .side-note { display: none; }
/* Sales (2026-10-09, migration 0025): Price and Still owed are columns of the list where the site keeps what a sale cost. */
.sales-table:not(.can-owe) .col-owe { display: none; }
/* …and with two more columns the list keeps ONE row a sale on a laptop: a long name or address and the note are cut
   with … (the whole text is in the tooltip), so Date, Who, Price, Received, Still owed and What fit without scrolling. */
@media (min-width: 641px) {
  .sales-table .who .cell { max-width: 150px; }
  .sales-table .who .cell > * { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  table.data.compact.sales-table td.sale-note { min-width: 150px; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; }
}
.owes-cell { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; }
.money.owes { color: var(--warn); font-weight: 600; }
.owes-cell .icon-btn { width: 28px; height: 28px; }
.oldsale-list li { align-items: flex-start; }
.oldsale-list li .btn { flex: none; align-self: center; }
/* People, Activity: the old log's own search and its one switch, on one line on a laptop and one under the other on a phone. */
.oldlog-bar { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; margin: 0 0 12px; }
.oldlog-bar .lic-search { flex: 1 1 280px; margin: 0; }
.oldlog-bar .oldlog-switch { flex: 0 1 auto; margin: 0; align-items: center; min-height: 38px; }
.oldlog-table td.clip { max-width: 520px; }

@media (max-width: 400px) { .bottom-nav a { font-size: .625rem; } }

@media (max-width: 640px) {
  /* "Need you": one line a row (icon, name, how many left, the button as an icon). */
  .attn-list li { flex-wrap: nowrap; padding: 8px 10px; gap: 8px; }
  .attn-list li .cell { flex: 1 1 0; min-width: 0; }
  .attn-list li .cell b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .attn-list li:not(.tap) .cell span { display: none; }
  .attn-list .state { margin-left: 0; }
  .attn-list .btn { margin-left: 0; }
}

/* ============================================================ how a license is on its laptop, the license History, Distributor records (2026-09-30: B-008, B-009, B-012) */
/* A small tag with how the license got onto its laptop. The words come from the site (howLabel, the same on every page); the tint follows `how`. */
.how-tag { display: inline-flex; align-items: center; align-self: flex-start; padding: 1px 8px; border-radius: var(--r-sm); background: var(--surface-3); color: var(--ink-2); font-size: var(--fs-xs); font-weight: 500; line-height: 1.5; white-space: nowrap; }
.how-email { background: var(--info-soft); color: var(--info); }
.how-recovered { background: var(--warn-soft); color: var(--warn); }
.how-offline, .how-upgrade, .how-code { background: none; box-shadow: inset 0 0 0 1px var(--line-2); }
.kv .how-tag, .manage-state .how-tag { align-self: center; }

/* Two lines in one cell on a laptop (the laptop and its tag, the buyer and their Gmail, credits and the balance), one line on a phone. */
.pair { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.pair-end { align-items: flex-end; }
.pair-sub { color: var(--ink-3); font-size: var(--fs-xs); font-weight: 400; white-space: nowrap; }
.tx-head { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 8px; min-width: 0; }
.history-list .cell, .names-list .cell { gap: 2px; }
.history-list .cell span, .names-list .cell span { overflow-wrap: anywhere; }
.history-list + .load-more, .names-list + .load-more { justify-content: center; }
@media (max-width: 640px) {
  table.data.compact .pair { flex-direction: row; align-items: center; gap: 8px; }
  table.data.compact .pair-end { justify-content: flex-end; }
  table.data.compact .tx-head { flex-wrap: nowrap; }
}

/* Distributor records: the filters above the table (label over the box, so a phone can pair them two by two). */
.rec-bar { display: flex; flex-direction: column; gap: 10px; margin: 0 0 12px; }
.rec-bar .rec-q { width: 100%; min-height: 36px; }
.rec-grid { display: grid; grid-template-columns: 2fr 2fr 1.4fr 1.3fr 1.3fr; gap: 10px 12px; align-items: end; }
.rec-grid .inline-select { display: flex; flex-direction: column; align-items: stretch; gap: 4px; min-width: 0; }
.rec-grid .inline-select select, .rec-grid .inline-select input { width: 100%; min-width: 0; min-height: 36px; }
.rec-clear { grid-column: 1 / -1; justify-self: start; font-size: var(--fs-md); }
/* Laptops: the filters are always open, so the "Filters" button is not needed. Phones: they fold under it. */
.rec-filters > summary { display: none; list-style: none; }
.rec-filters > summary::-webkit-details-marker { display: none; }
@media (max-width: 899px) { .rec-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .rec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 10px; }
  .rec-grid .rec-dist { grid-column: 1 / -1; }
  .rec-filters > summary { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: 500 var(--fs-md)/1 var(--sans); cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .rec-filters > summary::after { content: ""; width: 12px; height: 12px; background: var(--ink-3); -webkit-mask: var(--m-chev) center / contain no-repeat; mask: var(--m-chev) center / contain no-repeat; transform: rotate(90deg); transition: transform .15s; }
  .rec-filters[open] > summary::after { transform: rotate(-90deg); }
  .rec-filters > summary .n { min-width: 20px; padding: 2px 6px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-size: var(--fs-xs); font-weight: 600; text-align: center; }
}
[data-rec-table].is-loading { opacity: .55; transition: opacity .15s; }
.rec-table td.tx-what { min-width: 0; }
/* Ten columns: on a laptop the long ones (what happened, buyer, distributor, dates) wrap so the whole row fits without sliding sideways;
   on a phone the rule above keeps ONE line a row and the box scrolls. */
@media (min-width: 641px) {
  table.data.compact.rec-table { font-size: var(--fs-sm); }
  table.data.compact.rec-table th, table.data.compact.rec-table td { padding: 8px 7px; white-space: normal; }
  table.data.compact.rec-table td.nowrap, table.data.compact.rec-table td.tx-ref, table.data.compact.rec-table td.num, table.data.compact.rec-table td.rec-when { white-space: nowrap; }
  table.data.compact.rec-table td.tx-what { min-width: 168px; }
  table.data.compact.rec-table td.col-primary { min-width: 78px; }
  table.data.compact.rec-table .pair-sub { white-space: normal; }
  table.data.compact.rec-table th.money-h { text-align: right; }
}

/* ============================================================ Sell a license: sale type, amount, remarks (2026-10-01: B-016) */
/* Laptops: two columns side by side (who is buying · how it was sold), the options and the button under them. Phones: one column. */
.sell-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 36px; }
@media (min-width: 900px) { .sell-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.sell-sec { min-width: 0; }
.sell-h { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font: 600 .9375rem/1.2 var(--sans); letter-spacing: -.006em; color: var(--ink); }
.sell-h .ico { width: 16px; height: 16px; color: var(--ink-3); }
.sell-sec + .sell-sec { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .sell-sec + .sell-sec { margin-top: 0; padding-top: 0; border-top: 0; } }
/* Name and school side by side when the column is wide enough, one under the other when it is not. */
.sell-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 12px; }

/* Sale type: three big tappable cards (radios, so the arrow keys work too). */
.sale-kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sale-kind { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; min-height: 84px; padding: 10px 6px; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--surface); text-align: center; cursor: pointer; transition: border-color .15s, background-color .15s, box-shadow .15s; -webkit-tap-highlight-color: transparent; }
.sale-kind input { position: absolute; opacity: 0; pointer-events: none; }
.sale-kind .ico { width: 22px; height: 22px; margin-bottom: 2px; color: var(--ink-3); }
.sale-kind b { font-size: var(--fs-md); font-weight: 600; line-height: 1.2; color: var(--ink); }
.sale-kind small { color: var(--ink-3); font-size: var(--fs-xs); line-height: 1.25; }
.sale-kind:hover { border-color: var(--ink-4); }
.sale-kind:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.sale-kind:has(input:checked) .ico { color: var(--brand-ink); }
.sale-kind:has(input:focus-visible) { outline: 2px solid var(--ring); outline-offset: 2px; }

/* Paid: the amount with its peso sign, and how it was paid as a segmented choice (four equal buttons). */
.sell-paid[hidden] { display: none; }
.money-input { position: relative; }
.money-sign { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-weight: 500; pointer-events: none; }
body.app .sell-form .money-input input[name="amount"] { padding-left: 28px; font-variant-numeric: tabular-nums; }
.seg.seg-fill { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; gap: 2px; }
.seg-fill .seg-opt { justify-content: center; min-height: 40px; padding: 4px 6px; font-size: var(--fs-md); }

/* Free: How long (2026-10-28). Four choices in a row, two by two on a phone; the count as five equal buttons. */
.sell-free[hidden] { display: none; }
.seg-fill.sell-for .seg-opt { text-align: center; }
@media (max-width: 520px) { .seg.seg-fill.sell-for { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.seg.seg-fill.sell-for-n { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.sell-free input[type="date"] { max-width: 220px; }
/* (the end it gives, said under the choices: its own room before Remarks) */
.sell-free > .field-msg { margin: -6px 0 14px; }

/* The options under both columns, and the button: side by side on a laptop, stacked on a phone. */
.sell-foot { margin-top: 8px; }
.sell-opts .check { margin: 0 0 10px; }
.sell-opts details.more { margin: 0 0 16px; }
@media (min-width: 900px) {
  .sell-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 28px; align-items: start; margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--line); }
  .sell-foot .sell-go { width: auto; min-width: 260px; }
}

/* "Sold as": a small tag for a license made with Sell — Free (blue), Testing (amber), Paid with its amount (plain; outlined while no amount is written down). */
.sold-tag { display: inline-flex; align-items: center; align-self: flex-start; padding: 1px 8px; border-radius: var(--r-sm); background: var(--surface-3); color: var(--ink-2); font-size: var(--fs-xs); font-weight: 500; line-height: 1.5; white-space: nowrap; }
.sold-free { background: var(--info-soft); color: var(--info); }
.sold-testing { background: var(--warn-soft); color: var(--warn); }
.sold-open { background: none; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-3); }
.sold-row { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.sale-what .sold-tag { margin-top: 1px; }
.kv-table .amount-edit .icon-btn { width: 28px; height: 28px; }
@media (max-width: 640px) { .sell-opts .check { align-items: center; min-height: 44px; } }
/* Remarks in a list: one line, cut with … (the whole text is the tooltip, and is on the license's page). */
table.data.compact td.remarks-cell { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-3); }
/* Phones: a long buyer (a Gmail typed in place of a name) is cut, so the "Sold as" tag next to it stays in view. */
@media (max-width: 640px) {
  table.data.compact.lic-table td.col-primary, table.data.compact.recent-table td.col-primary { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
}

/* ============================================================ PHONES: ONE SET OF RULES (2026-10-01, B-015)
   Rom: "the alignment of the buttons in mobile view, revisit it … not just on that but the whole tabs in the mobile view".
   Every signed-in tab (admin, distributor, customer) follows the SAME rules at 640px and narrower; laptops are not touched.
   The numbers (tokens, used by every rule below):
     --ph-h 44px      every tap target (buttons, fields, chips, segments, dialog buttons)
     --ph-gap 10px    between controls in a row, and between a row of controls and the next one
     --ph-block 14px  between blocks (page head, KPI strip, chips, panels, cards, charts, alerts, form fields)
     --ph-side        the page's left/right gutter · --ph-pad the inside of a panel, card or dialog (14px ≤400px wide, else 16px)
   The patterns:
     Action row   = full width, no empty strip: buttons share it EQUALLY (two halves, three thirds); ONE flexible button or field
                    (a primary, a search box, a picker) with small icon squares (44×44, equal) beside it; an odd last button takes a full line.
     Filter row   = search box · picker · "Show N entries": one 44px bar each, same edges; a picker is one bar with its label inside
                    (prefix), a form's filters keep their label above the field.
     Chips        = ONE row that scrolls sideways, edge to edge; a short choice (≤4) is a segmented control, equal parts, full width.
     Dialogs      = head · body · footer with the same inside (--ph-pad); footer buttons share the row equally (dismiss left).
   Text is never cut inside a button: a long label wraps to two lines and the whole row grows with it. */
@media (max-width: 640px) {
  :root { --ph-h: 44px; --ph-gap: 10px; --ph-block: 14px; --ph-side: 14px; --ph-pad: 16px; }
  .page { padding: var(--ph-block) var(--ph-side) 36px; }

  /* ---- blocks: ONE gap between them (a block has no bottom margin; the one under it asks for the gap) ---- */
  .page-head { gap: var(--ph-gap); padding-bottom: 12px; }
  body.app :is([data-pane], [data-panel]) > * { margin-bottom: 0; }
  body.app :is([data-pane], [data-panel]) > * + * { margin-top: var(--ph-block); }
  body.app :is([data-pane], [data-panel]) > .sec-title { margin: 22px 0 12px; }
  .dash-grid, .sec-grid, .home-grid, .home-side, .lic-grid, .req-layout { gap: var(--ph-block); }
  .guide-grid, .faq-list { gap: var(--ph-gap); }
  .panel + .panel, .req-item + .req-item, .stack-lg > * + * { margin-top: var(--ph-block); }
  :is(.sec-grid, .dash-grid, .req-layout, .home-grid, .home-side) > .panel + .panel { margin-top: 0; }
  .panel, .chart-card, .req-item { padding: var(--ph-pad); }
  .panel-head { gap: var(--ph-gap); margin-bottom: 12px; }
  .panel-head > .panel-tools:has(> .inline-select, > .btn, > form) { flex: 1 1 100%; margin-left: 0; }
  .panel-tools > .inline-select { flex: 1 1 0; }
  /* Lists: every row is one line and the same height (a 44px tap target), whatever its cells hold. */
  table.data.compact tbody td { height: calc(var(--ph-h) + 1px); } /* 44px and the row's hairline */
  table.data.compact .amount-add { min-height: 28px; }
  table.data.compact .sale-what .chip { display: none; }
  .panel:has(table.compact) { padding: var(--ph-pad); }
  .panel:has(table.compact) .panel-head { padding-inline: 0; }

  /* ---- page head: [chip] [title] [ⓘ] on the first line, the tools on the second, full width ---- */
  .page-tools { flex: 1 1 100%; width: 100%; margin: 0; flex-wrap: wrap; align-items: stretch; gap: var(--ph-gap); }
  .page-tools > .btn { flex: 1 1 0; min-width: 0; }
  .page-tools > .btn-tool { flex: 0 0 var(--ph-h); width: var(--ph-h); }
  /* A tool button alone in the row has room for its words, and fills the row. */
  .page-tools > .btn-tool:only-child { flex: 1 1 0; width: auto; padding: 0 14px; }
  .page-tools > .btn-tool:only-child .btn-text { display: inline; }
  .page-tools > .inline-select, .page-tools > form, .page-tools > .credits-pill { flex: 1 1 0; min-width: 0; }
  /* A search form takes a line of its own, above the picker; its tool buttons sit after the picker. */
  .page-tools > form.search { order: -1; flex: 1 1 100%; }
  .page-tools > .btn-tool:not(:only-child) { order: 1; }
  .credits-pill { justify-content: center; min-height: var(--ph-h); }
  .page-tools > .chip { flex: 0 0 auto; }

  /* ---- buttons: same height, words centered, a long label wraps instead of spilling ---- */
  body.app .btn, body.app .btn-sm, body.app .btn-lg { min-height: var(--ph-h); }
  body.app .btn-sm { padding: 0 14px; }
  :is(.page-tools, .sheet-foot, .lic-actions, .made-actions, .req-actions, .check-buttons, .view-actions, .mfa-box-actions, .next-action, .load-more) > .btn { white-space: normal; padding-block: 6px; line-height: 1.25; text-align: center; }
  .btn-tool { width: var(--ph-h); padding: 0; }
  body.app .icon-btn { width: var(--ph-h); height: var(--ph-h); }
  body.app table.data.compact .icon-btn { width: 28px; height: 28px; }
  .form-btn, .send-btn, .sell-go { display: flex; width: 100%; }
  .code6, .code-backup { max-width: none; } /* a code box is as wide as the button under it */

  /* ---- groups of buttons: two equal columns; an odd last button grows to take the whole line (flex, so a hidden button never spoils it) ---- */
  .lic-actions, .made-actions, .req-actions, .check-buttons, .mfa-box-actions, .next-action { display: flex; flex-wrap: wrap; align-items: stretch; gap: var(--ph-gap); width: 100%; margin: 0; }
  .lic-actions > .btn, .made-actions > .btn, .req-actions > .btn, .check-buttons > .btn, .mfa-box-actions > .btn, .next-action > .btn { flex: 1 1 calc(50% - var(--ph-gap) / 2); width: auto; min-width: 0; margin: 0; }
  .lic-actions { margin-top: var(--ph-block); }
  .made-actions { margin-bottom: var(--ph-block); }
  .req-actions { margin-top: var(--ph-block); }
  .check-buttons > .btn[type="submit"] { margin-left: 0; }
  .view-actions { flex-direction: column; align-items: stretch; gap: var(--ph-gap); }
  .view-actions > .btn { margin: 0; }
  .view-actions [hidden] + .btn { margin-left: 0; }
  .load-more { flex-direction: column; align-items: stretch; gap: var(--ph-gap); text-align: center; }
  .load-more > .btn { width: 100%; }
  .load-more:has(.btn[hidden]) { align-items: center; }

  /* ---- filter rows: each control is one 44px bar, all on the same left and right edges ---- */
  .inline-select { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: var(--ph-h); padding: 0 0 0 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); color: var(--ink-3); font-size: var(--fs-md); font-weight: 400; white-space: nowrap; }
  .inline-select:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
  body.app .inline-select select { flex: 1 1 0; width: auto; min-width: 0; min-height: calc(var(--ph-h) - 2px); padding-left: 0; border: 0; background-color: transparent; box-shadow: none; }
  .search { display: flex; gap: var(--ph-gap); width: 100%; }
  .search input { flex: 1 1 0; min-width: 0; width: auto; }
  [data-lic-bar] { flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: var(--ph-gap); margin: 0 0 var(--ph-gap); }
  [data-lic-bar] .lic-search, .lic-dist { flex: none; width: 100%; margin: 0; }
  .rec-bar { gap: var(--ph-gap); margin: 0 0 var(--ph-gap); }
  .rec-bar .rec-q { min-height: var(--ph-h); }
  .rec-grid { gap: var(--ph-gap); margin-top: var(--ph-gap); }
  .rec-grid .inline-select { display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 0; border: 0; background: none; box-shadow: none; white-space: normal; font-size: var(--fs-sm); }
  body.app .rec-grid .inline-select select, body.app .rec-grid .inline-select input { min-height: var(--ph-h); padding-left: 11px; border: 1px solid var(--line-2); background-color: var(--surface); }
  body.app .rec-grid .inline-select select { padding-right: 34px; }
  .rec-filters > summary { display: flex; justify-content: space-between; width: 100%; min-height: var(--ph-h); padding: 0 14px; border-radius: var(--r); }
  /* "Show N entries" · Search, the bar above every table: one row */
  .dt-bar, .dt:has(table.compact) .dt-bar { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: stretch; justify-content: flex-start; gap: var(--ph-gap); margin: 0 0 var(--ph-gap); }
  .dt-bar-gap { display: none; }
  .dt-len { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; min-height: var(--ph-h); padding: 0 0 0 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); color: var(--ink-3); font-size: var(--fs-md); white-space: nowrap; }
  .dt-len:only-child { flex: 1 1 0; }
  .dt-len:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
  .dt-len-b { display: none; }
  body.app .dt-len .dt-select { flex: 1 1 auto; width: auto !important; min-height: calc(var(--ph-h) - 2px) !important; padding: 0 30px 0 0 !important; border: 0; background-color: transparent; box-shadow: none; font-size: var(--fs-md) !important; }
  .dt-search, .dt:has(table.compact) .dt-search { flex: 1 1 0; width: auto; min-width: 0; }
  .dt-search > label, .dt-q { width: 100% !important; }
  body.app .dt-q { min-height: var(--ph-h) !important; }
  .dt-foot { flex-direction: column; align-items: center; gap: var(--ph-gap); text-align: center; }
  .dt-pager { flex-wrap: wrap; justify-content: center; }
  .dt-page { min-width: var(--ph-h); min-height: var(--ph-h); }
  /* Chips scroll as ONE row, edge to edge; the first chip starts on the page's edge. */
  .chip-row { margin-inline: calc(var(--ph-side) * -1); padding: 2px var(--ph-side) 6px; scroll-padding-inline: var(--ph-side); gap: var(--ph-gap); }
  .chip-btn { min-height: var(--ph-h); }
  /* A short choice (All · Credits · Licenses · Sign-ins): equal parts, the full width. */
  .toolbar { margin: 0 0 var(--ph-gap); }
  .toolbar > .seg { display: flex; width: 100%; }
  .toolbar > .seg .seg-opt, .seg.seg-fill .seg-opt { flex: 1 1 0; justify-content: center; min-height: calc(var(--ph-h) - 6px); }
  /* A row of tabs that does not fit (For the apps has five) slides sideways instead of squeezing its words together
     (Rom's picture, 2026-10-15: "School yearsHolidaysTeacher HubAnnouncementsFAQs"). A row that fits still fills the width. */
  .seg.seg-nav, .seg.seg-tabs { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .seg.seg-nav::-webkit-scrollbar, .seg.seg-tabs::-webkit-scrollbar { display: none; }
  .seg.seg-nav > a, .seg.seg-tabs > button { flex: 1 0 auto; min-height: calc(var(--ph-h) - 6px); margin-bottom: 0; padding: 4px 12px; white-space: nowrap; }
  details.more > summary, .rec-filters > summary { min-height: var(--ph-h); }
  .addon-btn { width: var(--ph-h); }
  .topbar .burger { width: var(--ph-h); height: var(--ph-h); }

  /* ---- dialogs ---- */
  dialog.sheet, dialog.sheet.sheet-wide { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .sheet-head { min-height: 56px; padding: 6px 6px 6px var(--ph-pad); }
  .sheet-x { width: var(--ph-h); height: var(--ph-h); }
  .sheet-body { padding: var(--ph-pad); }
  .sheet-foot, dialog.sheet .sheet-foot { flex-wrap: nowrap; gap: var(--ph-gap); padding: 12px var(--ph-pad); }
  .sheet-foot > .btn, dialog.sheet .sheet-foot .btn { flex: 1 1 0; min-width: 0; min-height: var(--ph-h); }
  .sheet-foot > :only-child { margin-left: 0; }
  .sheet-body .field:last-child { margin-bottom: 0; }

  /* ---- cards and lists ---- */
  .acct-head .cell { flex: 1 1 160px; }
  .dl-card, .step-card { padding: var(--ph-pad); }
  .dl-card { gap: var(--ph-block); }
  .steps3 { gap: var(--ph-block); }
  /* Generate: − [how many] + share the row; the made keys: number and copy button on one line, the whole key on the line under them. */
  .qty-row input { flex: 1 1 0; max-width: none; min-width: 0; }
  .qty-btn { width: var(--ph-h); }
  .gen-list li .gen-no { order: 0; }
  .gen-list li .copy-btn { order: 1; margin-left: auto; }
  .gen-list li .gen-key { order: 2; flex: 1 1 100%; }
  .gen-list li > :not(.gen-no):not(.copy-btn):not(.gen-key) { order: 3; }
  .lic-head { padding: 12px var(--ph-pad); }
  .lic-body { padding: 4px var(--ph-pad) 6px; }
  .lic-card > .lic-actions { margin-top: auto; padding: 12px var(--ph-pad); }
  .next-box { padding: var(--ph-pad); }
  .waiting-list { grid-template-columns: minmax(0, 1fr); }
  .req-card > :last-child { grid-column: 1 / -1; justify-self: stretch; }
  .req-card > .lic-actions { display: flex; justify-content: space-between; align-items: center; gap: var(--ph-gap); }
  .req-card .lic-actions .btn { width: auto; }
  .mfa-box, .danger-row { gap: var(--ph-gap) 12px; }
  .mfa-box-text, .danger-text { flex: 1 1 0; }
  .danger-row > .btn { flex: 1 1 100%; }
  .lic-add { display: flex; width: 100%; gap: var(--ph-gap); }
  .lic-add .btn { flex: none; }
}
@media (max-width: 400px) { :root { --ph-side: 10px; --ph-pad: 14px; } }
@media (max-width: 360px) { .seg.seg-nav > a, .seg.seg-tabs > button { font-size: var(--fs-sm); padding: 4px 10px; } }

/* ============================================================ School year on the admin desk: school years, holidays, Teacher Hub (2026-10-09, js/content.js) */
/* The three kinds of a marked day: the same tint wherever they show (a tag, a count, a mark in the calendar). */
.k-holiday { background: var(--bad-soft); color: var(--bad); }
.k-suspension { background: var(--warn-soft); color: var(--warn); }
.k-event { background: var(--info-soft); color: var(--info); }
.k-other { background: var(--surface-3); color: var(--ink-2); }
.chip b { font-weight: 700; font-variant-numeric: tabular-nums; }

/* Holidays: the month's name between two arrows; how many of each kind at the right. Under it the month as a calendar
   beside the list of its marked days (a phone: the calendar, then the list). */
.month-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.month-name { min-width: 9.5em; margin: 0; font: 600 1.0625rem/1.2 var(--sans); letter-spacing: -.006em; text-align: center; }
.btn.month-step { width: 38px; padding: 0; }
.month-counts { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.days-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.days-cols > .panel + .panel { margin-top: 0; }
@media (min-width: 960px) { .days-cols { grid-template-columns: 372px minmax(0, 1fr); } }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.month-grid .wd { padding: 0 0 4px; color: var(--ink-3); font-size: var(--fs-xs); font-weight: 500; text-align: center; }
.day-cell { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; min-height: 50px; padding: 4px 2px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.day-cell.we { background: var(--surface-2); }
.day-cell:hover { border-color: var(--ink-4); background: var(--surface-3); }
.day-cell:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.day-no { min-width: 22px; padding: 1px 4px; border-radius: 999px; font-size: var(--fs-sm); font-weight: 500; line-height: 1.5; text-align: center; font-variant-numeric: tabular-nums; }
.day-cell.today .day-no { background: var(--brand); color: var(--on-brand); font-weight: 600; }
/* A mark is a short bar of its kind's colour: its words are in the list beside the calendar (and in the day's own tip). */
.day-mark { flex: none; overflow: hidden; width: 70%; max-width: 30px; height: 5px; border-radius: 999px; font-size: 0; }
.day-mark.k-holiday { background: var(--bad); }
.day-mark.k-suspension { background: var(--warn); }
.day-mark.k-event { background: var(--info); }
.day-mark.k-other { background: var(--ink-3); }
.month-key { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
/* A day with more than one mark: pick the one to change. */
.day-list { display: grid; gap: 8px; }
.day-list-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.day-list-row:hover { background: var(--surface-3); }
.day-list-row:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.day-list-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.day-list-row .ico { flex: none; width: 16px; height: 16px; color: var(--ink-3); }

/* Teacher Hub: each document a panel; inside it a heading with its buttons, then a table whose rows open a dialog. */
.hub-sec { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 20px 0 8px; }
.hub-sec:first-child { margin-top: 0; }
.hub-sec-title { margin: 0; font: 600 .9375rem/1.2 var(--sans); letter-spacing: -.006em; color: var(--ink); }
.hub-sec-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.hub-sec-tools:empty { display: none; }
.hub-live { margin: 0 0 12px; color: var(--ink-1); font-size: var(--fs-md); }
.hub-note { margin: 12px 0 0; color: var(--ink-3); font-size: var(--fs-md); }
.hub-tools { display: inline-flex; align-items: center; gap: 2px; vertical-align: middle; }
.icon-btn.plain.flip .ico { transform: rotate(180deg); }
.icon-gap { display: inline-block; width: 26px; height: 26px; }
table.data.hub-table td.actions { width: 1%; }
table.data.hub-table td a { color: var(--brand-ink); }
/* A group of links: a band with its name, how many it has, and its own buttons. */
table.data.hub-table tr.band-row > th, table.data.hub-table tr.band-row > td { background: var(--surface-3); border-bottom: 1px solid var(--line); }
table.data.hub-table tr.band-row > th { color: var(--ink); font-size: var(--fs-md); font-weight: 600; white-space: normal; }
table.data.hub-table tr.band-row:hover > td { background: var(--surface-3); }
table.data.hub-table .band-n { color: var(--ink-3); font-size: var(--fs-sm); }
/* The links: one line a row on a laptop, the columns at set widths so a long address is cut with three dots and never
   makes its row tall (a phone shows the title and the order buttons; the rest is in the row's dialog). */
@media (min-width: 641px) {
  table.data.hub-links { table-layout: fixed; }
  table.data.hub-links th.w-title { width: 34%; }
  table.data.hub-links th.w-addr { width: 27%; }
  table.data.hub-links th.w-tools { width: 112px; }
  table.data.hub-links td.one-line { max-width: none; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
}
/* A block of a term, under its term. */
table.data.hub-table tr.sub-row > td:first-child { padding-left: 28px; color: var(--ink-2); }
/* Two fields side by side in a dialog (a first and a last day). */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; align-items: start; margin: 0 0 14px; }
.two-col > .field, .sheet-body .two-col > .field:last-child { margin: 0; }
@media (max-width: 519px) { .two-col { grid-template-columns: 1fr; } }

@media (max-width: 640px) {
  .month-name { flex: 1 1 0; min-width: 0; }
  .btn.month-step { width: var(--ph-h); }
  .month-counts { flex: 1 1 100%; margin-left: 0; }
  .month-grid { gap: 3px; }
  table.data.compact .icon-gap { width: 28px; height: 28px; }
  table.data.compact.hub-table tr.band-row > th { white-space: nowrap; }
  .hub-sec-tools { flex: 1 1 100%; margin-left: 0; }
  .hub-sec-tools > .btn { flex: 1 1 0; }
}
/* One Teacher Hub document shows at a time: no gap above it for the ones that are hidden. */
.panel[data-hub-panel] { margin-top: 0; }
/* App version: the rule reads as one sentence with its two boxes in it, and wraps on a phone. */
.ver-sentence { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 8px; color: var(--ink); font-size: 1rem; }
.ver-sentence label { font-weight: 500; }
/* (By their ids: the site's rule for every text box is a long one, and a class would not outweigh its full width.) */
#ver-min, #ver-from { flex: none; width: auto; }
#ver-min { width: 7.5em; font-variant-numeric: tabular-nums; }
.ver-asked { min-height: 1.5em; margin: 0 0 14px; }
/* "Published now: 3.0.6" beside the boxes, and the line that says a rule asks for more than what is published. */
.ver-sentence .ver-published { font-size: var(--fs-sm); }
.warn-line[data-ver-withdrawn] { margin: 0 0 12px; font-weight: 500; }
.panel-head .status[data-ver-state]:empty { display: none; }
@media (max-width: 640px) { .ver-sentence label { flex: 1 1 100%; } #ver-min, #ver-from { width: 100%; } }
/* The phones' rule (ProTitser Mobile) is the same sentence under the laptops': its own two boxes, alike. */
#mob-min, #mob-from { flex: none; width: auto; }
#mob-min { width: 7.5em; font-variant-numeric: tabular-nums; }
.warn-line[data-mob-withdrawn] { margin: 0 0 12px; font-weight: 500; }
.panel-head .status[data-mob-state]:empty { display: none; }
@media (max-width: 640px) { #mob-min, #mob-from { width: 100%; } }
/* Licenses, "Phones to check": what the numbers mean, as a short list above the table. */
.signs-note { margin: 0 0 12px; padding: 0 0 0 18px; color: var(--ink-3); font-size: var(--fs-md); }
.signs-note li { margin: 2px 0; }

/* ---- The desk's four tabs (2026-10-09): the menu in groups, Versions, Devices, Payments (js/tabs.js) ----------------
   Rom: "create me a sidebar tab on it, and also the tab for distributor separate also it in the sideabr tab ... and
   also add a tab hich is devises", then "add also a tab for payments auditing". Lists are one line a row: a long text
   is cut with dots and whole in its tooltip. */
/* The menu's groups come and go together (shown after the admin check). */
.side-navs:not([hidden]) { display: contents; }
/* Eleven pages in five groups: on a short screen the groups stand closer, so the menu still ends with Sign out in view. */
@media (min-width: 900px) and (max-height: 800px) {
  .side { padding-top: 6px; padding-bottom: 6px; }
  .side-group { margin-top: 5px; }
  .side-navs > .side-group:first-child { margin-top: 0; }
  .side-label { margin-bottom: 0; font-size: .625rem; }
  .side-link { min-height: 25px; padding-top: 2px; padding-bottom: 2px; }
  .side-brand { min-height: 36px; padding-bottom: 0; }
  .side-foot { padding-top: 4px; }
}
/* …and on the shortest laptop screens (600 px high) the menu's thirteen pages and its four links below still end in view. */
@media (min-width: 900px) and (max-height: 640px) {
  .side { padding-top: 4px; padding-bottom: 4px; }
  .side-group { margin-top: 4px; }
  .side-link { min-height: 24px; padding-top: 1px; padding-bottom: 1px; }
  .side-brand { min-height: 34px; }
  .side-foot { padding-top: 3px; }
  /* (fourteen pages since Support: the groups stand one step closer still) */
  .side { padding-top: 2px; padding-bottom: 2px; }
  .side-group { margin-top: 2px; }
  .side-brand { min-height: 32px; }
  .side-foot { padding-top: 2px; }
  /* (fifteen pages since Files sent: each line of the menu one pixel lower) */
  .side-link { min-height: 23px; padding-top: 0; padding-bottom: 0; }
}
/* The phone's bottom bar: "More" is marked while the page showing is one the bar does not have. */
@media (max-width: 640px) {
  .bottom-nav button.is-here { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
}
/* ---- A LIST FITS ITS BOX: NO SIDEWAYS SCROLL (js/table.js fitTable, 2026-10-11) ----
   A column that does not fit is left out by a class on the table; the line under the list says which. */
table.fit-hide-1 th:nth-child(1), table.fit-hide-1 td:nth-child(1),
table.fit-hide-2 th:nth-child(2), table.fit-hide-2 td:nth-child(2),
table.fit-hide-3 th:nth-child(3), table.fit-hide-3 td:nth-child(3),
table.fit-hide-4 th:nth-child(4), table.fit-hide-4 td:nth-child(4),
table.fit-hide-5 th:nth-child(5), table.fit-hide-5 td:nth-child(5),
table.fit-hide-6 th:nth-child(6), table.fit-hide-6 td:nth-child(6),
table.fit-hide-7 th:nth-child(7), table.fit-hide-7 td:nth-child(7),
table.fit-hide-8 th:nth-child(8), table.fit-hide-8 td:nth-child(8),
table.fit-hide-9 th:nth-child(9), table.fit-hide-9 td:nth-child(9),
table.fit-hide-10 th:nth-child(10), table.fit-hide-10 td:nth-child(10),
table.fit-hide-11 th:nth-child(11), table.fit-hide-11 td:nth-child(11),
table.fit-hide-12 th:nth-child(12), table.fit-hide-12 td:nth-child(12),
table.fit-hide-13 th:nth-child(13), table.fit-hide-13 td:nth-child(13),
table.fit-hide-14 th:nth-child(14), table.fit-hide-14 td:nth-child(14),
table.fit-hide-15 th:nth-child(15), table.fit-hide-15 td:nth-child(15),
table.fit-hide-16 th:nth-child(16), table.fit-hide-16 td:nth-child(16),
table.fit-hide-17 th:nth-child(17), table.fit-hide-17 td:nth-child(17),
table.fit-hide-18 th:nth-child(18), table.fit-hide-18 td:nth-child(18),
table.fit-hide-19 th:nth-child(19), table.fit-hide-19 td:nth-child(19),
table.fit-hide-20 th:nth-child(20), table.fit-hide-20 td:nth-child(20),
table.fit-hide-21 th:nth-child(21), table.fit-hide-21 td:nth-child(21),
table.fit-hide-22 th:nth-child(22), table.fit-hide-22 td:nth-child(22),
table.fit-hide-23 th:nth-child(23), table.fit-hide-23 td:nth-child(23),
table.fit-hide-24 th:nth-child(24), table.fit-hide-24 td:nth-child(24) { display: none; }
.dt-fit-note { margin: 8px 2px 0; }
/* Licenses: one line a row, a long name or address cut with dots (the row's page has it whole), so that more columns fit. */
table.lic-table td { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.lic-table td.col-primary { max-width: 200px; }
table.lic-table td.remarks-cell { max-width: 140px; }
/* (the laptop's code alone in the list: how the license got there is on the chips above and on the license's page) */
table.lic-table td .pair > :not(:first-child) { display: none; }
table.lic-table .key-cell { display: inline-flex; align-items: center; gap: 4px; }
/* A WHOLE key ("Show license keys", js/lickeys.js) is never cut: in the same width, it goes on a second line at a dash. */
table.lic-table td:has(.key-whole) { white-space: normal; }
table.lic-table .key-mask.key-whole { flex: none; width: 17ch; white-space: normal; overflow: visible; }
.dt-cols { position: relative; margin-left: auto; }
.dt-cols + .dt-search { margin-left: 10px; }
.dt-cols-menu { position: absolute; z-index: 30; right: 0; top: calc(100% + 6px); display: grid; gap: 4px; min-width: 220px; max-height: 60vh; overflow: auto; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow, 0 8px 24px rgba(0, 0, 0, .12)); }
.dt-cols-menu[hidden] { display: none; }
.dt-cols-menu p { margin: 6px 0 0; max-width: 240px; }
/* One line in a cell, cut with dots. */
.one-line { display: inline-block; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.one-line.strong { font-weight: 600; }
/* The Details of the Activity log and of the old log: ONE line. The column takes the room the others leave (it was
   squeezed to 67 px at 1160 wide, and a row grew to ten lines); the whole text is in its tooltip and on the row's page. */
td.detail-cell { width: 100%; max-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { td.detail-cell { width: auto; max-width: 240px; } }
table.audit-table td .one-line { max-width: 170px; }
/* Below 1300 px wide the network address leaves the list (it is on the row's own page, "From"): the Details need the room more. */
@media (min-width: 641px) and (max-width: 1299px) { table.audit-table:not(.oldlog-table) th:nth-child(6), table.audit-table:not(.oldlog-table) td:nth-child(6) { display: none; } }
/* "By": who did it. "You", or a helper's name: short, one line. */
table.audit-table td.by-cell .one-line { max-width: 96px; }
/* Versions: a version's share of its app, and its tags, on one line. */
.share { display: flex; align-items: center; gap: 8px; min-width: 130px; }
.share .meter { flex: 1 1 auto; min-width: 70px; margin: 0; }
.share > span { min-width: 36px; color: var(--ink-3); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; text-align: right; }
.tag-line { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; }
table.vers-table td.share-cell { width: 34%; }
/* Devices: the filters above the list; a device that was silent for 30 days; the last characters of a phone's id. */
.dev-bar { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin: 0 0 12px; }
.dev-bar .search { flex: 1 1 260px; margin: 0; }
.dev-bar .inline-select select { max-width: 178px; }
.seen-quiet { color: var(--warn); font-weight: 500; }
.phone-id { flex: none; color: var(--ink-3); font-family: var(--mono); font-size: var(--fs-xs); }
.phone-cell { display: inline-flex; align-items: baseline; gap: 4px; vertical-align: bottom; }
table.dev-table td .phone-cell .one-line { max-width: 84px; }
tr.row-plain { cursor: default; }
/* Eight columns in the 808 px a list has at 1160 wide: tighter cells, and no cell wider than its words need. */
table.dev-table th, table.dev-table td, table.pay-table th, table.pay-table td { padding-left: 7px; padding-right: 7px; }
table.dev-table td.col-primary .one-line { max-width: 150px; }
table.dev-table td .one-line { max-width: 122px; }
/* Payments: four filters in a row; the switch Payments / By day; the tick; the sign of a line to look at. */
.rec-grid.pay-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 899px) { .rec-grid.pay-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Activity (Update list No. 109): who, what, from, to. On a phone each picker has a row of its own (its words are never cut),
   and the two days are an even pair under them. */
.rec-grid.audit-grid { grid-template-columns: 1.4fr 2fr 1.2fr 1.2fr; }
@media (max-width: 899px) { .rec-grid.audit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .rec-grid.audit-grid .audit-pick { grid-column: 1 / -1; } }
[data-audit-table].is-loading { opacity: .55; transition: opacity .15s; }
.pay-views { margin: 0 0 8px; gap: 14px; }
.pay-views .seg.seg-tabs { flex: none; width: auto; min-width: 240px; margin: 0; }
/* (the words give way to the sign and the tag beside them: the cell is never wider than this) */
.pay-for { display: inline-flex; align-items: center; gap: 6px; max-width: 166px; overflow: hidden; vertical-align: bottom; }
.pay-for .one-line { flex: 0 1 auto; min-width: 0; }
.pay-for .chip { flex: none; padding-left: 6px; padding-right: 6px; font-size: .6875rem; }
.pay-flag { display: inline-grid; place-items: center; flex: none; color: var(--warn); }
.pay-flag .ico { width: 15px; height: 15px; }
table.pay-table th, table.pay-table td { padding-left: 6px; padding-right: 6px; }
table.pay-table td .one-line { max-width: 150px; }
table.pay-table td.col-primary .one-line { max-width: 120px; }
table.pay-table td.small > .one-line { max-width: 84px; }
.pay-ref { display: inline-flex; align-items: center; gap: 4px; vertical-align: bottom; }
table.pay-table td .pay-ref .one-line { max-width: 84px; }
.pay-ref .icon-btn { flex: none; width: 26px; min-width: 0; height: 26px; min-height: 0; padding: 0; }
.pay-ref .icon-btn .ico { width: 16px; height: 16px; }
table.pay-table td.pay-ok, table.pay-table th:last-child { width: 1%; text-align: center; white-space: nowrap; }
.pay-tick { display: inline-grid; place-items: center; min-width: 30px; min-height: 28px; cursor: pointer; }
.pay-tick input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); cursor: pointer; }
th .th-btn { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
th .th-btn:hover { color: var(--brand-ink); }
th .th-btn .ico { width: 15px; height: 15px; color: var(--brand-ink); }
.pay-look { margin: 14px 0; padding: 10px 12px; border: 1px solid var(--line); border-left: 3px solid var(--warn); border-radius: var(--r); background: var(--warn-soft); }
.pay-look-h { display: flex; align-items: center; gap: 7px; margin: 0 0 4px; color: var(--warn); font-weight: 600; }
.pay-look-h .ico { width: 16px; height: 16px; }
/* On a phone: the lists show the columns that matter most (a tap on a row has the rest), a little narrower. */
@media (max-width: 640px) {
  table.dev-table th, table.dev-table td { padding-left: 4px; padding-right: 4px; }
  table.dev-table th:first-child, table.dev-table td:first-child { padding-left: 8px; }
  table.dev-table td.col-primary .one-line { max-width: 70px; }
  table.dev-table td.num { font-size: .8125rem; }
  table.dev-table td.small { font-size: .75rem; }
  table.dev-table .status { padding: 1px 5px; font-size: .6875rem; }
  .dev-bar .inline-select { flex: 1 1 130px; min-width: 0; }
  .dev-bar .inline-select select { width: 100%; max-width: none; }
  table.pay-table td .one-line { max-width: 98px; }
  .pay-for { max-width: 120px; }
  th .th-btn > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  th .th-btn .ico { width: 18px; height: 18px; }
}
.pay-look ul { margin: 0 0 6px; padding-left: 20px; }
.pay-look p:last-child { margin: 0; }

/* ---- Tidy (2026-10-09, looks only): Distributors and Records are ONE LINE A ROW on a laptop -------------------------
   A row was 129 px (Distributors) and up to 166 px (Records) tall at 1160 wide, and both lists scrolled sideways. Now a
   cell has one line, cut with dots; what stood under it (the owner's name, "of 20 bought", the price of a credit, a
   note, the buyer's Gmail, the balance) is in the cell's tooltip and on the row's own page, a tap away. Below 1300 px
   wide the columns that page has too leave the list: the distributor's email, and in Records "Used by" and "Laptop".
   The row's buttons View and Pause leave it too (a tap on the row opens that page, where Pause is); Credits stays. */
@media (min-width: 641px) {
  table.dist-table th, table.dist-table td, table.rec-table th, table.rec-table td { padding-left: 7px; padding-right: 7px; white-space: nowrap; }
  table.dist-table .lic-sub, table.dist-table .money-sub { display: none; }
  table.dist-table .who .cell strong { display: block; max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
  table.dist-table .use-cell { flex-direction: row; align-items: center; gap: 8px; min-width: 0; }
  table.dist-table .use-cell .meter { flex: none; width: 46px; }
  table.dist-table .row-actions { flex-wrap: nowrap; max-width: none; }
  table.rec-table .tx-lines .lic-sub, table.rec-table .pair > * + *, table.rec-table .pair-sub { display: none; }
  table.rec-table .tx-row { align-items: center; }
  table.rec-table .tx-head { flex-wrap: nowrap; }
  table.rec-table .tx-head strong, table.rec-table .pair > span:first-child { display: inline-block; max-width: 170px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
  table.rec-table td.col-primary { max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
}
@media (min-width: 641px) and (max-width: 1299px) {
  table.dist-table th:nth-child(8), table.dist-table td:nth-child(8), table.dist-table .row-actions .btn + .btn { display: none; }
  table.rec-table th:nth-child(7), table.rec-table td:nth-child(7), table.rec-table th:nth-child(8), table.rec-table td:nth-child(8), table.rec-table .how-tag { display: none; }
  table.rec-table .tx-head strong { max-width: 150px; }
  table.rec-table td.col-primary { max-width: 104px; }
  table.rec-table .pair > span:first-child { max-width: 104px; }
}
/* Payments: the search box and the four filters in ONE row on a wide laptop, so the list has the room; from 1240 px, where they fit
   (from 900 px they ran off the right edge up to about 1180: Update list No. 121). Narrower, the search box has its row and the filters
   wrap evenly under it, each wide enough for its words. */
@media (min-width: 641px) {
  .rec-grid.pay-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}
@media (min-width: 1240px) {
  .rec-bar.pay-bar { flex-direction: row; align-items: flex-end; gap: 10px; }
  .rec-bar.pay-bar .rec-q { flex: 1 1 150px; width: auto; min-width: 120px; }
  .rec-bar.pay-bar .rec-filters { flex: none; }
  /* (the School year column, always the second, holds "Any school year" whole: Update list No. 121) */
  .rec-bar.pay-bar .rec-grid.pay-grid { grid-template-columns: 128px 152px 128px 128px auto; gap: 0 8px; }
  .rec-bar.pay-bar .rec-clear { grid-column: auto; align-self: center; margin-top: 18px; white-space: nowrap; }
}

/* ---- Part C (2026-10-09): the search box in reach, Needs attention, Renewals, one teacher's page ---------------------
   The search box is at the top of every page on a laptop and stays there when the page is scrolled; on a phone it is the
   looking glass in the top bar. */
.desk-find { position: sticky; top: 0; z-index: 30; padding: 6px 24px; border-bottom: 1px solid var(--line); background: var(--bg); }
.desk-find .search { display: flex; gap: 8px; max-width: 760px; margin: 0; }
.desk-find .search input { flex: 1 1 auto; min-width: 0; min-height: 34px; }
.desk-find .search .btn { min-height: 34px; }
.find-open { display: none; }
@media (max-width: 899px) {
  .desk-find { display: none; }
  .topbar .find-open:not([hidden]) { display: grid; margin-left: auto; }
}
/* Needs attention: one line a thing, its words and its button. */
.attn-lines li { align-items: center; }
.attn-lines li .cell b { font-weight: 500; }
[data-attn-panel] .panel-head .chip:empty, [data-dist-attn-panel] .panel-head .chip:empty { display: none; }
.ledger-export { margin: 0 0 10px; }
/* Renewals: the list uses the Devices list's tight cells. */
table.ren-table td .btn-sm { min-height: 28px; padding: 0 9px; }
table.ren-table td .btn-sm .ico { width: 14px; height: 14px; }
/* One teacher's page: its parts, each a small list. */
.person-part { margin: 16px 0 0; }
.person-head { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; }
.person-head h3 { margin: 0; font-size: var(--fs-md); font-weight: 600; }
.person-head .link-btn { margin-left: auto; }
table.person-table th, table.person-table td { padding-left: 8px; padding-right: 8px; white-space: nowrap; }
table.person-table .one-line { max-width: 260px; }
table.person-table .person-detail { max-width: 380px; }
.find-list li .cell span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Tidy, second pass. Payments: the switch Payments / By day stands in the page's head beside the export. */
.page-tools .seg.seg-tabs.pay-switch { flex: none; width: auto; min-width: 200px; margin: 0; }
.pay-day { margin: 0 0 8px; }
/* (on a phone the switch and Export for Excel share ONE row: the switch takes the room, the button its square. Rom,
    2026-10-28: "the buttons are optimized") */
@media (max-width: 640px) { .page-tools .seg.seg-tabs.pay-switch { flex: 1 1 0; width: auto; min-width: 0; } .page-tools:has(> .pay-switch) { flex-wrap: nowrap; } }
/* Records: the date and its time on one line; below 1300 px wide, in its short form. */
@media (min-width: 641px) {
  table.rec-table td.rec-when .date-full br { display: none; }
  table.rec-table td.rec-when .pair-sub { display: inline; margin-left: 5px; }
}
@media (min-width: 641px) and (max-width: 1299px) {
  table.rec-table td.rec-when .date-full { display: none; }
  table.rec-table td.rec-when .date-short { display: inline; }
}
/* (Records has rules of its own that let a cell wrap: on a laptop every cell of it is one line.) */
@media (min-width: 641px) {
  table.data.compact.rec-table th, table.data.compact.rec-table td { white-space: nowrap; }
  table.data.compact.rec-table td.col-primary { max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
  table.data.compact.rec-table td.tx-what { min-width: 0; }
}
@media (min-width: 641px) and (max-width: 1299px) { table.data.compact.rec-table td.col-primary { max-width: 104px; } }
/* Renewals on a phone: the four columns that matter, in the screen's width. */
@media (max-width: 640px) {
  table.ren-table td.col-primary .one-line { max-width: 62px; }
  table.ren-table td.small { font-size: .6875rem; }
}
@media (min-width: 641px) {
  /* (a buyer with no name shows the Gmail in the name's place: one line too; a long heading may take two lines) */
  table.data.compact.rec-table .pair > span:first-child { white-space: nowrap; }
  table.data.compact.rec-table th { white-space: normal; line-height: 1.2; }
}
@media (min-width: 641px) and (max-width: 1299px) {
  table.data.compact.rec-table .tx-head strong { max-width: 146px; }
  table.data.compact.rec-table .pair > span:first-child { max-width: 92px; }
  table.data.compact.rec-table td.col-primary { max-width: 98px; }
}

/* ============================================================================================================
   PART D (2026-10-09): the desk's safety. Settings, the backup, the helpers, and a helper's desk.
   ============================================================================================================ */

/* A HELPER'S DESK: what is the developer's alone is not shown. (It only hides: the website itself refuses a helper
   everything that is not on the short list, server/helpers.js.) */
.is-helper [data-admin-only] { display: none !important; }
/* (the search box opens a page of the developer's; the places with no page for a helper are [data-admin-only]) */
.is-helper .desk-find, .is-helper .find-open { display: none !important; }

/* SETTINGS: one row a thing. What it is, how it stands now, and its button at the right. A long one goes on to a second line,
   never cut with dots (2026-11-13, Update list No. 123: "Remind a teacher who sends a fi…" and the Notices line were cut on a laptop). */
.set-list { display: grid; grid-template-columns: minmax(0, 1fr); }
.set-row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 2px; border-top: 1px solid var(--line); }
.set-row:first-child { border-top: 0; }
.set-what { flex: 0 0 232px; font-weight: 600; font-size: var(--fs-md); white-space: normal; overflow-wrap: anywhere; }
.set-now { flex: 1 1 0; min-width: 0; font-size: var(--fs-md); color: var(--ink-2); white-space: normal; overflow-wrap: anywhere; }
.set-sub { color: var(--ink-3); font-size: var(--fs-sm); }
.set-row .btn-sm { flex: none; min-height: 30px; }
/* (two buttons of one row, side by side: Phone alerts' Send a test and Turn off) */
.set-acts { display: flex; flex: none; gap: 6px; }
.set-note { margin: 0 0 8px; }
/* Google Play review (js/licenses.js playReviewDialog): the 12-digit code, shown once */
.pr-code { margin: 10px 0 0; padding: 10px 12px; border: 1px solid var(--line, #d7e3d9); border-radius: 8px; }
.pr-digits { font-size: 1.5rem; letter-spacing: .06em; margin: 4px 0 8px; }
.set-warn { padding: 8px 10px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--warn-soft); }
.set-facts { display: grid; gap: 6px; margin: 0 0 10px; padding-left: 18px; font-size: var(--fs-md); }
table.set-table td, table.set-table th { white-space: nowrap; }
table.set-table td:last-child { white-space: normal; }
.set-progress { display: block; width: 100%; height: 10px; margin: 10px 0 6px; }
@media (max-width: 1299px) { .set-what { flex-basis: 204px; } }
/* On a phone a row is two lines: what it is and its button, then how it stands, in full. */
@media (max-width: 640px) {
  .set-row { flex-wrap: wrap; row-gap: 2px; padding: 8px 0; }
  .set-what { flex: 1 1 0; min-width: 0; }
  .set-now { order: 3; flex: 1 0 100%; padding-left: 38px; white-space: normal; overflow: visible; font-size: var(--fs-sm); }
  .set-sub { display: block; }
}

/* HELPERS: one line a row. */
table.help-table td .one-line { max-width: 190px; }
table.help-table td.col-primary .one-line { max-width: 170px; }
table.help-table td .btn-sm { min-height: 28px; padding: 0 10px; }
@media (max-width: 640px) {
  /* (on a phone: who, where they stand, and Manage; the email is in the helper's own sheet) */
  table.help-table td.col-primary .one-line { max-width: 132px; }
}

/* A helper's mailed link (admin/join.html): the words above each step. */
.join-step { margin: 0 0 12px; font-size: var(--fs-md); }

/* ============================================================================================================
   PART E (2026-10-10): the Mail log, Schools, Announcements.
   ============================================================================================================ */

/* THE MAIL LOG and SCHOOLS: one line a row. */
table.mail-table td .one-line { max-width: 250px; }
table.mail-table td.col-primary .one-line { max-width: 230px; }
table.school-table td.col-primary .one-line { max-width: 300px; }
/* (the division is long words: one line, cut with its whole text in the title) */
table.school-table td.col-division .one-line { max-width: 230px; }
table.mail-table td .btn-sm, table.school-table td .btn-sm, table.news-table td .btn-sm, table.school-teachers td .btn-sm { min-height: 28px; padding: 0 10px; }
table.school-teachers td .one-line { max-width: 220px; }
table.news-table td.col-primary .one-line { max-width: 420px; }
.mail-words { margin: 12px 0 0; }
table.school-teachers tr.is-click { cursor: pointer; }
/* (one teacher's page on a phone: a name or an address is cut shorter, its whole text is the tooltip) */
@media (max-width: 640px) { table.person-table .one-line { max-width: 120px; } }
.mail-kind select { max-width: 190px; }
/* ---- Support and the FAQs (js/deskf.js) ---- */
.sup-pick select { max-width: 150px; }
[data-pane="support"] .search input { width: 250px; }
table.sup-table td.col-primary .one-line { max-width: 170px; }
table.sup-table td.sup-first .one-line { max-width: 240px; }
table.sup-table td.sup-topic .one-line, table.faq-table td.sup-topic .one-line { max-width: 130px; }
table.faq-table td.col-primary .one-line { max-width: 260px; }
table.faq-table td.faq-a .one-line { max-width: 220px; }
@media (max-width: 1299px) {
  /* (on a laptop's width the saved answers are an icon, and a list keeps what is needed to choose a row) */
  .sup-saved-btn .btn-text { display: none; }
  [data-pane="support"] .search input { width: 190px; }
  /* (what a concern is about, and an FAQ's topic, are on the row's own sheet) */
  table.sup-table th:nth-child(4), table.sup-table td:nth-child(4), table.faq-table th:nth-child(4), table.faq-table td:nth-child(4) { display: none; }
  table.sup-table td.sup-first .one-line { max-width: 200px; }
  table.faq-table td.faq-a .one-line { max-width: 170px; }
}
table.sup-table td .btn-sm, table.faq-table td .btn-sm { min-height: 28px; padding: 0 10px; }
/* A concern's thread: each message a block; the teacher's words exactly as typed, line ends kept. */
.sup-thread { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 10px; max-height: 44vh; overflow: auto; }
.sup-msg { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; background: var(--surface); }
.sup-msg.is-support { background: var(--surface-2); border-left: 3px solid var(--brand, var(--line)); }
.sup-msg-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 4px; }
.sup-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.sup-pics, .sup-msg-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 8px; }
.sup-pic { display: inline-flex; align-items: center; gap: 6px; }
.sup-pic .ico { width: 16px; height: 16px; }
.sup-answer { display: grid; gap: 6px; }
.sup-answer textarea, .fq-grid select, .fq-grid input { width: 100%; }
/* The problem report of a concern (Update list No. 157): plain text, shut until opened, scrolls inside. */
.sup-report { margin: 12px 0; border: 1px solid var(--line, #d9e2dc); border-radius: 8px; padding: 8px 12px; }
.sup-report summary { cursor: pointer; font-weight: 600; }
.sup-report-text { margin: 8px 0 0; max-height: 40vh; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: 12px; line-height: 1.45; }
.sup-answer-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sup-answer-tools select { width: auto; max-width: 280px; min-height: 34px; }
/* The FAQs that fit the teacher's words (js/deskf.js): each question a button; a long one wraps. */
.sup-fits .btn { max-width: 100%; height: auto; white-space: normal; text-align: left; }
.sup-saved li { display: flex; align-items: center; gap: 10px; }
.sup-saved .cell { flex: 1 1 auto; min-width: 0; }
.sup-saved .one-line { display: block; max-width: 100%; }
.fq-grid { display: grid; grid-template-columns: 1fr 140px; gap: 10px 14px; margin-bottom: 8px; }
.fq-apps { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 6px; }
@media (max-width: 640px) {
  .fq-grid { grid-template-columns: 1fr; }
  table.sup-table td.col-primary .one-line { max-width: 150px; }
  table.faq-table td.col-primary .one-line { max-width: 190px; }
}
@media (max-width: 1299px) {
  /* (on a laptop's width "About" is in the line's own sheet: the row keeps when, to whom, what, and what became of it) */
  table.mail-table th:nth-child(4), table.mail-table td:nth-child(4) { display: none; }
  /* (Schools on a laptop's width: how a school is written is on its own sheet) */
  table.school-table th:nth-child(8), table.school-table td:nth-child(8) { display: none; }
  .school-division select { max-width: 200px; }
  table.mail-table td .one-line { max-width: 150px; }
  table.mail-table td.col-primary .one-line { max-width: 220px; }
  table.school-table td.col-primary .one-line, table.news-table td.col-primary .one-line { max-width: 300px; }
}
@media (max-width: 640px) {
  /* (on a phone a row is: the day, to whom, and what the mail service answered. A tap opens the line, with the rest) */
  table.mail-table td.col-primary .one-line { max-width: 150px; }
  table.mail-table td.small { font-size: .6875rem; }
  /* (a school, its licenses, and how many have not paid; a tap opens the school) */
  table.school-table td.col-primary .one-line { max-width: 128px; }
  table.school-teachers td .one-line { max-width: 118px; }
  /* (an announcement, its last day and its state; a tap opens it, with End now) */
  table.news-table td.col-primary .one-line { max-width: 150px; }
}

/* ANNOUNCEMENTS. The form beside the card as each app draws it; on a phone the cards go under the form. */
.news-can { margin: 0 0 10px; color: var(--ink-2); }
.news-can p { margin: 0 0 2px; }
.news-can p:last-child { margin-bottom: 0; }
.news-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: 18px; align-items: start; }
.news-fields { min-width: 0; }
.news-fields .lbl .opt { margin-left: auto; font-size: var(--fs-sm); }
.news-fields textarea { width: 100%; resize: vertical; }
/* (three choices, not four: each takes a third) */
.news-fields .seg.seg-fill { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.news-fields .seg-fill .seg-opt { white-space: nowrap; }
.news-days { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.news-side { min-width: 0; }
.news-side .pay-lines { margin: 10px 0 0; }
.news-crowd { margin: 10px 0 0; }
.news-prev { display: grid; gap: 10px; margin: 6px 0 0; }
dialog.sheet .kv-table + .news-prev { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 14px; }
.news-card { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); min-width: 0; }
.news-card.is-mobile { max-width: 300px; border-radius: 14px; }
.news-app { color: var(--ink-3); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.news-title { font-size: var(--fs-md); overflow-wrap: anywhere; }
.news-text { margin: 0; font-size: var(--fs-md); color: var(--ink-1); white-space: pre-line; overflow-wrap: anywhere; }
.news-link { display: flex; align-items: center; gap: 8px; min-width: 0; }
.news-link .btn { flex: none; pointer-events: none; }
.news-fixed { margin: 2px 0 0; padding-top: 6px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: var(--fs-sm); }
.news-close { display: flex; justify-content: flex-end; }
.news-close .btn { pointer-events: none; }
@media (max-width: 760px) {
  .news-form { grid-template-columns: minmax(0, 1fr); }
  dialog.sheet .kv-table + .news-prev { grid-template-columns: minmax(0, 1fr); }
}

/* ============================================================ THE DESK USES A WIDE WINDOW (2026-10-10)
   Rom: at 1600 and 1920 the desk's column stayed about 1,100 px however wide the window, so its lists left columns
   out with room to spare. The DESK's column (the admin pages only: a teacher's and a distributor's account keep
   1200) now grows to 1,500 px of content (1556 with its side padding). Up to a 1504 px window with the menu open
   nothing changes: the column was already as wide as the window let it be. A phone is untouched. */
body[data-page="admin"] .page { max-width: 1556px; }
body[data-page="admin"] .main-col > .site-footer .wrap { max-width: 1556px; }
/* The search box at the top begins where the column begins (in a narrower window: where it always did). */
body[data-page="admin"] .desk-find { padding-inline: max(24px, calc((100% - 1500px) / 2)); }
/* NO ROW OF CHIPS RUNS OFF OR SCROLLS SIDEWAYS (the same day; Licenses has sixteen): on the desk a row of chips
   goes on to a second line, at every width, a phone too. Every filter is in view; nothing is hidden behind a swipe. */
body[data-page="admin"] .chip-row { flex-wrap: wrap; overflow-x: visible; }
/* On a phone a long row (Licenses) shows its first six chips and the pressed one; the button under it shows them all. */
.chips-more { display: none; }
@media (max-width: 640px) {
  body[data-page="admin"] .chip-row.chips-fold:not(.chips-open) > .chip-btn:nth-child(n+7):not([aria-pressed="true"]) { display: none; }
  .chips-more { display: inline-flex; margin: -4px 0 14px; }
}
/* Licenses, "Used by": the name alone in the list (where the name came from is on the license's page): one line a row. */
table.lic-table td .cell > :not(:first-child) { display: none; }

/* ============================================================ SCHOOLS: "These are one school" (2026-10-10, migration 0033)
   A tick in front of each row, a bar above the list that joins the ticked rows, and on a joined row's page the
   spellings he joined, each with "Take out". */
.join-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-3); }
.join-bar[hidden] { display: none; }
.join-bar > span { flex: 1 1 200px; color: var(--ink-2); }
/* Division logos (Schools): one line a shared logo, its picture at the left, the two words at the right. */
.divlogo-panel { margin-bottom: 12px; }
.divlogo-panel[hidden] { display: none; }
.divlogo-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.divlogo-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); min-width: 0; }
.divlogo-pic { width: 56px; height: 56px; object-fit: contain; flex: none; border-radius: 50%; background: #fff; border: 1px solid var(--line); }
.divlogo-text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.divlogo-actions { display: flex; gap: 6px; flex: none; }
@media (max-width: 560px) { .divlogo-row { flex-wrap: wrap; } .divlogo-actions { width: 100%; justify-content: flex-end; } }
table.school-table td.tick-cell, table.school-table th:first-child { width: 38px; padding-right: 0; }
.joined-tag { color: var(--brand-ink); font-weight: 600; }
.join-names { display: grid; gap: 6px; margin: 0 0 12px; max-height: 46vh; overflow: auto; }
.join-name { align-items: center; }
.joined-box { margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-3); }
.joined-box p { margin: 0 0 8px; }
.joined-warn { color: var(--warn); font-weight: 500; }
.joined-list { display: grid; gap: 4px; margin: 0 0 10px; padding: 0; list-style: none; }
.joined-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; min-height: 32px; }
.joined-list li .one-line { max-width: none; }
@media (max-width: 640px) {
  .joined-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .joined-list li .muted { grid-column: 1; grid-row: 2; }
  .join-bar .btn { flex: 1 1 auto; }
}

/* SALES: ONE LINE A ROW on a laptop (2026-10-10; its rows were two to four lines). Who = the name; What = its title and,
   beside it, what it is about; Received = the amount; the Note cut with dots. What is cut or left out is in the cell's
   tooltip and in the sale's own dialog (a press on the row). A phone already had one line. */
@media (min-width: 641px) {
  table.sales-table td { white-space: nowrap; }
  table.sales-table .who .cell > :not(:first-child), table.sales-table .money-sub, table.sales-table .sale-what .chip { display: none; }
  table.sales-table .who .cell > :first-child { display: block; max-width: 230px; overflow: hidden; text-overflow: ellipsis; }
  table.sales-table .sale-what { flex-direction: row; align-items: baseline; gap: 8px; max-width: 280px; }
  table.sales-table .sale-what > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  table.sales-table .sale-what > strong { flex: none; max-width: 100%; }
  table.sales-table td.sale-note { max-width: 240px; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
}
/* Settings, Backup, "Table by table" on a phone: the last cell (what is left out of a table, in words) goes on to the
   next line as on a laptop. It was one line there and made the table 508 px wider than its box at 390. */
@media (max-width: 640px) {
  table.data.compact.set-table { width: 100%; }
  table.data.compact.set-table td:last-child { white-space: normal; overflow-wrap: anywhere; }
}

/* FILES SENT (2026-10-10): one side of a file in a cell is the license number and the name, on one line; a press opens
   that teacher's page. */
.file-side { display: inline-flex; align-items: baseline; gap: 8px; max-width: 100%; text-align: left; }
.file-side .one-line { max-width: 220px; }
/* On a phone the number stands above the name, so that Sent, From and To fit the screen. */
@media (max-width: 640px) {
  .file-side { flex-direction: column; align-items: flex-start; gap: 0; }
  .file-side .one-line { max-width: 104px; }
  table.files-table td { padding-left: 8px; padding-right: 8px; }
}
/* Files sent, the flag "Another school": a tag as plain as a state's, in the colour of a thing to look at. */
.cross-tag { font-weight: 600; }
table.files-table td .one-line { max-width: 170px; }
.cross-words { margin: 6px 0 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-3); color: var(--ink-2); font-size: var(--fs-sm); white-space: pre-line; }
.cross-under { display: none; }
@media (max-width: 640px) { .cross-under { display: block; color: var(--warn); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; } }

/* ============================================================ PRICES AND PAYMENT (2026-10-10; js/deskp.js)
   Each price and each way to pay is one row: what it is, how it stands, its buttons at the right. */
.price-row { display: grid; grid-template-columns: minmax(150px, 1.1fr) minmax(0, 2.4fr) auto; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.price-row:first-child { border-top: 0; }
.price-what { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; }
.price-shown { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-width: 0; color: var(--ink-2); }
.price-shown .one-line { max-width: 100%; }
.price-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.price-now { color: var(--ink); font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.price-line { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.price-was { color: var(--ink-3); }
.promo-tag { padding: 1px 8px; border-radius: var(--r); background: var(--brand-soft); color: var(--brand-ink); font-size: var(--fs-sm); font-weight: 600; }
.price-when { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 10px 0; }
.price-preview { margin: 10px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-3); }
.price-preview p { margin: 0 0 4px; }
.price-warn { margin: 10px 0 0; padding: 8px 10px; border-radius: var(--r); background: var(--warn-soft, #FFF4DC); color: var(--ink-1); }
table.price-history td .one-line { max-width: 260px; }
.way-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 10px; }
.way-two > :only-child { grid-column: 1 / -1; }
.way-card { min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.way-card.is-next { border-color: var(--brand); background: var(--brand-soft); }
.way-card-title { margin: 0 0 6px; font-weight: 600; }
.way-kv { margin: 0 0 8px; }
.way-qr { display: block; width: 140px; height: 140px; object-fit: contain; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.way-steps { margin: 8px 0 0; padding-left: 18px; }
.way-new { margin-left: 2px; }
.plain-list { margin: 0; padding-left: 18px; color: var(--ink-2); }
.plain-list li { margin: 4px 0; }
.pay-waiting { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--warn); border-radius: var(--r); background: var(--warn-soft, #FFF4DC); color: var(--ink); font-weight: 600; }
.pay-waiting[hidden] { display: none; }
.pay-waiting > span { flex: 1 1 240px; min-width: 0; }
/* ON HOME THE "NEW:" LINE IS NOT SHOWN: Home's Inbox lists the same, and draws itself again when something comes in
   (js/deskn.js `arrived`). Rom, 2026-10-28, from his phone: "more simple ... direct to the point". */
body:has([data-pane="overview"]:not([hidden])) [data-desk-new] { display: none; }
@media (max-width: 640px) {
  /* (one short row on a phone: the words, and its button beside them, not under them) */
  .pay-waiting { gap: 8px; padding: 8px 10px; font-size: var(--fs-sm); }
  .pay-waiting > span { flex: 1 1 150px; }
  .pay-waiting .btn { flex: none; min-height: 36px; padding: 0 12px; }
}
.pay-waiting .ico { width: 18px; height: 18px; flex: none; }
.req-price-note { margin: 2px 0 0; }
@media (max-width: 760px) {
  .price-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .price-acts { justify-content: flex-start; }
  .way-two { grid-template-columns: minmax(0, 1fr); }
}
/* (Sell and Requests became one line of the menu the same day, so with Prices and payment the menu is fifteen lines still.) */
/* The count of waiting requests on the Requests tab of "Sell". */
.seg-nav .seg-count { display: inline-grid; place-items: center; min-width: 20px; height: 18px; margin-left: 8px; padding: 0 6px; border-radius: 999px; background: var(--gold); color: #17201B; font-size: .6875rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.seg-nav .seg-count:empty { display: none; }
/* Payments, "Payer chose": the way's name, and a quiet word when it is not what was recorded. */
.pay-way { display: inline-flex; align-items: baseline; gap: 6px; max-width: 100%; }
.pay-way .one-line { max-width: 110px; }
.pay-differs { color: var(--warn); font-size: var(--fs-xs); font-weight: 600; }

/* ============================================================ ID designs (js/deskid.js, 2026-10-15)
   The list, then one design at a time: the card on the left (a canvas: the picture with the fields' boxes), the fields,
   For and the preview on the right. On a phone everything stands in one column, to look at; editing is for a mouse. */
.idd-table td.col-primary { max-width: 260px; }
.idd-bar { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; margin: 0 0 10px; }
.idd-name { flex: 1 1 220px; max-width: 420px; }
.idd-bar-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.idd-unsaved { margin-left: 6px; }
.idd-waits { margin: 0 0 12px; color: var(--ink-3); }
.idd-waits.bad { color: var(--warn); font-weight: 500; }
.idd-grid { display: grid; grid-template-columns: minmax(260px, 400px) minmax(0, 1fr); gap: 16px; align-items: start; }
.idd-side-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.idd-side-col > .panel, .idd-card { margin: 0; }
.idd-sides { display: flex; width: 100%; margin: 0 0 12px; }
.idd-sides > button { flex: 1 1 0; }
.idd-canvas-wrap { max-width: 400px; margin: 0 auto; }
.idd-canvas { display: block; width: 100%; height: auto; border: 1px solid var(--line-2); background: #FFFFFF; touch-action: none; cursor: move; }
.idd-canvas:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.idd-tools { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 6px; }
.idd-note { margin: 6px 0 0; }
.idd-phone-only { display: none; }
.idd-add-row { display: flex; gap: 8px; margin: 0 0 10px; }
.idd-add-row select { flex: 1 1 auto; }
.idd-fields { display: flex; flex-direction: column; gap: 4px; margin: 0 0 14px; }
.idd-field-row { display: flex; align-items: center; gap: 6px; }
.idd-field-row .chip-btn { flex: 1 1 auto; justify-content: flex-start; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.idd-props { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.idd-props .wide { grid-column: 1 / -1; margin: 0; }
.idd-props label { display: block; margin: 0 0 3px; color: var(--ink-3); font-size: var(--fs-sm); }
.idd-props label.check { display: flex; align-items: center; gap: 9px; margin: 2px 0 0; color: var(--ink-1); font-size: var(--fs-md); }
input.idd-color:not([type="checkbox"]) { padding: 3px; cursor: pointer; }
.idd-preview { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 460px; }
.idd-preview figure { margin: 0; }
.idd-preview canvas { display: block; width: 100%; height: auto; border: 1px solid var(--line); background: #FFFFFF; }
.idd-preview figcaption { margin-top: 4px; color: var(--ink-3); font-size: var(--fs-sm); text-align: center; }
@media (max-width: 1100px) { .idd-props { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .idd-grid { grid-template-columns: minmax(0, 1fr); }
  .idd-wide-only { display: none; }
  .idd-phone-only { display: block; }
  .idd-bar-tools { margin-left: 0; }
}

/* Page replies (js/deskfb.js): the step-by-step picture as it will look in Messenger, small. */
.pgr-pic { display: block; width: 216px; height: auto; margin-top: 10px; border: 1px solid var(--line, #dde3e0); border-radius: 10px; }

/* Page replies: the round icon of a tap button, as Messenger shows it (js/deskfb.js). */
.pgr-icon { border-radius: 50%; flex: none; }
.pgr-btn { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.pgr-icon-row { display: flex; align-items: center; gap: 12px; }

/* ProCoins (js/deskcoins.js): a row of number fields that wraps, the packs' number boxes, the page's buttons at the right. */
.pc-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px 14px; margin: 0 0 14px; }
.pc-fields > .field { margin: 0; }
table.pc-packs input { width: 110px; }
/* LICENSES ON A PHONE (Rom, 2026-10-28, "more simple ... the buttons are optimized"): Generate a license on its own row,
   the four tools as equal squares under it; the figures are left out, as the chips under them say the same counts. */
@media (max-width: 640px) {
  [data-pane="licenses"] .page-tools > .btn-primary { flex: 1 1 100%; }
  [data-pane="licenses"] .page-tools > .btn-tool { flex: 1 1 0; width: auto; }
  [data-pane="licenses"] [data-lic-kpis] { display: none; }
}
/* (the price's boxes two to a row on a phone, their notes short: Rom, 2026-10-28, "more simple") */
@media (max-width: 640px) { .pc-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
@media (max-width: 640px) {
  /* ON A PHONE EACH PACK IS A CARD (Rom, 2026-10-28: on his phone the packs showed only their 3 Remove buttons: the phone's
     one-line tables leave out the columns that do not fit, and these were the boxes). "Pack 1" and Remove on top, the three
     boxes side by side with their words over them, then what the teacher gets. As table.er-table (the rules) does. */
  .table-wrap:has(> table.pc-packs) { overflow: visible; border: 0; border-radius: 0; background: none; }
  table.data.compact.pc-packs { display: block; width: 100%; min-width: 0; }
  table.data.compact.pc-packs thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.data.compact.pc-packs tbody { display: block; }
  table.data.compact.pc-packs tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 8px; margin: 0 0 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
  /* (height: auto undoes the phone tables' one-line row height) */
  table.data.compact.pc-packs td { display: block; height: auto; padding: 0; border: 0; white-space: normal; background: none; position: static; box-shadow: none; }
  table.data.compact.pc-packs td.pc-n { grid-column: 1 / 3; grid-row: 1; align-self: center; color: var(--ink-3); font-size: var(--fs-sm); font-weight: 600; }
  table.data.compact.pc-packs td.pc-n::before { content: "Pack "; }
  table.data.compact.pc-packs td.pc-remove { grid-column: 3; grid-row: 1; justify-self: end; }
  table.data.compact.pc-packs td.pc-remove .btn { min-height: 36px; }
  table.data.compact.pc-packs td.pc-in { grid-row: 2; }
  table.data.compact.pc-packs td.pc-in::before { content: attr(data-label); display: block; margin: 0 0 4px; color: var(--ink-3); font-size: var(--fs-sm); }
  table.data.compact.pc-packs td.pc-in input { width: 100%; font-size: 1rem; }
  table.data.compact.pc-packs td.pc-gets { grid-column: 1 / -1; grid-row: 3; color: var(--ink-3); }
  table.data.compact.pc-packs td.pc-gets::before { content: attr(data-label) ": "; }
}
.pc-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
td.num.bad { color: var(--bad); }

/* ProExam AI rules (js/deskrules.js): a rule's words take the room; its kinds wrap as small ticks; the preview's lists. */
table.er-table td.er-text { width: 100%; min-width: 260px; }
/* (js/deskrules.js `fit` makes each box as tall as its words, so a rule never scrolls inside its box) */
table.er-table td.er-text textarea { width: 100%; min-height: 52px; resize: vertical; }
table.data.compact.er-table td.er-text { white-space: normal; }
@media (max-width: 640px) {
  /* ON A PHONE EACH RULE IS A CARD, not a row of a table that scrolls sideways (Rom, 2026-10-28: on his phone only the
     ↑ ↓ Remove buttons could be read): "Rule 3" and its buttons on top, the words in full under them, then its kinds. */
  .table-wrap:has(> table.er-table) { overflow: visible; border: 0; border-radius: 0; background: none; }
  table.data.compact.er-table { display: block; width: 100%; min-width: 0; }
  table.data.compact.er-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.data.compact.er-table tbody { display: block; }
  table.data.compact.er-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; margin: 0 0 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
  /* (height: auto undoes the phone tables' one-line row height, which squeezed each rule's box to nothing) */
  table.data.compact.er-table td { display: block; height: auto; padding: 0; border: 0; white-space: normal; background: none; position: static; box-shadow: none; }
  table.data.compact.er-table td.num { grid-column: 1; grid-row: 1; color: var(--ink-3); font-size: var(--fs-sm); font-weight: 600; }
  table.data.compact.er-table td.num::before { content: "Rule "; }
  table.data.compact.er-table td.er-moves { grid-column: 2; grid-row: 1; display: flex; gap: 4px; }
  table.data.compact.er-table td.er-moves .btn { min-width: 40px; min-height: 36px; }
  table.data.compact.er-table td.er-text { grid-column: 1 / -1; grid-row: 2; width: auto; min-width: 0; }
  table.data.compact.er-table td.er-text textarea { font-size: 1rem; }
}
.er-for { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 6px 0 0; }
.er-kinds { display: flex; flex-wrap: wrap; gap: 2px 12px; }
.er-kind { margin: 0; font-size: var(--fs-sm, 13px); }
.er-count { margin-right: auto; align-self: center; }
.er-preview { margin: 0 0 12px; padding-left: 22px; }
.er-preview li { margin: 2px 0; }
.er-preview-head { justify-content: flex-start; align-items: center; margin: 0 0 6px; }

/* THE DESK IN SIX PLACES (2026-10-28; admin/index.html, GROUPS in js/admin.js). */
/* Under your name, at the foot of the menu: Install, the install guide, My account, Sign out. A <details>: no script. */
.side-me { display: flex; flex-direction: column; }
.side-me > summary { list-style: none; cursor: pointer; border-radius: var(--r); }
.side-me > summary::-webkit-details-marker { display: none; }
.side-me > summary:hover { background: var(--nav-hover); }
.side-me > summary:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.side-me-more { margin-left: auto; transition: transform .15s; }
.side-me[open] .side-me-more { transform: rotate(180deg); }
.side-me-list { display: flex; flex-direction: column; gap: 2px; padding: 2px 0 4px; }
@media (min-width: 900px) {
  .side-collapsed .side-me-more { display: none; }
  .side-collapsed .side-me > summary { justify-content: center; }
}
/* The switch at the top of a place's pages: its count beside a page's word; Setup's second row (the pages of its part)
   quieter than the first. */
.seg-nav > a .count { display: inline-grid; place-items: center; min-width: 20px; height: 18px; margin-left: 6px; padding: 0 5px; border-radius: 999px; background: var(--gold); color: #17201B; font-size: .6875rem; font-weight: 600; line-height: 1; }
.seg-nav > a .count:empty { display: none; }
.seg.seg-nav + .seg.seg-nav.seg-sub { margin-top: -6px; }
.seg.seg-nav.seg-sub > a { flex: 0 1 auto; min-height: 32px; font-size: var(--fs-sm); }

/* HOME'S INBOX (2026-10-28, part 2; js/admin.js loadInbox): the waiting-list rows; a line's title opens it whole. */
.inbox-list .inbox-title { align-self: flex-start; max-width: 100%; color: var(--ink); font-weight: 600; text-align: left; overflow-wrap: anywhere; }
.inbox-list .inbox-title:hover { color: var(--brand-ink); }
.inbox-list .btn { flex: none; }
.inbox-more { margin: 10px 2px 0; }

/* FOR A WHOLE SCHOOL (2026-10-28, part 3; js/licenses.js openSchoolSale): the pasted list and what the site said of each line. */
#ss-list { width: 100%; font-family: var(--mono, ui-monospace, monospace); font-size: var(--fs-sm); }
.ss-paid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; }
.ss-paid[hidden] { display: none; }
/* (2026-11-05) the school's sum, the price of one license times the teachers: one line under the three boxes */
.ss-total { grid-column: 1 / -1; margin: 0 0 12px; }
.ss-total:empty { display: none; }
.ss-sum { margin: 0 0 6px; }
.ss-table td .status { white-space: normal; }
@media (max-width: 640px) { .ss-paid { grid-template-columns: minmax(0, 1fr); } }

/* THE BOOKS (2026-11-12; made simple with the journal 2026-11-13, Update list No. 115; js/deskbooks.js): ONE BAR in the page head (the
   period, Add entry, More), the figures, four views. The statements, the journal and the accounts are plain tables: the amounts on
   the right in even digits, totals over a line, the bottom line double-ruled, a credit line set in as an accountant writes it. */
.bk-bar { flex-wrap: nowrap; }
.bk-bar .bk-pick { width: auto; min-height: 34px; padding-top: 0; padding-bottom: 0; }
.bk-bar .btn .ico { width: 15px; height: 15px; }
.bk-more { position: relative; }
.bk-more > summary { gap: 6px; list-style: none; }
.bk-more > summary::-webkit-details-marker { display: none; }
.bk-more > summary .ico { transition: transform .15s; }
.bk-more[open] > summary .ico { transform: rotate(180deg); }
.bk-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; display: grid; gap: 2px; min-width: 230px; padding: 6px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-2); }
.bk-menu > a, .bk-menu > button { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border: 0; border-radius: var(--r); background: none; color: var(--ink); font: 500 var(--fs-md)/1.2 var(--sans); text-align: left; text-decoration: none; cursor: pointer; }
.bk-menu > a:hover, .bk-menu > button:hover { background: var(--surface-3); }
.bk-menu .ico { width: 16px; height: 16px; color: var(--ink-3); }
.bk-days { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -6px 0 14px; }
.bk-days input[type="date"] { flex: 0 0 auto; width: auto; min-height: 34px; }
/* (the four views as one pill switch, so they never read as a second row of the Money tabs above) */
.bk-views { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin: 0 0 14px; padding: 4px; border-radius: var(--r-lg); background: var(--surface-3); }
.bk-views > button { min-height: 36px; padding: 0 8px; border: 0; border-radius: var(--r); background: none; color: var(--ink-2); font: 500 var(--fs-md)/1 var(--sans); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.bk-views > button:hover { color: var(--ink); }
.bk-views > button[aria-selected="true"] { background: var(--surface); color: var(--brand-ink); font-weight: 600; box-shadow: var(--shadow-1); }
.bk-views > button:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.bk-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.bk-grid > .panel + .panel { margin-top: 0; }
[data-bk-view] > .bk-grid + .panel, [data-bk-view] > .panel + .bk-grid { margin-top: 12px; }
.bk-head { display: grid; gap: 2px; min-width: 0; }
.bk-sub { color: var(--ink-3); font-size: var(--fs-sm); }
.bk-panel > .panel-head { flex-wrap: nowrap; align-items: flex-start; }
.bk-panel > .panel-head > .bk-badge { flex: none; margin-left: auto; }
/* (the panel's one picker on a row of its own under the head; its buttons at the foot, at the right on a laptop) */
.bk-ctrl { display: flex; gap: 8px; margin: -2px 0 12px; }
.bk-ctrl select { width: auto; min-width: 220px; max-width: 320px; min-height: 36px; }
.bk-actions { display: flex; justify-content: flex-end; gap: 8px; margin: 12px 0 0; }
.bk-when-sm { display: none; }
.bk-note { margin: 10px 0 0; color: var(--ink-3); font-size: var(--fs-sm); }
.bk-note.bk-warn { color: var(--gold-ink); }

/* the tables */
table.data.bk-t { font-variant-numeric: tabular-nums; }
table.data.bk-t th, table.data.bk-t td { padding: 8px 12px; }
table.data.bk-t .num { text-align: right; white-space: nowrap; }
table.data.bk-st td:first-child, table.data.bk-tb td:first-child, table.data.bk-j td.bk-acct { width: 100%; }
table.data.bk-t tr.bk-sec > th { padding-top: 14px; background: none; color: var(--ink-3); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
table.data.bk-t tbody tr.bk-sec:first-child > th { padding-top: 10px; }
table.data.bk-t tr.bk-none td { color: var(--ink-3); }
table.data.bk-t tr.bk-total td { border-top: 1px solid var(--line-2); background: var(--surface-2); font-weight: 600; }
table.data.bk-t tr.bk-grand td { border-top: 2px solid var(--ink-3); border-bottom: 3px double var(--ink-3); font-size: 1rem; font-weight: 700; }
table.data.bk-t tfoot td { border-bottom: 0; }
table.data.bk-t tfoot tr.bk-grand td { border-bottom: 0; }
.bk-neg, table.data.bk-t .bk-neg { color: var(--bad); }

/* the journal: an entry's head (day, what happened, where it came from), then its lines, the credits set in */
table.data.bk-j tbody.bk-e tr.bk-eh td { padding-top: 10px; padding-bottom: 6px; border-top: 1px solid var(--line-2); border-bottom: 0; background: var(--surface-2); }
table.data.bk-j tbody.bk-e:first-of-type tr.bk-eh td { border-top: 0; }
table.data.bk-j tbody.bk-e tr:not(.bk-eh) td { padding-top: 5px; padding-bottom: 5px; border-bottom: 0; vertical-align: top; }
table.data.bk-j tbody.bk-e tr:last-child td { padding-bottom: 10px; }
table.data.bk-j td.bk-acct { padding-left: 24px; }
table.data.bk-j tr.bk-cr td.bk-acct { padding-left: 52px; color: var(--ink-2); }
.bk-eh-in { display: flex; align-items: flex-start; gap: 4px 10px; }
.bk-day { flex: none; min-width: 48px; padding-top: 1px; color: var(--ink-3); font-size: var(--fs-sm); font-weight: 600; }
.bk-memo { flex: 1 1 auto; min-width: 0; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.bk-eh-in > .bk-tag, .bk-off { flex: none; }
.bk-eh-in > .icon-btn.plain.bk-off { width: 24px; height: 22px; margin: -1px -4px 0 -4px; }
.bk-tag { display: inline-flex; align-items: center; min-height: 20px; padding: 0 8px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; }
td > .bk-tag { margin-left: 8px; }
.bk-tag-own { background: var(--brand-soft); color: var(--brand-ink); }
.bk-tag-cost { background: var(--gold-soft); color: var(--gold-ink); }
.bk-tag-pay { background: var(--info-soft); color: var(--info); }
.bk-tag-auto { background: var(--surface-3); color: var(--ink-3); }
.bk-badge { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 0 10px; border-radius: 999px; background: var(--surface-3); color: var(--ink-3); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; }
.bk-badge.ok { background: var(--ok-soft); color: var(--ok); }
.bk-badge.ok::before { content: "✓"; }
.bk-badge.bad { background: var(--bad-soft); color: var(--bad); }

/* the accounts: a name opens its entries */
.bk-link { padding: 0; border: 0; background: none; color: var(--brand-ink); font: inherit; font-weight: 500; text-align: left; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; cursor: pointer; }
.bk-link:hover { text-decoration-color: currentColor; }

/* the ProCoins moves */
.bk-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.bk-filters select, .bk-filters input { width: auto; min-height: 36px; }
.bk-filters input { flex: 1 1 120px; max-width: 200px; }
.bk-who { display: grid; gap: 1px; }
.bk-who.end { justify-items: end; }
table.data.bk-led td { white-space: normal; vertical-align: top; }
table.data.bk-led td.bk-when { color: var(--ink-3); font-size: var(--fs-sm); white-space: nowrap; }

/* Add entry, a new account, the settings, taking an entry off */
.bk-sheet .sheet-foot > .btn { flex: 1 1 0; }
.seg.seg-fill.bk-mode { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 0 14px; }
.bk-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.bk-form > .bk-field { display: grid; gap: 6px; margin: 0 0 12px; }
.bk-form > .bk-wide, .bk-form > .bk-note { grid-column: 1 / -1; }
.bk-form > .bk-note { margin: -4px 0 0; }
.bk-field input, .bk-field select { width: 100%; }
.bk-field .bk-note { margin: 0; }
table.data.bk-lines th, table.data.bk-lines td { padding: 6px; }
table.data.bk-lines th:first-child, table.data.bk-lines td:first-child { width: 48%; }
table.data.bk-lines select { width: 100%; min-width: 140px; }
table.data.bk-lines input { width: 100%; min-width: 76px; text-align: right; }
table.data.bk-lines td:last-child { width: 34px; }
.bk-lines-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 10px 0 0; }
.bk-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-left: auto; color: var(--ink-2); font-size: var(--fs-md); font-variant-numeric: tabular-nums; }
.bk-new { margin: 12px 0 0; padding: 12px; border: 1px dashed var(--line-2); border-radius: var(--r-lg); background: var(--surface-2); }
.bk-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bk-off-what { margin: 0 0 6px; }
/* (two panels side by side only where each has room for its words and numbers) */
@media (max-width: 1279px) { .bk-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) {
  /* BALANCED (the standing rule): the period alone on the first row, the whole width (its words never cut, at 360 px too); More and
     Add entry under it as two even halves, the main button last; a lone button fills its row; every tap target is the phone's height */
  .page-tools.bk-bar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); flex-wrap: nowrap; gap: var(--ph-gap); }
  .page-tools.bk-bar > * { min-width: 0; }
  .page-tools.bk-bar > .bk-pick { grid-column: 1 / -1; }
  .page-tools.bk-bar > .btn, .bk-more > summary { width: 100%; min-height: var(--ph-h); justify-content: center; padding: 0 8px; }
  .bk-bar .bk-pick { width: 100%; min-height: var(--ph-h); }
  /* (More's menu opens under the whole bar, its rows the full width: never off the screen, whichever third More is in) */
  .page-tools.bk-bar { position: relative; }
  .bk-more { position: static; display: block; }
  .bk-menu { left: 0; right: 0; min-width: 0; }
  .bk-menu > a, .bk-menu > button { min-height: var(--ph-h); }
  .bk-views { margin-bottom: var(--ph-block); }
  .bk-views { padding: 3px; }
  .bk-views > button { min-height: var(--ph-h); padding: 0 4px; }
  .bk-days { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: var(--ph-gap); margin: 0 0 var(--ph-block); }
  .bk-days input[type="date"] { width: 100%; min-width: 0; min-height: var(--ph-h); }
  .bk-days .btn { grid-column: 1 / -1; width: 100%; min-height: var(--ph-h); }
  [data-bk-view] > .bk-grid + .panel, [data-bk-view] > .panel + .bk-grid, .bk-grid { gap: var(--ph-block); }
  [data-bk-view] > .bk-grid + .panel { margin-top: var(--ph-block); }
  .bk-ctrl select { width: 100%; max-width: none; min-height: var(--ph-h); }
  .bk-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ph-gap); }
  .bk-actions.one { grid-template-columns: minmax(0, 1fr); }
  .bk-actions > .btn { width: 100%; min-height: var(--ph-h); justify-content: center; }
  table.data.bk-t th, table.data.bk-t td { padding-left: 10px; padding-right: 10px; }
  /* (ProCoins moves: the When column gives way and its time is the first small line of What, so What has room) */
  table.data.bk-led .bk-when { display: none; }
  .bk-when-sm { display: block; }
  table.data.bk-j td.bk-acct { padding-left: 12px; }
  table.data.bk-j tr.bk-cr td.bk-acct { padding-left: 24px; }
  table.data.bk-j .num, table.data.bk-tb .num { padding-left: 6px; }
  .bk-filters select, .bk-filters input { flex: 1 1 0; max-width: none; min-height: var(--ph-h); }
  .bk-form { grid-template-columns: minmax(0, 1fr); }
  .bk-field input, .bk-field select { min-height: var(--ph-h); }
  /* (a line of an entry on a phone: the account across, its debit and credit under it, the remove button beside them) */
  table.data.bk-lines thead { display: none; }
  table.data.bk-lines, table.data.bk-lines tbody { display: block; width: 100%; }
  table.data.bk-lines tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) var(--ph-h); gap: 6px; padding: 8px; border-bottom: 1px solid var(--line); }
  table.data.bk-lines td:last-child > .icon-btn { width: var(--ph-h); height: var(--ph-h); }
  table.data.bk-lines tr:last-child { border-bottom: 0; }
  table.data.bk-lines tr:has(> td:last-child:empty) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  table.data.bk-lines td:last-child:empty { display: none; }
  table.data.bk-lines td { display: block; width: auto; padding: 0; border: 0; background: none; }
  table.data.bk-lines td:first-child { grid-column: 1 / -1; width: auto; }
  table.data.bk-lines td:last-child { width: auto; align-self: center; }
  table.data.bk-lines select, table.data.bk-lines input { min-width: 0; min-height: var(--ph-h); }
  /* (under the lines: "Line" fills its row; the totals are three even parts: Debit, Credit, and whether they balance) */
  .bk-lines-foot { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--ph-gap); }
  .bk-lines-foot > .btn { width: 100%; min-height: var(--ph-h); justify-content: center; }
  .bk-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; gap: 6px; margin-left: 0; text-align: center; font-size: var(--fs-sm); }
  .bk-sum > .bk-badge { justify-content: center; min-width: 0; padding: 0 6px; white-space: normal; text-align: center; line-height: 1.2; }
}

/* THE PHONE'S HOME (2026-11-12; Rom: "the website in my phone can be like the mobile app that would be more simple and summarize
   it or can have icons? as in home same in mobile?", his pick A, "Like ProTitser Mobile"; admin/index.html [data-dh-home],
   js/admin.js drawPhoneHome and paintPhoneCard). ProTitser Mobile's Home on the desk, at 640px and narrower: the green card as
   a wallet's (the phone's own look: its style.css .home-card and .hc-*), then the pages as icons on pale green tiles, four to
   a line (.home-icons). Home's own head and switch give way to them; the Inbox and Needs attention stay where they are; the
   figures, the charts, Distributors need you and Latest activity fold under "More on Home". A laptop shows none of this. */
.dh-home, .dh-more { display: none; }
@media (max-width: 640px) {
  .dh-card { --dh-green: #187A48; }
  /* Home is one column with the desk's one gap; the folded parts come after the button that opens them. */
  [data-pane="overview"]:not([hidden]) { display: flex; flex-direction: column; gap: var(--ph-block); }
  body.app [data-pane="overview"] > * { margin: 0; }
  [data-pane="overview"] > :is(.page-head, .seg-nav) { display: none; }
  .dh-home { display: flex; flex-direction: column; gap: var(--ph-block); }
  .dh-more { display: flex; order: 1; }
  [data-pane="overview"] > .dh-fold { order: 2; }
  [data-pane="overview"] > .dl-guide { order: 3; }
  [data-pane="overview"]:not(.dh-open) > .dh-fold { display: none; }
  /* An empty Inbox says nothing the card does not ("All caught up"). */
  [data-pane="overview"] > [data-inbox-panel].is-empty { display: none; }
  .dh-more .ico { transition: transform .2s ease; }
  .dh-more[aria-expanded="true"] .ico { transform: rotate(180deg); }

  /* ---- the green card: what waits on top; this month's money and the one button in a white strip at its foot ---- */
  .dh-card { position: relative; overflow: hidden; border-radius: 16px; background: var(--dh-green); color: #FFFFFF; box-shadow: 0 6px 18px rgba(0, 0, 0, .16); animation: dh-rise .46s cubic-bezier(.2, .8, .2, 1) both; }
  /* A slow band of light across the card, now and then (as the phone's). */
  .dh-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .16) 50%, transparent 65%); transform: translateX(-120%); animation: dh-sheen 7s ease-in-out 1.2s infinite; pointer-events: none; }
  .dh-top { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; }
  .dh-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; align-self: stretch; }
  .dh-pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, .18); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
  .dh-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: rgba(255, 255, 255, .7); }
  .dh-card.is-live .dh-dot { background: #8BF0B5; animation: dh-pulse 1.8s ease-out infinite; }
  .dh-date { color: rgba(255, 255, 255, .85); font-size: var(--fs-xs); white-space: nowrap; }
  .dh-big { font-size: 1.625rem; font-weight: 600; line-height: 1.15; }
  .dh-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
  .dh-chips[hidden] { display: none; }
  .dh-chips li { padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .16); font-size: var(--fs-sm); font-weight: 500; }
  .dh-strip { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; background: var(--surface); color: var(--ink); }
  .dh-money { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }
  .dh-money small { color: var(--ink-3); font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
  .dh-money b { overflow: hidden; color: var(--ink); font-size: 1.125rem; font-weight: 600; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
  body.app .dh-go { display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 8px; min-height: var(--ph-h); padding: 0 16px; border-radius: 12px; background: var(--dh-green); color: #FFFFFF; font-size: var(--fs-md); font-weight: 600; text-decoration: none; }
  .dh-go .ico { width: 18px; height: 18px; }
  .dh-go:active { opacity: .85; }
  /* A helper has no money and no Generate: their strip is one quiet button, the whole width (Balanced buttons). */
  body.app .dh-helper { display: none; }
  body.app.is-helper .dh-helper { display: inline-flex; flex: 1 1 auto; background: var(--brand-soft); color: var(--brand-ink); }

  /* ---- the icons: four to a line, each on a pale green tile with its count; Show all opens every place's pages ---- */
  .dh-icons { padding: 14px 6px 6px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
  .dh-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 2px; }
  body.app .dh-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; padding: 2px 2px 4px; border-radius: var(--r); color: var(--ink-2); font-size: .75rem; font-weight: 500; line-height: 1.2; text-align: center; text-decoration: none; -webkit-tap-highlight-color: transparent; }
  .dh-tile .ico { width: 46px; height: 46px; padding: 11px; box-sizing: border-box; border-radius: 14px; background: var(--brand-soft); color: var(--brand-ink); stroke-width: 1.75; }
  .dh-tile:active .ico { background: var(--brand-soft-2); }
  .dh-tile:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
  .dh-word { max-width: 100%; overflow-wrap: break-word; hyphens: auto; }
  .dh-tile .count { position: absolute; top: -3px; left: calc(50% + 12px); display: grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--gold); color: #17201B; font-size: .6875rem; font-weight: 600; line-height: 1; box-shadow: 0 0 0 2px var(--surface); }
  .dh-tile .count:empty { display: none; }
  .dh-icons:not(.is-all) .dh-every, .dh-icons.is-all .dh-few { display: none; }
  .dh-every { display: flex; flex-direction: column; gap: 16px; }
  .dh-place-name { margin: 0 0 10px 8px; color: var(--ink-3); font-size: .6875rem; font-weight: 600; letter-spacing: .08em; line-height: 1.2; text-transform: uppercase; }
  .dh-all { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: var(--ph-h); margin-top: 8px; border: 0; border-radius: var(--r); background: none; color: var(--brand-ink); font: 600 var(--fs-sm)/1 var(--sans); cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .dh-all .ico { width: 16px; height: 16px; transition: transform .2s ease; }
  .dh-all[aria-expanded="true"] .ico { transform: rotate(180deg); }
  .dh-all:active { background: var(--surface-3); }
}
/* A small phone: the longest words stay inside their quarter. */
@media (max-width: 340px) {
  body.app .dh-tile { font-size: .6875rem; }
  .dh-tile .ico { width: 42px; height: 42px; padding: 10px; }
}
/* The dark look: the card a deeper green under its white words. */
@media (max-width: 640px) and (prefers-color-scheme: dark) {
  .dh-card { --dh-green: #1B6B43; box-shadow: none; }
}
@keyframes dh-rise { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes dh-sheen { 0%, 62% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@keyframes dh-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .6); } 70%, 100% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); } }
@media (prefers-reduced-motion: reduce) {
  .dh-card, .dh-card.is-live .dh-dot { animation: none !important; }
  .dh-card::after { display: none; }
}

/* A PLACE ON A PHONE (2026-11-12; Rom, of the tabs at the top of a page: "this should be like in the advisory style", his pick
   A, "Place screens"; admin/index.html [data-dh-place], js/admin.js showPlace and drawPhonePlaces). A place's screen is
   ProTitser Mobile's Advisory (its style.css .panel.centered and .row): the name and a line in a card, then the rows, each
   with its icon, its word over a short line, what needs you there and an arrow. Only a phone links to it; at any width it
   shows the same. On a phone the tabs at the top of the pages give way to a back row to their place. */
.dh-back { display: none; }
.dh-place:not([hidden]) { display: flex; flex-direction: column; gap: var(--ph-block, 14px); max-width: 640px; animation: page-in .18s ease both; }
.dh-place > .panel { margin: 0; }
.panel.dh-phead { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.dh-pname { margin: 0; color: var(--ink); font-size: 1.1875rem; font-weight: 600; line-height: 1.3; }
.dh-phead small { color: var(--ink-3); font-size: var(--fs-sm); }
.panel.dh-prows { padding: 0; overflow: hidden; }
.dh-ppart { margin: 0; padding: 14px 16px 4px; color: var(--ink-3); font-size: .6875rem; font-weight: 600; letter-spacing: .08em; line-height: 1.2; text-transform: uppercase; }
body.app .dh-prow { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.dh-prows > .dh-prow:first-child, .dh-ppart + .dh-prow { border-top: 0; }
.dh-prow:hover, .dh-prow:active { background: var(--surface-3); }
.dh-prow:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
.dh-prow > .ico:first-child { width: 22px; height: 22px; flex: none; color: var(--brand-ink); }
.dh-prow > .ico:last-child { width: 18px; height: 18px; flex: none; color: var(--ink-4); }
.dh-pmain { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }
.dh-pword { font-weight: 600; line-height: 1.3; }
.dh-pmain small { color: var(--ink-3); font-size: var(--fs-sm); line-height: 1.35; }
.dh-prow .count { display: grid; flex: none; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--gold); color: #17201B; font-size: .6875rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.dh-prow .count:empty { display: none; }
@media (max-width: 640px) {
  body.app .seg.seg-nav { display: none; }
  body.app .dh-back { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; min-height: var(--ph-h); margin-left: -6px; padding: 0 12px 0 6px; border-radius: var(--r); color: var(--brand-ink); font-weight: 600; text-decoration: none; -webkit-tap-highlight-color: transparent; }
  .dh-back .ico { width: 18px; height: 18px; }
  .dh-back:active { background: var(--surface-3); }
  body.app :is([data-pane]) > .dh-back + .page-head { margin-top: 0; }
}

/* BALANCED ON A PHONE (2026-11-13, Update list No. 116; the standing rules r13, r14 and r42, CLAUDE.md "BALANCED BUTTONS, AND EVERY
   DESK PAGE FITS ROM'S PHONE"; js/admin.js balanceOnPhone). Rom, of the whole desk: "make them compress or redesign the UI that would
   easy to understand and if there functionality that can be fuse fuse them". At 640 px and narrower, on every page of the desk:
   a page's bar is the main button and ONE "More" (its extra tools, with their words) as even halves, the main button last; a lone tool
   fills its row with its words; figures and chips are two even columns, an odd last one the whole row (no strip to swipe, no ragged
   rows); a picker never cuts its words; buttons of a row are even; every tap target is 44 px. Nothing is taken off a page. */
.dk-more { position: relative; display: none; }
.dk-more > summary { gap: 6px; list-style: none; }
.dk-more > summary::-webkit-details-marker { display: none; }
.dk-more > summary .ico { transition: transform .15s; }
.dk-more[open] > summary .ico { transform: rotate(180deg); }
.dk-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30; display: grid; gap: 2px; min-width: 230px; padding: 6px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-2); }
@media (max-width: 640px) {
  /* the page's bar */
  .page-tools:not(.bk-bar) { position: relative; }
  .page-tools > .dk-more { position: static; display: block; flex: 1 1 0; min-width: 0; }
  .dk-more:not(:has(.dk-menu > :not([hidden]))) { display: none; }
  .page-tools > .dk-more > summary { width: 100%; min-height: var(--ph-h); justify-content: center; }
  .page-tools > .dk-more .dk-menu { left: 0; right: 0; min-width: 0; }
  .dk-menu > .btn, .dk-menu > .btn-tool { display: flex; justify-content: flex-start; gap: 10px; width: 100%; min-height: var(--ph-h); padding: 0 12px; border: 0; border-radius: var(--r); background: none; color: var(--ink); font-weight: 500; text-align: left; }
  .dk-menu > .btn:hover, .dk-menu > .btn-tool:hover { background: var(--surface-3); }
  .dk-menu > .btn-tool .btn-text { display: inline; }
  .dk-menu > .btn-tool .ico { color: var(--ink-3); }
  /* one tool beside the main button: its words show, even halves, the main button last */
  .page-tools > .btn-tool:not(:only-child) { flex: 1 1 0; width: auto; padding: 0 12px; }
  .page-tools > .btn-tool .btn-text { display: inline; }
  .page-tools > .btn-primary { order: 2; }
  .page-tools > .btn { justify-content: center; min-height: var(--ph-h); }
  /* (a bar with pickers, as Support: the pickers even halves on their row, More the whole row under them) */
  .page-tools:has(> .inline-select) > .dk-more { flex: 1 1 100%; order: 3; }
  /* a picker of the bar or a panel: its own words only (the word before it is in its name), never cut */
  .page-tools > .inline-select, .panel-tools > .inline-select, .dev-bar > .inline-select, .rec-grid > .inline-select { font-size: 0; }
  :is(.page-tools, .panel-tools, .dev-bar, .rec-grid) > .inline-select select { width: 100%; font-size: var(--fs-md); }

  /* figures: two even columns, every one in sight (the five- and six-tile strips swiped before) */
  .kpis:not([data-lic-kpis]), .kpis.kpis-5:not([data-lic-kpis]), .kpis.kpis-6 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; }
  /* (Licenses keeps its figures off a phone: its chips say the same counts) */
  .kpis.kpis-5 > .kpi, .kpis.kpis-6 > .kpi { flex: none; padding: 11px 14px 12px; }
  .kpis.kpis-5 .kpi-value, .kpis.kpis-6 .kpi-value { font-size: 1.375rem; }
  .kpis > .kpi.dk-span { grid-column: 1 / -1; }

  /* chips: two even columns, the label at the left and the count at the right; an odd last one the whole row */
  body[data-page="admin"] .chip-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-inline: 0; padding: 0; overflow: visible; }
  body[data-page="admin"] .chip-row > .chip-btn { justify-content: space-between; min-width: 0; min-height: var(--ph-h); white-space: normal; text-align: left; line-height: 1.2; }
  body[data-page="admin"] .chip-row > .dk-span { grid-column: 1 / -1; }
  .chips-more { width: 100%; min-height: var(--ph-h); justify-content: center; }

  /* buttons in a panel's head, a price, a pack, a way to pay: even, a lone one the whole row */
  .panel-head > .panel-tools > .btn { flex: 1 1 0; justify-content: center; min-height: var(--ph-h); }
  :is(.price-acts, .pc-actions) { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--ph-gap); width: 100%; }
  :is(.price-acts, .pc-actions) > .btn { width: 100%; justify-content: center; min-height: var(--ph-h); }
  /* (a line of words with its picker, as ProExam AI rules' "What the AI gets for": the words, then the picker the whole width) */
  .pc-actions.er-preview-head { grid-auto-flow: row; grid-auto-columns: auto; }
  .pc-actions.er-preview-head > select { width: 100%; }
  /* (Home's install guide: Open, PDF and Copy link as three even parts) */
  .dl-guide-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ph-gap); width: 100%; }
  .dl-guide-actions > .btn { width: 100%; justify-content: center; min-height: var(--ph-h); }

  /* the "New:" line above every page: its words the whole row, its buttons even halves (a lone one the whole row), Allow pop-ups last */
  body[data-page="admin"] .desk-new { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ph-gap); }
  body[data-page="admin"] .desk-new > [data-desk-new-text] { flex: 1 1 calc(100% - 40px); min-width: 0; }
  body[data-page="admin"] .desk-new > .btn { flex: 1 1 40%; justify-content: center; min-height: var(--ph-h); margin: 0; }
  body[data-page="admin"] .desk-new > [data-desk-new-popups] { order: 2; }

  /* Settings' rows and the lines of Needs attention: the words wrap beside their button, never cut */
  .set-row .set-what, .attn-list li .cell b, .attn-list li.tap .cell b, .attn-list li.tap .cell span { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }

  /* a link inside words: a 44 px tap target, the words where they were */
  .link-btn.inbox-title, .panel .link-btn { padding-block: 11px; margin-block: -11px; }
  details > summary.panel-title { display: flex; align-items: center; min-height: var(--ph-h); }
}

/* CHIPS EVEN AT EVERY WIDTH (2026-11-13, Update list No. 117; Rom, of a row of chips of uneven widths wrapping raggedly: "ANOYING I DONT
   WANT LIKE THIUS"): a row of chips of the desk fills its width, the label at the left and the count at the right: the chips of a row share it evenly and a lone last one takes its whole row; a row still goes on to a second line when it is full
   (never one line, never sideways). A phone has two even columns ("BALANCED ON A PHONE"). */
body[data-page="admin"] .chip-row > .chip-btn { flex: 1 1 150px; justify-content: space-between; min-width: 0; white-space: normal; text-align: left; }

/* LONG PAGES, TITLES FIRST, AND A RULE IS ITS TITLE (2026-11-13, Update list No. 117; js/admin.js foldPanels and ruleTitles). Rom: "THOSE
   RULES PROCOINS PRICES SETUP MAKE THEM MORE READABLE AND EASY TO UNDERSTAND MAKE A TITLE FIRST ON IT THAT CLICKABLE BUTTON ... SO IT
   WOULD AVOID LONG SCROLLING". On a phone: on ProExam AI and ProLesson AI rules, ProCoins, Prices and payment, Settings, Versions, School
   years, Teacher Hub, Announcements and Activity, every panel but the first is its title, a button that opens it; each rule is one line
   (its number, its first words, whom it is for) that opens the box to change it. A laptop shows everything as before. */
.dk-rule { display: none; }
@media (max-width: 640px) {
  .panel.dk-fold > .panel-head { position: relative; flex-wrap: nowrap; min-height: var(--ph-h); margin-bottom: 0; padding-right: 26px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .panel.dk-fold > .panel-head::after { content: ""; position: absolute; top: 15px; right: 2px; width: 14px; height: 14px; background: var(--ink-3); -webkit-mask: var(--m-chev) center / contain no-repeat; mask: var(--m-chev) center / contain no-repeat; transform: rotate(90deg); transition: transform .15s; }
  .panel.dk-fold.dk-open > .panel-head { flex-wrap: wrap; margin-bottom: 12px; }
  .panel.dk-fold.dk-open > .panel-head::after { transform: rotate(-90deg); }
  .panel.dk-fold:not(.dk-open) > :not(.panel-head), .panel.dk-fold:not(.dk-open) > .panel-head > :not(.panel-title, .itile) { display: none; }
  .panel.dk-fold > .panel-head:focus-visible { outline: 2px solid var(--ring); outline-offset: 4px; border-radius: var(--r-sm); }
  .panel.dk-fold:not(.dk-open) { padding-block: 4px; }

  /* a rule: one line that opens; open, its box the whole width and ↑ ↓ Remove as three even parts (one list with lines between the
     rules, in the place of a card a rule: half the height) */
  table.data.compact.er-table thead, table.data.compact.er-table td.num { display: none; }
  table.data.compact.er-table, table.data.compact.er-table tbody { display: block; width: 100%; min-width: 0; }
  table.data.compact.er-table tbody { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
  table.data.compact.er-table tbody tr { display: block; margin: 0; padding: 0 12px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: var(--surface); }
  table.data.compact.er-table tbody tr:last-child { border-bottom: 0; }
  table.data.compact.er-table tbody td { display: block; width: auto; height: auto; padding: 0; border: 0; white-space: normal; position: static; box-shadow: none; background: none; }
  .dk-rule { display: flex; align-items: flex-start; gap: 10px; width: 100%; min-height: var(--ph-h); padding: 11px 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .dk-rule-no { flex: none; min-width: 22px; color: var(--ink-3); font-weight: 600; font-variant-numeric: tabular-nums; }
  .dk-rule-main { display: grid; flex: 1 1 auto; gap: 2px; min-width: 0; }
  .dk-rule-words { overflow-wrap: anywhere; }
  .dk-rule-for { color: var(--ink-3); }
  .dk-rule-for:empty { display: none; }
  .dk-rule > .ico { flex: none; width: 16px; height: 16px; margin-top: 3px; color: var(--ink-3); transition: transform .15s; }
  tr.dk-open > td > .dk-rule > .ico { transform: rotate(180deg); }
  table.data.compact.er-table tr:has(.dk-rule):not(.dk-open) .er-text > :not(.dk-rule), table.data.compact.er-table tr:has(.dk-rule):not(.dk-open) > td.er-moves { display: none; }
  table.data.compact.er-table tr.dk-open td.er-text textarea { width: 100%; }
  table.data.compact.er-table tr.dk-open > td.er-moves { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ph-gap); padding-block: 10px 12px; }
  table.data.compact.er-table tr.dk-open > td.er-moves > .btn { width: 100%; min-width: 0; min-height: var(--ph-h); justify-content: center; }
}

/* ONE DEVICE, READABLE ON A PHONE (2026-11-13, Update list No. 118; js/tabs.js deviceCard). Rom: "THE DEVICES THE HOLDER SHOULD BE SEEN
   ALSO IN MOBILE And the device it should be readbale all". On a phone a row of Devices' laptops and phones is one cell: the holder in
   full with the state at the right, the device, then the license, school, version, last seen and last backup in words; nothing is cut
   and nothing left out. A tap opens the license, as before. A laptop keeps its columns and never shows that cell. */
table.dvc-table .dvc-cell { display: none; }
@media (max-width: 640px) {
  table.data.compact.dvc-table { width: 100%; min-width: 0; }
  table.data.compact.dvc-table thead, table.data.compact.dvc-table tbody td:not(.dvc-cell) { display: none; }
  table.data.compact.dvc-table tbody td.dvc-cell { display: table-cell; width: 100%; height: auto; padding: 12px 14px; white-space: normal; position: static; box-shadow: none; }
  .dvc { display: grid; gap: 3px; min-width: 0; }
  .dvc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
  .dvc-who { min-width: 0; color: var(--brand-ink); font-weight: 600; overflow-wrap: anywhere; }
  .dvc-top > .status { flex: none; }
  .dvc-device { color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
  .dvc-meta { color: var(--ink-3); font-size: var(--fs-sm); line-height: 1.35; overflow-wrap: anywhere; }
  .dvc :is(.one-line, .cell, strong, .phone-cell) { display: inline; max-width: none; overflow: visible; white-space: normal; text-overflow: clip; }
  .dvc .phone-id { margin-left: 4px; color: var(--ink-3); }
}
/* (Devices says its own count under the list, "Showing 6 of 6", of every device the site has: the list's own count of the rows loaded
   was a second line saying the same) */
[data-dev-table] .dt-info { display: none; }
/* (Payments and Renewals the same: each says "Showing 2 of 2 payments · ₱749 in all" or "Showing 6 of 6" under its list, and the table's
   own "Showing 1 to 2 of 2 entries" said it twice: Update list No. 122. Licenses and Accounts keep both: their table has pages, so its
   line says which rows this page shows.) */
[data-pay-table] .dt-info, [data-ren-table] .dt-info { display: none; }
/* (on a laptop too, Devices' holder and brand and model are never cut: a long one goes on to a second line of its row) */
table.data.dev-table.dvc-table td.col-primary .one-line, table.data.dev-table.dvc-table td .one-line { max-width: none; overflow: visible; white-space: normal; text-overflow: clip; }
table.data.compact.dvc-table td.col-primary, table.data.compact.dvc-table td.small { white-space: normal; }

/* BY LICENSE (2026-11-13, Update list No. 120; js/tabs.js licenseCard, appDevice, appVersion). Rom: "in the devices every license it should
   indicate the phone version and pc version so not separated for tracking". On a laptop: the laptop and the phone each in two lines (the
   device, then when it last asked), the version with its Newest or Older tag. On a phone the row is one cell: the holder, the license and
   school, then a block for the laptop and one for the phone, each with its version and tag; nothing cut. */
.lic-ver { display: inline-flex; align-items: center; gap: 6px; }
.lic-ver .status { padding: 1px 6px; font-size: .6875rem; }
.lic-dev { display: grid; gap: 1px; min-width: 0; }
.lic-seen { white-space: nowrap; }
@media (max-width: 640px) {
  .dvc-app { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 0 8px; align-items: start; margin-top: 6px; padding-top: 7px; border-top: 1px solid var(--line); }
  .dvc-label { color: var(--ink-3); font-size: var(--fs-sm); font-weight: 600; line-height: 1.5; }
  .dvc-app-body { display: grid; gap: 2px; min-width: 0; }
  .dvc-app .dvc-meta .status { padding: 1px 6px; font-size: .6875rem; }
}

/* NUMBERED LISTS (2026-11-13, Update list No. 129, Rom: "add also a numbering on that license list, in the procoins and license"; js/table.js
   `numbered` and `numberRows`): a narrow "No." first, quiet beside the license's own number. On a phone By license keeps it beside each card. */
table.data th.dt-no, table.data td.dt-no { width: 1%; padding-right: 6px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  table.data.compact.dvc-table thead { display: none; }
  table.data.compact.dvc-table tbody td.dt-no { display: table-cell; width: 1%; padding: 12px 0 12px 10px; vertical-align: top; font-size: var(--fs-sm); position: static; box-shadow: none; border-right: 0; }
}

/* THE BOOKS' OVERVIEW (2026-11-13, Update list No. 130; js/deskbooks.js overviewView): sales, expenses and profit in ONE section, the
   panels one under another with the page's own gap; the month table numbered, the months of the period lit, each month's sales change
   under its name; on a phone the Cash profit and the Margin fold away (the Net profit and the panels below say them), nothing scrolls
   sideways. The key numbers: a label and its value a line. */
.bk-ov { display: grid; gap: 12px; }
.bk-ov > .bk-grid + .panel, .bk-ov > .panel + .bk-grid, .bk-ov > .panel + .panel { margin-top: 0; }
table.data.bk-mt td, table.data.bk-mt th, table.data.bk-kind td, table.data.bk-kind th { padding-left: 8px; padding-right: 8px; }
table.data.bk-mt tr.bk-in td { background: var(--brand-soft, var(--surface-2)); }
table.data.bk-mt tr.bk-in td:nth-child(2) > span:first-child { font-weight: 600; }
.bk-ch { display: block; font-size: var(--fs-xs, .75rem); color: var(--ink-3); }
.bk-ch.up { color: var(--ok); }
.bk-ch.down { color: var(--bad); }
.bk-keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr) auto); gap: 6px 14px; margin: 0; }
.bk-keys dt { color: var(--ink-2); }
.bk-keys dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 1099px) { .bk-keys { grid-template-columns: minmax(0, 1fr) auto; } }
@media (max-width: 640px) {
  .bk-ov { gap: var(--ph-block); }
  table.data.bk-mt .bk-wide { display: none; }
  table.data.bk-mt td, table.data.bk-mt th, table.data.bk-kind td, table.data.bk-kind th { padding-left: 5px; padding-right: 5px; font-size: var(--fs-sm); }
  table.data.bk-mt td:first-child, table.data.bk-kind td:first-child { padding-left: 8px; }
  .bk-keys { gap: 8px 10px; }
}

/* THE BOOKS' REPEATS AND RENEWALS (2026-11-13, Update list Nos. 132 and 135; js/deskbooks.js repeatsPanel, renewalPanel): Add entry's
   "Repeat each month" a whole line with its box; each monthly cost's Stop at the end of its row (44 px tall on a phone). */
.bk-check { display: flex; align-items: center; gap: 8px; min-height: 36px; color: var(--ink-2); cursor: pointer; }
.bk-check[hidden] { display: none; }
.bk-check input { width: 18px; height: 18px; margin: 0; }
table.data.bk-rep td.bk-act { width: 1%; text-align: right; white-space: nowrap; }
@media (max-width: 640px) {
  .bk-check { min-height: var(--ph-h); }
  table.data.bk-rep td.bk-act .btn { min-height: var(--ph-h); padding-left: 14px; padding-right: 14px; }
  table.data.bk-rep td, table.data.bk-rep th { padding-left: 5px; padding-right: 5px; font-size: var(--fs-sm); }
}
