/* CORE styles. (c) Mays Consulting Group. All rights reserved.
   Built to WCAG 2.1 AA: 4.5:1 text contrast, visible focus, 44px targets. */

:root {
  --brand: #A3203B;
  --brand-accent: #5E0F21;
  --brand-text: #1E1416;
  --ink: #1F1B1C;
  --ink-soft: #5B5456;
  --line: #DDD7D8;
  --bg: #F6F4F3;
  --card: #FFFFFF;
  --ok: #1E6B3A;
  --warn: #8A5300;
  --bad: #B3261E;
  --radius: 10px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; width: 100%; max-width: 1160px; margin: 0 auto; padding: 24px 16px 48px; }
main:focus { outline: none; }
h1 { font-size: 1.6rem; margin: 0 0 16px; color: var(--brand-text); }
h2 { font-size: 1.2rem; margin: 24px 0 10px; }
h3 { font-size: 1.05rem; margin: 16px 0 8px; }
a { color: var(--brand); }
a:hover { color: var(--brand-text); }
:focus-visible { outline: 3px solid #1A5FB4; outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 10px 14px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
.muted { color: var(--ink-soft); }
.small { font-size: .875rem; }

/* Top bar */
.topbar { background: var(--card); border-bottom: 3px solid var(--brand); display: flex; align-items: center; gap: 16px; padding: 8px 16px; flex-wrap: wrap; position: relative; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--brand-text); font-weight: 700; font-size: 1.05rem; min-height: 44px; }
.brand img { object-fit: contain; }
.brand small { display: block; font-weight: 400; font-size: .8rem; color: var(--ink-soft); }
#mainnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
#mainnav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; text-decoration: none; color: var(--ink); border-radius: 8px; }
#mainnav a:hover { background: var(--bg); }
#mainnav a[aria-current="page"] { color: var(--brand); font-weight: 700; box-shadow: inset 0 -3px 0 var(--brand); border-radius: 0; }
.topright { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.who { text-decoration: none; font-weight: 600; color: var(--ink); min-height: 44px; display: inline-flex; align-items: center; }
.navtoggle { display: none; }
.campusswitch select { min-height: 40px; }
.helpbtn { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--brand); background: #fff; color: var(--brand); font-size: 1.25rem; font-weight: 800; cursor: pointer; flex: 0 0 auto; }
.helpbtn:hover { background: var(--brand); color: #fff; }
.helpbtn.floating { position: fixed; top: 16px; right: 16px; z-index: 20; }

@media (min-width: 761px) {
  .topbar { flex-wrap: nowrap; }
  .brand, .topright { flex: 0 0 auto; }
  #mainnav { flex: 1 1 auto; min-width: 0; }
}
@media (min-width: 761px) and (max-width: 1320px) {
  #mainnav a { padding: 0 8px; }
  .topbar { gap: 10px; }
}

@media (max-width: 760px) {
  .navtoggle { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); background: #fff; border-radius: 8px; font: inherit; margin-left: auto; }
  .topbar { gap: 8px; }
  .brand { flex: 1 1 0; min-width: 0; }
  .brand > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .brand small { overflow: hidden; text-overflow: ellipsis; }
  .navtoggle { order: 2; margin-left: 0; }
  .topbar > .helpbtn { order: 3; }
  #mainnav { display: none; width: 100%; order: 10; }
  #mainnav.open { display: block; }
  #mainnav ul { flex-direction: column; }
  .topright { margin-left: 0; width: 100%; order: 11; justify-content: space-between; }
}

/* Notices */
.impersonate { background: var(--bad); color: #fff; padding: 8px 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.impersonate .linkbtn { color: #fff; text-decoration: underline; }
.notice, .banner { padding: 10px 16px; border-bottom: 1px solid var(--line); }
.notice.warn, .banner.warning { background: #FFF4D6; color: #4A3200; }
.banner.info { background: #E8F0FB; color: #12355B; }
.banner.outage { background: var(--bad); color: #fff; font-weight: 600; }
.flash { padding: 12px 14px; border-radius: var(--radius); margin-bottom: 16px; border: 1px solid; }
.flash.ok { background: #E7F4EC; border-color: #9BCDAE; color: #12462A; }
.flash.error { background: #FCEBEA; border-color: #E8A6A2; color: #7A1A14; }
.flash.info { background: #E8F0FB; border-color: #A8C2E6; color: #12355B; }

/* Cards and layout */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.spread { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.stat { font-size: 2rem; font-weight: 800; color: var(--brand-text); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--bg); border: 1px solid var(--line); }
.pill.ok { background: #E7F4EC; color: #12462A; border-color: #9BCDAE; }
.pill.warn { background: #FFF4D6; color: #4A3200; border-color: #E6C77A; }
.pill.bad { background: #FCEBEA; color: #7A1A14; border-color: #E8A6A2; }

/* Forms */
label { display: block; font-weight: 600; margin: 14px 0 6px; }
.hint { font-weight: 400; color: var(--ink-soft); font-size: .875rem; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=search], select, textarea {
  width: 100%; max-width: 520px; min-height: 44px; padding: 8px 12px; border: 1px solid #8C8486; border-radius: 8px; font: inherit; background: #fff; color: var(--ink);
}
textarea { min-height: 100px; }
input[type=color] { width: 64px; height: 44px; padding: 2px; border: 1px solid #8C8486; border-radius: 8px; background: #fff; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--brand); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 10px 0; }
.check input { margin-top: 2px; flex: 0 0 auto; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 16px 16px; margin: 16px 0; }
legend { font-weight: 700; padding: 0 6px; }
.btn, button.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 8px; border: 2px solid var(--brand); background: var(--brand); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(.85); color: #fff; }
.btn.secondary { background: #fff; color: var(--brand); }
.btn.secondary:hover { background: var(--bg); color: var(--brand); filter: none; }
.btn.danger { background: var(--bad); border-color: var(--bad); }
/* Accent shows as a thin stripe only, so light accents like gold stay readable */
.topbar { box-shadow: inset 0 -6px 0 -3px var(--brand-accent); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); text-decoration: underline; cursor: pointer; min-height: 44px; }
form.inline { display: inline; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

/* Tables */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #FAF8F8; font-size: .875rem; color: var(--ink-soft); }
tr:last-child td { border-bottom: 0; }

/* Sign-in pages: logo, a field or two, one button */
/* Sign-in pages: bold school colors, one white card */
body.authpage {
  background-color: var(--brand);
  background-image:
    radial-gradient(1100px 600px at 110% -10%, color-mix(in srgb, var(--brand-accent) 38%, transparent), transparent 60%),
    radial-gradient(900px 700px at -20% 120%, color-mix(in srgb, #000 35%, transparent), transparent 60%),
    linear-gradient(155deg, var(--brand) 0%, color-mix(in srgb, var(--brand) 72%, #000) 100%);
  background-attachment: fixed;
  min-height: 100vh;
}
body.authpage::before { content: ""; position: fixed; inset: 0 0 auto 0; height: 6px; background: var(--brand-accent); z-index: 1; }
.authwrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 16px 24px; gap: 20px; }
.authbox {
  width: 100%; max-width: 420px; margin: 0; background: #fff; border-radius: 18px; padding: 36px 32px 30px; text-align: center;
  box-shadow: 0 30px 70px rgba(0,0,0,.30), 0 2px 6px rgba(0,0,0,.12); border-top: 6px solid var(--brand-accent);
  flex: 0 0 auto; min-height: 0;
}
.authlogo { max-width: 240px; max-height: 170px; width: auto; height: auto; margin: 0 auto 14px; display: block; }
.authkicker { margin: 0 0 22px; font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); }
.authbox form { text-align: left; }
.authbox label { font-weight: 700; }
.authbox input { max-width: none; min-height: 50px; border-radius: 10px; font-size: 1.05rem; }
.authbox input:focus { outline: 3px solid color-mix(in srgb, var(--brand-accent) 70%, transparent); outline-offset: 1px; border-color: var(--brand); }
.authbox .btn { width: 100%; margin-top: 22px; min-height: 52px; border-radius: 10px; font-size: 1.05rem; letter-spacing: .02em; }
.authbox .below { margin: 18px 0 0; font-size: .92rem; }
.authbox h1 { font-size: 1.3rem; text-align: center; margin-top: 0; }
.authbox .flash { text-align: left; }
.authfoot { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .8rem; color: var(--on-brand); opacity: .88; text-align: center; }
.authfoot strong { letter-spacing: .08em; }
body.authpage .helpbtn.floating { background: #fff; border-color: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
body.authpage .helpbtn.floating:hover { background: var(--brand-accent); color: var(--on-accent); border-color: var(--brand-accent); }
@media (max-width: 480px) {
  .authwrap { justify-content: flex-start; padding-top: 72px; }
  .authbox { padding: 28px 20px 24px; border-radius: 16px; }
  .authlogo { max-width: 200px; max-height: 140px; }
}

/* Public pages (help desk portal, signing page): school-color header */
body.portal .topbar { background: var(--brand); border-bottom: 4px solid var(--brand-accent); box-shadow: none; }
body.portal .topbar .brand, body.portal .topbar .brand small, body.portal .topbar .who, body.portal .topbar a, body.portal .topbar .linkbtn { color: var(--on-brand); }
body.portal .topbar .brand img { background: #fff; border-radius: 10px; padding: 3px; }
body.portal .topbar .helpbtn { background: #fff; border-color: #fff; color: var(--brand); }

/* Help panel */
.helppanel { position: fixed; top: 0; right: 0; height: 100vh; width: min(400px, 100vw); background: #fff; border-left: 4px solid var(--brand); box-shadow: -8px 0 30px rgba(0,0,0,.15); z-index: 50; padding: 16px 20px 24px; overflow-y: auto; }
.helphead { display: flex; justify-content: space-between; align-items: center; }
.helphead h2 { margin: 0; }
.helpclose { width: 44px; height: 44px; border: 0; background: none; font-size: 1.8rem; cursor: pointer; color: var(--ink); }
.helpitem { border-bottom: 1px solid var(--line); padding: 8px 0; }
.helpitem summary { font-weight: 600; cursor: pointer; min-height: 36px; display: flex; align-items: center; }
.helpitem ol { padding-left: 20px; margin: 8px 0; }
.helpitem li { margin: 6px 0; }
.helpmore { font-size: .9rem; color: var(--ink-soft); margin-top: 20px; }

/* Footer */
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 14px 16px; font-size: .8rem; color: var(--ink-soft); border-top: 1px solid var(--line); background: #fff; }
.footer.plain { justify-content: center; border: 0; }

/* QR box for two-step */
.qr { background: #fff; padding: 10px; display: inline-block; border: 1px solid var(--line); border-radius: 8px; }
code.secret { font-size: 1rem; letter-spacing: 2px; word-break: break-all; background: var(--bg); padding: 4px 8px; border-radius: 6px; }
.swatch { display: inline-block; width: 18px; height: 18px; border-radius: 4px; vertical-align: middle; border: 1px solid rgba(0,0,0,.2); }

/* Documents */
.btn.small { min-height: 36px; padding: 0 12px; font-size: .9rem; }
.progress { height: 8px; background: var(--bg); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); margin: 8px 0 4px; }
.progress span { display: block; height: 100%; background: var(--brand); }
.doccard h2 a { text-decoration: none; color: var(--brand-text); }
.doccard h2 a:hover { text-decoration: underline; }
.doclayout { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.doclayout .toc { flex: 1 1 240px; max-width: 300px; position: sticky; top: 12px; }
.doclayout .toc ol { padding-left: 20px; margin: 0; font-size: .9rem; }
.doclayout .toc li { margin: 6px 0; }
.doclayout .toc li.isblank a { color: var(--ink-soft); }
.doclayout .toc .tockey { font-size: .8rem; color: var(--ink-soft); margin: 10px 0 0; }
.docbody { flex: 999 1 560px; min-width: 0; }
@media (max-width: 860px) { .doclayout .toc { position: static; max-width: none; } }
.docsec { scroll-margin-top: 12px; }
.blank { color: var(--ink-soft); font-style: italic; }
.blank .hint { display: block; font-style: normal; margin-top: 4px; }
.richtext { overflow-wrap: anywhere; }
.richtext h2 { font-size: 1.15rem; } .richtext h3 { font-size: 1.05rem; }
.richtext blockquote { border-left: 3px solid var(--line); margin-left: 0; padding-left: 12px; color: var(--ink-soft); }
.richtext .ql-align-center { text-align: center; } .richtext .ql-align-right { text-align: right; } .richtext .ql-align-justify { text-align: justify; }
.richtext .ql-indent-1 { padding-left: 2em; } .richtext .ql-indent-2 { padding-left: 4em; } .richtext .ql-indent-3 { padding-left: 6em; }
.secadmin { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 4px; font-size: .875rem; }
.secadmin .linkbtn:disabled { color: var(--ink-soft); text-decoration: none; cursor: default; }
.plainlist { list-style: none; padding: 0; margin: 0 0 12px; }
.plainlist li { padding: 8px 0; border-bottom: 1px solid var(--line); }
tr.picked td { background: #FFF8E1; }
.ql-toolbar.ql-snow { border-radius: 8px 8px 0 0; border-color: #8C8486; }
.ql-container.ql-snow { border-radius: 0 0 8px 8px; border-color: #8C8486; font-family: var(--font); font-size: 1rem; }
.ql-editor { min-height: 300px; }
details.card > summary { cursor: pointer; min-height: 32px; }

.official { border-left: 4px solid var(--brand); }
.official summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; }

/* Dashboard */
.tiles { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.tile { display: flex; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-decoration: none; color: var(--ink); min-height: 76px; }
.tile:hover { border-color: var(--brand); box-shadow: 0 2px 10px rgba(0,0,0,.06); color: var(--ink); }
.tileicon { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 10px; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1rem; letter-spacing: .5px; }
.tileicon.small { width: 30px; height: 30px; font-size: .75rem; border-radius: 7px; vertical-align: middle; }
.tiletext { display: flex; flex-direction: column; min-width: 0; }
.tiletext span { font-size: .85rem; color: var(--ink-soft); }
.flash.pinned { border-left-width: 6px; }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); flex-wrap: wrap; }
.tabs a { padding: 10px 16px; text-decoration: none; color: var(--ink); min-height: 44px; display: inline-flex; align-items: center; margin-bottom: -2px; }
.tabs a[aria-current="page"] { border-bottom: 3px solid var(--brand); color: var(--brand); font-weight: 700; }
.linkcard { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); margin: 0; }
.linkcard:hover { border-color: var(--brand); color: var(--ink); }
.linkcard strong { color: var(--brand-text); }
.secretbox { display: inline-flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.secretval { font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--bg); padding: 2px 8px; border-radius: 6px; }
.secretval.shown { background: #FFF4D6; user-select: all; }
.richtext pre { background: var(--bg); padding: 10px; border-radius: 8px; overflow-x: auto; }
.richtext table { border-collapse: collapse; margin: 8px 0; }
.richtext td, .richtext th { border: 1px solid var(--line); padding: 6px 10px; }

/* Help desk */
.ticketlayout { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; margin-top: 16px; }
.ticketmain { flex: 999 1 560px; min-width: 0; }
.ticketside { flex: 1 1 280px; max-width: 360px; }
.ticketside select, .ticketside input, .ticketside textarea { max-width: none; }
@media (max-width: 900px) { .ticketside { max-width: none; } }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.facts > div { display: contents; }
.facts dt { color: var(--ink-soft); font-size: .875rem; padding-top: 2px; }
.facts dd { margin: 0; }
.thread { list-style: none; padding: 0; margin: 0 0 20px; }
.thread .msg { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin: 10px 0; }
.thread .msg.first { border-left: 4px solid var(--brand); }
.thread .msg.internal { background: #FFF8E1; border-color: #E6C77A; }
.thread .msghead { margin-bottom: 4px; }
.thread .msgbody { white-space: normal; overflow-wrap: anywhere; }
.thread .event { padding: 4px 16px; }
tr.row-late td { background: #FDF1F0; }
tr.row-soon td { background: #FFF9E8; }
body.portal main { max-width: 820px; }

/* Monitoring and status lights */
.light { display:inline-block; width:12px; height:12px; border-radius:50%; background:#9CA3AF; vertical-align:middle; box-shadow:0 0 0 2px #fff, 0 0 0 3px rgba(0,0,0,.12); flex:0 0 auto; }
.light.up { background:#16A34A; }
.light.issues { background:#EAB308; }
.light.down { background:#DC2626; }
.lighttext { margin-left:8px; font-weight:600; vertical-align:middle; }
.tile { position:relative; }
.tile .light { position:absolute; top:10px; right:10px; }
.tile .tilenote { display:block; font-size:.8rem; margin-top:4px; font-weight:600; }
.tile .tilenote.issues { color:#8A6100; } .tile .tilenote.down { color:var(--bad); }
details.setstatus { margin-top:6px; } details.setstatus summary { cursor:pointer; color:var(--brand); text-decoration:underline; }
details.setstatus form { margin-top:8px; padding:12px; border:1px solid var(--line); border-radius:8px; background:var(--card); min-width:240px; }
pre.copyable { white-space:pre-wrap; word-break:break-all; background:#F3F4F6; padding:12px; border-radius:8px; margin-bottom:6px; }
.copybtn { margin-bottom:12px; }
.sitelist li { display:flex; gap:10px; align-items:flex-start; }
[hidden] { display:none !important; }
@media (max-width: 760px) {
  table.montable thead { position:absolute; left:-9999px; }
  table.montable, table.montable tbody, table.montable tr, table.montable td { display:block; width:auto; }
  table.montable tr { padding:12px 14px; border-bottom:1px solid var(--line); }
  table.montable td { border:0; padding:3px 0; }
}
.mobilelabel { display:none; }
@media (max-width: 760px) {
  .mobilelabel { display:inline; color:var(--ink-soft); }
  table.montable tr.row-late { background:#FDF1F0; } table.montable tr.row-soon { background:#FFF9E8; }
}

/* Google reviews */
.stars { color:#E8A317; letter-spacing:1px; white-space:nowrap; }
.stars .off { color:#D6D3D1; }
.reviewlist { list-style:none; padding:0; margin:12px 0 0; display:flex; flex-direction:column; gap:12px; }
.review.low { border-left:4px solid var(--bad); }
.reviewtext { margin:10px 0; }
a.pill { text-decoration:none; }

/* Signatures */
.progress { height:8px; background:#ECE7E8; border-radius:99px; overflow:hidden; margin:6px 0 2px; }
.progress span { display:block; height:100%; background:var(--ok, #16A34A); border-radius:99px; }
.picklist { max-height:320px; overflow:auto; border:1px solid var(--line); border-radius:8px; padding:6px 10px; background:#fff; }
.picklist li { padding:3px 0; }
.signdoc { line-height:1.6; } .signdoc h2 { font-size:1.15rem; margin:1.2em 0 .4em; color:var(--brand-text); } .signdoc h2:first-child { margin-top:0; }
.signpage main { max-width:780px; }
.signform .signinput { font-size:1.4rem; font-family:"Brush Script MT","Segoe Script","Lucida Handwriting",cursive; max-width:none; }
.signdone .big, .card .big { font-size:1.25rem; font-weight:700; margin-top:0; }
.signame { font-family:"Brush Script MT","Segoe Script","Lucida Handwriting",cursive; font-size:1.3rem; }
.req { color:var(--bad); }
.fieldlist { list-style:none; padding:0; display:flex; flex-direction:column; gap:10px; }
.fieldrow { padding:12px 16px; }
fieldset.radios label.check { margin:6px 0; }

/* MCG notes */
.notelist { list-style:none; padding:0; display:flex; flex-direction:column; gap:12px; }
.note.pinned { border-left:4px solid var(--brand); }
.note.done { opacity:.7; }
.notebody { margin:10px 0; white-space:normal; line-height:1.55; }

/* Help manual */
.helpsearch { display:flex; gap:6px; margin:0 0 12px; } .helpsearch input { flex:1; min-width:0; }
.manualsearch { margin:12px 0 16px; }
.manuallayout { display:flex; gap:20px; align-items:flex-start; }
.manualtoc { flex:0 0 240px; position:sticky; top:16px; } .manualtoc ol { padding-left:18px; margin:8px 0 0; } .manualtoc li { margin:4px 0; }
.manual { flex:1 1 auto; min-width:0; }
.chapter h2 { margin-top:6px; }
.art { margin-bottom:10px; } .art ol { margin:8px 0 0; padding-left:22px; } .art li { margin:3px 0; }
@media (max-width: 860px) { .manuallayout { display:block; } .manualtoc { position:static; margin-bottom:16px; } }
@media print { .topbar, .footer, .helpbtn, .manualsearch, .manualtoc, .btn, .banner, .notice { display:none !important; } .art { break-inside:avoid; border:0; box-shadow:none; } }

/* UniFi */
.spark { display:flex; align-items:flex-end; gap:2px; height:72px; padding:4px 0; border-bottom:1px solid var(--line); }
.spark span { flex:1 1 0; min-width:2px; background:var(--brand); opacity:.75; border-radius:2px 2px 0 0; }
.spark span.bad { background:#DC2626; opacity:1; }
.unifistats .stat { font-size:1.6rem; }
.unifiline { display:flex; flex-wrap:wrap; gap:4px 14px; }

/* Securly */
details.securly > summary { cursor:pointer; list-style:none; }
details.securly > summary::-webkit-details-marker { display:none; }
details.securly.urgent { border-left:4px solid #DC2626; }
.alerttext { background:var(--bg); border:1px solid var(--line); border-radius:8px; padding:10px 12px; font-size:.95rem; max-height:320px; overflow:auto; }

/* Confirm box: says what each button does; the safe choice is the filled one */
dialog.confirmbox { border: 0; border-radius: 14px; padding: 22px 24px; max-width: 440px; width: calc(100% - 32px); box-shadow: 0 20px 50px rgba(0,0,0,.25); }
dialog.confirmbox::backdrop { background: rgba(20,16,18,.45); }
dialog.confirmbox p { margin: 0 0 18px; font-size: 1.05rem; line-height: 1.5; }
dialog.confirmbox .row { justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.btn.dangerline { background: #fff; color: var(--bad); border-color: var(--bad); }
.btn.dangerline:hover { background: #FCEBEA; color: var(--bad); filter: none; }

/* Status lights carry a mark too, so they don't rely on color alone */
.light { position: relative; }
.light.issues::after, .light.down::after { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font: 800 9px/1 system-ui, sans-serif; }
.light.issues::after { content: "!"; color: #3B2A00; }
.light.down::after { content: "×"; font-size: 11px; }

/* Selected filters get a filled background, not just a border */
nav.row a[aria-current="page"].pill { background: var(--brand); color: var(--on-brand); border-color: var(--brand); text-decoration: none; }

/* Comfortable reading width for running text */
main p:not(.row):not(.spread), main ol > li, .hint { max-width: 75ch; }
