/* COMPONENTS — reusable UI pieces. Every value is a token. */

/* ---- card & stat ---- */
.card { background: var(--color-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: var(--card-padding); }
.card + .card { margin-top: var(--space-lg); }
.card h3 { margin-bottom: var(--space-2xs); }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-md); }   /* title and description with a chip or button; when the chip wraps under the text it keeps the same gap */
.card-head:not(:last-child) { margin-bottom: var(--space-md); }   /* and the row below never sits on top of it */
.card .sub { color: var(--color-text-muted); margin-bottom: var(--space-lg); }
.stat { padding: var(--stat-pad-y) var(--space-xl); }
.stat-label { color: var(--color-text-muted); font-size: var(--text-sm); font-weight: var(--weight-medium); }
.stat-value { font-size: var(--text-stat); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-stat); margin-top: var(--space-3xs); font-variant-numeric: tabular-nums; }
.stat-value.small { font-size: var(--text-xl); padding-top: var(--space-sm); }
.stat-note { color: var(--color-text-faint); font-size: var(--text-sm); margin-top: var(--space-3xs); }
.meter { height: var(--meter-h); border-radius: var(--radius-pill); background: var(--color-track); overflow: hidden; margin-top: var(--space-md); }
.meter > i { display: block; height: 100%; border-radius: var(--radius-pill); background: var(--color-primary); width: calc(var(--pct, 0) * var(--pct-unit)); transition: width var(--dur-meter) var(--ease), background var(--dur-med); }
.meter > i.warn { background: var(--color-warning-bar); }
.meter > i.bad { background: var(--color-danger); }
.compare { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-sm) var(--space-md); align-items: baseline; margin: var(--space-md) 0 var(--space-lg); font-size: var(--text-body); }
.compare > b { font-size: var(--text-xs); color: var(--color-text-muted); font-weight: var(--weight-medium); }
.choice { display: flex; align-items: flex-start; gap: var(--space-md); min-height: var(--tap-min); padding: var(--space-md); border: var(--border-default); border-radius: var(--radius-md); cursor: pointer; font-weight: var(--weight-regular); color: var(--color-text); }
.choice:has(input:checked) { border: var(--border-primary); background: var(--color-primary-soft); }
.choice .setting-desc { display: block; }
.choice input { margin: var(--space-2xs) var(--space-0) var(--space-0); flex: none; }

/* ---- sparkline ---- */
.spark { width: 100%; height: var(--spark-h); display: block; margin-top: var(--space-sm); }
.spark-line { fill: none; stroke-width: var(--stroke-spark); stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.spark-cpu .spark-line { stroke: var(--color-primary); } .spark-cpu .spark-stop { stop-color: var(--color-primary); }
.spark-mem .spark-line { stroke: var(--color-accent); } .spark-mem .spark-stop { stop-color: var(--color-accent); }
.spark-stop { stop-opacity: var(--opacity-spark); }
.spark-stop.end { stop-opacity: var(--opacity-none); }
.spark-cpu .spark-fill { fill: url(#spark-grad-cpu); } .spark-mem .spark-fill { fill: url(#spark-grad-mem); }

/* ---- icons ---- */
.icon { fill: none; stroke: currentColor; stroke-width: var(--stroke-icon); stroke-linecap: round; stroke-linejoin: round; }

/* ---- forms ---- */
.field { margin-bottom: var(--space-md); }
.field input[type=date], .field input[type=time] { max-width: var(--width-sm); }   /* every date and time box in a form is the same width */
input[type=number].num { width: var(--width-xs); }   /* short number boxes (days, minutes, port, counts) are compact, not full width; the type selector keeps this above the base width: 100% */
.hint { font-size: var(--text-xs); color: var(--color-text-faint); margin-top: var(--space-xs); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm); height: var(--control-h-md); padding: 0 var(--btn-padding-x);
  border: 0; border-radius: var(--radius-pill); background: var(--color-primary); color: var(--color-primary-on); font: inherit; font-weight: var(--weight-medium); cursor: pointer; white-space: nowrap;
  transition: background var(--dur-base), transform var(--dur-fast) var(--ease), box-shadow var(--dur-base), opacity var(--dur-base);
}
.btn:hover { background: var(--color-primary-hover); text-decoration: none; }
.btn:active { transform: scale(var(--scale-press)); }
.btn[disabled] { opacity: var(--opacity-disabled); pointer-events: none; }
.btn.secondary { background: var(--color-neutral-soft); color: var(--color-text); } .btn.secondary:hover { background: var(--color-neutral-soft-hover); }
.btn.danger { background: var(--color-danger-soft); color: var(--color-danger); } .btn.danger:hover { background: var(--color-danger-soft-hover); }
.btn.small { height: var(--control-h-sm); padding: 0 var(--btn-padding-x-sm); font-size: var(--text-sm); }
.btn.block { width: 100%; height: var(--control-h-lg); font-size: var(--text-lead); }

.switch { position: relative; width: var(--switch-w); height: var(--switch-h); flex: none; margin-bottom: 0; }   /* a switch is a <label>; without this it inherits the label's bottom margin and sits above the row's centre line */
.switch input { position: absolute; opacity: var(--opacity-none); inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: var(--z-raised); }
.switch i { position: absolute; inset: 0; border-radius: var(--radius-pill); background: var(--color-switch-off); transition: background var(--dur-med) var(--ease); }
.switch i::after {
  content: ""; position: absolute; top: var(--space-3xs); left: var(--space-3xs); width: var(--switch-knob); height: var(--switch-knob);
  border-radius: var(--radius-round); background: var(--color-knob); box-shadow: var(--shadow-knob); transition: transform var(--dur-med) var(--ease);
}
.switch input:checked + i { background: var(--color-success-switch); }
.switch input:checked + i::after { transform: translateX(var(--switch-travel)); }
.setting { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); padding: var(--space-md) 0; border-top: var(--border-default); }
.setting:first-of-type { border-top: 0; }
.setting-title { font-weight: var(--weight-medium); }
.setting-desc { color: var(--color-text-muted); font-size: var(--text-sm); }
.seg { display: inline-flex; padding: var(--space-3xs); border-radius: var(--radius-md); background: var(--color-segment); }
.seg button { border: 0; background: none; font: inherit; font-weight: var(--weight-medium); font-size: var(--text-sm); padding: var(--space-xs) var(--space-lg); border-radius: var(--radius-sm); cursor: pointer; color: var(--color-text); transition: background var(--dur-base), box-shadow var(--dur-base); }
.seg button.on { background: var(--color-surface); box-shadow: var(--shadow-segment); }

/* ---- tables & chips ---- */
.tablewrap { overflow-x: auto; margin: 0 calc(var(--card-padding) * -1); padding: 0 var(--card-padding); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: var(--text-xs); font-weight: var(--weight-medium); color: var(--color-text-faint); padding: var(--space-sm) var(--space-md) var(--space-sm) 0; border-bottom: var(--border-default); white-space: nowrap; }
td { padding: var(--space-md) var(--space-md) var(--space-md) 0; border-bottom: var(--border-default); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
/* Accounts list: tick boxes, sortable column titles and the bulk bar */
.check-cell { display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap-min); min-height: var(--tap-min); cursor: pointer; }
.sort-btn { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: var(--tap-min); padding: var(--space-0); border: 0; background: none; font: inherit; color: inherit; cursor: pointer; white-space: nowrap; }
.sort-btn:hover, .sort-btn.on { color: var(--color-primary); }
.sort-mark { display: inline-block; min-width: var(--space-md); font-size: var(--text-xs); }
.bulkbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm) var(--space-md); padding: var(--space-sm) var(--space-md); margin: var(--space-md) var(--space-0); border-radius: var(--radius-md); background: var(--color-primary-soft); color: var(--color-primary-text); }
.bulkbar[hidden] { display: none; }
.bulkbar-actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-left: auto; }
tr.click { cursor: pointer; transition: background var(--dur-fast); }
tr.click:hover td { background: var(--color-wash-faint); }
.chip { display: inline-flex; align-items: center; gap: var(--space-xs); height: var(--chip-h); padding: 0 var(--space-sm); border-radius: var(--radius-pill); font-size: var(--text-xs); font-weight: var(--weight-medium); background: var(--color-neutral-soft); color: var(--color-text-muted); white-space: nowrap; }
.chip.green { background: var(--color-success-soft); color: var(--color-success); }
.chip.red { background: var(--color-danger-soft); color: var(--color-danger); }
.chip.amber { background: var(--color-warning-soft); color: var(--color-warning); }
.chip.blue { background: var(--color-primary-soft); color: var(--color-primary); }
button.chip { border: 0; font: inherit; font-size: var(--text-xs); font-weight: var(--weight-medium); cursor: pointer; }   /* a chip that acts as a filter button */
button.chip.on { box-shadow: inset 0 0 0 var(--border-width) currentColor; }
.empty { text-align: center; color: var(--color-text-faint); padding: var(--space-3xl) 0; }

/* ---- banners & code ---- */
.banner { padding: var(--space-md) var(--space-lg); border-radius: var(--radius-md); background: var(--color-warning-soft); color: var(--color-warning-text); font-size: var(--text-body); }
.banner.blue { background: var(--color-primary-soft); color: var(--color-primary-text); }
.banner.red { background: var(--color-danger-soft); color: var(--color-danger); }
.codeblock { font-family: var(--font-mono); font-size: var(--text-sm); line-height: var(--leading-code); background: var(--color-code-bg); border-radius: var(--radius-md); padding: var(--space-md) var(--space-lg); overflow-x: auto; white-space: pre; user-select: all; }
.codeblock.large { font-size: var(--text-xl); text-align: center; }

/* ---- two-factor ---- */
.qr { display: grid; place-items: center; padding: var(--space-md); background: var(--color-qr-light); border: var(--border-default); border-radius: var(--radius-md); width: fit-content; margin: 0 auto; }
.qr svg { display: block; width: 100%; height: auto; }
.qr-dark { fill: var(--color-qr-dark); } .qr-light { fill: var(--color-qr-light); }
.recovery { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-sm); font-family: var(--font-mono); font-size: var(--text-body); background: var(--color-code-bg); padding: var(--space-lg); border-radius: var(--radius-md); }

/* ---- modal sheet & toast ---- */
.scrim {
  position: fixed; inset: 0; z-index: var(--z-modal); background: var(--color-scrim); backdrop-filter: blur(var(--blur-sm)); -webkit-backdrop-filter: blur(var(--blur-sm));
  display: grid; place-items: center; padding: var(--space-xl); animation: fade-in var(--dur-med) var(--ease); transition: opacity var(--dur-base);
}
.sheet:focus { outline: none; }   /* the dialog frame takes focus from code when it holds nothing to type in; the controls inside show the ring */
.scrim.closing { opacity: var(--opacity-none); }
.sheet { display: flex; flex-direction: column; width: min(var(--sheet-w), 100%); max-height: var(--sheet-max-h); overflow: hidden; background: var(--color-surface); border-radius: var(--radius-xl); box-shadow: var(--shadow-overlay); animation: pop-in var(--dur-med) var(--ease); }   /* the rounded, shadowed frame never scrolls, so no scroll bar can overhang a corner */
.sheet.wide { width: min(var(--sheet-w-wide), 100%); }   /* wide sheets: receipts in the reseller app, reports in the Host Console */
.sheet-body { flex: 1 1 auto; min-height: var(--space-0); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: var(--sheet-padding); }   /* the inner area is what scrolls */
.sheet h2 { margin-bottom: var(--space-xs); }
.sheet .actions { display: flex; flex-wrap: wrap; gap: var(--space-md); justify-content: flex-end; margin-top: var(--space-xl); }
.sheet .actions.split { justify-content: space-between; }
.toasts { position: fixed; z-index: var(--z-toast); left: 50%; bottom: var(--space-3xl); transform: translateX(-50%); display: flex; flex-direction: column; gap: var(--space-sm); align-items: center; pointer-events: none; }
.toast { padding: var(--space-md) var(--space-xl); border-radius: var(--radius-pill); background: var(--color-toast); color: var(--color-toast-text); font-size: var(--text-body); box-shadow: var(--shadow-overlay); animation: rise-in var(--dur-med) var(--ease); backdrop-filter: blur(var(--blur-md)); transition: opacity var(--dur-med), transform var(--dur-med); }
.toast.err { background: var(--color-toast-danger); }
.toast.leaving { opacity: var(--opacity-none); transform: translateY(var(--lift-sm)); }

/* ---- log viewer ---- */
.log-line { padding: var(--space-md) 0; border-bottom: var(--border-default); }
.log-line:last-child { border-bottom: 0; }
.log-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); font-size: var(--text-xs); color: var(--color-text-faint); }
.log-message { margin-top: var(--space-2xs); }
.log-raw { margin-top: var(--space-sm); max-height: var(--log-raw-max-h); overflow: auto; font-family: var(--font-mono); font-size: var(--text-xs); background: var(--color-code-bg); border-radius: var(--radius-sm); padding: var(--space-md); white-space: pre-wrap; word-break: break-all; }
.linkish { background: none; border: 0; padding: 0; font: inherit; font-size: var(--text-xs); color: var(--color-primary); cursor: pointer; }

/* ---- deployed version badge ---- */
.version-badge { position: fixed; z-index: var(--z-raised); right: var(--space-md); bottom: var(--space-sm); font-size: var(--text-micro); color: var(--color-text-faint); font-family: var(--font-mono); opacity: var(--opacity-icon); pointer-events: none; user-select: none; }

/* ---- checkbox row & disclosure ---- */
.check { display: flex; align-items: center; gap: var(--space-sm); font-weight: var(--weight-regular); color: var(--color-text); }
.check input { margin: var(--space-0); }
.check.tap { min-height: var(--tap-min); align-items: center; }   /* a checkbox with a sentence beside it: the whole row is at least a tap target tall */
details > summary { cursor: pointer; padding: var(--space-xs) var(--space-0); }
details[open] > summary { margin-bottom: var(--space-xs); }

/* ---- full-width segmented switch (sign in / create account) ---- */
.seg.wide { display: flex; width: 100%; }
.seg.wide button { flex: 1; }
/* ---- tab rows: the ONE shared style (Backups, Email). A single row that scrolls sideways when it does not fit, 44px tabs,
   the selected tab scrolled into view (UI.tabRow), and a soft fade at an edge that has more. The visible bar is hidden in base.css. ---- */
.seg.tabs { display: flex; flex-wrap: nowrap; width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.seg.tabs button { flex: 1 0 auto; white-space: nowrap; min-height: var(--tap-min); }
.seg.tabs.more-start { -webkit-mask-image: linear-gradient(to right, transparent, black var(--space-2xl)); mask-image: linear-gradient(to right, transparent, black var(--space-2xl)); }
.seg.tabs.more-end { -webkit-mask-image: linear-gradient(to left, transparent, black var(--space-2xl)); mask-image: linear-gradient(to left, transparent, black var(--space-2xl)); }
.seg.tabs.more-start.more-end { -webkit-mask-image: linear-gradient(to right, transparent, black var(--space-2xl), black calc(100% - var(--space-2xl)), transparent); mask-image: linear-gradient(to right, transparent, black var(--space-2xl), black calc(100% - var(--space-2xl)), transparent); }

/* ---- guided setup steps (Host Backups): a numbered list of steps; a locked step is dimmed until the one before it is done ---- */
.setup-step { padding: var(--space-md) var(--space-0); border-top: var(--border-default); }
.setup-step.locked { opacity: var(--opacity-disabled); }

/* ---- themed dropdown (the ONLY dropdown: UI.select) ---- */
.select { position: relative; display: inline-block; min-width: var(--width-xs); }
.field .select, .select.block { display: block; }
.select-btn { display: flex; align-items: center; width: 100%; height: var(--control-h); padding: 0 var(--space-3xl) 0 var(--field-padding-x); text-align: left; font: inherit; color: var(--color-text);
  border: var(--border-strong); border-radius: var(--radius-md); background-color: var(--color-surface); cursor: pointer;
  background-image: var(--icon-chevron); background-repeat: no-repeat; background-position: right var(--space-md) center; background-size: var(--space-md);
  transition: border-color var(--dur-base), box-shadow var(--dur-base); }
.select-btn:focus, .select.open .select-btn { border-color: var(--color-focus); }
.select-btn .select-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-list { position: absolute; z-index: var(--z-dropdown); top: 100%; left: var(--space-0); min-width: 100%; max-height: var(--select-list-max-h); overflow-y: auto; margin: var(--select-list-gap) var(--space-0) var(--space-0); padding: var(--space-2xs);
  list-style: none; background: var(--color-surface); border: var(--border-default); border-radius: var(--radius-md); box-shadow: var(--shadow-overlay); animation: rise-in var(--dur-base) var(--ease); }
.select.up .select-list { top: auto; bottom: 100%; margin: var(--space-0) var(--space-0) var(--select-list-gap); }
.select-option { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); padding: var(--space-sm) var(--space-md); border-radius: var(--radius-sm); cursor: pointer; white-space: nowrap; }
.select-option:hover, .select-option:focus { background: var(--color-wash); }
.select-option[aria-selected=true] { color: var(--color-primary); font-weight: var(--weight-semibold); }
.select-option[aria-selected=true]::after { content: "✓"; }

/* Quiet icon button (remove, close): neutral until hovered, then danger. */
.icon-btn { display: inline-grid; place-items: center; flex: none; width: var(--control-h-md); height: var(--control-h-md); border: 0; border-radius: var(--radius-pill); background: var(--color-wash); color: var(--color-text-muted); font: inherit; font-size: var(--text-lg); cursor: pointer; transition: background var(--dur-base) var(--ease), color var(--dur-base); }
.icon-btn:hover, .icon-btn:focus-visible { background: var(--color-danger-soft); color: var(--color-danger); }

/* ---- email message preview (Host Console → Email → Messages) ---- */
.mail-frame { display: block; width: 100%; height: var(--mail-preview-h); margin: var(--space-0) auto; border: var(--border-default); border-radius: var(--radius-md); background: var(--color-surface); }
.mail-frame.phone { width: var(--width-phone); max-width: 100%; }
.mail-text { margin: var(--space-0); min-height: var(--mail-preview-h); padding: var(--space-lg); white-space: pre-wrap; word-break: break-word; font-family: var(--font-mono); font-size: var(--text-sm); line-height: var(--leading-code); color: var(--color-text); background: var(--color-code-bg); border: var(--border-default); border-radius: var(--radius-md); }

/* ---- account menu (UI.menu): the name button in the top bar and its popover; phones turn it into a bottom sheet (responsive.css) ---- */
.topbar .chip { flex: none; }
.menu-btn { flex: none; display: inline-flex; align-items: center; gap: var(--space-xs); min-height: var(--tap-min); max-width: var(--width-sm); padding: 0 var(--space-md); border: var(--border-default); border-radius: var(--radius-pill); background: var(--color-surface); color: var(--color-text); font: inherit; font-size: var(--text-sm); font-weight: var(--weight-medium); cursor: pointer; }
.menu-btn:hover { background: var(--color-wash); }
.menu-btn[aria-expanded=true] { border-color: var(--color-primary); }
.menu-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-chevron { fill: none; stroke: currentColor; stroke-width: var(--stroke-icon); stroke-linecap: round; stroke-linejoin: round; width: var(--icon-size); height: var(--icon-size); flex: none; color: var(--color-text-faint); }
.menu-scrim { display: none; }
.menu-pop { position: fixed; z-index: var(--z-modal); top: calc(var(--topbar-h) + var(--space-xs)); right: var(--space-xl); width: var(--width-md); max-width: calc(100% - var(--space-2xl)); max-height: calc(100dvh - var(--topbar-h) - var(--space-2xl)); display: flex; flex-direction: column; overflow: hidden; background: var(--color-surface); border: var(--border-default); border-radius: var(--radius-lg); box-shadow: var(--shadow-overlay); animation: pop-in var(--dur-med) var(--ease); }
.menu-body { flex: 1 1 auto; min-height: var(--space-0); overflow-y: auto; overscroll-behavior: contain; padding: var(--space-xs); }
.menu-head { padding: var(--space-md); border-bottom: var(--border-default); margin-bottom: var(--space-xs); overflow-wrap: anywhere; }
.menu-head b { display: block; font-size: var(--text-lg); }
.menu-head span { display: block; color: var(--color-text-muted); font-size: var(--text-sm); }
.menu-list { display: flex; flex-direction: column; }
.menu-label { padding: var(--space-sm) var(--space-md) var(--space-2xs); color: var(--color-text-faint); font-size: var(--text-xs); font-weight: var(--weight-medium); }
.menu-item { display: flex; align-items: center; width: 100%; min-height: var(--tap-min); padding: var(--space-sm) var(--space-md); border: 0; border-radius: var(--radius-md); background: none; color: var(--color-text); font: inherit; font-size: var(--text-body); text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.menu-item:hover, .menu-item:focus { background: var(--color-wash); }
.menu-item.sep { margin-top: var(--space-xs); border-top: var(--border-default); border-radius: var(--radius-md); }

/* ---- documentation ---- */
.doc-layout { display: grid; grid-template-columns: var(--width-sm) minmax(0, 1fr); gap: var(--space-xl); align-items: start; }
.doc-main { display: flex; flex-direction: column; gap: var(--space-lg); min-width: 0; }
.doc-main > .card + .card { margin-top: var(--space-0); }
.doc-toc { position: sticky; top: var(--sticky-offset); display: flex; flex-direction: column; gap: var(--space-3xs); }
.doc-toc a { padding: var(--space-xs) var(--space-md); border-radius: var(--radius-md); color: var(--color-text-muted); text-decoration: none; font-size: var(--text-sm); }
.doc-toc a:hover { background: var(--color-wash); }
.doc-toc a.active { background: var(--color-primary-soft); color: var(--color-primary-text); font-weight: var(--weight-medium); }
.doc h2 { font-size: var(--text-h2); margin: var(--space-2xl) 0 var(--space-sm); letter-spacing: var(--tracking-heading); }
.doc h2:first-child { margin-top: var(--space-0); }
.doc h3 { font-size: var(--text-lg); margin: var(--space-xl) 0 var(--space-xs); }
.doc p, .doc li { line-height: var(--leading-body); }
.doc ul, .doc ol { padding-left: var(--space-2xl); margin: var(--space-sm) 0; }
.doc li + li { margin-top: var(--space-xs); }
.doc code { font-family: var(--font-mono); font-size: var(--text-sm); background: var(--color-code-bg); border-radius: var(--radius-xs); padding: var(--space-3xs) var(--space-xs); }
.doc a { color: var(--color-primary); }
.doc-shot { margin: var(--space-lg) 0; }
.doc-shot img { display: block; width: 100%; max-width: 100%; height: auto; border: var(--border-default); border-radius: var(--radius-md); background: var(--color-surface); }
.doc-shot figcaption { margin-top: var(--space-xs); font-size: var(--text-sm); color: var(--color-text-muted); }
.doc-note { margin: var(--space-md) 0; padding: var(--space-md) var(--space-lg); border-radius: var(--radius-md); background: var(--color-primary-soft); color: var(--color-primary-text); }
.doc-hit { display: block; padding: var(--space-md) 0; border-bottom: var(--border-default); text-decoration: none; color: inherit; }
.doc-hit:last-child { border-bottom: 0; }
.doc-hit b { display: block; color: var(--color-primary); }
.doc-pager { display: flex; justify-content: space-between; gap: var(--space-md); margin-top: var(--space-2xl); flex-wrap: wrap; }
@media (max-width: 820px) { .doc-layout { grid-template-columns: minmax(0, 1fr); } .doc-toc { position: static; flex-direction: row; flex-wrap: wrap; } }

/* ---- long lists: feeds scroll inside a capped box (laptop and up); working lists page ---- */
.feed { max-height: var(--feed-max-h); overflow-y: auto; overscroll-behavior: contain; }
.more-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); padding-top: var(--space-md); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); flex-wrap: wrap; padding-top: var(--space-md); }
.feed.tablewrap th { position: sticky; top: var(--space-0); z-index: var(--z-raised); background: var(--color-surface); }   /* column titles stay visible while a feed scrolls */

/* ---- documentation: print only the "Printable ..." section of a page, on one sheet ---- */
@media print {
  html.printing-doc .topbar, html.printing-doc .side, html.printing-doc .toasts, html.printing-doc .version-badge, html.printing-doc .page-head, html.printing-doc .doc-toc, html.printing-doc .doc-pager, html.printing-doc .no-print, html.printing-doc .doc-main > .card:not(.doc), html.printing-doc .doc > :not(.doc-print) { display: none; }
  html.printing-doc .doc-layout { display: block; }
  html.printing-doc .doc, html.printing-doc body { box-shadow: none; background: var(--color-surface); }
  html.printing-doc .doc-print { font-size: var(--text-sm); line-height: var(--leading-code); }
  html.printing-doc .doc-print li { margin-bottom: var(--space-xs); break-inside: avoid; }
}
/* ---- support tickets (reseller Support and the Host Support section): the conversation, screenshots, the two-column ticket page ---- */
.thread { display: flex; flex-direction: column; gap: var(--space-md); }
.msg { min-width: 0; padding: var(--space-md) var(--space-lg); border: var(--border-default); border-radius: var(--radius-md); background: var(--color-surface-alt); }
.msg.team { border-color: transparent; background: var(--color-primary-soft); }   /* a reply from myBoxStock */
.msg.note { border-color: transparent; background: var(--color-warning-soft); }   /* a Host-only note: the reseller never gets this one */
.msg.system { padding: var(--space-0); border: 0; background: none; color: var(--color-text-faint); font-size: var(--text-sm); text-align: center; }
.msg-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-xs); color: var(--color-text-muted); font-size: var(--text-xs); }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg summary { padding: var(--space-md) var(--space-0); color: var(--color-text-muted); font-size: var(--text-sm); }
.shots { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-sm); }
.shot { display: block; max-width: 100%; max-height: var(--shot-max-h); border: var(--border-default); border-radius: var(--radius-sm); background: var(--color-surface); }
.attached { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); }
.attached:not(:empty) { margin-top: var(--space-sm); }
.support-layout { display: grid; grid-template-columns: minmax(0, 1fr) var(--width-lg); gap: var(--space-lg); align-items: start; }
.support-col { display: flex; flex-direction: column; gap: var(--space-lg); min-width: 0; }
.support-col > .card + .card { margin-top: var(--space-0); }
.facts { display: grid; grid-template-columns: var(--facts-label-w) minmax(0, 1fr); gap: var(--space-xs) var(--space-md); margin: var(--space-0); }
.facts dt { color: var(--color-text-faint); font-size: var(--text-sm); }
.facts dd { margin: var(--space-0); overflow-wrap: anywhere; }
.menu-item .chip { margin-left: auto; }
.menu-btn [data-badge]:empty { display: none; }   /* the count of new replies in the account menu */
@media (max-width: 980px) { .support-layout { grid-template-columns: minmax(0, 1fr); } }

/* Screenshot viewer (tickets): a normal sheet holding the picture, a count, Previous/Next, Download and a small Open in new tab link. */
.shot-link { display: block; cursor: zoom-in; border-radius: var(--radius-sm); }
.viewer-stage { display: grid; place-items: center; max-height: var(--viewer-max-h); overflow: auto; background: var(--color-wash-faint); border: var(--border-default); border-radius: var(--radius-md); }
.viewer-img { display: block; max-width: 100%; max-height: var(--viewer-max-h); object-fit: contain; cursor: zoom-in; }
.viewer-stage.zoomed .viewer-img { max-width: none; max-height: none; cursor: zoom-out; }
.viewer-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-sm) var(--space-md); margin-top: var(--space-md); }
.viewer-count { color: var(--color-text-muted); font-size: var(--text-sm); }
.viewer-name { overflow-wrap: anywhere; }
.thumb { display: block; width: var(--thumb-size); height: var(--thumb-size); object-fit: cover; border: var(--border-default); border-radius: var(--radius-sm); }
.thumb-item { display: inline-flex; align-items: center; gap: var(--space-xs); }
.nav-count { margin-left: auto; }   /* the red count on a menu row (left menu and More sheet) */
.tabbar [data-more] { position: relative; }
.tabbar [data-more] .nav-count { position: absolute; top: var(--space-3xs); left: 50%; margin-left: var(--space-xs); }

/* Plan limits: one usage line on Home, and one row of the Limits list on the Host Plans page. */
.plan-use { padding: var(--space-sm) 0; }
.plan-use .meter { margin-top: var(--space-xs); }
.limit-row { padding: var(--space-md) 0; border-top: var(--border-default); }
.limit-row:first-of-type { border-top: 0; }
