:root {
    color-scheme: light;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.75rem;
    line-height: 1.45;
    color: #1f2937;
    background: #f3f4f6;
}

h1 {
    font-size: 1.25rem;
}

h2 {
    font-size: 1rem;
}

h3 {
    font-size: 0.75rem;
}

.nav-bar {
    width: min(100% - 24px, 540px);
    max-width: 540px;
    margin: 14px auto;
    padding: 10px 12px;
    display: flex;
    justify-content: center;
    gap: 10px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    box-shadow: 0 2px 10px rgba(17, 24, 39, 0.08);
}

.nav-title {
    color: #1f2937;
    font-size: 0.75rem;
    font-weight: 600;
    align-self: center;
}

.nav-btn {
    text-decoration: none;
    color: #1f2937;
    background: #e5e7eb;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.75rem;
}

.nav-btn-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-btn-home > span {
    line-height: 1;
}

.nav-btn-home-icon {
    display: block;
    width: 15px;
    height: 15px;
    margin-left: 6px;
    flex: 0 0 auto;
}

.nav-btn:hover {
    background: #dbeafe;
}

.nav-btn-disabled,
.nav-btn-disabled:hover {
    color: #6b7280;
    background: #f3f4f6;
    border-color: #d1d5db;
    cursor: not-allowed;
    pointer-events: none;
}

main {
    width: min(100% - 24px, 540px);
    max-width: 540px;
    margin: 0 auto;
    padding: 0 16px 18px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
}

.content-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px 12px 0 0;
}

.snippet {
    padding: 12px 16px 16px;
}

.snippet h2,
.snippet h3 {
    margin: 8px 0;
}

.snippet p {
    margin: 8px 0;
}

.partidos-table {
    width: auto;
    margin: 0 auto;
    border-collapse: collapse;
}

.partidos-table td {
    border: none;
    padding: 8px;
    vertical-align: top;
}

.partido-logo {
    display: inline-block;
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.candidate-profile {
    display: inline-block;
    width: 40px;
    height: 40px;
    object-fit: cover;
}

.ballot-display {
    width: 25px;
    height: 25px;
    border: 2px solid #004b91;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #004b91;
    font-weight: bold;
    font-family: sans-serif;
}

.candidatos-collapsible > summary {
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 8px;
    min-width: 180px;
    justify-content: space-between;
}
.candidatos-collapsible > summary::-webkit-details-marker {
    display: none;
}
.candidatos-collapsible > summary::after {
    content: "▶";
    font-size: 0.6rem;
    display: inline-block;
    transition: transform 180ms ease;
}
.candidatos-collapsible[open] > summary::after {
    transform: rotate(90deg);
}

.scroll-hint {
    position: fixed;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.86);
    color: #ffffff;
    font-size: 0.75rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 180ms ease;
}

.scroll-hint.visible {
    opacity: 1;
}

.scroll-hint-arrow {
    animation: hint-bob 1s ease-in-out infinite;
}

@keyframes hint-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}
