/* =============================================
   DISCARDSOFTWARE — Retro Three-Theme Stylesheet
   theme-dark  : Home page  (charcoal)
   theme-light : Glerf page (white / #d2cfff periwinkle)
   theme-warn  : 404 page   (dark amber / orange warning)
   ============================================= */

/* ── Reset ── */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: Tahoma, 'MS Sans Serif', Arial, sans-serif;
  font-size: 11px;
  line-height: 1.5;
}

a { text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin-bottom: 5px; }

/* ── Page wrapper (fixed-width centred column) ── */
#page-wrap {
  max-width: 780px;
  margin: 0 auto;
}

/* ── Scrolling header ── */
@keyframes header-marquee {
  0%   { margin-left: 100%; }
  100% { margin-left: -200%; }
}

#header {
  height: 26px;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0 6px;
}

#header-scroll {
  white-space: nowrap;
  font-size: 11px;
  font-weight: bold;
  animation: header-marquee 48s linear infinite;
}

/* ── Navbar ── */
#navbar { border-top-width: 1px; border-top-style: solid; }

#navbar-inner {
  display: flex;
  padding: 3px 4px;
  gap: 1px;
}

#navbar-inner a {
  display: inline-block;
  padding: 2px 12px;
  font-size: 11px;
  font-family: Tahoma, Arial, sans-serif;
  border-width: 1px;
  border-style: solid;
  border-color: transparent;
}

#navbar-inner a:hover,
#navbar-inner a.active {
  text-decoration: none;
}

/* ── Warning bar (404 page, no links) ── */
#warn-bar {
  border-top-width: 1px;
  border-top-style: solid;
  border-bottom-width: 1px;
  border-bottom-style: solid;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.06em;
}

/* ── 3-column layout ── */
#wrapper {
  display: flex;
  gap: 5px;
  padding: 5px;
  align-items: flex-start;
}

#sidebar-left  { width: 160px; flex-shrink: 0; }
#main-content  { flex: 1; min-width: 0; }
#sidebar-right { width: 150px; flex-shrink: 0; }

/* ── Panels (window boxes) ── */
.panel { margin-bottom: 5px; }

.panel-title {
  font-size: 11px;
  font-weight: bold;
  padding: 3px 6px;
  user-select: none;
  letter-spacing: 0.01em;
}

.panel-body { padding: 6px; }

/* ── Data table (key-value pairs in sidebars) ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.data-table td {
  padding: 2px 3px;
  vertical-align: top;
}

.data-table .label {
  font-weight: bold;
  white-space: nowrap;
  padding-right: 5px;
  width: 50%;
}

/* ── Features / engine table ── */
.features-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.features-table th {
  text-align: left;
  padding: 3px 6px;
  font-weight: bold;
  border-bottom-width: 1px;
  border-bottom-style: solid;
}

.features-table td {
  padding: 3px 6px;
  border-bottom-width: 1px;
  border-bottom-style: solid;
  vertical-align: middle;
}

.features-table tr:last-child td { border-bottom: none; }

/* ── Blog entries ── */
.blog-entry {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom-width: 1px;
  border-bottom-style: dotted;
}

.blog-entry:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.blog-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 5px;
}

.blog-entry-title {
  font-weight: bold;
  font-size: 12px;
}

.blog-entry-date {
  font-size: 10px;
  white-space: nowrap;
  margin-left: 8px;
}

.blog-entry-body p {
  font-size: 11px;
  margin-bottom: 3px;
}

/* ── Status tags ── */
.tag, .badge-wip, .badge-active, .badge-planned, .badge-done, .badge-warn {
  display: inline-block;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: bold;
  font-family: Tahoma, Arial, sans-serif;
  border-width: 1px;
  border-style: solid;
}

/* ── Progress bar ── */
.progress-wrap { margin-top: 7px; }

.progress-label-row {
  font-size: 10px;
  font-weight: bold;
  margin-bottom: 2px;
  display: flex;
  justify-content: space-between;
}

.progress-bar {
  height: 11px;
  border-width: 1px;
  border-style: solid;
}

.progress-fill { height: 100%; }

/* ── Hero banner ── */
.hero-text { padding: 4px 2px 6px; }

.hero-text h1 {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 5px;
  line-height: 1.2;
}

.hero-text p {
  font-size: 12px;
  margin-bottom: 8px;
}

/* ── 404 error display ── */
.error-code {
  font-size: 64px;
  font-weight: bold;
  line-height: 1;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
  font-family: Tahoma, Arial, sans-serif;
}

.error-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 8px;
}

/* ── Stat boxes (home page) ── */
.stat-row {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}

.stat-box {
  flex: 1;
  text-align: center;
  padding: 5px 4px;
  border-width: 1px;
  border-style: solid;
}

.stat-box-value {
  font-size: 18px;
  font-weight: bold;
  line-height: 1;
  display: block;
  margin-bottom: 2px;
}

.stat-box-label {
  font-size: 9px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
}

/* ── Team entries ── */
.team-entry {
  margin-bottom: 7px;
  padding-bottom: 6px;
  border-bottom-width: 1px;
  border-bottom-style: solid;
}

.team-entry:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.team-role {
  font-weight: bold;
  font-size: 11px;
  margin-bottom: 2px;
}

.team-desc { font-size: 10px; }

/* ── Project block ── */
.project-name {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 5px;
}

.project-block p { margin-bottom: 8px; }

/* ── Button ── */
.btn {
  display: inline-block;
  padding: 3px 12px;
  font-size: 11px;
  font-family: Tahoma, Arial, sans-serif;
  cursor: pointer;
  border-width: 1px;
  border-style: solid;
}

.btn:hover { text-decoration: none; }

/* ── Link list ── */
.link-list { list-style: none; }
.link-list li { padding: 2px 0; }

/* ── Footer ── */
#footer {
  text-align: center;
  padding: 5px 6px;
  font-size: 10px;
  border-top-width: 1px;
  border-top-style: solid;
}

/* ==============================================
   DARK THEME — Home page (charcoal)
   ============================================== */

body.theme-dark {
  background-color: #141414;
  color: #b8b8b8;
}

body.theme-dark #page-wrap {
  background: #1e1e1e;
  border-left: 1px solid #2e2e2e;
  border-right: 1px solid #0a0a0a;
}

/* Header */
body.theme-dark #header {
  background: #0e0e0e;
  border-bottom: 1px solid #050505;
}

body.theme-dark #header-scroll { color: #606060; }

/* Navbar */
body.theme-dark #navbar {
  background: linear-gradient(to bottom, #2c2c2c, #1c1c1c);
  border-top-color: #404040;
  border-bottom: 1px solid #080808;
}

body.theme-dark #navbar-inner a {
  color: #909090;
  border-color: transparent;
}

body.theme-dark #navbar-inner a:hover,
body.theme-dark #navbar-inner a.active {
  background: #383838;
  color: #e8e8e8;
  border-top-color: #505050;
  border-left-color: #505050;
  border-right-color: #0c0c0c;
  border-bottom-color: #0c0c0c;
}

/* Panels */
body.theme-dark .panel {
  border-top: 1px solid #484848;
  border-left: 1px solid #484848;
  border-right: 1px solid #0c0c0c;
  border-bottom: 1px solid #0c0c0c;
}

body.theme-dark .panel-title {
  background: linear-gradient(to right, #404040, #2a2a2a);
  color: #cccccc;
  border-bottom: 1px solid #0c0c0c;
}

body.theme-dark .panel-body { background: #242424; }

/* Text */
body.theme-dark p { color: #a8a8a8; }
body.theme-dark a { color: #909090; }
body.theme-dark a:hover { color: #e0e0e0; }

/* Data table */
body.theme-dark .data-table tr:nth-child(even) td { background: #1e1e1e; }
body.theme-dark .data-table .label { color: #707070; }

/* Features table */
body.theme-dark .features-table th {
  background: #2c2c2c;
  color: #c0c0c0;
  border-bottom-color: #0c0c0c;
}
body.theme-dark .features-table td {
  color: #a8a8a8;
  border-bottom-color: #1c1c1c;
}
body.theme-dark .features-table tr:nth-child(odd) td { background: #1e1e1e; }

/* Blog entries */
body.theme-dark .blog-entry { border-bottom-color: #303030; }
body.theme-dark .blog-entry-title { color: #d8d8d8; }
body.theme-dark .blog-entry-date { color: #585858; }
body.theme-dark .blog-entry-body p { color: #a0a0a0; }

/* Hero */
body.theme-dark .hero-text h1 { color: #e8e8e8; }
body.theme-dark .hero-text p  { color: #787878; }

/* Stat boxes */
body.theme-dark .stat-box {
  background: #1c1c1c;
  border-top-color: #484848;
  border-left-color: #484848;
  border-right-color: #0c0c0c;
  border-bottom-color: #0c0c0c;
}
body.theme-dark .stat-box-value { color: #e8e8e8; }
body.theme-dark .stat-box-label { color: #585858; }

/* Team */
body.theme-dark .team-entry { border-bottom-color: #303030; }
body.theme-dark .team-role  { color: #d0d0d0; }
body.theme-dark .team-desc  { color: #606060; }

/* Project block */
body.theme-dark .project-name    { color: #e8e8e8; }
body.theme-dark .project-block p { color: #787878; }

/* Tags */
body.theme-dark .tag.wip,
body.theme-dark .badge-wip {
  background: #201800;
  color: #c8a000;
  border-color: #483200;
}

body.theme-dark .tag.planned,
body.theme-dark .badge-planned {
  background: #1c1c1c;
  color: #787878;
  border-color: #363636;
}

body.theme-dark .tag.done,
body.theme-dark .badge-done,
body.theme-dark .badge-active {
  background: #0a1a0a;
  color: #48b848;
  border-color: #163016;
}

/* Progress bar */
body.theme-dark .progress-bar {
  background: #181818;
  border-top-color: #0a0a0a;
  border-left-color: #0a0a0a;
  border-right-color: #3a3a3a;
  border-bottom-color: #3a3a3a;
}
body.theme-dark .progress-fill {
  background: linear-gradient(to right, #484848, #383838);
}
body.theme-dark .progress-label-row { color: #707070; }

/* Button */
body.theme-dark .btn {
  background: linear-gradient(to bottom, #3c3c3c, #2a2a2a);
  color: #c8c8c8;
  border-top-color: #545454;
  border-left-color: #545454;
  border-right-color: #0e0e0e;
  border-bottom-color: #0e0e0e;
}
body.theme-dark .btn:hover {
  background: linear-gradient(to bottom, #484848, #363636);
  color: #f0f0f0;
}

/* Footer */
body.theme-dark #footer {
  background: #111111;
  border-top-color: #080808;
  color: #484848;
}
body.theme-dark #footer a { color: #585858; }

/* ==============================================
   LIGHT THEME — Glerf page (white / #d2cfff periwinkle)
   ============================================== */

body.theme-light {
  background-color: #cac7f0;
  color: #1c1a38;
}

body.theme-light #page-wrap {
  background: #f0effe;
  border-left: 1px solid #d2cfff;
  border-right: 1px solid #7878b8;
}

/* Header */
body.theme-light #header {
  background: linear-gradient(to right, #b8b5e8, #d2cfff, #b8b5e8);
  border-bottom: 1px solid #8888c0;
}
body.theme-light #header-scroll {
  color: #1c1a38;
  text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}

/* Navbar */
body.theme-light #navbar {
  background: linear-gradient(to bottom, #e8e6ff, #d5d2f8);
  border-top-color: #ebebff;
  border-bottom: 1px solid #a8a6e0;
}

body.theme-light #navbar-inner a {
  color: #404098;
  border-color: transparent;
}

body.theme-light #navbar-inner a:hover,
body.theme-light #navbar-inner a.active {
  background: #d2cfff;
  color: #1c1a38;
  border-top-color: #eae8ff;
  border-left-color: #eae8ff;
  border-right-color: #7878b8;
  border-bottom-color: #7878b8;
}

/* Panels */
body.theme-light .panel {
  border-top: 1px solid #d2cfff;
  border-left: 1px solid #d2cfff;
  border-right: 1px solid #7878b8;
  border-bottom: 1px solid #7878b8;
}

body.theme-light .panel-title {
  background: linear-gradient(to right, #b0aee0, #d2cfff);
  color: #1c1a38;
  border-bottom: 1px solid #8888c0;
}

body.theme-light .panel-body { background: #ffffff; }

/* Text */
body.theme-light p { color: #201e40; }
body.theme-light a { color: #3838a0; }
body.theme-light a:hover { color: #1c1a38; }

/* Data table */
body.theme-light .data-table tr:nth-child(even) td { background: #f0effe; }
body.theme-light .data-table .label { color: #7878b8; }

/* Features table */
body.theme-light .features-table th {
  background: #e8e6ff;
  color: #404098;
  border-bottom-color: #d2cfff;
}
body.theme-light .features-table td {
  color: #1c1a38;
  border-bottom-color: #eceaff;
}
body.theme-light .features-table tr:nth-child(odd) td { background: #f8f7ff; }

/* Blog entries */
body.theme-light .blog-entry { border-bottom-color: #d2cfff; }
body.theme-light .blog-entry-title { color: #1c1a38; }
body.theme-light .blog-entry-date { color: #8888b8; }
body.theme-light .blog-entry-body p { color: #303060; }

/* Hero */
body.theme-light .hero-text h1 { color: #1c1a38; }
body.theme-light .hero-text p  { color: #6868a0; }

/* Stat boxes */
body.theme-light .stat-box {
  background: #eceaff;
  border-top-color: #d2cfff;
  border-left-color: #d2cfff;
  border-right-color: #7878b8;
  border-bottom-color: #7878b8;
}
body.theme-light .stat-box-value { color: #1c1a38; }
body.theme-light .stat-box-label { color: #7878b8; }

/* Team */
body.theme-light .team-entry { border-bottom-color: #eceaff; }
body.theme-light .team-role  { color: #1c1a38; }
body.theme-light .team-desc  { color: #6868a0; }

/* Project block */
body.theme-light .project-name    { color: #1c1a38; }
body.theme-light .project-block p { color: #6868a0; }

/* Tags */
body.theme-light .tag.wip,
body.theme-light .badge-wip {
  background: #fff4e0;
  color: #a85c00;
  border-color: #ffd090;
}

body.theme-light .tag.planned,
body.theme-light .badge-planned {
  background: #eceaff;
  color: #404098;
  border-color: #d2cfff;
}

body.theme-light .tag.done,
body.theme-light .badge-done,
body.theme-light .badge-active {
  background: #e8f5e9;
  color: #2a7d2e;
  border-color: #a5d6a7;
}

/* Progress bar */
body.theme-light .progress-bar {
  background: #e0deff;
  border-top-color: #a0a0d8;
  border-left-color: #a0a0d8;
  border-right-color: #e8e6ff;
  border-bottom-color: #e8e6ff;
}
body.theme-light .progress-fill {
  background: linear-gradient(to right, #b0aee0, #d2cfff);
}
body.theme-light .progress-label-row { color: #6868a0; }

/* Button */
body.theme-light .btn {
  background: linear-gradient(to bottom, #d2cfff, #a8a6e0);
  color: #1c1a38;
  border-top-color: #e8e6ff;
  border-left-color: #e8e6ff;
  border-right-color: #7878b8;
  border-bottom-color: #7878b8;
}
body.theme-light .btn:hover {
  background: linear-gradient(to bottom, #c0bef5, #9090c8);
  color: #0c0c28;
}

/* Footer */
body.theme-light #footer {
  background: #e0deff;
  border-top-color: #a8a6e0;
  color: #8888b8;
}
body.theme-light #footer a { color: #404098; }

/* ==============================================
   WARN THEME — 404 page (dark amber / orange)
   ============================================== */

body.theme-warn {
  background-color: #100a00;
  color: #b07830;
}

body.theme-warn #page-wrap {
  background: #180e00;
  border-left: 1px solid #5a3000;
  border-right: 1px solid #0e0500;
}

/* Header */
body.theme-warn #header {
  background: #0c0600;
  border-bottom: 1px solid #2e1800;
}
body.theme-warn #header-scroll { color: #c07800; }

/* Warning bar */
body.theme-warn #warn-bar {
  background: linear-gradient(to bottom, #2e1800, #1e1000);
  border-top-color: #5a3000;
  border-bottom-color: #0e0500;
  color: #b06820;
}

/* Panels */
body.theme-warn .panel {
  border-top: 1px solid #6a3800;
  border-left: 1px solid #6a3800;
  border-right: 1px solid #1a0800;
  border-bottom: 1px solid #1a0800;
}

body.theme-warn .panel-title {
  background: linear-gradient(to right, #c06000, #783800);
  color: #ffe090;
  border-bottom: 1px solid #1a0800;
  text-shadow: 0 1px 1px rgba(0,0,0,0.6);
}

body.theme-warn .panel-body { background: #1a1000; }

/* Text */
body.theme-warn p { color: #a07028; }

/* Data table */
body.theme-warn .data-table tr:nth-child(even) td { background: #141000; }
body.theme-warn .data-table .label { color: #906030; }

/* Error display */
body.theme-warn .error-code { color: #f0a000; }
body.theme-warn .error-title { color: #e0c060; }
body.theme-warn .hero-text p  { color: #806030; }

/* Stat boxes */
body.theme-warn .stat-box {
  background: #141000;
  border-top-color: #6a3800;
  border-left-color: #6a3800;
  border-right-color: #0e0500;
  border-bottom-color: #0e0500;
}
body.theme-warn .stat-box-value { color: #f0a000; }
body.theme-warn .stat-box-label { color: #7a4820; }

/* Tags */
body.theme-warn .badge-warn {
  background: #2a1400;
  color: #d08000;
  border-color: #5a3000;
}

/* Progress bar */
body.theme-warn .progress-bar {
  background: #120a00;
  border-top-color: #1a0800;
  border-left-color: #1a0800;
  border-right-color: #5a3000;
  border-bottom-color: #5a3000;
}
body.theme-warn .progress-fill {
  background: linear-gradient(to right, #c06000, #e08000);
}
body.theme-warn .progress-label-row { color: #806030; }

/* Footer */
body.theme-warn #footer {
  background: #0c0600;
  border-top-color: #0a0500;
  color: #5a3010;
}
