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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f5f5;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

/* Header */
header {
    background: #1a1a2e;
    color: #fff;
    padding: 1.5rem 0;
    border-bottom: 3px solid #e94560;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

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

header .tagline {
    color: #aaa;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Main */
main {
    flex: 1;
    padding: 1.5rem 0;
}

/* Issue list */
.issue-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Issue card — Digg-style block */
.issue-card {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1rem;
    transition: box-shadow 0.15s;
}

.issue-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Vote box */
.vote-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 50px;
    margin-right: 1rem;
}

.vote-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    color: #666;
    transition: background 0.15s, color 0.15s;
}

.vote-btn:hover {
    background: #e94560;
    color: #fff;
    border-color: #e94560;
}

.vote-count {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0.25rem 0;
}

/* Issue content */
.issue-content {
    flex: 1;
}

.issue-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.issue-title a {
    color: #1a1a2e;
    text-decoration: none;
}

.issue-title a:hover {
    text-decoration: underline;
}

.issue-meta {
    margin-top: 0.5rem;
    font-size: 0.82rem;
}

.issue-meta a {
    color: #555;
    text-decoration: none;
}

.issue-meta a:hover {
    color: #1a1a2e;
    text-decoration: underline;
}

.issue-category {
    display: inline-block;
    background: #eef;
    color: #336;
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
}

/* Header layout */
.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-email {
    color: #ccc;
    font-size: 0.85rem;
}

.nav-link {
    color: #ccc;
    text-decoration: none;
    font-size: 0.85rem;
}

.nav-link:hover {
    color: #fff;
}

.btn-register {
    background: #e94560;
    color: #fff !important;
    padding: 0.35rem 0.75rem;
    border-radius: 3px;
}

.btn-link {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 0.85rem;
}

.btn-link:hover {
    color: #fff;
}

.inline-form {
    display: inline;
}

.verify-badge {
    background: #f0ad4e;
    color: #333;
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-weight: 600;
}

.verify-banner {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #664d03;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.mission-blurb {
    background: #e7ebf2;
    border: 1px solid #ccd4e2;
    color: #232838;
    border-radius: 4px;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.92rem;
}

.mission-blurb a {
    color: #1a1a2e;
    font-weight: 700;
}

.about-page {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1.25rem;
}

.about-page h2 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.about-page p {
    margin-bottom: 0.9rem;
    line-height: 1.5;
}

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

/* Section spacing */
main section + section {
    margin-top: 1.5rem;
}

/* Flash messages */
.flash-messages {
    margin-bottom: 1rem;
}

.flash-error {
    background: #f8d7da;
    border: 1px solid #f5c2c7;
    color: #842029;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.flash-info {
    background: #d1e7dd;
    border: 1px solid #badbcc;
    color: #0f5132;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Auth forms */
.auth-form-container {
    max-width: 400px;
    margin: 2rem auto;
    background: #fff;
    padding: 2rem;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.auth-form-container h2 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.auth-subtext {
    margin-bottom: 1rem;
    color: #555;
    font-size: 0.9rem;
}

.auth-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #555;
}

.auth-form input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.auth-form input:focus {
    outline: none;
    border-color: #e94560;
}

.btn-primary {
    width: 100%;
    background: #e94560;
    color: #fff;
    border: none;
    padding: 0.6rem;
    border-radius: 3px;
    font-size: 0.95rem;
    cursor: pointer;
    font-weight: 600;
}

.btn-primary:hover {
    background: #d63851;
}

.auth-link {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #666;
}

.auth-link a {
    color: #e94560;
}

.verify-code-form {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* Active vote buttons */
.vote-btn.vote-up.active {
    background: #e94560;
    color: #fff;
    border-color: #e94560;
}

.vote-btn.vote-down.active {
    background: #1a1a2e;
    color: #fff;
    border-color: #1a1a2e;
}

/* Disabled vote buttons */
.vote-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.vote-btn.disabled:hover {
    background: none;
    color: #666;
    border-color: #ddd;
}

/* Comment voting */
.comment-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.comment-vote-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 40px;
}

.comment-vote-count {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0.15rem 0;
}

.comment-body {
    flex: 1;
}

/* Proposals */
.proposal-filters {
    display: flex;
    gap: 1rem;
    margin: 0.75rem 0;
}

.proposal-filters .active-filter {
    color: #e94560;
    font-weight: 600;
}

.proposal-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.proposal-body {
    margin-bottom: 0.5rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

.proposal-meta {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0.5rem;
}

.proposal-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.btn-reject {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 0.3rem 0.75rem;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.85rem;
}

.btn-merge {
    background: #28a745;
    color: #fff;
    border: none;
    padding: 0.3rem 0.75rem;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.85rem;
}

.proposal-actions select {
    padding: 0.3rem;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 0.85rem;
}

#proposal-form textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    font-family: inherit;
}

#proposal-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #555;
}

/* Geographic filter bar */
.geo-filter-bar {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.geo-filter-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.geo-filter-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
}

.geo-filter-form select,
.geo-filter-form input {
    padding: 0.35rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 0.85rem;
}

.geo-filter-form input {
    width: 150px;
}

.geo-filter-btn {
    background: #1a1a2e;
    color: #fff;
    border: none;
    padding: 0.35rem 0.75rem;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.85rem;
}

.geo-filter-btn:hover {
    background: #e94560;
}

.geo-filter-clear {
    font-size: 0.82rem;
    color: #e94560;
    text-decoration: none;
}

.geo-filter-clear:hover {
    text-decoration: underline;
}

.geo-filter-active {
    font-size: 0.82rem;
    color: #555;
    margin-top: 0.4rem;
}

.geo-field-group {
    display: inline-flex;
}

/* Scope badges */
.scope-badge {
    display: inline-block;
    font-size: 0.72rem;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-weight: 600;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.scope-badge.scope-state {
    background: #e0eaff;
    color: #1a3a6e;
}

.scope-badge.scope-city {
    background: #e0f5e9;
    color: #1a5e34;
}

/* Footer */
footer {
    background: #1a1a2e;
    color: #aaa;
    padding: 1rem 0;
    font-size: 0.8rem;
    text-align: center;
    margin-top: auto;
}

@media (max-width: 600px) {
    .header-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.75rem;
    }

    .issue-card {
        align-items: flex-start;
        padding: 0.85rem;
    }

    .vote-box {
        min-width: 42px;
        margin-right: 0.75rem;
    }

    .vote-count {
        font-size: 1.1rem;
    }
}
