:root {
    color-scheme: light;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.5;
    background-color: #f5f1ea;
    color: #111827;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #ffffff;
    color: #111827;
}

.app-shell {
    min-height: 100vh;
    background: #ffffff;
}

.page-container {
    max-width: 1440px;
    padding: 0;
    margin: 0 auto;
}

.hero {
    text-align: center;
    padding: 3rem 0 2rem;
}

.hero-home {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 2.1rem 0 1.2rem;
    box-shadow: none;
}

.hero-grid {
    display: grid;
    gap: 1.2rem;
    align-items: center;
}

.hero-centered {
    text-align: center;
}

.hero-copy {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.hero-side {
    display: grid;
    gap: 1rem;
    align-items: center;
}

.hero .eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    color: #0f172a;
    opacity: 0.8;
    font-weight: 700;
}

.area-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    justify-content: center;
    color: #475569;
    font-size: 0.92rem;
}

.area-breadcrumb a {
    color: #0f172a;
    text-decoration: none;
    font-weight: 600;
}

.area-breadcrumb span {
    color: #64748b;
}

.section-meta {
    margin-top: 0.75rem;
    color: #475569;
}

.hero h1 {
    margin: 0.8rem auto 0.75rem;
    font-size: clamp(2.5rem, 4vw, 4.5rem);
    line-height: 0.96;
    letter-spacing: -0.06em;
    max-width: 12ch;
}

.hero p {
    margin: 0 auto 1rem;
    max-width: 700px;
    font-size: 1.08rem;
    color: #334155;
}

.hero-copy p {
    margin-left: 0;
    max-width: 36rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 1.4rem;
}

.hero-search {
    margin: 0 auto;
    width: min(100%, 740px);
}

.home-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
    width: min(100%, 860px);
    margin: 1.8rem auto 0;
}

.home-stat {
    display: grid;
    gap: 0.2rem;
    padding: 1rem 0.8rem;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    text-align: left;
    box-shadow: 0 0.5rem 1rem rgba(15, 23, 42, 0.04);
}

.home-stat-label {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.home-stat strong {
    font-size: 1.6rem;
    line-height: 1;
    letter-spacing: -0.05em;
    color: #0f172a;
}

.hero .party-count {
    margin-top: 0.75rem;
    color: #0f172a;
    font-size: 0.98rem;
}

.section-shell {
    margin-top: 2rem;
}

.section-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.section-header .eyebrow {
    margin: 0;
    color: #475569;
}

.section-header h2 {
    margin: 0.35rem 0 0;
    font-size: clamp(1.7rem, 2vw, 2.35rem);
    line-height: 1.1;
    letter-spacing: -0.05em;
    color: #0f172a;
}

.search-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    margin: 0 auto 1.5rem;
    max-width: 760px;
}

.search-form-hero {
    margin-top: 0;
    padding: 0.7rem 0.8rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    box-shadow: 0 0.35rem 0.9rem rgba(15, 23, 42, 0.04);
}

.search-section {
    margin-top: -1rem;
    margin-bottom: 1.5rem;
}

.search-form-compact {
    max-width: 760px;
    margin: 0 auto;
}

.search-form input {
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 0.95rem 1rem;
    font-size: 1rem;
    width: 100%;
    background: #fff;
}

.search-form input:focus {
    border-color: #0f172a;
    outline: none;
    box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.06);
}

.search-form button,
.button {
    background: #0f172a;
    color: white;
    border: none;
    border-radius: 999px;
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: 0 0.35rem 0.8rem rgba(15, 23, 42, 0.08);
}

.compare-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.error-message {
    margin-top: 1rem;
    color: #b91c1c;
    font-weight: 600;
}

.compare-warning {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 1rem;
    color: #92400e;
}

.button:hover,
.button:focus-visible,
.search-form button:hover,
.search-form button:focus-visible {
    background: #1e293b;
    transform: translateY(-1px);
    box-shadow: 0 0.5rem 1rem rgba(15, 23, 42, 0.12);
}

.button-outline {
    background: transparent;
    color: #0f172a;
    border: 1px solid #0f172a;
}

.button-outline:hover,
.button-outline:focus-visible {
    background: #0f172a;
    color: #fff;
}

.button-secondary {
    background: #edf2f7;
    color: #0f172a;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: none;
}

.button-secondary:hover,
.button-secondary:focus-visible {
    background: #dfe7f0;
    box-shadow: 0 0.35rem 0.8rem rgba(15, 23, 42, 0.06);
}

.candidate-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.7rem;
    max-width: 820px;
    margin: 0 auto 1rem;
}

.candidate-search-form .search-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.candidate-search-form input {
    min-height: 3rem;
    border-radius: 0.85rem;
}

.candidate-search-form .search-actions button,
.candidate-search-form .search-actions .button {
    min-height: 3rem;
    padding-inline: 1.15rem;
}

.candidate-search-summary {
    margin-top: 0.5rem;
    padding: 1rem 1.25rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    color: #334155;
}

.active-filters {
    margin-top: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    font-size: 0.9rem;
}

.candidate-filter-wrapper {
    margin: 2rem 0 1.5rem;
    padding: 1.35rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    box-shadow: 0 0.75rem 1.5rem rgba(15, 23, 42, 0.04);
}

.candidate-filter-header {
    margin-bottom: 0.75rem;
}

.candidate-filter-header h2 {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.filter-hint {
    margin: 0.35rem 0 0;
    color: #64748b;
    font-size: 0.95rem;
}

.candidate-filter-header p {
    margin: 0;
    color: #475569;
}

.candidate-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
    gap: 0.85rem;
}

.candidate-filters select {
    min-height: 2.8rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    padding: 0.7rem 0.8rem;
    background: #f8fafc;
    color: #0f172a;
    font-size: 0.92rem;
}

.candidate-filters select:focus-visible {
    outline: 3px solid rgba(15, 23, 42, 0.12);
    border-color: #0f172a;
}

.candidate-filters button {
    align-self: end;
    justify-self: start;
    margin-top: 0.25rem;
}

/* The compound selector outranks the generic .overview-cards rule below, so
   the card grid keeps its own column width and gap. auto-fill (not auto-fit)
   retains the empty tracks: with auto-fit a single card would stretch across
   the whole container instead of staying card-sized. */
.candidate-grid,
.overview-cards.candidate-grid {
    display: grid;
    gap: 1.15rem;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
}

.pagination-nav {
    display: flex;
    justify-content: center;
    margin: 2rem 0 1rem;
}

.pagination-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.75rem;
    background: #fff;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    font-weight: 600;
}

.pagination-link:hover,
.pagination-link:focus-visible {
    background: #f8fafc;
}

.pagination-link.active {
    background: #0f172a;
    color: white;
    border-color: #0f172a;
}

.pagination-link.is-disabled {
    opacity: 0.45;
    pointer-events: none;
    cursor: default;
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    padding: 0.65rem 0.35rem;
    color: #64748b;
    font-weight: 700;
}

.empty-state-card {
    text-align: center;
    padding: 2rem;
}

.empty-state-card h2 {
    margin-top: 0;
}

.empty-state-card p {
    margin: 1rem 0 1.25rem;
    color: #475569;
}

.candidate-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 1.4rem;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: 0 0.9rem 1.8rem rgba(15, 23, 42, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.candidate-card:hover {
    transform: translateY(-0.15rem);
    box-shadow: 0 1.4rem 2.2rem rgba(15, 23, 42, 0.09);
    border-color: #cbd5e1;
}

.candidate-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    padding: 1rem 1rem 1.1rem;
}

.candidate-card-header {
    display: grid;
    gap: 0.45rem;
}

.candidate-card-body h3 {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.candidate-card-footer {
    margin-top: 0.25rem;
    display: grid;
    gap: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid #e2e8f0;
}

.candidate-card-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 0.8rem;
    border-radius: 999px;
    color: #0f172a;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.8rem;
    transition: all 0.15s ease;
}

.candidate-card-link:hover,
.candidate-card-link:focus-visible {
    color: #111827;
    text-decoration: none;
    transform: translateY(-1px);
}

.candidate-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    justify-content: flex-start;
}

.candidate-card-link.button,
.candidate-card-link.button-secondary {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #0f172a;
}

.candidate-card-link.button:hover,
.candidate-card-link.button-secondary:hover,
.candidate-card-link.button:focus-visible,
.candidate-card-link.button-secondary:focus-visible {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #0f172a;
}

.candidate-card-link.button.button-secondary.disabled {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #475569;
}

.link-secondary {
    color: #334155;
    text-decoration: none;
    font-weight: 700;
}

.link-secondary:hover,
.link-secondary:focus-visible {
    color: #0f172a;
    text-decoration: underline;
}

.button.disabled,
.button[disabled],
.button-secondary.disabled {
    pointer-events: none;
    opacity: 0.55;
}

.candidate-info {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.55rem;
}

.candidate-info li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.95rem;
    color: #475569;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 0.45rem;
    background: #f1f5f9;
    color: #0f172a;
}

.search-form select {
    width: 100%;
}

.button-secondary:hover,
.button-secondary:focus-visible {
    background: #cbd5e1;
}

.overview-cards {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    margin-top: 1.3rem;
}

.overview-cards.party-directory {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.overview-cards article,
.card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #e2e8f0;
    border-radius: 1.1rem;
    padding: 1.2rem 1.15rem;
    box-shadow: 0 0.35rem 0.85rem rgba(15, 23, 42, 0.03);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.overview-cards article:hover,
.overview-cards article:focus-within {
    transform: translateY(-0.08rem);
    box-shadow: 0 0.6rem 1.2rem rgba(15, 23, 42, 0.05);
    border-color: #cbd5e1;
}

.overview-cards h2,
.overview-cards h3 {
    margin-top: 0;
    letter-spacing: -0.03em;
}

.overview-cards h2 {
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
}

.overview-cards article p {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #475569;
    line-height: 1.6;
}

.overview-cards article a {
    color: #0f172a;
    font-weight: 700;
    text-decoration: none;

}




.overview-cards article a:hover,
.overview-cards article a:focus-visible {
    text-decoration: underline;
}

.card h3 {
    margin: 0.75rem 0 0.5rem;
    font-size: 1.15rem;
}

/* The manifesto card (shell, title, author, summary, actions) is defined in
   restored.css. A second, partly-dead rule set used to live here: it had no
   container prefix, while the redesigned rules in restored.css only matched
   inside .overview-cards, so the same component rendered two different ways
   depending on the page. */

.manifesto-read-link {
    display: inline-flex;
    align-items: center;
    min-height: 2.45rem;
    padding: 0.6rem 0.9rem;
    border-radius: 999px;
    background: #0f172a;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 700;
}

.manifesto-read-link:hover,
.manifesto-read-link:focus-visible {
    background: #1e293b;
}

.manifesto-card-actions .button {
    min-height: 2.45rem;
    padding: 0.6rem 0.9rem;
    font-size: 0.86rem;
}

.compare-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin: 1.25rem 0 1.5rem;
}

.compare-overview-card {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 1rem 1.1rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    box-shadow: 0 0.6rem 1.1rem rgba(15, 23, 42, 0.03);
}

.compare-overview-card-highlight {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(15, 118, 110, 0.88));
    border-color: rgba(148, 163, 184, 0.4);
    color: #f8fafc;
}

.compare-overview-card-highlight .compare-overview-label,
.compare-overview-card-highlight p,
.compare-overview-card-highlight strong {
    color: #f8fafc;
}

.compare-overview-label {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.compare-overview-card strong {
    color: #0f172a;
    font-size: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.05em;
}

.compare-overview-card p {
    margin: 0;
    color: #475569;
    line-height: 1.55;
}

.compare-form-card {
    padding: 1.5rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
}

.compare-selected-status {
    margin-bottom: 1.5rem;
}

.compare-selected-status h2 {
    margin: 0 0 1rem;
    font-size: 1.25rem;
}

.compare-selected-cards {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.compare-slot-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 140px;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: #f8fafc;
}

.compare-slot-card-header {
    margin-bottom: 0.75rem;
}

.compare-slot-label {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #475569;
}

.compare-slot-card-body {
    flex: 1;
}

.compare-slot-name {
    margin: 0.25rem 0 0.5rem;
    font-weight: 700;
    color: #0f172a;
}

.compare-slot-meta,
.compare-slot-empty {
    margin: 0;
    color: #475569;
    font-size: 0.95rem;
}

.compare-slot-select-label {
    display: block;
    margin-top: 1rem;
}

.compare-slot-select {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    background: white;
    color: #0f172a;
    font-size: 0.95rem;
    appearance: none;
}

.compare-slot-card-footer {
    margin-top: 1rem;
}

.compare-table-wrapper {
    margin-top: 2rem;
    overflow-x: auto;
}

.compare-summary {
    margin-bottom: 1rem;
    padding: 1rem 1.25rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    color: #334155;
}

.compare-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 620px;
}

.compare-table th,
.compare-table td {
    border: 1px solid #e2e8f0;
    padding: 1rem;
    text-align: left;
    vertical-align: top;
}

.compare-table th {
    background: #f8fafc;
    color: #0f172a;
    font-weight: 700;
}

.compare-table tr:nth-child(even) td {
    background: #fff;
}

.compare-table tr:nth-child(odd) td {
    background: #f8fafc;
}

@media (max-width: 720px) {

    .compare-selected-cards,
    .compare-table {
        min-width: 100%;
    }

    .compare-slot-card {
        min-height: auto;
    }
}

.candidate-photo-wrap {
    display: block;
    width: 100%;
    min-height: 0;
    overflow: hidden;
    border-radius: 1rem;
    background: #f8fafc;
}

.candidate-photo {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.candidate-profile {
    display: grid;
    gap: 1.25rem;
    margin: 1.25rem 0 2.5rem;
}

.candidate-profile-header {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 1.25rem;
    align-items: center;
    width: 100%;
    padding: 1.4rem 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 70%, #eef2ff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 1.25rem;
    box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.06);
    text-align: left;
}

.candidate-profile-photo {
    width: 104px;
    height: 104px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
    border: 3px solid #f8fafc;
    box-shadow: 0 0 0 1px #e2e8f0;
}

.candidate-profile-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.candidate-profile-main {
    display: grid;
    gap: 0.65rem;
    min-width: 0;
}

.candidate-profile-identity {
    min-width: 0;
}

.candidate-profile-title-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 0.7rem;
}

.candidate-profile-title-line h1 {
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    line-height: 1.2;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.candidate-profile-role {
    margin: 0.25rem 0 0;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 600;
}

.candidate-profile-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 0.45rem;
    row-gap: 0.25rem;
    margin: 0;
    color: #475569;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
}

.candidate-profile-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    white-space: nowrap;
}

.candidate-profile-meta-item.candidate-profile-area {
    white-space: normal;
}

.candidate-profile-meta-sep {
    color: #cbd5e1;
    font-weight: 700;
    user-select: none;
}

.candidate-profile-meta .party-logo {
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
    border-radius: 0.25rem;
    object-fit: cover;
}

.candidate-profile-area a {
    color: #0f172a;
    text-decoration: none;
    font-weight: 700;
}

.candidate-profile-area a:hover,
.candidate-profile-area a:focus-visible {
    text-decoration: underline;
}

.candidate-profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.2rem;
}

.candidate-profile-actions .button {
    min-height: 2.55rem;
    padding: 0.65rem 1.05rem;
    font-size: 0.92rem;
}

.candidate-profile-actions .inline-form {
    display: inline-flex;
    margin: 0;
}

.candidate-profile-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
}

.profile-stat {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 1rem 1.1rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    box-shadow: 0 0.8rem 1.5rem rgba(15, 23, 42, 0.03);
}

.profile-stat-label {
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.profile-stat strong {
    color: #0f172a;
    font-size: 1.15rem;
    letter-spacing: -0.03em;
}

.candidate-profile-body {
    display: grid;
    gap: 1rem;
}

.candidate-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 0.65rem 1.4rem rgba(15, 23, 42, 0.035);
}

.candidate-panel h2 {
    margin: 0 0 0.7rem;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.candidate-panel-about p {
    margin: 0;
    color: #334155;
    line-height: 1.75;
    font-size: 1.02rem;
    max-width: 70ch;
}

.candidate-panel-heading {
    margin-bottom: 1rem;
}

.candidate-panel-heading p {
    margin: 0.3rem 0 0;
    color: #64748b;
}

.candidate-empty {
    color: #475569;
}

.candidate-manifesto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.9rem;
}

.candidate-manifesto-card {
    display: grid;
    gap: 0.55rem;
    padding: 1.1rem 1.15rem;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: linear-gradient(145deg, #f8fafc, #ffffff);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.candidate-manifesto-card:hover,
.candidate-manifesto-card:focus-visible {
    border-color: #cbd5e1;
    box-shadow: 0 0.65rem 1.25rem rgba(15, 23, 42, 0.06);
    transform: translateY(-1px);
}

.candidate-manifesto-card h3 {
    margin: 0;
    font-size: 1.02rem;
    color: #0f172a;
}

.candidate-manifesto-card p {
    margin: 0;
    color: #475569;
    line-height: 1.55;
}

.candidate-manifesto-card span {
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 700;
}

.button-primary {
    background: #0f172a;
    color: #ffffff;
}

.policy-block,
.priority-block,
.callout {
    margin: 1.5rem 0;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.1rem 1.2rem;
    background: #f8fafc;
}

.callout-info {
    border-left: 4px solid #3b82f6;
}

.callout-important {
    border-left: 4px solid #f59e0b;
}

.callout-commitment {
    border-left: 4px solid #10b981;
}

.callout-warning {
    border-left: 4px solid #ef4444;
}

.editor-image {
    margin: 1.75rem 0;
}

.editor-image img {
    max-width: 100%;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
}

.editor-image figcaption {
    margin-top: 0.6rem;
    color: #64748b;
    font-size: 0.92rem;
}

.editor-delimiter {
    border-top: 2px solid #e2e8f0;
    margin: 1.5rem 0;
}

blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.2rem;
    border-left: 4px solid #0f172a;
    background: #f8fafc;
    border-radius: 0.75rem;
}

.user-candidates {
    margin-top: 2rem;
}

.user-candidates article {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.04);
}

.user-candidates article h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.user-candidates article p {
    margin: 0.25rem 0;
    color: #475569;
}

.user-candidates article a {
    margin-top: 1rem;
    display: inline-flex;
}

.alert {
    padding: 1rem;
    border-radius: 0.85rem;
    margin-bottom: 1rem;
}

.alert-error {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.compare-banner {
    background: #e0f2fe;
    border-top: 1px solid #bae6fd;
    border-bottom: 1px solid #bae6fd;
}

.compare-banner-copy {
    max-width: 980px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
    align-items: center;
}

.compare-banner-copy p {
    margin: 0;
}

.compare-banner-copy a {
    color: #0f172a;
    font-weight: 700;
    text-decoration: underline;
}

.compare-banner-copy a:hover,
.compare-banner-copy a:focus-visible {
    color: #0c4a6e;
}

.header-grid {
    grid-template-columns: 1fr;
    text-align: center;
}

.main-nav {
    justify-content: center;
}

.auth-links {
    justify-content: center;
}

@media (max-width: 980px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-copy,
    .hero-side {
        width: 100%;
        max-width: 100%;
    }

    .hero-copy {
        text-align: center;
    }

    .hero-copy p,
    .hero-actions,
    .hero-badges,
    .hero-trust-list {
        margin-left: auto;
        margin-right: auto;
        justify-content: center;
    }

    .hero h1 {
        max-width: none;
    }

    .hero-actions {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .page-container {
        padding:;
    }

    .hero {
        padding-top: 2rem;
    }

    .hero-home {
        padding: 1.5rem 0.9rem 1.1rem;
    }

    .hero h1 {
        font-size: clamp(2.15rem, 12vw, 3.2rem);
    }

    .hero-panel-grid,
    .home-stat-grid {
        grid-template-columns: 1fr;
    }

    .hero-panel {
        padding: 0.85rem;
    }

    .hero-panel-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .button,
    .search-form button {
        width: 100%;
    }

    .search-form {
        grid-template-columns: 1fr;
    }

    .hero-with-photo {
        display: grid;
        gap: 1.5rem;
    }

    .hero-photo-wrap,
    .hero-text,
    .party-image-wrap,
    .party-logo-large {
        width: 100%;
        max-width: 100%;
    }
}

/* Companion to .manifesto-card-meta. This used to be a -25px top margin with a
   55px left indent, a leftover from an older card where the location sat beside
   the avatar; in the current markup (component manifesto-card.php) the candidate
   row comes first in normal flow, so that negative margin pulled the location up
   over the author and position text. The compound selector is needed because
   .manifesto-card-meta is declared later, in restored.css. */
.manifesto-location,
.manifesto-card-meta.manifesto-location {
    margin: 0.5rem 0 0;
    font-style: italic;
    color: #1bb556;
}