/* site.css — layout only. Colors come from colors.css. No JavaScript. */
html, body { margin: 0; padding: 0; min-height: 100%; }

body.desktop {
  background: var(--desktop-bg);
  background-image:
    linear-gradient(var(--desktop-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--desktop-grid) 1px, transparent 1px);
  background-size: 8px 8px;
  color: var(--body-text);
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
  font-size: 12px;
  padding: 16px;
  box-sizing: border-box;
}

body.desktop .title-bar {
  background: linear-gradient(90deg, var(--title-bar-start), var(--title-bar-end));
}
body.desktop .title-bar-text { color: var(--title-bar-text); }
body.desktop .window { background: var(--window-bg); }
body.desktop a { color: var(--link-color); }

.page {
  max-width: var(--page-max-width);
  margin: 0 auto 40px auto;
}

.site-title {
  text-align: center;
  margin: 8px 0 12px 0;
  color: var(--site-title-color);
  text-shadow: 1px 1px 0 var(--site-title-shadow);
  font-size: 18px;
  font-weight: bold;
}

.hero-banner {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  object-position: center;
  display: block;
  margin-bottom: 8px;
  border: 2px solid var(--banner-border);
  box-shadow: inset -1px -1px #fff, inset 1px 1px grey;
}

.nav-window { margin-bottom: 12px; }

.nav-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: stretch;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
}

/* Anchor styled like 98.css buttons — no JavaScript navigation */
a.nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  background: silver;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px grey, inset 2px 2px #dfdfdf;
  box-sizing: border-box;
  min-height: 28px;
  min-width: 0;
  padding: 6px 8px;
  text-align: center;
  text-decoration: none;
  color: #000 !important;
  font-family: "Pixelated MS Sans Serif", Arial, sans-serif;
  font-size: 11px;
  -webkit-font-smoothing: none;
}
a.nav-btn:active {
  box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px grey;
  padding: 7px 7px 5px 9px;
}
a.nav-btn.current {
  font-weight: bold;
  box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px grey;
}

/* Equal-width window rows */
.grid-2,
.grid-3,
.panel-row {
  display: grid;
  gap: 12px;
  margin: 12px 0;
  width: 100%;
  box-sizing: border-box;
  align-items: stretch;
}
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3,
.panel-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.grid-2 > .window,
.grid-3 > .window,
.panel-row > .window {
  width: 100%;
  min-width: 0;
  margin: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.grid-2 > .window > .window-body,
.grid-3 > .window > .window-body,
.panel-row > .window > .window-body {
  flex: 1 1 auto;
}

@media (max-width: 820px) {
  .nav-row {
    flex-wrap: wrap;
  }
  a.nav-btn {
    flex: 1 1 calc(33.33% - 8px);
  }
  .grid-3,
  .panel-row {
    grid-template-columns: 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.window.full {
  width: 100%;
  margin: 12px 0;
  box-sizing: border-box;
}

.window-body p,
.window-body li,
.window-body pre { color: var(--body-text); }

.window-body pre.ascii {
  overflow: auto;
  max-height: none;
  white-space: pre;
  font-size: 10px;
  line-height: 1.1;
  background: var(--ascii-bg, #000000);
  color: var(--ascii-text, #00ff00);
  padding: 8px;
  margin: 0;
  border: 1px solid #00ff00;
  box-shadow: none;
  text-shadow: 0 0 4px rgba(0, 255, 0, 0.35);
}

.window-body pre.log,
.window-body pre.data-block {
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 320px;
  overflow: auto;
  font-size: 11px;
  line-height: 1.35;
  background: #000000;
  color: #00ffe0;
  padding: 8px;
  margin: 0;
  border: 1px solid #00ffe0;
  box-shadow: none;
}

.hex {
  font-family: "Courier New", monospace;
  font-size: 11px;
  word-break: break-all;
  white-space: pre-wrap;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.gallery-grid figure { margin: 0; text-align: center; }
.gallery-grid img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  background: var(--sunken-bg);
  border: 1px solid #808080;
  box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a;
}
.gallery-grid figcaption { margin-top: 4px; font-size: 10px; }

.download-list { display: flex; flex-wrap: wrap; gap: 16px; }
.download-item { text-align: center; width: 120px; }
.download-item img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: var(--sunken-bg);
  border: 1px solid #808080;
}

.field-row-stacked label { margin-bottom: 2px; display: block; }
.field-row-stacked input,
.field-row-stacked textarea {
  width: 100%;
  box-sizing: border-box;
}
textarea.message { min-height: 100px; width: 100%; box-sizing: border-box; }
.muted { color: var(--muted-text); }
.status-bar { margin-top: 4px; }

/* Theme guide */
.swatch {
  display: inline-block;
  width: 48px;
  height: 24px;
  border: 1px solid #000;
  vertical-align: middle;
  margin-right: 6px;
  box-shadow: inset -1px -1px #fff, inset 1px 1px grey;
}
.guide-table { width: 100%; border-collapse: collapse; }
.guide-table td, .guide-table th {
  border: 1px solid #808080;
  padding: 4px 6px;
  text-align: left;
  background: var(--sunken-bg);
}
.icon-path-list { columns: 2; }
@media (max-width: 720px) { .icon-path-list { columns: 1; } }
code, kbd {
  font-family: "Courier New", monospace;
  background: var(--sunken-bg);
  padding: 1px 3px;
  box-shadow: inset 1px 1px grey;
}

/* Scheme support: black windows + cyan text */
body.desktop .window-body,
body.desktop .window-body p,
body.desktop .window-body li,
body.desktop .window-body pre,
body.desktop .status-bar-field {
  color: var(--body-text);
}
body.desktop .window-body pre.ascii {
  color: var(--ascii-text, #00ff00);
  background: var(--ascii-bg, #000000);
}
body.desktop .window-body pre.log,
body.desktop .window-body pre.data-block {
  color: #00ffe0;
  background: #000000;
}
body.desktop legend {
  background: var(--window-bg);
  color: var(--body-text);
}
body.desktop fieldset {
  color: var(--body-text);
}
body.desktop .guide-table td,
body.desktop .guide-table th {
  color: #000000;
}

/* Tree view / sunken lists inside black windows */
body.desktop ul.tree-view {
  background: #000000;
  color: var(--body-text);
  box-shadow: inset -1px -1px #00ffe0, inset 1px 1px #241f31, inset -2px -2px #003333, inset 2px 2px #0a0a0a;
}
body.desktop ul.tree-view li {
  color: var(--body-text);
}
body.desktop ul.tree-view a {
  color: var(--link-color);
}
body.desktop ul.tree-view a:focus {
  background-color: var(--title-bar-start);
  color: #000000;
}
/* nested tree guide lines on dark */
body.desktop ul.tree-view ul > li:last-child:after {
  background: #000000;
}



/* Contact page: no white panels; Data aqua on black */
body.page-contact .window-body pre,
body.page-contact pre.data-block,
body.page-contact pre.log {
  background: #000000 !important;
  color: #00ffe0 !important;
  box-shadow: none !important;
}
body.page-contact .hex {
  color: #00ffe0;
}
body.page-contact .status-bar-field {
  background: #000000;
  color: #00ffe0;
  box-shadow: inset -1px -1px #003333, inset 1px 1px #00ffe0;
}
body.desktop pre.data-block,
body.desktop pre.log {
  background: #000000;
  color: #00ffe0;
}

/* Blog entry windows */
.window.entry-window {
  margin: 12px 0;
}
.entry-meta {
  margin: 0 0 4px 0;
  color: var(--muted-text);
  font-size: 11px;
}
.entry-date {
  color: var(--body-text);
  font-weight: bold;
  letter-spacing: 0.04em;
}
.entry-title {
  margin: 0 0 10px 0;
  color: var(--site-title-color);
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  text-shadow: 0 0 6px rgba(9, 255, 0, 0.35);
}
.entry-text {
  margin: 8px 0;
  line-height: 1.45;
  color: var(--body-text);
}
.entry-ascii-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 12px 0;
  overflow-x: auto;
}
pre.ascii.entry-ascii {
  display: inline-block;
  max-width: 100%;
  max-height: none;
  margin: 0 auto;
  text-align: left;
  /* keep monospace columns; outer wrap centers the block */
  background: var(--ascii-bg, #000000);
  color: var(--ascii-text, #00ff00);
}
.entry-image-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 12px auto;
  text-align: center;
}
.entry-image {
  display: block;
  width: 320px;
  max-width: 90%;
  height: 240px;
  object-fit: contain;
  object-position: center;
  background: #000000;
  border: 1px solid #00ffe0;
  box-shadow: none;
  image-rendering: auto;
}
.entry-image-caption {
  margin: 8px 0 0 0;
  color: var(--body-text);
  font-size: 11px;
  font-style: normal;
}



/* Shared ASCII frame (all pages) */
.entry-ascii-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 12px 0;
  overflow-x: auto;
}
pre.ascii,
pre.ascii.entry-ascii {
  display: inline-block;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
  background: var(--ascii-bg, #000000);
  color: var(--ascii-text, #00ff00);
  border: 1px solid #00ff00;
  box-shadow: none;
  text-shadow: 0 0 4px rgba(0, 255, 0, 0.35);
}
/* Splash art can be taller than log snippets */
.entry-ascii-wrap pre.ascii.entry-ascii {
  max-height: none;
}


/* Blink effects (from original terminal example, CSS only) */
.blink {
  animation: blink 1s linear infinite;
}
.blink-green {
  animation: blink 1s linear infinite;
  color: #00ff00;
}
.blink-red {
  animation: blink 1s linear infinite;
  color: #ff0000;
}
.blink-yellow {
  animation: blink 1s linear infinite;
  color: #ffff00;
}
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}
.prompt {
  color: #00ff00;
}
