/* Seatvane. Onprem2Cloud palette: cyan #58cded (accent only, 1.85:1 on white,
   never text), blue #3895d3 (large figures, borders), deep #1261a0 (text-safe
   6.48:1: headings, links, buttons), grey #aaaaaa (rules only). Status colours
   are deliberately not brand colours, and status is never carried by colour
   alone: every chip also has a label. */

:root {
  --brand-cyan: #58cded;
  --brand-blue: #3895d3;
  --brand-deep: #1261a0;
  --brand-grey: #aaaaaa;

  --bg: #f5f8fb;
  --surface: #ffffff;
  --text: #16202a;
  --muted: #4d5b69;
  --rule: #d9e1e8;
  --link: var(--brand-deep);
  --nav-bg: #0d3f69;
  --nav-text: #ffffff;

  --ok-bg: #e3f4ea;   --ok-text: #14532d;
  --warn-bg: #fff4d6; --warn-text: #713f12;
  --bad-bg: #fde4e4;  --bad-text: #7f1d1d;
  --info-bg: #e3eef8; --info-text: #0c3a61;

  --radius: 10px;
  --shadow: 0 1px 2px rgba(13, 63, 105, .06), 0 4px 16px rgba(13, 63, 105, .06);
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1520;
    --surface: #111e2b;
    --text: #e6edf3;
    --muted: #9fb0c0;
    --rule: #22364a;
    --link: #7cc4f0;
    --nav-bg: #07111a;
    --ok-bg: #0f2e1d;   --ok-text: #9ee6b8;
    --warn-bg: #33270a; --warn-text: #fbd98a;
    --bad-bg: #3a1212;  --bad-text: #fca5a5;
    --info-bg: #0d2a44; --info-text: #a9d4f5;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.5; font-size: 15px; }
a { color: var(--link); }

.topbar {
  background: var(--nav-bg); color: var(--nav-text);
  display: flex; align-items: center; gap: 24px;
  padding: 0 24px; min-height: 56px;
  border-bottom: 3px solid var(--brand-cyan);
}
.wordmark { font-weight: 700; font-size: 18px; letter-spacing: .02em; color: var(--nav-text); text-decoration: none; }
.wordmark span { color: var(--brand-cyan); }
.topbar nav { display: flex; gap: 18px; flex: 1; }
.topbar nav a { color: var(--nav-text); text-decoration: none; opacity: .85; font-size: 14px; }
.topbar nav a:hover, .topbar nav a[aria-current="page"] { opacity: 1; text-decoration: underline; }
.who { font-size: 13px; opacity: .9; display: flex; gap: 12px; align-items: center; }
.who form { margin: 0; }

main { max-width: 1180px; margin: 0 auto; padding: 28px 24px 64px; }

/* The preview (seatvane.demo): says on every page that the data is fictional. */
.preview-banner {
  background: var(--warn-bg); color: var(--warn-text); border-bottom: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 20px; padding: 10px 24px; font-size: 14px;
}
.preview-banner p { margin: 0; }
.preview-views { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.preview-views form { margin: 0; }
.cloud-pc { margin: 0 0 16px; }
.cloud-pc img { display: block; width: 100%; height: auto; border-radius: 12px; }
.cloud-pc figcaption { margin-top: 8px; font-size: 13px; }
.cloud-pc-notes { margin: 0; padding-left: 22px; }
.cloud-pc-notes li { margin-bottom: 8px; }
.cloud-pc-notes li::marker { color: #b8451d; font-weight: 700; }
h1 { font-size: 24px; margin: 0 0 4px; color: var(--text); }
h2 { font-size: 17px; margin: 0 0 12px; }
.lede { color: var(--muted); margin: 0 0 24px; }

.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--rule); border-top: 3px solid var(--brand-blue); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.kpi .label { color: var(--muted); font-size: 13px; }
.kpi .value { font-size: 30px; font-weight: 700; color: var(--brand-deep); }
@media (prefers-color-scheme: dark) { .kpi .value { color: #7cc4f0; } }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--rule); padding: 8px 10px; }
td { border-bottom: 1px solid var(--rule); padding: 10px; vertical-align: top; }
tr:last-child td { border-bottom: none; }
.mono { font-family: Consolas, "SFMono-Regular", Menlo, monospace; font-size: 12.5px; }
.muted { color: var(--muted); }

.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.chip.ok { background: var(--ok-bg); color: var(--ok-text); }
.chip.warn { background: var(--warn-bg); color: var(--warn-text); }
.chip.bad { background: var(--bad-bg); color: var(--bad-text); }
.chip.info { background: var(--info-bg); color: var(--info-text); }
tr.highlight td { background: var(--info-bg); }

.btn { display: inline-block; background: var(--brand-deep); color: #fff; border: 0; border-radius: 8px; padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.1); }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.btn.secondary { background: transparent; color: var(--link); border: 1px solid var(--rule); }
.btn.danger { background: #b42318; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.topbar .btn.secondary { color: var(--nav-text); border-color: rgba(255,255,255,.4); }

form.inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
input[type=text], input[type=email], select { font: inherit; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); color: var(--text); min-width: 240px; }
input:focus-visible, select:focus-visible, .btn:focus-visible, a:focus-visible { outline: 3px solid var(--brand-cyan); outline-offset: 2px; }

.notice { border-left: 4px solid var(--brand-blue); background: var(--info-bg); color: var(--info-text); padding: 12px 14px; border-radius: 6px; margin-bottom: 20px; }
.notice.bad { border-color: #b42318; background: var(--bad-bg); color: var(--bad-text); }
.notice.warn { border-color: #b54708; background: var(--warn-bg); color: var(--warn-text); }
.copy { word-break: break-all; }

.doors { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); max-width: 820px; margin: 48px auto; }
.doors .card { padding: 28px; }
.doors p { color: var(--muted); }

footer { color: var(--muted); font-size: 12px; text-align: center; padding: 24px; }

@media (prefers-reduced-motion: no-preference) {
  .card, .kpi { transition: transform .15s ease; }
}

/* Charts (server-rendered SVG). Categorical and sequential slots are the
   validated reference palette; status colours are fixed and always carry a
   text label beside them. */
:root {
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --status-good: #0ca30c;
  --status-warning: #fab219;
  --status-serious: #ec835a;
  --status-critical: #d03b3b;
  --status-neutral: #9a9994;
  --chart-grid: #e4e2dc;
}
@media (prefers-color-scheme: dark) {
  :root {
    --series-1: #3987e5;
    --series-2: #d95926;
    --status-neutral: #6f6e69;
    --chart-grid: #2a3a4a;
  }
}
.sv-chart { width: 100%; height: auto; display: block; overflow: visible; font-family: Arial, sans-serif; }
.sv-s1 { fill: var(--series-1); }
.sv-good { fill: var(--status-good); }
.sv-warning { fill: var(--status-warning); }
.sv-serious { fill: var(--status-serious); }
.sv-critical { fill: var(--status-critical); }
.sv-neutral { fill: var(--status-neutral); }
.sv-empty { fill: var(--chart-grid); }
.sv-label { fill: var(--text); font-size: 12px; }
.sv-value { fill: var(--muted); font-size: 12px; }
.sv-muted { fill: var(--muted); font-size: 11px; }
.sv-axis { stroke: var(--muted); stroke-width: 1; }
.sv-grid { stroke: var(--chart-grid); stroke-width: 1; }
.sv-line-1, .sv-line-2 { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.sv-line-1 { stroke: var(--series-1); }
.sv-line-2 { stroke: var(--series-2); }
.sv-hit { fill: transparent; }
.sv-hit:hover { fill: var(--chart-grid); }
.chart-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin: 4px 0 8px; flex-wrap: wrap; }
.legend .key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.key.sv-s1 { background: var(--series-1); } .key.sv-line-2 { background: var(--series-2); }
.key.sv-good { background: var(--status-good); } .key.sv-warning { background: var(--status-warning); }
.key.sv-neutral { background: var(--status-neutral); }
details.table-view { margin-top: 8px; font-size: 13px; }
details.table-view summary { cursor: pointer; color: var(--link); }

/* Cloud PC provisioning tracker. The bar is a glance aid: the caption and the step
   chips below it carry the same information in words. */
.stepbar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; max-width: 420px; margin: 4px 0 2px; }
.stepbar .seg { height: 8px; border-radius: 999px; background: var(--chart-grid); }
.stepbar .seg.done { background: var(--status-good); }
.stepbar .seg.current { background: var(--brand-blue); animation: sv-pulse 1.6s ease-in-out infinite; }
.stepbar .seg.problem { background: var(--status-critical); }
.stepbar-caption { font-size: 12px; color: var(--muted); }
.stepbar.stopped + .stepbar-caption { color: var(--bad-text); font-weight: 600; }
@keyframes sv-pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .stepbar .seg.current { animation: none; } }
.steps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 6px 0 0; }
.steps li { font-size: 12px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--rule); color: var(--muted); }
.steps li.done { background: var(--ok-bg); color: var(--ok-text); border-color: transparent; }
.steps li.current { background: var(--info-bg); color: var(--info-text); border-color: transparent; font-weight: 600; }
.steps li.problem { background: var(--bad-bg); color: var(--bad-text); border-color: transparent; font-weight: 600; }
textarea.copy { font: inherit; font-size: 13px; width: 100%; min-height: 250px; padding: 10px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); color: var(--text); box-sizing: border-box; }
textarea.copy:focus-visible { outline: 3px solid var(--brand-cyan); outline-offset: 2px; }

/* The bar loading.js shows while the next page is on its way. */
.loading { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; background: var(--info-bg); color: var(--info-text); border-bottom: 2px solid var(--brand-blue); padding: 10px 16px; font-size: 14px; }
.loading[hidden] { display: none; }
.loading-dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--brand-blue); }
@media (prefers-reduced-motion: no-preference) {
  .loading-dot { animation: loading-pulse 1s ease-in-out infinite; }
  @keyframes loading-pulse { 50% { opacity: .25; } }
}
[data-loading-held] { cursor: progress; }

/* A card that parts.js is still loading. */
.card.pending p.muted { display: flex; align-items: center; gap: 10px; }

/* Help (ADR-030) */
.help-log { display: flex; flex-direction: column; gap: 14px; }
.help-log:not(:empty) { margin-bottom: 16px; }
.help-turn { border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 14px; }
.help-q { margin: 0 0 8px; font-weight: 600; }
.help-a h3 { margin: 0 0 8px; font-size: 16px; }
.help-a > :last-child, .help-answer > :last-child { margin-bottom: 0; }
.help-ask label { display: block; font-weight: 600; margin-bottom: 6px; }
.help-row { display: flex; gap: 8px; }
.help-row input { flex: 1; min-width: 0; }
.help-ask[aria-busy="true"] .btn { opacity: .6; }
.help-try { margin: 12px 0 0; line-height: 2.2; }
.help-chip { display: inline-block; margin: 0 6px 0 0; padding: 2px 10px; border: 1px solid var(--rule);
  border-radius: 999px; font-size: 13px; text-decoration: none; line-height: 1.6; }
.help-chip:hover { border-color: var(--brand-blue); }
.help-note { font-size: 12px; margin: 12px 0 0; }
.help-related { margin-top: 4px; }
.help-topics { columns: 2; margin: 0; }
.help-topic details { border-top: 1px solid var(--rule); padding: 10px 0; }
.help-topic details:first-of-type { border-top: 0; }
.help-topic summary { cursor: pointer; color: var(--link); font-weight: 600; }
.help-answer { padding: 8px 0 0 16px; }
@media (max-width: 640px) { .help-topics { columns: 1; } .help-row { flex-direction: column; } }
