:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --sidebar: #ffffff;
  --text: #1c1f24;
  --muted: #6b7280;
  --border: #e3e6ea;
  --hover: #eef1f5;
  --accent: #2f6fde;
  --on-accent: #ffffff;
  --ok: #1f9d55;
  --bad: #d64545;
  --bad-bg: #fdf1f1;
  --warn: #a15c00;
  --sidebar-width: 236px;

  /* Type: every font size in the panel is one of these. */
  --text-xs: 11px;    /* stat names, chips */
  --text-sm: 12px;    /* table heads, small notes */
  --text-md: 13px;    /* secondary text, code */
  --text-base: 14px;  /* table and form text */
  --text-body: 15px;  /* body */
  --text-lg: 16px;    /* card titles, inputs (no zoom on phones) */
  --text-xl: 18px;    /* dialog titles, stat values */
  --text-2xl: 22px;   /* page titles */
  --text-3xl: 26px;   /* big numbers */
  --text-hero: 34px;  /* Corners. */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  --radius-pill: 999px;

  /* Fixed colours: white on a coloured fill, and the dark terminal and
     diff boxes (dark in both themes). */
  --on-color: #ffffff;
  --term-bg: #111418;
  --term-text: #d8dee6;
  --term-bright: #f0f3f6;
  --term-dim: #8b949e;
  --term-border: #2a3038;
  --diff-add: #7ee787;
  --diff-del: #ffa198;
  --diff-hunk: #79c0ff;
  --diff-add-bg: rgba(46, 160, 67, 0.15);
  --diff-del-bg: rgba(248, 81, 73, 0.15);
  --diff-add-mark: rgba(46, 160, 67, 0.45);
  --diff-del-mark: rgba(248, 81, 73, 0.45);

  /* Chart series beyond accent, bad and ok. */
  --series-2: #8a5cd6;
  --series-3: #d9822b;
  --series-6: #1a9fb0;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --surface: #1d2025;
    --sidebar: #181a1e;
    --text: #e7e9ec;
    --muted: #9aa1ab;
    --border: #2c3037;
    --hover: #24282e;
    --accent: #6c9cf0;
    --on-accent: #0b1220;
    --ok: #3ec27a;
    --bad: #f07272;
    --bad-bg: #2a1d1f;
    --warn: #e8a64a;
    --series-2: #a98ae8;
    --series-3: #eda05a;
    --series-6: #48c2d1;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: var(--text-body)/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}

a { color: var(--accent); }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

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

.shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

main { padding: 28px 32px; width: 100%; min-width: 0; }

.mobilebar { display: none; }

/* Going from page to page (a real page load, so every address stays a
   bookmark) is animated by the browser (cross-document View Transitions;
   Chromium and Safari, others just load). The sidebar and the phone bar
   stand still; the page content crossfades in place: only its opacity
   changes, nothing slides or grows (2026-11-19, the user found the rise
   from below ugly). Off for people who ask for less motion. */
@view-transition { navigation: auto; }
.sidebar { view-transition-name: sidebar; }
.mobilebar { view-transition-name: mobilebar; }
.shell > main { view-transition-name: page; }
::view-transition-group(page) { animation: none; }
::view-transition-old(page) { animation: 160ms ease-out both page-out; }
::view-transition-new(page) { animation: 200ms ease-out both page-in; }
::view-transition-old(sidebar), ::view-transition-new(sidebar),
::view-transition-old(mobilebar), ::view-transition-new(mobilebar) { animation-duration: 120ms; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 120ms; }
@keyframes page-out { to { opacity: 0; } }
@keyframes page-in { from { opacity: 0; } }
/* What stays the same from page to page stands still instead of fading
   with the page: a page's head and tabs, and a domain's or website's card
   with its breadcrumb and tabs. Each is its own transition group; the
   browser crossfades only that group's old and new picture, so an
   unchanged one shows no change at all and a changed one (another tab
   marked) only crossfades its own pixels. Each name must exist at most
   once per page (a duplicate cancels the whole transition). */
.page-head { view-transition-name: page-head; }
nav.page-tabs { view-transition-name: page-tabs; }
.m3-crumbs { view-transition-name: object-crumbs; }
section.m3-object:not([data-vt]) { view-transition-name: object-card; }
nav.m3-tabs { view-transition-name: object-tabs; }
::view-transition-group(page-head), ::view-transition-group(page-tabs), ::view-transition-group(object-crumbs),
::view-transition-group(object-card), ::view-transition-group(object-tabs) { animation-duration: 160ms; }
::view-transition-old(page-head), ::view-transition-new(page-head), ::view-transition-old(page-tabs), ::view-transition-new(page-tabs),
::view-transition-old(object-crumbs), ::view-transition-new(object-crumbs), ::view-transition-old(object-card), ::view-transition-new(object-card),
::view-transition-old(object-tabs), ::view-transition-new(object-tabs) { animation-duration: 160ms; height: 100%; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* ----------------------------------------------------------- sidebar --- */

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  padding: 18px 12px;
}

.brand {
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--accent);
  text-decoration: none;
}
.sidebar > .brand { padding: 2px 10px 18px; color: var(--accent); font-weight: 700; }
.sidebar > .brand:hover { background: none; }

.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li + li { margin-top: 1px; }

.sidebar a,
.sidebar summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  user-select: none;
}
.sidebar a:hover,
.sidebar summary:hover { background: var(--hover); }
.sidebar a:focus-visible,
.sidebar summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.sidebar a[aria-current="page"] {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  font-weight: 600;
}

.icon { width: 18px; height: 18px; flex: none; color: var(--muted); }
.sidebar a[aria-current="page"] .icon { color: var(--accent); }

/* Settings group */
.sidebar summary { list-style: none; }
.sidebar summary::-webkit-details-marker { display: none; }
.chevron {
  margin-left: auto;
  width: 7px; height: 7px;
  border-right: 1.8px solid var(--muted);
  border-bottom: 1.8px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform 0.15s;
}
details[open] > summary .chevron { transform: rotate(45deg); }
.group ul { margin: 2px 0 4px; }
.group ul a { padding-left: 38px; }
/* A menu item with a Configuration (menuItem.Config): a gear at its right,
   a link of its own beside the item's link. */
.sidebar li.has-config { position: relative; }
.sidebar li.has-config > a:first-child { padding-right: 38px; }
.sidebar .menu-config { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); padding: 5px; gap: 0; }
.sidebar .menu-config .icon { width: 16px; height: 16px; }
.sidebar .menu-config:hover .icon { color: var(--text); }
/* Quiet menu (the user, 2026-11-23: the gears were too present): a gear
   shows only on its section (also on its Configuration pages), while the
   item is pointed at, or when it has keyboard focus. Phones have no hover:
   only the current section's gear. The space stays, so nothing moves. */
.sidebar li.has-config:not(:has(> a[aria-current])) .menu-config:not(:focus-visible) { opacity: 0; pointer-events: none; transition: opacity .12s; }
@media (hover: hover) {
  .sidebar li.has-config:not(:has(> a[aria-current])):hover .menu-config:not(:focus-visible) { opacity: 1; pointer-events: auto; }
}
/* A menu item that is a page and also has pages under it (Mail): the link,
   and a button that shows or hides the pages under it. */
.link-group .group-head { position: relative; }
.link-group .group-head > a { padding-right: 40px; }
.link-group .group-toggle {
  position: absolute; top: 2px; right: 2px; bottom: 2px; width: 34px;
  display: flex; align-items: center; justify-content: center;
  padding: 0; border: 0; border-radius: var(--radius-sm); background: none; color: inherit; cursor: pointer;
}
.link-group .group-toggle:hover { background: var(--hover); }
.link-group .group-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.link-group .group-toggle .chevron { margin-left: 0; }
.link-group.open .group-toggle .chevron { transform: rotate(45deg); }
.link-group ul { margin: 2px 0 4px; }
.link-group ul a { padding-left: 38px; }

.soon {
  margin-left: auto;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--muted);
  background: var(--hover);
  border-radius: var(--radius-pill);
  padding: 1px 7px;
}

.sidebar-foot { margin: auto 0 0; padding: 12px 4px 0; border-top: 1px solid var(--border); font-size: var(--text-sm); }
.sidebar-logout { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border: 0; border-radius: var(--radius); background: none;
  color: var(--muted); font: inherit; cursor: pointer; }
.sidebar-logout:hover { background: var(--hover); color: var(--text); }
.sidebar-logout:hover .icon { color: var(--text); }
.sidebar-version { color: var(--muted); font-size: var(--text-xs); padding-right: 6px; }

/* Group headers (menu.go Group): small caps above a group's items; the
   header folds the group (menugroups.js). A folded group shows the worst
   dot of its items on its header. */
.sidebar .menu-group { margin-top: 12px; }
.sidebar .menu-head { display: flex; align-items: center; gap: 8px; width: 100%; margin: 0 0 2px; padding: 5px 10px; border: 0;
  border-radius: var(--radius); background: none; cursor: pointer; font: inherit; font-size: var(--text-xs); font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: left; }
.sidebar .menu-head:hover { color: var(--text); background: var(--hover); }
.sidebar .menu-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sidebar .menu-head .chevron { margin-left: auto; width: 6px; height: 6px; transform: rotate(45deg); }
.sidebar .menu-group.collapsed .menu-head .chevron { transform: rotate(-45deg); }
.menu-group-dot { display: none; width: 7px; height: 7px; border-radius: 50%; }
.menu-group.collapsed:has(.menu-dot.warn) .menu-group-dot { display: block; background: var(--warn); }
.menu-group.collapsed:has(.menu-dot:not(.warn)) .menu-group-dot { display: block; background: var(--bad); }

/* ------------------------------------------------------ narrow screens --- */

@media (max-width: 800px) {
  .shell { display: block; }

  .mobilebar {
    display: flex;
    align-items: center;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 10px 16px;
    background: var(--sidebar);
    border-bottom: 1px solid var(--border);
  }

  .menu-toggle {
    display: grid;
    place-items: center;
    width: 36px; height: 36px;
    padding: 0;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
  }
  .burger, .burger::before, .burger::after {
    display: block;
    width: 16px; height: 2px;
    background: currentColor;
    border-radius: 2px;
    position: relative;
  }
  .burger::before, .burger::after { content: ""; position: absolute; left: 0; }
  .burger::before { top: -5px; }
  .burger::after { top: 5px; }

  .sidebar {
    position: fixed;
    z-index: 30;
    left: 0;
    width: min(280px, 85vw);
    /* Closed: off screen, and hidden so its links can't be tabbed to. */
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.2s, visibility 0s 0.2s;
  }
  .nav-open .sidebar {
    transform: none;
    visibility: visible;
    transition: transform 0.2s;
    box-shadow: 0 0 40px rgb(0 0 0 / 0.25);
  }

  main { padding: 20px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar, .chevron { transition: none; }
}

/* ------------------------------------------------------------ content --- */

h1 { font-size: var(--text-2xl); margin: 0 0 16px; }
h2 { font-size: var(--text-body); margin: 0 0 12px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.card.error { background: var(--bad-bg); border-color: var(--bad); }
.card.error h2 { color: var(--bad); }

/* The panel's one design language (from the Dashboard and Scheduled
   tasks): a state class says how something is, and every piece below
   takes its colour from it through --state. */
.is-ok { --state: var(--ok); }
.is-warn { --state: var(--warn); }
.is-bad { --state: var(--bad); }
.is-running, .is-checking { --state: var(--accent); }
.is-off, .is-unknown { --state: var(--muted); }

/* Icon tile: an icon on a tinted square, in its state's colour (the
   accent without a state). sm in table rows, lg on a detail card or a
   feature, xl on a page's banner. */
.icon-tile { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-lg);
  color: var(--state, var(--accent)); background: color-mix(in srgb, var(--state, var(--accent)) 14%, transparent); }
.icon-tile .icon { width: 19px; height: 19px; color: inherit; }
.icon-tile.sm { width: 28px; height: 28px; border-radius: var(--radius); }
.icon-tile.sm .icon { width: 16px; height: 16px; }
.icon-tile.lg { width: 44px; height: 44px; }
.icon-tile.lg .icon { width: 24px; height: 24px; }
.icon-tile.xl { width: 56px; height: 56px; border-radius: var(--radius-xl); }
.icon-tile.xl .icon { width: 30px; height: 30px; }

/* State bar: a card with a state shows it as a bar on its left edge;
   an Off one has none. */
.item-card, .detail-card, .obj-row { position: relative; overflow: hidden; }
:is(.item-card, .detail-card, .obj-row)::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--state, var(--muted)); }
:is(.item-card, .detail-card, .obj-row).is-off::before { opacity: 0; }

/* Small uppercase labels: section titles, table heads, stat names. */
.caps { font-size: var(--text-xs); font-weight: 600; }
.caps, .obj-label, .obj-rows-head, .section-title, .script-title, .install-section, .hero-kicker, .cron-next-title,
.stat-tiles dt, .hero-stats dt, table.data th, table.install-table tr.group th {
  text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

.planned .soon { display: inline-block; margin: 0 0 10px; }
.planned p:first-of-type { margin-top: 0; }
.planned h2 { margin-top: 18px; }
.planned ul { margin: 0 0 12px; padding-left: 20px; }
.planned li + li { margin-top: 4px; }

.muted { color: var(--muted); font-size: var(--text-md); }

dl { display: grid; grid-template-columns: 160px 1fr; gap: 6px 12px; margin: 0; }
dt { color: var(--muted); }
dd { margin: 0; }

table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
/* tables.js: column widths fixed once a table is shown. Content that grows
   later wraps instead of moving the columns. */
table.cols-fixed { table-layout: fixed; }
table.cols-fixed td { overflow-wrap: anywhere; }
table.cols-fixed :is(th, td).nowrap { overflow: hidden; text-overflow: ellipsis; }
th, td { text-align: left; padding: 8px 6px; border-top: 1px solid var(--border); }
th { color: var(--muted); font-weight: 500; border-top: 0; }

code, pre { font: var(--text-md) ui-monospace, SFMono-Regular, Menlo, monospace; }
pre { white-space: pre-wrap; margin: 8px 0 0; }

.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}
.dot.ok { background: var(--ok); }
.dot.bad { background: var(--bad); }
.dot.warn { background: var(--warn); }

@media (max-width: 520px) {
  dl { grid-template-columns: 1fr; }
  dd { margin-bottom: 8px; }
}

/* ---------------------------------------------------- buttons, actions --- */

.actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.actions p { margin: 6px 0 0; }

button, a.button, label.button {
  display: inline-block;
  font: inherit;
  font-weight: 550;
  color: var(--on-accent);
  background: var(--accent);
  border: 0;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  text-decoration: none;
  cursor: pointer;
}
button:hover, a.button:hover, label.button:hover { filter: brightness(1.08); }
button:focus-visible, a.button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ------------------------------------------------------------- jobs --- */

.pill {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.pill.ok      { color: var(--ok);     background: color-mix(in srgb, var(--ok) 14%, transparent); }
.pill.bad     { color: var(--bad);    background: color-mix(in srgb, var(--bad) 14%, transparent); }
.pill.warn    { color: var(--warn);   background: color-mix(in srgb, var(--warn) 14%, transparent); }
.pill.running { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }

.result {
  font-weight: 600;
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-bottom: 12px;
}
.result.new,
.result.running   { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.result.succeeded { color: var(--ok);     background: color-mix(in srgb, var(--ok) 12%, transparent); }
.result.failed    { color: var(--bad);    background: var(--bad-bg); }
.job-cancel { margin: -4px 0 12px; }
.job-cancel [data-cancel-confirm] { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.job-cancel [data-cancel-confirm][hidden], .job-cancel .button[hidden] { display: none; }
.job-cancel code { white-space: nowrap; }
.result.warning   { color: var(--warn);   background: color-mix(in srgb, var(--warn) 12%, transparent); }

.spinner {
  display: inline-block;
  width: 12px; height: 12px;
  margin-right: 6px;
  vertical-align: -1px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

.terminal {
  background: var(--term-bg);
  color: var(--term-text);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 0 0 10px;
  min-height: 120px;
  max-height: 60vh;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.45;
}

/* ---------------------------------------------------------- software --- */

.section-title { margin: 24px 0 10px; font-size: var(--text-md); }
.section-title:first-of-type { margin-top: 0; }

.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-bottom: 8px; }
.features .card { margin: 0; display: flex; flex-direction: column; }
.feature h3 { margin: 0; font-size: var(--text-lg); }
.feature p { margin: 8px 0 0; }
.feature .soon { margin-left: 0; }
.feature.is-soon h3, .feature.is-soon p { color: var(--muted); }
.feature-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 14px; }

a.button.secondary, button.secondary {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
}
a.button.secondary:hover, button.secondary:hover { background: var(--hover); filter: none; }
.button.small { padding: 4px 10px; font-size: var(--text-md); }

.pill.neutral { color: var(--muted); background: var(--hover); }
.dot.off { background: var(--muted); }
.dot.info { background: var(--accent); }

.table-scroll { overflow-x: auto; }
td { vertical-align: top; }
td code.muted { font-size: var(--text-sm); }
.row-actions { text-align: right; white-space: nowrap; }

.result.confirm { color: var(--text); background: color-mix(in srgb, var(--warn) 12%, transparent); font-weight: 500; }
.confirm-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.terminal:empty { display: none; }

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

.card.flush { padding: 0; overflow: hidden; }
.pad { padding: 18px 20px; margin: 0; }
table.data th, table.data td { padding: 12px 16px; vertical-align: middle; }
table.data th { font-size: var(--text-sm); background: color-mix(in srgb, var(--hover) 60%, transparent); }
table.data tbody tr:hover { background: color-mix(in srgb, var(--hover) 50%, transparent); }
table.data tr.is-soon td { color: var(--muted); }
table.data tr.sub-feature td:first-child { padding-left: 32px; }
.sub-mark { color: var(--muted); margin-right: 6px; }
table.data .soon { margin-left: 0; }
td.nowrap, .nowrap { white-space: nowrap; }
td.prose { max-width: 60ch; }
td strong + br + .pill, td strong + br + .soon { margin-top: 4px; }
.col-actions { text-align: right; white-space: nowrap; width: 1%; }
.col-actions .button + .button, .col-actions form.run + form.run { margin-left: 6px; }
.col-actions .button + .row-icon, .col-actions .button + form.run, .col-actions .row-icon + .button { margin-left: 6px; }
code.pkg {
  display: inline-block;
  font-size: var(--text-sm);
  padding: 1px 6px;
  margin: 2px 0;
  border-radius: var(--radius-xs);
  background: var(--hover);
}

/* Things that cannot be undone. */
button.danger, a.button.danger { background: var(--bad); color: var(--on-color); }
.button.danger-outline { background: transparent; color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 50%, transparent); }
.button.danger-outline:hover { background: var(--bad-bg); filter: none; }

/* Choices on a confirmation screen. */
.choices { border: 0; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.choice {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}
.choice:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.choice.danger:has(input:checked) { border-color: var(--bad); background: var(--bad-bg); }
.choice input { margin-top: 4px; accent-color: var(--accent); }
.choice.danger input { accent-color: var(--bad); }

/* On phones, drop secondary columns so the action buttons stay in view. */
@media (max-width: 700px) {
  .hide-narrow { display: none; }
  table.data th, table.data td { padding: 10px 10px; }
  .col-actions .button { margin: 2px 0 2px 4px; }
  .col-actions { white-space: normal; text-align: right; }
}
@media (max-width: 420px) {
  table.data { font-size: var(--text-base); }
  table.data th, table.data td { padding: 10px 6px; }
  table.data th:first-child, table.data td:first-child { padding-left: 10px; }
  table.data th:last-child, table.data td:last-child { padding-right: 10px; }
}

/* Command preview before an action runs. */
.result.review { color: var(--text); background: var(--hover); font-weight: 500; }
.script-title { margin: 16px 0 8px; font-size: var(--text-md); }
pre.script { min-height: 0; color: var(--term-bright); white-space: pre; overflow-x: auto; }
.script-note { margin: 0 0 14px; }

/* Expandable table rows (expand.js). */
button.expand {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer;
}
button.expand:hover strong { color: var(--accent); }
button.expand:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--radius-xs); }
.chevron {
  width: 8px; height: 8px; flex: none;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg); transition: transform 0.15s;
}
button.expand[aria-expanded="true"] .chevron { transform: rotate(45deg); }
.no-expand { margin-left: 16px; }
td .sub { display: block; margin-left: 16px; font-size: var(--text-sm); }
table.data tr.details > td { background: color-mix(in srgb, var(--hover) 45%, transparent); padding: 4px 16px 18px 40px; }
table.sub-table { width: 100%; }
table.sub-table th, table.sub-table td { padding: 6px 10px 6px 0; vertical-align: middle; }
table.sub-table th { font-size: var(--text-sm); }
/* Edit User → Access (Storage → SMB): a column of choices per access level */
table.smb-access th.center, table.smb-access td.center { text-align: center; width: 96px; padding-right: 0; }
table.smb-access input[type=radio] { margin: 0; }
table.sub-table td.col-actions { padding-right: 0; }
.ext-all { font-size: var(--text-base); display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
@media (max-width: 700px) {
  table.data tr.details > td { padding: 4px 10px 14px 10px; }
}
table.sub-table td.version { overflow-wrap: anywhere; }
table.sub-table td.version { white-space: nowrap; }
@media (max-width: 700px) {
  table.sub-table td.version { white-space: normal; }
}

/* Domains */
.domain-form { display: grid; gap: 8px; max-width: 560px; }
.field-label { font-weight: 600; font-size: var(--text-base); }
.domain-form select { width: 100%; }
.domain-form input[type="text"] { width: 100%; }
.domain-form input[aria-invalid="true"] { border-color: var(--bad); }
.field-error { color: var(--bad); margin: 0; font-size: var(--text-base); }
fieldset.uses { border: 0; padding: 0; margin: 8px 0; display: grid; gap: 8px; }
label.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
label.check input { margin-top: 4px; }
label.check.is-soon { cursor: default; opacity: 0.7; }
.domain-form button { justify-self: start; }

/* Files a task writes from templates */
.config-file { margin: 0 0 12px; }
.config-file-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin-bottom: 6px; font-size: var(--text-base); }
.config-file-head code { font-weight: 600; overflow-wrap: anywhere; }
.lead { max-width: 80ch; margin: -4px 0 16px; color: var(--muted); }
ul.problems { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.card p code, .lead code { overflow-wrap: anywhere; }

/* Tabs in an expanded row */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin: 6px 0 12px; }
.tabs [role=tab] {
  font: inherit; font-size: var(--text-base); padding: 8px 14px; border: 0; background: none; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center;
}
.tabs [role=tab]:hover { color: var(--text); }
.tabs [role=tab][aria-selected=true] { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.tabs [role=tab]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tab-panel { padding-bottom: 4px; }
.tab-panel > p { margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* git-style diff */
pre.diff {
  background: var(--term-bg); color: var(--term-text); border-radius: var(--radius); padding: 10px 0; margin: 10px 0;
  overflow-x: auto; line-height: 1.45; font-size: var(--text-md);
}
pre.diff span { display: block; padding: 0 14px; white-space: pre; }
pre.diff .meta { color: var(--term-bright); font-weight: 600; }
pre.diff .hunk { color: var(--diff-hunk); }
pre.diff .add { color: var(--diff-add); background: var(--diff-add-bg); }
pre.diff .del { color: var(--diff-del); background: var(--diff-del-bg); }
/* the characters that changed within a line */
pre.diff mark { color: inherit; border-radius: 2px; }
pre.diff .add mark { background: var(--diff-add-mark); }
pre.diff .del mark { background: var(--diff-del-mark); }
label.check.sub-option { margin-left: 26px; }
table.data tr.details .button.secondary { background: var(--surface); }

/* on/off switch (a button in a POST form to the run page) */
.switch { display: inline-block; position: relative; width: 40px; height: 22px; border-radius: var(--radius-pill);
  background: var(--border); vertical-align: middle; transition: background 0.15s; }
.switch span { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--on-color); transition: left 0.15s; }
.switch.on { background: var(--ok); }
.switch.on span { left: 21px; }
a.switch:hover, button.switch:hover { filter: brightness(1.15); }
a.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch.disabled { opacity: 0.5; cursor: not-allowed; }
.switch-note { margin-left: 8px; font-size: var(--text-md); }
details.template-vars { margin-top: 12px; }
details.template-vars summary { cursor: pointer; color: var(--muted); }

/* scheduled tasks */
table.sub-table.facts th { width: 1%; white-space: nowrap; padding-right: 24px; font-weight: 500; color: var(--muted); font-size: var(--text-base); }
.schedule-choice { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 14px 0 4px; }
.button.current { background: var(--accent); color: var(--on-color); border-color: var(--accent); cursor: default; }
.task-actions { margin-top: 12px; }

/* A detail card (a mailbox, a disk): state, three stat boxes, then label/value rows. */
.detail-card { padding: 20px 22px; }
.detail-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px 16px; }
.detail-head-text { flex: 1 1 280px; min-width: 0; }
.detail-desc { margin: 6px 0 0; color: var(--muted); font-size: var(--text-base); line-height: 1.5; max-width: 80ch; }
.detail-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-buttons .button { display: inline-flex; align-items: center; gap: 6px; }
.detail-buttons .icon { width: 15px; height: 15px; }
.stat-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0 0; }
.stat-tiles > div { min-width: 0; padding: 12px 14px; border-radius: var(--radius-lg); background: color-mix(in srgb, var(--hover) 75%, transparent); }
.stat-tiles dt { font-size: var(--text-xs); font-weight: 600; }
.stat-tiles dd { margin: 3px 0 0; font-size: var(--text-xl); font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat-tiles dd.stat-sub { margin-top: 2px; font-size: var(--text-md); font-weight: 400; color: var(--muted); }
.stat-tiles dd code { font-size: var(--text-base); }
.stat-tiles dd.stat-sub code { font-size: var(--text-sm); }
.stat-tiles dd a { text-decoration: none; }
.stat-tiles dd a:hover { text-decoration: underline; }
.outcome.ok { color: var(--ok); font-weight: 550; }
.outcome.bad { color: var(--bad); font-weight: 550; }
.detail-rows { margin-top: 18px; border-top: 1px solid var(--border); }
.detail-row { display: grid; grid-template-columns: 130px minmax(0, 1fr); align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.detail-row:last-child { border-bottom: 0; padding-bottom: 0; }
.detail-row[hidden] { display: none; }
.detail-label { font-size: var(--text-base); color: var(--muted); }
.detail-code { justify-self: start; max-width: 100%; padding: 4px 8px; border-radius: var(--radius-sm); background: var(--hover); overflow-wrap: anywhere; }
.segmented { justify-self: start; display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: var(--radius); background: var(--hover); }
.segmented form { margin: 0; }
.segmented button, .segmented .is-current, .segmented label > span { display: block; padding: 6px 12px; border-radius: var(--radius-sm); font-size: var(--text-md); font-weight: 500; line-height: 1.4; }
.segmented button, .segmented label > span { color: var(--muted); background: transparent; cursor: pointer; }
.segmented button:hover, .segmented label:hover > span { color: var(--text); background: color-mix(in srgb, var(--surface) 60%, transparent); filter: none; }
.segmented .is-current, .segmented input:checked + span, .segmented label:hover > input:checked + span { color: var(--text); font-weight: 600; background: var(--surface); box-shadow: 0 1px 3px color-mix(in srgb, var(--text) 14%, transparent); }
/* The one Save of a settings form (saveBar). */
.save-bar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 14px; }
.save-bar .muted { margin-right: auto; font-size: var(--text-md); }
.save-bar .button:disabled { opacity: .45; cursor: default; filter: none; }
.settings-form > .save-bar { border-top: 1px solid var(--border); }
.pad > .save-bar { padding-top: 10px; }
.detail-row .input-group { display: flex; align-items: center; gap: 8px; }
.detail-row .input-group input { width: 120px; }
.detail-row .input-suffix { color: var(--muted); font-size: var(--text-base); }
.detail-card pre.diff { margin: 14px 0 0; }
/* The cron helper (partials.html "cronHelper", cronhelper.js). */
.cron-helper { display: grid; gap: 8px; min-width: 0; max-width: 560px; }
.cron-line { display: flex; gap: 8px; }
.cron-input { flex: 1; min-width: 0; font: var(--text-lg) ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }
.cron-line button { flex: none; }
.cron-line button:disabled { opacity: .45; cursor: default; filter: none; }
.cron-legend { display: flex; gap: 6px; flex-wrap: wrap; }
.cron-legend span { padding: 2px 8px; border-radius: var(--radius-pill); font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); background: var(--hover); transition: color .12s, background .12s; }
.cron-legend span.is-active { color: var(--on-accent); background: var(--accent); }
.cron-says { margin: 2px 0 0; font-size: var(--text-body); font-weight: 600; color: var(--text); }
.cron-says.is-error { color: var(--bad); font-weight: 500; font-size: var(--text-base); }
.cron-next { padding: 10px 12px; border-radius: var(--radius-lg); background: color-mix(in srgb, var(--hover) 75%, transparent); }
.cron-next-title { display: block; margin-bottom: 4px; font-size: var(--text-xs); font-weight: 600; }
.cron-next ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; font-size: var(--text-md); font-variant-numeric: tabular-nums; }
.cron-examples { display: flex; flex-wrap: wrap; gap: 6px; }
.cron-examples button { padding: 4px 10px; border-radius: var(--radius-pill); font-size: var(--text-sm); font-weight: 500; color: var(--text);
  background: transparent; border: 1px solid var(--border); }
.cron-examples button:hover { border-color: var(--accent); color: var(--accent); filter: none; }
.cron-syntax summary { cursor: pointer; font-size: var(--text-md); color: var(--accent); width: max-content; }
.cron-syntax p { margin: 6px 0 0; font-size: var(--text-md); }
.cron-table { margin-top: 6px; border-collapse: collapse; font-size: var(--text-md); }
.cron-table th { padding: 3px 14px 3px 0; text-align: left; font-weight: 500; white-space: nowrap; vertical-align: top; }
.cron-table td { padding: 3px 0; color: var(--muted); }
.cron-wizard .wizard-option-wide { flex-direction: column; align-items: stretch; gap: 8px; }
.cron-wizard .wizard-option-wide .field-wrap { width: 100%; }
.cron-wizard .cron-command { width: 100% !important; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.cron-wizard .cron-presets { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.cron-wizard .cron-presets legend { grid-column: 1 / -1; }
.cron-wizard-custom { margin-top: 18px; }
.cron-wizard-custom .cron-helper { max-width: none; }
.settings-form .cron-helper { flex: 1; }
.settings-form .form-row:has(.cron-helper) { align-items: start; }
.settings-form .form-row:has(.cron-helper) > label { padding-top: 9px; }
/* Scheduled tasks: the Dashboard's hero on top, then thin task cards in a grid (or a list). */
.view-switch a, .view-switch .is-current { display: inline-flex; align-items: center; gap: 6px; }
.view-switch a { padding: 6px 12px; border-radius: var(--radius-sm); font-size: var(--text-md); font-weight: 500; line-height: 1.4; color: var(--muted); text-decoration: none; }
.view-switch a:hover { color: var(--text); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.view-switch .icon { width: 15px; height: 15px; }
.page-head .view-switch + .button { margin-left: 0; }
.name-cell { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.name-cell:hover strong { color: var(--accent); }
.item-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 10px; }
.item-card { display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 14px;
  color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.item-card.is-off .icon-tile, .item-card.is-off .item-title { opacity: .6; }
.item-card:hover { border-color: var(--accent); box-shadow: 0 2px 10px color-mix(in srgb, var(--text) 8%, transparent); }
.item-card:hover .item-title { color: var(--accent); }
.item-card[aria-current] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.item-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.item-title { font-weight: 600; font-size: var(--text-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-meta { font-size: var(--text-md); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-side { flex: none; display: grid; justify-items: end; gap: 4px; }
.item-last { display: inline-flex; align-items: center; gap: 5px; font-size: var(--text-sm); color: var(--muted); white-space: nowrap; }
.item-last .dot { margin: 0; }
.empty-card { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 14px 16px; border: 1px dashed var(--border); border-radius: var(--radius-lg);
  color: var(--muted); text-decoration: none; }
button.empty-card { width: 100%; font: inherit; text-align: left; background: transparent; cursor: pointer; }
button.empty-card:hover { filter: none; background: transparent; }
.empty-card:hover { border-color: var(--accent); color: var(--text); }
.empty-card .icon { width: 19px; height: 19px; }
/* SSL Certificates V2: one certificate per row. */
.item-cards.cert-rows { grid-template-columns: 1fr; }
.cert-rows .item-side { grid-template-columns: auto auto; align-items: center; column-gap: 10px; }
.cert-rows .item-side .pill { grid-column: 2; }
.cert-rows .item-side .button { grid-row: 1 / span 2; }
.cert-rows .item-side .item-last { grid-column: 2; }
.empty-card strong { color: var(--accent); font-weight: 600; }
@media (max-width: 700px) {
  .item-cards { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .stat-tiles { grid-template-columns: 1fr; }
  .detail-row { grid-template-columns: 1fr; gap: 6px; }
}

.button.disabled { opacity: 0.5; cursor: not-allowed; }
.small { font-size: var(--text-sm); }
.sub { font-size: var(--text-sm); }

/* A domain's SSL and PHP tabs */
table.domain-settings td { color: inherit; }
table.domain-settings td.col-switch { width: 1%; white-space: nowrap; text-align: right; padding-right: 0; }
.tab-heading { margin: 18px 0 6px; font-size: var(--text-body); }
.hsts-form { display: grid; gap: 10px; max-width: 560px; margin-top: 10px; }
.hsts-form select { max-width: 220px; }
.hsts-form button { justify-self: start; }
table.domain-settings td { white-space: normal; }

/* Settings -> Integrations */
.token-form { display: grid; gap: 8px; max-width: 560px; margin-top: 18px; }
.token-form button { justify-self: start; }
.token-form input[type="password"] { width: 100%; }
.status-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.notice.ok { color: var(--ok); }

/* Sortable table headers */
th button.sort, .obj-rows-head button.sort { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font: inherit; text-transform: inherit; letter-spacing: inherit; color: inherit; }
th button.sort:focus-visible, .obj-rows-head button.sort:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-xs); }
th button.sort::after, .obj-rows-head button.sort::after { content: "↕"; opacity: 0.35; font-size: var(--text-xs); display: inline-block; width: 1em; text-align: center; } /* one width for ↕ ↑ ↓ */
th[aria-sort="ascending"] button.sort::after, .obj-rows-head [aria-sort="ascending"] button.sort::after { content: "↑"; opacity: 0.9; }
th[aria-sort="descending"] button.sort::after, .obj-rows-head [aria-sort="descending"] button.sort::after { content: "↓"; opacity: 0.9; }

/* Mail */
.token-form input[type="text"], .mailbox-form input:not([type=checkbox]):not([type=radio]) { width: 100%; }
.token-form input[aria-invalid="true"], .mailbox-form input[aria-invalid="true"] { border-color: var(--bad); }
.mailbox-form { display: grid; gap: 8px; max-width: 560px; margin: 4px 0 12px; }
.mailbox-form button { justify-self: start; }
.address-input { display: flex; align-items: center; gap: 6px; }
.address-input input { flex: 1; min-width: 0; }
table.mailboxes { margin-bottom: 8px; }

/* A switch that is a form input (a checkbox in a label) */
label.switch { cursor: pointer; }
label.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
label.switch:has(input:checked) { background: var(--ok); }
label.switch:has(input:checked) span { left: 21px; }
label.switch:has(input:disabled) { opacity: 0.5; cursor: not-allowed; }
label.switch:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Domains: DNS tab */
table.dns-records td.dns-content code { overflow-wrap: anywhere; word-break: break-all; font-size: var(--text-sm); }

.small-note { font-size: var(--text-md); margin: 6px 0 0; }
/* A record Cloudflare has with another value: - now, + what Sync makes of it. */
.dns-diff { font: var(--text-sm) ui-monospace, SFMono-Regular, Menlo, monospace; }
.dns-diff span { display: block; padding: 1px 6px; white-space: pre-wrap; word-break: break-all; }
.dns-diff .del { color: var(--diff-del); background: var(--diff-del-bg); border-radius: 4px 4px 0 0; }
.dns-diff .add { color: var(--diff-add); background: var(--diff-add-bg); border-radius: 0 0 4px 4px; }
.dns-diff span:only-child { border-radius: var(--radius-xs); }
.dns-diff mark { color: inherit; border-radius: 2px; }
.dns-diff .del mark { background: var(--diff-del-mark); }
.dns-diff .add mark { background: var(--diff-add-mark); }

/* What is wrong with an installed feature's configuration (Software). */
.feature-problem { display: block; margin-top: 4px; max-width: 260px; white-space: normal; color: var(--muted); font-size: var(--text-sm); overflow-wrap: anywhere; }

/* Aliases of a mailbox (domain Mail tab). */
td.aliases .alias { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
td.aliases .alias-remove { font-size: var(--text-sm); }
td.aliases .alias-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; }
td.aliases .alias-form input[type=text] { width: 9em; }

button.switch { border: 0; padding: 0; cursor: pointer; font: inherit; }
button.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button.switch:disabled { opacity: 0.4; cursor: not-allowed; }

/* On a narrow screen the buttons go below the title, and wrap. */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.page-head h1 { margin-right: auto; }
.page-head .switch { flex: none; }
/* A menu item's mark: a dot when its section has a problem, a count for
   Notifications; in the colour of the worst. */
.menu-dot { margin-left: auto; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--bad);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 20%, transparent); }
.menu-dot.warn { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 20%, transparent); }
.menu-count { margin-left: auto; flex: none; min-width: 20px; padding: 1px 7px; border-radius: var(--radius-pill); text-align: center;
  font-size: var(--text-xs); font-weight: 700; line-height: 16px; color: var(--bad); background: color-mix(in srgb, var(--bad) 16%, transparent); }
.menu-count.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 18%, transparent); }
.menu-count.ok { color: var(--muted); background: var(--hover); }
/* Things in a page head right of the title: a state, a button, the switch. */
.head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; flex: 0 1 auto; }
.head-actions [hidden] { display: none; }
.head-actions button:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }
.button:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }

/* Page tabs scroll sideways on a narrow screen. A scroll box clips what
   sticks out, so the gray line is drawn inside (a shadow, under the tabs)
   and the tabs don't hang over it: nothing to scroll up and down. */
.tabs.page-tabs { margin: 0 0 16px; overflow-x: auto; overflow-y: hidden; border-bottom: 0; box-shadow: inset 0 -1px var(--border); }
.tabs.page-tabs a { margin-bottom: 0; }
.tabs a {
  font-size: var(--text-base); padding: 10px 16px; color: var(--muted); text-decoration: none; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a:hover { color: var(--text); }
.tabs a.tab-end { margin-left: auto; }
.tabs a[aria-current=page] { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.tabs a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.page-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
table.data td.inherited { color: var(--muted); }

/* Settings forms: a label and its field per row */
.settings-form { display: grid; gap: 18px; max-width: 640px; }
.settings-form .form-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 8px 24px; align-items: center; }
.settings-form .form-row > label, .settings-form .form-label { font-weight: 550; font-size: var(--text-base); }
.settings-form input[type=text], .settings-form input[type=number], .settings-form input[type=password], .settings-form textarea { width: 100%; max-width: 360px; }
.settings-form select { height: 38px; width: 100%; max-width: 360px; }
/* An address field (Forward to): looks like the dropdowns. */
.settings-form input[type=email] {
  font: inherit; font-size: var(--text-base); height: 38px; padding: 0 12px; width: 100%; max-width: 360px; box-sizing: border-box;
  color: var(--text);
  background: color-mix(in srgb, var(--hover) 65%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--muted) 35%, var(--border));
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
.settings-form input[type=email]:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); background-color: var(--hover); }
.settings-form input[type=email]:focus { outline: none; border-color: var(--accent); background-color: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.settings-form .input-group { display: flex; gap: 8px; max-width: 400px; }
.settings-form .input-group input { flex: 1 1 0; min-width: 0; }
.settings-form .input-group input[type=number] { flex: 0 0 160px; }
.settings-form .input-group select { flex: 0 1 auto; width: auto; min-width: 130px; max-width: 65%; }
.settings-form .form-value { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 38px; }
.settings-form .input-suffix { align-self: center; color: var(--muted); font-size: var(--text-base); }
.settings-form .form-actions { display: flex; gap: 8px; padding-left: 204px; }
.settings-form .form-note { margin: -6px 0 0 204px; color: var(--muted); font-size: var(--text-md); }
.settings-form .form-success {
  margin: 0; padding: 10px 14px; border-radius: var(--radius-sm); font-size: var(--text-base);
  color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent);
}
.settings-form button:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }
.settings-form .form-error {
  margin: 0; padding: 10px 14px; border-radius: var(--radius-sm); font-size: var(--text-base);
  color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent);
}
@media (max-width: 620px) {
  .settings-form .form-row { grid-template-columns: 1fr; gap: 6px; }
  .settings-form .form-actions { padding-left: 0; }
  .settings-form .form-note { margin-left: 0; }
}

/* Progress of an action running on its page (run.js). */
/* The toast: a job in the corner (run.js). Like a confirm: a round mark
   (spinner, check, alert) in the state's colour, the title, a muted line. */
.toast { --state: var(--accent); position: fixed; right: 20px; bottom: 20px; z-index: 50;
  width: min(380px, calc(100vw - 32px)); padding: 16px 18px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28), 0 2px 6px rgba(0, 0, 0, 0.12);
  display: flex; gap: 14px; align-items: center; animation: toast-in 0.22s ease-out; }
.toast[hidden] { display: none; }
.toast.succeeded { --state: var(--ok); }
.toast.failed { --state: var(--bad); }
.toast-mark { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  color: #fff; background: var(--state); box-shadow: 0 0 0 5px color-mix(in srgb, var(--state) 16%, transparent); }
.toast-mark .icon { width: 20px; height: 20px; color: #fff; }
.toast-mark .spinner { width: 18px; height: 18px; margin: 0; border-width: 2.5px; vertical-align: 0; }
.toast-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.toast-body strong { font-size: 15px; font-weight: 650; overflow-wrap: anywhere; }
.toast-sub { color: var(--muted); font-size: var(--text-base); }
.toast a { white-space: nowrap; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

/* min-height: as tall as Sync Now, so the bar keeps its height when the
   button comes and goes (dnssync.js). */
.dns-sync { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; min-height: 28px; }
.dns-sync .form-label { font-weight: 600; }
.card > .dns-sync:last-child { margin-bottom: 0; }



/* A page under a list: a round back button, then its title. */
.title-back { display: flex; align-items: center; justify-content: flex-start; gap: 12px; min-width: 0; }
.title-back { margin: 0 0 16px; flex-wrap: wrap; row-gap: 10px; }
/* The title takes the line; what is right of it wraps below on a phone. */
.title-back h1 { margin: 0 auto 0 0; overflow-wrap: anywhere; flex: 1 1 14rem; min-width: 0; }
.back-button { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--surface); }
.back-button:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.back-button .icon { width: 20px; height: 20px; color: var(--text); }

/* An icon link in the page head, e.g. the Mail page's settings. */
.icon-button { flex: none; width: 36px; height: 36px; border-radius: var(--radius); display: grid; place-items: center; }
.icon-button:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.icon-button .icon { width: 22px; height: 22px; color: var(--muted); }
.icon-button:hover .icon { color: var(--accent); }

/* Mail -> Filter Rules and Quarantine */
.notice.warn { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; border-radius: var(--radius);
  color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.notice.warn span { flex: 1 1 20rem; }
.notice.bad { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; border-radius: var(--radius);
  color: var(--bad); background: var(--bad-bg); border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent); }
.notice.bad span { flex: 1 1 20rem; }
/* Storage: failed or at-risk RAID arrays, at the top of the page. */
.notice.running { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 8%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.notice.running span:not(.pill) { flex: 1 1 20rem; }
.notice.storage-alert { margin: 0 0 12px; }
.notice.storage-alert a { color: inherit; font-weight: 600; white-space: nowrap; }
.notice.good { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 10px 14px; border-radius: var(--radius);
  color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.notice.good .icon { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
table.filter-rules .col-order { width: 2.5rem; }
table.filter-rules .filter-words { max-width: 24rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-frame { display: block; width: 100%; height: 70vh; min-height: 360px; border: 0; border-radius: inherit; background: white; resize: vertical; }
.mail-facts th { width: 8rem; }
.mail-link-url code { overflow-wrap: anywhere; word-break: break-all; font-size: var(--text-sm); }
textarea { font: inherit; font-size: var(--text-base); padding: 8px 12px; width: 100%; box-sizing: border-box; resize: vertical; color: var(--text);
  background: color-mix(in srgb, var(--hover) 65%, var(--surface)); border: 1px solid color-mix(in srgb, var(--muted) 35%, var(--border));
  border-radius: var(--radius-sm); box-shadow: 0 1px 2px rgb(0 0 0 / 0.06); transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s; }
textarea:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); background-color: var(--hover); }
textarea:focus { outline: none; border-color: var(--accent); background-color: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
textarea::placeholder { color: var(--muted); }
/* A required field: a red asterisk after its name, "* Required" by Save. */
.req { color: var(--bad); font-weight: 600; margin-left: 2px; }
/* Several values, one per line (security.txt). */
code.lines { white-space: pre-line; }
:where(input[type=text], input[type=number], input[type=date], input[type=time], input:not([type])):disabled { opacity: 0.55; cursor: not-allowed; }
/* A small icon link in a table row (quarantine: inbox, spam, delete). */
.row-icon { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  color: var(--muted); vertical-align: middle; }
.row-icon + .row-icon, form.run + form.run > .row-icon, .row-icon + form.run > .row-icon, form.run + .row-icon { margin-left: 4px; }
.row-icon .icon { width: 16px; height: 16px; }
.row-icon:hover { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.row-icon.disabled { opacity: .35; }
/* A row action that can't run now: greyed, the reason on the wrapper (a
   disabled button gets no hover). */
button.row-icon:disabled { opacity: .35; cursor: not-allowed; }
button.row-icon:disabled:hover { color: inherit; background: transparent; }
.row-icon-wrap { display: inline-grid; }
.row-icon.danger:hover { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
td.mail-address { min-width: 7rem; }
/* Services tab: a domain's services are rows of the table itself. */
table.data tr.details.sub-row > td { background: color-mix(in srgb, var(--hover) 45%, transparent); padding: 10px 16px; }
table.data tr.details.sub-row > td:first-child { padding-left: 40px; }
table.data tr.details > td > .table-scroll { width: 0; min-width: 100%; overflow-x: auto; }

/* Dashboard graphs. */
.charts { display: grid; gap: 16px; }
.chart-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 12px; }
.chart-head h2 { margin: 0; }
.chart-now { font-size: var(--text-2xl); font-weight: 600; font-variant-numeric: tabular-nums; }
.chart-pointer { margin-left: auto; font-variant-numeric: tabular-nums; }
.chart-plot { position: relative; }
.chart-plot svg { display: block; width: 100%; height: 160px; overflow: visible; touch-action: pan-y; }
.chart-plot .grid { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-plot .grid.base { stroke: var(--muted); opacity: .5; }
.chart-plot .line { fill: none; stroke: var(--chart); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.chart-plot .dot { stroke-width: 4; stroke-linecap: round; }
.chart-plot .area { fill: var(--chart); opacity: .12; stroke: none; }
.chart-plot .cursor { display: none; stroke: var(--muted); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-plot .cursor.on { display: inline; }
.chart-plot .y-label { position: absolute; left: 4px; font-size: var(--text-xs); line-height: 1; color: var(--muted); pointer-events: none; }
.chart-plot .y-top { top: 3px; }
.chart-plot .y-mid { top: calc(50% + 3px); }
.x-labels { display: flex; justify-content: space-between; margin-top: 6px; font-size: var(--text-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.chart-empty { margin: 0; }

/* The Dashboard: a large health card, a card per category (the
   notification categories), small graphs that lead to Statistics, the
   server's facts and the latest notifications. */
.hero { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; padding: 28px 32px; margin-bottom: 16px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--state) 13%, var(--surface)) 0%, var(--surface) 65%);
  border-color: color-mix(in srgb, var(--state) 30%, var(--border)); }
.hero-icon { flex: none; display: grid; place-items: center; width: 88px; height: 88px; border-radius: 50%; background: var(--state);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--state) 15%, transparent); }
.hero-icon svg { width: 46px; height: 46px; fill: none; stroke: var(--on-color); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.hero.is-checking .hero-icon svg { animation: spin 1.2s linear infinite; }
.hero-text { flex: 1 1 260px; min-width: 0; }
.hero-kicker { margin: 0 0 2px; font-size: var(--text-sm); font-weight: 600; }
.hero-text h2 { margin: 0; font-size: var(--text-hero); line-height: 1.15; font-weight: 650; color: var(--state); letter-spacing: -.01em; }
.hero-sub { margin: 6px 0 0; font-size: var(--text-body); color: var(--text); }
.hero-stats { display: flex; gap: 10px; margin: 0; }
.hero-stats > div { min-width: 86px; padding: 10px 14px; border-radius: var(--radius-lg); background: color-mix(in srgb, var(--hover) 70%, transparent); text-align: center; }
.hero-stats dt { font-size: var(--text-xs); font-weight: 600; }
.hero-stats dd { margin: 2px 0 0; font-size: var(--text-2xl); font-weight: 650; font-variant-numeric: tabular-nums; }
/* A number with a state (heroStat.State) takes its colour. */
.hero-stats > div[class] dd { color: var(--state); }
/* The compact hero: a slim line while nothing needs attention (hero.go
   Compact): a small state mark, the title and the sentence. */
.hero.hero-compact { flex-wrap: nowrap; gap: 14px; padding: 12px 18px; }
.hero-compact .hero-icon { width: 30px; height: 30px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--state) 15%, transparent); }
.hero-compact .hero-icon svg { width: 18px; height: 18px; stroke-width: 3; }
.hero-compact .hero-text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.hero-compact .hero-text h2 { font-size: var(--text-lg); }
.hero-compact .hero-sub { margin: 0; color: var(--muted); }
@media (max-width: 560px) {
  .hero { padding: 22px 20px; gap: 16px 18px; }
  .hero-icon { width: 64px; height: 64px; box-shadow: 0 0 0 6px color-mix(in srgb, var(--state) 15%, transparent); }
  .hero-icon svg { width: 34px; height: 34px; }
  .hero-text h2 { font-size: var(--text-3xl); }
  .hero-stats { width: 100%; }
  .hero-stats > div { flex: 1; min-width: 0; }
}
.dash-recent .dot { flex: none; margin-right: 8px; }
/* The titles below the cards: .section-title:first-of-type would take
   their space away, as they are the first h2 in their box. */
#dash-live > .section-title, .dash-columns { margin-top: 28px; }
.dash-period { margin-left: 6px; text-transform: none; letter-spacing: 0; }
.dash-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .dash-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dash-tile { --chart: var(--accent); display: grid; gap: 2px; margin: 0; color: inherit; text-decoration: none; transition: border-color .15s; }
.dash-tile:hover { border-color: var(--accent); }
.dash-tile.warn { --chart: var(--warn); border-color: color-mix(in srgb, var(--warn) 50%, transparent); }
.dash-tile-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; }
.dash-tile-title { font-weight: 600; }
.dash-tile-now { font-size: var(--text-3xl); font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.dash-tile-detail { font-size: var(--text-md); font-variant-numeric: tabular-nums; }
.dash-spark { display: block; width: 100%; height: 48px; margin-top: 8px; font-size: var(--text-md); }
.dash-spark .grid { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.dash-spark .line { fill: none; stroke: var(--chart); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.dash-spark .area { fill: var(--chart); opacity: .12; stroke: none; }
.dash-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 28px 16px; align-items: start; }
.dash-columns .card { margin: 0; }
.dash-columns td { overflow-wrap: anywhere; }
.dash-recent td:first-child { width: 1%; white-space: nowrap; }
.dash-more { margin: 0; padding: 12px 16px; border-top: 1px solid var(--border); }
.dash-more:only-child { border-top: 0; }
@media (max-width: 560px) { .x-labels span:nth-child(even) { display: none; } }

/* Tables of the same kind (the addresses of each domain on Mail, the records
   of each domain on DNS) get the same columns, whatever is in them: fixed
   widths, the first or the content column taking the rest. */
table.mailbox-table, table.dns-records { table-layout: fixed; min-width: 600px; }
table.mailbox-table { min-width: 700px; }
table.mailbox-table th:nth-child(2) { width: 80px; }
table.mailbox-table th:nth-child(3) { width: 100px; }
table.mailbox-table th:nth-child(4) { width: 90px; }
table.mailbox-table th:nth-child(5) { width: 100px; }
table.mailbox-table th:nth-child(6) { width: 96px; }
table.mailbox-table td:first-child { white-space: normal; overflow-wrap: anywhere; }
table.dns-records th:nth-child(1) { width: 30%; }
table.dns-records th:nth-child(2) { width: 72px; }
/* Fixed widths, so nothing moves while the Cloudflare column loads and
   syncs (dnssync.js swaps spinners, pills and buttons). */
table.dns-records th.dns-proxy { width: 80px; }
table.dns-records th.dns-cf, table.dns-domains th.dns-cf { width: 128px; }
table.dns-domains { table-layout: fixed; min-width: 600px; }
table.dns-domains th.dns-count { width: 104px; }
table.dns-domains th.dns-auto { width: 80px; }
table.dns-domains th.dns-action { width: 132px; }
table.dns-records td:first-child code { overflow-wrap: anywhere; }

/* The sidebar's foot: Log Out and the version. */
.sidebar-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sidebar-foot form { margin: 0; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; }
.link-button:hover { color: var(--accent); text-decoration: underline; }

/* The login page (login.html): a card in the middle, without the menu,
   in the dialogs' design: a round mark, the title, a footer line. Inputs
   keep the panel's one field style; only widths here. */
main.bare { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; box-sizing: border-box; }
main.bare:has(.lg-card) { background: radial-gradient(ellipse 70% 55% at 50% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%); }
.lg-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  box-shadow: 0 18px 50px color-mix(in srgb, #000 18%, transparent); overflow: hidden; }
.lg-card form { margin: 0; }
.lg-head { display: flex; align-items: center; gap: 14px; padding: 24px 24px 6px; }
.lg-head h1 { margin: 0; font-size: var(--text-2xl); font-weight: 650; letter-spacing: -.01em; }
.lg-head p { margin: 3px 0 0; color: var(--muted); font-size: var(--text-md); overflow-wrap: anywhere; }
.lg-mark { --state: var(--accent); flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin: 6px; border-radius: 50%; color: #fff;
  background: var(--state); box-shadow: 0 0 0 6px color-mix(in srgb, var(--state) 16%, transparent); }
.lg-mark.is-warn { --state: var(--warn); }
.lg-mark .icon { width: 22px; height: 22px; stroke-width: 2.2; color: #fff; }
.lg-body { display: grid; gap: 14px; padding: 18px 24px 24px; }
.lg-field { display: grid; gap: 6px; }
.lg-field > span { font-size: var(--text-md); font-weight: 600; }
.lg-field input { width: 100%; height: 42px; box-sizing: border-box; }
.lg-code { font-family: var(--mono, ui-monospace, monospace); font-size: var(--text-xl); letter-spacing: .3em; text-align: center; }
.lg-note, .lg-text { margin: -6px 0 0; color: var(--muted); font-size: var(--text-sm); }
.lg-text { margin: 0; font-size: var(--text-md); }
.lg-command { margin: 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--term-bg); color: var(--term-text); white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--text-sm); }
.lg-submit { width: 100%; height: 44px; margin-top: 4px; justify-content: center; font-weight: 600; }
.lg-error { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 11px 14px; border-radius: var(--radius-sm); font-size: var(--text-md);
  color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, transparent); border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); }
.lg-error .icon { flex: none; width: 18px; height: 18px; margin-top: 1px; color: currentColor; }
.lg-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; border-top: 1px solid var(--border); font-size: var(--text-md); }
.lg-brand { font-weight: 700; color: var(--accent); }
@media (max-width: 640px) {
  .lg-head { padding: 20px 18px 4px; }
  .lg-body { padding: 16px 18px 20px; }
  .lg-foot { padding: 12px 18px; }
}

/* A jail's configuration as Fail2Ban reads it. */
table.jail-config th { width: 160px; text-align: left; vertical-align: top; font-weight: 500; text-transform: none; letter-spacing: 0; font-size: var(--text-md); }
table.jail-config code.jail-value { display: block; white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--text-sm); }
table.jail-config code.jail-value + code.jail-value { margin-top: 4px; }
pre.jail-file { margin: 0; border-radius: inherit; overflow-x: auto; }
.section-title code { text-transform: none; letter-spacing: 0; font-size: var(--text-sm); }

/* Mail → Spam Protection → SPF, DKIM, DMARC: an action per result. */
.auth-form .form-error { margin: 16px 20px 0; }
.auth-results code { font-size: var(--text-sm); }
.auth-results select { min-width: 150px; }
.auth-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; border-top: 1px solid var(--border); }
.auth-foot .small-note { margin: 0; }
/* A page whose software isn't installed: one banner that leads to
   Features & Software (missing.html), built like the on/off banners. */
.install-banner { display: flex; align-items: center; gap: 20px; border-left-width: 4px; border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, var(--surface)); padding-top: 22px; padding-bottom: 22px; }
.install-banner-text { flex: 1; min-width: 0; }
.install-banner h2 { margin: 0 0 4px; font-size: var(--text-lg); }
.install-banner p { margin: 0; color: var(--muted); font-size: var(--text-md); }
.install-banner p + p { margin-top: 6px; }
.install-banner-where strong { color: var(--text); font-weight: 600; }
.install-banner .button { flex: none; }
@media (max-width: 640px) { .install-banner { flex-wrap: wrap; } .install-banner .button { width: 100%; text-align: center; } }


/* The on/off banner above them: green when on, red when off. */
.auth-banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-left-width: 4px; }
.auth-banner h2 { margin: 0 0 4px; font-size: var(--text-lg); }
.auth-banner p { margin: 0; color: var(--muted); font-size: var(--text-md); }
.auth-banner.on { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 8%, var(--surface)); }
.auth-banner.off { border-color: var(--bad); background: var(--bad-bg); }
.auth-banner .switch { flex: none; }
.banner-controls { display: flex; align-items: center; gap: 14px; flex: none; }
.banner-controls form { margin: 0; }
.banner-controls select { min-width: 120px; }
/* Mail → Spam Protection: a dot per tab, green when it does something. */
.page-tabs .tab-dot { width: 7px; height: 7px; margin-right: 6px; vertical-align: 1px; }

/* Every dropdown: rounded like the buttons, the panel's own arrow (two
   gradients: the page's policy allows no inline images), a soft ring when
   it has focus. */
select {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  font: inherit;
  font-size: var(--text-base);
  font-weight: 550;
  line-height: 1.3;
  color: var(--text);
  background-color: color-mix(in srgb, var(--hover) 65%, var(--surface));
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  border: 1px solid color-mix(in srgb, var(--muted) 35%, var(--border));
  border-radius: var(--radius-sm);
  padding: 8px 34px 8px 12px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
select:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); background-color: var(--hover); }
select:focus { outline: none; }
select:focus-visible, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
/* Every text field: the same look as the dropdowns, wherever it is (no
   form class needed). :where() keeps it weaker than the rules of a form,
   which set widths. */
:where(input[type=text], input[type=number], input[type=password], input[type=email], input[type=search], input[type=url], input[type=date], input[type=time], input:not([type])) {
  box-sizing: border-box;
  font: inherit;
  font-size: var(--text-base);
  height: 38px;
  padding: 0 12px;
  color: var(--text);
  background: color-mix(in srgb, var(--hover) 65%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--muted) 35%, var(--border));
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
:where(input[type=text], input[type=number], input[type=password], input[type=email], input[type=search], input[type=url], input[type=date], input[type=time], input:not([type])):hover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); background-color: var(--hover);
}
:where(input[type=text], input[type=number], input[type=password], input[type=email], input[type=search], input[type=url], input[type=date], input[type=time], input:not([type])):focus {
  outline: none; border-color: var(--accent); background-color: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
:where(input)::placeholder { color: var(--muted); }
:where(input[aria-invalid="true"]) { border-color: var(--bad); }
:where(.input-group) { display: inline-flex; align-items: center; gap: 8px; }
:where(.input-suffix) { color: var(--muted); font-size: var(--text-base); }
select:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
select:disabled:hover { border-color: color-mix(in srgb, var(--muted) 35%, var(--border)); background-color: color-mix(in srgb, var(--hover) 65%, var(--surface)); }
select option { color: var(--text); background: var(--surface); }

/* Settings → Security: the password strengths. */
.password-levels .col-check { width: 1%; padding-right: 0; }
.password-levels label { cursor: pointer; }

/* The warning above every page when nothing limits wrong panel logins. */
.login-guard { margin: 0 0 20px; }

/* Server Security → Firewall: who may connect. */
.fw-sources { min-width: 6rem; max-width: 22rem; overflow-wrap: break-word; }
.form-row[hidden], .form-note[hidden], .wizard-option[hidden] { display: none; }

/* Mail → Mail History: month, search (filters as you type) and the pages,
   in one bar; the search box looks like the dropdowns. */
.log-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.log-filters select { width: auto; min-width: 0; }
.log-filters input[type=search] {
  flex: 1 1 14rem;
  min-width: 0;
  box-sizing: border-box;
  font: inherit;
  font-size: var(--text-base);
  line-height: 1.3;
  color: var(--text);
  background: color-mix(in srgb, var(--hover) 65%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--muted) 35%, var(--border));
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
.log-filters input[type=search]::placeholder { color: var(--muted); }
.log-filters input[type=search]:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); background-color: var(--hover); }
.log-filters input[type=search]:focus { outline: none; border-color: var(--accent); background-color: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
#history[aria-busy] tbody { opacity: 0.5; }
.pager { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.pager:empty { display: none; }
.pager > span.muted { white-space: nowrap; margin-right: 4px; }
.pager .button {
  box-sizing: border-box;
  font-size: var(--text-base);
  line-height: 1.3;
  padding: 8px 14px;
  background: color-mix(in srgb, var(--hover) 65%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--muted) 35%, var(--border));
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
}
.pager a.button:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); background: var(--hover); }
.pager .button[aria-disabled] { opacity: 0.45; cursor: default; box-shadow: none; }
.log-lines { margin: 0; padding: 12px 16px; font-size: 0.8rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 70vh; overflow-y: auto; }

/* One fixed size for every page (the tallest: Progress with all seven steps
   and a failure's output), so the overlay doesn't jump between pages; only
   a screen too short for it scrolls the page inside. */
dialog.wizard {
  width: min(560px, calc(100vw - 32px));
  height: min(660px, calc(100vh - 32px));
  max-height: none;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}
dialog.wizard[open] { display: flex; flex-direction: column; }
dialog.wizard > form { display: flex; flex-direction: column; flex: 1; min-height: 0; } /* a form overlay: footer at the bottom */
dialog.wizard [hidden] { display: none; } /* over .wizard-close, .reboot-done */
.setup-panel [hidden] { display: none !important; } /* the first-setup page: hidden always wins */
.wizard-head, .wizard-progress, .wizard-foot { flex: none; }
dialog.wizard[open] { animation: wizard-in 160ms ease-out; }
dialog.wizard::backdrop { background: rgba(15, 18, 24, 0.45); backdrop-filter: blur(2px); }
@keyframes wizard-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { dialog.wizard[open] { animation: none; } }
.wizard-head { position: relative; padding: 20px 24px 4px; }
.wizard-head h2 { margin: 0; font-size: var(--text-xl); font-weight: 650; letter-spacing: -.01em; }
.wizard-head p { margin: 2px 0 0; }
.wizard-close {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px;
  border: 0; border-radius: var(--radius); background: none; color: var(--muted); font-size: var(--text-2xl); line-height: 1; cursor: pointer;
}
.wizard-close:hover { background: var(--hover); color: var(--text); }
.wizard-progress { display: flex; gap: 6px; margin: 14px 24px 4px; padding: 0; list-style: none; counter-reset: wiz; }
.wizard-progress li {
  flex: 1; counter-increment: wiz; padding-top: 8px; border-top: 3px solid var(--border);
  font-size: var(--text-sm); color: var(--muted);
}
.wizard-progress li::before { content: counter(wiz) " · "; }
.wizard-progress li.done { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.wizard-progress li.current { border-color: var(--accent); color: var(--text); font-weight: 600; }
.wizard-page { flex: 1; min-height: 0; overflow: auto; padding: 14px 24px 4px; }
.choice-cards { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.choice-cards legend { margin-bottom: 10px; font-weight: 600; }
.choice-card {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: var(--radius-lg); cursor: pointer;
}
.choice-card:hover { background: var(--hover); }
.choice-card:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.choice-card:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice-card input { margin-top: 3px; accent-color: var(--accent); }
.choice-card > span, .wizard-option > span, .wizard-option > label { display: grid; gap: 2px; }
.choice-card.disabled { opacity: 0.55; cursor: not-allowed; }
.choice-card.disabled:hover { background: none; }
/* Create SMB Share, Shared Folder: only the cards scroll; Hidden stays in
   sight at the bottom. */
dialog.wizard .wizard-page.smb-folder-page:not([hidden]) { display: flex; flex-direction: column; overflow: hidden; }
.smb-folder-page fieldset.choice-cards { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.smb-folder-page .smb-folder-list { display: grid; gap: 10px; align-content: start; overflow-y: auto; min-height: 0; padding: 3px; margin: -3px; }
.smb-folder-page > .wizard-option, .smb-folder-page > .wizard-error { flex: none; }
.smb-folder-page > .wizard-option { margin-top: 12px; border-top: 1px solid var(--border); border-bottom: 0; }
.wizard-option {
  display: flex; gap: 16px; align-items: center; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.wizard-option:last-child { border-bottom: 0; }
.wizard-option select { min-width: 130px; }
.wizard-option .switch, .wizard-option select { flex-shrink: 0; }
.ssl-service-cards .ssl-show-all { margin-bottom: 10px; }
.ssl-service-cards .picker-name .pill { margin-left: 4px; }
.ssl-service-cards .picker-results { max-height: none; }
.picker-result[aria-disabled="true"] { cursor: default; }
.picker-result[aria-disabled="true"] .picker-info { opacity: .55; }
.ssl-service-cards .picker-result .pill { flex: none; }
.picker-result[aria-disabled="true"]:hover { background: color-mix(in srgb, var(--hover) 40%, transparent); }
.switch:disabled { opacity: 0.45; cursor: not-allowed; }
.wizard-steps { display: grid; gap: 2px; margin: 0 0 12px; padding: 0; list-style: none; }
.wizard-steps li { display: flex; gap: 12px; align-items: center; padding: 7px 12px; border-radius: var(--radius); counter-increment: step; }
.wizard-steps { counter-reset: step; }
.step-mark {
  display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid var(--border); font-size: var(--text-sm); color: var(--muted);
}
.step-mark::before { content: counter(step); }
.wizard-steps li.running { background: var(--hover); font-weight: 600; }
.wizard-steps li.running .step-mark { border-color: var(--accent); border-right-color: transparent; animation: spin 0.8s linear infinite; }
.wizard-steps li.running .step-mark::before { content: ""; }
.wizard-steps li.done .step-mark { background: var(--ok); border-color: var(--ok); color: var(--on-color); }
.wizard-steps li.done .step-mark::before { content: "✓"; }
.wizard-steps li.failed { background: var(--bad-bg); color: var(--bad); font-weight: 600; }
.wizard-steps li.failed .step-mark { background: var(--bad); border-color: var(--bad); color: var(--on-color); }
.wizard-steps li.failed .step-mark::before { content: "✕"; }
/* Under a running apt step: apt's progress (run.js stepProgress). */
.wizard-steps li:has(.step-progress) { flex-wrap: wrap; }
.step-progress { flex-basis: 100%; padding-left: 36px; font-weight: 400; }
.step-progress-bar { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; margin: 6px 0 4px; }
.step-progress-bar span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 3px; transition: width 0.4s ease; }
.step-progress-text { font-size: var(--text-sm); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wizard-error { margin: 0 0 12px; padding: 10px 12px; border-radius: var(--radius); background: var(--bad-bg); color: var(--bad); }
.wizard-result { margin: 4px 0 8px; font-weight: 600; }
[data-field="result"].ok .wizard-result, [data-field="svc-result"].ok .wizard-result { color: var(--ok); }
[data-field="result"].bad .wizard-result, [data-field="svc-result"].bad .wizard-result { color: var(--bad); }
.wizard-output { height: 96px; overflow: auto; margin: 0 0 6px; font-size: var(--text-sm); }
.docker-fail { margin-top: 12px; }
/* Every overlay's footer as Configuration's (the design language): a line
   above it, the buttons on the right. */
.wizard-foot { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 14px 24px; border-top: 1px solid var(--border); }
.wizard-foot .spacer { flex: 1; }
.wizard-foot [hidden] { display: none; }

/* Every button that changes something is a small POST form to
   /system/run/<action>: a GET only ever shows a page. */
form.run { display: inline; margin: 0; }
.para { margin: 1em 0; }
button.row-icon { background: transparent; padding: 0; font: inherit; cursor: pointer; }
button.row-icon:hover { filter: none; }
button.link-button { background: none; border: 0; padding: 0; color: var(--accent); font-weight: inherit; text-decoration: underline; }
button.link-button:hover { filter: none; }

/* Logs: Live, top right; a pulsing dot while it updates */
.live-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: var(--text-base); color: var(--muted); cursor: pointer; }
.live-status { display: inline-flex; align-items: center; gap: 8px; font-size: var(--text-md); color: var(--ok); white-space: nowrap; }
.live-status[hidden] { display: none; }
.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.live-dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--ok);
  animation: live-pulse 1.4s ease-out infinite;
}
@keyframes live-pulse { from { transform: scale(1); opacity: 0.7; } to { transform: scale(2.8); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .live-dot::after { animation: none; } }
.log-source { margin: 12px 0 0; }
.log-message code { white-space: pre-wrap; word-break: break-word; font-size: var(--text-sm); }
/* Logs → Firewall: the kernel's line is long and adds little; one line, all of it on hover. */
.log-oneline { max-width: 320px; }
.log-oneline code { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Logs → Services: `systemctl status` as a terminal shows it */
pre.terminal {
  background: var(--term-bg); color: var(--term-text); border-radius: var(--radius); padding: 12px 14px; margin: 8px 0 0;
  font-size: var(--text-md); line-height: 1.45; white-space: pre; overflow-x: auto;
}
pre.terminal .t-bold { font-weight: 700; color: var(--term-bright); }
pre.terminal .t-dim, pre.terminal .t-gray, pre.terminal .t-black { color: var(--term-dim); }
pre.terminal .t-red { color: #ff7b72; }
pre.terminal .t-green { color: #3fb950; }
pre.terminal .t-yellow { color: #d29922; }
pre.terminal .t-blue { color: #58a6ff; }
pre.terminal .t-magenta { color: #d2a8ff; }
pre.terminal .t-cyan { color: #39c5cf; }
pre.terminal .t-white { color: var(--term-bright); }
table.data.services tr.details > td { padding-left: 16px; }
/* The status lines scroll inside the box; they must not size the columns. */
table.data.services tr.details > td > .table-scroll { contain: inline-size; width: 100%; min-width: 0; }
/* Some unit names are long escaped paths (systemd-fsck@dev-disk-by\x2d…). */
table.data.services td.svc-name { min-width: 180px; }
table.data.services td.svc-name strong { overflow-wrap: anywhere; text-align: left; }

/* Features & Software's install overlay and System → Packages' update
   overlay list packages with long versions; they are wider, and versions
   break anywhere. */
dialog.wizard:is(:is(#install, #pkg-update), #pkg-update) { width: min(820px, calc(100vw - 32px)); height: min(720px, calc(100vh - 32px)); }
:is(#install, #pkg-update) table.sub-table td.pkg-version, :is(#install, #pkg-update) table.sub-table td.pkg-name { overflow-wrap: anywhere; }
/* One table, so the package and its dependencies share the columns. */
table.install-table { table-layout: fixed; }
table.install-table col.col-name { width: 30%; }
table.install-table col.col-version { width: 26%; }
table.install-table col.col-status { width: 18%; }
/* The Additional Features step: its bar has a segment per additional
   feature, each its own page. */
.wizard-progress li.split { border-top: 0; padding-top: 0; }
.wizard-progress li.split::before { content: none; }
.wizard-progress li.split > span:last-child::before { content: counter(wiz) " · "; }
.wizard-progress .segments { display: flex; gap: 3px; margin-bottom: 8px; }
.wizard-progress .segments i { flex: 1; border-top: 3px solid var(--border); }
.wizard-progress .segments i.done { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.wizard-progress .segments i.current { border-color: var(--accent); }
.install-sub .wizard-option { padding: 6px 0 2px; border-bottom: 0; }
.install-sub .wizard-option > span { display: grid; gap: 2px; }
table.install-table tr.group th { padding-top: 18px; font-size: var(--text-sm); }

/* Install overlay: each page starts with the (additional) feature, big, with
   its icon; its packages are cards with that icon; the dependencies are
   folded away below them. */
:is(#install, #pkg-update) .wizard-page { padding: 20px 28px 8px; }
.install-hero { display: flex; align-items: center; gap: 16px; padding: 4px 0 20px; border-bottom: 1px solid var(--border); }
.install-hero-text { flex: 1; min-width: 0; }
.install-hero h3 { margin: 0 0 4px; font-size: var(--text-2xl); font-weight: 700; }
.install-hero p { margin: 0; font-size: var(--text-base); }
.install-hero .switch { flex: none; }
.install-section { margin: 20px 0 10px; font-size: var(--text-sm); font-weight: 600; }
.pkg-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 10px; }
.pkg-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--hover) 40%, transparent); }
.pkg-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pkg-text strong { font-size: var(--text-body); overflow-wrap: anywhere; }
.pkg-text .muted { font-size: var(--text-sm); overflow-wrap: anywhere; }
.pkg-card .pill { flex: none; }
.install-body.off .pkg-cards, .install-body.off .install-deps { opacity: 0.45; }
.install-body { transition: opacity 0.15s; }
/* PHP Extensions page: a search, then the extensions two on a row */
.ext-bar { display: flex; align-items: center; gap: 12px; margin: 20px 0 12px; }
.ext-bar input[type=search] { flex: 1; min-width: 0; }
.ext-count { flex: none; font-size: var(--text-md); }
.ext-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ext-option { display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; min-width: 0; }
.ext-option[hidden] { display: none; }
.ext-option:hover { border-color: var(--muted); }
.ext-option.checked { border-color: var(--accent); }
.ext-option.is-installed { cursor: default; opacity: 0.6; }
.ext-option.removing { border-color: var(--bad); }
.ext-option.removing .ext-name { text-decoration: line-through; }
.ext-text strong { display: flex; align-items: center; gap: 8px; }
.ext-pill { font-size: var(--text-xs); padding: 0 6px; }
.removal-table + * { margin-top: 0; }
.ext-option input { flex: none; margin: 2px 0 0; }
.ext-text { display: flex; flex-direction: column; min-width: 0; }
.ext-text strong { font-size: var(--text-base); }
.ext-text .muted { font-size: var(--text-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ext-none { margin: 8px 0; }
@media (max-width: 560px) { .ext-grid { grid-template-columns: 1fr; } }
.install-deps { margin-top: 16px; font-size: var(--text-md); }
.install-deps summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; padding: 6px 0; font-weight: 600; }
.install-deps summary::-webkit-details-marker { display: none; }
.install-deps summary .muted { font-weight: 400; }
.install-deps summary .chevron { margin-left: 0; }
.install-deps[open] summary .chevron { transform: rotate(45deg); }
.install-deps table { margin-top: 6px; font-size: var(--text-md); }

/* While the packages are read, the overlay shows only a spinner. */
:is(#install, #pkg-update, #docker-install).loading .wizard-progress, :is(#install, #pkg-update, #docker-install).loading .wizard-page, :is(#install, #pkg-update, #docker-install).loading [data-back], :is(#install, #pkg-update, #docker-install).loading [data-next] { display: none; }
.install-loading:not([hidden]) { flex: 1; display: grid; place-content: center; justify-items: center; gap: 14px; }
.install-loading .spinner { width: 36px; height: 36px; margin: 0; border-width: 3px; color: var(--accent); }
.install-loading p { margin: 0; }
.install-loading > p.muted { max-width: 520px; text-align: center; }
.summary-reading { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; }
.reading-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; min-width: 420px; }
.reading-list li { display: grid; grid-template-columns: 16px auto 1fr; align-items: center; gap: 10px; }
.reading-list .spinner { width: 14px; height: 14px; border-width: 2px; margin: 0; }
.reading-list li > span.muted { text-align: right; }
.reading-list li.done .spinner, .reading-list li.failed .spinner { animation: none; border: 0; }
.reading-list li.done .spinner::before { content: "✓"; color: var(--ok); font-weight: 600; }
.reading-list li.failed .spinner::before { content: "✕"; color: var(--bad); font-weight: 600; }
.reading-list li.failed > span.muted { color: var(--bad); }

/* Dependencies show only what will be installed, unless "Show installed
   packages" is ticked (the whole overlay follows the one choice). */
:is(#install, #pkg-update):not(.show-installed) .install-deps tr.is-installed { display: none; }
:is(#install, #pkg-update).show-installed .install-deps tr.nothing-to-install { display: none; }
.install-deps .deps-filter { display: inline-flex; margin: 4px 0 2px; font-size: var(--text-md); }

/* The update overlay: the versions on a card, and its Progress page. */
.pkg-card .pill + .pill { margin-left: -6px; }
#pkg-update .wizard-steps { margin-top: 20px; }
table.install-table.update-table col.col-name { width: 32%; }
table.install-table.update-table col.col-version { width: 24%; }
table.install-table.update-table col.col-status { width: 20%; }
table.install-table.update-table { min-width: 520px; }
/* The update overlay's Services page: a card per service, with a tick. */
label.svc-card { cursor: pointer; }
label.svc-card input { margin: 0; flex: none; }
.wizard-progress li[hidden] { display: none; }
/* Package Updates: the filter and Last checked on one line. */
.package-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 12px; }
.package-bar .log-filters { margin: 0; }
.package-bar .package-status { margin: 0; }
/* Package Updates: a checkbox per package, to update several at once. */
table.data th.col-check, table.data td.col-check { width: 1%; padding-right: 0; }
table.data td.col-check input, table.data th.col-check input { margin: 0; vertical-align: middle; }

/* PHP settings tables (a website's PHP tab, Website → Configuration → PHP) */
.php-settings td { vertical-align: middle; }
code.wrap { overflow-wrap: anywhere; }
/* The override column (before Active Value): every field and dropdown the
   same width. */
.php-settings td:nth-last-child(2) { width: 300px; min-width: 260px; }
.php-settings td:nth-last-child(2) select, .php-settings td:nth-last-child(2) input[type=text],
.php-settings td:nth-last-child(2) input[type=date], .php-settings td:nth-last-child(2) textarea { width: 100%; }
.php-settings td:nth-last-child(2) .check { font-size: var(--text-md); align-items: center; }
.php-settings td:nth-last-child(2) .check input { margin-top: 0; }
/* Server Default and Active Value: wide enough for an address on one line. */
.php-settings td:nth-child(3), .php-settings td:last-child { min-width: 230px; }
.php-settings .input-group { display: flex; width: 100%; }
.php-settings .input-group input { flex: 1 1 auto; min-width: 0; }
.php-settings .input-suffix { flex: 0 0 62px; }

/* A heading between the rows of a settings form */
.settings-form .form-section { margin: 10px 0 0; font-size: var(--text-body); font-weight: 650; }
.php-settings .field-note { margin-top: 4px; }
/* Docker: numbers right-aligned. */
table.data .num { text-align: right; }
table.data th.num .sort { justify-content: flex-end; }
@media (min-width: 701px) { table.data.docker th, table.data.docker td { padding-left: 10px; padding-right: 10px; } }

/* One fixed size for every step, so it doesn't jump as it goes. */
dialog.reboot-wizard { height: min(500px, calc(100vh - 32px)); }
.reboot-done { display: grid; justify-items: center; gap: 12px; padding: 18px 0 8px; text-align: center; }
.reboot-done p { margin: 0; font-size: var(--text-xl); font-weight: 600; color: var(--ok); }
.reboot-check {
  display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%;
  background: var(--ok); animation: reboot-pop 260ms ease-out;
}
.reboot-check svg { width: 56px; height: 56px; fill: none; stroke: var(--on-color); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
@keyframes reboot-pop { from { transform: scale(0.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .reboot-check { animation: none; } }
/* Install Docker: the install overlay's size and pages. */
dialog.wizard#docker-install { width: min(880px, calc(100vw - 32px)); height: min(720px, calc(100vh - 32px)); }
#docker-install .wizard-page { padding: 20px 28px 8px; }
#docker-install table.install-table th[scope=row] { font-weight: 600; text-transform: none; letter-spacing: 0; font-size: var(--text-md); background: none; }
#docker-install td.pkg-version { overflow-wrap: anywhere; }
#docker-install .wizard-steps { margin-top: 8px; }
#docker-install .prepare-warning { margin: 20px 0 16px; }
/* Six steps: each name on one line; longer names get a little more room. */
#docker-install .wizard-progress li { flex: 1 0 auto; white-space: nowrap; }
#docker-install .reboot-done p.test-result { font-size: var(--text-base); font-weight: 400; color: var(--muted); }
#docker-install label.remove-test { margin-top: 10px; align-items: center; font-size: var(--text-base); }
#docker-install label.remove-test input { margin-top: 0; }
/* Docker: Create Container, Create Stack, Add Image (overlays). */
dialog.wizard.docker-wizard { width: min(820px, calc(100vw - 32px)); height: min(720px, calc(100vh - 32px)); }
/* The certificate setup: as large as the step wizards (Add Domain). */
dialog.wizard#ssl-setup { width: min(820px, calc(100vw - 32px)); height: min(720px, calc(100vh - 32px)); }
#ssl-setup .wizard-page { padding: 20px 28px 8px; }
.docker-wizard .wizard-page { padding: 20px 28px 8px; }
.docker-wizard .wizard-option :is(input[type=text], input[type=password]) { width: 260px; max-width: 100%; }
.docker-wizard .choice-cards { margin-top: 16px; }
.docker-wizard .choice-card > span > select, .docker-wizard .choice-card > span > input { margin-top: 8px; width: 320px; max-width: 100%; }
.docker-wizard table.row-editor td { padding: 6px 8px; }
.docker-wizard table.row-editor :is(input, select) { width: 100%; box-sizing: border-box; }
.docker-wizard table.row-editor td.col-actions { width: 1%; }
.docker-wizard .add-row { margin-top: 10px; }
.docker-wizard .wizard-note { margin: 12px 0 0; font-size: var(--text-md); }
.docker-wizard textarea.code-editor { height: 400px; max-height: calc(100vh - 340px); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--text-md); line-height: 1.5; tab-size: 2; }
.docker-wizard table.summary-table th[scope=row] { width: 30%; font-weight: 600; text-transform: none; letter-spacing: 0; font-size: var(--text-md); background: none; vertical-align: top; }
.docker-wizard table.summary-table + .install-section { margin-top: 24px; }
/* Create Stack: the compose.yaml editor. The coloured copy (pre) lies
   exactly behind the textarea, whose own text is transparent. */
.code-wrap { position: relative; }
.code-wrap .code-highlight, .code-wrap textarea.code-editor {
  margin: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); box-sizing: border-box;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--text-md); line-height: 1.5; tab-size: 2;
  white-space: pre; overflow-wrap: normal; letter-spacing: 0; }
.code-wrap .code-highlight { position: absolute; inset: 0; overflow: hidden; pointer-events: none; border-color: transparent; color: var(--text); background: none; }
.code-wrap textarea.code-editor { position: relative; display: block; width: 100%; color: transparent; caret-color: var(--text); background: transparent; overflow: auto; resize: none; }
.code-wrap textarea.code-editor::selection { color: transparent; background: color-mix(in srgb, var(--accent) 30%, transparent); }
.code-wrap:has(textarea:focus) .code-highlight { border-color: transparent; }
.y-key { color: var(--accent); }
.y-punct, .y-dash { color: var(--muted); }
.y-string { color: var(--ok); }
.y-number, .y-bool { color: var(--warn); }
.y-var { color: #a855f7; font-weight: 600; }
.y-comment { color: var(--muted); font-style: italic; }
.y-error-line { background: color-mix(in srgb, var(--bad) 16%, transparent); box-shadow: inset 3px 0 0 var(--bad); }
.yaml-status { margin-top: 10px; padding: 8px 12px; border-radius: var(--radius); font-size: var(--text-md); }
.yaml-status.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.yaml-status.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); display: grid; gap: 2px; }
.code-wrap textarea.code-editor:focus { border-color: var(--accent); }
/* Docker: the image search (Create Container, Add Image). */
.image-picker { margin-top: 16px; display: grid; gap: 10px; }
.picker-bar { display: flex; gap: 8px; }
.picker-bar select { flex: none; width: 220px; }
.picker-bar input { flex: 1; min-width: 0; }
.picker-hint { margin: 0; font-size: var(--text-md); }
.picker-results { display: grid; gap: 6px; max-height: 300px; overflow: auto; }
.picker-result { display: grid; gap: 2px; text-align: left; width: 100%; padding: 7px 12px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--hover) 40%, transparent); color: var(--text); font: inherit; cursor: pointer; }
.picker-result:hover { background: var(--hover); }
.picker-result[aria-selected="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.picker-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.picker-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-name .picker-stats { margin-left: auto; flex: none; white-space: nowrap; }
.picker-desc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-desc, .picker-stats { font-size: var(--text-sm); }
/* Create Container: where the image comes from, two buttons in one row */
.docker-wizard .source-option { padding: 10px 0; }
.segmented { display: inline-flex; flex: none; padding: 3px; gap: 3px; border: 1px solid var(--border); border-radius: var(--radius); }
.segmented label { position: relative; padding: 5px 14px; border-radius: var(--radius-sm); cursor: pointer; font-size: var(--text-base); white-space: nowrap; }
.segmented label:hover { background: var(--hover); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label:has(input:checked) { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--text); font-weight: 600; }
.segmented label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
.segmented label:has(input:disabled) { opacity: 0.5; cursor: not-allowed; }
.segmented label:has(input:disabled):hover { background: none; }
.picker-page > .picker-fill .image-picker { margin-top: 4px; }
.picker-empty { margin: 4px 0; font-size: var(--text-md); }
/* A page with the image search: the result list takes the rest of the
   overlay's height (scrolling inside), at least 150px. */
.docker-wizard .wizard-page.picker-page:not([hidden]) { display: flex; flex-direction: column; }
.picker-page > .picker-fill:not([hidden]), .picker-page .image-picker { flex: 1 0 auto; display: flex; flex-direction: column; min-height: 0; }
.picker-page .picker-fill:not([hidden]) { flex: 1 1 0; min-height: 0; }
.picker-page > .image-picker { flex: 1 1 0; }
.picker-page .picker-results { flex: 1 1 0; min-height: 150px; max-height: none; align-content: start; }
@media (max-width: 640px) { .picker-bar select { width: 42%; } }
/* A result card: the image left, on the chosen card its tag list right. */
.picker-result { display: flex; align-items: center; gap: 12px; }
.picker-result .picker-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.picker-result:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.picker-result select.picker-card-tag { flex: none; width: 170px; }
/* Add Proxy Rule: containers as cards; the chosen one shows its ports. */
.proxy-cards .picker-result:not([aria-selected="true"]) select { display: none; }
.proxy-cards .picker-result select.picker-card-tag { width: 230px; }

/* Docker: a command's output in an overlay (dockerrun.js, dockerinstall.js) */
pre.docker-terminal { height: 320px; margin: 0 0 8px; white-space: pre-wrap; word-break: break-word; overflow-y: auto; }
.run-status { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: var(--text-md); font-weight: 600; white-space: nowrap; }
.run-status:empty { display: none; }
.run-status.running { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.run-status.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.run-status.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.run-status .spinner { width: 12px; height: 12px; }
.docker-run .wizard-foot { align-items: center; }
.wizard .install-terminal { height: 180px; margin-top: 12px; }
dialog.wizard.docker-run { width: min(820px, calc(100vw - 32px)); height: min(560px, calc(100vh - 32px)); }
.docker-run .wizard-page { display: flex; flex-direction: column; }
.docker-run pre.docker-terminal { flex: 1; height: auto; min-height: 160px; }
.docker-run .wizard-head { display: flex; align-items: center; gap: 12px; }
.docker-run .run-confirm { margin: 0 0 12px; }
dialog.wizard.docker-run.asking { height: fit-content; }
/* Docker → Logs: the bar above the log, one div per line; stderr tinted,
   a stack's service names coloured, times shown only with Timestamps. */
dialog.wizard.docker-logs { width: min(1080px, calc(100vw - 32px)); height: min(720px, calc(100vh - 32px)); }
.logs-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 10px; }
.logs-bar select { width: auto; }
.logs-bar input[type=search] { width: 220px; max-width: 100%; }
.logs-bar .spacer { flex: 1; }
pre.docker-log { white-space: pre-wrap; word-break: break-word; }
pre.docker-log .log-line { min-height: 1.45em; }
pre.docker-log .log-line[hidden] { display: none; }
pre.docker-log .log-line.err { background: color-mix(in srgb, #ff7b72 10%, transparent); box-shadow: inset 2px 0 #ff7b72; margin: 0 -14px; padding: 0 14px; }
pre.docker-log .log-time { display: none; color: var(--term-dim); }
pre.docker-log.show-times .log-time { display: inline; }
pre.docker-log .log-empty { color: var(--term-dim); }
pre.docker-log .log-empty.bad { color: #ff7b72; }
pre.docker-log .log-empty[hidden] { display: none; }
pre.docker-log .log-name { font-weight: 600; }
pre.docker-log .log-name.c0 { color: #58a6ff; }
pre.docker-log .log-name.c1 { color: #3fb950; }
pre.docker-log .log-name.c2 { color: #d2a8ff; }
pre.docker-log .log-name.c3 { color: #d29922; }
pre.docker-log .log-name.c4 { color: #39c5cf; }
pre.docker-log .log-name.c5 { color: #ff9bce; }
.docker-logs .wizard-foot .button + .button, .docker-logs .wizard-foot a.button { margin-left: 8px; }
.docker-logs .run-status:empty { display: none; }
button.pill.pill-button { border: 0; cursor: pointer; font-family: inherit; line-height: inherit; }
button.pill.pill-button:hover { filter: brightness(1.1); text-decoration: underline; }
dialog.wizard.docker-wizard.docker-small { width: min(560px, calc(100vw - 32px)); height: min(440px, calc(100vh - 32px)); }
table.storage-editor td:first-child { width: 7.5rem; }

/* Docker wizards: a name's check below its field; reading the image */
.field-wrap { display: grid; gap: 4px; justify-items: end; }
.field-error { font-size: var(--text-md); color: var(--bad); text-align: right; max-width: 260px; }
.field-error:empty { display: none; }
.field-error.muted { color: var(--muted); }
/* Under a field the message always takes one line, empty or not, so the
   field never moves while typing. */
.field-wrap .field-error, .field-wrap .field-error:empty { display: block; min-height: 1.35em; line-height: 1.35em; white-space: nowrap; max-width: none; }
/* Narrow: a name's label above its field, the field full width. */
@media (max-width: 640px) {
  .docker-wizard .wizard-option:has(> .field-wrap) { flex-direction: column; align-items: stretch; gap: 8px; }
  .docker-wizard .wizard-option > .field-wrap { justify-items: stretch; }
  .docker-wizard .wizard-option > .field-wrap > input { width: 100%; }
  .docker-wizard .wizard-option > .field-wrap .field-error { text-align: left; }
}
.prefill-loading { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 8px 12px; border-radius: var(--radius);
  color: var(--muted); background: var(--hover); font-size: var(--text-md); }
.prefill-loading .spinner { width: 14px; height: 14px; }
.step-wizard.reading .row-editor { opacity: 0.45; pointer-events: none; }

/* Steps on one line only above a terminal (the Docker wizards); without
   one (RAID, software installs) they stay below each other. */
.docker-wizard [data-page="run"]:has(.docker-terminal) .wizard-steps { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.docker-wizard [data-page="run"]:has(.docker-terminal) .wizard-steps li { padding: 6px 12px 6px 8px; gap: 8px; }
.step-wizard .wizard-head { display: flex; align-items: center; gap: 12px; }
.step-wizard .wizard-head .wizard-close { margin-left: auto; }
.step-wizard .wizard-foot { align-items: center; }
/* Docker create wizards: the output fills the Progress page */
.docker-wizard [data-page="run"]:not([hidden]) { display: flex; flex-direction: column; }
.docker-wizard [data-page="run"] .install-terminal { flex: 1; height: auto; min-height: 160px; margin-top: 4px; }
/* Create Stack: where compose.yaml and .env come from (sourcepicker.js) */
.source-choice { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 12px; }
.source-load { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.source-load input[type="url"] { flex: 1; min-width: 0; }
.source-status { margin: 0 0 12px; font-size: var(--text-md); }
.source-status:empty { display: none; }
.source-status.bad { color: var(--bad); }
.source-summary { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; min-width: 0; }
.source-summary [data-source-from] { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-md); }
.source-summary[hidden], .source-picker .choice-cards[hidden] { display: none; }
/* … and the editor fills the rest of the page */
.docker-wizard .source-page:not([hidden]) { display: flex; flex-direction: column; }
.docker-wizard .source-page .source-content:not([hidden]) { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.docker-wizard .source-page .code-wrap { flex: 1; min-height: 220px; display: flex; flex-direction: column; }
.docker-wizard .source-page textarea.code-editor { flex: 1; height: auto; max-height: none; }

/* Docker → Containers: a long image name (a digest) is cut off, in full on hover */
table.docker td.col-image { max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
/* Create Stack → .env: a variable's comment (from a loaded .env) below its name */
.env-comment { display: block; font-size: var(--text-sm); line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; }
/* … in a row of its own below the variable, across Name and Value */
.docker-wizard table.row-editor tr:has(+ .env-comment-row) td { border-bottom: 0; padding-bottom: 2px; }
.docker-wizard table.row-editor .env-comment-row td { padding-top: 0; }
.docker-wizard table.row-editor[id$="-env"] td:first-child { width: 45%; }
/* A row's buttons (Start, Stop, Restart, Remove), enabled or not, in one line with even gaps */
.row-actions { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; }
.row-actions > form.run { display: contents; }
.row-actions .row-icon { margin: 0 !important; }
/* Env tables: a comment below a name makes its row taller; the fields stay on the top line */
.docker-wizard table.row-editor[id$="-env"] td { vertical-align: top; }
.docker-wizard table.row-editor[id$="-env"] td.col-actions .row-icon { margin-top: 4px; } /* Edit: the name stays */
.docker-wizard input[readonly] { opacity: 0.6; cursor: default; }

/* Storage wizards: disk and array cards on one line. */
.storage-wizard .disk-cards { gap: 6px; }
.storage-wizard .disk-cards .choice-card { padding-top: 9px; padding-bottom: 9px; }
.storage-wizard .disk-line { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; width: 100%; }
.storage-wizard .disk-line strong { min-width: 48px; }
.storage-wizard .disk-line .disk-size { margin-left: auto; font-variant-numeric: tabular-nums; }
.storage-wizard .storage-calc { font-weight: 600; }
.storage-wizard .storage-erase:empty { display: none; }
.storage-wizard.docker-wizard [data-page="run"] .wizard-steps { display: grid; gap: 2px; margin-top: 8px; }
.storage-wizard.docker-wizard [data-page="run"] .wizard-steps li { padding: 7px 12px; gap: 12px; }

/* usageBar: used against total (Storage Pools). */
.usage { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.usage progress { --fill: var(--accent); flex: 1; height: 8px; border: 0; border-radius: var(--radius-pill); background: var(--hover); overflow: hidden; appearance: none; }
.usage.warn progress { --fill: var(--warn); }
.usage.bad progress { --fill: var(--bad); }
.usage progress::-webkit-progress-bar { background: var(--hover); }
.usage progress::-webkit-progress-value { background: var(--fill); border-radius: var(--radius-pill); }
.usage progress::-moz-progress-bar { background: var(--fill); border-radius: var(--radius-pill); }
.usage.usage-short { min-width: 170px; }
.usage-short progress { width: 0; min-width: 80px; }
.usage-short .usage-text { min-width: 5.5em; text-align: right; }
.usage-text { font-size: var(--text-md); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Create Volume: filesystem cards with pros (+) and cons (−). */
.storage-wizard .fs-cards .choice-card { padding: 16px 18px; }
.storage-wizard .fs-cards .choice-card > span { gap: 4px; width: 100%; }
.fs-points { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; margin-top: 8px; }
.fs-points ul { display: grid; gap: 4px; align-content: start; margin: 0; padding: 0; list-style: none; font-size: var(--text-md); }
.fs-points li { position: relative; padding-left: 18px; }
.fs-points li::before { position: absolute; left: 0; font-weight: 700; }
.fs-pros li::before { content: "+"; color: var(--ok); }
.fs-cons li::before { content: "−"; color: var(--bad); }
@media (max-width: 640px) { .fs-points { grid-template-columns: 1fr; } }

/* Delete RAID Array: the red warning and a red go-ahead button. */
.danger-box { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; padding: 14px 16px;
  border: 1px solid var(--bad); border-radius: var(--radius-lg); background: var(--bad-bg); color: var(--bad); }
.danger-box strong { font-size: var(--text-body); }
.danger-box p { margin: 6px 0 0; color: var(--text); }
.danger-icon { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--bad); color: var(--on-color); font-weight: 700; }
.storage-danger:has([data-page="run"][hidden]) .wizard-foot [data-next]:not(:disabled) { background: var(--bad); color: var(--on-color); }
dialog.wizard.docker-wizard.docker-small.storage-danger { height: min(670px, calc(100vh - 32px)); }
/* Storage jobs: a short output box, so the done message fits below it. */
.storage-wizard.docker-wizard [data-page="run"] .install-terminal { flex: none; height: 120px; min-height: 0; }
.storage-wizard .reboot-done { padding-top: 8px; }

/* The Syncing pill keeps one width while its numbers change (live), so
   the RAID Arrays columns don't jump. */
.sync-pill { font-variant-numeric: tabular-nums; white-space: nowrap; }
.wizard-advanced { margin-top: 16px; }
.wizard-advanced > summary { cursor: pointer; font-weight: 600; padding: 6px 0; color: var(--muted); }
.wizard-advanced[open] > summary { color: var(--text); }
.sync-pill .sync-pct { display: inline-block; min-width: 3.4em; text-align: right; }
.sync-pill .sync-speed { display: inline-block; min-width: 5.6em; text-align: left; }
table.data th.col-state { width: 19em; }

/* A yes/cancel dialog in the design language: a banner's mark (a
   question; red with a warning while Yes is .danger), the title beside it,
   the text under the title, the buttons right below a line. */
dialog.wizard.dns-confirm { width: min(460px, calc(100vw - 32px)); height: fit-content; max-height: calc(100vh - 32px); }
.dns-confirm .wizard-head { display: flex; align-items: center; gap: 16px; padding: 24px 56px 0 24px; }
.confirm-mark { --state: var(--accent); flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin: 6px; border-radius: 50%; color: #fff;
  background: var(--state); box-shadow: 0 0 0 7px color-mix(in srgb, var(--state) 16%, transparent), 0 4px 12px color-mix(in srgb, var(--state) 35%, transparent); }
.confirm-mark .icon { width: 22px; height: 22px; stroke-width: 2.2; color: #fff; }
.confirm-mark .icon + .icon { display: none; }
.dns-confirm:has(.wizard-foot .danger) .confirm-mark { --state: var(--bad); }
.dns-confirm:has(.wizard-foot .danger) .confirm-mark .icon:first-child { display: none; }
.dns-confirm:has(.wizard-foot .danger) .confirm-mark .icon + .icon { display: block; }
/* A long question scrolls; the buttons stay in sight. */
.dns-confirm .wizard-page { overflow-wrap: anywhere; padding: 4px 24px 22px 90px; color: var(--muted); }
.dns-confirm .wizard-page p { margin: 0; }
.dns-confirm .wizard-page p + p { margin-top: 8px; }
@media (max-width: 480px) { .dns-confirm .wizard-page { padding-left: 24px; } }
.dns-sync-error { margin: 0 0 14px; }

/* A record waiting for its turn in a sync (dnssync.js). */
.waiting { display: inline-block; box-sizing: border-box; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; border: 2px dashed color-mix(in srgb, var(--text) 45%, transparent); border-radius: 50%; }

/* Website → <domain> → Files (files.js): the folder's path, Upload Files,
   the list with Download and Remove, and Remove's yes/cancel dialog. */
.files-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.files-crumbs { display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: baseline; font-family: var(--mono, ui-monospace, monospace); font-size: var(--text-base); min-width: 0; overflow-wrap: anywhere; }
.files-crumbs .sep { color: var(--muted); }
.files-upload { display: flex; gap: 10px; align-items: center; }
.files-upload label.button { cursor: pointer; }
.files-upload input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.files-upload label.button:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.files-progress { font-variant-numeric: tabular-nums; font-size: var(--text-md); }
.files-progress[hidden] { display: none; }
.files-progress.bad { color: var(--bad); }
.files-error { margin: 0 0 12px; }
.files-error[hidden] { display: none; }
table.data.files td { padding-top: 8px; padding-bottom: 8px; }
.files-name { display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
/* Widths for the columns around Name, so a folder that is empty when the
   page loads still has room for what an upload adds (tables.js). */
table.data.files th.col-check { width: 40px; }
table.data.files th.col-size { width: 90px; }
table.data.files th.col-modified { width: 150px; }
table.data.files th.col-perms { width: 120px; }
table.data.files th.col-owner { width: 180px; }
table.data.files th.col-actions { width: 90px; }
table.data.files td.files-owner { overflow-wrap: anywhere; min-width: 10em; }
@media (max-width: 1100px) { table.data.files .hide-mid { display: none; } }
.files-icon { flex: none; display: inline-block; width: 16px; height: 16px; color: var(--muted); text-align: center; line-height: 16px; }
.files-icon.dir { background: color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 2px 4px 3px 3px; height: 12px; position: relative; top: 1px; }
.files-icon.file { width: 12px; border: 1.5px solid var(--muted); border-radius: 2px; height: 15px; }
#files-remove form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
#files-remove .wizard-page p { overflow-wrap: anywhere; }
table.data.files .col-check { width: 1%; padding-right: 0; }
table.data.files .col-check input { display: block; margin: 0; accent-color: var(--accent); }
table.data.files tr:has([data-files-pick]:checked) { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.files-upload button[data-files-remove-selected]:disabled { opacity: 0.45; cursor: not-allowed; }
dialog.wizard.dns-confirm#files-remove { max-height: min(560px, calc(100vh - 32px)); }
.files-remove-list { margin: 10px 0 0; padding-left: 18px; overflow-wrap: anywhere; }
.files-remove-list:empty { display: none; }

/* The upload overlay (files.js): every file of the upload with its state. */
dialog.wizard.files-uploads { height: min(560px, calc(100vh - 32px)); }
.files-upload-list { list-style: none; margin: 0; padding: 0; }
.files-upload-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.files-upload-list li:last-child { border-bottom: 0; }
.files-upload-list .name { overflow-wrap: anywhere; }
.files-upload-list .size { font-size: var(--text-md); }
.files-upload-list .reason { grid-column: 1 / -1; font-size: var(--text-md); color: var(--bad); }
.files-upload-list .usage { grid-column: 1 / -1; min-width: 0; }
.files-upload-list .usage progress { width: auto; min-width: 0; }
.files-upload-list .usage-text { font-size: var(--text-md); min-width: 3em; text-align: right; font-variant-numeric: tabular-nums; }

/* A job's terminal window (terminal.html): the output fills the window. */
main.bare:has(.terminal-window) { display: block; padding: 0; min-height: 0; }
.terminal-window { display: flex; flex-direction: column; height: 100vh; background: var(--term-bg); }
.terminal-window-head { display: flex; gap: 12px; align-items: baseline; padding: 10px 16px; color: var(--term-bright); border-bottom: 1px solid var(--term-border); }
.terminal-window-head .muted { color: var(--term-dim); }
.terminal-window pre.terminal { flex: 1; margin: 0; border-radius: 0; max-height: none; min-height: 0; }

/* The install wizards' "Open Terminal", bottom left. */
.wizard-foot .open-terminal { display: inline-flex; align-items: center; gap: 6px; }
.wizard-foot .open-terminal svg { width: 16px; height: 16px; }

/* Two-factor login (Settings → Control Panel → Login). */
dialog.wizard.twofactor-wizard { height: min(620px, calc(100vh - 32px)); }
dialog.wizard.twofactor-wizard.twofactor-small { height: min(400px, calc(100vh - 32px)); }
.twofactor-wizard .wizard-page { padding: 20px 28px 8px; }
.twofactor-wizard .wizard-page > p:first-child { margin-top: 0; }
.twofactor-wizard .wizard-note { margin: 12px 0 0; font-size: var(--text-md); }
.twofactor-wizard .wizard-option input { width: 220px; flex-shrink: 0; }
.twofactor-qr { width: 216px; margin: 16px auto 8px; }
.twofactor-qr svg { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.twofactor-key-label { margin: 12px 0 4px; text-align: center; font-size: var(--text-md); }
.twofactor-key { margin: 0; text-align: center; }
.twofactor-key code { font-size: var(--text-body); letter-spacing: 0.04em; word-break: break-word; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 24px; margin: 16px 0; padding: 14px 18px 14px 40px;
  border: 1px solid var(--border); border-radius: var(--radius-lg); font-family: var(--mono, ui-monospace, monospace); font-size: var(--text-body); }
.twofactor-copy { display: flex; gap: 8px; margin: 0; }
@media (max-width: 520px) {
  .twofactor-wizard .wizard-option { flex-direction: column; align-items: stretch; }
  .twofactor-wizard .wizard-option input { width: 100%; }
}

/* Mail -> Spam Protection -> Connections: a rule, what it does and an example, its switch */
table.conn-rules td p { margin: 4px 0 0; font-size: var(--text-md); }
table.conn-rules td.col-actions { vertical-align: top; padding-top: 14px; }

/* a switch that runs in place (switchrun.js): the knob spins while it runs */
.switch.busy { cursor: progress; }
.switch.busy span { left: 12px; background: transparent; border: 2px solid var(--on-color); border-right-color: transparent;
  animation: spin 0.8s linear infinite; box-sizing: border-box; }
@media (prefers-reduced-motion: reduce) { .switch.busy span { animation: none; } }
.switch-error { margin: 0 0 14px; }

/* A row's Actions menu (rowmenu.js): a popover under its button. */
.row-menu-button { display: inline-flex; align-items: center; gap: 4px; }
.row-menu-button .menu-arrow { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.row-menu { position: fixed; inset: auto; margin: 0; min-width: 220px; max-width: 320px; padding: 6px; text-align: left; white-space: normal;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14); }
.row-menu hr { margin: 6px 4px; border: 0; border-top: 1px solid var(--border); }
.row-menu-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 7px 10px;
  border: 0; border-radius: var(--radius-sm); background: none; color: inherit; font: inherit; font-size: var(--text-base); text-align: left; cursor: pointer; }
.row-menu-item:hover:not(:disabled), .row-menu-item:focus-visible { background: color-mix(in srgb, var(--accent) 10%, transparent); outline: none; }
.row-menu-item[data-danger] { color: var(--bad); }
.row-menu-item[data-danger]:hover:not(:disabled) { background: var(--bad-bg); }
.row-menu-item:disabled { cursor: default; }
.row-menu-item:disabled span { color: var(--muted); }
.row-menu-item small { color: var(--muted); font-size: var(--text-sm); line-height: 1.35; }

/* -------------------------------------------------------- statistics --- */
.stat-chart .series.s1 { --chart: var(--accent); }
.stat-chart .series.s2 { --chart: var(--series-2); }
.stat-chart .series.s3 { --chart: var(--series-3); }
.stat-chart .series.s4 { --chart: var(--bad); }
.stat-chart .series.s5 { --chart: var(--ok); }
.stat-chart .series.s6 { --chart: var(--series-6); }
.stat-chart .area { opacity: .08; }
.stat-chart .series:not(.s1) .area { display: none; }
/* The values under the pointer lie over the legend on one line (cut off
   with … when too long), so hovering never changes a card's height. */
.stat-foot { position: relative; margin-top: 8px; min-height: 18px; font-size: var(--text-sm); line-height: 18px; }
.stat-foot .chart-pointer { position: absolute; inset: 0 0 auto 0; margin: 0; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-foot:has(.chart-pointer:not(:empty)) .stat-legend { visibility: hidden; }
.stat-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0; list-style: none; color: var(--muted); }
.stat-legend li { display: inline-flex; align-items: center; gap: 6px; }
.stat-legend li::before { content: ""; width: 10px; height: 3px; border-radius: 2px; background: var(--chart); }
.stat-legend li.s1 { --chart: var(--accent); }
.stat-legend li.s2 { --chart: var(--series-2); }
.stat-legend li.s3 { --chart: var(--series-3); }
.stat-legend li.s4 { --chart: var(--bad); }
.stat-legend li.s5 { --chart: var(--ok); }
.stat-legend li.s6 { --chart: var(--series-6); }
.stat-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.stat-chart.small .chart-now { font-size: var(--text-lg); }
.stat-chart.small .chart-plot svg { height: 110px; }
.stat-chart.small .chart-head { margin-bottom: 8px; }
.charts + .section-title { margin-top: 24px; }
.charts.after-grid { margin-top: 16px; }
.stat-addrs span { display: block; }
table.processes { table-layout: fixed; width: 100%; min-width: 640px; }
table.processes td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.processes td.cmd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--text-sm); }
table.data td.clip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
table.processes th.col-pid { width: 100px; }
table.processes th.col-user { width: 130px; }
table.processes th.col-cpu, table.processes th.col-mem { width: 96px; }
table.processes th.col-threads { width: 90px; }
table.processes th.col-state { width: 70px; }
table.processes th.col-started { width: 90px; }

/* Domains → Add Domain: a switch that can't be used until its software is there. */
.domain-wizard .wizard-option.is-disabled strong { color: var(--muted); }
.domain-wizard .choice-cards { margin: 4px 0 12px; }
/* Databases → Add Database / Add User (databases.html, databases.js). */
.db-wizard .choice-cards { margin: 4px 0 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.db-wizard .choice-card:has(input:disabled) { opacity: .55; cursor: default; }
.db-wizard .choice-cards.db-existing { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 320px; overflow-y: auto; padding: 2px; }
.db-wizard .db-existing .choice-card .muted { overflow-wrap: anywhere; }
.db-wizard .password-row { display: flex; gap: 6px; align-items: center; }
.db-wizard .password-row input { flex: 1; min-width: 0; font-family: var(--mono, ui-monospace, monospace); }
.db-wizard .db-grant { align-items: center; }
.db-wizard .db-grant > label.check { display: flex; align-items: center; gap: 10px; }
.db-wizard .db-grant > label.check input { margin: 0; accent-color: var(--accent); }
.db-wizard .db-grant select { width: 9em; }
.db-wizard .db-grant select:disabled { opacity: .5; }
.db-wizard .db-connect caption { text-align: left; padding-bottom: 6px; }
.db-wizard .db-connect + button { margin-top: 10px; }
@media (max-width: 640px) { .db-wizard .choice-cards, .db-wizard .choice-cards.db-existing { grid-template-columns: 1fr; } }
.domain-wizard .sub-options { margin-left: 22px; padding-left: 14px; border-left: 2px solid var(--border); }

/* A row editor that may have no rows (Create Container's Storage): no bare header then. */
.row-editor[data-may-be-empty]:not(:has(tbody tr)) { display: none; }
/* A row editor's title with its Add button on the right, and the label
   that says there are no rows (shown while the table has none). */
.rows-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 10px; }
.rows-head .install-section { margin: 0; }
.rows-empty { margin: 4px 0 0; }
.row-editor:has(tbody tr) + .rows-empty { display: none; }
/* Create Container's Ports, Storage and Environment: the notes at the bottom of the page. */
.wizard-page.notes-bottom:not([hidden]) { display: flex; flex-direction: column; }
.page-notes { margin-top: auto; padding-top: 16px; }

/* Notifications: the notification center. */
.notify-text { margin: 2px 0 0; white-space: pre-line; font-size: var(--text-md); overflow-wrap: anywhere; }
.notify-center td:first-child { white-space: nowrap; }
.notify-center td .dot { margin-right: 6px; vertical-align: middle; }
.notify-center .pill.running { margin-left: 6px; }
/* A notification shows its subject and first line; the row opens a detail
   row with the whole text (notifycenter.js). */
.notify-row { cursor: pointer; }
.notify-row:hover > td { background: var(--hover, rgba(127,127,127,.06)); }
.notify-toggle { all: unset; cursor: pointer; display: block; max-width: calc(60ch + 22px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notify-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-sm, 4px); }
.notify-toggle::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; vertical-align: middle;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; }
.notify-toggle[aria-expanded="true"]::before { transform: rotate(45deg); }
.notify-brief { display: block; max-width: 60ch; margin: 2px 0 0 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-md); }
.notify-row[aria-expanded="true"] > td { border-bottom-color: transparent; }
.notify-detail > td { padding-top: 0; white-space: normal; }
.notify-detail .notify-text { max-width: min(100ch, calc(100vw - 120px)); box-sizing: border-box; margin: 0 0 8px 22px; padding: 10px 12px; background: var(--surface-2, rgba(127,127,127,.06)); border-radius: var(--radius-sm, 6px); }
.notify-detail .notify-meta { margin: 0 0 4px 22px; font-size: var(--text-sm); }
.notify-more { margin: 0; padding: 14px 18px; }
/* Why a disk can't be picked in a storage wizard: hover the mark. */
.storage-wizard .disk-why { flex: none; align-self: center; width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center;
  border: 1px solid var(--muted); color: var(--muted); font-size: var(--text-xs); font-weight: 700; line-height: 1; cursor: help; }
.storage-wizard .disk-why[hidden] { display: none; }

/* Object rows: an overview's things (websites, domains, DNS, mail), one
   card per row. Every row of a list shares the list's columns (--cols on
   .obj-rows), so the facts line up like a table; .obj-rows-head names
   them and sorts (sort.js). A row's name link covers the whole row
   (a.obj-link::after); its buttons sit above that. On a phone a row
   folds into a small card with the labels shown. */
.obj-rows { --cols: minmax(0, 2.4fr) repeat(3, minmax(0, 1fr)) 120px; display: grid; gap: 8px; }
.obj-rows-website { --cols: minmax(0, 2.4fr) repeat(3, minmax(0, 1fr)) 120px; }
.obj-rows-domains { --cols: minmax(0, 2fr) repeat(4, minmax(0, 1fr)) 90px; }
.obj-rows-dns { --cols: minmax(0, 2.2fr) repeat(3, minmax(0, .9fr)) 120px 110px; }
.obj-rows-maildomains { --cols: minmax(0, 2.4fr) repeat(3, minmax(0, 1fr)) 120px; }
.obj-rows-databases { --cols: minmax(0, 2.2fr) repeat(4, minmax(0, 1fr)) 0px 60px; }
.obj-rows-dbusers { --cols: minmax(0, 2.4fr) repeat(2, minmax(0, 1fr)) 0px 220px; }
.obj-rows-certs { --cols: minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, .7fr) 100px 110px; }
/* The Renewal column: the automatic renewal switch, then its state. */
.obj-renewal { display: flex; align-items: center; gap: 10px; min-width: 0; }
.obj-renewal form { display: contents; }
/* Used By's number: opens the list of what uses it (a .row-menu popover). */
.obj-uses { justify-self: start; padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--accent); cursor: pointer;
  text-decoration: underline dotted; text-underline-offset: 3px; }
.obj-uses.is-off { color: var(--muted); }
.row-menu a.row-menu-item { color: inherit; text-decoration: none; }
/* "Proxy" after a website's address: its / goes to a container. */
.proxy-pill { position: relative; z-index: 1; margin-left: 6px; vertical-align: 1px; text-decoration: none; }
.proxy-pill:hover { color: var(--accent); }
/* The rule a Proxy pill leads to (#rule-<domain><path>): selected. */
table.docker tr[id^="rule-"] { scroll-margin-top: 96px; }
table.docker tr[id^="rule-"]:target > td { background: color-mix(in srgb, var(--accent) 10%, transparent); }
table.docker tr[id^="rule-"]:target > td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.obj-rows-certsvc { --cols: minmax(0, 2.4fr) minmax(0, 1.2fr) minmax(0, 1fr) 130px 150px; }
.obj-rows-attention { --cols: minmax(0, 2.4fr) minmax(0, 1fr) 110px 200px; }
.obj-rows-mailboxes { --cols: minmax(0, 2.4fr) repeat(3, minmax(0, 1fr)) 120px 60px; }
.obj-rows-head, .obj-row { display: grid; grid-template-columns: var(--cols); align-items: center; column-gap: 16px; }
.obj-rows-head { padding: 0 18px 2px; font-size: var(--text-xs); font-weight: 600; }
.obj-rows-head > span { min-width: 0; }
.obj-rows-head .obj-col-end { text-align: right; }
.obj-row { margin: 0; padding: 12px 18px; min-height: 64px; color: inherit; transition: border-color .15s, box-shadow .15s; }
.obj-row:has(a.obj-link:hover) { border-color: var(--accent); box-shadow: 0 4px 14px color-mix(in srgb, var(--text) 9%, transparent); }
.obj-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.obj-title { flex: 1; min-width: 0; display: grid; gap: 2px; }
.obj-name { font-weight: 600; font-size: var(--text-lg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: inherit; text-decoration: none; }
a.obj-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
a.obj-link:hover, .obj-row:has(a.obj-link:hover) .obj-name { color: var(--accent); }
.obj-sub { font-size: var(--text-md); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.obj-row.is-off .obj-main .icon-tile, .obj-row.is-off .obj-name { opacity: .6; }
.obj-fact { min-width: 0; display: grid; gap: 1px; }
.obj-label { display: none; }
.obj-value { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.obj-value.is-ok { color: var(--ok); } .obj-value.is-warn { color: var(--warn); } .obj-value.is-bad { color: var(--bad); }
.obj-value.is-off { color: var(--muted); font-weight: 500; }
/* A fact that links to its part (Domains): above the row's own link. */
a.obj-fact-link { position: relative; z-index: 1; justify-self: start; max-width: 100%; margin: -4px -8px; padding: 4px 8px; border-radius: var(--radius-sm); color: inherit; text-decoration: none; }
a.obj-fact-link:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
a.obj-fact-link:hover .obj-value:not(.is-warn):not(.is-bad) { color: var(--accent); }
.obj-state { justify-self: end; }
.obj-actions { position: relative; z-index: 1; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.obj-actions form.run { margin: 0; }
.obj-links { display: flex; gap: 2px; margin-right: auto; }
.obj-links a { padding: 4px 8px; border-radius: var(--radius-sm); font-size: var(--text-md); font-weight: 500; color: var(--muted); text-decoration: none; }
.obj-links a:hover { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.obj-empty { padding: 16px 18px; }
/* A subdomain sits under its main domain (data-parent, --depth): only its
   name column is indented, its icon under the parent's name (icon 36px +
   gap 12px), so the facts stay aligned. Its
   line runs from the middle of the icon above (the parent's, or the
   previous subdomain's line; sort.js measures --up) into its own icon
   (it runs a few px under the icon, so it never stops short of it).
   The icons are opaque and above the line, so it seems to start at them. */
.obj-row[data-depth="2"] { --depth: 2; }
.obj-row[data-depth="3"] { --depth: 3; }
.obj-row[data-depth="4"] { --depth: 4; }
.obj-rows .obj-row .icon-tile { position: relative; z-index: 1; pointer-events: none; background: color-mix(in srgb, var(--state, var(--accent)) 14%, var(--surface)); }
.obj-row[data-parent] .obj-main { position: relative; padding-left: calc(var(--depth, 1) * 48px); }
.obj-row[data-parent] .obj-main::before { content: ""; position: absolute; left: calc((var(--depth, 1) - 1) * 48px + 17px); top: calc(50% - var(--up, 52px)); width: 35px; height: var(--up, 52px);
  border-left: 2px solid color-mix(in srgb, var(--text) 22%, transparent); border-bottom: 2px solid color-mix(in srgb, var(--text) 22%, transparent); border-bottom-left-radius: 8px; }

@media (max-width: 900px) {
  .obj-rows-head { display: none; }
  .obj-row { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 12px; padding: 14px 16px; }
  .obj-main { grid-column: 1 / -1; padding-right: 96px; }
  .obj-row:has(.obj-state:empty) .obj-main { padding-right: 0; }
  .obj-row[data-parent] .obj-main { padding-left: calc(var(--depth, 1) * 16px); }
  .obj-row[data-parent] .obj-main::before { left: calc(var(--depth, 1) * 16px - 12px); width: 16px; top: -6px; height: calc(50% + 6px); }
  .obj-state { position: absolute; top: 18px; right: 16px; }
  .obj-label { display: block; font-size: var(--text-xs); font-weight: 600; color: var(--muted); }
  .obj-value { white-space: normal; overflow-wrap: anywhere; }
  .obj-actions { grid-column: 1 / -1; justify-content: flex-start; padding-top: 10px; border-top: 1px solid var(--border); }
  .obj-actions:empty { display: none; }
  .obj-links { flex: 1; }
  .obj-rows-domains .obj-row { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .obj-rows-domains .obj-main { padding-right: 0; }
}

/* Dashboard: the categories that are fine, as one
   strip of small items; hover gives the category's note. */
.dash-fine { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.dash-fine-item { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text); text-decoration: none; font-weight: 500; font-size: var(--text-md); transition: border-color .15s; }
.dash-fine-item:hover { border-color: var(--accent); }
.dash-fine-item .icon-tile.sm { --state: var(--ok); }
.dash-fine-item:is(.is-off, .is-unknown, .is-checking) .icon-tile.sm { --state: var(--muted); }
.dash-fine-mark { width: 16px; height: 16px; fill: none; stroke: var(--ok); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* Setting rows ("setRows", setrows.go): one row per
   setting, its name and one line on the left, ONE control on the right
   that says what applies, and under it where that comes from. A row with
   the site's own value gets an accent mark on its left. */
.detail-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 2px 0 0; font-size: var(--text-xl); font-weight: 600; }
.set-card { padding: 0; }
.set-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 8px 32px; align-items: start; padding: 16px 22px; }
.set-row + .set-row { border-top: 1px solid var(--border); }
.set-row.is-changed::before { content: ""; position: absolute; inset: 10px auto 10px 0; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.set-text { min-width: 0; }
.set-name { display: inline-block; font-weight: 600; font-size: var(--text-body); }
.set-directive { margin-left: 8px; font-size: var(--text-sm); color: var(--muted); }
.set-desc { margin: 4px 0 0; color: var(--muted); font-size: var(--text-md); line-height: 1.5; max-width: 60ch; }
.set-control { min-width: 0; display: grid; gap: 6px; }
.set-control > select, .set-control > input, .set-control > textarea, .set-control .input-group { width: 100%; }
.set-control .input-group { display: flex; align-items: center; gap: 8px; }
.set-control .input-group input { flex: 1; min-width: 0; }
.set-control .input-suffix { flex: 0 0 58px; }
.set-control textarea { min-height: 62px; resize: vertical; }
.set-control-switch { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.set-value { color: var(--muted); font-size: var(--text-base); }
.set-source { margin: 0; font-size: var(--text-sm); color: var(--muted); }
.set-source a { color: inherit; }
.set-source [data-set-own] { color: var(--accent); font-weight: 500; }
.set-source .link-button { font-size: inherit; }
.set-list { margin: 0; font-size: var(--text-sm); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-list code { font-size: inherit; }
.set-check { font-size: var(--text-md); }
.set-fold > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
.set-fold > summary::-webkit-details-marker { display: none; }
.set-fold > summary::before { content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.set-fold[open] > summary::before { transform: rotate(45deg); }
/* The sticky Save bar takes the colour of what it sits in: the page, a card
   or an overlay (--save-bar-bg), so it never shows as a band of its own. */
form[data-save-form] > .save-bar { position: sticky; bottom: 0; padding: 12px 0; background: var(--save-bar-bg, var(--bg)); }
.card, dialog { --save-bar-bg: var(--surface); }
.set-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 24px; align-items: start; }
.set-split > aside { position: sticky; top: 16px; }
.set-preview pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--text-md); line-height: 1.6; }
.obj-rows-config { --cols: minmax(0, 1fr) 160px; }
.obj-code { font-size: var(--text-md); overflow-wrap: anywhere; }
.files-owner { white-space: nowrap; }
@media (max-width: 900px) {
  .set-row { grid-template-columns: minmax(0, 1fr); padding: 14px 16px; }
  .set-control-switch { justify-content: flex-start; }
  .set-split { grid-template-columns: minmax(0, 1fr); }
  .set-split > aside { position: static; }
}
.detail-row > .pill { justify-self: start; width: max-content; }

/* Website → <domain>: every tab's top card is the same height (icon, title,
   ONE line of text, three tiles), so the eye finds it at the same place. */
.top-card .detail-head { min-height: 56px; align-items: center; }
.top-card .detail-desc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-card .stat-tiles dd { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-rows-card { padding: 0 22px; }
.detail-rows-card .detail-rows { margin: 0; border-top: 0; }
.detail-rows-card .detail-row:last-child { border-bottom: 0; }
@media (max-width: 720px) {
  .top-card .detail-desc { white-space: normal; }
}
.dot.neutral { background: var(--border); }

.seg { display: flex; width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; gap: 2px; padding: 3px; margin-bottom: 26px; border-radius: 11px; background: color-mix(in srgb, var(--text) 7%, transparent); }
.seg::-webkit-scrollbar { display: none; }
.seg a { position: relative; flex: none; padding: 7px 18px; border-radius: 8px; color: var(--text); font-size: var(--text-md); font-weight: 500; text-decoration: none; white-space: nowrap; }
.seg a:hover { background: color-mix(in srgb, var(--surface) 55%, transparent); text-decoration: none; }
.seg a[aria-current="page"] { background: var(--surface); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 0 0 .5px rgba(0, 0, 0, .06); }
.seg-dot { position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.seg-dot.is-bad { background: var(--bad); }
.seg-small { margin-bottom: 0; }
.seg-small a { padding: 5px 14px; font-size: var(--text-base); }
.ap-status { font-size: var(--text-sm); white-space: nowrap; }
.ap-status:empty { display: none; }
.ap-status.is-busy { color: var(--muted); }
.ap-status.is-ok { color: var(--ok); }
.ap-status.is-ok::before { content: "✓ "; }
.ap-status.is-bad { color: var(--bad); white-space: normal; max-width: 260px; }
.ap-search { flex: 1 1 220px; margin: 0; }
.ap-search input { width: 100%; }
.ap-log { font-size: var(--text-sm); }
.ap-logline { display: flex; align-items: center; gap: 14px; padding: 9px 16px; }
.ap-logline + .ap-logline { border-top: 1px solid var(--border); }
.ap-code { flex: none; min-width: 46px; text-align: center; padding: 2px 8px; border-radius: var(--radius-pill); font-weight: 600; font-size: var(--text-xs); font-variant-numeric: tabular-nums;
  color: var(--state); background: color-mix(in srgb, var(--state) 13%, transparent); }
.ap-code.is-off { --state: var(--muted); }
.ap-logmain { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.ap-logreq { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-logreq b { font-weight: 600; }
.ap-logmeta { color: var(--muted); font-size: var(--text-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-logtime { flex: none; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; display: flex; flex-direction: column; font-size: var(--text-xs); }

@media (max-width: 720px) {
  .seg { width: 100%; }
  .ap-logline { flex-wrap: wrap; }
}

/* The m3 style (from the former Website mock-up 3, now the domain page),
   after an example the user liked: soft white cards with large radii and light shadows, an
   object card with a preview, tabs with icons and a blue underline, and per
   tab a tinted status banner above rows of features (icon, name, line,
   pill, button). Settings open in an overlay. */
.m3 { max-width: none; }
.m3-crumbs { display: flex; align-items: center; gap: 10px; margin: 2px 0 16px; color: var(--muted); font-size: var(--text-md); }
.m3-crumbs a { color: var(--muted); text-decoration: none; }
.m3-crumbs a:hover { color: var(--accent); }
.m3-crumbs span:last-child { color: var(--text); font-weight: 500; }
.m3-object { display: flex; align-items: center; gap: 24px; padding: 18px; margin-bottom: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .05); }
.m3-thumb { flex: none; position: relative; width: 150px; height: 96px; border-radius: 14px; overflow: hidden; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #5b8def 0%, #7b6cf6 55%, #b38cf5 100%); }
.m3-thumb.is-off { background: linear-gradient(135deg, #9aa3b2, #c4cad4); }
.m3-thumb.is-bad { background: linear-gradient(135deg, #e0645c, #f09a6a); }
.m3-thumb .icon { width: 34px; height: 34px; opacity: .95; color: #fff; }
.m3-thumb span { position: absolute; left: 10px; right: 10px; bottom: 7px; font-size: var(--text-xs); font-weight: 600; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* A settings page's hero: its menu icon, big, no box (the user,
   2026-11-21: the image box is for a website's own picture). */
.m3-logo { flex: none; display: grid; place-items: center; width: 72px; height: 72px; margin-left: 6px; color: var(--text); }
.m3-logo .icon { width: 60px; height: 60px; stroke-width: 1.4; }
.m3-logo.is-off { color: var(--muted); }
.m3-object-text { flex: 1 1 auto; min-width: 0; }
.m3-object-text h1, .m3-object-text h2.site-card-title { margin: 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: var(--text-3xl); font-weight: 700; letter-spacing: -.02em; overflow-wrap: anywhere; }
.m3-object-text p { margin: 8px 0 0; color: var(--muted); font-size: var(--text-md); display: flex; flex-wrap: wrap; gap: 4px 0; }
.m3-object-text p > * + *::before { content: "•"; margin: 0 10px; color: var(--border); }
.m3-object-text code { font-size: var(--text-sm); color: var(--muted); background: none; padding: 0; }
/* The Domains list: a domain page's card per website (siteHero). The whole
   card opens the page (sitecards.js) and morphs into its hero there. */
.site-cards { display: grid; gap: 14px; }
.site-cards .m3-object { margin-bottom: 0; }
.site-card { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.site-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.site-card-title a { color: inherit; text-decoration: none; }
.site-card-title a:hover { color: var(--accent); }
::view-transition-group(*.site) { animation-duration: 320ms; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
.m3-object-actions { flex: none; display: flex; align-items: center; gap: 10px; align-self: flex-start; }
.m3-object-actions form, .m3-switch form { margin: 0; }
.m3-switch { display: inline-flex; align-items: center; padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--radius-pill); }
.m3-more { width: 40px; padding-left: 0; padding-right: 0; justify-content: center; font-size: 18px; }
.m3 .row-menu a.row-menu-item { text-decoration: none; }
.m3 .row-menu form { margin: 0; }

.m3-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: var(--radius-pill); font-size: var(--text-base); font-weight: 600; white-space: nowrap; letter-spacing: 0;
  color: var(--state); background: color-mix(in srgb, var(--state) 13%, transparent); }
.m3-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.m3-pill.is-off { --state: var(--muted); }
.m3-pill.is-info { --state: var(--accent); }
.m3-object-text h1 .m3-pill { font-size: var(--text-md); }

/* Equal widths (the user, 2026-11-20): tabwidth.js gives every tab the
   widest one's width while they all fit, like the parts bar's equal items;
   otherwise each keeps its own, and the row scrolls on a phone. */
.m3-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 0 16px; padding: 0 2px; }
.m3-tabs::-webkit-scrollbar { display: none; }
.m3-tabs a { position: relative; flex: none; display: flex; justify-content: center; align-items: center; gap: 7px; white-space: nowrap; padding: 7px 12px 9px; border-radius: 10px;
  color: var(--text); font-size: var(--text-base); font-weight: 600; text-decoration: none; }
.m3-tabs a .icon { width: 15px; height: 15px; color: var(--muted); }
.m3-tabs a:hover { background: var(--hover); text-decoration: none; }
.m3-tabs a[aria-current="page"] { background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); }
.m3-tabs a[aria-current="page"] .icon { color: var(--accent); }
.m3-tabs a[aria-current="page"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; border-radius: 2px 2px 0 0; background: var(--accent); }
.m3-panel { padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .05); }

.m3-banner { display: flex; align-items: center; gap: 22px; padding: 20px 22px; margin-bottom: 22px; border-radius: 16px;
  background: linear-gradient(100deg, color-mix(in srgb, var(--state) 11%, var(--surface)) 0%, color-mix(in srgb, var(--state) 4%, var(--surface)) 100%); }
/* Nothing below it (PHP off, an empty tab): no gap on top of the panel's own padding. */
.m3-banner:last-child { margin-bottom: 0; }
.m3-banner.is-off { --state: var(--muted); }
.m3-banner > div { flex: 1 1 auto; min-width: 0; }
.m3-banner h2 { margin: 0; font-size: var(--text-xl); font-weight: 650; }
.m3-banner p { margin: 4px 0 0; color: var(--muted); }
.m3-banner form { margin: 0; }
.m3-banner-mark { flex: none; display: grid; place-items: center; width: 52px; height: 52px; margin: 12px; border-radius: 50%; color: #fff;
  background: var(--state); box-shadow: 0 0 0 12px color-mix(in srgb, var(--state) 16%, transparent), 0 6px 16px color-mix(in srgb, var(--state) 35%, transparent); }
.m3-banner-mark .icon { width: 26px; height: 26px; stroke-width: 2.2; color: #fff; }

.m3-rows { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.m3-row { display: flex; align-items: center; gap: 20px; padding: 18px 22px; }
.m3-row + .m3-row { border-top: 1px solid var(--border); }
.m3-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; color: var(--text); }
.m3-icon .icon { width: 26px; height: 26px; stroke-width: 1.6; }
.m3-row-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.m3-row-text strong { font-size: var(--text-lg); font-weight: 600; overflow-wrap: anywhere; }
.m3-row-text strong code { font-size: var(--text-md); }
.m3-row-text span { color: var(--muted); overflow-wrap: anywhere; }
.m3-row .m3-pill { max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.m3-go { flex: none; min-width: 124px; justify-content: space-between; }
.m3-go.button::after { content: "›"; margin-left: 12px; font-size: 18px; line-height: 1; color: var(--muted); }
span.m3-go { display: inline-flex; justify-content: flex-end; }
span.m3-go form { margin: 0; }
.m3-row .switch, .m3-switch .switch { width: 46px; height: 28px; }
.m3-row .switch span, .m3-switch .switch span { width: 22px; height: 22px; }
.m3-row .switch.on span, .m3-switch .switch.on span { left: 21px; }
.m3-row [data-ap-status], .m3-object-actions [data-ap-status], .m3-banner [data-ap-status] { font-size: var(--text-sm); color: var(--muted); }

.m3-logbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.m3-seg { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--hover); }
.m3-seg a { padding: 6px 14px; border-radius: 8px; color: var(--muted); font-weight: 500; text-decoration: none; }
.m3-seg a[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.m3 .ap-log .ap-logline { padding: 12px 20px; }
.m3-foot { margin: 10px 4px 0; color: var(--muted); font-size: var(--text-sm); }
.m3-empty { color: var(--muted); text-align: center; padding: 34px 0; }
/* The add row under a list on the domain page (Email Addresses). */
.m3-rows + .m3-add-row { margin-top: 12px; }
.m3-add-row { padding: 16px 22px; border-radius: 16px; }

.m3-files .files-head { margin-top: 0; }

dialog.m3-dialog { width: min(720px, calc(100vw - 32px)); height: min(760px, calc(100vh - 32px)); border-radius: 20px; }
dialog.m3-dialog-small { height: fit-content; max-height: calc(100vh - 32px); }
dialog.m3-dialog-small > form, dialog.m3-dialog-small .wizard-page { flex: 0 1 auto; }
dialog.m3-dialog-small .wizard-page { display: grid; gap: 10px; align-content: start; }
.m3-dialog .wizard-page .set-card { margin-bottom: 4px; }
.m3-dialog .wizard-foot { border-top: 1px solid var(--border); justify-content: flex-end; }
.m3-dialog-status { margin-right: auto; font-size: var(--text-sm); color: var(--muted); }
.m3-dialog-status.is-ok { color: var(--ok); }
.m3-dialog-status.is-bad { color: var(--bad); }
.m3-dialog .set-row.is-focus { background: color-mix(in srgb, var(--accent) 9%, transparent); transition: background .4s; }

@media (max-width: 860px) {
  .m3-object { flex-wrap: wrap; gap: 16px; }
  .m3-thumb { width: 100%; height: 72px; }
  .m3-object-actions { width: 100%; }
  .m3-object-text h1 { font-size: var(--text-2xl); }
  .m3-panel { padding: 14px; }
  .m3-banner { flex-wrap: wrap; gap: 14px; padding: 16px; }
  .m3-banner-mark { width: 44px; height: 44px; margin: 8px; box-shadow: 0 0 0 8px color-mix(in srgb, var(--state) 16%, transparent); }
  .m3-row { flex-wrap: wrap; gap: 10px 14px; padding: 14px 16px; }
  .m3-row-text { flex-basis: calc(100% - 60px); }
  .m3-row .m3-pill { margin-left: 54px; }
  .m3-go { margin-left: auto; min-width: 0; }
  .m3-tabs a { padding: 12px 12px 11px; }
}
.m4 .m3-tabs a { position: relative; }
.m4 .m3-rows .m3-row { border-top: 1px solid var(--border); }
.m4 .m3-rows > .m3-row:first-child, .m4 .m3-rows > form:first-child > .m3-row:first-child { border-top: 0; }
.m4 .m3-rows > form { margin: 0; }
.m3-row.is-focus { background: color-mix(in srgb, var(--accent) 9%, transparent); transition: background .4s; }

/* Website → <domain> (website.html, in the m3 style): buttons centred in
   the object card; a banner may hold Configure and a switch side by side. */
.site .m3-object-actions { align-self: center; }
.m3-banner-actions { flex: none; display: flex; align-items: center; gap: 14px; }
/* Select Provider: the providers as cards, a switch each. */
.dns-host-cards { max-height: none; margin-top: 12px; }
.dns-host-cards .picker-result { cursor: default; padding: 12px 14px; }
.dns-host-cards .picker-result.is-disabled { opacity: 0.55; }
.dns-at { font-size: var(--text-sm); }
/* DNS tab: the records not published now, muted under the others. */
.section-title.dns-unpublished-title { margin-top: 28px; }
.dns-unpublished td { color: var(--muted); }
.dns-unpublished code { opacity: 0.8; }
.m3-row .m3-pill code { font-size: var(--text-sm); background: none; padding: 0; color: inherit; overflow: hidden; text-overflow: ellipsis; }

/* A job's page: Terminal | Changes (job.html, job.js). */
.job-tabs .tabs { margin-top: 12px; }
.job-tabs .tabs .count:empty { display: none; }
.job-change-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 14px; }
.job-change-pick label { font-weight: 600; }
.job-change-pick select { flex: 0 1 560px; min-width: 0; }
.job-changes .diff { max-height: 70vh; overflow: auto; }
.job-tabs .tabs .count { font-size: var(--text-sm); font-weight: 600; padding: 1px 8px; border-radius: var(--radius-pill); color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.lt-alert { display: flex; align-items: center; gap: 14px; padding: 12px 16px; margin: 0 0 16px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--state) 35%, transparent); background: color-mix(in srgb, var(--state) 8%, transparent); --state: var(--warn, #b7791f); }
.lt-alert.is-bad { --state: var(--bad, #c53030); }
.lt-alert.is-info { --state: var(--accent); }
.lt-alert > span { flex: 1 1 auto; min-width: 0; }
.lt-alert strong { color: var(--text); }
.lt-alert form { margin: 0; }
.lt-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
.lt-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.lt-chips a { padding: 5px 12px; border-radius: var(--radius-pill); border: 1px solid var(--border); color: var(--muted); text-decoration: none; font-size: var(--text-sm); }
.lt-chips a[aria-current] { background: var(--text); border-color: var(--text); color: var(--surface); }
.lt-chips a b { font-weight: 600; margin-left: 4px; }
.lt-table td.lt-content { max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lt-table td.lt-content code, .lt-table td code { background: none; padding: 0; font-size: var(--text-sm); }
@media (max-width: 700px) {
  .lt-alert { flex-wrap: wrap; }
}

/* The domain page (domain.html, domainpage.go): labelled switches in the domain's
   object card and banners, and a group heading. */
.rd-switch { gap: 8px; padding-left: 12px; font-size: var(--text-sm); color: var(--muted); white-space: nowrap; }
.rd .m3-object-actions { flex-wrap: wrap; justify-content: flex-end; }
.rd-group { margin: 24px 0 10px; font-size: var(--text-md); font-weight: 600; }
.rd .lt-table td.lt-content, .rd .lt-table td:nth-child(2) { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The domain's card (redesign): image, name, state and facts (the
   address opens the website), and on the right the main navigation: a
   horizontal bar of three items (Website, Mail, DNS), each its name with
   its state in words below. The current part is tinted, a part that needs
   attention gets its colour. Below 1180px (narrow window, tablet, phone) the bar goes under the name, full width. */
.rd-object { padding: 0; }
.rd-object-top { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 24px; padding: 18px; }
.rd-object .m3-object-actions { align-self: center; }
.rd-visit { color: var(--text); text-decoration: none; font-weight: 500; }
.rd-visit:hover { color: var(--accent); }
.rd-parts { flex: none; display: flex; gap: 4px; padding-left: 18px; border-left: 1px solid var(--border); }
.rd-parts a { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 8px; row-gap: 3px;
  width: 150px; padding: 9px 12px 11px; border-radius: 12px; color: var(--text); text-decoration: none; }
.rd-parts a:hover { background: var(--hover); text-decoration: none; }
.rd-parts a[aria-current="page"] { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.rd-parts a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
.rd-parts a[aria-current="page"] strong, .rd-parts a[aria-current="page"] .rd-part-icon { color: var(--accent); }
.rd-part-icon { display: grid; place-items: center; color: var(--muted); }
.rd-part-icon .icon { width: 17px; height: 17px; }
.rd-part-text { display: contents; }
.rd-part-text strong { font-size: var(--text-md); font-weight: 600; }
.rd-part-text > span { grid-column: 1 / -1; min-width: 0; color: var(--muted); font-size: var(--text-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-parts a.is-warn .rd-part-text > span { color: var(--warn, #b7791f); }
.rd-parts a.is-bad .rd-part-text > span { color: var(--bad, #c53030); }
.rd .m3-object { margin-top: 4px; }
/* Mail and Website Configuration cards: "Spam Protection" on one line. */
.config-parts a { width: auto; min-width: 150px; }
.config-parts .rd-part-text strong { white-space: nowrap; }
@media (max-width: 1180px) {
  .rd-object-top { flex-wrap: wrap; gap: 14px; }
  .rd-parts { flex: 1 1 100%; order: 3; padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--border); }
  .rd-parts a { flex: 1 1 0; width: auto; min-width: 0; }
  .rd-part-text > span { white-space: normal; }
}

/* A file as text (Templates, Fail2Ban): plain
   code, never the dark terminal look. Only job logs, Docker and Logs →
   Services (systemctl status) show a terminal (the user, 2026-11-18). */
pre.code-view {
  background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; margin: 0 0 10px; max-height: 60vh; overflow: auto;
  white-space: pre-wrap; word-break: break-word; line-height: 1.45;
}
pre.code-view:empty { display: none; }

/* Domains list: each row is the domain page's card in small — thumb,
   name, address, and the parts bar's items as the columns. */
.dm-rows { --cols: minmax(0, 2.2fr) repeat(3, minmax(0, 1fr)) 90px 90px; }
/* Website and Mail: a dot and text in the state's colour (green = on and
   fine, orange, red, grey = off). */
.dm-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: 1px; }
.dm-part.has-dot.is-ok .rd-part-text > span, .rd-parts a.has-dot.is-ok .rd-part-text > span { color: var(--ok); }
.dm-part.has-dot.is-off .rd-part-text > span, .rd-parts a.has-dot.is-off .rd-part-text > span { color: var(--muted); opacity: 1; }
.dm-size { min-width: 0; text-align: right; font-variant-numeric: tabular-nums; }
.dm-size .obj-label { display: none; }
.dm-row { padding: 10px 18px; }
.dm-thumb { width: 52px; height: 52px; border-radius: 12px; }
.dm-thumb .icon { width: 22px; height: 22px; }
.dm-visit { position: relative; z-index: 1; }
.dm-part { position: relative; z-index: 1; min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center;
  column-gap: 8px; row-gap: 3px; margin: -6px -10px; padding: 7px 10px 8px; border-radius: 12px; color: var(--text); text-decoration: none; }
.dm-part:hover { background: var(--hover); text-decoration: none; }
.dm-part .rd-part-text > span { grid-column: 1 / -1; min-width: 0; color: var(--muted); font-size: var(--text-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-part.is-warn .rd-part-text > span { color: var(--warn, #b7791f); }
.dm-part.is-bad .rd-part-text > span { color: var(--bad, #c53030); }
.dm-part.is-off .rd-part-text > span { opacity: .8; }
.obj-row.is-off .dm-thumb { opacity: .6; }
/* Subdomains in the Domains list: the thumb is 52px + 12px gap, so each
   level is 64px; the line runs from the middle of the thumb above into
   this one's (a few px under it; the thumb is above the line). */
.dm-thumb { z-index: 1; }
.dm-rows .obj-row[data-parent] .obj-main { padding-left: calc(var(--depth, 1) * 64px); }
.dm-rows .obj-row[data-parent] .obj-main::before { left: calc((var(--depth, 1) - 1) * 64px + 25px); width: 43px; }
@media (max-width: 900px) {
  .dm-rows .obj-row { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
  .dm-size { grid-column: 1 / -1; display: flex; justify-content: space-between; text-align: left; padding-top: 8px; border-top: 1px solid var(--border); }
  .dm-size .obj-label { display: block; }
  .dm-part { margin: 0; padding: 6px 8px; }
  .dm-part .rd-part-text > span { white-space: normal; }
  .dm-rows .obj-row[data-parent] .obj-main { padding-left: calc(var(--depth, 1) * 20px); }
  .dm-rows .obj-row[data-parent] .obj-main::before { left: calc(var(--depth, 1) * 20px - 14px); width: 18px; top: -6px; height: calc(50% + 6px); }
}

/* Mail → Aliases: the list, and the Import overlay's check. */
.obj-rows-aliases { --cols: minmax(0, 2fr) minmax(0, 1.6fr) minmax(0, 1fr) 60px; }
.obj-rows-aliases .obj-row[hidden] { display: none; }
dialog.wizard.alias-import { width: min(760px, calc(100vw - 32px)); }
.alias-import-sum { margin: 0 0 10px; font-weight: 600; }
table.alias-import-lines td { vertical-align: top; overflow-wrap: break-word; }
/* Add Aliases (domain page): Type Aliases | Import a File, then the fields. */
.alias-import .alias-mode { grid-template-columns: 1fr 1fr; margin-bottom: 6px; }
.alias-import .wizard-option-wide { flex-direction: column; align-items: stretch; gap: 8px; }
.alias-import [data-mode][hidden] { display: none; }
@media (max-width: 560px) { .alias-import .alias-mode { grid-template-columns: 1fr; } }
/* The import/add check table is filled after the page has loaded, so it
   keeps no measured widths (data-cols-free). An address breaks only at its
   @ (the domain is one unbreakable piece) and only when it must. */
table.alias-import-lines { table-layout: auto; width: 100%; }
table.alias-import-lines td { overflow-wrap: normal; }
table.alias-import-lines .addr-domain { display: inline-block; }
@media (max-width: 560px) {
  /* Phones: one line = the alias, its mailbox under it, the result right. */
  table.alias-import-lines thead, table.alias-import-lines td:first-child { display: none; }
  table.alias-import-lines tr { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--border); }
  table.alias-import-lines td { padding: 0; border: 0; }
  table.alias-import-lines td:nth-child(2) { grid-column: 1; font-weight: 600; }
  table.alias-import-lines td:nth-child(3) { grid-column: 1; color: var(--muted); font-size: var(--text-sm); }
  table.alias-import-lines td:nth-child(3)::before { content: "→ "; }
  table.alias-import-lines td:last-child { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
}
/* Domain page → Email Addresses: the whole row opens the address. */
a.m3-row-link { color: inherit; text-decoration: none; }
a.m3-row-link:hover { background: color-mix(in srgb, var(--hover) 60%, transparent); }
a.m3-row-link:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
a.m3-row-link::after { content: "›"; flex: none; font-size: 20px; line-height: 1; color: var(--muted); }
.m3-rows > a.m3-row-link:first-child { border-top-left-radius: inherit; border-top-right-radius: inherit; }
.m3-rows > a.m3-row-link:last-child { border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }
/* The size pill: the size, and with a quota a thin bar of how full. */
.m3-pill.m3-size { flex-direction: column; align-items: stretch; gap: 5px; border-radius: 12px; min-width: 120px; }
.m3-pill.m3-size::before { display: none; }
.m3-size progress { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 4px; border: 0; border-radius: 2px; overflow: hidden; background: color-mix(in srgb, var(--muted) 25%, transparent); color: var(--accent); }
.m3-size progress::-webkit-progress-bar { background: color-mix(in srgb, var(--muted) 25%, transparent); }
.m3-size progress::-webkit-progress-value { background: var(--accent); border-radius: 2px; }
.m3-size progress::-moz-progress-bar { background: var(--accent); border-radius: 2px; }
.m3-size.is-filling progress::-webkit-progress-value { background: var(--warn); }
.m3-size.is-filling progress::-moz-progress-bar { background: var(--warn); }
.m3-size.is-full progress::-webkit-progress-value { background: var(--bad); }
.m3-size.is-full progress::-moz-progress-bar { background: var(--bad); }
.m3-pill.m3-count::before { display: none; }
@media (max-width: 700px) {
  a.m3-row-link .m3-count { margin-left: 54px; }
  a.m3-row-link .m3-size { margin-left: 0; }
  a.m3-row-link::after { display: none; }
}
/* An address's page: the auto response keeps its lines. */
.mb-reply-body { white-space: pre-line; }
.m3-dialog .wizard-option-wide { flex-direction: column; align-items: stretch; gap: 8px; }
/* A number with its unit in an overlay (quota, auto response interval). */
.wizard-option > .input-group { display: inline-flex; flex: none; flex-wrap: nowrap; gap: 8px; }
.wizard-option .input-group input[type=number] { width: 96px; }
.wizard-option .input-group select { min-width: 0; width: auto; }
/* The last thing in a tab's panel (overlays and scripts after it don't
   count) keeps no bottom margin: a banner alone sits as far from the
   panel's bottom as from its top. */
.m3-panel > :not(dialog, script):not(:has(~ :not(dialog, script))) { margin-bottom: 0; }
/* Clear sits on the left of an overlay's footer, apart from Cancel/Save. */
.wizard-foot .m3-clear { margin-right: auto; }

/* DNS Configuration → Template: one record per row, split into the same
   columns on every row (type, name, value, state) under a
   header line; rows not published now muted. Stacked on narrow screens. */
.dns-tpl-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) minmax(0, 1.6fr) 128px; align-items: center; gap: 16px; padding: 14px 20px; }
.dns-tpl-row + .dns-tpl-row { border-top: 1px solid var(--border); }
.dns-tpl-head { padding-block: 10px; font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); background: var(--hover); }
.dns-tpl-type { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.02em; }
.dns-tpl-row:not(.dns-tpl-head) .dns-tpl-type { display: grid; place-items: center; height: 30px; border-radius: 8px; background: var(--hover); }
.dns-tpl-name, .dns-tpl-value { font-size: var(--text-sm); overflow-wrap: anywhere; }
.dns-tpl-name { font-weight: 600; }
.dns-tpl-value { color: var(--muted); }
/* The state pill is a button: it opens why the record is (not) published. */
.dns-tpl-row .m3-pill { justify-self: start; }
button.dns-tpl-state { display: inline-flex; align-items: center; gap: 6px; border: 0; font: inherit; cursor: pointer; }
button.dns-tpl-state .icon { width: 15px; height: 15px; opacity: 0.7; }
button.dns-tpl-state:hover .icon, button.dns-tpl-state:focus-visible .icon { opacity: 1; }
button.dns-tpl-state:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* A tip (rowmenu.js): a small box of facts under the pill that opened it;
   a click elsewhere closes it. */
.tip { position: fixed; inset: auto; margin: 0; max-width: min(420px, calc(100vw - 16px)); padding: 10px 12px; text-align: left; white-space: normal;
  color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  font-size: var(--text-sm); font-weight: 400; line-height: 1.45; }
.tip strong { display: block; margin-bottom: 4px; }
.tip ul { margin: 0; padding-left: 18px; }
.tip p { margin: 6px 0 0; color: var(--muted); }
.tip code { overflow-wrap: anywhere; white-space: normal; }
.tip dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 0; }
.tip dt { color: var(--muted); }
.tip dd { margin: 0; overflow-wrap: anywhere; }
.tip-link { display: inline-block; margin-top: 8px; }
button.pill .icon { width: 12px; height: 12px; margin-left: 4px; vertical-align: -1px; }
.dns-tpl-off .dns-tpl-type, .dns-tpl-off .dns-tpl-name, .dns-tpl-off .dns-tpl-value { opacity: 0.55; }
@media (max-width: 860px) {
  .dns-tpl-head { display: none; }
  .dns-tpl-row { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 6px 14px; padding: 14px 16px; }
  .dns-tpl-row > :not(.dns-tpl-type):not(.m3-pill) { grid-column: 2 / 4; }
  .dns-tpl-row .dns-tpl-type { grid-row: 1 / 3; align-self: start; }
  .dns-tpl-row .m3-pill { grid-column: 3; grid-row: 1; }
  .dns-tpl-row .dns-tpl-name { grid-row: 1; grid-column: 2; }
}
.m3-row-text code.wrap { overflow-wrap: anywhere; }

/* The first setup (firstsetup.go): a card per choice, its additional
   choices as rows under it in the same box (not indented). */
/* /setup is a page of its own, full screen without the menu (the user:
   not an overlay on the Dashboard): one large panel in the middle. */
.setup-panel { width: min(820px, 100%); min-height: min(760px, calc(100vh - 48px)); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 16px 48px rgba(0, 0, 0, .12); }
.setup-head { padding: 36px 44px 4px; }
.setup-head .brand { margin: 0 0 22px; }
.setup-head h1 { margin: 0 0 6px; font-size: var(--text-2xl); font-weight: 650; letter-spacing: -.01em; }
.setup-head p.muted { margin: 0; }
.setup-panel .wizard-progress { margin: 22px 44px 4px; }
.setup-panel .wizard-page { flex: 1; padding: 20px 44px 12px; }
.setup-panel .wizard-foot { display: flex; align-items: center; gap: 8px; padding: 18px 44px 26px; border-top: 1px solid var(--border); }
.setup-panel .fs-error { margin: 4px 44px 0; }
@media (max-width: 640px) {
  .setup-head { padding: 26px 20px 4px; }
  .setup-panel .wizard-progress { margin: 18px 20px 4px; }
  .setup-panel .wizard-page { padding: 16px 20px 10px; }
  .setup-panel .wizard-foot { padding: 14px 20px 20px; flex-wrap: wrap; }
  .setup-panel .fs-error { margin: 4px 20px 0; }
}
.fs-intro { margin: 0 0 14px; }
.fs-cards { display: grid; gap: 12px; padding-bottom: 8px; }
.fs-group { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface); }
.fs-group > .fs-card { border: 0; border-radius: 0; padding: 14px 16px; cursor: default; background: none; }
.fs-group > .fs-card:hover { background: none; }
.fs-desc { white-space: normal; }
.fs-sub { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--border); }
.fs-sub.is-off { color: var(--muted); }
.fs-dns .wizard-option { padding: 0 16px 14px; }
.fs-dns textarea { font-family: var(--mono, ui-monospace, monospace); font-size: var(--text-sm); }
.first-setup label.switch:has(input:disabled) { opacity: .5; cursor: not-allowed; }

/* Features & Software (features.html, featurepage.html):
   the Domains cards, with a feature's additional features as parts on the
   right, next to Install (or Installed, as wide), each part as wide as
   the others. Wide screens (where RAID's five fit beside the name): the cards
   share one grid (subgrid), logo | name | parts | button, so every card has
   the same columns and the height of the largest. */
.feature-cards { grid-template-columns: minmax(0, 1fr); grid-auto-rows: 1fr; }
.feature-card-v2 { display: grid; align-items: stretch; }
.feature-card-v2 .rd-part-text strong { white-space: nowrap; }
.feature-card-v2 .rd-parts:empty { display: none; }
/* Every part as wide as the widest ("Spam Protection"), on every card. */
.feature-card-v2 .rd-parts a { flex: none; width: 150px; min-width: 0; }
.feature-card-v2 .fc-action { display: inline-flex; align-items: center; width: 118px; height: 40px; padding: 0; justify-content: center; gap: 6px; }
.feature-card-v2 .fc-action.is-installed { color: var(--ok); opacity: 1; cursor: default; }
.feature-card-v2 .fc-action .icon { width: 16px; height: 16px; }
@media (min-width: 1620px) {
  .feature-cards, .feature-page .feature-card-v2 { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  .feature-cards > .feature-card-v2 { grid-column: 1 / -1; grid-template-columns: subgrid; }
  .feature-card-v2 .rd-object-top { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; column-gap: 18px; }
  /* A line on both sides of the parts: name | parts | button. */
  .feature-card-v2 .rd-parts { grid-column: 3; justify-self: end; gap: 2px; padding: 0 12px; border-right: 1px solid var(--border); }
  .feature-card-v2 .m3-object-actions { grid-column: 4; justify-self: end; }
  .feature-card-v2 .m3-object-text h2.site-card-title { font-size: var(--text-2xl); gap: 10px; }
}
/* Narrower: logo | name | button on top, the parts on a row under them,
   on the right. */
@media (max-width: 1619px) {
  .feature-card-v2 .rd-object-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto 1fr; align-items: start; gap: 14px 18px; }
  .feature-card-v2 .m3-object-actions { grid-column: 3; grid-row: 1; width: auto; align-self: start; }
  .feature-card-v2 .rd-parts { grid-column: 1 / -1; grid-row: 2; align-self: end; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px; padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--border); }
}
@media (max-width: 640px) {
  .feature-card-v2 .m3-logo { width: 40px; height: 40px; margin: 2px 0 0; }
  .feature-card-v2 .m3-logo .icon { width: 34px; height: 34px; }
  .feature-card-v2 .m3-object-text :is(h1, h2.site-card-title) { font-size: var(--text-2xl); }
  .feature-card-v2 .fc-action { width: 104px; }
  /* Phones: cards under each other, each its own height; the parts a
     list, one per line: icon, name, state. */
  .feature-cards { grid-auto-rows: auto; }
  .feature-card-v2 .rd-parts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
  .feature-card-v2 .rd-parts a { width: auto; grid-template-columns: auto minmax(0, 1fr) auto; padding: 8px; }
  .feature-card-v2 .rd-part-text > span { grid-column: 3; white-space: nowrap; }
}

/* A feature's overview (featurepage.html): its card with the parts as
   tabs, Packages | Dependencies (| Extensions) under it, then that tab. */
.fp-back { margin: 0 0 10px; }
.fp-back a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-size: var(--text-sm); }
.fp-back a:hover { color: var(--accent); }
.fp-back .icon { width: 15px; height: 15px; }
.feature-page .feature-card-v2 { margin: 0 0 18px; }
.fp-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.fp-head h2 { margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: var(--text-lg); }
.fp-head p { margin: 4px 0 0; }
.fp-count { margin: 0 0 10px; }
.fp-table { table-layout: fixed; width: 100%; }
.fp-col-ver { width: 34%; }
.fp-col-state { width: 130px; }
.fp-table code { background: none; padding: 0; color: var(--muted); font-size: var(--text-sm); overflow-wrap: anywhere; }
.fp-via { font-size: var(--text-sm); }
.fp-note { margin: 8px 0 0; font-size: var(--text-sm); }
/* Extensions: equal tiles, a switch each; the search field filters them. */
.fp-ext-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.fp-ext-bar .fp-count { margin: 0; }
.fp-ext-search { width: min(280px, 100%); }
.fp-ext-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.fp-ext { display: flex; align-items: center; gap: 12px; min-width: 0; height: 64px; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.fp-ext[hidden] { display: none; }
.fp-ext.is-on { border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); }
.fp-ext-text { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.fp-ext-text > span { font-size: var(--text-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-ext form { margin: 0; }
/* Packages | Dependencies | Extensions: every tab the same size (150px,
   as the parts in the card); on phones they share the row equally. */
.feature-page .m3-tabs a { flex: 0 0 150px; width: 150px; }
@media (max-width: 640px) {
  .feature-page .m3-tabs { overflow: visible; }
  .feature-page .m3-tabs a { flex: 1 1 0; width: auto; min-width: 0; padding-left: 6px; padding-right: 6px; font-size: var(--text-sm); }
  .feature-page .m3-tabs a .icon { display: none; }
}
/* Packages tab: the settings-style rows under the banner. */
.fp-rows .m3-pill { flex: none; }
/* Packages rows: name + description | version | state, the last two as
   columns of the same width in every row. */
.fp-rows .m3-row-text span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-version { flex: none; width: 210px; background: none; padding: 0; color: var(--muted); font-size: var(--text-sm); overflow-wrap: anywhere; }
.fp-state { flex: none; width: 130px; display: flex; justify-content: flex-end; }
.fp-rows .m3-row { flex-wrap: nowrap; }
.fp-rows .m3-row-text { flex: 1 1 0; }
@media (max-width: 1180px) {
  .fp-version { width: 160px; }
  .fp-state { width: 120px; }
}
.fp-dep-name { display: block; }
/* Dependencies: a second block of the same rows under the packages,
   hidden until "Show dependencies" (featuredeps.js). */
.fp-deps-show { width: 100%; margin-top: 12px; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.fp-deps-show strong { margin-right: 4px; }
.fp-divider { margin: 22px 0; border: 0; border-top: 1px solid var(--border); }
.fp-divider[hidden] { display: none; }
.fp-deps .fp-via { font-weight: 400; font-size: var(--text-sm); }
/* One line per name, so every row has one height (the hover says it all). */
.fp-deps .m3-row-text strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) {
  /* Phones: version and state always share the line under the name (a
     long version is cut), so every pill sits in the same place. */
  .fp-rows .fp-version { flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .fp-rows .fp-state { flex: none; }
  .fp-deps-show strong { display: block; margin: 0 0 2px; }
}
.fp-desc { display: block; font-size: var(--text-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) {
  .fp-rows .m3-row { flex-wrap: wrap; gap: 6px 14px; }
  .fp-rows .m3-row-text { flex: 1 1 calc(100% - 60px); }
  .fp-rows .m3-row-text { flex: 1 1 calc(100% - 60px); }
  .fp-version { width: auto; flex: 1 1 auto; margin-left: 54px; }
  .fp-state { width: auto; }
}
/* The Packages banner: icon | text | switch at every width, so every part's
   banner looks the same however long its text is. */
.feature-page .m3-banner { flex-wrap: nowrap; }
.feature-page .m3-banner > div { flex: 1 1 0; }
/* …and the same height on every part's page (text of one or two lines). */
.feature-page .m3-banner { min-height: 112px; }
/* An update: installed → newer version (bold). */
.fp-arrow { color: var(--muted); }
.fp-version strong, .fp-table code strong { color: var(--accent); font-weight: 600; }
/* The icon in Update and Installed takes the button's own text colour. */
.feature-card-v2 .fc-action .icon { color: currentColor; }

/* Firewall (firewall.html) in the Configuration pages'
   design. Every repeated piece has one size: the tabs (150px), the lock
   pills (130px; an empty slot where a rule has none), the Action pills
   (84px), the edit icon and the switch, so the rows line up. */
.fw-page .m3-tabs a { flex: 0 0 150px; width: 150px; }
.fw-count { margin-left: 2px; padding: 1px 7px; border-radius: 999px; font-size: var(--text-xs); font-weight: 600; background: color-mix(in srgb, var(--text) 8%, transparent); }
.fw-page .m3-tabs a[aria-current="page"] .fw-count { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.fw-lock { flex: none; width: 130px; }
button.m3-pill.fw-lock { display: inline-flex; align-items: center; justify-content: center; gap: 5px; box-sizing: border-box; border: 0; font: inherit; font-size: var(--text-sm); cursor: pointer; }
button.m3-pill.fw-lock:hover { color: var(--text); }
button.m3-pill.fw-lock .icon { width: 13px; height: 13px; flex: none; }
button.m3-pill.fw-lock::before { display: none; }
.fw-action { flex: none; width: 84px; display: flex; justify-content: center; }
.fw-page .fw-action .m3-pill { margin: 0; }
.fw-blank { visibility: hidden; }
/* General: every row has the same slots, a state pill (124px), a button
   (124px) and a switch (46px), empty where a row has none. */
.fw-state { flex: none; width: 124px; display: flex; justify-content: center; }
.fw-page .fw-state .m3-pill { margin: 0; white-space: nowrap; }
.fw-page .m3-pill::before { flex: none; }
.fw-go { flex: none; width: 124px; }
.fw-go form { margin: 0; }
.fw-go .m3-go { width: 100%; min-width: 0; box-sizing: border-box; }
.fw-general .fw-end { width: 46px; min-height: 42px; }
.fw-general + .section-title, .fw-page .section-title { margin: 22px 0 10px; }
.fw-end { flex: none; width: 46px; display: flex; justify-content: flex-end; margin: 0; }
.fw-rows .m3-row.is-closed .m3-icon, .fw-rows .m3-row.is-closed strong { opacity: .55; }
.fw-diff { padding: 0 22px 14px 82px; }
.fw-diff summary { cursor: pointer; color: var(--accent); font-weight: 500; margin-bottom: 8px; }
/* A tablet or narrow window: still one line per row, everything fits. */
@media (min-width: 641px) and (max-width: 860px) {
  .fw-page .m3-row { flex-wrap: nowrap; gap: 14px; }
  .fw-page .m3-row-text { flex-basis: auto; }
  .fw-page .m3-row .m3-pill { margin-left: 0; }
  .fw-general .m3-row { min-height: 101px; box-sizing: border-box; }
  /* Five tabs (Firewall) don't fit at 150px: they shrink alike, one size. */
  .fw-page .m3-tabs a { flex: 0 1 150px; width: auto; min-width: 0; padding-left: 6px; padding-right: 6px; }
  .fw-diff { padding-left: 16px; }
}
@media (max-width: 640px) {
  .fw-page .m3-tabs { overflow: visible; }
  .fw-page .m3-tabs a { flex: 1 1 0; width: auto; min-width: 0; padding-left: 0; padding-right: 0; font-size: var(--text-sm); letter-spacing: -0.02em; }
  .fw-page .m3-tabs a .icon, .fw-count { display: none; }
  .fw-page .m3-row > .fw-lock, .fw-page .m3-row > .fw-action:first-of-type, .fw-page .m3-row .fw-action .m3-pill { margin-left: 0; }
  .fw-page .m3-row > .fw-state { margin-left: 0; justify-content: flex-start; width: auto; flex: 1 1 0; min-width: 70px; }
  .fw-page .fw-state .m3-pill { max-width: 100%; }
  .fw-general .m3-row-text { flex: 1 0 calc(100% - 60px); }
  /* Three lines for every setting's text, so the rows are one height. */
  .fw-general .m3-row-text span { min-height: 4.5em; }
  .fw-go { width: 104px; }
  .fw-go .m3-go { justify-content: center; }
  .fw-go .m3-go.button::after { display: none; }
  .fw-rows .m3-row > .row-icon { margin-left: auto; }
  .fw-diff { padding-left: 16px; }
  .fw-lock { width: 32px; }
  button.m3-pill.fw-lock { padding: 0; height: 26px; }
  button.m3-pill.fw-lock span { display: none; }
}
/* Firewall → Trusted Addresses overlay: the list, then the add form. */
.fw-trusted { display: grid; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 6px; }
.fw-trusted-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 14px; }
.fw-trusted-row + .fw-trusted-row { border-top: 1px solid var(--border); }
/* One height whether a row has a button (Remove, Add) or not. */
.fw-trusted-row { min-height: 47px; box-sizing: border-box; }
.fw-trusted-row > span { min-width: 0; overflow-wrap: anywhere; }
.fw-trusted-row form { margin: 0; }
.fw-trusted-add { display: grid; gap: 10px; }
/* The browser's own address, offered while nothing covers it. */
.fw-trusted-offer { border-style: dashed; }
/* Settings (settings.html): the Firewall's rows and slots;
   overlay fields 220px like Fail2Ban's, the key full width, a template
   overlay scrolls its source. */
.sm-page .m3-dialog-small .wizard-option > :is(input:not([type=checkbox]):not([type=radio]),select,.input-group) { flex: 0 0 220px; width: 220px; box-sizing: border-box; }
.sm-page .m3-dialog-small .wizard-option > .input-group input { flex: 1 1 auto; min-width: 0; width: auto; }
.sm-page .wizard-option.sm-wide { flex-direction: column; align-items: stretch; gap: 8px; }
.sm-page .sm-wide textarea { width: 100%; font-family: var(--mono, monospace); font-size: var(--text-sm, 13px); }
.sm-template .wizard-page { overflow: auto; }
.sm-template .code-view { max-height: 360px; overflow: auto; }
.sm-note { margin: 14px 4px 0; font-size: var(--text-sm); }
.sm-list .m3-row-text > :is(span,strong) { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-list .m3-row-text { min-width: 0; }
/* Five parts: "Control Panel" stays on one line at tablet width. */
@media (min-width: 641px) and (max-width: 860px) {
  .sm-page .rd-parts a { padding-left: 8px; padding-right: 8px; }
  .sm-page .rd-part-text strong { white-space: nowrap; }
}
@media (max-width: 640px) {
  /* Five parts don't fit side by side: one per line, the second line
     moved to the right. */
  .sm-page .rd-parts { flex-direction: column; gap: 2px; }
  .sm-page .fw-state .m3-pill { padding-left: 9px; padding-right: 9px; }
  .sm-page .rd-parts a { flex: none; grid-template-columns: auto auto minmax(0, 1fr); padding: 10px 12px; }
  .sm-page .rd-part-text > span { grid-column: auto; text-align: right; white-space: nowrap; }
  .sm-page .rd-parts a[aria-current="page"]::after { left: 0; right: auto; top: 10px; bottom: 10px; width: 3px; height: auto; border-radius: 0 3px 3px 0; }
  .sm-page .m3-dialog-small .wizard-option:not(:has(> input[type=checkbox], > input[type=radio])) { flex-wrap: wrap; }
  .sm-page .m3-dialog-small .wizard-option > :is(input:not([type=checkbox]):not([type=radio]),select,.input-group) { flex: 1 1 100%; width: 100%; }
}

/* Fail2Ban (fail2ban.html) uses the Firewall's rows and slots; these are
   its own: the All On/Off bar under the jails, and a jail page's head
   (back, name, ports). */
.f2b-all { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.f2b-all form { margin: 0; }
.f2b-jail-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.f2b-jail-head h2 { margin: 0; font-size: var(--text-lg); }
/* The overlays' fields are one width: a number, an address, a choice and
   a number + unit alike; the whole width on phones. */
:is(#dlg-rule, #dlg-jail, #dlg-ban) .wizard-option > :is(input, select, .input-group) { flex: 0 0 220px; width: 220px; box-sizing: border-box; }
:is(#dlg-rule, #dlg-jail) .input-group input { flex: 1 1 0; min-width: 0; width: auto; }
:is(#dlg-rule, #dlg-jail) .input-group select { flex: 0 0 120px; min-width: 0; }
@media (max-width: 640px) {
  :is(#dlg-rule, #dlg-jail, #dlg-ban) .wizard-option { flex-wrap: wrap; }
  :is(#dlg-rule, #dlg-jail, #dlg-ban) .wizard-option > :is(input, select, .input-group) { flex: 1 1 100%; width: 100%; }
}
/* The firewall change banner: its two buttons together on the right. */
.fw-guard-actions { display: inline-flex; gap: 8px; margin-left: auto; }
.fw-guard-actions form { margin: 0; }

/* Docker (docker.html): the Firewall's rows and slots, plus a usage slot
   (CPU · memory, a size, …) of one width before the state. */
.dk-warn { color: var(--warn); }
.dk-add { margin-top: 12px; }
.dk-add > .m3-add-row { margin: 0; }
.dk-use { flex: none; width: 130px; text-align: right; font-size: var(--text-sm); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-page .dk-rows .m3-row-text { min-width: 0; flex: 1 1 0; }
.dk-rows .m3-row-text > :is(strong, span) { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
button.m3-pill.dk-pill-button { border: 0; font: inherit; font-size: var(--text-sm); cursor: pointer; }
.dk-add-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dk-page .m3-add-row { width: 100%; font: inherit; color: inherit; cursor: pointer; text-align: left; }
/* Tablets and phones: the usage slot gives its room to the name. */
@media (max-width: 860px) {
  .dk-use { display: none; }
  .dk-page .dk-rows .m3-row-text { flex: 1 1 0; }
}
@media (max-width: 640px) {
  .dk-rows .m3-row { column-gap: 8px; }
  .dk-page .dk-rows .m3-row-text { flex: 1 0 calc(100% - 60px); }
  .dk-page .dk-rows .m3-row > .fw-state { flex: none; width: 104px; min-width: 0; }
  .dk-rows .fw-end { margin-left: auto; }
  /* Every row has one empty icon slot (Restart or Delete): left out here, so
     the switch stays on the line. */
  .dk-rows .fw-blank { display: none; }
  .dk-rows .m3-row > .row-icon, .dk-rows .m3-row > form.run > .row-icon { margin-left: 0; }
  .dk-add-pair { grid-template-columns: 1fr; }
}

/* Storage (storage.html): Docker's rows (dk-*); a usage slot in a
   warning colour when it runs full, disks in a second line that rebuild
   or failed, the Create rows (live region "actions") under the list. */
.m3-rows[hidden] { display: none; }
.dk-run { color: var(--accent); }
.dk-bad { color: var(--bad); }
.st-page [data-live-region="actions"] > .m3-add-row, .st-page .m3-rows + .m3-add-row { margin-top: 12px; }
.st-page .m3-rows[hidden] + [data-live-region="actions"] > .m3-add-row { margin-top: 0; }
.m3-add-row:disabled { opacity: .55; cursor: not-allowed; }
.st-page .jobs-bar:empty { display: none; }
.dk-use.is-warn { color: var(--warn); }
.dk-use.is-bad { color: var(--bad); }
.st-page .section-title { margin: 22px 0 10px; }
/* Longer state words ("Syncing 42.0%", "Not Recoverable"): a wider slot;
   an array's ("Changing Level 42.0%") wider still. */
.st-page .fw-state { width: 150px; }
.st-page .st-arrays .fw-state { width: 190px; }
@media (max-width: 640px) {
  .st-page.dk-page .dk-rows .m3-row > .fw-state { width: 124px; }
  .st-page.dk-page .st-arrays .m3-row > .fw-state { width: 160px; }
}
/* Packages (packages.html): Docker's rows; a tick box in the icon tile of
   an update, Select All above them, the actions under them side by side. */
.pk-bar { display: flex; align-items: center; margin: 0 0 10px; padding: 0 4px; font-size: var(--text-sm); color: var(--muted); }
.pk-bar label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.pk-pick { cursor: pointer; }
.pk-pick input, .pk-bar input { width: 17px; height: 17px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.pk-add { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.pk-add form.run { display: block; margin: 0; }
.pk-add form.run > .m3-add-row { width: 100%; }
.pk-page .m3-panel > .dk-add:first-child { margin-top: 0; }
.pk-search { margin: 0 0 12px; }
.pk-search input { width: 100%; max-width: 420px; }
.pk-note { margin: 10px 4px 0; font-size: var(--text-sm); }
.pk-empty { margin: 0; }
.pk-rows .m3-row-text > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-rows .m3-row-text { min-width: 0; }
/* A new package has no Update button: its slot keeps the button's height
   on phones, where the buttons go on a line of their own. */
@media (max-width: 640px) {
  .pk-rows .m3-row > .fw-go:empty { min-height: var(--pk-go-h, 40px); }
}

/* The card's settings: an icon-only part after a divider at the end of
   the parts (Docker, Storage; the user, 2026-11-23: "like Example B").
   On phones, where parts are one per line, it reads "Settings". */
.rd-parts a.rd-part-gear { flex: none; width: 48px; margin-left: 9px; padding-left: 0; padding-right: 0; grid-template-columns: minmax(0, 1fr); justify-items: center; overflow: visible; }
.rd-parts a.rd-part-gear::before { content: ""; position: absolute; left: -7px; top: 8px; bottom: 8px; border-left: 1px solid var(--border); }
.rd-parts a.rd-part-gear .rd-part-icon .icon { width: 20px; height: 20px; }
.rd-parts a.rd-part-gear .rd-part-text strong { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rd-parts a.rd-part-gear[aria-current="page"]::after { left: 10px; right: 10px; }
@media (max-width: 1180px) {
  .rd-parts a.rd-part-gear { flex: 0 0 48px; }
}
@media (max-width: 640px) {
  .sm-page .rd-parts a.rd-part-gear { flex: none; width: auto; margin: 9px 0 0; padding: 10px 12px; grid-template-columns: auto auto minmax(0, 1fr); justify-items: start; }
  .sm-page .rd-parts a.rd-part-gear::before { left: 0; right: 0; top: -5px; bottom: auto; border-left: 0; border-top: 1px solid var(--border); }
  .sm-page .rd-parts a.rd-part-gear .rd-part-icon .icon { width: 17px; height: 17px; }
  .sm-page .rd-parts a.rd-part-gear .rd-part-text strong { position: static; width: auto; height: auto; clip: auto; }
  .sm-page .rd-parts a.rd-part-gear[aria-current="page"]::after { left: 0; right: auto; }
}

/* Scheduled tasks in the card design (tasks.html). */
.tk-rows .tk-name { color: inherit; text-decoration: none; }
.tk-rows .tk-name:hover { color: var(--accent); }
.tk-rows .m3-icon.is-bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.tk-rows .m3-row > .row-icon + .row-icon, .tk-rows .m3-row > .row-icon + a.row-icon { margin-left: 4px; }
.tk-custom { margin-top: 14px; }
.tk-page .m3-switch > .switch { flex: none; }
.tk-page .f2b-jail-head { margin-bottom: 14px; }

/* Logs in the card design (logs.html). */
.lg-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.lg-bar input[type=search] { flex: 1 1 240px; min-width: 0; }
.lg-bar .pager { display: flex; gap: 6px; }
.lg-live { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; }
.lg-rows .lg-name { color: inherit; text-decoration: none; }
.lg-rows .lg-name:hover { color: var(--accent); }
.lg-rows .m3-icon.is-bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, transparent); }
.lg-rows .m3-row > .row-icon { margin-left: 8px; }
.lg-rows .m3-row[hidden] { display: none; }
.lg-note { margin: 12px 2px 0; font-size: var(--text-md); }
.lg-empty { margin: 0; }
.lg-banner { margin-bottom: 14px; }
.lg-lines { border: 1px solid var(--border); border-radius: var(--radius-lg); }
.lg-lines table.data { margin: 0; }
.lg-status pre.terminal { margin: 0; max-height: 60vh; overflow: auto; }

/* Docker → Containers: a container with limits shows use / limit on two
   lines; at 90% of a limit that line is orange. */
.dk-use.dk-limits { width: 150px; line-height: 1.3; }
.dk-use.dk-limits > span { display: block; overflow: hidden; text-overflow: ellipsis; }
.dk-use .at-limit { color: var(--warn); font-weight: 600; }
/* Create Stack → Limits: a row per service. */
.stack-limits td:first-child { font-weight: 600; }
.stack-limits select { width: 100%; }
/* Edit Container / Edit Stack: tabs under a hero, like the Docker page. */
dialog.tabbed .wizard-head h2, dialog.tabbed .wizard-progress { display: none; }
.dk-edit-hero { display: flex; align-items: center; gap: 14px; min-width: 0; padding-right: 36px; }
.dk-edit-hero .m3-logo { width: 48px; height: 48px; margin: 0; }
.dk-edit-hero .m3-logo .icon { width: 40px; height: 40px; }
.dk-edit-hero .m3-logo:not(.is-off) { color: var(--text); }
.dk-edit-hero .m3-object-text { min-width: 0; }
.dk-edit-hero h1 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: var(--text-xl); font-weight: 650; overflow-wrap: anywhere; }
.dk-edit-hero p { margin: 2px 0 0; color: var(--muted); font-size: var(--text-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wizard-tabs { margin: 14px 24px 0; }
.wizard-tabs a.is-invalid::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--bad); }
.wizard-tab-error { margin: 0 24px 8px; }
.wizard-tabs a[aria-disabled="true"] { opacity: .4; cursor: default; pointer-events: none; }
.dk-edit-hero p:empty { display: none; }

/* MOCK-UP: Features & Software in the card design (featuresmock.html). */
/* The five features in the hero, right of the name like Packages' parts,
   all the same width (130px); below 1500px they take the row under the
   name. */
.fx-page .m3-object-text h1 { white-space: nowrap; }
.fx-page .rd-object-top { gap: 14px; }
.fx-page .rd-parts { gap: 2px; padding-left: 14px; }
.fx-page .rd-parts a { flex: none; width: 130px; min-width: 0; padding-left: 10px; padding-right: 10px; }
@media (max-width: 1499px) {
  .fx-page .rd-object-top { flex-wrap: wrap; }
  .fx-page .rd-parts { flex: 1 1 100%; order: 3; padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--border); }
  .fx-page .rd-parts a { flex: 1 1 0; width: auto; }
}
.fx-page .rd-parts a.is-ok .rd-part-text > span { color: var(--ok); }
.fx-page .rd-parts a.is-info .rd-part-text > span { color: var(--accent); }
.fx-page .rd-part-text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-page .m3-banner { margin-bottom: 14px; }
.m3-banner.is-info { --state: var(--accent); }
.fx-page .m3-banner-actions .button { min-width: 118px; justify-content: center; }
.fx-rows .fx-ver { width: 190px; font-family: var(--mono, ui-monospace, monospace); }
.fx-rows .fw-state { width: 150px; display: flex; justify-content: flex-end; }
.fx-more { margin-top: 14px; }
.fx-note { margin: 8px 2px 0; font-size: var(--text-sm); }
.fx-dialog { width: min(860px, calc(100vw - 32px)); }
.fx-dialog .wizard-page { max-height: 65vh; overflow: auto; }
.fx-dialog .fp-col-state { width: 160px; }
/* Tabs: icon, name and state dot. "Spam Protection" needs ~182px, so
   every tab here is that wide (one size); on phones the dot sits in the
   tab's corner. */
.fx-page .m3-tabs .dot { flex: none; }
@media (min-width: 641px) {
  .fx-page .m3-tabs a { flex: 0 0 190px; width: 190px; }
}
@media (max-width: 640px) {
  .fx-page .m3-tabs a .dot { position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; }
}
