/* --- Global Design System Tokens --- */
:root {
    --reddit-orangered: #FF4500;
    --reddit-blue: #0079D3;
    --reddit-mint: #00E6CB;
    --bg-white: #FFFFFF;
    --bg-field: #F6F8FA; /* The classic Reddit grey canvas */
    --text-dark: #1C1C1C;
    --text-muted: #576F76;
    --border-light: #E2E8F0;
    --radius-heavy: 16px;
    --radius-standard: 12px;
    --radius-pill: 50px;
}

body {
    background-color: var(--bg-field);
    color: var(--text-dark);
    font-family: 'Reddit Sans', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Reddit Display', sans-serif;
    font-weight: 800;
}

/* --- Utilities --- */
.text-reddit-orangered { color: var(--reddit-orangered); }
.text-reddit-blue { color: var(--reddit-blue); }
.text-reddit-mint { color: var(--reddit-mint); }

/* --- Primary Buttons --- */
.btn-reddit-primary {
    background-color: var(--reddit-orangered);
    color: var(--bg-white);
    border: 1px solid var(--reddit-orangered);
    font-weight: 600;
    border-radius: var(--radius-pill);
    padding: 0.6rem 1.5rem;
    transition: all 0.2s ease;
}

.btn-reddit-primary:hover {
    background-color: #E03D00;
    color: var(--bg-white);
    transform: translateY(-1px);
}

/* --- Component Cards --- */
.reddit-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-heavy);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.reddit-card.border-reddit-orangered {
    border: 2px solid var(--reddit-orangered);
}

/* "How it Works" left-border aesthetic */
.feature-card {
    padding: 1.5rem 2rem;
    border-left: 4px solid var(--reddit-orangered);
    border-radius: 8px var(--radius-heavy) var(--radius-heavy) 8px;
}

/* Hero Badges */
.reddit-badge-dark {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-pill);
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #fff;
}

/* --- 5-Stage System Cards (Dark Mode UI) --- */
.reddit-dark-card {
    background-color: #272729; 
    border: 1px solid #343536;
    border-radius: var(--radius-heavy);
    padding: 2.5rem;
}

.stage-number {
    position: absolute;
    top: -15px;
    right: 20px;
    font-size: 8rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.03);
    font-family: 'Reddit Display', sans-serif;
    line-height: 1;
}

.result-badge {
    display: inline-block;
    background-color: rgba(255, 69, 0, 0.1); /* Orangered tint */
    color: var(--reddit-orangered);
    border: 1px solid rgba(255, 69, 0, 0.2);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-standard);
    font-weight: 700;
    font-size: 0.95rem;
}

/* --- Case Study UI Specifics --- */
.live-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background-color: var(--reddit-mint);
    border-radius: 50%;
    margin-right: 4px;
    box-shadow: 0 0 6px var(--reddit-mint);
}

/* --- Nested Threads --- */
.reddit-thread-container {
    position: relative;
    padding-left: 1.5rem;
}

.thread-line-track {
    position: absolute;
    left: -8px;
    top: 0;
    bottom: -15px;
    width: 2px;
    background-color: var(--border-light);
    transition: background-color 0.2s ease;
}

.reddit-thread-container:hover > .thread-line-track {
    background-color: #C1C9D0;
}

.comment-actions .action-btn {
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.comment-actions .action-btn:hover {
    background-color: #EDEFF1;
}

/* --- Upvote UI --- */
.cursor-pointer {
    cursor: pointer;
}

.upvote-btn:hover, .upvote-active {
    color: var(--reddit-orangered) !important;
}

.downvote-btn:hover, .downvote-active {
    color: #7193FF !important;
}

/* --- Form Switch Styling --- */
.form-check-input:checked {
    background-color: var(--reddit-orangered);
    border-color: var(--reddit-orangered);
}