/* Phone overlaps, balanced columns, and contrast. Loaded after cu-app.css. */

/* View Official stays white on teal. Link-ink rules were painting the label the same color as the button. */
html[data-theme="light"] .cu-shell a.cu-deck__btn.cu-deck__btn--open,
html[data-theme="dark"] .cu-shell a.cu-deck__btn.cu-deck__btn--open,
.cu-shell[data-theme="light"] a.cu-deck__btn.cu-deck__btn--open,
.cu-shell[data-theme="dark"] a.cu-deck__btn.cu-deck__btn--open,
a.cu-deck__btn.cu-deck__btn--open {
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    background: #0f766e;
    background-color: #0f766e;
}

@media (max-width: 430px) {
    .cu-deck > .cu-deck__card > .cu-deck__footer,
    .cu-deck__footer {
        width: 100%;
        min-width: 0;
    }

    .cu-deck > .cu-deck__card > .cu-deck__actions,
    .cu-deck__card .cu-deck__actions,
    .cu-deck__actions {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: stretch;
        position: static;
        z-index: auto;
        width: 100%;
        min-width: 0;
        gap: 0.4rem;
    }

    .cu-deck__actions .cu-deck__btn--open,
    .cu-deck__actions a.cu-deck__btn--open,
    .cu-deck > .cu-deck__card > .cu-deck__actions > a.cu-deck__btn--open {
        position: static;
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        max-width: none;
        height: auto;
        white-space: normal;
    }

    .cu-deck__actions .cu-deck__btn--skip,
    .cu-deck > .cu-deck__card > .cu-deck__actions > .cu-deck__btn--skip {
        position: static;
        flex: 0 0 auto;
        width: auto;
        max-width: none;
        height: auto;
        white-space: nowrap;
    }

    .cu-deck__tools {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-width: 0;
        gap: 0.4rem;
    }

    .cu-boards-page .cu-vote-tile__top,
    .cu-boards-page .cu-post-actions,
    .cu-boards-page .cu-vote-tile .cu-post-actions,
    .cu-vote-tile__top,
    .cu-post-actions {
        display: flex;
        flex-wrap: wrap;
        position: static;
        width: 100%;
        min-width: 0;
        gap: 0.45rem;
    }

    .cu-boards-page section[aria-labelledby="nominate-heading"],
    section[aria-labelledby="nominate-heading"] {
        clear: both;
        position: static;
        margin-top: 1.25rem;
        width: 100%;
    }
}

.cu-vote-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.35rem 0.75rem;
}

.cu-vote-row > :first-child {
    flex: 1 1 12rem;
    min-width: 0;
}

.cu-vote-pill {
    position: static;
    flex: 0 0 auto;
}

@media (min-width: 720px) {
    .cu-panes {
        grid-auto-flow: dense;
        align-items: start;
    }

    .cu-panes > section:first-child {
        position: sticky;
        top: 1rem;
    }

    .cu-debate__grid {
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
        align-items: start;
    }

    .cu-debate__floor {
        position: sticky;
        top: 1rem;
    }
}

.cu-floor-steps {
    display: grid;
    gap: 0.55rem;
    margin: 0.75rem 0 1rem;
    padding: 0;
    list-style: none;
}

.cu-floor-steps li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 2.75rem;
    color: #1c1917;
}

.cu-floor-steps span {
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    flex: 0 0 1.75rem;
    border-radius: 50%;
    background: #0f766e;
    color: #ffffff;
    font-weight: 700;
}

html[data-theme="dark"] .cu-floor-steps li,
.cu-shell[data-theme="dark"] .cu-floor-steps li {
    color: #f5f0e6;
}

@media (min-width: 960px) {
    .cu-cal-list {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    }
}

.cu-issues-pane {
    min-height: 0;
    align-self: start;
}

@media (min-width: 768px) and (max-width: 1279px) {
    .cu-community-boards {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .cu-community-boards > :nth-last-child(-n + 2) {
        grid-column: span 2;
    }
}

@media (min-width: 1280px) {
    .cu-community-boards {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        max-width: 72rem;
    }
}

.cu-thread__composer-submit,
.cu-thread__composer .cu-chip-btn {
    background: #0f766e;
    color: #ffffff;
    border-color: #0f766e;
}

html[data-theme="dark"] .cu-thread__composer--compact,
.cu-shell[data-theme="dark"] .cu-thread__composer--compact {
    background: #292524;
    color: #f5f0e6;
    border-color: rgba(245, 240, 230, 0.28);
}

html[data-theme="dark"] .cu-thread__composer-input,
html[data-theme="dark"] .cu-thread__composer textarea,
.cu-shell[data-theme="dark"] .cu-thread__composer-input,
.cu-shell[data-theme="dark"] .cu-thread__composer textarea {
    color: #f5f0e6;
}

.cu-shell__main :is(p, li, .cu-empty, .cu-page-intro) a:not(.cu-cta):not(.cu-chip-btn):not(.cu-home__cta):not(.cu-deck__btn):not(.cu-tabs__item) {
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

/* Cream cards stay cream in both themes, so office lines and pills must stay ink. */
.cu-card-cream .cu-official-card__office,
.cu-card-cream .cu-card-title,
.cu-card-cream .cu-empty,
.cu-cal-card .cu-official-card__office,
.cu-cal-card .cu-card-title,
.cu-cal-card .cu-empty,
.cu-card-cream .cu-pill,
.cu-cal-card .cu-pill {
    color: #1c1917;
}

.cu-card-cream .cu-pill,
.cu-cal-card .cu-pill {
    background: rgba(28, 25, 23, 0.08);
}

html[data-theme="dark"] .cu-issues-frame,
.cu-shell[data-theme="dark"] .cu-issues-frame {
    color: #ccfbf1;
    border-color: rgba(94, 234, 212, 0.7);
    background: rgba(15, 118, 110, 0.28);
}

html[data-theme="light"] .cu-thread > .cu-empty,
.cu-shell[data-theme="light"] .cu-thread > .cu-empty {
    color: #1c1917;
}

html[data-theme="dark"] .cu-thread > .cu-empty,
.cu-shell[data-theme="dark"] .cu-thread > .cu-empty {
    color: #f5f0e6;
}

.cu-home__verification > .cu-scan-pipe--stack {
    align-self: start;
    justify-self: stretch;
    width: 100%;
    max-width: 36rem;
    margin-top: 0.35rem;
}

/* Below the 900px two-column home grid, the 36rem pipe sits in a wider section.
   At 768 that left a 49px center delta. Auto margins center it. The 900px grid is unchanged. */
@media (max-width: 899.98px) {
    .cu-home__verification > .cu-scan-pipe--stack {
        margin-left: auto;
        margin-right: auto;
        justify-self: center;
    }
}

.cu-civic-diagram[data-cu-civic-diagram="markets-hero"] {
    margin-bottom: 0.5rem;
}

.cu-civic-diagram[data-cu-civic-diagram="markets-hero"] .cu-civic-diagram__preview {
    max-height: none;
}

/* County hangs under the wordmark. Putting it back in the row lifts Beta 7px off the icons. */
.cu-shell__brand-cluster .cu-shell__county {
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 0;
}

/* Glossary sits beside the band toggle, not inside the button. */
.cu-band-head {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    min-width: 0;
}

.cu-band-head > button,
.cu-cost-page .cu-band-head > .cu-cost-band__toggle,
.cu-band-head > .cu-you-band__toggle {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
}

.cu-band-head > .cu-gloss-info {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    min-height: 2.75rem;
    margin-right: 0.2rem;
}

.cu-claim-head {
    position: relative;
}

.cu-claim-head > .cu-gloss-info {
    position: absolute;
    z-index: 2;
    top: 1.05rem;
    right: 0.75rem;
}

.cu-trust .mud-typography-h2 {
    font-size: 1.15rem;
    line-height: 1.35;
    font-weight: 650;
}

@media (max-width: 430px) {
    .cu-feed-card__media img {
        width: 100%;
        height: auto;
        max-height: 11rem;
        object-fit: cover;
    }
}

/* Side columns stick under the docked nav. --cu-sticky-top is 0 on phones and when a strip already cleared the nav. */
@media (min-width: 900px) {
    .cu-shell .cu-panes > section:first-child,
    .cu-shell .cu-debate__floor {
        top: calc(var(--cu-sticky-top, 0px) + 1rem);
    }
}

@media (min-width: 960px) {
    .cu-shell .cu-map-drawer {
        top: calc(var(--cu-sticky-top, 0px) + 0.75rem);
    }
}

@media (min-width: 1024px) {
    .cu-shell article.cu-learn-stage > .cu-strategy-rail {
        top: calc(var(--cu-sticky-top, 0px) + 1rem);
    }
}

/* Deck tools row: location and share are the same 44px bordered icon buttons. */
html[data-theme="light"] .cu-deck__tools > .cu-icon-btn,
html[data-theme="dark"] .cu-deck__tools > .cu-icon-btn,
.cu-shell[data-theme="light"] .cu-deck__tools > .cu-icon-btn,
.cu-shell[data-theme="dark"] .cu-deck__tools > .cu-icon-btn,
.cu-deck__tools > .cu-icon-btn,
.cu-deck__tools > .cu-discuss-arrow,
.cu-deck__tools > a.cu-discuss-arrow {
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    flex: 0 0 44px;
    padding: 0;
    margin: 0;
}

html[data-theme="light"] .cu-deck__tools > .cu-icon-btn,
html[data-theme="dark"] .cu-deck__tools > .cu-icon-btn,
.cu-shell[data-theme="light"] .cu-deck__tools > .cu-icon-btn,
.cu-shell[data-theme="dark"] .cu-deck__tools > .cu-icon-btn,
.cu-deck__tools > .cu-icon-btn,
.cu-card-cream .cu-deck__tools .cu-discuss-arrow__mark,
.cu-deck__tools .cu-discuss-arrow__mark {
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border: 1.75px solid #0f766e;
    border-radius: 0.4rem;
    background: #fff;
    color: #0f766e;
}

html[data-theme="light"] .cu-deck__tools > a.cu-discuss-arrow,
html[data-theme="dark"] .cu-deck__tools > a.cu-discuss-arrow,
.cu-shell[data-theme="light"] .cu-deck .cu-deck__tools > a.cu-discuss-arrow,
.cu-shell[data-theme="dark"] .cu-deck .cu-deck__tools > a.cu-discuss-arrow,
.cu-deck__tools > a.cu-discuss-arrow,
.cu-deck__tools > a.cu-discuss-arrow:hover,
.cu-deck__tools > a.cu-discuss-arrow:focus-visible {
    color: #0f766e;
    background: transparent;
    border: 0;
    text-decoration: none;
}

.cu-deck__tools .cu-icon-svg,
.cu-deck__tools .cu-discuss-arrow__svg {
    width: 1.15rem;
    height: 1.15rem;
}

html[data-theme="light"] .cu-deck__tools > .cu-icon-btn.cu-icon-btn--on,
html[data-theme="dark"] .cu-deck__tools > .cu-icon-btn.cu-icon-btn--on,
.cu-deck__tools > .cu-icon-btn.cu-icon-btn--on {
    background: rgba(15, 118, 110, 0.14);
    color: #0f766e;
    border-color: #0f766e;
}

html[data-theme="light"] .cu-deck__tools > .cu-icon-btn:hover,
html[data-theme="light"] .cu-deck__tools > .cu-icon-btn:focus-visible,
html[data-theme="dark"] .cu-deck__tools > .cu-icon-btn:hover,
html[data-theme="dark"] .cu-deck__tools > .cu-icon-btn:focus-visible,
.cu-deck__tools > .cu-icon-btn:hover,
.cu-deck__tools > .cu-icon-btn:focus-visible,
.cu-deck__tools > .cu-discuss-arrow:hover .cu-discuss-arrow__mark,
.cu-deck__tools > .cu-discuss-arrow:focus-visible .cu-discuss-arrow__mark {
    background: rgba(15, 118, 110, 0.1);
    border-color: #0f766e;
    color: #0f766e;
}

/* Open House and other filled primary buttons. White on #0d9488 is 3.74:1. #0f766e is 5.47:1. */
.mud-button-filled.mud-button-filled-primary,
.mud-button-filled.mud-button-filled-primary:hover,
.mud-button-filled.mud-button-filled-primary:focus-visible,
.mud-button-filled.mud-button-filled-primary .mud-button-label {
    background-color: #0f766e;
    color: #ffffff;
}

/* Marketing footer stays #e6ebf0. Dark theme cream type on that plate is 1.05:1. */
html[data-theme="dark"] .footer,
html[data-theme="dark"] .footer nav,
html[data-theme="light"] .footer,
html[data-theme="light"] .footer nav,
.page[data-theme="dark"] .footer,
.page[data-theme="dark"] .footer nav {
    color: #1c1917;
}
