:root {
    --bfhq-bg: #f4f2ed;
    --bfhq-surface: #fffdfa;
    --bfhq-text: #1f2a37;
    --bfhq-muted: #586677;
    --bfhq-accent: #2e6f5f;
}

.bfhq-home {
    background: radial-gradient(circle at top right, #faf8f3 0%, var(--bfhq-bg) 60%);
    color: var(--bfhq-text);
    max-width: 68rem;
    padding-top: 1.5rem;
    padding-bottom: 2rem;
}

.bfhq-home__hero,
.bfhq-home__step {
    background: var(--bfhq-surface);
    border: 1px solid rgba(31, 42, 55, 0.08);
    border-radius: 0.9rem;
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.06);
}

.bfhq-home__hero {
    padding: clamp(1.2rem, 2.2vw, 2.25rem);
}

.bfhq-home__kicker {
    color: var(--bfhq-accent);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin: 0;
    text-transform: uppercase;
}

.bfhq-home h1 {
    font-size: clamp(1.9rem, 4.1vw, 3rem);
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin-top: 0.35rem;
    margin-bottom: 0.8rem;
}

.bfhq-home__lead {
    color: var(--bfhq-text);
    margin-bottom: 0.4rem;
    max-width: 56ch;
}

.bfhq-home__signup-note {
    color: var(--bfhq-muted);
    font-weight: 600;
    margin-bottom: 0;
}

.bfhq-home__actions {
    margin-top: 1.2rem;
}

.bfhq-home .button,
.bfhq-home button,
.bfhq-home input,
.bfhq-home textarea,
.bfhq-home select {
    border-radius: 0.75rem;
}

.bfhq-home .button--primary {
    background: linear-gradient(180deg, #3f8c78 0%, var(--bfhq-accent) 100%);
    border-color: #275d4f;
    box-shadow: 0 8px 16px rgba(46, 111, 95, 0.22);
    color: #fff;
}

.bfhq-home .button--primary:hover,
.bfhq-home .button--primary:focus-visible {
    filter: brightness(1.05);
}

.bfhq-home :focus-visible {
    outline: 3px solid rgba(46, 111, 95, 0.35);
    outline-offset: 2px;
}

.bfhq-home__trust {
    margin-top: 1rem;
    max-width: 60ch;
}

.bfhq-home__steps h2 {
    font-size: clamp(1.35rem, 2.3vw, 2rem);
    margin-bottom: 0.5rem;
}

.bfhq-home__steps-list {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

.bfhq-home__step {
    padding: 1rem;
}

.bfhq-home__step h3 {
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
}

.bfhq-home__step p {
    color: var(--bfhq-muted);
    margin: 0;
}

.bfhq-home__powered {
    opacity: 0.75;
    text-align: center;
}

@media (max-width: 50rem) {
    .bfhq-home__actions {
        align-items: stretch;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .bfhq-home__actions .button {
        text-align: center;
    }

    .bfhq-home__steps-list {
        grid-template-columns: 1fr;
    }
}

/* Premium poll voting experience */
:root {
    --bfhq-poll-surface: #fffefb;
    --bfhq-poll-border: rgba(31, 42, 55, 0.12);
    --bfhq-poll-soft: rgba(31, 42, 55, 0.06);
    --bfhq-poll-shadow: 0 8px 20px rgba(18, 27, 38, 0.08);
}

#poll .proposals-table-container {
    border: 1px solid var(--bfhq-poll-border);
    border-radius: 0.9rem;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
}

#poll .proposals-table {
    --cell-width: clamp(4.5rem, 7.2vw, 5.8rem);
    border-spacing: 0.4rem;
}

#poll .proposals-table tr:first-child > * {
    position: sticky;
    top: 0;
    z-index: 4;
    background: var(--bfhq-poll-surface);
}

#poll .proposals-table tr:first-child .proposals-table__sticky-cell {
    z-index: 5;
}

#poll .proposals-table th,
#poll .proposals-table td {
    scroll-snap-align: start;
    vertical-align: top;
}

#poll .proposals-table .proposal__day-week,
#poll .proposals-table .proposal__day-month,
#poll .proposals-table .proposal__month,
#poll .proposals-table .proposal__label {
    width: var(--cell-width);
    font-size: 0.72rem;
    line-height: 1.25;
}

#poll .proposals-table .proposal__day-week,
#poll .proposals-table .proposal__day-month,
#poll .proposals-table .proposal__month {
    display: inline;
}

#poll .proposals-table .proposal__day-week {
    font-weight: 600;
    text-transform: uppercase;
}

#poll .proposals-table .proposal__day-month,
#poll .proposals-table .proposal__month {
    color: var(--bfhq-muted);
    margin-left: 0.15rem;
}

#poll .proposals-table .proposal__month {
    font-size: 0.68rem;
}

#poll .proposals-table .proposal__label {
    display: block;
    margin-top: 0.4rem;
    margin-bottom: 0.15rem;
    color: var(--bfhq-text);
    font-weight: 600;
}

#poll .proposals-table input.radio--vote + label {
    width: var(--cell-width);
    padding: 0.25rem;
    font-size: 0.67rem;
    border-width: 1px;
    border-radius: 0.6rem;
    gap: 0.2rem;
}

#poll .proposals-table .vote__choices {
    gap: 0.2rem;
    margin-bottom: 0;
}

#poll .proposals-table .vote {
    width: var(--cell-width);
    padding: 0.25rem 0.2rem;
}

#poll .proposals-table__sticky-cell {
    z-index: 3;
    background: var(--bfhq-poll-surface);
}

#poll .proposals-table__sticky-cell:not(:empty) {
    border-right: 1px solid var(--bfhq-poll-border);
}

#poll .proposals-table__author,
#poll .proposals-table__sum {
    width: 7rem;
    padding: 0.55rem 0.5rem;
    font-size: 0.78rem;
}

#poll .proposals-table__author {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
}

#poll .scrollbox::before,
#poll .scrollbox::after {
    width: 2.25rem;
}

#poll .scrollbox::before {
    background: linear-gradient(to right, rgba(244, 242, 237, 0.95), rgba(244, 242, 237, 0));
}

#poll .scrollbox::after {
    background: linear-gradient(to left, rgba(244, 242, 237, 0.95), rgba(244, 242, 237, 0));
}

#poll .scrollbox:has(> .proposals-table-container)::before {
    left: 7.2rem;
}

#poll .panel--proposal {
    border: 1px solid var(--bfhq-poll-border);
    box-shadow: var(--bfhq-poll-shadow);
}

#poll .panel--proposal legend {
    color: var(--bfhq-text);
    font-size: 0.96rem;
    font-weight: 600;
}

#poll .panel--proposal .vote__choices {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
}

#poll .panel--proposal input.radio--vote + label {
    justify-content: center;
    min-height: 2.4rem;
    padding: 0.5rem 0.35rem;
    border-width: 1px;
    border-radius: 0.65rem;
    font-size: 0.74rem;
}

#poll .panel--proposal input.radio--vote + label:focus-visible,
#poll .proposals-table input.radio--vote + label:focus-visible {
    outline: 3px solid rgba(46, 111, 95, 0.35);
    outline-offset: 2px;
}

@media (max-width: 72rem) {
    #poll .proposals-table {
        --cell-width: clamp(4.25rem, 9vw, 5.2rem);
    }
}

@media (max-width: 40rem) {
    #poll [data-poll-view-target="tableButton"],
    #poll [data-poll-view-target="listButton"] {
        display: none !important;
    }

    #poll [data-poll-view-target="tableView"],
    #poll [data-poll-view-target="tableView"][hidden] {
        display: none !important;
    }

    #poll [data-poll-view-target="listView"],
    #poll [data-poll-view-target="listView"][hidden] {
        display: block !important;
    }

    #poll .panel--proposal .vote__choices {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 40rem) {
    [data-color-scheme="dark"] #poll .panel--proposal legend,
    [data-color-scheme="dark"] #poll .proposals-table .proposal__label,
    [data-color-scheme="dark"] #poll .proposals-table .proposal__slot-time {
        color: #ffffff;
    }
}
