* { box-sizing: border-box; }
body {
  margin: 0;
  background: #f4f4f4 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='4' height='4' fill='%23f4f4f4'/%3E%3Crect width='1' height='1' fill='%23e8e8e8'/%3E%3C/svg%3E");
  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.6;
  color: #333;
}
a { color: #b01; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
#header {
  background: linear-gradient(#2c2c2c, #111);
  border-bottom: 4px solid #600;
  height: 130px;
}
#header .inner { max-width: 1000px; margin: 0 auto; position: relative; height: 100%; display: flex; align-items: center; padding: 0 20px; }
#header a.logo { display: flex; align-items: center; gap: 18px; color: #eee; text-decoration: none; }
#header svg { width: 90px; height: 90px; }
#header h1 { margin: 0; font-family: "Trebuchet MS", Arial, sans-serif; font-size: 38px; letter-spacing: 1px; text-shadow: 2px 2px 3px #000; }
#header h2 { margin: 0; font-size: 13px; color: #bbb; font-weight: normal; letter-spacing: 3px; text-transform: uppercase; }

/* Top bar */
#topbar { background: #e8e8e8; border-bottom: 1px solid #ccc; }
#topbar .inner { max-width: 1000px; margin: 0 auto; padding: 4px 20px; display: flex; gap: 20px; flex-wrap: wrap; }
#topbar a { color: #333; font-weight: bold; font-size: 12px; }

/* Layout */
#layout { max-width: 1000px; margin: 20px auto; padding: 0 20px; display: flex; gap: 20px; align-items: flex-start; }
#side { width: 190px; flex-shrink: 0; background: #fff; border: 1px solid #ccc; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
#side .box { padding: 8px 12px; border-bottom: 1px solid #ddd; }
#side .box:last-child { border-bottom: 0; }
#side h3 { margin: 0 0 4px; font-size: 13px; color: #600; }
#side ul { margin: 0; padding-left: 14px; }
#side li { font-size: 12px; }
#main { flex: 1; min-width: 0; background: #fff; border: 1px solid #ccc; padding: 20px 30px 30px; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
#page-title { font-family: "Trebuchet MS", Arial, sans-serif; font-size: 26px; font-weight: normal; color: #901; border-bottom: 1px solid #ccc; margin: 0 0 16px; padding-bottom: 6px; }
h2.section { font-size: 15px; color: #333; margin: 22px 0 6px; }

/* Rating */
.rating { float: right; border: 1px solid #ccc; background: #f8f8f8; font-size: 11px; padding: 2px 8px; margin-left: 10px; }
.rating button { border: 1px solid #aaa; background: #fff; cursor: pointer; font-size: 11px; padding: 0 5px; margin-left: 3px; }

/* Image block */
.img-block { float: right; clear: right; width: 230px; border: 1px solid #666; background: #eee; margin: 0 0 12px 16px; padding: 5px; text-align: center; }
.img-block .ph { height: 200px; background: #222; color: #888; display: flex; align-items: center; justify-content: center; font-size: 11px; letter-spacing: 2px; }
.img-block img { width: 100%; display: block; }
.img-block p { margin: 4px 0 0; font-size: 11px; }

/* Object class bar */
.classbar { display: flex; gap: 0; border: 1px solid #999; margin: 12px 0 18px; max-width: 520px; }
.classbar div { flex: 1; padding: 6px 10px; border-right: 1px solid #999; }
.classbar div:last-child { border-right: 0; }
.classbar small { display: block; font-size: 10px; color: #777; text-transform: uppercase; letter-spacing: 1px; }
.classbar b { font-size: 14px; }
.safe b { color: #2a7d2a; } .euclid b { color: #c78c00; } .keter b { color: #b00; } .thaumiel b { color: #555; } .apollyon b { color: #600; } .person b { color: #7a2fb0; }

p.field b:first-child { color: #000; }
.redact { background: #000; color: #000; padding: 0 2px; cursor: help; transition: color .2s, background .2s; }
.redact:hover { color: #fff; background: #600; }

.addendum { border: 1px solid #aaa; background: #f6f6f6; padding: 8px 14px; margin: 16px 0; }
.addendum h3 { margin: 0 0 6px; font-size: 13px; }
.collapse summary { cursor: pointer; color: #b01; font-weight: bold; }

/* Clearance gate */
#gate { position: fixed; inset: 0; background: rgba(0,0,0,.92); display: none; align-items: center; justify-content: center; z-index: 10; }
#gate .card { background: #111; border: 2px solid #900; color: #eee; max-width: 420px; padding: 26px; text-align: center; font-family: "Courier New", monospace; }
#gate h2 { color: #f33; margin: 0 0 10px; letter-spacing: 2px; }
#gate button { margin-top: 14px; background: #900; color: #fff; border: 0; padding: 8px 18px; font-family: inherit; cursor: pointer; }

/* Series list */
.series { columns: 2; padding-left: 18px; }
.series li { break-inside: avoid; }
.notice { border: 1px solid #c99; background: #fdf3f3; padding: 10px 14px; margin: 14px 0; }
#footer { text-align: center; font-size: 11px; color: #888; padding: 10px 20px 30px; }

@media (max-width: 720px) {
  #layout { flex-direction: column; }
  #side { width: 100%; }
  #header h1 { font-size: 26px; }
  #header svg { width: 64px; height: 64px; }
  .img-block { float: none; width: 100%; margin: 0 0 12px; }
  .series { columns: 1; }
  #main { padding: 16px; }
}

/* Containment status widget */
.status #st { font-family: "Courier New", monospace; font-weight: bold; font-size: 15px; letter-spacing: 2px; padding: 3px 0; }
.status .contained { color: #2a7d2a; }
.status .breached { color: #c00; animation: blink 1s steps(2) infinite; }
.status small { font-size: 11px; color: #666; }
@keyframes blink { 50% { opacity: .35; } }

/* Log tables */
table.log { border-collapse: collapse; width: 100%; margin: 8px 0 16px; font-size: 12px; }
table.log th, table.log td { border: 1px solid #aaa; padding: 5px 8px; text-align: left; vertical-align: top; }
table.log th { background: #e4e4e4; }
table.log tr:nth-child(even) td { background: #f7f7f7; }
