/* ===================== base ===================== */
:root {
  --portal-accent: #000080;
  --corp-blue: #2b6cb0;
  --corp-blue-dark: #1e4e8c;
  --corp-bg: #eef3f8;
  --corp-text: #2d3748;
  --corp-muted: #718096;
  --xp-face: #ece9d8;
  --xp-a: #0997ff;
  --xp-b: #0053ee;
  --xp-c: #0046d8;
  --blood: #8a0303;
  --blood-bright: #e3001b;
  --flesh: #ff4d6d;
  --acid: #b6ff00;
  --ink: #050000;
  --infect: 0;              /* 0..1, driven by JS */
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  color: #000;
  background: #fff;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}
a { color: #0000ee; } a:visited { color: #551a8b; }
[hidden] { display: none !important; }
.view { min-height: 100vh; min-height: 100dvh; }
.muted { color: #666; }
.tiny { font-size: 11px; }
.small { font-size: 12px; }
.red { color: #f00; }

/* ===================== corporate (2001 intranet) ===================== */
.corp-wrap { max-width: 780px; margin: 0 auto; padding: 0 8px; }
.corp-topbar { background: var(--portal-accent); color: #fff; border-bottom: 2px solid #c0c0c0; }
.corp-topbar .corp-wrap { display: flex; align-items: center; justify-content: space-between; height: 46px; }
.corp-logo { display: flex; align-items: center; gap: 8px; font: bold 18px "Times New Roman", Times, serif; color: #fff; letter-spacing: 0; }
.corp-logo b { font-weight: bold; color: #ffff00; }
.corp-mark { display: inline-grid; place-items: center; width: 28px; height: 28px; background: #c0c0c0; color: var(--portal-accent); font: bold 18px Arial, sans-serif; border: 2px outset #fff; }
.corp-topnav { display: flex; gap: 10px; font-size: 11px; align-items: center; color: #fff; }
.corp-topnav a { color: #fff; }
.corp-topnav a:visited { color: #ffccff; }
.corp-band { background: #6699cc url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='8'><rect width='8' height='8' fill='%236699cc'/><rect width='4' height='4' fill='%236f9fd1'/><rect x='4' y='4' width='4' height='4' fill='%236f9fd1'/></svg>"); color: #fff; padding: 10px 0; border-bottom: 3px ridge #c0c0c0; }
.corp-band h1 { margin: 0 0 2px; font: bold 22px "Times New Roman", Times, serif; text-shadow: 1px 1px 0 #000; }
.corp-band p { margin: 0; font-size: 11px; }
.marquee { background: #ffffcc; border-top: 1px solid #999; border-bottom: 1px solid #999; overflow: hidden; white-space: nowrap; font: 11px Verdana, Arial, sans-serif; color: #800000; }
.marquee > span { display: inline-block; padding: 4px 0; animation: marq 28s linear infinite; }
@keyframes marq { from { transform: translateX(100vw) } to { transform: translateX(-100%) } }
.corp-main { display: grid; grid-template-columns: 1fr 230px; gap: 12px; padding-top: 12px; padding-bottom: 20px; }
.corp-card { background: #fff; border: 1px solid #808080; border-radius: 0; padding: 0 0 10px; box-shadow: none; }
.corp-card > h2, .corp-card > h3, .mail-head { background: var(--portal-accent); color: #fff; margin: 0 0 10px; padding: 4px 8px; font: bold 12px Arial, Helvetica, sans-serif; border: 0; }
.mail-head h3 { background: none; margin: 0; padding: 0; color: #fff; }
.mail-head .muted { color: #ccc; }
.corp-card > :not(h2):not(h3):not(.mail-head):not(.mail-list):not(.mail-view) { margin-left: 10px; margin-right: 10px; }
.corp-card h2 { font-size: 14px; }
.login-card label { display: block; font-size: 11px; margin: 10px 0 2px; color: #000; font-weight: bold; }
.login-card input[type=text], .login-card input[type=password] {
  width: 100%; padding: 3px 4px; font: 16px Arial, sans-serif; border: 2px inset #808080; border-radius: 0; background: #fff; box-shadow: none;
}
.login-card input:focus { outline: 1px dotted #000; box-shadow: none; border-color: #808080; }
.row-between { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 10px; flex-wrap: wrap; font-size: 11px; }
.check { display: flex !important; align-items: center; gap: 4px; margin: 0 !important; font-weight: normal !important; }
.btn-glossy, .xp-btn.attach-open {
  width: auto; margin-top: 12px; padding: 3px 16px; font: 12px Arial, sans-serif; color: #000; cursor: pointer;
  border: 2px outset #fff; border-radius: 0; background: #d4d0c8; text-shadow: none; box-shadow: none;
}
.btn-glossy:hover { filter: none; background: #e0dcd4; }
.btn-glossy:active { border-style: inset; transform: none; }
.arrow { display: none; }
.error { background: #fff; border: 1px solid #f00; color: #f00; padding: 4px 6px; border-radius: 0; margin-top: 8px; font: bold 11px Arial, sans-serif; }
.news { list-style: square; padding: 0 0 0 16px; margin: 0; font-size: 11px; }
.news li { padding: 3px 0; border: 0; }
.status-pill { margin: 10px 10px 0; font: bold 11px Arial, sans-serif; color: #008000; background: none; border: 0; border-radius: 0; padding: 0; display: block; }
.dot { display: none; }
.corp-footer { border-top: 2px solid #c0c0c0; padding: 10px 0 24px; font: 10px Verdana, Arial, sans-serif; color: #666; background: #fff; text-align: center; }
.corp-footer .corp-wrap { display: block; }
.corp-footer p { margin: 3px 0; }
.counter { display: inline-block; font: 13px "Courier New", monospace; background: #000; color: #0f0; padding: 1px 5px; border: 1px solid #666; letter-spacing: 2px; }
.corp-tabs { background: #c0c0c0; border-bottom: 1px solid #808080; }
.corp-tabs .corp-wrap { display: flex; flex-wrap: wrap; gap: 2px; padding-top: 3px; padding-bottom: 3px; }
.corp-tabs a { padding: 5px 8px; font: 11px Arial, sans-serif; color: var(--portal-accent); text-decoration: underline; background: #d4d0c8; border: 1px solid #808080; border-bottom: 0; white-space: nowrap; cursor: pointer; }
.corp-tabs a.active { color: #000; text-decoration: none; background: #fff; font-weight: bold; border-bottom: 0; }
.badge { display: inline; min-width: 0; padding: 0; border-radius: 0; background: none; color: #f00; font: bold 11px Arial, sans-serif; margin-left: 2px; }
.badge::before { content: "("; } .badge::after { content: " new)"; }
.kv { width: calc(100% - 20px); margin: 0 10px; border-collapse: collapse; font-size: 11px; }
.kv td { padding: 3px 4px; border: 1px solid #c0c0c0; }
.kv td:first-child { background: #f0f0f0; font-weight: bold; color: #000; width: 40%; }
.kv tr:nth-child(even) td:last-child { background: #f8f8f8; }
.bar { height: 12px; margin: 0 10px; background: #fff; border: 1px inset #808080; border-radius: 0; overflow: hidden; box-shadow: none; }
.fill { height: 100%; background: var(--portal-accent); transition: width 1.5s, background 1.5s; }
.plain { list-style: square; padding: 0 0 0 26px; margin: 0; font-size: 11px; }
.plain li { padding: 2px 0; border: 0; }
.side-stack { display: flex; flex-direction: column; gap: 12px; }
.corp-card p.muted.small { font-size: 11px; }

/* mail */
.mail-card { padding: 0 0 10px; overflow: hidden; display: flex; flex-direction: column; }
.mail-head { display: flex; justify-content: space-between; align-items: baseline; }
.mail-list { list-style: none; margin: 0 10px; padding: 0; border: 1px solid #808080; }
.mail-item { display: grid; grid-template-columns: 130px 1fr 44px; gap: 8px; padding: 4px 6px; font: 11px Arial, sans-serif; cursor: pointer; border-bottom: 1px solid #c0c0c0; align-items: center; background: #fff; }
.mail-item:nth-child(even) { background: #f0f0f0; }
.mail-item:hover { background: #ffffcc; }
.mail-item.sel { background: var(--portal-accent); color: #fff; }
.mail-item.sel .when { color: #ccc; }
.mail-item.unread { font-weight: bold; }
.mail-item .from, .mail-item .subj { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-item .when { color: #666; font-size: 10px; text-align: right; }
.mail-item .clip { font-size: 11px; margin-right: 3px; }
.mail-view { padding: 10px; font: 12px "Times New Roman", Times, serif; line-height: 1.4; }
.mail-meta { padding-bottom: 6px; border-bottom: 1px dotted #808080; margin-bottom: 8px; font-family: Arial, sans-serif; font-size: 12px; }
.mail-text p { margin: 0 0 8px; }
.attach { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 6px 8px; background: #f0f0f0; border: 1px solid #808080; border-radius: 0; flex-wrap: wrap; font-family: Arial, sans-serif; font-size: 11px; }
.attach-icon { font-size: 18px; }
.attach-name { font-weight: bold; font-family: "Courier New", monospace; }
.attach-open { margin: 0 0 0 auto !important; }
.toast {
  position: fixed; right: 12px; bottom: 12px; z-index: 40; display: flex; gap: 10px; align-items: center;
  width: 300px; max-width: calc(100vw - 24px); padding: 8px 10px; cursor: pointer;
  background: #ffffe1; border: 1px solid #000; border-radius: 0; box-shadow: 2px 2px 0 #808080; font: 11px Arial, sans-serif; animation: slidein .3s ease-out;
}
@keyframes slidein { from { transform: translateY(120%); opacity: 0 } to { transform: none; opacity: 1 } }
.toast-icon { font-size: 20px; color: var(--portal-accent); }
.hr { border: 0; border-top: 1px solid #808080; border-bottom: 1px solid #fff; margin: 8px 0; }

@media (max-width: 720px) {
  .corp-main { grid-template-columns: 1fr; }
  .corp-topnav { flex-wrap: wrap; }
  .corp-band h1 { font-size: 18px; }
  .mail-item { grid-template-columns: 1fr 40px; }
  .mail-item .from { grid-column: 1; font-size: 10px; color: #666; }
  .mail-item.sel .from { color: #ddd; }
  .mail-item .when { grid-row: 1 / span 2; grid-column: 2; }
  .mail-item .subj { grid-column: 1; }
}

/* ===================== INFECTION: colour bleed ===================== */
/* --infect is 0..1. The whole portal slides from corporate blue to arterial red. */
body.infected .corp-topbar { background: linear-gradient(#fff, color-mix(in srgb, #e6edf5, var(--blood) calc(var(--infect) * 100%))); }
body.infected .corp-band,
body.infected .corp-mark,
body.infected .fill { background: color-mix(in srgb, #1e4e8c, var(--blood-bright) calc(var(--infect) * 100%)); }
body.infected .corp-tabs a.active { border-bottom-color: color-mix(in srgb, var(--corp-blue), var(--blood-bright) calc(var(--infect) * 100%)); color: color-mix(in srgb, var(--corp-blue-dark), var(--blood) calc(var(--infect) * 100%)); }
body.infected .corp-card { border-color: color-mix(in srgb, #cfd9e5, var(--blood) calc(var(--infect) * 100%)); background: color-mix(in srgb, #fff, #1a0000 calc(var(--infect) * 85%)); color: color-mix(in srgb, var(--corp-text), #ffd4d4 calc(var(--infect) * 100%)); }
body.infected .corp-card h3 { color: color-mix(in srgb, var(--corp-blue-dark), var(--flesh) calc(var(--infect) * 100%)); border-bottom-color: color-mix(in srgb, #e2e8f0, var(--blood) calc(var(--infect) * 100%)); }
body.infected { background: color-mix(in srgb, var(--corp-bg), var(--ink) calc(var(--infect) * 100%)); }
body.infected .muted { color: color-mix(in srgb, var(--corp-muted), var(--flesh) calc(var(--infect) * 80%)); }
body.infected .mail-item { border-bottom-color: color-mix(in srgb, #edf2f7, var(--blood) calc(var(--infect) * 100%)); }
body.infected .mail-item.unread { background: color-mix(in srgb, #fffbea, var(--blood) calc(var(--infect) * 100%)); color: #fff; }
body.infected .xp-title { background: linear-gradient(color-mix(in srgb, var(--xp-a), var(--blood-bright) calc(var(--infect) * 100%)), color-mix(in srgb, var(--xp-b), var(--blood) calc(var(--infect) * 100%)) 60%, color-mix(in srgb, var(--xp-c), #3a0000 calc(var(--infect) * 100%))); }
body.infected .xp-win { border-color: color-mix(in srgb, #0831d9, var(--blood) calc(var(--infect) * 100%)); }
body.deep .xp-win { background: #1a0000; color: #ffd4d4; box-shadow: 0 6px 24px rgba(0,0,0,.7), 0 0 18px rgba(227,0,27,.35); }
body.deep .xp-btn { background: #3a0000; color: #fff; border-color: var(--blood-bright); }
body.deep .xp-btn:active { background: var(--blood); }
.corrupt { transition: color .3s, letter-spacing .3s; }
body.infected .glitch-text { color: var(--blood-bright) !important; letter-spacing: .04em; font-family: "Courier New", monospace; }

/* ===================== chaos layer ===================== */
#chaos { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
#vignette { position: absolute; inset: 0; opacity: var(--infect); background: radial-gradient(ellipse at center, transparent 40%, rgba(90,0,0,.55) 75%, rgba(30,0,0,.95) 100%); transition: opacity .5s; }
#blood { position: absolute; top: 0; left: 0; right: 0; height: 0; pointer-events: none; }
.drip { position: absolute; top: -10px; width: 14px; background: linear-gradient(var(--blood-bright), var(--blood)); border-radius: 0 0 10px 10px; height: 0; animation: drip var(--d, 6s) cubic-bezier(.3,.8,.6,1) forwards; box-shadow: 0 0 12px rgba(227,0,27,.6); }
.drip::after { content: ""; position: absolute; left: -3px; bottom: -8px; width: 20px; height: 20px; border-radius: 50%; background: var(--blood); }
@keyframes drip { to { height: var(--h, 60vh); } }
#windows { position: absolute; inset: 0; }
.xp-win {
  position: absolute; width: 320px; max-width: calc(100vw - 16px);
  background: var(--xp-face); border: 1px solid #0831d9; border-radius: 8px 8px 0 0;
  box-shadow: 0 6px 24px rgba(0,0,0,.45);
  font-family: Tahoma, Verdana, sans-serif; font-size: 12px; color: #000;
  pointer-events: auto; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  
}
.xp-title {
  display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 6px 0 8px;
  color: #fff; font-weight: bold; text-shadow: 1px 1px 0 rgba(0,0,0,.6);
  background: linear-gradient(var(--xp-a), var(--xp-b) 60%, var(--xp-c));
  border-radius: 7px 7px 0 0; cursor: move; touch-action: none;
}
.xp-title .xp-icon { font-size: 14px; }
.xp-title span:nth-child(2) { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xp-x {
  width: 21px; height: 21px; border: 1px solid #fff; border-radius: 3px; color: #fff; font-weight: bold; font-size: 14px; line-height: 19px; text-align: center; cursor: pointer;
  background: linear-gradient(#e9775b, #d7442a 50%, #c0391f); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
}
.xp-body { display: flex; gap: 12px; padding: 14px 12px 12px; align-items: flex-start; }
.xp-body .big { font-size: 30px; line-height: 1; }
.xp-msg { flex: 1; line-height: 1.4; }
.xp-btns { display: flex; justify-content: flex-end; gap: 6px; padding: 0 12px 12px; }
.xp-btn {
  min-width: 74px; padding: 5px 10px; font: inherit; font-size: 12px; cursor: pointer; border-radius: 3px;
  border: 1px solid #003c74; background: linear-gradient(#fff, #ecebe4 85%, #d8d6c8); color: #000; touch-action: manipulation;
}
.xp-btn:active { background: #e0ddd0; }
.xp-progress { height: 16px; margin: 6px 0 2px; border: 1px solid #7a7a7a; background: #fff; padding: 2px; }
.xp-progress i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, #2fc239 0 8px, transparent 8px 10px); transition: width .3s; }
body.infected .xp-progress i { background: repeating-linear-gradient(90deg, var(--blood-bright) 0 8px, transparent 8px 10px); }
.xp-modal { left: 50%; top: 50%; transform: translate(-50%, -50%); width: 380px; z-index: 70; }
.chaser { width: 220px; z-index: 60; will-change: transform; }
.chaser .xp-body { align-items: center; }
.chaser-face { font-size: 34px; line-height: 1;  }
.chaser-text { font-weight: bold; }

#scanlines { position: absolute; inset: 0; opacity: 0; mix-blend-mode: multiply; background: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px); transition: opacity .6s; }

body.storm { overflow: hidden; }

/* ===================== the end ===================== */
body.phase-rave { background: #000; color: #fff; overflow: hidden; }
#view-rave { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; animation: fadein 1.2s ease-out; }
@keyframes fadein { from { opacity: 0 } to { opacity: 1 } }
.rave-center { text-align: center; padding: 20px; }
.rave-title { font: 900 clamp(44px, 14vw, 200px)/0.95 Impact, "Arial Black", Helvetica, sans-serif; letter-spacing: -.02em; margin: 0; color: #e3001b; text-transform: uppercase; }
.rave-logout { position: fixed; bottom: 14px; right: 16px; font: 11px Arial, sans-serif; color: #444; text-decoration: none; }
.rave-logout:hover { color: #999; }

@media (max-width: 760px) {
  .xp-win { width: 260px; }
  .xp-modal { width: calc(100vw - 24px); }
  .xp-body .big { font-size: 26px; }
  .chaser { width: 170px; }
}

@media (prefers-reduced-motion: reduce) {
}

/* extra dashboard bits */
.ok { color: #008000; } .warn { color: #ff8c00; }
.links li a { text-decoration: none; }
.links li a:hover { text-decoration: underline; }

/* ===================== content pages ===================== */
.page-col { min-width: 0; }
.page-host .corp-card { margin-bottom: 12px; }
.page-host .corp-card > p, .page-host .corp-card > ul, .page-host .corp-card > ol, .page-host .corp-card > div, .page-host .corp-card > table.tbl, .page-host .corp-card > hr { margin-left: 10px; margin-right: 10px; }
.page-host p { font-size: 12px; line-height: 1.45; margin: 0 0 8px; }
.tbl { width: calc(100% - 20px); border-collapse: collapse; font: 11px Arial, sans-serif; margin: 0 10px 10px; }
.tbl th { background: #c0c0c0; color: #000; text-align: left; padding: 3px 5px; border: 1px solid #808080; font-weight: bold; }
.tbl td { padding: 3px 5px; border: 1px solid #c0c0c0; vertical-align: top; }
.tbl tbody tr:nth-child(even) td { background: #f0f0f0; }
.tbl .num { text-align: right; font-family: "Courier New", monospace; }
.note { background: #ffffcc; border: 1px solid #999; padding: 6px 8px; font-size: 11px; margin: 0 10px 10px; }
.note.grey { background: #f0f0f0; }
.form-row { display: grid; grid-template-columns: 160px 1fr; gap: 8px; align-items: center; margin: 0 10px 6px; font-size: 11px; }
.form-row label { font-weight: bold; }
.form-row input, .form-row select, .form-row textarea { font: 12px Arial, sans-serif; border: 2px inset #808080; background: #fff; padding: 2px 4px; width: 100%; max-width: 320px; }
.btn { padding: 3px 14px; font: 12px Arial, sans-serif; color: #000; cursor: pointer; border: 2px outset #fff; background: #d4d0c8; }
.btn:active { border-style: inset; }
.page-host .plain { margin: 0 10px 8px 26px; }
.page-host .kv { margin-bottom: 10px; }
.page-host .hr { margin: 8px 10px; }
.marquee .marquee-name { font-weight: bold; }
@media (max-width: 720px) { .form-row { grid-template-columns: 1fr; } .tbl { display: block; overflow-x: auto; } }

/* ===================== message board ===================== */
.board-post { border: 1px solid #c0c0c0; margin: 0 10px 8px; background: #fff; }
.board-post:nth-child(even) { background: #f7f7f7; }
.board-head { background: #e8e8e8; border-bottom: 1px solid #c0c0c0; padding: 3px 8px; font: 11px Arial, sans-serif; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.board-head b { color: var(--portal-accent); }
.board-body { padding: 6px 8px; font: 12px "Times New Roman", Times, serif; white-space: pre-wrap; word-break: break-word; }
.board-form textarea { width: calc(100% - 20px); margin: 0 10px 6px; font: 12px Arial, sans-serif; border: 2px inset #808080; padding: 4px; min-height: 64px; }
.board-form .row { display: flex; gap: 8px; align-items: center; margin: 0 10px 10px; font-size: 11px; }
.board-empty { margin: 0 10px 10px; font-size: 11px; }
.rave-back { position: fixed; bottom: 14px; left: 16px; font: 11px Arial, sans-serif; color: #444; text-decoration: none; }
.rave-back:hover { color: #999; }

/* Small newsletter images, kept inside the existing ESS layout. */
.public-main { max-width: 510px; padding-top: 26px; padding-bottom: 22px; }
.portal-intro { margin: 0 0 16px; font-size: 11px; color: #555; text-align: center; }
.public-caption { line-height: 1.5; margin-top: 16px; }
.public-enquiry p { margin: 10px; }
.public-enquiry .form-row { grid-template-columns: 140px 1fr; }
.corp-topnav #portal-user { color: #d8d8e8; }
.corp-topbar .corp-wrap { min-height: 90px; height: auto; padding-top: 6px; padding-bottom: 6px; gap: 10px; flex-wrap: wrap; }
.brand-logo { display: block; width: 280px; height: 94px; object-fit: contain; background: #fff; border: 1px solid #c0c0c0; }
.staff-photo { display: block; width: calc(100% - 20px); max-width: 200px; height: auto; border: 1px solid #808080; padding: 3px; background: #fff; }
.staff-feature { display: flex; align-items: flex-start; gap: 12px; }
.staff-feature .staff-photo { width: 112px; flex: 0 0 112px; margin: 0; }
.staff-feature p { margin-left: 0; }
.storm-controls { position: fixed; z-index: 200; bottom: 0; left: 0; right: 0; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 8px max(10px, env(safe-area-inset-bottom)); background: #d4d0c8; border-top: 2px outset #fff; color: #000; pointer-events: auto; }
.storm-controls .btn { min-height: 36px; }
#storm-stop { font-weight: bold; }
.board-reactions { display: flex; flex-wrap: wrap; gap: 5px; padding: 4px 8px 8px; }
.board-reactions .btn { padding: 4px 8px; min-height: 30px; font-size: 11px; }
.reaction[aria-pressed=true] { background: #ffffcc; border-style: inset; color: var(--portal-accent); }
button:disabled { cursor: wait; opacity: .6; }
.rave-back, .rave-logout { color: #ccc; padding: 12px 6px; }
.rave-back:hover, .rave-logout:hover { color: #fff; }
.xp-x { padding: 0; flex: 0 0 21px; }
@media (max-width: 480px) { .corp-topnav { flex-wrap: wrap; justify-content: flex-start; padding-bottom: 4px; } .corp-logo { gap: 8px; } .brand-logo { width: 240px; height: 80px; } .storm-controls > span:first-child { display: none; } .storm-controls { gap: 5px; } .rave-back { max-width: 75%; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } .marquee > span { white-space: normal; } }

/* Persistent new-mail signposting, without flashing or repeated interruptions. */
.invite-notice { margin: 10px; padding: 10px; border: 2px solid #808000; background: #ffffcc; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; font: 12px Arial, sans-serif; }
.invite-notice b { color: #800000; }
.invite-notice .btn { margin-left: auto; }
.toast { box-sizing: border-box; cursor: default; border: 2px outset #ddd; width: 340px; }
.toast p { margin: 6px 0 10px; line-height: 1.4; }
.rave-transmission { font: 12px/1.6 "Courier New", monospace; overflow-wrap: anywhere; }

.board-pet { display: block; object-fit: cover; border: 1px solid #808080; padding: 3px; background: white; max-width: 100%; height: auto; }
.board-reply { margin: 0 10px 0 24px; padding: 7px; border-top: 1px dotted #aaa; font: 11px/1.4 Arial, sans-serif; }
.board-archive-note { padding: 0 10px; }

.notice-posters { display: flex; flex-wrap: wrap; gap: 12px; padding-bottom: 8px; }
.notice-posters img { display: block; width: 180px; max-width: 100%; height: auto; border: 1px solid #808080; }

.thread-replies { margin-left: 20px; border-left: 1px solid #aaa; }
.thread-reply { border-top: 1px dotted #aaa; }
.reply-composer { margin: 6px 8px 10px; font: 11px Arial, sans-serif; }
.reply-composer summary { cursor: pointer; color: var(--portal-accent); text-decoration: underline; padding: 5px 0; }
.reply-form label { display: block; margin: 6px 0; }
.reply-form textarea { display: block; box-sizing: border-box; width: 100%; min-height: 60px; margin-bottom: 6px; font: 12px Arial, sans-serif; border: 2px inset #808080; }

.board-pagination { display:flex; flex-wrap:wrap; align-items:center; gap:6px; padding:8px 10px; font:11px Arial,sans-serif; }
.board-pagination [aria-current] { color:#fff; background:var(--portal-accent); opacity:1; }
.board-timeline .reply-form { margin: 8px 10px 10px 28px; font:11px Arial,sans-serif; }
.board-timeline .reply-form textarea { min-height:42px; }
.board-closed { padding:4px 8px; color:#666; font:11px Arial,sans-serif; }
.management-post > .board-head { background:#ffffcc; }
.management-post > .board-body { background:#ffffef; }
.board-body .board-pet { margin-top:8px; }

/* The infection leaves a red intranet for this visit. Content stays intact. */
body.post-virus { --portal-accent: #8a0303; --corp-blue: #a10b13; --corp-blue-dark: #650008; background: #fff; }
.post-virus a, .post-virus a:visited { color: #8a0303; }
.post-virus .corp-topnav a, .post-virus .corp-topnav a:visited { color: #fff; }
.post-virus .corp-topbar { border-bottom: 4px solid #520006; position: relative; }
.post-virus .corp-logo::after { content: "HALLOWEEN"; color: #fff; font: bold 10px "Courier New", monospace; letter-spacing: 1px; border: 1px solid #c67c7c; padding: 4px; }
.post-virus .corp-band { background: #8a0303; }
.post-virus .corp-tabs { background: #eadada; border-color: #8a0303; }
.post-virus .corp-tabs a { color: #8a0303; background: #fff; border-color: #ac7777; }
.post-virus .corp-tabs a.active { background: #8a0303; color: #fff; }
.post-virus .corp-card { border-color: #a77474; background: #fff; }
.post-virus .marquee { background: #fff; color: #8a0303; border-color: #8a0303; }
.post-virus .btn, .post-virus .xp-btn.attach-open { border-color: #c69494; color: #650008; background: #fff; }
.post-virus .board-pagination [aria-current] { background: #8a0303; color: #fff; }
.post-virus .reaction[aria-pressed=true] { background: #f7e8e8; color: #650008; }
.post-virus .corp-footer { border-color: #8a0303; }
.post-virus .corp-footer::before { content: "* * * HAPPY HALLOWEEN * * *"; display: block; color: #8a0303; font: bold 11px "Courier New", monospace; margin-bottom: 8px; }
.post-virus .brand-logo { filter: grayscale(1); }

.guest-message { border: 1px solid #b52028; border-left-width: 3px; background: #fff; }
.guest-label { display: inline-block; padding: 1px 4px; margin-right: 3px; border: 1px solid #b52028; color: #8a0303; background: #fff; font: bold 9px Verdana, sans-serif; letter-spacing: .4px; vertical-align: middle; }
.post-virus .guest-message { border-color: #6b3c00; border-left-width: 3px; }
.post-virus .guest-label { color: #573300; border-color: #a77730; background: #fff6d9; }

.rsvp-panel { border:1px solid #808080; background:#fff; padding:10px; margin-top:16px; font:12px Arial,sans-serif; }
.rsvp-panel .btn[aria-pressed=true] { border-style:inset; font-weight:bold; background:#ffffcc; }

/* Compact reactions: one quiet line, full names in the hover title. */
.board-reactions { gap:2px; padding:2px 7px 5px; align-items:center; }
.board-reactions .btn.reaction { min-height:24px; min-width:32px; padding:2px 4px; border:1px solid transparent; background:transparent; color:#555; font:12px "Courier New",monospace; box-shadow:none; }
.board-reactions .reaction span { font:10px Arial,sans-serif; color:#666; }
.board-reactions .reaction:hover, .board-reactions .reaction:focus-visible { background:#f0f0f0; border-color:#ccc; }
.board-reactions .reaction[aria-pressed=true] { background:#edf0f8; border:1px solid #8c96ae; color:#000080; }
.post-virus .board-reactions .reaction[aria-pressed=true] { background:#f8ecec; border-color:#b77979; color:#8a0303; }

/* ===================== admin ===================== */
.tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 0 10px 10px; }
.tile { border: 1px solid #808080; background: #f0f0f0; padding: 6px 8px; text-align: center; }
.tile b { display: block; font: bold 20px Arial, sans-serif; color: #000080; }
.tile span { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: #333; }
.chip { display: inline-block; padding: 0 6px; border: 1px solid #808080; font: 10px Arial, sans-serif; background: #e8e8e8; margin-right: 3px; white-space: nowrap; }
.chip.going { background: #d6f5d6; border-color: #2e7d32; color: #1b5e20; }
.chip.declined { background: #fde2e2; border-color: #c62828; color: #8e0000; }
.chip.opened { background: #fff3cd; border-color: #b8860b; color: #6b4e00; }
.chip.inactive { background: #ddd; color: #666; text-decoration: line-through; }
.admin-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 10px 8px; font-size: 11px; }
.admin-tools input[type=text], .admin-tools select { font: 12px Arial, sans-serif; border: 2px inset #808080; padding: 2px 4px; }
.admin-table { font-size: 11px; }
.admin-table td .btn { padding: 1px 6px; font-size: 10px; margin: 1px 0; }
.admin-table td { vertical-align: middle; }
.created-box { margin: 8px 10px; }
.created-box textarea { width: 100%; font: 12px "Courier New", monospace; border: 2px inset #808080; min-height: 90px; }
.feed { font: 11px Arial, sans-serif; margin: 0 10px 8px; max-height: 260px; overflow: auto; border: 1px solid #c0c0c0; }
.feed div { padding: 2px 6px; border-bottom: 1px dotted #ddd; }
@media (max-width: 720px) { .tiles { grid-template-columns: repeat(3, 1fr); } .admin-table { display: block; overflow-x: auto; } }
.corp-tabs a.admin-tab { background: #ffffcc; font-weight: bold; }

/* Automatic attendance updates stay quiet and compact beside their reactions. */
.attendance-thread .thread-replies { margin-left:0; border-left:0; }
.attendance-thread > .board-body { padding-top:4px; padding-bottom:5px; }
.attendance-notice { display:flex; align-items:center; flex-wrap:wrap; gap:3px 10px; padding:5px 8px; border-left:3px solid #b52028; background:#fafafa; font:11px/1.4 Arial,sans-serif; }
.attendance-status { flex:1 1 250px; }
.attendance-notice time { color:#666; font-size:10px; }
.attendance-notice .board-reactions { padding:0; flex-shrink:0; }
.post-virus .attendance-notice { border-left-color:#6b3c00; }
.board-delete { margin-left: 8px; padding: 0 6px; font-size: 10px; color: #8e0000; }
