/* =============================================
   holyrood-seat-calc.css - Holyrood Seat Calculator
   Full editorial redesign (NYT/FT style)
   Scoped under body.holyrood-seat-calc, prefix: hsc-
   Requires: editorial-base.css + polls-editorial.css
   ============================================= */

body.holyrood-seat-calc {
    background: #FFFFFF;
    font-family: var(--ed-font-sans);
    color: var(--ed-color-body);
    -webkit-font-smoothing: antialiased;
}

.hsc-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 48px 24px 64px;
}

.hsc-narrow { max-width: 680px; }

/* ---- Masthead ---- */
.hsc-masthead { margin-bottom: 32px; max-width: 680px; }
.hsc-kicker {
    font-family: var(--ed-font-sans);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #999;
    margin: 0 0 8px 0;
}
.hsc-masthead-rule {
    border: none;
    border-top: 3px solid #1a1a1a;
    margin: 0 0 16px 0;
}
.hsc-headline {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 36px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.1;
    margin: 0 0 8px 0;
}
.hsc-subtitle {
    font-family: var(--ed-font-sans);
    font-size: 15px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* ---- Section system ---- */
.hsc-rule {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 48px 0;
}
.hsc-section-label {
    font-family: var(--ed-font-sans);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #999;
    margin: 0 0 8px 0;
}
.hsc-section-head {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.15;
    margin: 0 0 6px 0;
}
.hsc-section-intro {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
    color: #333;
    line-height: 1.7;
    margin: 0 0 20px 0;
    max-width: 680px;
}

/* ---- Links ---- */
.hsc-wrap a {
    color: #333;
    text-decoration: underline;
    text-decoration-color: #ccc;
    text-underline-offset: 2px;
    transition: text-decoration-color 0.15s;
}
.hsc-wrap a:hover { text-decoration-color: #333; }

/* ---- Hub nav ---- */
.hsc-hub-nav {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border-bottom: 2px solid #1a1a1a;
}
.hsc-hub-nav a {
    padding: 10px 20px;
    font-family: var(--ed-font-sans);
    font-size: 14px;
    font-weight: 600;
    color: #666;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s;
}
.hsc-hub-nav a:hover { color: #1a1a1a; text-decoration: none; }
.hsc-hub-nav a.active {
    color: #1a1a1a;
    border-bottom-color: #1a1a1a;
}

/* ---- Info box ---- */
.hsc-info-box {
    background: #f7f7f7;
    border-left: 3px solid #1a1a1a;
    padding: 16px 20px;
    margin: 16px 0;
}
.hsc-info-box p {
    margin: 6px 0;
    font-family: var(--ed-font-sans);
    font-size: 14px;
    color: #333;
    line-height: 1.6;
}
.hsc-info-box p:first-child { margin-top: 0; }
.hsc-info-box p:last-child { margin-bottom: 0; }

/* ---- Narrative headline for results ---- */
.hsc-narrative {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.3;
    margin: 0 0 16px 0;
    text-align: center;
}
.hsc-narrative-sub {
    font-family: var(--ed-font-sans);
    font-size: 14px;
    color: #666;
    text-align: center;
    margin: 0 0 24px 0;
}

/* ---- Quick-fill buttons ---- */
.hsc-action-btns {
    margin-top: 16px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}
.hsc-action-btn {
    font-family: var(--ed-font-sans);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    background: #fff;
    color: #1a1a1a;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
    line-height: 1.4;
}
.hsc-action-btn:hover { border-color: #999; }
.hsc-action-btn-sub {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: #999;
    margin-top: 2px;
}
.hsc-action-btn--clear {
    font-weight: 500;
    color: #666;
    border-color: #e0e0e0;
    background: transparent;
}
.hsc-action-btn--clear:hover { color: #1a1a1a; border-color: #999; }
.hsc-action-btn:disabled { opacity: 1; visibility: visible; cursor: wait; }

/* ---- Poll info ---- */
.hsc-poll-info {
    margin-top: 12px;
    font-family: var(--ed-font-sans);
    font-size: 12px;
    color: #999;
}

/* ---- Slider input panel ---- */
.hsc-slider-panel {
    margin-top: 24px;
    border: 1px solid #e0e0e0;
    background: #fff;
}

.hsc-slider-header {
    display: grid;
    grid-template-columns: 120px 1fr 1fr;
    gap: 0;
    border-bottom: 2px solid #1a1a1a;
    padding: 10px 16px;
}
.hsc-slider-header-party,
.hsc-slider-header-col {
    font-family: var(--ed-font-sans);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #666;
}

/* Slider rows */
.hsc-slider-row {
    display: grid;
    grid-template-columns: 120px 1fr 1fr;
    gap: 0;
    align-items: center;
    padding: 6px 16px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.1s;
}
.hsc-slider-row:hover { background: #fafafa; }
.hsc-slider-row:last-of-type { border-bottom: 1px solid #e0e0e0; }

.hsc-slider-party {
    display: flex;
    align-items: center;
    gap: 8px;
}
.hsc-party-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.hsc-party-name {
    font-family: var(--ed-font-sans);
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
}

.hsc-slider-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 8px;
}

/* Range slider styling */
.hsc-range {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    height: 4px;
    background: #e8e8e8;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}
.hsc-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--party-color, #999);
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: transform 0.1s;
    margin-top: -6px;
}
.hsc-range::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}
.hsc-range::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--party-color, #999);
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    cursor: pointer;
}
.hsc-range::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 2px;
}
.hsc-range::-moz-range-track {
    height: 4px;
    background: #e8e8e8;
    border-radius: 2px;
}

/* Number input */
.hsc-num-wrap {
    display: flex;
    align-items: center;
    gap: 1px;
    flex-shrink: 0;
}
.hsc-num {
    width: 52px;
    font-family: var(--ed-font-sans);
    font-weight: 700;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    border: 1px solid #e0e0e0;
    background: #fff;
    color: #1a1a1a;
    padding: 4px 4px 4px 8px;
    text-align: right;
    outline: none;
    transition: border-color 0.15s;
}
.hsc-num:focus { border-color: #999; }
.hsc-num::-webkit-outer-spin-button,
.hsc-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.hsc-num[type="number"] { -moz-appearance: textfield; }
.hsc-pct {
    font-family: var(--ed-font-sans);
    font-size: 12px;
    font-weight: 600;
    color: #999;
}

/* Totals row */
.hsc-slider-totals {
    display: grid;
    grid-template-columns: 120px 1fr 1fr;
    gap: 0;
    padding: 8px 16px;
    border-top: 2px solid #1a1a1a;
}
.hsc-total-cell {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1px;
    padding: 0 8px;
}
.hsc-total-value {
    font-family: var(--ed-font-sans);
    font-weight: 700;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    color: #1a1a1a;
}
.hsc-total-cell .hsc-pct { margin-left: 2px; }
.hsc-normalise-note {
    font-family: var(--ed-font-sans);
    font-size: 11px;
    color: #999;
    text-align: right;
    padding: 4px 16px 0;
}

/* ---- Seat summary bar ---- */
.hsc-seat-bar-wrap {
    position: relative;
    margin: 0 auto 24px;
    max-width: 680px;
}
.hsc-seat-bar {
    display: flex;
    height: 28px;
    border-radius: 3px;
    overflow: hidden;
    background: #f0f0f0;
}
.hsc-seat-bar-segment {
    transition: width 0.4s ease;
    position: relative;
    min-width: 0;
}
.hsc-seat-bar-majority {
    position: absolute;
    top: -4px;
    bottom: -4px;
    width: 0;
    border-left: 2px dashed #999;
    z-index: 2;
    pointer-events: none;
}
.hsc-seat-bar-majority-label {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--ed-font-sans);
    font-size: 10px;
    font-weight: 600;
    color: #999;
}
.hsc-seat-bar-labels {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
}
.hsc-seat-bar-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--ed-font-sans);
    font-size: 12px;
    color: #333;
    font-variant-numeric: tabular-nums;
}
.hsc-seat-bar-label-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.hsc-seat-bar-label-count {
    font-weight: 700;
}
.hsc-seat-bar-label-change {
    font-size: 11px;
    font-weight: 600;
}
.hsc-seat-bar-label-change.positive { color: #2e7d32; }
.hsc-seat-bar-label-change.negative { color: #c62828; }

/* ---- Seat prediction grid (new unified) ---- */
.hsc-seat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
    margin-bottom: 24px;
}
.hsc-seat-card {
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-top: 3px solid var(--party-color, #999);
    background: #fff;
}
.hsc-seat-card-name {
    font-family: var(--ed-font-sans);
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-bottom: 4px;
}
.hsc-seat-card-total {
    font-family: var(--ed-font-sans);
    font-size: 28px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #1a1a1a;
    line-height: 1;
    margin-bottom: 6px;
}
.hsc-seat-card-breakdown {
    font-family: var(--ed-font-sans);
    font-size: 11px;
    color: #999;
    line-height: 1.5;
}
.hsc-seat-card-change {
    font-family: var(--ed-font-sans);
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
}
.hsc-seat-card-change.positive { color: #2e7d32; }
.hsc-seat-card-change.negative { color: #c62828; }
.hsc-seat-card-change.neutral { color: #999; }

/* ---- Proportionality display ---- */
.hsc-proportionality {
    margin-top: 16px;
    padding-top: 16px;
}
.hsc-prop-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-family: var(--ed-font-sans);
    font-size: 13px;
}
.hsc-prop-party {
    width: 100px;
    font-weight: 600;
    color: #1a1a1a;
    flex-shrink: 0;
}
.hsc-prop-bars {
    flex: 1;
    position: relative;
    height: 20px;
}
.hsc-prop-bar-actual,
.hsc-prop-bar-pr {
    position: absolute;
    top: 0;
    left: 0;
    height: 10px;
    border-radius: 2px;
    transition: width 0.4s;
}
.hsc-prop-bar-actual { top: 0; }
.hsc-prop-bar-pr { top: 12px; opacity: 0.35; }
.hsc-prop-values {
    width: 100px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    color: #666;
    font-size: 12px;
}

/* ---- Results section ---- */
.hsc-results-header {
    text-align: center;
    margin-bottom: 24px;
}

/* ---- Hemicycle ---- */
#holyrood-hemicycle {
    margin: 0 auto 20px;
    text-align: center;
}
#holyrood-hemicycle svg {
    max-width: 560px;
    width: 100%;
    height: auto;
}

/* ---- Majority box ---- */
.hsc-majority-box {
    margin: 0 auto 20px;
    max-width: 500px;
    padding: 12px 20px;
    border-left: 3px solid #2e7d32;
    background: #f7f7f7;
    font-family: var(--ed-font-sans);
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

/* ---- Coalition calculator ---- */
.hsc-coalition {
    margin: 0 auto 24px;
    max-width: 500px;
    padding: 16px 20px;
    border: 1px solid #e0e0e0;
    background: #fafafa;
}
.hsc-coalition-label {
    font-family: var(--ed-font-sans);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #666;
    margin-bottom: 10px;
}
#holyrood-coalition-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
#holyrood-coalition-result {
    font-family: var(--ed-font-sans);
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

/* ---- Seat prediction cards ---- */
.hsc-seat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    margin-bottom: 24px;
}

/* ---- Share section ---- */
.hsc-share-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.hsc-share-label {
    font-family: var(--ed-font-sans);
    font-size: 12px;
    font-weight: 700;
    color: #1a1a1a;
    margin-right: 4px;
}
.hsc-share-feedback {
    font-family: var(--ed-font-sans);
    font-size: 12px;
    color: #2e7d32;
    font-weight: 500;
}

/* ---- Chart containers ---- */
.hsc-chart-container {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 24px;
    margin-bottom: 20px;
    position: relative;
}
.hsc-chart-container canvas {
    display: block;
    width: 100% !important;
    max-height: 400px;
}

/* ---- Tabs ---- */
.hsc-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #1a1a1a;
    margin-bottom: 16px;
}
.hsc-tab {
    font-family: var(--ed-font-sans);
    font-size: 13px;
    font-weight: 600;
    color: #666;
    background: none;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s;
}
.hsc-tab:hover { color: #1a1a1a; }
.hsc-tab.active { color: #1a1a1a; border-bottom-color: #1a1a1a; }

/* ---- Regional grid (collapsible) ---- */
.hsc-region-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px;
}
.hsc-region-card {
    border: 1px solid #e0e0e0;
    background: #fff;
    transition: box-shadow 0.15s;
}
.hsc-region-card:hover { box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.hsc-region-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    cursor: pointer;
    user-select: none;
}
.hsc-region-card-header h4 {
    margin: 0;
    font-family: var(--ed-font-sans);
    font-size: 13px;
    font-weight: 700;
    color: #1a1a1a;
}
.hsc-region-toggle {
    font-size: 10px;
    color: #999;
    transition: transform 0.2s;
}
.hsc-region-card.open .hsc-region-toggle { transform: rotate(180deg); }
.hsc-region-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0 14px 10px;
}
.hsc-region-detail {
    display: none;
    padding: 0 14px 14px;
    border-top: 1px solid #f0f0f0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.hsc-region-card.open .hsc-region-detail { display: block; }
.hsc-dhondt-table {
    width: 100%;
    min-width: 360px;
    border-collapse: collapse;
    font-family: var(--ed-font-sans);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    margin-top: 8px;
}
.hsc-dhondt-table th {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #666;
    padding: 6px 6px;
    text-align: right;
    border-bottom: 2px solid #1a1a1a;
}
.hsc-dhondt-table th:first-child { text-align: left; }
.hsc-dhondt-table td {
    padding: 5px 6px;
    text-align: right;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}
.hsc-dhondt-table td:first-child { text-align: left; font-weight: 600; }
.hsc-dhondt-table tr:last-child td { border-bottom: 2px solid #1a1a1a; }
.hsc-dhondt-winner { background: #f0fdf4; font-weight: 700; }

/* Legacy constituency grid support */
.const-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 14px;
}
.const-card h4 {
    margin: 0 0 8px 0;
    font-family: var(--ed-font-sans);
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
}
.const-seats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* ---- Seat chips ---- */
.seat-chip {
    display: inline-block;
    padding: 4px 8px;
    font-family: var(--ed-font-sans);
    font-size: 12px;
    font-weight: 500;
    background: #f0f0f0;
    color: #333;
}
.seat-chip.labour { background: #fecaca; color: #7f1d1d; }
.seat-chip.conservative { background: #bfdbfe; color: #1e3a8a; }
.seat-chip.snp { background: #fef3c7; color: #92400e; }
.seat-chip.libdem { background: #fde68a; color: #92400e; }
.seat-chip.greens { background: #bbf7d0; color: #065f46; }
.seat-chip.reform { background: #a7f3d0; color: #155e75; }
.seat-chip.alba { background: #cfe2ff; color: #005EB8; }
.seat-chip.others { background: #e5e7eb; color: #374151; }

/* Alba poll card overrides */
.poll-card.alba { border-left-color: #005EB8; }
.poll-card.alba h4, .poll-card.alba .poll-value { color: #005EB8; }

/* ---- Map container ---- */
.hsc-map-container { margin-top: 16px; position: relative; }
.hsc-map-frame {
    height: 600px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
}
.hsc-map-frame iframe { border: none; width: 100%; height: 100%; }

.hsc-map-legend {
    margin-top: 12px;
    text-align: center;
    font-family: var(--ed-font-sans);
    font-size: 12px;
    color: #666;
}
.hsc-map-legend-inner {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}
.hsc-map-legend-label { font-weight: 600; margin-right: 4px; }
.hsc-legend-item { display: inline-flex; align-items: center; gap: 4px; }
.hsc-legend-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 1px solid #e0e0e0;
}

/* ---- Table filters ---- */
.hsc-table-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.hsc-search-input {
    flex: 1;
    min-width: 180px;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-family: var(--ed-font-sans);
    font-size: 13px;
    color: #333;
    background: #fff;
    outline: none;
    transition: border-color 0.15s;
}
.hsc-search-input:focus { border-color: #999; }
.hsc-search-input::placeholder { color: #aaa; }
.hsc-filter-select {
    padding: 8px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-family: var(--ed-font-sans);
    font-size: 13px;
    color: #333;
    background: #fff;
    cursor: pointer;
    outline: none;
}
.hsc-filter-select:focus { border-color: #999; }
.hsc-filter-count {
    font-family: var(--ed-font-sans);
    font-size: 12px;
    color: #999;
    margin-bottom: 6px;
}

/* ---- Constituency table ---- */
.hsc-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hsc-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--ed-font-sans);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}
.hsc-table thead th {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #666;
    padding: 8px 10px;
    text-align: left;
    white-space: nowrap;
    border-bottom: 2px solid #1a1a1a;
}
.hsc-table tbody td {
    padding: 8px 10px;
    color: #333;
    border-bottom: 1px solid #e8e8e8;
}
.hsc-table tbody tr:last-child td { border-bottom: 2px solid #1a1a1a; }
.hsc-table tbody tr:hover { background: #fafafa; }
.hsc-table .gain { color: #2e7d32; font-weight: 600; }
.hsc-table .hold { color: #666; }

/* ---- Collapsible header ---- */
.hsc-collapsible-header {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.hsc-collapsible-header:hover { opacity: 0.8; }
.hsc-collapsible-header .hsc-toggle-icon {
    transition: transform 0.3s;
    font-size: 0.85rem;
    color: #999;
}

/* ---- FAQ / Methodology ---- */
.hsc-faq details { border-bottom: 1px solid #e0e0e0; }
.hsc-faq details:first-of-type { border-top: 1px solid #e0e0e0; }
.hsc-faq summary {
    font-family: var(--ed-font-sans);
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    padding: 14px 32px 14px 0;
    cursor: pointer;
    list-style: none;
    position: relative;
    line-height: 1.4;
}
.hsc-faq summary::-webkit-details-marker { display: none; }
.hsc-faq summary::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 14px;
    font-size: 18px;
    font-weight: 300;
    color: #999;
    line-height: 1;
}
.hsc-faq details[open] summary::after { content: '\2212'; }
.hsc-faq .hsc-faq-answer {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 15px;
    line-height: 1.7;
    color: #333;
    padding: 0 0 16px 0;
    max-width: 680px;
}
.hsc-faq .hsc-faq-answer p { margin: 0 0 10px 0; }
.hsc-faq .hsc-faq-answer p:last-child { margin-bottom: 0; }
.hsc-faq .hsc-faq-answer ul { padding-left: 20px; margin: 4px 0 8px 0; }
.hsc-faq .hsc-faq-answer li { margin-bottom: 4px; }
.hsc-faq .hsc-faq-answer pre {
    background: #f7f7f7;
    border: 1px solid #e0e0e0;
    padding: 12px;
    overflow-x: auto;
    margin: 8px 0;
    font-size: 13px;
}

/* ---- Misc ---- */
@keyframes spin { to { transform: rotate(360deg); } }
#download-projection-json { display: none !important; }
.hsc-section-desc {
    font-family: var(--ed-font-sans);
    font-size: 13px;
    color: #666;
    margin: 0 0 16px 0;
}
.hsc-subsection-heading {
    font-family: var(--ed-font-sans);
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 16px 0;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .hsc-wrap { padding: 32px 16px 48px; overflow-x: hidden; }
    .hsc-headline { font-size: 28px; }
    .hsc-section-head { font-size: 20px; }
    .hsc-section-intro { font-size: 16px; }
    .hsc-rule { margin: 36px 0; }
    .hsc-map-frame { height: 450px; }
    .hsc-action-btns { gap: 6px; }
    .hsc-action-btn { font-size: 12px; padding: 8px 12px; }
    .hsc-narrative { font-size: 18px; }

    /* Slider panel responsive */
    .hsc-slider-header { grid-template-columns: 80px 1fr 1fr; padding: 8px 12px; }
    .hsc-slider-row { grid-template-columns: 80px 1fr 1fr; padding: 6px 12px; }
    .hsc-slider-totals { grid-template-columns: 80px 1fr 1fr; padding: 8px 12px; }
    .hsc-party-name { font-size: 12px; }
    .hsc-slider-cell { gap: 4px; padding: 0 4px; }
    .hsc-num { width: 44px; font-size: 13px; padding: 3px 2px 3px 4px; }
    .hsc-link-hint { display: none; }
    .hsc-seat-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 6px; }
    .hsc-seat-card-total { font-size: 24px; }

    /* Prop display */
    .hsc-prop-party { width: 70px; font-size: 12px; }
    .hsc-prop-values { width: 80px; }
}

@media (max-width: 480px) {
    .hsc-headline { font-size: 24px; }
    .hsc-rule { margin: 28px 0; }
    .hsc-map-frame { height: 350px; }
    .hsc-narrative { font-size: 16px; }

    /* Mobile: slider-only with value label, no editable inputs */
    .hsc-slider-header { grid-template-columns: 48px 1fr 1fr; padding: 8px 8px; }
    .hsc-slider-header-col { font-size: 10px; }
    .hsc-slider-row { grid-template-columns: 48px 1fr 1fr; padding: 4px 8px; }
    .hsc-slider-totals { grid-template-columns: 48px 1fr 1fr; padding: 8px 8px; }
    .hsc-slider-cell { flex-wrap: nowrap; gap: 0; padding: 0 2px; overflow: hidden; }
    .hsc-range {
        display: block;
        flex: 1;
        min-width: 0;
        height: 4px;
    }
    .hsc-range::-webkit-slider-thumb {
        width: 20px;
        height: 20px;
        margin-top: -8px;
    }
    .hsc-range::-moz-range-thumb {
        width: 18px;
        height: 18px;
    }
    .hsc-num-wrap {
        flex-shrink: 0;
        width: 28px;
        text-align: right;
    }
    .hsc-num {
        width: 28px;
        font-size: 10px;
        padding: 0;
        border: none;
        background: transparent;
        color: #666;
        text-align: right;
        pointer-events: none;
        -moz-appearance: textfield;
    }
    .hsc-num::-webkit-inner-spin-button,
    .hsc-num::-webkit-outer-spin-button { display: none; }
    .hsc-pct { font-size: 9px; color: #999; }
    .hsc-party-dot { width: 8px; height: 8px; }
    .hsc-party-name {
        font-size: 10px;
        white-space: nowrap;
    }
    /* Abbreviate long party names on mobile */
    .hsc-party-name[data-abbr] { font-size: 0; }
    .hsc-party-name[data-abbr]::after {
        content: attr(data-abbr);
        font-size: 10px;
    }
}
