/* ==========================================================================
   thedead.dog // CULT OF THE DEAD DOG // Zero-JS CRT Terminal Stylesheet
   Inspired by https://cultdeadcow.com/ (ACiD / BBS Textfile Era)
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    background-color: #000000;
    color: #00ff00;
    font-family: "IBM Plex Mono", "JetBrains Mono", "Fira Code", "Courier New", Courier, monospace;
    font-size: 14px;
    line-height: 1.48;
    color-scheme: dark;
}

body {
    margin: 0;
    padding: 12px 0 48px 0;
    background-color: #000000;
    color: #00ff00;
    overflow-x: hidden;
}

a:link,
a:visited {
    color: #00ff00;
    text-decoration: underline;
    text-underline-offset: 2px;
}

a:hover,
a:active,
a:focus-visible {
    color: #ffffff;
    background-color: #002b00;
    outline: 1px dashed #00ff00;
}

.shell {
    width: min(96vw, 1560px);
    margin: 0 auto;
    padding: 0 8px;
}

/* --- ASCII Dog Skull Header --- */
.header-wrap {
    text-align: center;
    margin-bottom: 12px;
    border-bottom: 1px dashed #006600;
    padding-bottom: 10px;
}

.ascii-art {
    display: inline-block;
    text-align: left;
    margin: 0 auto;
    color: #00ff00;
    font-family: "Courier New", Courier, monospace;
    font-size: clamp(5.2px, 1.45vw, 12px);
    line-height: 1.12;
    white-space: pre;
    overflow-x: auto;
    max-width: 100%;
    text-shadow: 0 0 6px rgba(0, 255, 0, 0.28);
}

.motto-bar {
    margin-top: 6px;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    color: #00cc00;
}

.status-strip {
    margin-top: 6px;
    font-size: 0.8rem;
    color: #00aa00;
}

/* --- BBS Navigation & Granularity Bars --- */
.nav-deck {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid #00aa00;
    background: #000800;
    margin-bottom: 10px;
}

.nav-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.nav-label {
    color: #009900;
    font-weight: bold;
    margin-right: 4px;
}

.bbs-tab {
    display: inline-block;
    padding: 3px 8px;
    text-decoration: none !important;
    border: 1px solid #005500;
    color: #00ff00;
    background: #000000;
    font-weight: normal;
    white-space: nowrap;
}

.bbs-tab:hover {
    color: #ffffff;
    border-color: #ffffff;
    background: #003300;
}

.bbs-tab.active {
    background: #00ff00;
    color: #000000 !important;
    border-color: #00ff00;
    font-weight: bold;
}

/* --- Zero-JS HTML5 Query Form --- */
.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    border: 1px dashed #007700;
    background: #000500;
    margin-bottom: 14px;
}

.filter-form label {
    color: #00bb00;
    font-size: 0.85rem;
}

.cdc-input {
    background: #000000;
    color: #00ff00;
    border: 1px solid #00aa00;
    padding: 4px 8px;
    font-family: inherit;
    font-size: 0.9rem;
    min-width: 160px;
}

.cdc-input.search-wide {
    flex: 1 1 240px;
}

.cdc-input:focus {
    outline: 1px solid #ffffff;
    border-color: #ffffff;
    color: #ffffff;
}

.cdc-btn {
    background: #000000;
    color: #00ff00;
    border: 1px solid #00cc00;
    padding: 3px 9px;
    font-family: inherit;
    font-size: 0.84rem;
    cursor: pointer;
    text-decoration: none !important;
    display: inline-block;
}

.cdc-btn:hover,
.cdc-btn:focus-visible {
    background: #00ff00;
    color: #000000 !important;
    border-color: #ffffff;
}

/* --- DeepSeek V4 Flash Synthesis & Possibilities Grid --- */
.intel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.terminal-box {
    border: 1px solid #00cc00;
    background: #000600;
    padding: 10px 12px;
    min-width: 0;
}

.terminal-box.possibilities-box {
    border-style: double;
    border-width: 3px;
    border-color: #00ff00;
}

.box-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 6px;
    border-bottom: 1px dashed #008800;
    padding-bottom: 5px;
    margin-bottom: 8px;
    font-weight: bold;
    letter-spacing: 0.03em;
}

.box-meta {
    font-size: 0.76rem;
    font-weight: normal;
    color: #00aa00;
}

.prose-lines {
    margin: 0;
    padding-left: 18px;
}

.prose-lines li {
    margin-bottom: 6px;
}

.prose-para {
    margin: 0 0 8px 0;
    white-space: pre-line;
}

/* --- Desktop Resizable Left/Right Split (Tweets | News) --- */
.split-Hint {
    font-size: 0.75rem;
    color: #008800;
    text-align: right;
    margin-bottom: 4px;
}

.split-deck {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 16px;
}

.split-left {
    width: 43%;
    min-width: 280px;
    max-width: 72%;
    resize: horizontal;
    overflow: auto;
    border: 1px solid #00bb00;
    background: #000400;
    padding: 10px 12px;
}

.split-right {
    flex: 1 1 320px;
    min-width: 280px;
    border: 1px solid #00bb00;
    background: #000400;
    padding: 10px 12px;
}

.full-pane {
    border: 1px solid #00bb00;
    background: #000400;
    padding: 10px 12px;
    margin-bottom: 16px;
}

/* --- Feed Cards --- */
.item-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.feed-card {
    border-bottom: 1px dotted #005500;
    padding-bottom: 8px;
}

.feed-card:last-child {
    border-bottom: none;
}

.card-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px;
    font-size: 0.78rem;
    color: #00aa00;
    margin-bottom: 2px;
}

.badge {
    color: #000000;
    background: #00cc00;
    padding: 0 4px;
    font-weight: bold;
    font-size: 0.73rem;
}

.badge.badge-new {
    background: #00ff00;
}

.badge.badge-pod {
    background: #00bb00;
}

.card-title {
    font-weight: bold;
    font-size: 0.95rem;
    margin: 2px 0 4px 0;
    word-break: break-word;
}

.card-summary {
    font-size: 0.88rem;
    color: #b8ffb8;
    margin: 3px 0 5px 0;
    word-break: break-word;
}

.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 4px;
}

details.inline-details {
    font-size: 0.82rem;
    color: #00bb00;
}

details.inline-details summary {
    cursor: pointer;
    display: inline-block;
    user-select: none;
}

details.inline-details summary:hover {
    color: #ffffff;
}

.raw-drawer {
    margin-top: 5px;
    padding: 6px 8px;
    border-left: 2px solid #008800;
    background: #000c00;
    color: #88ff88;
    font-size: 0.82rem;
    word-break: break-word;
}

/* --- Dedicated Compact GitHub Section --- */
.github-section {
    border: 2px solid #00dd00;
    background: #000700;
    padding: 12px;
    margin-bottom: 18px;
}

.gh-statement {
    border: 1px dashed #00aa00;
    background: #001100;
    padding: 9px 11px;
    margin-bottom: 12px;
}

.gh-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 10px;
}

.gh-card {
    border: 1px solid #006600;
    padding: 8px 10px;
    background: #000200;
}

/* --- Native HTML5 Zero-JS Popover Modal --- */
.cdc-popover {
    max-width: min(92vw, 720px);
    width: 100%;
    max-height: 84vh;
    overflow-y: auto;
    background: #000000;
    color: #00ff00;
    border: 3px double #00ff00;
    padding: 16px;
    margin: auto;
    box-shadow: 0 0 32px rgba(0, 255, 0, 0.28);
}

.cdc-popover::backdrop {
    background: rgba(0, 0, 0, 0.84);
}

.pop-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    border-bottom: 1px dashed #00aa00;
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.pop-meta {
    font-size: 0.82rem;
    color: #00aa00;
    margin-bottom: 10px;
}

.pop-section {
    margin-bottom: 12px;
    padding: 8px;
    border: 1px solid #005500;
    background: #000900;
    word-break: break-word;
}

/* --- RSS Directory Table --- */
.rss-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

.rss-table th,
.rss-table td {
    border: 1px solid #006600;
    padding: 7px 9px;
    text-align: left;
}

.footer-bar {
    text-align: center;
    border-top: 1px dashed #006600;
    padding-top: 12px;
    margin-top: 18px;
    font-size: 0.8rem;
    color: #009900;
}

.empty-notice {
    padding: 10px;
    border: 1px dashed #006600;
    color: #00bb00;
    font-size: 0.86rem;
}

/* --- Responsive Mobile & Narrow Resized Desktop Windows --- */
@media screen and (max-width: 960px) {
    .intel-grid {
        grid-template-columns: 1fr;
    }

    .split-Hint {
        display: none;
    }

    .split-deck {
        flex-direction: column;
    }

    .split-left,
    .split-right {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0;
        resize: none;
    }

    .gh-grid {
        grid-template-columns: 1fr;
    }

    .nav-deck {
        flex-direction: column;
        align-items: flex-start;
    }
}
