* {
    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;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.flag-icon {
    flex-shrink: 0;
}

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;
}

.no-results {
    text-align: center;
    padding: 2.5rem 1.5rem;
    margin-top: 1rem;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.no-results p:first-child {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 1rem;
}

.no-results p:last-child {
    font-size: 1rem;
    color: #333;
}

.no-results a {
    color: #e94560;
    font-weight: 600;
    text-decoration: underline;
}

/* Issue detail page */
.issue-detail-card .issue-card {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

#comments-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1.5rem;
}

/* 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-context {
    color: #777;
    font-size: 0.85rem;
    font-style: italic;
    margin-top: 0.5rem;
}

.id-faq {
    margin: 1.5rem 0;
    text-align: left;
}

.id-faq-item {
    margin-bottom: 1.25rem;
    color: #555;
    font-size: 0.9rem;
    line-height: 1.4;
}

.id-faq-item strong {
    color: #333;
}

.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;
}

/* Verify ID steps */
.verify-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.25rem 0;
}

.verify-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 4px;
    background: #f5f5f5;
    border: 1px solid #ddd;
}

.verify-step.completed {
    background: #d1e7dd;
    border-color: #badbcc;
}

.verify-step.active {
    background: #e7ebf2;
    border-color: #ccd4e2;
    font-weight: 600;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: #1a1a2e;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.verify-step.completed .step-number {
    background: #0f5132;
}

.step-label {
    font-size: 0.9rem;
}

.verify-note {
    color: #555;
    font-size: 0.88rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* 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 form */
.comment-form h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.comment-form textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    box-sizing: border-box;
    margin-bottom: 0.75rem;
}

.comment-form textarea:focus {
    border-color: #1a1a2e;
    outline: none;
}

.comment-form button[type="submit"] {
    display: inline-block;
    background: #e63946;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.6rem 1.5rem;
    font-size: 0.95rem;
    cursor: pointer;
}

.comment-form button[type="submit"]:hover {
    background: #c52f3a;
}

.comment-hint {
    color: #777;
    font-size: 0.9rem;
    font-style: italic;
}

.comment-context {
    color: #777;
    font-size: 0.85rem;
    font-style: italic;
    margin-bottom: 0.75rem;
}

.comment-error {
    color: #e63946;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.comments h3 {
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.comment-edit-form textarea {
    width: 100%;
    min-height: 60px;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    box-sizing: border-box;
    margin-bottom: 0.5rem;
}

.comment-edit-form button[type="submit"] {
    display: inline-block;
    background: #1a1a2e;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    cursor: pointer;
}

.comment-edit-form button[type="submit"]:hover {
    background: #2d2d4e;
}

.comment-edit-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-edit {
    background: none;
    border: none;
    color: #1a1a2e;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    margin-top: 0.25rem;
}

.btn-edit:hover {
    color: #e63946;
}

.btn-cancel {
    background: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    cursor: pointer;
    color: #555;
}

.btn-cancel:hover {
    border-color: #999;
}

.comment-attribution {
    font-weight: 600;
    font-size: 0.8rem;
    color: #002868;
    margin-bottom: 0.25rem;
}

.comment-lock {
    color: #999;
    font-size: 0.8rem;
    font-style: italic;
    margin-top: 0.25rem;
}

/* Comment voting */
.comment-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #1a1a2e;
}

.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;
}

/* Proposal page */
.proposal-page {
    max-width: 700px;
    margin: 0 auto;
}

.proposal-header {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.proposal-header h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.proposal-header p {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.5;
}

#proposal-form {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1.5rem;
}

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

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

#proposal-form textarea:focus {
    outline: none;
    border-color: #e94560;
}

/* 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;
}

.proposal-sources {
    margin-bottom: 0.75rem;
}

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

.source-fields {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
}

.source-input {
    width: 100%;
    padding: 0.4rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 0.85rem;
    font-family: inherit;
}

.btn-secondary {
    background: #fff;
    color: #555;
    border: 1px solid #ccc;
    padding: 0.3rem 0.6rem;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8rem;
}

.btn-secondary:hover {
    background: #f5f5f5;
}

.proposal-sources-list ul {
    margin: 0.3rem 0 0.5rem 1.2rem;
    font-size: 0.85rem;
}

.proposal-sources-list a {
    color: #1a73e8;
    word-break: break-all;
}

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

.geo-filter-form {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    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.4rem 0.6rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: inherit;
    background: #fff;
    color: #333;
    appearance: auto;
    -webkit-appearance: auto;
}

.geo-filter-form select:focus,
.geo-filter-form input:focus {
    outline: none;
    border-color: #1a1a2e;
    box-shadow: 0 0 0 2px rgba(26, 26, 46, 0.1);
}

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

#issue-search-input {
    width: 220px;
}

.geo-filter-form input::placeholder {
    color: #999;
}

.geo-filter-btn {
    background: #1a1a2e;
    color: #fff;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: inherit;
    font-weight: 600;
    transition: background 0.15s;
}

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

.geo-filter-clear {
    font-size: 0.85rem;
    color: #e94560;
    text-decoration: none;
    font-weight: 600;
    margin-left: 0.25rem;
}

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

.geo-filter-active {
    display: inline;
    font-size: 0.85rem;
    color: #555;
    margin-left: 0.75rem;
}

.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;
}

/* Propose wave animation */
.propose-wave span {
    display: inline-block;
    animation: propose-glow 3s ease-in-out infinite;
}

@keyframes propose-glow {
    0%, 100% { color: #ccc; font-weight: 400; }
    8% { color: #fff; font-weight: 700; }
    16% { color: #ccc; font-weight: 400; }
}

/* 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;
    }
}

/* Sources */
.sources-section {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.sources-section h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: #495057;
}

.source-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.source-list li {
    padding: 0.3rem 0;
}

.source-list a {
    color: #1a5276;
}

.share-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.share-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
}

.share-btn:hover {
    opacity: 0.85;
    transform: scale(1.1);
}

.share-twitter {
    background: #000;
}

.share-facebook {
    background: #1877f2;
}

.share-reddit {
    background: #ff4500;
}

.share-bluesky {
    background: #0085ff;
}

.admin-sources {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #dee2e6;
}

.admin-sources h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
}

.admin-sources .inline-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.admin-sources .inline-form input {
    flex: 1;
}

.btn-small {
    padding: 0.15rem 0.5rem;
    font-size: 0.8rem;
}

.btn-danger {
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.btn-danger:hover {
    background: #c82333;
}

.muted {
    color: #6c757d;
    font-size: 0.85rem;
}
