/* NAS backups: a quiet, dense operations page. Color is reserved for status,
   drawn from the vocabulary of a NAS front panel: green, amber and red LEDs. */

:root {
  --paper: #f3f5f7;
  --surface: #ffffff;
  --ink: #18212e;
  --muted: #5d6a7c;
  --rule: #d7dde5;
  --link: #1d5aa3;
  --good: #2c9a58;
  --warn: #c98200;
  --bad: #c9352c;
  --info: #6d7f96;
  --none: #e3e7ec;
  --radius-s: 3px;
  --radius-m: 6px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --step--1: 0.8125rem;
  --step-0: 0.9375rem;
  --step-1: 1.125rem;
  --step-2: 1.5rem;
}

* { box-sizing: border-box; }
html { font-size: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: var(--step-0)/1.5 var(--font);
  font-variant-numeric: tabular-nums;
  display: flex; flex-direction: column; min-height: 100vh;
}
body > main { flex: 1 0 auto; width: 100%; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
h1 { font-size: var(--step-2); line-height: 1.2; font-weight: 600; margin: 0 0 0.25rem; letter-spacing: -0.01em; }
h2 { font-size: var(--step-1); line-height: 1.3; font-weight: 600; margin: 2rem 0 0.75rem; }
p { margin: 0 0 0.75rem; max-width: 72ch; }
code { font-size: 0.95em; background: var(--none); padding: 0.05em 0.35em; border-radius: var(--radius-s); }
.muted { color: var(--muted); }
.small { font-size: var(--step--1); }
.strong { font-weight: 600; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* The status light */
.led {
  display: inline-block; width: 0.625rem; height: 0.625rem; border-radius: 50%;
  background: var(--info); vertical-align: 0.05em; margin-right: 0.5rem; flex: none;
}
.led-good { background: var(--good); }
.led-warning { background: var(--warn); }
.led-critical { background: var(--bad); box-shadow: 0 0 0 3px rgba(201, 53, 44, 0.18); }
.led-info { background: var(--info); }
.with-led { display: flex; align-items: center; }
.with-led .led { width: 0.75rem; height: 0.75rem; margin-right: 0.625rem; }

/* Top bar */
.topbar {
  display: flex; align-items: center; gap: 2rem;
  padding: 0 1.5rem; height: 3.25rem;
  background: var(--ink); color: #fff;
}
.topbar a { color: #fff; }
.brand { font-weight: 600; display: flex; align-items: center; white-space: nowrap; }
.mainnav { display: flex; gap: 0.25rem; height: 100%; }
.mainnav a {
  display: flex; align-items: center; padding: 0 0.875rem; color: #c9d2de;
  border-bottom: 3px solid transparent; border-top: 3px solid transparent;
}
.mainnav a:hover { color: #fff; text-decoration: none; }
.mainnav a[aria-current="page"] { color: #fff; border-bottom-color: #fff; }
.me { margin-left: auto; display: flex; align-items: center; gap: 1rem; font-size: var(--step--1); }
.me form { margin: 0; }
.linkish { background: none; border: 0; color: #c9d2de; padding: 0; font: inherit; cursor: pointer; }
.linkish:hover { color: #fff; }

/* Page */
.page { max-width: 1240px; margin: 0 auto; padding: 1.75rem 1.5rem 3rem; }
.pagehead { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.pagehead p { margin: 0; }
.fleet { color: var(--muted); display: flex; align-items: center; }
.crumbs { font-size: var(--step--1); color: var(--muted); margin-bottom: 0.5rem; }
.lede { color: var(--muted); margin-bottom: 1.25rem; }
.foot { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 1.5rem; color: var(--muted); font-size: var(--step--1); }

/* The footer on every page */
.sitefoot {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-top: 40px; padding: 18px 1rem 26px; border-top: 1px solid var(--rule);
  color: var(--muted); font-size: 15px; letter-spacing: 0.01em; line-height: 1.4;
}
.sitefoot .footgroup { display: flex; align-items: center; gap: 12px; }
.sitefoot em { font-style: italic; white-space: nowrap; }
.sitefoot .star { color: #000; font-size: 11px; line-height: 1; }
.sitefoot .flag { display: block; flex: none; width: 30px; height: 16px; }
/* Phones: two lines don't fit at this size, so stack the three groups. */
@media (max-width: 639.98px) {
  .sitefoot { flex-direction: column; gap: 6px; }
}

.flash { padding: 0.625rem 0.875rem; border-radius: var(--radius-m); margin-bottom: 1rem; max-width: none; }
.flash-ok { background: #e6f3eb; color: #1d5e37; }
.flash-error { background: #fbe9e7; color: #8f241d; }
.callout { background: #fff8e6; border: 1px solid #ecd9a6; border-radius: var(--radius-m); padding: 1rem 1.125rem; margin-bottom: 1.5rem; }
.callout p:last-child { margin-bottom: 0; }
.secret { font-size: 1.05em; user-select: all; }

/* Tabs */
.tabs { display: flex; gap: 1.5rem; border-bottom: 1px solid var(--rule); margin-bottom: 0; }
.tabs a { padding: 0.5rem 0 0.625rem; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; display: flex; align-items: center; gap: 0.5rem; }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs a[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.count { font-size: var(--step--1); font-weight: 600; padding: 0 0.45rem; border-radius: 999px; color: #fff; }
.count-critical { background: var(--bad); }
.count-warning { background: var(--warn); }
.count-info { background: var(--info); }

/* Tables */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-m); }
.tabs + .table-wrap { border-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; vertical-align: top; padding: 0.625rem 0.875rem; border-bottom: 1px solid var(--rule); }
tbody tr:last-child td { border-bottom: 0; }
th { font-size: var(--step--1); font-weight: 600; color: var(--muted); background: #f8f9fb; white-space: nowrap; }
td.num, th.num { text-align: right; }
.w-led { width: 1.5rem; padding-right: 0; }
.w-led .led { margin: 0.45rem 0 0; }

.issues .problem { min-width: 18rem; }
.issues .title { font-weight: 600; color: var(--ink); }
.issues .details, .issues .note { margin: 0.2rem 0 0; color: var(--muted); font-size: var(--step--1); max-width: 70ch; }
.issues .note { color: var(--ink); }
.issues .note::before { content: "Note: "; font-weight: 600; }
.issues .where, .issues .since { white-space: nowrap; font-size: var(--step--1); }
.sev-critical td:first-child { box-shadow: inset 3px 0 0 var(--bad); }

.ticket { display: flex; align-items: center; gap: 0.375rem; margin: 0; white-space: nowrap; }
.ticket .hash { color: var(--muted); }
.ticket input { width: 6.5rem; }
.ticket a { font-size: var(--step--1); }

/* Forms */
input, select, textarea {
  font: inherit; color: inherit; background: #fff;
  border: 1px solid #b9c2ce; border-radius: var(--radius-s); padding: 0.35rem 0.5rem;
}
textarea { width: 100%; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--link); outline: 2px solid rgba(29, 90, 163, 0.2); outline-offset: 0; }
button {
  font: inherit; font-size: var(--step--1); font-weight: 600; cursor: pointer;
  border: 1px solid #b9c2ce; background: #fff; color: var(--ink);
  border-radius: var(--radius-s); padding: 0.35rem 0.75rem; white-space: nowrap;
}
button:hover { background: #eef1f5; }
button.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
button.primary:hover { background: #2a3547; }
.stack { display: flex; flex-direction: column; gap: 0.375rem; }
.stack label { font-weight: 600; font-size: var(--step--1); margin-top: 0.5rem; }
.stack label:first-of-type { margin-top: 0; }
.stack button { align-self: flex-start; margin-top: 0.75rem; }
.stack > div > button { margin-top: 0.75rem; }
.row { display: flex; gap: 0.75rem; align-items: center; }
form.inline { display: inline-flex; gap: 0.375rem; align-items: center; margin: 0 0.25rem 0.25rem 0; }
.actions { white-space: nowrap; }
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-m); padding: 1.125rem 1.25rem; margin-top: 1.5rem; }
.panel h2 { margin-top: 0; }
.narrow { max-width: 30rem; }
.closeform { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; }
.closeform .muted { font-size: var(--step--1); margin: 0; }
.settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1.25rem; }

/* Facts */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.75rem 1.5rem; margin: 0 0 1.5rem; }
.facts dt { font-size: var(--step--1); color: var(--muted); }
.facts dd { margin: 0; }
.result { display: inline-flex; align-items: center; white-space: nowrap; }

/* The history strip: fourteen days of results, like a row of drive-bay lights */
.strip { display: inline-grid; grid-template-columns: repeat(14, 0.8125rem); gap: 3px; vertical-align: middle; }
.strip .cell { height: 0.8125rem; border-radius: 2px; background: var(--none); }
.strip .cell.good { background: var(--good); }
.strip .cell.warn { background: var(--warn); }
.strip .cell.bad { background: var(--bad); }
.strip .cell.today { outline: 1.5px solid var(--ink); outline-offset: 1px; }
.strip.big { grid-template-columns: repeat(14, 1.375rem); gap: 4px; margin-bottom: 0.375rem; }
.strip.big .cell { height: 1.375rem; border-radius: 3px; }
.striplegend { font-size: var(--step--1); margin-bottom: 1.5rem; }
.w-strip { width: 1%; white-space: nowrap; }
.striphead { display: flex; justify-content: space-between; font-weight: 400; min-width: calc(14 * 0.8125rem + 13 * 3px); }

/* Customer page */
.nas { margin-top: 1.75rem; }
.nashead h2 { margin: 0 0 0.125rem; }
.nashead p { margin-bottom: 0.875rem; }
.volumes { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; margin-bottom: 0.875rem; }
.volume { display: flex; align-items: center; gap: 0.625rem; font-size: var(--step--1); }
.volume label { font-weight: 600; }
meter { width: 11rem; height: 0.75rem; }
.nasissues { list-style: none; padding: 0; margin: 0 0 0.875rem; }
.nasissues li { display: flex; align-items: center; gap: 0.25rem; padding: 0.15rem 0; }
.items tr.has-issue td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.retired { margin-top: 0.75rem; }
.retired summary { cursor: pointer; color: var(--muted); }
.retired ul { margin: 0.5rem 0 0; padding-left: 1.25rem; }
.retired li { margin-bottom: 0.25rem; }
tr.inactive td { color: var(--muted); }

.empty { background: var(--surface); border: 1px solid var(--rule); border-top: 0; border-radius: 0 0 var(--radius-m) var(--radius-m); padding: 2rem 1.25rem; }
.empty p:first-child { display: flex; align-items: center; font-weight: 600; font-size: var(--step-1); }
.pagehead + .empty { border-top: 1px solid var(--rule); border-radius: var(--radius-m); }

/* Sign-in pages */
.auth { display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.authbox { width: 100%; max-width: 23rem; }
.authbox.wide { max-width: 28rem; }
.page .authbox { max-width: 26rem; }
.authbox .brand { color: var(--ink); margin-bottom: 1.5rem; }
.authbox h1 { margin-bottom: 1rem; }
.authbox .stack button { align-self: stretch; padding: 0.55rem; font-size: var(--step-0); }
.code { font-size: 1.375rem; letter-spacing: 0.2em; text-align: center; }
.qr { background: #fff; display: inline-block; padding: 0.5rem; border: 1px solid var(--rule); border-radius: var(--radius-m); margin: 0.5rem 0 0.75rem; }
.qr svg { display: block; }

@media (max-width: 720px) {
  .topbar { gap: 1rem; padding: 0 1rem; overflow-x: auto; }
  .me a { display: none; }
  .page { padding: 1.25rem 1rem 2.5rem; }
  th, td { padding: 0.5rem 0.625rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Adding a NAS */
.headlinks { display: flex; gap: 1.25rem; }
.button {
  display: inline-block; font-size: var(--step--1); font-weight: 600; border-radius: var(--radius-s);
  padding: 0.45rem 0.9rem; border: 1px solid #b9c2ce; background: #fff; color: var(--ink);
}
.button:hover { text-decoration: none; background: #eef1f5; }
.button.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.button.primary:hover { background: #2a3547; }
.scriptbar { display: flex; gap: 0.75rem; align-items: center; margin: 0 0 1.5rem; }
.scriptbar button { padding: 0.45rem 0.9rem; }
.steps { padding-left: 1.25rem; max-width: 72ch; }
.steps li { margin-bottom: 0.5rem; padding-left: 0.25rem; }
.scriptview { margin: 1.5rem 0; }
.scriptview summary { cursor: pointer; color: var(--muted); margin-bottom: 0.5rem; }
.scriptview textarea { font: 0.8125rem/1.45 Consolas, "Cascadia Mono", Menlo, monospace; background: #f8f9fb; }
.newscript { margin: 0; }
.linkbutton { background: none; border: 0; padding: 0; color: var(--link); font-weight: 400; font-size: var(--step--1); }
.linkbutton:hover { background: none; text-decoration: underline; }

/* Issues grouped by NAS, and snoozing */
.issues .grouphead th {
  background: #eef1f5; color: var(--ink); font-size: var(--step-0); font-weight: 600;
  padding-top: 0.55rem; padding-bottom: 0.55rem; border-top: 1px solid var(--rule);
}
.issues thead + .nasgroup .grouphead th { border-top: 0; }
.issues .grouphead a { color: var(--ink); }
.issues .grouphead .nasname { margin-left: 0.5rem; font-weight: 400; }
.issues .grouphead .nasname::before { content: "/ "; color: var(--muted); }
.issues .grouphead .muted { margin-left: 0.75rem; font-weight: 400; font-size: var(--step--1); }
.w-action { width: 1%; white-space: nowrap; }
.w-action form { margin: 0; }
.count-snoozed { background: var(--info); }
.nasissues li.snoozed a { color: var(--muted); }
.nasissues li .muted { margin-left: 0.375rem; font-size: var(--step--1); }

/* Collapsing a NAS's issues */
.grouptools { margin-left: auto; display: flex; gap: 1rem; align-items: center; padding-bottom: 0.25rem; }
.issues .grouphead { cursor: pointer; }
.issues .grouphead .led { margin-right: 0.375rem; }
.caret {
  background: none; border: 0; padding: 0.15rem 0.4rem; margin: 0 0.25rem 0 -0.4rem;
  color: var(--muted); cursor: pointer; line-height: 1; vertical-align: 0.05em;
}
.caret:hover { background: none; color: var(--ink); }
.caret::before {
  content: ""; display: inline-block; width: 0.45rem; height: 0.45rem;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-0.12rem) rotate(45deg); transition: transform 0.15s ease;
}
.nasgroup.collapsed .caret::before { transform: rotate(-45deg); }
.nasgroup.collapsed tr:not(.grouphead) { display: none; }
.tabs { flex-wrap: wrap; row-gap: 0; }
.tabs a, .count { white-space: nowrap; }

/* Shared folders */
.folders { margin-top: 0.875rem; }
.folders summary { cursor: pointer; color: var(--muted); margin-bottom: 0.5rem; }
.folders tr.unprotected td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.notneeded { display: flex; gap: 0.375rem; margin: 0; }
.notneeded input { width: 11rem; }
td.num { white-space: nowrap; }

/* Storage charts */
.charts { margin: 0.25rem 0 1rem; }
.charts summary { cursor: pointer; color: var(--muted); margin-bottom: 0.5rem; }
.chartgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr)); gap: 1rem; }
.chartcard { margin: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-m); padding: 0.75rem 0.875rem 0.5rem; }
.chartcard figcaption { font-size: var(--step--1); margin-bottom: 0.375rem; line-height: 1.45; }
.chart { width: 100%; height: auto; display: block; }
.chart .axis { stroke: var(--rule); stroke-width: 1; }
.chart .ceiling { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; }
.chart .area { fill: rgba(29, 90, 163, 0.10); }
.chart .line { fill: none; stroke: var(--link); stroke-width: 2; stroke-linejoin: round; }
.chart .dot { fill: var(--link); }
.chart .label { fill: var(--muted); font-size: 11px; }

/* After saving a form, the page comes back to the row that changed and highlights it */
tr[id], tbody[id] { scroll-margin-top: 4.5rem; }
tr:target td { background: #fff4d6; }
tbody:target .grouphead th { background: #fff4d6; }
/* Success messages float at the bottom of the screen for a few seconds, so
   they're seen even when the page scrolls to the row that changed. */
.flash-float {
  position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); z-index: 5;
  width: max-content; max-width: min(40rem, calc(100% - 2rem));
  box-shadow: 0 4px 16px rgba(24, 33, 46, 0.18); animation: flashfade 8s forwards;
}
@keyframes flashfade { 0%, 85% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .flash-float { animation: none; } }

/* C2 billing */
.navbadge { display: inline-block; min-width: 1.25rem; padding: 0 0.35rem; margin-left: 0.35rem; border-radius: 999px;
            background: var(--warn); color: #fff; font-size: 0.75rem; font-weight: 700; text-align: center; line-height: 1.25rem; }
.c2table td { vertical-align: middle; }
.c2table .led { margin-right: 0.4rem; }
.w-meter { white-space: nowrap; }
.w-meter meter { width: 8rem; vertical-align: middle; margin-right: 0.5rem; }
.c2-over td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.c2-alert td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.c2form { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: flex-end; margin: 0.25rem 0 0.75rem; }
.c2form .field { display: flex; flex-direction: column; gap: 0.3rem; }
.c2form label { font-weight: 600; font-size: var(--step--1); }
.c2form .row { gap: 0.375rem; }
.table-wrap + p { margin-top: 0.75rem; }

/* Renaming, moving and removing */
.settings-inline { margin: 0.25rem 0 0.75rem; }
.settings-inline summary { cursor: pointer; color: var(--link); font-size: var(--step--1); }
.settings-inline[open] { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-m); padding: 0.625rem 0.875rem; }
.settings-inline[open] summary { margin-bottom: 0.5rem; }
.inlineform { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0 0 0.625rem; }
.inlineform label { font-weight: 600; font-size: var(--step--1); min-width: 8.5rem; }
.inlineform input:not([type=hidden]) { width: 16rem; }
.nasactions { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; align-items: flex-start; }
.nasactions .settings-inline { margin: 0; }
.nasactions .settings-inline[open] { flex-basis: 100%; }
button.danger { color: var(--bad); border-color: #e3b3ae; }
button.danger:hover { background: #fbe9e7; }
.removedlist { list-style: none; padding: 0; margin: 0.5rem 0 0; }
.removedlist li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; padding: 0.35rem 0; }
section.nas { scroll-margin-top: 4.5rem; }
.nasactions { margin-bottom: 0.75rem; }

/* Collapsing a NAS on the customer page */
.nastitle { cursor: pointer; flex-wrap: wrap; row-gap: 0.25rem; }
.nastitle .caret { margin-right: 0.375rem; }
.nassummary { margin-left: 0.75rem; font-size: var(--step--1); font-weight: 400; color: var(--muted); }
section.nas.collapsed .nasbody { display: none; }
section.nas.collapsed { margin-top: 0.75rem; padding-bottom: 0.25rem; border-bottom: 1px solid var(--rule); }
section.nas .nashead p { margin-bottom: 0.875rem; }
.nastools { justify-content: flex-start; margin: 0 0 0.5rem; padding: 0; }
section.nas.collapsed .caret::before { transform: rotate(-45deg); }

/* "Closing won't make this go away" guidance on the issue page */
.guidance { background: #fff8e6; border: 1px solid #ecd9a6; border-radius: var(--radius-m); padding: 0.875rem 1.125rem; margin-top: 1.25rem; max-width: 60rem; }
.guidance p { margin-bottom: 0.375rem; }
.guidance ul { margin: 0; padding-left: 1.25rem; }
.guidance li { margin-bottom: 0.2rem; }
form[id]:target { outline: 2px solid var(--warn); outline-offset: 2px; }
form[id] { scroll-margin-top: 4.5rem; }
.unitsform { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; margin-top: 1.25rem; font-size: var(--step--1); }
.unitsform label { display: inline-flex; align-items: center; gap: 0.375rem; }

/* Monthly reports */
.monthpick { display: flex; align-items: center; gap: 0.5rem; margin: 0; }
.monthpick label { font-size: var(--step--1); font-weight: 600; }
.reportbar { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-bottom: 1.25rem; }
.reportbar .primary { margin-left: auto; padding: 0.45rem 1rem; }
.report { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-m); padding: 2rem 2.25rem; }
.rhead { border-bottom: 2px solid var(--ink); padding-bottom: 1rem; margin-bottom: 1.25rem; }
.rbrand { font-weight: 700; letter-spacing: 0.02em; color: var(--link); margin-bottom: 0.25rem; }
.rhead h1 { font-size: 1.75rem; margin-bottom: 0.25rem; }
.rsub { font-size: var(--step-1); font-weight: 600; margin-bottom: 0.25rem; }
.rnote { background: #fff8e6; border: 1px solid #ecd9a6; border-radius: var(--radius-s); padding: 0.5rem 0.75rem; }
.rheadline { font-size: var(--step-1); font-weight: 600; margin-bottom: 0.75rem; }
.rstats { display: flex; flex-wrap: wrap; gap: 0.75rem 2.5rem; margin: 0 0 1.5rem; }
.rstats dt { font-size: var(--step--1); color: var(--muted); }
.rstats dd { margin: 0; font-size: 1.375rem; font-weight: 600; }
.rnotes { border-left: 3px solid var(--link); padding-left: 0.875rem; margin-bottom: 1.25rem; }
.rnotes h2 { margin: 0 0 0.25rem; font-size: var(--step-0); }
.rnotes p { white-space: pre-line; }
.rnas { margin-top: 1.75rem; }
.rnas h2 { margin: 0 0 0.125rem; }
.rstorage p { margin-bottom: 0.25rem; font-size: var(--step--1); }
.rtable { margin-top: 0.75rem; border: 1px solid var(--rule); }
.rtable th, .rtable td { padding: 0.4rem 0.6rem; }
.w-month { width: 1%; white-space: nowrap; }
.monthstrip, .monthhead { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 0.6rem; gap: 2px; }
.monthhead span { font-size: 0.625rem; font-weight: 400; text-align: left; overflow: visible; }
.monthstrip .cell, .rlegend .cell { display: inline-block; width: 0.6rem; height: 0.8rem; border-radius: 2px; background: var(--none); }
.rlegend .cell { vertical-align: -0.1rem; margin: 0 0.25rem 0 0.75rem; }
.rlegend .cell:first-child { margin-left: 0; }
.cell.good { background: var(--good); }
.cell.warn { background: var(--warn); }
.cell.bad { background: var(--bad); }
.rissues { margin-top: 1.75rem; }
.rfoot { margin-top: 2rem; border-top: 1px solid var(--rule); padding-top: 0.75rem; font-size: var(--step--1); color: var(--muted); }

@media print {
  @page { margin: 14mm; }
  body { background: #fff; font-size: 10.5pt; display: block; min-height: 0; }
  .topbar, .foot, .sitefoot, .noprint, .flash, .flash-float { display: none !important; }
  .page { max-width: none; padding: 0; }
  .report { border: 0; padding: 0; }
  .rnas, .rissues { break-inside: auto; }
  .rtable tr { break-inside: avoid; }
  .rnas h2, .rissues h2 { break-after: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Help page */
.helplayout { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 2rem; align-items: start; }
.helptoc { position: sticky; top: 1rem; display: flex; flex-direction: column; gap: 0.35rem; font-size: var(--step--1); }
.helpbody { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-m); padding: 0.5rem 1.75rem 1.5rem; max-width: 52rem; }
.helpbody section { scroll-margin-top: 1rem; }
.helpbody h2 { margin-top: 1.5rem; }
.helpbody ul, .helpbody ol { padding-left: 1.25rem; }
.helpbody li { margin-bottom: 0.45rem; }
.helpdefs dt { font-weight: 600; margin-top: 0.75rem; }
.helpdefs dd { margin: 0.15rem 0 0; color: var(--ink); }
/* Nothing to see here. */
a.egg, a.egg:hover { color: inherit; text-decoration: none; cursor: text; }
@media (max-width: 720px) { .helplayout { grid-template-columns: 1fr; } .helptoc { position: static; } }
.gracefields { gap: 0.5rem; align-items: center; }
.gracefields label { margin: 0 0 0 0.5rem; }
.gracefields label:first-child { margin-left: 0; }
.gracefields input { width: 4.5rem; }
.rowactions { display: flex; gap: 0.375rem; }
.rowactions form { margin: 0; }

/* Archived customer */
.archivedbanner { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; align-items: center; justify-content: space-between;
                  background: #eef1f5; border: 1px solid var(--rule); border-radius: var(--radius-m); padding: 0.75rem 1rem; margin-bottom: 1rem; }
.archivedbanner p { margin: 0; }
.archivedbanner form { margin: 0; }

/* Closed issues on the customer page */
.closedissues { margin-top: 2rem; }
.closedissues summary { cursor: pointer; font-weight: 600; font-size: var(--step-1); margin-bottom: 0.75rem; }
.nowrap { white-space: nowrap; }
.closedcol { min-width: 11rem; }

/* DSM update available */
:root { --update: #2f7fd8; }
.led-update { background: var(--update); }
.count-update { background: var(--update); }

/* One Click logo in the top bar and on the sign-in page. The white chip keeps
   any logo colors readable on the dark bar. */
.brandchip { display: inline-flex; align-items: center; background: #fff; border-radius: 6px; padding: 4px 10px; }
.brandlogo { display: block; height: 28px; width: auto; max-width: 180px; }
.authbox .brandchip { padding: 0; background: transparent; }
.authbox .brandlogo { height: 44px; max-width: 240px; }

/* Chart hover readout and the enlarged view */
.chartcard[data-chart] { cursor: zoom-in; }
.chartcard[data-chart]:hover, .chartcard[data-chart]:focus-visible { border-color: var(--link); }
.chart .guide { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .hoverdot { fill: var(--link); stroke: #fff; stroke-width: 2; }
.chart .grid { stroke: var(--rule); stroke-width: 1; }
.chart.big .label { font-size: 12px; }
.chart.big { cursor: crosshair; }
.charttip { position: fixed; z-index: 30; display: flex; flex-direction: column; gap: 1px; pointer-events: none;
            background: #18212e; color: #fff; padding: 6px 10px; border-radius: 6px; font-size: 13px; line-height: 1.3;
            white-space: nowrap; box-shadow: 0 4px 14px rgba(24, 33, 46, 0.25); }
.charttip span { color: #c7d0dc; font-size: 12px; }
.chartdialog { width: min(1040px, 95vw); border: 0; border-radius: var(--radius-m); padding: 1.25rem 1.5rem 1rem;
               box-shadow: 0 12px 40px rgba(24, 33, 46, 0.35); }
.chartdialog::backdrop { background: rgba(24, 33, 46, 0.55); }
.chartdialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 0.5rem; }
.chartdialog-head figcaption { font-size: var(--step-0); line-height: 1.5; }
.chartdialog-close { flex: none; }

/* Syncro */
.syncroform { margin: 0.25rem 0 0; }
.syncroform .linkbutton { font-size: var(--step--1); }
.syncroresults { list-style: none; padding: 0; margin: 0.5rem 0; }
.syncroresults li { padding: 0.3rem 0; border-bottom: 1px solid var(--rule); }
.syncroresults form { display: flex; align-items: center; gap: 0.625rem; margin: 0; flex-wrap: wrap; }
#syncro { scroll-margin-top: 4.5rem; }
