/**
 * Candidate workspace - the liveliness layer.
 *
 * Everything here is additive colour, type and motion on top of the dashboard's own
 * layout classes: no widths, grids or positions change, so it cannot break a page it
 * was not written for. Selectors are scoped to the workspace, so loading it site-wide
 * costs a few kilobytes and affects nothing else.
 */

:root {
    --hub-ink: #0b1f18;
    --hub-ink-soft: #17402f;
    --hub-amber: #b45309;
    --hub-amber-soft: #fdf3e6;
    --hub-emerald: #0f7a55;
    --hub-emerald-soft: #e8f6f0;
    --hub-sky: #1c6ca8;
    --hub-sky-soft: #e9f2fb;
    --hub-surface: #fffefd;
    --hub-line: #e7eeea;
}

/* ---------- typography ---------- */

.candidate-dashboard-main h1,
.candidate-dashboard-main h2,
.candidate-dashboard-main h3 {
    letter-spacing: -0.028em;
    color: var(--hub-ink);
}

.candidate-dashboard-main h2 { font-weight: 800; }

.candidate-dashboard-main p { color: #4b5a53; }

.dashboard-eyebrow,
.candidate-dashboard-main .dashboard-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--hub-amber);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.dashboard-eyebrow::before {
    content: "";
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 999px;
    background: currentColor;
}

/* numbers should look deliberate, not accidental */
.candidate-dashboard-main strong,
.dashboard-metric-value {
    font-variant-numeric: tabular-nums;
}

/* ---------- cards ---------- */

.candidate-dashboard-main article,
.candidate-dashboard-main .dashboard-panel {
    position: relative;
    border: 1px solid var(--hub-line);
    border-radius: 1.1rem;
    background: var(--hub-surface);
    box-shadow: 0 1px 2px rgba(11, 31, 24, 0.04), 0 8px 20px -12px rgba(11, 31, 24, 0.12);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.candidate-dashboard-main article:hover,
.candidate-dashboard-main .dashboard-panel:hover {
    transform: translateY(-2px);
    border-color: #d8e4de;
    box-shadow: 0 2px 4px rgba(11, 31, 24, 0.05), 0 18px 34px -16px rgba(11, 31, 24, 0.2);
}

/* keep the dark tile dark - it is the one deliberately inverted surface */
.candidate-dashboard-main .dashboard-metric-dark,
.candidate-dashboard-main article.bg-neutral-950 {
    background: linear-gradient(150deg, #143a2b 0%, var(--hub-ink) 72%);
    border-color: transparent;
    color: #eaf3ee;
}

/* a hint of colour, cycled - no edge stripes, just tinted icon chips */
.dashboard-metric-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    margin-bottom: 0.6rem;
    border-radius: 0.75rem;
    background: var(--hub-amber-soft);
    color: var(--hub-amber);
}

.dashboard-metric-icon svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.7; }

.candidate-dashboard-metrics article:nth-child(2n) .dashboard-metric-icon { background: var(--hub-emerald-soft); color: var(--hub-emerald); }
.candidate-dashboard-metrics article:nth-child(3n) .dashboard-metric-icon { background: var(--hub-sky-soft); color: var(--hub-sky); }

.candidate-dashboard-metrics article > span:first-child {
    color: #6b7f76;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

/* Every tile the same height, so the row reads as a row rather than four cards that
   happen to sit together. */
.candidate-dashboard-metrics article { min-height: 9.5rem; }

.candidate-dashboard-metrics article strong {
    font-size: 1.9rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--hub-ink);
}

.candidate-dashboard-metrics article small { color: #7b8a83; }

/* ---------- buttons ---------- */

.candidate-dashboard-main .button,
.candidate-dashboard-main .button-primary {
    border-radius: 999px;
    padding: 0.7rem 1.35rem;
    font-weight: 800;
    letter-spacing: -0.005em;
    transition: transform 0.12s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.candidate-dashboard-main .button-primary,
.candidate-dashboard-main .button.bg-slate-950 {
    background: var(--hub-ink);
    color: #fff;
    box-shadow: 0 8px 18px -10px rgba(11, 31, 24, 0.7);
}

.candidate-dashboard-main .button-primary:hover,
.candidate-dashboard-main .button.bg-slate-950:hover {
    background: var(--hub-ink-soft);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px -12px rgba(11, 31, 24, 0.8);
}

.candidate-dashboard-main .button:not(.button-primary):not(.bg-slate-950) {
    border: 1px solid var(--hub-line);
    background: #fff;
    color: var(--hub-ink);
}

.candidate-dashboard-main .button:not(.button-primary):not(.bg-slate-950):hover {
    border-color: var(--hub-ink);
    transform: translateY(-1px);
}

.candidate-dashboard-main .button:active { transform: translateY(1px); }

.candidate-dashboard-main a:focus-visible,
.candidate-dashboard-main .button:focus-visible,
.candidate-dashboard-main button:focus-visible {
    outline: 3px solid rgba(180, 83, 9, 0.35);
    outline-offset: 2px;
}

/* a link that points somewhere should look like it moves */
.dashboard-text-link,
.candidate-dashboard-main a.underline {
    color: var(--hub-ink);
    text-decoration-color: #cfdad4;
    text-underline-offset: 4px;
    transition: color 0.15s ease, text-decoration-color 0.15s ease, gap 0.15s ease;
}

.dashboard-text-link:hover,
.candidate-dashboard-main a.underline:hover {
    color: var(--hub-amber);
    text-decoration-color: var(--hub-amber);
}

/* ---------- status and pills ---------- */

.candidate-dashboard-main .dashboard-status {
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 800;
}

/* ---------- long forms ---------- */

/* Panels inside a form are containers, not destinations: they should not lift. */
.candidate-dashboard-main form .dashboard-panel:hover {
    transform: none;
    box-shadow: 0 1px 2px rgba(11, 31, 24, 0.04), 0 8px 20px -12px rgba(11, 31, 24, 0.12);
    border-color: var(--hub-line);
}

/* Save should be reachable from the bottom of a 400-line form, not only at its end. */
.dashboard-profile-actions {
    position: sticky;
    bottom: 0.75rem;
    z-index: 5;
    border: 1px solid var(--hub-line);
    border-radius: 1rem;
    background: rgba(255, 254, 253, 0.9);
    backdrop-filter: blur(8px);
    box-shadow: 0 -8px 24px -20px rgba(11, 31, 24, 0.6), 0 10px 26px -20px rgba(11, 31, 24, 0.5);
}

/* Fields, so a form reads as one system with the rest of the workspace. */
.candidate-dashboard-main form label { color: var(--hub-ink); font-weight: 700; }

.candidate-dashboard-main form input[type="text"],
.candidate-dashboard-main form input[type="url"],
.candidate-dashboard-main form input[type="email"],
.candidate-dashboard-main form input[type="tel"],
.candidate-dashboard-main form input[type="search"],
.candidate-dashboard-main form select,
.candidate-dashboard-main form textarea {
    border: 1px solid var(--hub-line);
    border-radius: 0.75rem;
    background: #fbfdfc;
    color: var(--hub-ink);
    font-family: inherit;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.candidate-dashboard-main form input:focus,
.candidate-dashboard-main form select:focus,
.candidate-dashboard-main form textarea:focus {
    background: #fff;
    border-color: var(--hub-ink);
    box-shadow: 0 0 0 4px rgba(11, 31, 24, 0.08);
    outline: none;
}

.candidate-dashboard-main form small,
.candidate-dashboard-main form .field-hint { color: #7b8a83; }

/* How the candidacy reads, before the fields that change it. */
.ballot-line {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding: 1.1rem 1.25rem;
    border: 1px solid #d8e4de;
    border-radius: 1rem;
    background: linear-gradient(140deg, #f4faf7 0%, #fbfdfc 70%);
}

.ballot-line-photo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 3.4rem;
    height: 3.4rem;
    overflow: hidden;
    border-radius: 999px;
    background: var(--hub-ink);
    color: #fff;
    font-size: 1.3rem;
    font-weight: 800;
}

.ballot-line-photo img { width: 100%; height: 100%; object-fit: cover; }
.ballot-line-copy { display: grid; gap: 0.15rem; }
.ballot-line-kicker { margin: 0; color: #8a9c94; font-size: 0.62rem; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; }
.ballot-line-copy strong { color: var(--hub-ink); font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; }
.ballot-line-seat { margin: 0; color: #4b5a53; font-size: 0.92rem; }
.ballot-line-party { margin: 0.15rem 0 0; color: var(--hub-amber); font-size: 0.88rem; font-weight: 800; }

/* Office and party: what is chosen, with the pickers behind a Change popup. */
.profile-choice {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 0.9rem;
    margin-bottom: 1.25rem;
    padding: 0.9rem 1.1rem;
    border: 1px solid var(--hub-line);
    border-radius: 0.9rem;
    background: #fbfdfc;
}

.profile-choice-label {
    color: #8a9c94;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    flex: 0 0 100%;
}

.profile-choice strong { color: var(--hub-ink); font-size: 1rem; font-weight: 800; }
.profile-choice-abbr { margin-left: 0.4rem; color: #7b8a83; font-size: 0.8rem; font-weight: 700; }
.profile-choice-note { color: var(--hub-amber); font-size: 0.8rem; font-weight: 700; }

.profile-pop > summary {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.85rem;
    border: 1px solid var(--hub-line);
    border-radius: 999px;
    background: #fff;
    color: var(--hub-ink);
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.profile-pop > summary::-webkit-details-marker { display: none; }
.profile-pop > summary:hover { border-color: var(--hub-ink); }

.profile-pop[open] > summary { visibility: hidden; }

.profile-pop-sheet {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 60;
    width: min(46rem, calc(100vw - 2rem));
    max-height: min(80vh, 44rem);
    overflow-y: auto;
    padding: 1.5rem;
    border-radius: 1.25rem;
    background: #fff;
    box-shadow: 0 30px 70px rgba(11, 31, 24, 0.35);
}

.profile-pop[open]::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(16, 35, 28, 0.55);
}

/* The party list stays out of the way until there is something to look for. Only
   applies once the script has said it is running, so without it nothing is hidden. */
.profile-pop[data-choice-pop="party"].js-ready .party-picker-grid,
.profile-pop[data-choice-pop="party"].js-ready .party-picker-count { display: none; }

.profile-pop[data-choice-pop="party"].js-ready.is-searching .party-picker-grid,
.profile-pop[data-choice-pop="party"].js-ready.is-searching .party-picker-count { display: block; }

/* A search box that looks like one: full width, tall, bordered, with room to type. */
.profile-pop .party-picker-search { margin-bottom: 0.5rem; }

.profile-pop .party-picker-search input[type="search"],
.profile-pop .party-picker-search input[type="text"] {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.8rem;
    border: 2px solid var(--hub-ink);
    border-radius: 0.9rem;
    background: #fff;
    color: var(--hub-ink);
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    box-shadow: 0 0 0 4px rgba(11, 31, 24, 0.06);
}

.profile-pop .party-picker-search input::placeholder { color: #9aada4; font-weight: 500; }
.profile-pop .party-picker-search input:focus { outline: none; border-color: var(--hub-amber); box-shadow: 0 0 0 4px rgba(180, 83, 9, 0.16); }
.profile-pop .party-picker-search-icon { color: var(--hub-ink); }

.profile-pop-hint { margin: 0 0 0.9rem; color: #7b8a83; font-size: 0.82rem; }

.profile-pop-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    margin-top: 1.25rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--hub-line);
}

.profile-pop-suggest { margin: 0; color: #6b7f76; font-size: 0.85rem; }
.profile-pop-suggest a { color: var(--hub-ink); font-weight: 800; text-decoration: underline; text-decoration-color: #cfdad4; text-underline-offset: 3px; }
.profile-pop-suggest a:hover { color: var(--hub-amber); text-decoration-color: var(--hub-amber); }

.profile-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.profile-pop-head h3 { margin: 0; font-size: 1.15rem; }
.profile-pop-close { border: 0; background: none; color: #4b5a53; font-size: 0.85rem; font-weight: 800; text-decoration: underline; cursor: pointer; }

/* The completion card: the one card on the profile page that states where you are,
   so it is tinted by state rather than left as another white panel. */
.dashboard-checklist-panel.is-behind {
    background: linear-gradient(150deg, #fff7ec 0%, #fffefd 58%);
    border-color: #f0dcc0;
}

.dashboard-checklist-panel.is-complete {
    background: linear-gradient(150deg, #ecf8f2 0%, #fffefd 58%);
    border-color: #cfe8dc;
}

.dashboard-completion { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; }

/* Identity on the left, progress on the right: the two ends of the same statement. */
.dashboard-completion-progress { display: grid; justify-items: end; gap: 0.7rem; flex: 0 0 auto; margin-left: auto; }
.dashboard-completion-figure { display: grid; justify-items: end; gap: 0.3rem; min-width: 8rem; }
.dashboard-completion-copy { flex: 1 1 14rem; }
.dashboard-completion-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 4rem;
    height: 4rem;
    overflow: hidden;
    border-radius: 999px;
    background: var(--hub-ink);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgba(180, 83, 9, 0.2);
}

.dashboard-completion-avatar img { width: 100%; height: 100%; object-fit: cover; }



.dashboard-completion-figure strong {
    color: var(--hub-ink);
    font-size: 2.6rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    font-size: 2rem;
}

.dashboard-completion-figure strong span { font-size: 1rem; }

.dashboard-completion-bar {
    display: block;
    width: 8rem;
    height: 0.5rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(11, 31, 24, 0.1);
}

.dashboard-completion-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--hub-amber); }
.dashboard-checklist-panel.is-complete .dashboard-completion-bar > span { background: var(--hub-emerald); }
.dashboard-completion-figure small { color: #7b8a83; font-size: 0.72rem; font-weight: 700; }
.dashboard-completion-copy { flex: 1 1 16rem; }

.dashboard-completion-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.75rem;
    padding: 0.45rem 0.9rem;
    border: 1px solid var(--hub-line);
    border-radius: 999px;
    background: #fff;
    color: var(--hub-ink);
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
    transition: border-color 0.15s ease, transform 0.12s ease, color 0.15s ease;
}

.dashboard-completion-link:hover { border-color: var(--hub-ink); transform: translateY(-1px); }
.dashboard-completion-link span { transition: transform 0.15s ease; }
.dashboard-completion-link:hover span { transform: translateX(3px); }
.dashboard-completion-copy h2 { margin: 0; font-size: 1.5rem; letter-spacing: -0.03em; }
.dashboard-completion-copy p { margin: 0; font-size: 0.9rem; }

/* The checklist is advice, so it should look like advice. */
.dashboard-checklist li {
    border-radius: 0.7rem;
    transition: background 0.15s ease;
}

.dashboard-checklist li:hover { background: #f7faf8; }

.dashboard-checklist-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    background: var(--hub-amber-soft);
    color: var(--hub-amber);
    font-weight: 800;
}

.dashboard-checklist-panel.is-complete .dashboard-checklist-mark { background: var(--hub-emerald-soft); color: var(--hub-emerald); }

/* ---------- the progress card ----------
   It was a thin bar on a white card, which disappeared among its neighbours. A ring
   on a warm tint reads at a glance. */

/* One tile among the others. It was briefly inverted to dark ink; that was a design
   I applied to the wrong card, and this is it back as an ordinary tile. The bar stays
   amber on a light track so the number is still the thing you notice. */
.candidate-dashboard-metrics .dashboard-progress-card {
    border-color: var(--hub-line);
    background: var(--hub-surface);
    color: inherit;
    box-shadow: 0 1px 2px rgba(11, 31, 24, 0.04), 0 8px 20px -12px rgba(11, 31, 24, 0.14);
}

.dashboard-progress-card .dashboard-progress-label { color: #8a9c94; }
.dashboard-progress-card strong { color: var(--hub-ink); }
.dashboard-progress-card small { color: #7b8a83; }

/* The ring: a warm tint under it so the tile reads before you read the number. */
.candidate-dashboard-metrics .dashboard-progress-card {
    background: var(--hub-amber-soft);
    border-color: #f2e2cb;
}

.dashboard-ring {
    position: relative;
    display: block;
    width: 6.5rem;
    height: 6.5rem;
    margin: 0.7rem 0 0.2rem;
}

.dashboard-ring svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); }

.dashboard-ring circle {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
}

.dashboard-ring-track { stroke: #f0e0c9; }
.dashboard-ring-value { stroke: var(--hub-amber); }

/* A finished profile is green, the same as the bar on the profile page. */
.dashboard-ring.is-complete .dashboard-ring-value { stroke: var(--hub-emerald); }
.dashboard-ring.is-complete .dashboard-ring-track { stroke: #d8ece2; }
.candidate-dashboard-metrics .dashboard-progress-card:has(.dashboard-ring.is-complete) {
    background: var(--hub-emerald-soft);
    border-color: #d5e9df;
}

/* The tile's own rule (.candidate-dashboard-metrics article strong, 1.9rem) was
   outranking this one and spilling a 1.9rem number out of a 6.5rem circle. */
.dashboard-ring .dashboard-ring-figure {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    color: var(--hub-ink);
    font-size: 1.45rem;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.dashboard-ring .dashboard-ring-figure span { font-size: 0.8rem; }

/* ---------- quick actions ---------- */

.dashboard-actions {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    margin-bottom: 1.5rem;
}

.dashboard-action {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--hub-line);
    border-radius: 1rem;
    background: var(--hub-surface);
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(11, 31, 24, 0.04);
    transition: transform 0.16s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.dashboard-action:hover {
    transform: translateY(-2px);
    border-color: #d3e2db;
    box-shadow: 0 14px 26px -18px rgba(11, 31, 24, 0.5);
}

.dashboard-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 0.7rem;
    background: var(--hub-amber-soft);
    color: var(--hub-amber);
}

.dashboard-action-icon svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.dashboard-action:nth-child(2n) .dashboard-action-icon { background: var(--hub-emerald-soft); color: var(--hub-emerald); }
.dashboard-action:nth-child(3n) .dashboard-action-icon { background: var(--hub-sky-soft); color: var(--hub-sky); }

.dashboard-action-copy { display: grid; gap: 0.1rem; min-width: 0; }
.dashboard-action-copy strong { color: var(--hub-ink); font-size: 0.92rem; font-weight: 800; }
.dashboard-action-copy small { color: #7b8a83; font-size: 0.78rem; line-height: 1.4; }

.dashboard-action-arrow {
    margin-left: auto;
    color: #b9c6c0;
    font-size: 1rem;
    transition: transform 0.16s ease, color 0.16s ease;
}

.dashboard-action:hover .dashboard-action-arrow { transform: translateX(3px); color: var(--hub-amber); }

/* ---------- the sidebar ----------
   The sidebar sits outside <main>, so it is styled through its own classes - which
   only ever appear on dashboard pages. */

.dashboard-sidebar-label {
    color: #8a9c94;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.dashboard-sidebar-candidate {
    border-radius: 0.9rem;
    background: #f6faf8;
    border: 1px solid var(--hub-line);
}

.dashboard-sidebar-avatar {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(180, 83, 9, 0.22);
}

.dashboard-sidebar-view {
    display: inline-block;
    margin-top: 0.35rem;
    color: var(--hub-amber);
    font-size: 0.74rem;
    font-weight: 800;
    text-decoration: none;
}

.dashboard-sidebar-view:hover { text-decoration: underline; }

.dashboard-sidebar-link {
    border-radius: 0.8rem;
    transition: background 0.16s ease, color 0.16s ease, transform 0.12s ease;
}

.dashboard-sidebar-link:hover {
    background: #f1f6f3;
    transform: translateX(2px);
}

.dashboard-sidebar-link.is-active {
    background: linear-gradient(120deg, var(--hub-ink-soft) 0%, var(--hub-ink) 100%);
    color: #fff;
    box-shadow: 0 10px 22px -14px rgba(11, 31, 24, 0.85);
}

.dashboard-sidebar-link.is-active strong,
.dashboard-sidebar-link.is-active small { color: inherit; }

.dashboard-sidebar-link.is-active small { opacity: 0.78; }

.dashboard-sidebar-link svg {
    width: 1.05rem;
    height: 1.05rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dashboard-sidebar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    padding: 0.05rem 0.35rem;
    border-radius: 999px;
    background: var(--hub-amber);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
}

.dashboard-sidebar-foot { border-top: 1px solid var(--hub-line); }

/* ---------- the message to send ---------- */

.dashboard-message-panel { margin-bottom: 1.1rem; }
.dashboard-message-list { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.dashboard-message-item { display: grid; gap: 0.45rem; }
.dashboard-message-item-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.dashboard-message-item-head strong { color: var(--hub-ink); font-size: 0.9rem; font-weight: 800; }
.dashboard-message-text { min-height: 5.5rem; }
.dashboard-priorities-share,
.dashboard-kit-extras { margin-top: 1.1rem; }
.dashboard-kit-links { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.dashboard-kit-count { color: var(--hub-emerald); font-size: 0.8rem; font-weight: 800; }
/* The priority list is a set of cards now; the row layout that used to live here was
   still centring their contents through a higher-specificity li rule. */
.dashboard-message-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.9rem; margin-bottom: 0.9rem; }
.dashboard-message-head h2 { margin: 0.15rem 0 0; }

.dashboard-message-text {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid var(--hub-line);
    border-radius: 0.9rem;
    background: #f7faf8;
    color: var(--hub-ink);
    font-family: inherit;
    font-size: 0.98rem;
    line-height: 1.6;
    resize: vertical;
}

/* ---------- seat coverage ---------- */

/* This panel is built from Tailwind utilities the compiled stylesheet does not contain,
   so "grid-cols-3" did nothing and the seat, the price and the renewal date stacked
   down the card. Styled by the class names that are actually in the markup. */
.dashboard-panel .space-y-3 > div {
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--hub-line);
    border-radius: 1rem;
    background: #fbfdfc;
}

.dashboard-panel .space-y-3 > div > div:first-child {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.dashboard-panel .space-y-3 dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin: 0;
}

.dashboard-panel .space-y-3 dt {
    color: #8a9c94;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.dashboard-panel .space-y-3 dd {
    margin: 0.25rem 0 0;
    color: var(--hub-ink);
    font-size: 1rem;
    font-weight: 800;
}

/* The price is the number that matters, so it is the one that is largest. */
.dashboard-panel .space-y-3 dl > div:nth-child(2) dd { font-size: 1.2rem; letter-spacing: -0.02em; }

/* ---------- coverage as a meter ---------- */

/* A coverage panel should answer "how long am I visible for". A date does not answer
   it at a glance, so the term is drawn: the paid period as a bar, the days left as
   the largest thing in the card. */
.seat-coverage { display: grid; gap: 0.85rem; }

.seat-coverage-card {
    padding: 1.15rem 1.3rem;
    border: 1px solid var(--hub-line);
    border-radius: 1rem;
    background: #fbfdfc;
}

.seat-coverage-card.is-soon { border-color: #f0e0c9; background: #fefdfb; }
.seat-coverage-card.has-lapsed { border-color: #f3d6cf; background: #fdf6f4; }

/* Circle, name and amount, status: the days are the headline, so they get the shape
   the eye lands on first. */
.seat-coverage-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1.35rem; }

.seat-ring { position: relative; width: 5.25rem; height: 5.25rem; flex: none; }
.seat-ring svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); }
.seat-ring circle { fill: none; stroke-width: 7; stroke-linecap: round; }
.seat-ring-track { stroke: #e9f0ec; }
.seat-ring-value { stroke: var(--hub-ink); }
.seat-ring.is-soon .seat-ring-value { stroke: var(--hub-amber); }

.seat-ring > strong {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--hub-ink);
    font-size: 1.45rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.seat-ring > strong span { margin-top: 0.15rem; color: #8a9c94; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.seat-ring.is-soon > strong { color: var(--hub-amber); }

.seat-coverage-copy h3 { margin: 0; color: var(--hub-ink); font-size: 1.05rem; font-weight: 800; letter-spacing: -0.01em; }
.seat-coverage-amount { margin: 0.3rem 0 0; color: var(--hub-ink); font-size: 1.1rem; font-weight: 900; letter-spacing: -0.02em; }
.seat-coverage-amount span { color: #6b7f76; font-size: 0.86rem; font-weight: 600; letter-spacing: 0; }

.seat-coverage-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.seat-coverage-head h3 { margin: 0; color: var(--hub-ink); font-size: 1.05rem; font-weight: 800; letter-spacing: -0.01em; }
.seat-coverage-meta { margin: 0.25rem 0 0; color: #6b7f76; font-size: 0.86rem; }

.seat-coverage-state {
    display: inline-flex;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: var(--hub-emerald-soft);
    color: var(--hub-emerald);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Active stays green. The ring is what carries urgency; a status that turns amber
   because renewal is close reads as a problem with the plan rather than with the date. */
.seat-coverage-left { display: grid; justify-items: center; gap: 0.5rem; }
.seat-coverage-renewal { color: #7b8a83; font-size: 0.72rem; font-weight: 700; white-space: nowrap; }
.seat-coverage-upgrade {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--hub-amber);
    font-size: 0.84rem;
    font-weight: 800;
    text-decoration: none;
}
.seat-coverage-upgrade:hover { text-decoration: underline; text-underline-offset: 3px; }

.seat-coverage-days { margin: 1.1rem 0 0.55rem; color: #6b7f76; font-size: 0.9rem; }
.seat-coverage-days strong { color: var(--hub-ink); font-size: 1.5rem; font-weight: 900; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.seat-coverage-card.is-soon .seat-coverage-days strong { color: var(--hub-amber); }

.seat-coverage-meter { display: block; height: 0.5rem; border-radius: 999px; background: #eef4f1; overflow: hidden; }
.seat-coverage-meter > span { display: block; height: 100%; border-radius: 999px; background: var(--hub-ink); }
.seat-coverage-card.is-soon .seat-coverage-meter > span { background: var(--hub-amber); }

.seat-coverage-facts { margin: 0.85rem 0 0; color: #8a9c94; font-size: 0.76rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }

/* Kept for the older markup: quiet while there is time, amber inside a month. */
.dashboard-sub-renewal {
    margin: 1rem 0 0;
    padding-top: 0.85rem;
    border-top: 1px solid var(--hub-line);
    color: #6b7f76;
    font-size: 0.88rem;
}

.dashboard-sub-renewal strong { color: var(--hub-ink); font-weight: 900; }
.dashboard-sub-renewal.is-soon,
.dashboard-sub-renewal.is-soon strong { color: var(--hub-amber); }

/* ---------- priorities as cards ---------- */

/* Four commitments, four tiles. As a numbered list it read like a table of contents;
   as cards they read like the things the campaign is about. */
.dashboard-priorities-list.is-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr));
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dashboard-priorities-list.is-compact .dashboard-priority {
    display: grid;
    gap: 0.3rem;
    align-content: start;
    padding: 1rem 1.1rem;
    border: 1px solid var(--hub-line);
    border-radius: 1rem;
    background: var(--hub-surface);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.dashboard-priorities-list.is-compact .dashboard-priority:hover {
    transform: translateY(-2px);
    border-color: #d8e4de;
    box-shadow: 0 2px 4px rgba(11, 31, 24, 0.05), 0 18px 34px -16px rgba(11, 31, 24, 0.18);
}

.dashboard-priorities-list.is-compact .dashboard-priority-num {
    color: #9aada4;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.14em;
}

.dashboard-priorities-list.is-compact .dashboard-priority-label {
    color: var(--hub-ink);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.dashboard-priorities-list.is-compact .dashboard-priority-tag {
    justify-self: start;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: var(--hub-amber-soft);
    color: var(--hub-amber);
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ---------- the manifesto workspace ---------- */

/* Chapter state as a pill, the same vocabulary the dashboard header uses, instead of a
   line of grey text that reads as a caption. */
/* Anything not yet ready is work to do, so it reads in the amber the workspace uses for
   "still to finish" rather than as neutral grey. */
.manifesto-hub-chapter-state:not(.is-ready) {
    background: var(--hub-amber-soft);
    color: var(--hub-amber);
}

.manifesto-hub-chapter-state {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    background: #f1f5f3;
    color: #6b7f76;
    font-size: 0.72rem;
    font-weight: 800;
}



/* The list rows: the number is a waypoint, not a footnote, and the row answers to the
   pointer like every other row in the workspace. */
.manifesto-hub-chapter { transition: background 0.15s ease; }
.manifesto-hub-chapter:hover { background: #fbfdfc; }
.manifesto-hub-chapter-number {
    color: var(--hub-ink);
    font-weight: 900;
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
}

/* One primary action in the published card, not five of equal weight. */
.manifesto-hub-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.manifesto-hub-actions .dashboard-text-link { margin-left: auto; }

/* ---------- the page header ---------- */

/* The header line carries the seat, the area and the visibility pill. The utilities
   meant to space them are not in the built stylesheet, so they ran together as
   "Member of County AssemblyVisible to voters". Spaced here instead, where it does not
   depend on which utilities happened to be compiled. */
.candidate-dashboard-header > div > p {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

/* Same for the actions beside the heading: the button was overlapping the link. */
.candidate-dashboard-header > div:last-child {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.9rem;
}

/* The visibility pill. Its utility classes are not in the built stylesheet, so it
   arrived as plain grey text with no background; styled on its own terms instead. */
.dashboard-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.dashboard-status-pill::before {
    content: "";
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 999px;
    background: currentColor;
}

.dashboard-status-pill.is-live { background: var(--hub-emerald-soft); color: var(--hub-emerald); }
.dashboard-status-pill.is-draft { background: var(--hub-amber-soft); color: var(--hub-amber); }

/* ---------- the recommended next step ---------- */

/* It holds a heading, one line and a button. The grid's default stretch was matching it
   to the height of the priorities panel beside it, so a small amount of content sat in a
   lot of empty card. Sized to its content and given the full width instead, so nothing
   is left blank beside it. */
.candidate-dashboard-grid { grid-template-columns: 1fr; }

/* Heading and explanation on the left, the number and the action on the right: the card
   is full width now, and a single left column left half of it empty. */
.dashboard-panel-featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.55rem 1.75rem;
    padding: 1.3rem 1.5rem;
}

.dashboard-panel-featured .dashboard-panel-heading {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
}

.dashboard-panel-featured > p {
    grid-column: 1;
    grid-row: 2;
    margin: 0;
    color: #5c6f66;
}

.dashboard-panel-featured > .button {
    grid-column: 2;
    grid-row: 1 / span 2;
    white-space: nowrap;
}

.dashboard-panel-featured .dashboard-panel-number { grid-column: 2; grid-row: 1; justify-self: end; align-self: start; opacity: 0.35; }

@media (max-width: 47.99rem) {
    .dashboard-panel-featured { grid-template-columns: minmax(0, 1fr); }
    .dashboard-panel-featured > .button { grid-column: 1; grid-row: 3; justify-self: start; }
}

/* ---------- motion, politely ---------- */

@media (prefers-reduced-motion: reduce) {
    .candidate-dashboard-main article,
    .candidate-dashboard-main .dashboard-panel,
    .candidate-dashboard-main .button {
        transition: none;
    }

    .dashboard-profile-actions { position: static; }

    .candidate-dashboard-main article:hover,
    .candidate-dashboard-main .dashboard-panel:hover,
    .candidate-dashboard-main .button-primary:hover,
    .dashboard-sidebar-link:hover,
    .dashboard-action:hover,
    .dashboard-action:hover .dashboard-action-arrow {
        transform: none;
    }
}

/* ---------- account settings ---------- */

.account-form { display: grid; gap: 1.1rem; max-width: 34rem; }
.account-field { display: grid; gap: 0.4rem; }

.account-field-label {
    color: var(--hub-ink, #0b1f18);
    font-size: 0.82rem;
    font-weight: 800;
}

.account-field input {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1px solid #dbe4e0;
    border-radius: 0.75rem;
    background: #ffffff;
    color: var(--hub-ink, #0b1f18);
    font-size: 0.95rem;
    box-sizing: border-box;
}

.account-field input:disabled { background: #f4f7f6; color: #6b7f76; }

.account-field input:focus {
    outline: none;
    border-color: var(--hub-emerald, #0f7a55);
    box-shadow: 0 0 0 3px rgba(15, 122, 85, 0.14);
}

.account-field-note { color: #6b7f76; font-size: 0.78rem; }

.account-divider {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin: 0.5rem 0;
    color: #6b7f76;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.account-divider::before,
.account-divider::after { content: ""; flex: 1; height: 1px; background: #e2e8f0; }

.account-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }

/* The dashboard header's copy is a stack: title, then the line under it. On the account
   page the lead was sitting inline beside the heading. */
.candidate-dashboard-header > div > h1,
.candidate-dashboard-header > div > p {
    display: block;
}

.candidate-dashboard-header > div > h1 { margin: 0.35rem 0 0.4rem; }
.candidate-dashboard-header > div > p:last-child { margin: 0; color: #5b6f66; max-width: 46rem; }

/* ---------- share kit ---------- */

/* .button-sm was used by the share page and defined nowhere. */
.button-sm {
    padding: 0.4rem 0.8rem;
    border-radius: 0.7rem;
    font-size: 0.8rem;
}

/* The message fields opened three rows tall, so a message with a long link in it was
   cut off behind an inner scrollbar. They grow to fit, and long URLs wrap. */
.dashboard-message-text {
    overflow: hidden;
    resize: none;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.5;
}

.dashboard-message-item code,
.dashboard-panel code,
.dashboard-tool-card code {
    overflow-wrap: anywhere;
}

/* ---------- share kit: the link card and the message cards ---------- */

.share-link-card {
    display: flex;
    flex-wrap: wrap;
    /* the button lines up with the link field rather than floating beside the label */
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 1.25rem;
    margin-bottom: 1.1rem;
    padding: 1.15rem 1.3rem;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: #ffffff;
}

.share-link-copy { flex: 1 1 18rem; min-width: 0; }

.share-link-url {
    margin: 0.4rem 0 0;
    padding: 0.65rem 0.85rem;
    border: 1px solid #dbe4e0;
    border-radius: 0.7rem;
    background: #f7fbf9;
    color: var(--hub-ink, #0b1f18);
    font-size: 0.9rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

/* Each message reads as itself, on the page, with Copy under it. */
.dashboard-message-item {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0;
    border: 0;
    background: transparent;
}

/* The message and its Copy button share one box. */
.dashboard-message-text {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin: 0;
    padding: 0.85rem 0.95rem 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: transparent;
    flex: 1 1 auto;
}

.dashboard-message-copy {
    margin: 0;
    color: #24382f;
    font-size: 0.9rem;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.dashboard-message-text .button-sm { align-self: flex-start; margin-top: auto; }

/* A dashboard header with only one child was being laid out as a flex row, which put the
   eyebrow and the title on the same line. It should stack like every other header. */
.candidate-dashboard-header > div:only-child {
    display: block;
}

/* ---------- share a single priority ---------- */

.dashboard-priority-share-list { display: grid; gap: 0.9rem; margin: 1rem 0 0; padding: 0; list-style: none; }

.priority-share-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 1rem 1.15rem;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: #ffffff;
    /* the older rule for this list centred everything inside the row */
    text-align: left;
}

.priority-share-card .priority-share-text,
.priority-share-card .priority-share-actions { width: 100%; }

.priority-share-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.priority-share-head strong { color: var(--hub-ink, #0b1f18); font-size: 1rem; font-weight: 800; letter-spacing: -0.01em; }

.priority-share-tag {
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: #fdf3e7;
    border: 1px solid #e8c9a2;
    color: #8a4b06;
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.priority-share-text {
    margin: 0;
    padding: 0.75rem 0.85rem;
    border: 1px solid #eef2f0;
    border-radius: 0.75rem;
    color: #24382f;
    font-size: 0.88rem;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.priority-share-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ---------- the priority panel, collapsed at the foot of the page ---------- */

.priority-share-panel { padding: 1.1rem 1.3rem; }

.priority-share-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    cursor: pointer;
    list-style: none;
}

.priority-share-summary::-webkit-details-marker { display: none; }
.priority-share-summary-copy { display: grid; gap: 0.2rem; }
.priority-share-summary-copy strong { color: var(--hub-ink, #0b1f18); font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; }

.priority-share-summary-meta { display: inline-flex; align-items: center; gap: 0.6rem; }

.priority-share-count {
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: #f1f5f3;
    color: #5b6f66;
    font-size: 0.75rem;
    font-weight: 900;
}

/* Show / Hide, and a chevron that turns over — no script involved. */
.priority-share-toggle::after {
    content: "Show";
    color: var(--hub-ink, #0b1f18);
    font-size: 0.82rem;
    font-weight: 800;
}

.priority-share-toggle::before {
    content: "";
    display: inline-block;
    width: 0.45rem;
    height: 0.45rem;
    margin-right: 0.5rem;
    border-right: 2px solid var(--hub-ink, #0b1f18);
    border-bottom: 2px solid var(--hub-ink, #0b1f18);
    transform: rotate(45deg) translateY(-1px);
    transition: transform 0.15s ease;
}

details[open] .priority-share-toggle::after { content: "Hide"; }
details[open] .priority-share-toggle::before { transform: rotate(-135deg) translateY(-1px); }

/* ---------- the homepage switch, in the admin ---------- */

.admin-homepage-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; margin-top: 1rem; }

.admin-homepage-option {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    margin: 0;
    padding: 1.1rem 1.2rem;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: #ffffff;
}

.admin-homepage-option.is-current { border-color: #0f7a55; background: #f2faf6; }
.admin-homepage-option strong { color: var(--hub-ink, #0b1f18); font-size: 1rem; font-weight: 800; }
.admin-homepage-option p { margin: 0.35rem 0 0; color: #5b6f66; font-size: 0.88rem; line-height: 1.5; max-width: 30rem; }

.admin-homepage-state {
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: #0f7a55;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@media (max-width: 900px) {
    .admin-homepage-options { grid-template-columns: minmax(0, 1fr); }
}
