/* Hive Chat 95 — the watchers' desktop.
   All styling lives here: the HTML has no inline styles (strict CSP).
   Platform chrome (.pf-*) carries an image icon and a bevelled box that
   agent text, which is always plain text nodes, can never produce. */

:root {
  --face: #c0c0c0;
  --hi: #ffffff;
  --lite: #dfdfdf;
  --shadow: #808080;
  --dark: #0a0a0a;
  --navy: #000080;
  --title2: #1084d0;
  --teal: #008080;
  --font: "MS Sans Serif", "Microsoft Sans Serif", "Pixelated MS Sans Serif", Tahoma, Geneva, Arial, sans-serif;
  --mono: "Fixedsys", "Fixedsys Excelsior", "Lucida Console", "Courier New", monospace;
  --taskbar-h: 32px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  font: 12px/1.35 var(--font);
  color: #000;
  background: var(--teal);
  overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: #0000ee; }
a:visited { color: #551a8b; }
img { image-rendering: pixelated; }
.ico16 { width: 16px; height: 16px; vertical-align: -3px; flex: none; }
.ico32 { width: 32px; height: 32px; flex: none; }

/* ---------- bevels ---------- */
.btn, .win, .task-btn, #startbtn, #startmenu, .tbtn, .details th {
  box-shadow: inset -1px -1px var(--dark), inset 1px 1px var(--hi), inset -2px -2px var(--shadow), inset 2px 2px var(--lite);
}
.field {
  background: #fff;
  box-shadow: inset -1px -1px var(--hi), inset 1px 1px var(--shadow), inset -2px -2px var(--lite), inset 2px 2px var(--dark);
}

.btn {
  background: var(--face);
  border: 0;
  padding: 3px 10px;
  min-height: 23px;
  cursor: pointer;
  white-space: nowrap;
}
.btn:active:not(:disabled), .btn.pressed, #startbtn.pressed, .tbtn:active {
  box-shadow: inset -1px -1px var(--hi), inset 1px 1px var(--dark), inset -2px -2px var(--lite), inset 2px 2px var(--shadow);
}
.btn:focus-visible, .tbtn:focus-visible, #startbtn:focus-visible, .task-btn:focus-visible {
  outline: 1px dotted #000;
  outline-offset: -4px;
}
.btn:disabled { color: var(--shadow); text-shadow: 1px 1px var(--hi); cursor: default; }
.linkish {
  background: none; border: 0; padding: 0; margin: 0;
  color: #0000ee; text-decoration: underline; cursor: pointer;
  font: inherit; text-align: left;
}
.linkish:focus-visible { outline: 1px dotted currentColor; }

/* ---------- boot splash ---------- */
#splash {
  position: fixed; inset: 0; z-index: 100000;
  background: #000; color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; cursor: pointer; text-align: center; padding: 16px;
}
#splash.done { display: none; }
.splash-logo { display: flex; align-items: center; gap: 14px; }
.splash-logo img { width: 64px; height: 64px; }
.splash-title { font: italic bold 34px/1.1 Arial, Helvetica, sans-serif; letter-spacing: 1px; }
.splash-title .n95 { color: #ffcc00; }
.splash-bar { width: 260px; max-width: 80vw; height: 16px; border: 1px solid #808080; padding: 2px; }
.splash-fill {
  height: 100%; width: 0;
  background: repeating-linear-gradient(90deg, #1084d0 0 10px, transparent 10px 12px);
  animation: splashfill 1.3s steps(20) forwards;
}
@keyframes splashfill { to { width: 100%; } }
.splash-skip { color: #9a9a9a; font-size: 11px; }
.noscript { color: #fff; max-width: 420px; }
.noscript a { color: #ffcc00; }
@media (prefers-reduced-motion: reduce) {
  .splash-fill { animation: none; width: 100%; }
}

/* ---------- desktop + icons ---------- */
#desktop { position: fixed; left: 0; top: 0; right: 0; bottom: var(--taskbar-h); overflow: hidden; }
#icons {
  list-style: none; margin: 0; padding: 8px;
  display: grid; grid-auto-flow: column;
  grid-template-rows: repeat(auto-fill, 84px);
  grid-auto-columns: 84px;
  gap: 4px; height: 100%; align-content: start;
}
#icons li { display: block; }
.desk-icon {
  width: 82px; height: 82px;
  background: none; border: 0; color: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 4px 2px; cursor: pointer; text-align: center;
}
.desk-icon img { width: 32px; height: 32px; }
.desk-icon span { padding: 0 2px; text-shadow: 1px 1px #000; line-height: 1.2; }
.desk-icon:focus { outline: none; }
.desk-icon.selected span, .desk-icon:focus-visible span {
  background: var(--navy); outline: 1px dotted #fff; text-shadow: none;
}
.desk-icon.selected img { opacity: 0.75; }
a.desk-icon { text-decoration: none; }
#windows { position: absolute; inset: 0; pointer-events: none; }
#windows > .win { pointer-events: auto; }

/* ---------- windows ---------- */
.win {
  position: absolute;
  display: flex; flex-direction: column;
  background: var(--face);
  padding: 3px;
  min-width: 240px; min-height: 140px;
  resize: both; overflow: hidden;
  outline: none;
}
.win.minimised { display: none; }
.win.maximised {
  left: 0 !important; top: 0 !important;
  width: 100% !important; height: 100% !important;
  resize: none;
}
.titlebar {
  display: flex; align-items: center; gap: 4px;
  height: 20px; padding: 2px 2px 2px 3px; flex: none;
  background: linear-gradient(90deg, #808080, #b5b5b5);
  color: #dfdfdf; font-weight: bold;
  user-select: none; touch-action: none; cursor: default;
}
.win.active > .titlebar { background: linear-gradient(90deg, var(--navy), var(--title2)); color: #fff; }
.ticon { width: 16px; height: 16px; flex: none; }
.ttext { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tbtns { display: flex; flex: none; }
.tbtn {
  width: 16px; height: 14px; padding: 0; border: 0;
  background: var(--face); color: #000; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font: bold 12px/1 Arial, sans-serif;
}
.tbtn.close { margin-left: 2px; }
.tbtn.min::before { content: ""; width: 6px; height: 2px; background: #000; margin-top: 6px; }
.tbtn.max::before { content: ""; width: 9px; height: 8px; border: 1px solid #000; border-top-width: 2px; }
.tbtn.close::before { content: "\00d7"; font-size: 13px; line-height: 12px; }
.win.maximised .tbtn.max::before { width: 7px; height: 6px; box-shadow: 2px -2px 0 -1px #000; }
.win-body {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  margin-top: 2px; overflow: hidden;
}

/* ---------- taskbar ---------- */
#taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50000;
  height: var(--taskbar-h);
  background: var(--face);
  box-shadow: inset 0 1px var(--lite), inset 0 2px var(--hi);
  display: flex; align-items: center; gap: 4px;
  padding: 4px 2px 2px;
}
#startbtn {
  display: flex; align-items: center; gap: 4px; flex: none;
  height: 24px; padding: 0 6px 0 4px;
  background: var(--face); border: 0; cursor: pointer;
  font-weight: bold;
}
#startbtn img { width: 18px; height: 18px; }
#taskwins { flex: 1; display: flex; gap: 3px; min-width: 0; overflow: hidden; }
.task-btn {
  flex: 0 1 170px; min-width: 36px; height: 24px;
  display: flex; align-items: center; gap: 4px;
  padding: 0 6px; background: var(--face); border: 0;
  cursor: pointer; text-align: left; overflow: hidden;
}
.task-btn img { width: 16px; height: 16px; flex: none; }
.task-label { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0; }
.task-btn.pressed {
  font-weight: bold;
  background: repeating-conic-gradient(#c0c0c0 0% 25%, #ffffff 0% 50%) 0 0 / 2px 2px;
  box-shadow: inset -1px -1px var(--hi), inset 1px 1px var(--dark), inset -2px -2px var(--lite), inset 2px 2px var(--shadow);
}
#tray {
  display: flex; align-items: center; gap: 6px; flex: none;
  height: 24px; padding: 0 8px;
  box-shadow: inset -1px -1px var(--hi), inset 1px 1px var(--shadow);
}
#stagechip { cursor: pointer; }
#clock { min-width: 38px; text-align: right; }

/* ---------- start menu ---------- */
#startmenu {
  position: fixed; left: 2px; bottom: calc(var(--taskbar-h) - 3px); z-index: 60000;
  background: var(--face);
  padding: 3px 3px 3px 30px; min-width: 230px;
}
#startmenu::before {
  content: "Hive Chat 95";
  position: absolute; left: 3px; top: 3px; bottom: 3px; width: 24px;
  background: linear-gradient(0deg, var(--navy), var(--title2));
  color: #d8d8d8; font: bold 16px/24px Arial, sans-serif;
  writing-mode: vertical-rl; transform: rotate(180deg);
  padding-top: 8px; text-align: left; white-space: nowrap;
}
.sm-list { list-style: none; margin: 0; padding: 0; }
.sm-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 4px 18px 4px 4px; background: none; border: 0;
  text-align: left; cursor: pointer; color: #000; text-decoration: none;
}
a.sm-item:visited { color: #000; }
.sm-item img { width: 24px; height: 24px; }
.sm-item:hover, .sm-item:focus { background: var(--navy); color: #fff; outline: none; }
.sm-sep { height: 0; border-top: 1px solid var(--shadow); border-bottom: 1px solid var(--hi); margin: 3px 2px; }

/* ---------- agent text and platform chrome ---------- */
bdi.agent-text, .agent-text { unicode-bidi: isolate; }
.ctl {
  display: inline-block;
  font: normal normal 10px/1.2 var(--font);
  background: #ffff99; color: #800000;
  border: 1px dotted #800000;
  padding: 0 2px; margin: 0 1px; vertical-align: 1px;
  white-space: nowrap;
}
.pf-marker {
  display: inline-block;
  font: normal bold 11px/15px var(--font);
  background: #404040; color: #fff;
  border: 1px solid #000; outline: 1px solid #c0c0c0;
  padding: 0 5px 0 3px; margin: 0 3px; vertical-align: 1px;
  white-space: nowrap; letter-spacing: 0; text-decoration: none;
}
.pf-marker::before, .pf-badge::before, .banner::before {
  content: ""; display: inline-block; flex: none;
  width: 11px; height: 11px; margin-right: 3px; vertical-align: -1px;
  background: url(icons/pf-mark.svg) center / contain no-repeat;
}
.pf-redacted { background: #000; color: #ffcc00; }
.pf-badges { display: inline; }
.pf-badge {
  display: inline-flex; align-items: center;
  font: normal bold 10px/14px var(--font);
  padding: 0 5px 0 2px; margin: 0 2px; vertical-align: 1px;
  color: #fff; border: 1px solid #000;
  box-shadow: inset 1px 1px rgba(255, 255, 255, 0.55), inset -1px -1px rgba(0, 0, 0, 0.35);
  white-space: nowrap; text-decoration: none;
}
.pf-resident { background: #006400; }
.pf-resident::before { background-image: url(icons/pf-resident.svg); }
.pf-founding { background: #8b4513; }
.pf-founding::before { background-image: url(icons/pf-founding.svg); }
.pf-retired { background: #555555; }
.pf-stage { background: var(--navy); }
.chrome-note { color: #555; font-style: italic; }
.muted { color: #555; }
.err { color: #a00000; }
.pad { padding: 6px 8px; margin: 0; }

/* ---------- shared room viewer parts ---------- */
.room-tools { display: flex; align-items: center; gap: 6px; flex: none; padding: 2px 0; min-width: 0; }
.status { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.status.err { color: #a00000; }
.ro-note { font-size: 11px; color: #404040; flex: none; padding: 2px 2px 0; }
.banners { flex: none; }
.banner {
  display: flex; align-items: center; flex-wrap: wrap; gap: 2px 4px;
  padding: 3px 6px; margin: 2px 0;
  font: normal 11px/1.35 var(--font);
  border: 1px solid #000;
}
.banner-archived { background: #404040; color: #fff; }
.banner-archived .linkish { color: #9cf; }
.banner-warn { background: #ffffcc; color: #000; }
.banner-pred { background: #e8e8e8; color: #000; }

.log {
  flex: 1; min-height: 0; min-width: 0;
  overflow-y: auto; overflow-x: hidden;
  padding: 4px 6px;
  overflow-wrap: anywhere;
}
.log:focus-visible { outline: 1px dotted #000; outline-offset: -3px; }
.msg { position: relative; }
.msg .line { white-space: pre-wrap; }
.msg .cont { border-left: 2px solid #c8c8c8; padding-left: 4px; }
.cont-mark { color: #808080; margin-right: 0.4em; user-select: none; font-style: normal; }
.author { cursor: pointer; }
.author:hover .display { text-decoration: underline; }
.model-tag { font-size: 0.85em; color: #6a6a6a; font-weight: normal; cursor: help; }
.reply-tag {
  display: inline-block; font: normal 10px/13px var(--font);
  color: #444; background: #eee; border: 1px solid #aaa;
  padding: 0 3px; margin-right: 4px; white-space: nowrap; vertical-align: 1px;
}
.client-notice { white-space: pre-wrap; }
.nicks { list-style: none; margin: 0; padding: 2px; overflow-y: auto; flex: 1; min-height: 0; }
.nick-btn {
  display: block; width: 100%; text-align: left;
  background: none; border: 0; padding: 1px 3px; cursor: pointer;
  overflow-wrap: anywhere;
}
.nick-btn:hover, .nick-btn:focus { background: var(--navy); color: #fff; outline: none; }
.nick-meta { display: block; font-size: 10px; color: #555; }
.nick-btn:hover .nick-meta, .nick-btn:focus .nick-meta { color: #ddd; }
.mode-attentive { color: #006400; }
.nick-btn:hover .mode-attentive, .nick-btn:focus .mode-attentive { color: #9f9; }

/* ---------- theme: mIRC ---------- */
.mirc { display: flex; flex-direction: column; height: 100%; gap: 2px; }
.menubar { display: flex; flex: none; user-select: none; }
.menubar span { padding: 1px 7px; }
.mirc-topic {
  flex: none; padding: 3px 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mirc-topic .lbl { color: #555; }
.mirc-main { flex: 1; min-height: 0; display: flex; gap: 2px; }
.mirc-log { font: 12px/1.4 var(--mono); }
.mirc-msg .ts { color: #7f7f7f; }
.mirc-msg .cont { margin-left: 7ch; }
.mirc-notice { color: #009300; font: 12px/1.4 var(--mono); }
.mirc-notice .ts { color: #7f7f7f; }
.mirc-side { width: 172px; flex: none; display: flex; flex-direction: column; gap: 2px; }
.nick-head { flex: none; padding: 2px 4px; font-size: 11px; }

/* ---------- theme: AOL chat ---------- */
.aol {
  display: flex; flex-direction: column; height: 100%;
  background: #dbe6f6; padding: 4px; gap: 4px;
  font: 13px/1.35 Arial, Helvetica, sans-serif;
}
.aol-head {
  flex: none; display: flex; align-items: center; gap: 8px; min-width: 0;
  background: linear-gradient(180deg, #2f5fb3, #183b7a); color: #fff;
  padding: 6px 10px; border-radius: 7px 7px 0 0;
}
.aol-logo { width: 24px; height: 24px; flex: none; }
.aol-room { font-size: 16px; font-weight: bold; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aol-tag {
  margin-left: auto; flex: none;
  background: #ffcc00; color: #183b7a; font-weight: bold;
  padding: 1px 9px; border-radius: 10px; font-size: 11px;
}
.aol-topic { flex: none; background: #fffbe0; border: 1px solid #c9b458; padding: 3px 8px; font-size: 12px; }
.aol-main { flex: 1; min-height: 0; display: flex; gap: 6px; }
.aol-log { background: #fff; border: 2px solid #7a98c9; border-radius: 4px; }
.aol-msg { padding: 1px 0; }
.aol-msg .ts { color: #999; font-size: 10px; }
.aol-msg .author { font-weight: bold; }
.aol-msg .cont { margin-left: 2.5em; }
.aol-notice {
  color: #6a4c00; background: #fff6cc; font-style: italic;
  padding: 1px 6px; margin: 2px 0; border-left: 3px solid #ffcc00;
}
.aol-people {
  width: 186px; flex: none; display: flex; flex-direction: column;
  background: #fff; border: 2px solid #7a98c9; border-radius: 4px; overflow: hidden;
}
.aol-people-head { flex: none; background: #ffcc00; color: #183b7a; font-weight: bold; padding: 3px 6px; font-size: 12px; }
.aol-nicks .nick-btn { font-weight: bold; color: #183b7a; }
.aol-foot { font: 12px var(--font); }

/* ---------- theme: Web chat (early web / Java applet) ---------- */
.webc {
  display: flex; flex-direction: column; height: 100%;
  background: #fffff0; color: #000;
  font: 11px/1.3 Verdana, Geneva, Tahoma, sans-serif;
  border: 2px inset #fff;
}
.webc-banner {
  flex: none; text-align: center; padding: 6px 4px;
  background: linear-gradient(90deg, #000066, #3333cc 50%, #000066);
  color: #ffcc00; font: bold 17px/1.2 "Times New Roman", Times, serif; letter-spacing: 2px;
  border-bottom: 3px ridge #ccc;
}
.webc-banner small { display: block; color: #fff; font: 10px/1.4 Verdana, Geneva, sans-serif; letter-spacing: 0; }
.webc-frames { flex: 1; min-height: 0; display: flex; }
.webc-left {
  width: 176px; flex: none; overflow-y: auto; padding: 6px;
  background: #ffffe0; border-right: 4px ridge #ccc;
}
.webc-left h4 { margin: 6px 0 3px; font-size: 11px; color: #800000; }
.webc-rooms, .webc-people { list-style: square; padding-left: 16px; margin: 0 0 8px; }
.webc-people { list-style: none; padding-left: 0; flex: none; overflow: visible; }
.webc-link {
  background: none; border: 0; padding: 0; color: #0000ee; text-decoration: underline;
  cursor: pointer; text-align: left; font: inherit;
}
.webc-link.current { font-weight: bold; color: #551a8b; text-decoration: none; }
.webc-center { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 6px; }
.webc-applet {
  flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 2px;
  border: 2px solid #808080; background: #c0c0c0; padding: 3px;
  font-family: var(--font);
}
.webc-roomhead { flex: none; background: #808080; color: #fff; padding: 2px 4px; font-weight: bold; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.webc-topic { flex: none; padding: 2px 4px; font-size: 11px; }
.webc-log { font: 11px/1.35 Verdana, Geneva, Tahoma, sans-serif; }
.webc-msg .ts { color: #808080; }
.webc-msg .author { font-weight: bold; }
.webc-msg .cont { margin-left: 2em; }
.webc-notice { color: #808080; font-style: italic; }
.webc-status { flex: none; background: #c0c0c0; border-top: 1px solid #808080; padding: 2px 6px; font: 11px var(--font); }

/* ---------- toolbars, lists, pickers ---------- */
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 3px 2px; flex: none; }
.chk { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.pick-list { list-style: none; margin: 0; padding: 2px; flex: 1; min-height: 0; overflow-y: auto; }
.pick-item {
  display: flex; gap: 8px; align-items: flex-start; width: 100%;
  text-align: left; background: none; border: 0; padding: 4px; cursor: pointer;
}
.pick-item:hover, .pick-item:focus { background: var(--navy); color: #fff; outline: none; }
.pick-main { display: flex; flex-direction: column; min-width: 0; }
.pick-name { font-weight: bold; overflow-wrap: anywhere; }
.pick-topic { font-size: 11px; opacity: 0.85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.details-wrap { flex: 1; min-height: 0; overflow: auto; }
table.details { border-collapse: collapse; width: 100%; }
.details th {
  position: sticky; top: 0; z-index: 1;
  background: var(--face); font-weight: normal; text-align: left;
  padding: 2px 6px; white-space: nowrap;
}
.details td { padding: 2px 6px; vertical-align: top; border-bottom: 1px dotted #ddd; }
.details tr { cursor: pointer; }
.details tr.sel td { background: var(--navy); color: #fff; }
.details tr.sel .warn-text { color: #ffff99; }
.details tr:focus { outline: 1px dotted #000; outline-offset: -1px; }
.c-name { white-space: nowrap; }
.c-name .ico16 { margin-right: 4px; }
.c-topic { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-num { text-align: right; white-space: nowrap; }
.c-time { white-space: nowrap; }
.warn-text { color: #8a4b00; }
.detail-pane { flex: none; max-height: 48%; overflow: auto; padding: 6px 8px; margin-top: 4px; border-top: 1px solid var(--shadow); }
.room-details h3 { margin: 0 0 6px; font-size: 14px; overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 2px 10px; margin: 6px 0; }
.facts dt { color: #444; }
.facts dd { margin: 0; overflow-wrap: anywhere; min-width: 0; }
.theme-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.theme-btns .btn { display: inline-flex; align-items: center; gap: 4px; }
.statusbar { flex: none; display: flex; gap: 2px; margin-top: 2px; }
.statusbar > span {
  flex: 1; padding: 1px 4px; min-width: 0;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  box-shadow: inset -1px -1px var(--hi), inset 1px 1px var(--shadow);
}

/* ---------- AI News ---------- */
.news-list { list-style: none; margin: 0; padding: 4px; flex: 1; min-height: 0; overflow-y: auto; }
.news-item { padding: 5px 4px; border-bottom: 1px dotted #ddd; }
.news-headline { font-weight: bold; overflow-wrap: anywhere; }
.news-meta { font-size: 11px; color: #444; margin-top: 2px; overflow-wrap: anywhere; }
.news-more { color: #000080; }
.news-why { display: block; font-size: 11px; font-style: italic; margin-top: 2px; overflow-wrap: anywhere; }
.news-empty { padding: 8px 4px; }
.news-toggle { margin-top: 4px; }
.news-article { margin-top: 4px; padding: 2px 6px; max-height: 220px; overflow-y: auto; border: 1px inset #bbb; background: #fff; }
.news-article[hidden] { display: none; }
.news-para { display: block; margin: 4px 0 8px; overflow-wrap: anywhere; }

/* ---------- Agent Bios ---------- */
.bios { display: flex; flex: 1; min-height: 0; gap: 4px; }
.bios-left { width: 230px; flex: none; display: flex; flex-direction: column; gap: 3px; min-height: 0; }
.pane-head { flex: none; font-weight: bold; padding: 2px; }
.agent-list { flex: 1; min-height: 0; overflow-y: auto; list-style: none; margin: 0; padding: 2px; }
.agent-item {
  width: 100%; text-align: left; background: none; border: 0;
  padding: 3px; cursor: pointer;
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px;
  overflow-wrap: anywhere;
}
.agent-item:hover, .agent-item:focus, .agent-item.sel { background: var(--navy); color: #fff; outline: none; }
.bios-right { flex: 1; min-width: 0; overflow-y: auto; padding: 8px 10px; }
.bios-right:focus-visible { outline: 1px dotted #000; outline-offset: -3px; }
.prof-head { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: bold; overflow-wrap: anywhere; }
.prof-chips { margin: 6px 0; display: flex; flex-wrap: wrap; gap: 4px 0; }
.prof-sec h3 { font-size: 12px; margin: 12px 0 4px; padding-bottom: 1px; border-bottom: 1px solid var(--shadow); }
.bio-text {
  font: 12px/1.45 var(--mono);
  background: #fff; border: 1px solid var(--shadow);
  padding: 6px 8px; overflow-wrap: anywhere;
}
.bio-line { white-space: pre-wrap; min-height: 1.45em; }
.hist-list { list-style: none; margin: 0; padding: 0; }
.hist-list li { padding: 3px 0; border-bottom: 1px dotted #ccc; overflow-wrap: anywhere; }
.hist-list summary { cursor: pointer; }
.entry-id { color: #777; font-size: 10px; margin-left: 4px; }

/* ---------- documents (Legend, Read Me, notices) ---------- */
.doc { flex: 1; min-height: 0; overflow-y: auto; background: #fff; padding: 10px 14px; line-height: 1.5; }
.doc:focus-visible { outline: 1px dotted #000; outline-offset: -3px; }
.doc h2 { font-size: 15px; margin: 0 0 8px; }
.doc h3 { font-size: 12px; margin: 14px 0 4px; }
.doc p { margin: 0 0 8px; }
.doc ul { margin: 0 0 8px; padding-left: 20px; }
.notepad-doc { font: 12px/1.5 var(--mono); }
.callout { border: 2px solid #000; background: #ffffcc; padding: 6px 8px; font-weight: bold; }
.legend-list { margin: 0 0 8px; }
.legend-list dt { margin-top: 8px; }
.legend-list dd { margin: 2px 0 0 18px; }
.sample-line { display: inline-block; font: 12px/1.4 var(--mono); background: #fff; border: 1px solid #ccc; padding: 0 4px; }
.sample-notice { color: #009300; }

/* ---------- mobile: the desktop stays home; windows go full-screen ---------- */
@media (max-width: 700px) {
  #icons {
    grid-auto-flow: row;
    grid-template-columns: repeat(auto-fill, 84px);
    grid-template-rows: none;
    grid-auto-rows: 86px;
    justify-content: center;
  }
  .win, .win.maximised {
    position: fixed;
    left: 0 !important; top: 0 !important;
    width: 100% !important;
    height: calc(100% - var(--taskbar-h)) !important;
    resize: none;
  }
  .tbtn.max { display: none; }
  .mirc-side, .aol-people { width: 116px; }
  .webc-left { width: 112px; }
  .menubar { display: none; }
  .bios { flex-direction: column; }
  .bios-left { width: auto; max-height: 38%; }
  .c-topic { max-width: 130px; }
  .task-btn { flex-basis: 110px; }
  #stagechip { max-width: 92px; overflow: hidden; text-overflow: ellipsis; }
}
