/* Appleton Creative — IT Help Desk
   Brand cues from appletoncreative.com: black & white, olive-green mark (#A8B533),
   old-style serif display type, light Open Sans body, letter-spaced uppercase labels. */
:root {
  --bg: #f6f6f6;
  --surface: #ffffff;
  --surface-2: #f2f2f2;
  --border: #e2e2e2;
  --border-strong: #c1c1c1;
  --text: #111111;
  --muted: #5f6166;
  --ink: #000000;
  --brand: #a8b533;          /* Appleton green */
  --brand-deep: #6b7417;     /* green dark enough for text on white */
  --brand-soft: #f4f6e3;
  --ok: #3f7a2a;  --ok-soft: #eaf3e3;
  --danger: #b3261e; --danger-soft: #fbeae8;
  --sev1: #5f6166; --sev1-soft: #eeeeee;
  --sev2: #7a6300; --sev2-soft: #faf2cf;
  --sev3: #a64b00; --sev3-soft: #fbe8d8;
  --sev4: #b3261e; --sev4-soft: #fbe3e0;
  --radius: 2px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.04);
  --focus: 0 0 0 3px rgba(168, 181, 51, .45);
  --serif: "Libre Caslon Display", "Poynter Oldstyle Display", Georgia, "Times New Roman", serif;
  --sans: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 400 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.2; margin: 0; }
a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--brand); text-decoration-thickness: 2px; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); position: relative; z-index: 2; }
.topbar-inner {
  max-width: 1200px; margin: 0 auto; padding: 18px 24px;
  display: flex; align-items: center; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--ink); }
.brand img { height: 27px; width: auto; display: block; }
.brand-sub {
  font-size: 11.5px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--muted);
  border-left: 1px solid var(--border-strong); padding-left: 16px; line-height: 27px; white-space: nowrap;
}
.topbar nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.topbar nav a {
  color: var(--ink); text-decoration: none; font-size: 11.5px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; padding: 8px 12px;
  border-bottom: 2px solid transparent;
}
.topbar nav a:hover { border-bottom-color: var(--brand); }
.who { font-size: 13px; color: var(--muted); padding-right: 8px; white-space: nowrap; }

/* ---------- hero ---------- */
.hero { background: var(--ink); color: #fff; }
.hero-inner { max-width: 760px; margin: 0 auto; padding: 56px 24px 96px; text-align: center; }
.hero h1 { font: 400 44px/1.1 var(--serif); letter-spacing: .01em; }
.hero p { color: #c9c9c9; font-weight: 300; font-size: 16px; margin: 14px auto 0; max-width: 520px; }

/* ---------- layout ---------- */
.page { max-width: 760px; margin: 0 auto; padding: 32px 24px 72px; }
.page.lifted { margin-top: -64px; padding-top: 0; position: relative; }
.page-wide { max-width: 1200px; }
.page-title { font: 400 32px/1.15 var(--serif); margin-bottom: 20px; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px;
}
.card + .card { margin-top: 16px; }
.section-title {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
}
.step {
  width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: var(--ink);
  display: grid; place-items: center; font: 400 15px/1 var(--serif); letter-spacing: 0; flex: none;
}

/* ---------- form ---------- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.full { grid-column: 1 / -1; }
.field label, .field .label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.req { color: var(--danger); margin-left: 2px; }
.opt { color: var(--muted); font-weight: 400; font-size: 13px; }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
input[type=text], input[type=email], input[type=tel], input[type=search], select, textarea {
  width: 100%; font: inherit; font-weight: 400; color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 11px 12px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 130px; }
select { appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23111' stroke-width='1.6'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: var(--focus); }
::placeholder { color: #9a9a9a; }
.invalid input, .invalid select, .invalid textarea { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 13px; margin: 6px 0 0; display: none; }
.invalid .field-error { display: block; }

/* identity strip (who's reporting) */
.identity {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 20px;
  background: var(--surface-2); border-left: 3px solid var(--brand);
}
.avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; flex: none;
  display: grid; place-items: center; font: 400 16px/1 var(--serif); letter-spacing: .04em;
}
.identity strong { display: block; font-weight: 600; }
.identity span { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.identity .ms { margin-left: auto; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; }

/* choice cards */
.choices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.choices.three { grid-template-columns: repeat(3, 1fr); }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label {
  display: flex; flex-direction: column; gap: 4px; height: 100%; margin: 0;
  padding: 14px; border: 1px solid var(--border-strong); border-radius: var(--radius); cursor: pointer;
  font-weight: 600; font-size: 14px; background: var(--surface); transition: border-color .15s, background .15s, box-shadow .15s;
}
.choice label small { font-weight: 400; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.choice label:hover { border-color: var(--ink); }
.choice input:focus-visible + label { box-shadow: var(--focus); }
.choice input:checked + label { border-color: var(--ink); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--ink); }
.choice .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 7px; vertical-align: 1px; }
.choices.compact label { flex-direction: row; align-items: center; justify-content: center; text-align: center; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 600 12.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; cursor: pointer;
  padding: 14px 24px; border-radius: var(--radius); border: 1px solid var(--ink);
  background: var(--ink); color: #fff; transition: background .15s, color .15s;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { background: #2a2a2a; }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-lg { padding: 18px 34px; font-size: 13px; }
.btn-secondary { background: var(--surface); color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: #fff; }
.btn-ok { background: var(--ok); border-color: var(--ok); }
.btn-ok:hover { background: #336423; }
.btn-sm { padding: 9px 14px; font-size: 11px; }
.actions { display: flex; align-items: center; gap: 14px; margin-top: 26px; flex-wrap: wrap; }
.actions .hint { margin: 0; }

.alert { padding: 12px 14px; border-radius: var(--radius); font-size: 14px; margin-bottom: 16px; }
.alert-error { background: var(--danger-soft); color: var(--danger); }

/* ---------- success ---------- */
.success { text-align: center; padding: 48px 28px; }
.success .check {
  width: 60px; height: 60px; border-radius: 50%; background: var(--brand); color: var(--ink);
  display: grid; place-items: center; margin: 0 auto 18px;
}
.success h2 { font: 400 30px/1.2 var(--serif); }
.ticket-number {
  display: inline-block; font: 600 24px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .08em; border: 1px solid var(--ink); padding: 14px 22px; margin: 18px 0;
}
.success p { color: var(--muted); max-width: 470px; margin: 6px auto; }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.sev-1 { color: var(--sev1); background: var(--sev1-soft); }
.sev-2 { color: var(--sev2); background: var(--sev2-soft); }
.sev-3 { color: var(--sev3); background: var(--sev3-soft); }
.sev-4 { color: var(--sev4); background: var(--sev4-soft); }
.dot.sev-1 { background: #8b8d92; } .dot.sev-2 { background: #d4ac00; }
.dot.sev-3 { background: #e0781f; } .dot.sev-4 { background: var(--sev4); }
.st { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.st-New { background: var(--ink); color: #fff; border-color: var(--ink); }
.st-In-Progress { background: var(--brand-soft); color: var(--brand-deep); border-color: #dfe4b4; }
.st-Waiting-on-User { background: var(--sev2-soft); color: var(--sev2); border-color: transparent; }
.st-Resolved { background: var(--ok-soft); color: var(--ok); border-color: transparent; }

/* ---------- my tickets (report page) ---------- */
.my-tickets { margin-top: 40px; }
.my-tickets h2 { font: 400 26px/1.2 var(--serif); margin-bottom: 14px; }
.mt-list { list-style: none; margin: 0; padding: 0; }
.mt-list li { border-top: 1px solid var(--border); }
.mt-list li:first-child { border-top: 0; }
.mt-list details summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 96px 1fr auto; gap: 14px;
  align-items: center; padding: 14px 20px;
}
.mt-list details summary::-webkit-details-marker { display: none; }
.mt-list details summary:hover { background: var(--surface-2); }
.mt-list .body { padding: 0 20px 16px 130px; font-size: 14px; }
.mt-list .body .resolution-box { margin-top: 8px; }

/* ---------- message page (signed out / no access / errors) ---------- */
.message { max-width: 520px; margin: 0 auto; padding: 80px 24px; }
.message h1 { font: 400 30px/1.2 var(--serif); margin-bottom: 10px; }
.message p { color: var(--muted); margin: 0; }

/* ---------- dashboard ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head .page-title { margin-bottom: 0; }
.notify-stack { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
@media (max-width: 720px) { .notify-stack { align-items: flex-start; } }
.notify { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); flex-wrap: wrap; }
.notify svg { color: var(--brand-deep); flex: none; }
.notify-hint { margin: -8px 0 18px; font-size: 13.5px; color: var(--muted); background: var(--brand-soft); border-left: 3px solid var(--brand); padding: 10px 14px; }
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 22px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; cursor: pointer; text-align: left; font: inherit; color: inherit;
  border-top: 3px solid var(--border); transition: border-color .15s;
}
.stat:hover, .stat[aria-pressed="true"] { border-top-color: var(--brand); }
.stat[aria-pressed="true"] { background: var(--brand-soft); }
.stat .n { font: 400 34px/1.05 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.stat .l { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.stat.critical .n { color: var(--sev4); }

.toolbar { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.toolbar input[type=search] { flex: 1 1 260px; }
.toolbar select { width: auto; flex: 0 0 auto; }

.table-card { padding: 0; overflow: hidden; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left; font-weight: 600; color: var(--muted); font-size: 11px; text-transform: uppercase;
  letter-spacing: .14em; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--ink);
}
td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.active { background: var(--brand-soft); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.subject { font-weight: 600; }
.sub { color: var(--muted); font-size: 13px; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }

/* ---------- detail drawer ---------- */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 10; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(700px, 100%); z-index: 11;
  background: var(--bg); box-shadow: -12px 0 40px rgba(0,0,0,.18);
  display: flex; flex-direction: column;
}
.drawer-head {
  background: var(--ink); color: #fff; padding: 20px 24px;
  display: flex; gap: 12px; align-items: flex-start;
}
.drawer-head .sub { color: var(--brand); }
.drawer-head h2 { font: 400 24px/1.2 var(--serif); margin-top: 6px; overflow-wrap: anywhere; }
.drawer-head .close { margin-left: auto; background: transparent; color: #fff; border-color: #555; }
.drawer-head .close:hover { background: #fff; color: var(--ink); }
.drawer-body { overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.drawer .card { padding: 20px; }
.drawer .card + .card { margin-top: 0; }
.card h3 { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); margin-bottom: 12px; }
.controls { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.controls label { font-size: 13px; font-weight: 600; display: block; margin-bottom: 4px; }
.controls select { padding: 9px 32px 9px 10px; font-size: 14px; }
.description { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 16px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

.resolution-box { border-left: 3px solid var(--brand); background: var(--brand-soft); padding: 12px 14px; }
.resolution-box .meta { font-size: 12.5px; color: var(--muted); margin-top: 6px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.timeline li:first-child { border-top: 0; padding-top: 0; }
.timeline .icon {
  width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--surface-2); color: var(--muted);
}
.timeline .note .icon { background: var(--ink); color: #fff; }
.timeline .resolution .icon { background: var(--brand); color: var(--ink); }
.timeline .comment .icon { background: var(--brand-soft); color: var(--brand-deep); border: 1px solid #dfe4b4; }
.timeline .meta { font-size: 12.5px; color: var(--muted); }
.timeline .body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.timeline .event .body { color: var(--muted); }

.tabs { display: flex; gap: 18px; margin-bottom: 12px; border-bottom: 1px solid var(--border); }
.tab {
  font: 600 11.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; padding: 10px 0;
  border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--muted); cursor: pointer;
}
.tab[aria-selected=true] { color: var(--ink); border-bottom-color: var(--brand); }
.composer textarea { min-height: 90px; }
.composer .actions { margin-top: 12px; justify-content: flex-end; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 20;
  background: var(--ink); color: #fff; padding: 12px 18px; font-size: 14px;
  border-left: 3px solid var(--brand); box-shadow: var(--shadow);
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .col-hide { display: none; }
}
@media (max-width: 640px) {
  .topbar-inner { padding: 14px 16px; gap: 10px; }
  .brand img { height: 20px; }
  .brand-sub, .who { display: none; }
  .topbar nav a { padding: 8px 6px; letter-spacing: .1em; }
  .hero-inner { padding: 40px 16px 84px; }
  .hero h1 { font-size: 34px; }
  .page { padding: 20px 16px 48px; }
  .card { padding: 20px; }
  .grid, .controls { grid-template-columns: 1fr; }
  .choices, .choices.three { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .col-hide-sm { display: none; }
  .identity .ms { display: none; }
  .mt-list details summary { grid-template-columns: 1fr auto; padding: 14px 16px; }
  .mt-list details summary .mono { grid-column: 1 / -1; }
  .mt-list .body { padding: 0 16px 16px; }
}

/* ---------- footer ---------- */
.site-footer {
  text-align: center; font-size: 12px; letter-spacing: .06em; color: var(--muted);
  padding: 22px 16px 28px; border-top: 1px solid var(--border); background: var(--surface);
}
body { display: flex; flex-direction: column; min-height: 100vh; }
body > main { flex: 1 0 auto; width: 100%; }
body > .site-footer { flex: none; }

/* ---------- administration ---------- */
.page-admin { max-width: 860px; }
.admin-intro { color: var(--muted); margin: -6px 0 22px; max-width: 640px; }
.admin-h2 { font: 400 24px/1.2 var(--serif); }
.picklist-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.picklist .meta { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.badge.unsaved { background: var(--sev2-soft); color: var(--sev2); }
.pl-items { list-style: none; margin: 0 0 12px; padding: 0; }
.pl-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.pl-row input { flex: 1; padding: 8px 10px; }
.pl-num { width: 24px; text-align: right; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center; flex: none; cursor: pointer;
  background: var(--surface); color: var(--ink); border: 1px solid var(--border-strong); border-radius: var(--radius);
}
.icon-btn:hover:not(:disabled) { background: var(--ink); color: #fff; border-color: var(--ink); }
.icon-btn:disabled { opacity: .3; cursor: default; }
.icon-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.pl-add { display: flex; gap: 8px; padding-left: 32px; }
.pl-add input { flex: 1; padding: 8px 10px; }
.pl-actions { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.linkbtn { background: none; border: 0; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:hover { color: var(--ink); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; background: var(--surface-2); padding: 1px 5px; }
@media (max-width: 640px) {
  .pl-add { padding-left: 0; }
  .pl-num { display: none; }
  .admin-h2 { font-size: 21px; }
}

/* ---------- utility classes (replace inline styles so a strict Content Security Policy can apply) ---------- */
.hint.flush { margin: 0 0 14px; }
.field.spaced { margin-top: 22px; }
.actions.center { justify-content: center; }
.actions.tight { margin-top: 12px; }
.prewrap { white-space: pre-wrap; }
.w-110 { width: 110px; } .w-130 { width: 130px; } .w-150 { width: 150px; } .w-170 { width: 170px; }

/* Sign out is a POST form (so other sites can't sign people out) styled like the other nav links */
.signout { display: inline; margin: 0; }
.signout button {
  background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer;
  color: var(--ink); font: 600 11.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; padding: 8px 12px;
}
.signout button:hover { border-bottom-color: var(--brand); }
.signout button:focus-visible { outline: none; box-shadow: var(--focus); }
@media (max-width: 640px) { .signout button { padding: 8px 6px; letter-spacing: .1em; } }

/* ---------- navigation menu (☰) ---------- */
.menu-button {
  margin-left: auto; display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  background: none; border: 1px solid transparent; border-radius: var(--radius); padding: 8px 10px; color: var(--ink);
  font: 600 11.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase;
}
.menu-button:hover { border-color: var(--border-strong); }
.menu-button:focus-visible { outline: none; box-shadow: var(--focus); }
.menu-scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 30; }
.site-menu {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(320px, 88vw); z-index: 31;
  background: var(--surface); box-shadow: -12px 0 40px rgba(0, 0, 0, .18);
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform .2s ease;
}
.site-menu.open { transform: translateX(0); }
body.menu-open { overflow: hidden; }
.menu-head { display: flex; align-items: center; gap: 12px; padding: 18px 16px 18px 20px; background: var(--ink); color: #fff; }
.menu-user { display: flex; align-items: center; gap: 12px; min-width: 0; }
.menu-user .avatar { background: var(--brand); color: var(--ink); }
.menu-user strong { display: block; font-weight: 600; }
.menu-user > div > span { display: block; color: #c9c9c9; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-close {
  margin-left: auto; flex: none; width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer;
  background: none; color: #fff; border: 1px solid #555; border-radius: var(--radius);
}
.menu-close:hover { background: #fff; color: var(--ink); }
.menu-close:focus-visible { outline: none; box-shadow: var(--focus); }
.menu-links { list-style: none; margin: 0; padding: 10px 0; flex: 1; overflow-y: auto; }
.menu-links a, .menu-signout button {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 20px; text-decoration: none;
  color: var(--ink); font: 600 14.5px/1.2 var(--sans); border: 0; border-left: 3px solid transparent;
  background: none; cursor: pointer; text-align: left;
}
.menu-links a svg, .menu-signout svg { color: var(--muted); flex: none; }
.menu-links a:hover, .menu-signout button:hover { background: var(--surface-2); }
.menu-links a:focus-visible, .menu-signout button:focus-visible { outline: none; background: var(--surface-2); box-shadow: inset 0 0 0 2px var(--brand); }
.menu-links a.current { border-left-color: var(--brand); background: var(--brand-soft); }
.menu-links a.current svg { color: var(--brand-deep); }
.menu-signout { margin: 0; border-top: 1px solid var(--border); padding: 6px 0 10px; }
@media (max-width: 640px) { .menu-label { display: none; } }
@media (prefers-reduced-motion: reduce) { .site-menu { transition: none; } }

/* ---------- My tickets page ---------- */
.page-narrow { max-width: 860px; }
.segmented { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius); margin-bottom: 14px; background: var(--surface); }
.segmented button {
  font: 600 11.5px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; padding: 10px 16px;
  border: 0; background: none; color: var(--muted); cursor: pointer;
}
.segmented button + button { border-left: 1px solid var(--border-strong); }
.segmented button[aria-selected=true] { background: var(--ink); color: #fff; }
.segmented button:focus-visible { outline: none; box-shadow: var(--focus); }

/* ---------- Check on an Issue page (matches the Report an Issue layout) ---------- */
.issues-card { padding: 0; overflow: hidden; }
.issues-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 22px 28px 18px; border-bottom: 1px solid var(--border);
}
.issues-head .section-title { margin: 0; }
.issues-head .segmented { margin: 0; }
.issues-card .mt-list details summary { padding: 16px 28px; }
.issues-card .mt-list .body { padding: 0 28px 18px 138px; }
@media (max-width: 640px) {
  .issues-head { padding: 18px 16px 14px; }
  .issues-card .mt-list details summary { padding: 14px 16px; }
  .issues-card .mt-list .body { padding: 0 16px 16px; }
}

/* ---------- administration: people & audit ---------- */
.add-person { display: grid; grid-template-columns: 1fr 200px auto; gap: 12px; align-items: end; margin: 0 0 18px; }
.add-person .field label { font-size: 13px; }
.add-person input, .add-person select { padding: 9px 10px; }
.add-person .btn { height: 40px; }
.people-table td { vertical-align: middle; }
.people-table tbody tr { cursor: default; }
.people-table tbody tr:hover { background: none; }
.role-select { width: auto; min-width: 150px; padding: 7px 32px 7px 10px; font-size: 14px; }
.audit-list { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow-y: auto; }
.audit-list li { padding: 10px 0; border-top: 1px solid var(--border); font-size: 14px; }
.audit-list li:first-child { border-top: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 640px) {
  .add-person { grid-template-columns: 1fr; }
  .role-select { min-width: 0; width: 100%; }
}

/* Space between the drop-down list cards and the sections that follow them */
#lists { margin-bottom: 28px; }
#lists + .card { margin-top: 0; }
.page-admin > .card + .card { margin-top: 28px; }
.people-table .you { font-weight: 400; color: var(--muted); }

/* ---------- pictures on tickets ---------- */
.dropzone { border: 1px dashed var(--border); border-radius: var(--radius); padding: 14px; background: var(--surface); transition: border-color .15s, background .15s; }
.dropzone.dragging { border-color: var(--brand); background: var(--brand-soft); }
.dropzone .btn { display: inline-flex; align-items: center; gap: 8px; }
.dropzone .hint { margin-top: 8px; }
.dropzone .pics:not(:empty) { margin-top: 12px; }
#pictures-field .field-error:empty { display: none; }
.pics { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pics li { position: relative; }
.pic { display: block; width: 96px; height: 96px; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--bg); cursor: pointer; }
div.pic { cursor: default; }
.pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
button.pic:hover, button.pic:focus-visible { border-color: var(--ink); }
.pic-remove { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-size: 12px; line-height: 24px; cursor: pointer; }
.pic-remove:hover, .pic-remove:focus-visible { background: var(--danger); }
.has-pics { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; font-size: 12px; font-weight: 400; color: var(--muted); vertical-align: middle; }
.issues-card .pics { margin-top: 10px; }

/* in-page picture viewer */
.viewer { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, .95); display: flex; align-items: center; justify-content: center; padding: 64px 56px 24px; }
.viewer[hidden] { display: none; }
.viewer-img { max-width: 100%; max-height: 100%; object-fit: contain; background: #fff; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.viewer-bar { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 10px; padding: 12px 16px; color: #fff; }
.viewer-name { flex: 1; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-bar .btn-secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.viewer-bar .viewer-close { background: #fff; color: #000; border-color: #fff; }
.viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 34px; line-height: 1; cursor: pointer; }
.viewer-nav:hover, .viewer-nav:focus-visible { background: rgba(255,255,255,.28); }
.viewer-nav.prev { left: 6px; }
.viewer-nav.next { right: 6px; }
body.viewer-open { overflow: hidden; }
@media (max-width: 600px) {
  .viewer { padding: 60px 8px 16px; }
  .viewer-nav { width: 36px; height: 52px; font-size: 28px; background: rgba(0,0,0,.4); }
  .pic { width: 80px; height: 80px; }
}
#d-pictures .pics { margin: 0 0 18px; }
.self-note { background: var(--brand-soft); border-left: 3px solid var(--brand); padding: 10px 14px; font-size: 14px; text-align: left; }

/* ---------- reporter actions on "Check on an Issue" ---------- */
.st-Canceled { background: var(--sev1-soft); color: var(--sev1); border-color: transparent; text-decoration: line-through; text-decoration-thickness: 1px; }
.st-Closed { background: var(--sev1-soft); color: var(--sev1); border-color: transparent; }
.mt-list .body > * + * { margin-top: 8px; }
.mt-actions { margin-top: 14px !important; padding-top: 14px; border-top: 1px solid var(--border); }
.mt-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.mt-form label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.mt-form textarea { width: 100%; min-height: 84px; }
.mt-form .mt-buttons { margin-top: 10px; }
.mt-form[hidden], .mt-buttons[hidden] { display: none; }
.mt-activity { margin-top: 16px !important; }
.mt-h { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.mt-timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.mt-timeline li { padding: 6px 0 6px 14px; }
.mt-timeline li.comment, .mt-timeline li.resolution { border-left: 2px solid var(--brand); margin-left: -2px; }
.mt-timeline .meta { font-size: 12.5px; color: var(--muted); }
.mt-timeline .prewrap { font-size: 14px; }

/* ---------- swirling-water banner (Report an Issue, Check on an Issue) ---------- */
/* static/js/water.js draws slow, clean liquid ripples live behind the heading (no video, no loop point).
   Until it's ready, or if the browser can't draw it, the banner is simply black. */
.hero-water { position: relative; overflow: hidden; isolation: isolate; background: #000; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; pointer-events: none;
  opacity: 0; transition: opacity 1.6s ease; }
.hero-canvas.ready { opacity: 1; }
/* A gentle darkening behind the text keeps the heading crisp over the brightest ripples. */
.hero-water::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse 45% 60% at 50% 45%, rgba(0,0,0,.45) 0%, rgba(0,0,0,0) 100%); }
.hero-water h1 { text-shadow: 0 2px 18px rgba(0,0,0,.6); }
.hero-water p { color: #e2e2e2; text-shadow: 0 1px 10px rgba(0,0,0,.7); }

/* ---------- welcome / sign-in screen (shown to anyone not signed in) ---------- */
.welcome-hero .hero-inner { padding-bottom: 110px; }
.welcome-hero h1 { font-size: 52px; }
.welcome-main { max-width: 640px; }
.welcome-card { text-align: center; padding: 40px 44px 34px; }
.welcome-card h2 { font: 400 28px/1.2 var(--serif); margin: 0 0 10px; }
.welcome-lede { color: var(--muted); margin: 0 auto 26px; max-width: 380px; }
.welcome-notice { background: var(--brand-soft); border-left: 3px solid var(--brand); padding: 10px 14px; margin: -8px 0 22px; font-size: 14px; text-align: left; }
.welcome-notice[hidden] { display: none; }
.welcome-fine { font-size: 12.5px; color: var(--muted); margin: 16px 0 0; }

/* Microsoft's "Sign in with Microsoft" button (light theme): white fill, #8C8C8C border, #5E5E5E text,
   Segoe UI Semibold 15px, 41px tall, 21px logo with 12px spacing. */
.ms-signin { display: inline-flex; align-items: center; justify-content: center; gap: 12px; height: 41px; padding: 0 12px;
  min-width: 260px; background: #fff; border: 1px solid #8c8c8c; color: #5e5e5e; text-decoration: none;
  font: 600 15px/1 "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; letter-spacing: 0;
  transition: background .15s, border-color .15s; }
.ms-signin:hover { background: #f3f3f3; border-color: #5e5e5e; }
.ms-signin:focus-visible { outline: none; box-shadow: var(--focus); }
.ms-signin.busy { pointer-events: none; opacity: .75; }
.ms-signin svg { flex: none; }

.welcome-points { list-style: none; margin: 30px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.welcome-points li { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; color: var(--muted); }
.welcome-points svg { color: var(--brand-deep); margin-bottom: 6px; }
.welcome-points strong { color: var(--ink); font-weight: 600; font-size: 14px; }
@media (max-width: 720px) {
  .welcome-hero h1 { font-size: 40px; }
  .welcome-card { padding: 30px 22px 26px; }
  .welcome-points { grid-template-columns: 1fr; gap: 16px; margin-top: 24px; }
  .welcome-points li { display: grid; grid-template-columns: 30px 1fr; column-gap: 12px; }
  .welcome-points li svg { grid-row: span 2; margin: 2px 0 0; }
}
@media (max-width: 360px) { .ms-signin { min-width: 0; width: 100%; } }

/* ---------- replies to the requester (technician console) ---------- */
.composer-hint { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.composer-hint.public { color: var(--brand-deep); font-weight: 600; }
.composer .check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin: 10px 0 0; cursor: pointer; }
.composer .check[hidden] { display: none; }
.composer .check input { width: 16px; height: 16px; accent-color: var(--ink); }
.timeline .reply .icon { background: var(--brand); color: #fff; }
.timeline .reply .body { border-left: 3px solid var(--brand); padding-left: 10px; }
.mt-timeline li.reply { border-left: 2px solid var(--ink); margin-left: -2px; }
.mt-timeline li.reply .meta { color: var(--ink); font-weight: 600; }

/* ---------- footer build link and changelog page ---------- */
.site-footer a { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--ink); border-bottom-style: solid; outline: none; }
.changelog-intro { color: var(--muted); margin: -8px 0 26px; }
.changelog { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.changelog-build { position: relative; display: grid; grid-template-columns: 170px 1fr; gap: 20px; padding: 0 0 28px 24px; }
.changelog-build::before { content: ""; position: absolute; left: -7px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border-strong, #bbb); }
.changelog-build.current::before { background: var(--brand); border-color: var(--brand-deep); }
.changelog-meta { display: flex; flex-direction: column; gap: 4px; }
.changelog-number { font: 600 12px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.changelog-date { font-size: 13px; color: var(--muted); }
.changelog-now { align-self: flex-start; margin-top: 4px; background: var(--brand-soft); color: var(--brand-deep); border-color: #dfe4b4; }
.changelog-build h2 { font: 400 22px/1.2 var(--serif); margin: 0 0 6px; }
.changelog-build ul { margin: 0; padding-left: 18px; list-style: disc; }
.changelog-build li { margin: 3px 0; }
@media (max-width: 600px) {
  .changelog-build { grid-template-columns: 1fr; gap: 6px; padding-left: 18px; }
  .changelog-meta { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 10px; }
}

/* ---------- log a ticket for someone (technician console) ---------- */
.title-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.title-row .btn { display: inline-flex; align-items: center; gap: 6px; }
#log-panel h3 { margin-bottom: 12px; }
#log-panel .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
#log-panel .grid .full { grid-column: 1 / -1; }
#log-panel textarea { min-height: 110px; }
.person-field { position: relative; }
.person-field[hidden], .person-card[hidden] { display: none; }
.person-results { list-style: none; margin: 4px 0 0; padding: 4px 0; position: absolute; left: 0; right: 0; z-index: 5;
  background: var(--surface); border: 1px solid var(--border-strong); box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 320px; overflow-y: auto; }
.person-results[hidden] { display: none; }
.person-results li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; }
.person-results li[aria-selected="true"], .person-results li:hover { background: var(--brand-soft); }
.person-results li > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.person-results li .sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-results li.none { color: var(--muted); cursor: default; font-size: 13.5px; }
.avatar.sm { width: 30px; height: 30px; font-size: 12px; flex: none; }
.person-card { display: flex; align-items: center; gap: 14px; }
.person-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.person-info span { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; }
.segmented.channel { flex-wrap: wrap; margin: 0; }
.segmented.channel button[aria-checked="true"] { background: var(--ink); color: #fff; }
.assign-me { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.assign-me input { width: 16px; height: 16px; accent-color: var(--ink); }
@media (max-width: 600px) { #log-panel .grid { grid-template-columns: 1fr; } }

/* ---------- service incident banner (every signed-in page) ---------- */
.incident-bar[hidden] { display: none; }
.incident { --lvl: var(--sev4); --lvl-soft: var(--sev4-soft); background: var(--lvl-soft); border-bottom: 1px solid rgba(0,0,0,.08);
  border-left: 5px solid var(--lvl); padding: 10px 24px 10px 19px; font-size: 14px; }
.incident.level-degraded { --lvl: var(--sev2); --lvl-soft: var(--sev2-soft); }
.incident.level-maintenance { --lvl: #2f5d8a; --lvl-soft: #e6eef7; }
.incident.level-resolved { --lvl: var(--ok); --lvl-soft: var(--ok-soft); }
.incident-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; max-width: 1200px; margin: 0 auto; }
.incident-level { font: 700 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #fff; background: var(--lvl);
  padding: 4px 7px; border-radius: 2px; align-self: center; }
.incident-title { font-weight: 600; }
.incident-since, .incident-note { color: var(--muted); font-size: 13px; }
.incident-note { font-style: italic; }
.incident-toggle { margin-left: auto; background: none; border: 0; padding: 2px 0; font: 600 12.5px/1.2 var(--sans);
  color: var(--ink); text-decoration: underline; cursor: pointer; }
.incident-ticker { max-width: 1200px; margin: 6px auto 0; overflow: hidden; }
/* measure / moving / fits: every update on one line. Otherwise (reduced motion, too long): just the latest. */
.ticker-track { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.incident-ticker.measure .ticker-track, .incident-ticker.moving .ticker-track, .incident-ticker.fits .ticker-track {
  display: inline-flex; flex-wrap: nowrap; white-space: nowrap; }
.incident-ticker:not(.measure):not(.moving):not(.fits) .ticker-item:not(:first-child) { display: none; }
.incident-ticker:not(.measure):not(.moving):not(.fits) .ticker-item { white-space: normal; }
.incident-ticker.moving { mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.incident-ticker.moving .ticker-track { animation: ticker var(--ticker-duration, 40s) linear infinite; }
.incident-ticker.moving:hover .ticker-track, .incident:focus-within .ticker-track { animation-play-state: paused; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(var(--ticker-distance, -50%)); } }
.ticker-item + .ticker-item::before { content: "•"; color: var(--lvl); margin-right: 18px; }
.ticker-time { font-weight: 600; color: var(--lvl); margin-right: 4px; }
.incident-updates { list-style: none; max-width: 1200px; margin: 8px auto 2px; padding: 8px 0 0; border-top: 1px solid rgba(0,0,0,.08); }
.incident-updates li { display: flex; flex-direction: column; padding: 4px 0; }
.incident-updates .ticker-time { font-size: 12.5px; }
@media (max-width: 600px) { .incident { padding: 10px 14px 10px 12px; } .incident-note { display: none; } }
@media (prefers-reduced-motion: reduce) { .incident-ticker .ticker-track { animation: none !important; } }

/* ---------- incidents (Administration) ---------- */
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #8e1e17; border-color: #8e1e17; }
.incidents-admin .hint { margin-bottom: 16px; }
.inc-start > summary { list-style: none; display: inline-flex; }
.inc-start > summary::-webkit-details-marker { display: none; }
.inc-start[open] > summary { display: none; }
.inc-form { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }
.inc-form textarea { min-height: 90px; }
.inc-form .btn { align-self: flex-start; }
.level-pick { margin: 0; flex-wrap: wrap; }
.level-pick button[aria-checked="true"] { background: var(--ink); color: #fff; }
.inc-card { --lvl: var(--sev4); border: 1px solid var(--border); border-left: 5px solid var(--lvl); padding: 14px 16px; margin-bottom: 16px; }
.inc-card.level-degraded { --lvl: var(--sev2); }
.inc-card.level-maintenance { --lvl: #2f5d8a; }
.inc-card-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 10px; }
.inc-card-head .sub { font-size: 13px; color: var(--muted); }
.inc-card .incident-level, .inc-past .incident-level { background: var(--lvl, var(--sev4)); }
.inc-updates { list-style: none; margin: 0 0 12px; padding: 0 0 0 12px; border-left: 2px solid var(--border); }
.inc-updates li { padding: 4px 0; }
.inc-updates .meta { font-size: 12.5px; color: var(--muted); }
.inc-post textarea { width: 100%; min-height: 70px; margin-top: 6px; }
.inc-post-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.inc-post-actions .inline { font-size: 13px; display: flex; align-items: center; gap: 6px; margin-right: auto; }
.inc-post-actions select { width: auto; padding: 6px 30px 6px 10px; }
.inc-history { margin-top: 18px; }
.inc-history > summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.inc-past { list-style: none; margin: 10px 0 0; padding: 0; }
.inc-past > li { border-top: 1px solid var(--border); padding: 8px 0; }
.inc-past summary { cursor: pointer; font-size: 14px; }
.inc-past .sub { color: var(--muted); font-size: 13px; }
.incident-level.mini { font-size: 10px; padding: 3px 6px; }
.incident-level.mini.level-outage { --lvl: var(--sev4); }
.incident-level.mini.level-degraded { --lvl: var(--sev2); }
.incident-level.mini.level-maintenance { --lvl: #2f5d8a; }
.page-admin > .incidents-admin + .admin-intro { margin-top: 32px; }
.reports-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.reports-toggle input { width: 16px; height: 16px; accent-color: var(--ink); }

/* ---------- reports page ---------- */
.reports-intro { color: var(--muted); margin: 4px 0 0; }
.reports-page .page-head { align-items: flex-end; }
.reports-page #rep-period { margin: 0; flex-wrap: wrap; }
.reports-page #rep-period [aria-checked="true"] { background: var(--ink); color: #fff; }
.rep-stats { grid-template-columns: repeat(5, 1fr); }
.rep-stat { cursor: default; }
.rep-stat:hover { border-top-color: var(--border); }
.rep-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.rep-card h2 { font: 400 22px/1.2 var(--serif); margin: 0 0 14px; }
.rep-card-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.rep-legend { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.rep-legend .key { display: inline-block; width: 12px; height: 12px; margin-left: 10px; }
.key.opened, .bar.opened { background: var(--ink); fill: var(--ink); }
.key.resolved, .bar.resolved { background: var(--brand); fill: var(--brand); }
.rep-chart svg { display: block; max-width: 100%; }
.rep-chart .grid { stroke: var(--border); stroke-width: 1; }
.rep-chart .axis { font: 11px var(--sans); fill: var(--muted); }
.rep-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.hbars { list-style: none; margin: 0; padding: 0; }
.hbars li { display: grid; grid-template-columns: minmax(110px, 38%) 1fr 34px; align-items: center; gap: 10px; padding: 5px 0; font-size: 14px; }
.hb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-bar { height: 10px; background: var(--bg); }
.hb-fill { display: block; height: 100%; background: var(--brand); min-width: 2px; }
.hb-count { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.rep-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rep-table th { text-align: left; font: 600 11px/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--border); }
.rep-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); }
.rep-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.rep-empty { padding: 18px 0; }
@media (max-width: 900px) { .rep-stats { grid-template-columns: repeat(3, 1fr); } .rep-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .rep-stats { grid-template-columns: 1fr 1fr; } }
.rep-grid > .card, .reports-page > .rep-card { margin: 0 0 20px; }

/* ---------- system health (administrators) ---------- */
.sys-warnings { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 8px; }
.sys-warnings:empty { display: none; }
.sys-warnings li { padding: 11px 14px 11px 40px; position: relative; font-size: 14px; border-left: 3px solid; }
.sys-warnings li::before { position: absolute; left: 14px; top: 10px; font-weight: 700; }
.sys-warnings .error { background: var(--danger-soft); color: var(--danger); }
.sys-warnings .error::before { content: "!"; }
.sys-warnings .warn { background: var(--sev2-soft); color: var(--sev2); }
.sys-warnings .warn::before { content: "!"; }
.sys-warnings .ok { background: var(--ok-soft); color: var(--ok); }
.sys-warnings .ok::before { content: "✓"; }
.sys-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 20px; }
.sys-grid > .card { margin: 0; }
.sys-card h2, .sys-logs h2 { font: 400 22px/1.2 var(--serif); margin: 0 0 12px; }
.sys-big { font: 400 34px/1.05 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.sys-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.sys-spark { margin-top: 14px; }
.sys-spark svg { display: block; width: 100%; height: 56px; }
.sys-spark .area { fill: var(--brand-soft); }
.sys-spark .line { fill: none; stroke: var(--brand-deep); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.sys-spark .axis { font: 10.5px var(--sans); fill: var(--muted); }
.meter { height: 8px; background: var(--surface-2); margin: 12px 0 14px; overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: var(--ink); transition: width .4s; }
.meter.warn span { background: #e0781f; }
.meter.danger span { background: var(--danger); }
.sys-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 13.5px; }
.sys-list + .sys-list { margin-top: 6px; }
.sys-list dt { color: var(--muted); }
.sys-list dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sys-list .good { color: var(--ok); }
.sys-list .bad { color: var(--danger); }
.sys-list .meh { color: var(--sev2); }
.log-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin: 4px 0 14px; font-size: 13px; }
.log-controls label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-weight: 600; font-size: 11px;
  letter-spacing: .12em; text-transform: uppercase; }
.log-controls select, .log-controls input[type=search] { font: 400 14px var(--sans); padding: 8px 10px; border: 1px solid var(--border-strong);
  border-radius: var(--radius); background: var(--surface); color: var(--text); letter-spacing: 0; text-transform: none; }
.log-controls .log-search { flex: 1 1 220px; }
.log-controls .check { flex-direction: row; align-items: center; gap: 7px; font-weight: 400; letter-spacing: 0; text-transform: none;
  font-size: 13.5px; color: var(--text); padding-bottom: 9px; cursor: pointer; }
.log-controls .check input { width: 16px; height: 16px; accent-color: var(--ink); }
.log-actions { display: flex; gap: 8px; }
.log-view { background: #0f0f0f; color: #e6e6e6; font: 12.5px/1.55 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  padding: 12px 14px; height: 480px; overflow: auto; border-radius: var(--radius); }
.log-view:focus-visible { outline: none; box-shadow: var(--focus); }
.log-line { display: grid; grid-template-columns: 11.5em 14em 1fr; gap: 12px; padding: 1px 0; }
.log-line .t { color: #9a9a9a; white-space: nowrap; }
.log-line .u { color: #c9d36a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-line .m { white-space: pre-wrap; overflow-wrap: anywhere; }
.log-line.problem .m { color: #ff9b8f; }
.log-empty { color: #9a9a9a; }
@media (max-width: 1000px) { .sys-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) {
  .sys-grid { grid-template-columns: 1fr; }
  .log-line { grid-template-columns: 1fr; gap: 0; padding: 4px 0; border-bottom: 1px solid #262626; }
  .log-view { height: 60vh; }
}
