/* politics.bar // brutalist terminal
 * Fonts: "Space Mono" (Google Fonts), "Roboto Mono" (Google Fonts)
 * Display: "Space Mono" weight 700. Body: "Roboto Mono" weight 400.
 */

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

html {
    background: #0a0a0a;
}

body {
    background: #0a0a0a;
    color: #e0e0e0;
    font-family: 'Roboto Mono', ui-monospace, Menlo, Consolas, monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    font-weight: 400;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* subtle scanline / CRT atmosphere */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background-image: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.012) 0,
        rgba(255, 255, 255, 0.012) 1px,
        transparent 1px,
        transparent 3px
    );
    mix-blend-mode: overlay;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background: radial-gradient(
        ellipse at center,
        transparent 55%,
        rgba(0, 0, 0, 0.55) 100%
    );
}

.terminal {
    position: relative;
    z-index: 3;
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

/* hero */

.hero {
    padding-top: 20px;
    padding-bottom: 12px;
}

.prompt-line {
    color: #888888;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.85rem;
    margin-bottom: 18px;
    word-break: break-all;
}

.prompt-symbol {
    color: #00ff41;
    font-weight: 700;
    margin-right: 0.6em;
}

.prompt-cmd {
    color: #888888;
}

.hero-title {
    font-family: 'Space Mono', 'Roboto Mono', monospace;
    font-size: clamp(1.5rem, 8vw, 3rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    color: #e0e0e0;
    line-height: 1.05;
    word-break: break-word;
}

.hero-question {
    margin-top: 18px;
    font-family: 'Roboto Mono', monospace;
    font-size: 1rem;
    font-weight: 400;
    color: #888888;
    line-height: 1.5;
}

.cursor {
    display: inline-block;
    color: #ff4444;
    font-weight: 700;
    margin-left: 0.05em;
    animation: blink 0.8s infinite;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* horizontal rule */

.rule {
    border: none;
    border-top: 1px dashed #333333;
    margin: 28px 0;
    color: transparent;
    height: 0;
    position: relative;
}

.rule::before {
    content: "----------------------------------------------------------------";
    display: block;
    color: #333333;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.85rem;
    line-height: 1;
    letter-spacing: 0;
    overflow: hidden;
    white-space: nowrap;
    position: absolute;
    top: -0.5em;
    left: 0;
    right: 0;
    background: #0a0a0a;
}

/* hide the dashed border in favor of the ::before dashes */
.rule {
    border-top: none;
    height: 1em;
    margin: 24px 0;
}

/* blocks */

.block {
    padding: 6px 0;
}

.block p {
    margin: 0 0 14px 0;
    color: #e0e0e0;
}

.block p:last-child {
    margin-bottom: 0;
}

.section-title {
    font-family: 'Space Mono', 'Roboto Mono', monospace;
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffcc00;
    margin-bottom: 16px;
    text-transform: lowercase;
    letter-spacing: 0;
}

.meta {
    color: #888888;
    font-size: 0.8rem;
    margin-bottom: 14px !important;
}

.emphasis {
    color: #ff4444;
    font-family: 'Space Mono', 'Roboto Mono', monospace;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

del {
    color: #888888;
    text-decoration: line-through;
    text-decoration-color: #ff4444;
    text-decoration-thickness: 2px;
    margin-right: 0.15em;
}

a {
    color: #00ff41;
    text-decoration: underline;
    text-decoration-color: #00ff41;
    text-underline-offset: 2px;
}

a:hover {
    background: #00ff41;
    color: #0a0a0a;
    text-decoration: none;
}

/* quote-style ">" lines */

.quote-line {
    color: #ffcc00;
    font-family: 'Roboto Mono', monospace;
    padding-left: 0;
    margin: 6px 0 !important;
}

.caret {
    color: #00ff41;
    font-weight: 700;
    margin-right: 0.6em;
    display: inline-block;
}

/* ledger */

.ledger {
    background: #1a1a1a;
    border-left: 2px solid #333333;
    padding: 14px 16px;
    margin: 16px 0 18px 0;
    font-size: 0.88rem;
    overflow-x: auto;
}

.ledger-row {
    margin: 0 0 8px 0 !important;
    color: #e0e0e0;
    line-height: 1.55;
}

.ledger-row:last-child {
    margin-bottom: 0 !important;
}

.ledger-tag {
    display: inline-block;
    color: #888888;
    font-family: 'Space Mono', 'Roboto Mono', monospace;
    font-weight: 700;
    margin-right: 0.6em;
    letter-spacing: 0.02em;
}

.ledger-tag.warn {
    color: #ffcc00;
}

.ledger-tag.err {
    color: #ff4444;
}

.ledger-pass {
    color: #00ff41;
    font-weight: 700;
    text-transform: uppercase;
}

.ledger-fail {
    color: #ff4444;
    font-weight: 700;
    text-transform: uppercase;
}

/* strike list */

.strike-list {
    list-style: none;
    padding: 0;
    margin: 14px 0 0 0;
}

.strike-list li {
    margin-bottom: 8px;
    color: #e0e0e0;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.92rem;
}

.strike-list li::before {
    content: ">";
    color: #00ff41;
    font-weight: 700;
    margin-right: 0.6em;
}

/* rule list */

.rule-list {
    list-style: none;
    padding: 0;
    margin: 14px 0 0 0;
    counter-reset: rules;
}

.rule-list li {
    counter-increment: rules;
    margin-bottom: 12px;
    color: #e0e0e0;
    padding-left: 2.4em;
    position: relative;
    font-size: 0.92rem;
    line-height: 1.55;
}

.rule-list li::before {
    content: "[" counter(rules, decimal-leading-zero) "]";
    position: absolute;
    left: 0;
    top: 0;
    color: #ffcc00;
    font-family: 'Space Mono', 'Roboto Mono', monospace;
    font-weight: 700;
}

/* feed */

.feed {
    margin-top: 12px;
    border-left: 2px solid #ff4444;
    padding-left: 14px;
}

.feed-line {
    margin: 0 0 8px 0 !important;
    color: #e0e0e0;
    font-size: 0.88rem;
    line-height: 1.55;
    position: relative;
    padding-left: 5.4em;
    transition: background 0.15s ease, color 0.15s ease;
}

.feed-line::before {
    content: attr(data-stamp);
    position: absolute;
    left: 0;
    top: 0;
    color: #888888;
    font-family: 'Space Mono', 'Roboto Mono', monospace;
    font-size: 0.78rem;
    font-weight: 700;
}

.feed-line.is-fresh {
    background: rgba(255, 204, 0, 0.06);
    color: #ffcc00;
}

.feed-line.is-fresh::before {
    color: #ffcc00;
}

/* glossary */

.glossary {
    margin-top: 14px;
}

.glossary dt {
    color: #ff4444;
    font-family: 'Space Mono', 'Roboto Mono', monospace;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 14px;
    font-size: 0.92rem;
    letter-spacing: 0.02em;
}

.glossary dt:first-child {
    margin-top: 0;
}

.glossary dt::before {
    content: "// ";
    color: #888888;
    font-weight: 400;
}

.glossary dd {
    margin-left: 0;
    margin-top: 4px;
    color: #e0e0e0;
    font-size: 0.92rem;
    padding-left: 1.4em;
    border-left: 1px solid #333333;
}

/* subscribe form */

.sub-form {
    margin-top: 16px;
    background: #1a1a1a;
    border: 1px solid #333333;
    padding: 16px;
}

.sub-row {
    display: flex;
    align-items: center;
    gap: 0.6em;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.sub-row:last-child {
    margin-bottom: 0;
}

.sub-prompt {
    color: #00ff41;
    font-family: 'Space Mono', 'Roboto Mono', monospace;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.sub-cmd {
    color: #e0e0e0;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
}

.sub-input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid #333333;
    color: #e0e0e0;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.95rem;
    padding: 4px 0;
    outline: none;
    caret-color: #ff4444;
}

.sub-input::placeholder {
    color: #888888;
}

.sub-input:focus {
    border-bottom-color: #ff4444;
}

.sub-btn {
    background: transparent;
    color: #ffcc00;
    border: 1px solid #ffcc00;
    padding: 8px 18px;
    font-family: 'Space Mono', 'Roboto Mono', monospace;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}

.sub-btn:hover,
.sub-btn:focus-visible {
    background: #ffcc00;
    color: #0a0a0a;
}

.sub-btn:active {
    background: #ff4444;
    color: #0a0a0a;
    border-color: #ff4444;
}

.sub-status {
    margin: 4px 0 0 0 !important;
    font-size: 0.85rem;
    color: #888888;
    font-family: 'Roboto Mono', monospace;
    min-height: 1.4em;
    width: 100%;
}

.sub-status.ok {
    color: #00ff41;
}

.sub-status.err {
    color: #ff4444;
}

/* footer */

.footer {
    margin-top: 36px;
    padding-top: 20px;
}

.footer-line {
    color: #888888;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.85rem;
    text-align: left;
}

/* selection */

::selection {
    background: #ff4444;
    color: #0a0a0a;
}

::-moz-selection {
    background: #ff4444;
    color: #0a0a0a;
}

/* scrollbar (webkit) */

.ledger::-webkit-scrollbar {
    height: 6px;
}

.ledger::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.ledger::-webkit-scrollbar-thumb {
    background: #333333;
}

/* responsive */

@media (max-width: 540px) {
    .terminal {
        padding: 28px 16px 48px;
    }

    .hero-title {
        font-size: clamp(1.5rem, 11vw, 2.6rem);
    }

    .feed-line {
        padding-left: 0;
    }

    .feed-line::before {
        position: static;
        display: block;
        margin-bottom: 2px;
    }

    .ledger {
        padding: 12px 12px;
        font-size: 0.82rem;
    }

    .sub-row {
        gap: 0.4em;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cursor {
        animation: none;
    }
    .feed-line {
        transition: none;
    }
}
