/* ===================================================================
   TheWired — Main Stylesheet
   Font: Courier New (monospace). Border-radius: 0 everywhere.
   =================================================================== */

/* --- Reset / Base ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; }

body {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 15px;
  color: #202020;
  background: #8E8E8E;
  line-height: 1.8;
}

/* --- Design Tokens ------------------------------------------------ */
:root {
  --color-yellow:    #FDFD00;
  --color-dark:      #202020;
  --color-blue:      #0000FE;
  --color-red:       #FF0019;
  --color-gray:      #8E8E8E;
  --color-white:     #FFFFFF;
  --color-off-white: #F0F0F0;
  --color-border:    #CCCCCC;
  --color-stripe:    #F5F5F0;
  --color-bq-tint:   #F0F0FF;
}

/* --- Page Wrapper ------------------------------------------------- */
.page-wrapper {
  background: #8E8E8E;
  padding: 8px 14px;
  max-width: 1100px;
  margin: 0 auto;
}

/* --- Layout Grid -------------------------------------------------- */
.layout {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 8px;
  align-items: start;
  margin-top: 10px;
}

@media (max-width: 600px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

/* --- Content Box -------------------------------------------------- */
.content-box {
  background: #FFFFFF;
  border: 1px solid #CCCCCC;
  border-radius: 0;
}

/* --- SITE LOGO ---------------------------------------------------- */
.site-logo {
  display: flex;
  align-items: flex-end;
  position: relative;
  z-index: 2;
  line-height: 0;
}
.site-logo-link {
  display: block;
  flex: 1;
  line-height: 0;
}
.site-logo-text {
  width: 112%;
  height: auto;
  display: block;
}
.site-logo-head {
  display: block;
  height: 200px;
  flex-shrink: 0;
  margin-bottom: -80px;
}

/* --- FOOTER ------------------------------------------------------- */
.site-footer {
  background: #FFFFFF;
  border: 1px solid #CCCCCC;
  padding: 10px 16px;
  font-size: 11px;
  color: #8E8E8E;
  text-align: center;
  margin-top: 8px;
}
.site-footer a { color: #8E8E8E; }

/* ===================================================================
   MAIN CONTENT AREA
   =================================================================== */

/* --- Post box (index listing) ------------------------------------- */
.post-box {
  background: #FFFFFF;
  border: 1px solid #CCCCCC;
  padding: 12px;
  margin-bottom: 8px;
}

.post-box .post-title {
  font-size: 14px;
  font-weight: bold;
  color: #202020;
  text-decoration: none;
  display: block;
  margin-bottom: 4px;
}
.post-box .post-title:hover { text-decoration: underline; }

.post-meta {
  font-size: 11px;
  color: #8E8E8E;
  margin-bottom: 6px;
}
.post-meta a {
  color: #0000FE;
  text-decoration: underline;
}

.post-read-more {
  font-size: 11px;
}
.post-read-more a {
  color: #0000FE;
  text-decoration: underline;
}

/* --- NEW badge ---------------------------------------------------- */
.badge-new {
  display: inline-block;
  background: #FF0019;
  color: #FDFD00;
  font-size: 9px;
  font-weight: bold;
  padding: 2px 6px;
  letter-spacing: 0.08em;
  border-radius: 0;
  vertical-align: middle;
  margin-left: 6px;
}

/* ===================================================================
   SINGLE POST / PAGE
   =================================================================== */

.entry-wrap {
  background: #FFFFFF;
  border: 1px solid #CCCCCC;
  padding: 14px 16px;
}

.entry-title {
  font-size: 20px;
  font-weight: bold;
  color: #202020;
  margin-bottom: 10px;
}

.entry-header {
  border-bottom: 2px solid #202020;
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.entry-meta {
  font-size: 11px;
  color: #8E8E8E;
  margin-top: 6px;
}
.entry-meta a {
  color: #0000FE;
  text-decoration: underline;
}

.entry-body { padding: 0; }

.entry-filed-under {
  font-size: 11px;
  color: #8E8E8E;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid #CCCCCC;
}
.entry-filed-under a {
  color: #0000FE;
  text-decoration: underline;
}

.entry-prevnext {
  border-top: 2px solid #202020;
  margin-top: 14px;
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}
.entry-prevnext a {
  color: #0000FE;
  text-decoration: underline;
}

/* Mobile single post */
@media (max-width: 600px) {
  .entry-title { font-size: 16px; }
  .entry-wrap  { padding: 10px; }
}

/* ===================================================================
   BODY CONTENT ELEMENTS
   =================================================================== */

.entry-body h2, .page-body h2 {
  font-size: 14px;
  font-weight: bold;
  color: #202020;
  border-left: 3px solid #8E8E8E;
  padding-left: 8px;
  margin: 16px 0 8px;
}

.entry-body h3, .page-body h3 {
  font-size: 13px;
  font-weight: bold;
  color: #202020;
  border-left: 3px solid #8E8E8E;
  padding-left: 8px;
  margin: 14px 0 6px;
}

.entry-body p, .page-body p {
  font-size: 16px;
  color: #202020;
  line-height: 1.8;
  margin: 0 0 10px;
}

.entry-body a, .page-body a {
  color: #0000FE;
  text-decoration: underline;
}

.entry-body blockquote, .page-body blockquote {
  border-left: 3px solid #0000FE;
  background: #F0F0FF;
  padding: 8px 12px;
  margin: 10px 0;
  font-style: italic;
  font-size: 14px;
  line-height: 1.7;
  color: #202020;
}

.entry-body code, .page-body code {
  background: #F0F0F0;
  border: 1px solid #CCCCCC;
  padding: 1px 5px;
  font-size: 11px;
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
}

.entry-body pre, .page-body pre {
  background: #202020;
  color: #FDFD00;
  border-left: 3px solid #FDFD00;
  padding: 10px 12px;
  font-size: 11px;
  line-height: 1.7;
  overflow-x: auto;
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
}
.entry-body pre code, .page-body pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 11px;
  color: #FDFD00;
}

.entry-body ul, .page-body ul {
  list-style: none;
  padding-left: 0;
  margin: 0 0 10px;
}
.entry-body ul li::before, .page-body ul li::before {
  content: '· ';
  color: #0000FE;
  font-weight: bold;
}

.entry-body ol, .page-body ol {
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.8;
  margin: 0 0 10px;
}

.entry-body hr, .page-body hr {
  border: none;
  border-top: 1px solid #CCCCCC;
  margin: 14px 0;
}

.entry-body table, .page-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin: 0 0 10px;
}
.entry-body th, .page-body th {
  font-weight: bold;
  text-align: left;
  border-bottom: 2px solid #202020;
  padding: 4px 8px;
}
.entry-body td, .page-body td {
  padding: 4px 8px;
  border-bottom: 1px solid #E8E8E8;
}
.entry-body tr:nth-child(even) td, .page-body tr:nth-child(even) td {
  background: #F5F5F0;
}

/* --- Alert / notice ----------------------------------------------- */
.alert {
  border-left: 3px solid #FF0019;
  background: #1C0006;
  padding: 8px 12px;
  margin: 10px 0;
}
.alert-label {
  color: #FF0019;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
}
.alert-body { color: #CCCCCC; font-size: 12px; }

/* ===================================================================
   ARCHIVE / CATEGORY PAGE
   =================================================================== */

.archive-wrap {
  background: #FFFFFF;
  border: 1px solid #CCCCCC;
}

.archive-header {
  background: linear-gradient(to bottom, #d0d0d0, #9a9a9a);
  border: 2px solid #000000;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: bold;
  color: #202020;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.archive-filter {
  padding: 6px 10px;
  font-size: 10px;
  color: #8E8E8E;
  border-bottom: 1px solid #E8E8E8;
}
.archive-filter a { color: #0000FE; text-decoration: underline; }

.archive-year {
  padding: 8px 10px 4px;
  font-size: 10px;
  font-weight: bold;
  color: #8E8E8E;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  border-bottom: 2px solid #202020;
}

.archive-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 10px;
  border-bottom: 1px solid #E8E8E8;
  gap: 8px;
}
.archive-row:last-child { border-bottom: none; }

.archive-row-title {
  font-weight: bold;
  color: #202020;
  text-decoration: none;
  font-size: 12px;
  flex: 1;
}
.archive-row-title:hover { text-decoration: underline; }

.archive-row-date {
  font-size: 11px;
  color: #8E8E8E;
  white-space: nowrap;
  flex-shrink: 0;
}

.archive-row-cats {
  font-size: 11px;
  width: 100%;
  color: #8E8E8E;
}
.archive-row-cats a { color: #0000FE; text-decoration: underline; }

/* Mobile archive rows */
@media (max-width: 600px) {
  .archive-row { flex-wrap: wrap; gap: 2px; }
}

/* ===================================================================
   PAGINATION
   =================================================================== */

.pagination {
  border-top: 1px solid #E0E0DC;
  margin-top: 10px;
  padding-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  background: #FFFFFF;
  padding: 8px 12px;
  border-top: 1px solid #CCCCCC;
}
.pagination a { color: #0000FE; text-decoration: underline; }
.pagination .pagination-info { color: #8E8E8E; font-size: 11px; }

/* ===================================================================
   SIDEBAR WIDGETS
   =================================================================== */

.widget {
  background: #FFFFFF;
  border: 2px solid #000000;
  margin-bottom: 8px;
}

.widget-header {
  background: linear-gradient(to bottom, #d0d0d0, #9a9a9a);
  border-bottom: 2px solid #000000;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: bold;
  color: #202020;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.widget-body { padding: 10px; }

/* Category accordion */
.cat-accordion,
.cat-accordion ul {
  list-style: none;
  padding-left: 0;
  width: 100%;
}
.cat-accordion li { margin: 0; }

.cat-accordion a {
  color: #0000FE;
  text-decoration: underline;
  font-size: 12px;
}
.cat-accordion .cat-count {
  color: #8E8E8E;
  font-size: 10px;
  margin-left: 4px;
}

/* Depth indentation via nesting */
.cat-accordion > li > ul       { padding-left: 10px; border-left: 1px solid #CCCCCC; }
.cat-accordion > li > ul ul    { padding-left: 10px; border-left: 1px solid #CCCCCC; }
.cat-accordion > li > ul ul ul { padding-left: 10px; border-left: 1px solid #CCCCCC; }

/* Top-level labels bold */
.cat-accordion > li > .cat-row > a { font-weight: bold; }

.cat-toggle {
  font-size: 9px;
  cursor: pointer;
  user-select: none;
  color: #202020;
  flex-shrink: 0;
}

.cat-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding: 2px 0;
  min-height: 36px; /* touch-friendly */
  align-items: center;
}
.cat-row a { flex: 1; }

/* Collapsed sub-lists */
.cat-accordion ul[hidden] { display: none; }

/* Active category in current archive */
.cat-accordion a.cat-active {
  color: #202020;
  font-weight: bold;
  text-decoration: none;
}

/* Image banners widget */
.link-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
  justify-content: center;
}
.link-buttons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 31px;
  background: #000000;
  color: #FDFD00;
  font-size: 9px;
  font-weight: bold;
  text-decoration: none;
  border: 1px solid #444444;
  overflow: hidden;
  position: relative;
  text-align: center;
}
.link-buttons a img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: none;
}
.link-buttons a span {
  position: relative;
  z-index: 1;
  line-height: 1.2;
  padding: 0 4px;
  word-break: break-word;
}

.link-banners { display: flex; flex-direction: column; gap: 4px; }
.link-banners a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 31px;
  background: #000000;
  color: #FDFD00;
  font-size: 10px;
  font-weight: bold;
  text-decoration: none;
  border: 1px solid #444444;
  overflow: hidden;
  position: relative;
  text-align: center;
}
.link-banners a img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: none;
}
.link-banners a span {
  position: relative;
  z-index: 1;
}

/* Hide image banners on mobile */
@media (max-width: 600px) {
  /* logo: show it, but collapse the head overlap and scale to fit */
  .site-logo {
    display: flex;           /* was display: none — restore it */
    align-items: flex-end;
    overflow: visible;
  }
  .site-logo-text {
    width: 100%;             /* don't let it bleed outside the viewport */
  }
  .site-logo-head {
     display: none;
  }

  /* button / banner widgets: show them */
  .widget.widget-links   { display: block; }
  .widget.widget-buttons { display: block; }

  .sidebar { display: block; }
}

/* SL Status widget */
.sl-status-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.sl-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 1px solid #000000;
  flex-shrink: 0;
  background: #8E8E8E;
}
.sl-dot.online  { background: #00AA00; }
.sl-dot.offline { background: #8E8E8E; }
.sl-label {
  font-size: 12px;
  color: #202020;
}

/* Achievements widget */
.ach-item + .ach-item {
  border-top: 1px solid #E8E8E8;
  margin-top: 6px;
  padding-top: 6px;
}
.ach-name {
  font-size: 12px;
  font-weight: bold;
  color: #202020;
}
.ach-name a {
  color: #0000FE;
  text-decoration: underline;
}
.ach-pts {
  font-size: 11px;
  font-weight: bold;
  color: #202020;
}
.ach-meta {
  font-size: 10px;
  color: #202020;
  margin-top: 2px;
}

/* ===================================================================
   EVERGREEN / STANCE PAGE
   =================================================================== */

.living-doc-note {
  font-style: italic;
  color: #8E8E8E;
  border-left: 3px solid #8E8E8E;
  background: #F8F8F6;
  padding: 6px 10px;
  font-size: 12px;
  margin-bottom: 14px;
}

.evergreen-footer {
  font-size: 11px;
  color: #8E8E8E;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid #CCCCCC;
}
.evergreen-footer a { color: #0000FE; text-decoration: underline; }

/* ===================================================================
   UTILITY
   =================================================================== */

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

a { color: #0000FE; text-decoration: underline; }

/* Gap between main column boxes */
.main-col > * + * { margin-top: 8px; }

/* ===================================================================
   COMMENTS
   =================================================================== */

.comments-section {
  border: 1px solid #CCCCCC;
  margin-top: 14px;
  background: #FFFFFF;
}

.comments-header {
  background: linear-gradient(to bottom, #d0d0d0, #9a9a9a);
  border-bottom: 2px solid #000000;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: bold;
  color: #202020;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.comment {
  padding: 10px 12px;
  border-bottom: 1px solid #E8E8E8;
}
.comment:nth-child(even) { background: #F5F5F0; }
.comment:last-child { border-bottom: none; }

.comment-meta {
  font-size: 11px;
  color: #8E8E8E;
  margin-bottom: 4px;
}

.comment-body {
  font-size: 14px;
  line-height: 1.7;
  color: #202020;
}

.comments-empty {
  padding: 10px 12px;
  font-size: 12px;
  color: #8E8E8E;
  font-style: italic;
}

.comment-form-wrap {
  border-top: 2px solid #000000;
  margin-top: 0;
}

.comment-form {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comment-form-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.comment-form-row label {
  font-size: 11px;
  font-weight: bold;
  color: #202020;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.comment-optional {
  font-weight: normal;
  text-transform: none;
  color: #8E8E8E;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 12px;
  color: #202020;
  background: #FFFFFF;
  border: 1px solid #CCCCCC;
  border-radius: 0;
  padding: 5px 7px;
  outline: none;
}
.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
  border-color: #0000FE;
}

.comment-form textarea { resize: vertical; line-height: 1.6; }

.comment-form-actions {
  display: flex;
  gap: 6px;
}

.comment-form input[type="submit"] {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 11px;
  font-weight: bold;
  color: #FFFFFF;
  background: #0000FE;
  border: none;
  border-top:    2px solid #6666FF;
  border-left:   2px solid #6666FF;
  border-right:  2px solid #000055;
  border-bottom: 2px solid #000055;
  padding: 4px 12px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.comment-form input[type="submit"]:hover { background: #3333CC; }

.comments-closed {
  font-size: 11px;
  color: #8E8E8E;
  font-style: italic;
  margin-top: 14px;
  padding: 8px 0;
  border-top: 1px solid #CCCCCC;
}

/* Search widget */
.search-form {
  display: flex;
  gap: 4px;
}
.search-input {
  flex: 1;
  font-family: inherit;
  font-size: 12px;
  padding: 3px 5px;
  border: 1px solid #000;
  background: #fff;
}
.search-submit {
  font-family: inherit;
  font-size: 12px;
  padding: 3px 8px;
  border: 1px solid #000;
  background: #ccc;
  cursor: pointer;
}
.search-submit:hover { background: #aaa; }

/* Search results page */
.search-results-header {
  font-size: 18px;
  font-weight: bold;
  padding: 10px 0 8px;
  border-bottom: 1px solid #000;
  margin-bottom: 12px;
}
.search-no-results {
  font-size: 13px;
  color: #8E8E8E;
  font-style: italic;
  padding: 16px 0;
}