/* OER CONSOLE FRAME (assets/console.js) */
:root {
  --oerc-banner: 18px;
  --oerc-bar: 32px;
  --oerc-rail: 172px;
  --oerc-ink: #d8d2c4;
  --oerc-dim: #8d887b;
  --oerc-navy: #000080;
}

body.oerc {
  padding-top: calc(var(--oerc-banner) + var(--oerc-bar) + 10px) !important;
  padding-bottom: calc(var(--oerc-banner) + 10px) !important;
  padding-left: calc(var(--oerc-rail) + 12px) !important;
  box-sizing: border-box;
}
/* The directory rail is the way around: the corner HOME link and the
   pages' own BACK / CLOSE buttons are hidden on framed pages. */
body.oerc .tgd-home-link,
body.oerc .oer-badge,
body.oerc .close-button,
body.oerc .action-panel a.action-link[href="/tools/"],
body.oerc #docReturnBottom { display: none !important; }

/* ---- network banners ---- */
.oerc-banner {
  position: fixed;
  left: 0;
  right: 0;
  height: var(--oerc-banner);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  background: #0b0b0b;
  color: #9fd59f;
  font: bold 10px/1 "Courier New", Courier, monospace;
  letter-spacing: 2px;
  white-space: nowrap;
  overflow: hidden;
}
.oerc-banner-top { top: 0; border-bottom: 1px solid #2c2c2c; }
.oerc-banner-bottom { bottom: 0; border-top: 1px solid #2c2c2c; color: var(--oerc-dim); }

/* ---- title bar ---- */
.oerc-bar {
  position: fixed;
  top: var(--oerc-banner);
  left: 0;
  right: 0;
  height: var(--oerc-bar);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  box-sizing: border-box;
  background: linear-gradient(#1d1d1d, #111111);
  border-bottom: 2px solid #000;
  box-shadow: inset 0 1px 0 #3a3a3a;
  color: var(--oerc-ink);
  font: bold 12px/1 "Courier New", Courier, monospace;
  letter-spacing: 2px;
}
.oerc-bar-left, .oerc-bar-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.oerc-bar-left { padding-left: 0; }
.oerc-bar-mid {
  flex: 1;
  text-align: center;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.oerc-org { color: var(--oerc-dim); white-space: nowrap; }
.oerc-clock { color: #9fd59f; white-space: nowrap; font-size: 11px; }
.oerc-light { display: inline-flex; align-items: center; gap: 5px; color: var(--oerc-dim); font-size: 10px; }
.oerc-light::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #333;
  border: 1px solid #000;
}
.oerc-light-on::before { background: #2bff4f; box-shadow: 0 0 6px #2bff4f; animation: oerc-blink 2.4s steps(1) infinite; }
.oerc-light-off::before { background: #ff3030; box-shadow: 0 0 6px #ff3030; }
.oerc-light.oerc-light-recv { color: #ffbf00; }
.oerc-light.oerc-light-recv::before { background: #ffbf00; box-shadow: 0 0 6px #ffbf00; animation: oerc-blink 0.5s steps(1) infinite; }
@keyframes oerc-blink { 0%, 88% { opacity: 1; } 89%, 100% { opacity: 0.25; } }
.oerc-menu-button { display: none; }

/* ---- directory rail ---- */
.oerc-rail {
  position: fixed;
  top: calc(var(--oerc-banner) + var(--oerc-bar));
  bottom: var(--oerc-banner);
  left: 0;
  width: var(--oerc-rail);
  z-index: 999;
  box-sizing: border-box;
  padding: 12px 10px;
  overflow-y: auto;
  scrollbar-width: none;
  background: #0e0e0e;
  border-right: 2px solid #000;
  box-shadow: inset -1px 0 0 #333;
  font: bold 11px/1 "Courier New", Courier, monospace;
  letter-spacing: 1.5px;
}
.oerc-rail::-webkit-scrollbar { display: none; }
.oerc-rail-title {
  margin: 0 0 6px;
  padding: 3px 6px;
  background: var(--oerc-navy);
  color: #fff;
  font-size: 10px;
  letter-spacing: 2px;
}
.oerc-menu, .oerc-sub { list-style: none; margin: 0; padding: 0; }
.oerc-item, .oerc-subitem {
  display: block;
  margin: 0 0 4px;
  padding: 6px 8px;
  color: var(--oerc-ink);
  text-decoration: none;
  cursor: pointer;
  background: #1c1c1c;
  border: 1px solid;
  border-color: #4a4a4a #000 #000 #4a4a4a;
}
.oerc-item:hover, .oerc-item:focus, .oerc-subitem:hover, .oerc-subitem:focus { background: #2a2a2a; color: #fff; }
.oerc-item:active { border-color: #000 #4a4a4a #4a4a4a #000; }
.oerc-here { background: var(--oerc-navy) !important; color: #fff !important; border-color: #3a3ac0 #000 #000 #3a3ac0; }
.oerc-group summary { list-style: none; }
.oerc-group summary::-webkit-details-marker { display: none; }
/* One line per entry (2026-11-11): label left, NEW! and + / - at the right edge. */
.oerc-item, .oerc-subitem { display: flex; align-items: center; white-space: nowrap; }
.oerc-item > .oerc-new, .oerc-subitem > .oerc-new { margin-left: auto; }
.oerc-right { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; }
.oerc-item, .oerc-subitem { gap: 6px; }
.oerc-right .oerc-new { margin-left: 0; }
.oerc-sign::after { content: "+"; color: var(--oerc-dim); }
.oerc-group[open] .oerc-sign::after { content: "-"; }
.oerc-sub { margin: 0 0 6px 10px; }
.oerc-subitem { padding: 4px 7px; margin-bottom: 3px; font-size: 10px; background: #151515; }
.oerc-rail-foot { margin-top: 12px; color: #858585; font-size: 9px; letter-spacing: 2px; text-align: center; }

/* ---- narrower screens: rail becomes a MENU drop-down ---- */
@media (max-width: 1000px) {
  body.oerc { padding-left: 0 !important; }
  .oerc-menu-button {
    display: inline-block;
    padding: 4px 8px;
    background: #1c1c1c;
    color: var(--oerc-ink);
    font: bold 11px/1 "Courier New", Courier, monospace;
    letter-spacing: 1.5px;
    border: 1px solid;
    border-color: #4a4a4a #000 #000 #4a4a4a;
    cursor: pointer;
  }
  .oerc-rail { display: none; width: 220px; box-shadow: 4px 0 12px rgba(0,0,0,0.7); }
  body.oerc-menu-open .oerc-rail { display: block; }
}
/* Phone held sideways: the drop-down is taller than the screen, so it
   lays out in three columns instead of scrolling (2026-11-08). */
@media (max-width: 1000px) and (max-height: 500px) {
  .oerc-rail { width: min(680px, 100vw); padding: 8px 10px; }
  .oerc-rail .oerc-menu { column-count: 3; column-gap: 10px; }
  .oerc-rail .oerc-item, .oerc-rail .oerc-subitem { break-inside: avoid; }
  .oerc-rail .oerc-item { padding: 5px 7px; margin-bottom: 3px; }
  .oerc-rail .oerc-subitem { padding: 3px 7px; margin-bottom: 2px; }
  .oerc-rail .oerc-rail-foot { margin-top: 6px; }
}
@media (max-width: 760px) {
  .oerc-org, .oerc-hide-small { display: none; }
  .oerc-bar-mid { font-size: 11px; letter-spacing: 1px; }
  .oerc-clock { font-size: 10px; letter-spacing: 1px; }
  .oerc-banner { font-size: 8px; letter-spacing: 1px; gap: 14px; }
  /* Phones: the bottom bar keeps the session clock and the notice; the
     node name made it overflow at both edges (2026-11-12). */
  .oerc-banner-bottom > span:first-child { display: none; }
}
@media (max-width: 480px) {
  .oerc-clock { display: none; }
}

/* Pages bring their own styles for links and lists; the frame keeps its own. */
.oerc-rail, .oerc-rail * { text-align: left !important; text-transform: none; float: none; }
.oerc-rail li { margin: 0; padding: 0; border: 0; background: none; }
.oerc-rail a, .oerc-rail summary { width: auto; box-sizing: border-box; font: inherit; letter-spacing: inherit; }
.oerc-bar *, .oerc-banner * { margin: 0; }

/* ============================================================
   1998 TOUCHES (console.js): connecting screen, footer badges and
   last-modified line, NEW! tags, error dialog, loading box.
   ============================================================ */

/* ---- connecting screen (first page of a session) ---- */
html.oer-connecting body { visibility: hidden; }
.oer-connect {
  position: fixed;
  inset: 0;
  z-index: 100000;
  visibility: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  color: #00ff00;
  font: 14px/1.6 "Courier New", Courier, monospace;
  letter-spacing: 1px;
  text-shadow: 0 0 4px rgba(0, 255, 0, 0.3);
  cursor: pointer;
}
.oer-connect-box { width: min(520px, 90vw); text-align: left; white-space: pre-wrap; }
.oer-connect-skip { margin-top: 14px; color: #007700; font-size: 11px; }

/* ---- footer: badges and last-modified line ---- */
.oer-retro-foot {
  clear: both;
  width: 100%;
  margin: 26px auto 6px;
  text-align: center;
  font: 10px/1.4 "Courier New", Courier, monospace;
  color: #8a8a8a;
  letter-spacing: 1px;
}
.oer-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 8px; }
.oer-badge88 {
  display: flex;
  width: 88px;
  height: 31px;
  box-sizing: border-box;
  border: 1px solid #000;
  outline: 1px solid #777;
  background: #c0c0c0;
  color: #000;
  font: bold 8px/1 Verdana, Tahoma, Arial, sans-serif;
  letter-spacing: 0;
  text-decoration: none;
  text-align: center;
  overflow: hidden;
  image-rendering: pixelated;
}
.oer-badge88 .k {
  flex: 0 0 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
}
.oer-badge88 .t { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0 2px; }
.oer-badge88.y2k .k { background: #000080; }
.oer-badge88.y2k .t { background: #ffff66; }
.oer-badge88.res .k { background: #008080; font-size: 9px; }
.oer-badge88.pad .k { background: #3a3a3a; font-size: 13px; }
.oer-badge88.pad .t { background: #ffffff; }
.oer-badge88.net .k { background: #005500; color: #00ff00; font-family: "Courier New", monospace; }
.oer-badge88.net .t { background: #002200; color: #00ff00; }
.oer-badge88.xml .k { background: #c45200; }
.oer-badge88.xml .t { background: #ffe0c0; }
a.oer-badge88:hover { outline-color: #fff; }

/* ---- NEW! tag in the directory rail ---- */
.oerc-new {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 3px;
  background: #ff0000;
  color: #ffff00;
  font-size: 8px;
  letter-spacing: 1px;
  vertical-align: 1px;
  animation: oerc-new-blink 1s steps(1) infinite;
}
@keyframes oerc-new-blink { 50% { color: #ff0000; background: #ffff00; } }

/* ---- Windows 98 style dialog ---- */
.oer-dialog-shade {
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
}
.oer-dialog {
  width: min(380px, 92vw);
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
  box-shadow: 1px 1px 0 #000;
  color: #000;
  font: 12px/1.4 Tahoma, Verdana, Arial, sans-serif;
  text-align: left;
}
.oer-dialog-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 4px 3px 6px;
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #fff;
  font-weight: bold;
  letter-spacing: 0;
}
.oer-dialog-x {
  width: 16px;
  height: 14px;
  padding: 0;
  background: #c0c0c0;
  border: 1px solid;
  border-color: #fff #404040 #404040 #fff;
  font: bold 10px/1 Tahoma, Arial, sans-serif;
  color: #000;
  cursor: pointer;
}
.oer-dialog-body { display: flex; gap: 14px; padding: 16px 14px 10px; }
.oer-dialog-icon {
  flex: 0 0 32px;
  height: 32px;
  border-radius: 50%;
  background: #ff0000;
  border: 1px solid #800000;
  color: #fff;
  font: bold 20px/30px Arial, sans-serif;
  text-align: center;
}
.oer-dialog-text { white-space: pre-wrap; }
.oer-dialog-buttons { padding: 4px 0 12px; text-align: center; }
.oer-dialog-ok {
  min-width: 75px;
  padding: 4px 10px;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #404040 #404040 #fff;
  outline: 1px dotted #000;
  outline-offset: -5px;
  font: 12px Tahoma, Verdana, Arial, sans-serif;
  color: #000;
  cursor: pointer;
}
.oer-dialog-ok:active { border-color: #404040 #fff #fff #404040; }

@media (prefers-reduced-motion: reduce) {
  .oerc-new, .oerc-light.oerc-light-recv::before { animation: none; }
}

/* ---- OER seal watermark (record and document screens only) ----
   Sits over the page like a watermark printed into the paper: very faint,
   gray, fixed in place, and it never takes clicks. */
.oer-seal-mark {
  position: fixed;
  top: calc(50% + (var(--oerc-bar) / 2));
  left: calc(50% + (var(--oerc-rail) / 2));
  width: min(560px, 62vh, 60vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: url("/assets/img/oer-seal-300.png") center / contain no-repeat;
  border-radius: 50%;
  filter: grayscale(1);
  opacity: 0.05;
  pointer-events: none;
  z-index: 900;
}
@media (max-width: 1000px) {
  .oer-seal-mark { left: 50%; width: min(420px, 80vw); }
}
@media print { .oer-seal-mark { display: none; } }
/* ---- DAY / NIGHT display switch (log viewers) ---- */
.oer-daynight {
  float: right;
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin-left: 10px;
  font: bold 10px "Courier New", Courier, monospace;
  color: #000;
}
.oer-daynight-label { margin-right: 5px; letter-spacing: 1px; }
.oer-daynight button {
  min-width: 52px;
  padding: 2px 6px;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #404040 #404040 #fff;
  color: #000;
  font: bold 10px "Courier New", Courier, monospace;
  letter-spacing: 1px;
  cursor: pointer;
}
.oer-daynight button[aria-pressed="true"] {
  background: #a8a8a8;
  border-color: #404040 #fff #fff #404040;
  color: #000080;
}
@media (max-width: 560px) {
  .oer-daynight { float: none; display: flex; margin: 6px 0 0; }
}
/* A title turned into <h1> (Bing, 2026-11-17) keeps its old look:
   zero-specificity reset, the element's own class wins. */
:where(h1.oer-h1) { margin: 0; font-size: inherit; font-weight: inherit; line-height: inherit; letter-spacing: inherit; }
