/* Hollow Earth Insider — one stylesheet, no preprocessor.
   Warm earthen theme — all 30 palette colors in use. Core roles:
     #212C2D  dark slate        (surfaces)
     #063E34  deep pine         (page behind panel, inset fields, zebra rows)
     #5F735A  sage              (structure, borders, dividers, hover wash)
     #D7DFDA  bone white        (body text; #93A9A4 sage-grey for meta text)
     #85D2E3  sky teal          (links, buttons, focus; #63A4B5 visited)
     #E43F37  ember red         (h1, active tab, ban/selection, flash text)
   Accents (each visible on the main pages): #F5971E site title (glow to
     match) · #ECB9A4 tagline · #992A19 page/masthead frame · #DD5E09 h1
     rule · #E3360F h1 ">>" + active links · #F2865F h2, blog titles,
     button text · #FF8D81 h3-h6 · #F79097 rolemarks + nav user corner ·
     #F6D34E sidebar headings · #B44E13 sidebar "//" + preview banner ·
     #479F8C sidebar frame · #73BCAC sidebar bullets + code · #EECECD
     hints · #63A4B5 timestamps + visited links · #D95C30 nav separators
     + button hover · #C74C22 button border + press · #EEC200 pager
     current page + NEW badges · #EFA600 comment counts + search
     highlight · #656837 hr · #954618 comment frames + flash border ·
     #BB6C25 comment-header dashes + pre border · #BA2C15 table headers ·
     #873D0D invite-tree hit.
   Full-width fluid layout, sidebar-left, 1px borders, no animations. */

body {
  margin: 0;
  padding: 0;
  background: #063E34;
  color: #D7DFDA;
  font-family: "Courier New", Courier, monospace;
  font-size: 14px;
  line-height: 1.5;
}

#container {
  width: auto;
  min-height: 100vh;
  margin: 0;
  background: #212C2D;
  border: 1px solid #992A19;
  padding: 14px 18px;
  box-sizing: border-box;
  overflow: hidden;
}

::selection {
  background: #E43F37;
  color: #212C2D;
}

/* ---------------------------------------------------------- masthead */

#masthead {
  overflow: hidden;
  border: 1px solid #992A19;
  background: #212C2D;
  padding: 8px 12px;
  margin-bottom: 6px;
}

#masthead .mastlogo {
  float: left;
  margin: 1px 10px 1px 0;
}

#masthead .sitetitle {
  margin: 0;
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 3px;
  text-transform: uppercase;
}

#masthead .sitetitle a {
  color: #F5971E;
  text-decoration: none;
  text-shadow: 0 0 8px rgba(245, 151, 30, 0.8);
}

#masthead .tagline {
  margin: 2px 0 0 0;
  font-size: 11px;
  letter-spacing: 1px;
  color: #ECB9A4;
}

#masthead .tagline:before {
  content: "> ";
}

/* ------------------------------------------------------------ topnav */

#topnav {
  border: 1px solid #5F735A;
  background: #212C2D;
  font-size: 12px;
  font-weight: bold;
  padding: 3px 6px;
  margin-bottom: 10px;
}

#topnav a,
#topnav a:visited {
  color: #85D2E3;
  text-decoration: none;
  padding: 1px 6px;
}

#topnav a:hover {
  background: #85D2E3;
  color: #212C2D;
}

#topnav .sep {
  color: #D95C30;
}

#topnav .navuser {
  float: right;
}

#topnav .navuser a,
#topnav .navuser a:visited {
  color: #F79097;
}

/* ---------------------------------------------- comments & forum posts */

.comment {
  border: 1px solid #954618;
  padding: 6px 8px;
  margin: 0 0 8px 0;
}

.comment .postmeta {
  margin-bottom: 4px;
  border-bottom: 1px dashed #BB6C25;
  padding-bottom: 3px;
}

.commentbody p {
  margin: 4px 0;
}

.rolemark {
  color: #F79097;
  font-size: 10px;
}

/* "new since your last visit" badges — real, per-account state */
.newbadge {
  background: #EEC200;
  color: #212C2D;
  font-size: 10px;
  font-weight: bold;
  padding: 0 4px;
  letter-spacing: 1px;
}

a.newbadge,
a.newbadge:visited {
  color: #212C2D;
  text-decoration: none;
}

a.newbadge:hover {
  background: #85D2E3;
  color: #212C2D;
}

/* jumped-to comment */
.comment:target {
  border-color: #85D2E3;
}

#topnav .newbadge {
  font-size: 10px;
}

.sidenew {
  margin: 0 0 6px 0;
}

.usertagline {
  font-style: italic;
  color: rgba(215, 223, 218, 0.8);
  margin: 4px 0 10px 0;
}

.editlink {
  font-size: 10px;
}

code.invitecode {
  letter-spacing: 1px;
  color: #85D2E3;
}

/* Tab bar on the Users page */
.tabbar {
  border-bottom: 1px solid #5F735A;
  margin: 0 0 12px 0;
  padding: 0 0 0 4px;
}

.tabbar a,
.tabbar a:visited {
  display: inline-block;
  border: 1px solid #5F735A;
  border-bottom: 0;
  padding: 2px 12px;
  margin-right: 4px;
  color: #85D2E3;
  text-decoration: none;
  font-size: 12px;
  font-weight: bold;
  background: #063E34;
}

.tabbar a:hover {
  background: #5F735A;
  color: #D7DFDA;
}

.tabbar a.tabactive,
.tabbar a.tabactive:hover {
  background: #212C2D;
  color: #E43F37;
  border-color: #E43F37;
  border-bottom: 1px solid #212C2D;
  margin-bottom: -1px;
}

/* Invite tree: nested branches with connector lines */
ul.invitetree,
ul.invitetree ul {
  list-style: none;
  margin: 0;
  padding-left: 0;
}

ul.invitetree ul {
  margin-left: 9px;
  padding-left: 16px;
  border-left: 1px dashed #5F735A;
}

ul.invitetree li {
  margin: 4px 0;
  position: relative;
}

ul.invitetree ul li:before {
  content: "";
  position: absolute;
  left: -16px;
  top: 9px;
  width: 12px;
  border-top: 1px dashed #5F735A;
}

ul.invitetree details {
  display: inline;
}

ul.invitetree details > summary {
  cursor: pointer;
  display: list-item;
}

ul.invitetree summary::marker {
  color: #85D2E3;
}

.treesearch {
  margin: 0 0 8px 0;
}

.searchhits {
  border: 1px dashed #5F735A;
  padding: 5px 8px;
  font-size: 12px;
}

/* The searched-for account, once jumped to */
span.treenode:target {
  background: #873D0D;
  outline: 1px solid #85D2E3;
  padding: 1px 3px;
}

input.banbtn {
  font-size: 10px;
  padding: 0 4px;
  border-color: #E43F37;
  color: #E43F37;
}

input.banbtn:hover {
  background: #E43F37;
  color: #212C2D;
}

/* In-editor image upload (posts into the iframe below, draft untouched) */
.uploadbox {
  border: 1px dashed #5F735A;
  padding: 8px;
  margin-top: 12px;
}

.uploadbox p {
  margin: 0 0 6px 0;
}

iframe.uploadframe {
  width: 100%;
  height: 72px;
  border: 1px solid #5F735A;
  background: #063E34;
  margin-top: 6px;
}

/* Invite page: open and redeemed keys side by side */
.invitecols {
  overflow: hidden;
}

.invitecol {
  float: left;
  width: 49%;
}

.invitecol + .invitecol {
  float: right;
}

.invitecol h2 {
  margin-top: 0;
}

.recoverybox {
  border: 1px solid #E43F37;
  padding: 10px 12px;
  margin: 0 0 12px 0;
}

.recoverybox .downloadline {
  font-size: 15px;
  font-weight: bold;
}

/* Forum signature: the author's tagline, always exactly one line */
.sig {
  border-top: 1px dashed #5F735A;
  margin: 6px 0 0 0;
  padding-top: 3px;
  font-size: 11px;
  font-style: italic;
  color: #93A9A4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inlineform {
  display: inline;
}

.inlineform input[type="submit"] {
  font-size: 10px;
  padding: 0 4px;
}

/* ----------------------------------------------------------- columns */

#sidebar {
  float: left;
  width: 210px;
  font-size: 12px;
  border: 1px solid #479F8C;
  background: #212C2D;
  padding: 10px;
  box-sizing: border-box;
}

#content {
  margin-left: 230px;
  min-height: 300px;
}

/* ------------------------------------------------------------- links */

time { color: #63A4B5; }

a { color: #85D2E3; text-decoration: underline; }
a:visited { color: #63A4B5; }
a:active { color: #E3360F; }
a:hover { background: #5F735A; }

/* ----------------------------------------------------------- sidebar */

#sidebar .sideheading {
  font-weight: bold;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #F6D34E;
  border-bottom: 1px solid #F6D34E;
  margin: 12px 0 4px 0;
  padding-bottom: 2px;
}

#sidebar .sideheading:before {
  content: "// ";
  color: #B44E13;
}

#sidebar .sideheading:first-child {
  margin-top: 0;
}

#sidebar ul.sidelist li {
  margin-bottom: 5px;
}

#sidebar .sideheading label {
  color: #F6D34E;
  font-size: 10px;
}

#sidebar form:first-child .sideheading {
  margin-top: 0;
}

#sidebar ul.sidelist li::marker {
  color: #73BCAC;
}

#sidebar ul.sidelist {
  list-style: square;
  margin: 0 0 8px 0;
  padding-left: 18px;
}

#sidebar ul.sidelist li {
  margin-bottom: 2px;
}

#sidebar form {
  margin: 0 0 8px 0;
}

/* ---------------------------------------------------------- headings */

h1 {
  font-size: 17px;
  color: #E43F37;
  border-bottom: 1px solid #DD5E09;
  padding-bottom: 3px;
  margin: 0 0 10px 0;
  letter-spacing: 1px;
}

h1:before {
  content: ">> ";
  color: #E3360F;
}

h2 {
  font-size: 14px;
  color: #F2865F;
  margin: 14px 0 4px 0;
}

h3, h4, h5, h6 {
  font-size: 13px;
  color: #FF8D81;
  margin: 12px 0 4px 0;
}

/* ------------------------------------------------------------- posts */

.postitem h2 {
  font-size: 19px;
  margin-bottom: 2px;
}

.postitem h2 a,
.postitem h2 a:visited {
  color: #F2865F;
}

article > h1,
h1.threadtitle {
  font-size: 23px;
}

table.datatable a.threadlink {
  font-size: 15px;
  font-weight: bold;
}

.postmeta {
  font-size: 11px;
  color: #93A9A4;
  margin: 0 0 8px 0;
}

.postbody img {
  max-width: 100%;
  height: auto;
  border: 1px solid #5F735A;
}

.postbody blockquote {
  margin: 8px 0 8px 16px;
  padding-left: 10px;
  border-left: 3px solid #479F8C;
  color: rgba(215, 223, 218, 0.8);
}

.postbody pre {
  background: #063E34;
  border: 1px solid #BB6C25;
  padding: 6px;
  overflow-x: auto;
  font-size: 12px;
}

code {
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  color: #73BCAC;
}

.postbody table,
table.datatable {
  border-collapse: collapse;
  margin: 8px 0;
}

.postbody th, .postbody td,
table.datatable th, table.datatable td {
  border: 1px solid #5F735A;
  padding: 3px 6px;
  text-align: left;
  vertical-align: top;
}

.postbody th,
table.datatable th {
  background: #BA2C15;
  color: #D7DFDA;
  font-size: 11px;
}

table.datatable {
  font-size: 11px;
  width: 100%;
}

table.datatable tbody tr:nth-child(even) {
  background: #063E34;
}

hr {
  border: 0;
  border-top: 1px dashed #656837;
  height: 0;
  margin: 12px 0;
}

.pager, .prevnext p {
  font-size: 11px;
}

.pager strong {
  color: #EEC200;
}

ul.archivelist {
  list-style: none;
  margin: 4px 0 10px 0;
  padding-left: 4px;
}

ul.archivelist time {
  font-size: 10px;
  color: #93A9A4;
}

h2 .count {
  font-size: 11px;
  font-weight: normal;
  color: #EFA600;
}

/* Search-result snippets: highlight the matched words. */
.snip b {
  background: #EFA600;
  color: #212C2D;
  font-weight: normal;
}

/* ------------------------------------------------------------- forms */

label {
  font-size: 11px;
  font-weight: bold;
  color: #D7DFDA;
}

.hint {
  font-size: 10px;
  color: #EECECD;
  font-weight: normal;
}

input, select, textarea {
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  border: 1px solid #5F735A;
  background: #063E34;
  color: #D7DFDA;
}

input:focus, select:focus, textarea:focus {
  border-color: #85D2E3;
  outline: none;
}

select option {
  background: #212C2D;
  color: #D7DFDA;
}

input[type="submit"], input[type="file"], button {
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
  border: 1px solid #C74C22;
  background: #212C2D;
  color: #F2865F;
  padding: 1px 8px;
}

input[type="submit"]:hover, button:hover {
  background: #D95C30;
  border-color: #D95C30;
  color: #212C2D;
}

input[type="submit"]:active, button:active {
  background: #C74C22;
  border-color: #C74C22;
  color: #212C2D;
}

input, select, textarea, button {
  box-sizing: border-box;
}

textarea {
  width: 100%;
}

table.formtable th {
  text-align: right;
  padding-right: 8px;
  font-size: 11px;
  color: #D7DFDA;
}

.filterbar {
  font-size: 11px;
}

img.thumb {
  max-width: 80px;
  max-height: 60px;
  border: 1px solid #5F735A;
}

/* ---------------------------------------------------------- messages */

ul.flash {
  font-size: 11px;
  border: 1px solid #954618;
  color: #E43F37;
  background: #063E34;
  padding: 6px 6px 6px 24px;
  margin: 0 0 10px 0;
}

.previewnote {
  font-size: 11px;
  border: 1px solid #B44E13;
  background: #B44E13;
  color: #EECECD;
  padding: 6px;
  margin: 0 0 10px 0;
}

.previewnote a {
  color: #EECECD;
}

#mdpreview {
  margin-top: 10px;
}

#mdpreview .previewbox {
  border: 1px dashed #5F735A;
  padding: 8px;
}

/* ------------------------------------------------- narrow viewports */
/* Stack the sidebar above the content, enlarge text and tap targets,
   and let wide tables scroll sideways instead of breaking the page. */

@media (max-width: 720px) {
  body {
    font-size: 15px;
  }
  #container {
    padding: 8px;
  }
  #sidebar {
    float: none;
    width: auto;
    font-size: 13px;
  }
  #content {
    margin-left: 0;
    margin-top: 10px;
  }

  /* nav: bigger touch targets, let it wrap */
  #topnav {
    padding: 4px;
  }
  #topnav a {
    display: inline-block;
    padding: 6px 8px;
  }
  #topnav .navuser {
    float: none;
    display: inline-block;
  }
  #topnav .sep {
    display: none;
  }

  /* forms: full-width fields, 16px so phones don't zoom on focus */
  input, select, textarea, button {
    font-size: 16px;
  }
  input[type="text"], input[type="password"], select {
    width: 100%;
  }
  input[type="submit"], button {
    padding: 6px 12px;
  }
  .inlineform input[type="submit"] {
    font-size: 13px;
    padding: 2px 8px;
  }
  .inlineform input[type="password"] {
    width: auto;
  }

  /* wide tables scroll inside themselves */
  table.datatable,
  .postbody table {
    display: block;
    overflow-x: auto;
  }

  .invitecol,
  .invitecol + .invitecol {
    float: none;
    width: auto;
    margin-top: 10px;
  }

  .postmeta, .pager, .prevnext p, .filterbar, ul.flash, .hint {
    font-size: 13px;
  }
  #masthead .sitetitle {
    font-size: 17px;
    letter-spacing: 2px;
  }
}
