@import "/static/theme/chaostheory/css/pygments-native.css";

/* universal box model — prevents padding/border from causing overflow */
*, *::before, *::after {
    box-sizing: border-box;
}

/* layout */
.container_16 {
    width: 96%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}
/* clearfix via pseudo-element — clears floats without clipping content */
.container_16::after {
    content: '';
    display: table;
    clear: both;
}
.container_16 .grid_16 {
    display: block;
    float: none;      /* override 960.css float: left */
    width: 100%;
    margin: 0;
}
#wikibar {
    overflow: hidden; /* self-clear the left/right wikibar floats */
}
.grid_10 {
    float: left;
    width: 72%;
}
.grid_6 {
    float: right;
    width: 26%;
}
div.clear { clear: both; display: block; height: 0; }

/* prevent any element from blowing out the horizontal layout */
body {
    overflow-x: hidden;
}
img, video, pre, table {
    max-width: 100%;
}

html {
    background-color: #111111;
}

body {
    margin: 0;
    background-color: #1C4E63;
    color: #DDDDDD;
    font-family: Verdana, Arial, Helvetica, Tahoma, sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

#header {
    display: block;
    font-size: 1.6em;
    background-color: #0A0A0A;
    padding: 1.2% 2%;
    letter-spacing: -0.02em;
}

#header a {
    color: #ffffff;
    text-decoration: none;
}

#header a:hover {
    color: #6DCFF6;
}

h1, h2, h3, h4, h5 {
    color: #6DCFF6;
    font-family: Verdana, Arial, Helvetica, Tahoma, sans-serif;
    letter-spacing: -0.04em;
    line-height: normal;
}

a, a:link, a:visited {
    color: #6DCFF6;
    text-decoration: none;
}

a:hover {
    color: #9de3fb;
    text-decoration: underline;
}

/*********************
  wikibar
*********************/

#wikibar {
    padding-top: 0;
    margin-top: 0;
    border: 0;
    font-size: 12px;
    overflow: hidden;
}

#wikibar-left, #wikibar-right {
    padding: 0;
    margin: 0;
}

#wikibar-right {
    width: auto;
    float: right;
    background-color: #0A0A0A;
    padding: 6px 12px;
}

#wikibar-left a {
    border: 0;
    border-top: 1px solid #0a0a0a;
    float: left;
    background-color: #0A0A0A;
    color: #CCCCCC;
    padding: 6px 12px;
    border-radius: 0;
    margin: 0;
    text-decoration: none;
}

#wikibar-left a.on {
    border-top: 1px solid #262626;
    background-color: #191919;
    color: #aaaaaa;
}

#wikibar-left a:hover {
    background: #111;
    color: #6DCFF6;
    border-top: 1px solid #1c1c1c;
}

/*********************
  search box
*********************/

#keywords {
    background-color: #184254;
    color: #eeeeee;
    border: 1px solid #336173;
    border-radius: 3px;
    padding: 4px 8px;
    font-size: 12px;
    width: 200px;
}

#keywords::placeholder {
    color: #aaaaaa;
}

#keywords:focus {
    outline: none;
    border-color: #6DCFF6;
}

/*********************
  content area
*********************/

#content {
    background-color: transparent;
    padding: 20px 32px;
}

/*********************
  thread summary cards
*********************/

.summary {
    padding: 14px 0;
    border-bottom: 1px solid #336173;
}

.summary:last-child {
    border-bottom: 0;
}

.summary a {
    font-size: 1.05em;
}

.author-and-date {
    font-size: 0.82em;
    color: #aaaaaa;
}

.remark-count {
    font-size: 0.82em;
    color: #6DCFF6;
    font-weight: bold;
}

.date {
    color: #888888;
}

/*********************
  page body areas
*********************/

#wiki-section-break, #comment-section, #show-comment {
    border-color: #336173;
}

#comment-section {
    display: block;
}

#comment, #comment-preview-div {
    font-size: 12px;
    background-color: #184254;
    color: #eeeeee;
    border-radius: 6px;
    border: 0;
}

textarea, .text {
    background-color: #184254;
    color: #eeeeee;
    border-radius: 6px;
    border: 1px solid #336173;
}

textarea:focus, .text:focus {
    outline: none;
    border-color: #6DCFF6;
}

#flash {
    opacity: 0.8;
}

.contents {
    background-color: #184254;
    color: #eeeeee;
    border: 0;
}

.codeblock {
    color: #bbbbbb;
    background-color: #184254;
    border-radius: 6px;
    border: 0;
    padding: 12px;
    font-size: 12px;
    font-family: monospace;
    overflow-x: auto;
}

/*********************
  footer
*********************/

#footer {
    background-image: url(/static/theme/chaostheory/footer-lines-bkg.png);
    padding: 40px;
    padding-top: 80px;
    background-color: #111111;
    background-position: 50% 0;
    background-repeat: repeat-x;
    font-size: 0.85em;
    color: #888888;
    text-align: center;
}

#footer a, #footer a:link, #footer a:visited {
    color: #6DCFF6;
}

.utility {
    color: white;
    font-weight: bold;
}

/*********************
  tables
*********************/

table.event {
    border: 0;
    width: 100%;
}

td.event {
    color: #DDDDDD;
    padding: 6px 8px;
}

tr.False {
    background-color: #184254;
}

tr.True {
    background-color: #1C4E63;
}

.daybr {
    background-color: #153948;
    border: 0;
    font-size: 1.1em;
    font-weight: bold;
    padding: 4px 8px;
    color: #6DCFF6;
}

/*********************
  alerts / flash
*********************/

.warning, .error {
    background-color: #4a1a1a;
    color: #ffaaaa;
    border: 1px solid #7a2020;
    border-radius: 4px;
    padding: 8px 12px;
}

.success, .notice {
    background-color: #0e3020;
    color: #aaffbb;
    border: 1px solid #1a5c30;
    border-radius: 4px;
    padding: 8px 12px;
}

/*********************
  forms & comment section
*********************/

.common-text-input,
.common-textarea {
    background-color: #184254;
    color: #eeeeee;
    border: 1px solid #336173;
    border-radius: 4px;
}

.common-text-input:focus,
.common-textarea:focus {
    outline: none;
    border-color: #6DCFF6;
}

.common-text-input::placeholder,
.common-textarea::placeholder {
    color: #aaaaaa;
}

input[type="text"],
input[type="email"],
input[type="input"] {
    background-color: #184254;
    color: #eeeeee;
    border: 1px solid #336173;
    border-radius: 4px;
    padding: 4px 8px;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="input"]::placeholder {
    color: #aaaaaa;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="input"]:focus {
    outline: none;
    border-color: #6DCFF6;
}

input[type="submit"],
button[type="submit"],
.button {
    background-color: #184254;
    color: #6DCFF6;
    border: 1px solid #336173;
    border-radius: 4px;
    padding: 5px 14px;
    cursor: pointer;
    font-size: 12px;
    font-family: Verdana, Arial, Helvetica, Tahoma, sans-serif;
}

input[type="submit"]:hover,
button[type="submit"]:hover,
.button:hover {
    background-color: #1C4E63;
    border-color: #6DCFF6;
    color: #9de3fb;
}

.green-button {
    background-color: #0e3020;
    border-color: #1a5c30;
    color: #aaffbb;
}

.green-button:hover {
    background-color: #1a5c30;
    color: #ddffee;
}

.comments-section {
    margin-top: 2rem;
}

.comments-divider {
    border-top: 2px solid #336173;
    margin-bottom: 1rem;
}

.comments-header {
    color: #6DCFF6;
    font-family: Verdana, Arial, Helvetica, Tahoma, sans-serif;
    letter-spacing: -0.04em;
    margin-top: 0;
    padding-top: 0;
}

.no-comments {
    color: #aaaaaa;
    font-style: italic;
    margin-top: 1rem;
}

.preview {
    background-color: #184254;
    border: 1px dotted #336173;
    border-radius: 4px;
    padding: 12px 16px;
    margin-top: 8px;
    color: #eeeeee;
}

.author-and-date a,
.status,
.whats-next,
.topic,
.remark-count {
    color: #aaaaaa;
    font-size: 0.82em;
}

.topic a {
    color: #6DCFF6;
}

.action,
.remark {
    color: #aaaaaa;
    font-size: 0.78em;
    margin-right: 8px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
}

.action:hover,
.remark:hover {
    color: #6DCFF6;
}

p.whats-next {
    color: #aaaaaa;
    font-size: 0.85em;
}

/*********************
  TOC (.. contents::)
*********************/

div.contents {
    background-color: #184254;
    border: 1px solid #336173;
    border-radius: 4px;
    padding: 12px 20px;
    display: inline-block;
    min-width: 200px;
    margin-bottom: 1.5em;
}

div.contents ul {
    margin: 0;
    padding-left: 1.2em;
}

div.contents a, div.contents a:visited {
    color: #6DCFF6;
    font-size: 0.9em;
}

div.contents a:hover {
    color: #9de3fb;
}

/*********************
  thread comments
*********************/

.conversation {
    border-top: 1px solid #336173;
    padding-top: 1.2rem;
    margin-top: 1.2rem;
}

.node {
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
}

.node-depth-1 { padding-left: 0; }
.node-depth-2 { padding-left: 28px; border-left: 2px solid #336173; margin-left: 16px; }
.node-depth-3 { padding-left: 28px; border-left: 2px solid #2a5468; margin-left: 28px; }
.node-depth-4 { padding-left: 28px; border-left: 1px solid #2a5468; margin-left: 40px; }

.node .author-and-date {
    font-size: 0.82em;
    color: #aaaaaa;
    margin-bottom: 4px;
    display: block;
}

.node-data {
    margin-top: 6px;
    line-height: 1.65;
}

.node-data p {
    margin-top: 0;
    margin-bottom: 0.5em;
}

.node-actions {
    margin-top: 6px;
}

.remark-box-div-main {
    background-color: #184254;
    border: 1px solid #336173;
    border-radius: 6px;
    padding: 16px 20px;
    margin-bottom: 1.5rem;
}

.remark-box-div-main .common-textarea {
    min-height: 80px;
}

/*********************
  images & figures
*********************/

.node-data img,
#content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 8px 0;
}

figure {
    margin: 1rem 0;
}

figcaption {
    font-size: 0.85em;
    color: #aaaaaa;
    font-style: italic;
    margin-top: 4px;
}

/*********************
  OG comment card style
*********************/

/* Override previous node styles with card-based layout */
.conversation {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.node.node-depth-1 {
    background-color: #163a4a;
    border: 1px solid #4a8fa8;
    border-radius: 6px;
    padding: 14px 18px 12px 18px;
    margin-bottom: 14px;
}

.node.node-depth-2 {
    background-color: #112e3c;
    border: 1px solid #4a8fa8;
    border-left: 3px solid #6DCFF6;
    border-radius: 4px;
    padding: 10px 14px 10px 14px;
    margin-bottom: 10px;
    margin-left: 32px;
}

.node.node-depth-3 {
    background-color: #0e2530;
    border: 1px solid #336173;
    border-left: 3px solid #4a8fa8;
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 8px;
    margin-left: 56px;
}

.node.node-depth-4,
.node.node-depth-5 {
    background-color: #0b1e27;
    border: 1px solid #2a5468;
    border-left: 2px solid #336173;
    border-radius: 4px;
    padding: 6px 10px;
    margin-bottom: 6px;
    margin-left: 72px;
}

/* Card interior — flex row with wrap.
   Avatar + author-and-date share the first row.
   Everything else wraps to full width below. */
.node.node-depth-1,
.node.node-depth-2,
.node.node-depth-3,
.node.node-depth-4,
.node.node-depth-5 {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    align-content: flex-start;
    column-gap: 10px; /* gap between avatar flex item and author-and-date */
    row-gap: 0;
}

/* Avatar wrapper (a or img) — flex item, kill float from align="left" */
.node img.avatar,
.node a:has(img.avatar) {
    flex: 0 0 auto;
    float: none !important;
    order: 0;
    display: block;
    align-self: flex-start;
    margin: 0;
}

.node img.avatar {
    border-radius: 3px;
    display: block;
}

/* Author/date: fills rest of the header row */
.node .author-and-date {
    flex: 1 1 0;
    min-width: 0;
    order: 1;
    font-size: 0.82em;
    color: #aaaaaa;
    padding-bottom: 8px;
    border-bottom: 1px solid #2a5468;
    line-height: 1.4;
    align-self: center;
}

.node .author-and-date a {
    color: #6DCFF6;
    font-weight: bold;
}

/* Everything below wraps to a new full-width row */
.node .status,
.node .node-data,
.node .node-actions,
.node .edit-box-div,
.node .remark-box-div,
.node [id^="node-children-"] {
    flex: 0 0 100%;
    order: 10;
}

/* Comment text */
.node .node-data {
    margin-top: 10px;
    font-size: 0.95em;
    line-height: 1.65;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Action row */
.node .node-actions {
    margin-top: 8px;
    border-top: 1px solid #2a5468;
    padding-top: 5px;
    font-size: 0.78em;
}

/* Reply form inside node — display:none owned by common.css; just clear floats when open */
.remark-box-div.toggle-open {
    display: flow-root;
}

/* Thread container spacing */
.thread {
    margin-top: 1rem;
}

.no-comments {
    background-color: #184254;
    border: 1px solid #336173;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    color: #aaaaaa;
    font-style: italic;
    margin-top: 1rem;
}

/* Main reply form card */
.remark-box-div-main {
    background-color: #184254;
    border: 1px solid #336173;
    border-radius: 6px;
    padding: 16px 20px;
    margin-bottom: 1.5rem;
    display: flow-root; /* clears internal floats without clipping */
}
