/* ============================================================
   POLL STREET — Newspaper Template
   ============================================================ */

/* ── Reset & Base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --ps-bg:         #F5F0E8;
    --ps-bg-card:    #FFFDF7;
    --ps-text:       #1A1410;
    --ps-text-mid:   #4A4035;
    --ps-text-light: #8A8075;
    --ps-accent:     #C41E1E;
    --ps-rule:       #1A1410;
    --ps-rule-thin:  #C8BFA8;
    --ps-bar-bg:     #E8E0D0;
    --ps-serif:      'Playfair Display', Georgia, serif;
    --ps-body:       'Libre Baskerville', Georgia, serif;
    --ps-sans:       -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--ps-body);
    background: var(--ps-bg);
    color: var(--ps-text);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--ps-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ── Page shell ── */
.ps-page {
    max-width: 840px;
    margin: 0 auto;
    padding: 0 24px 48px;
}

/* ── Masthead ── */
.ps-masthead {
    text-align: center;
    padding: 28px 0 0;
}

.ps-masthead__rule-top {
    border: none;
    border-top: 4px double var(--ps-rule);
    margin-bottom: 14px;
}

.ps-masthead__title {
    font-family: var(--ps-serif);
    font-size: 3.2rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1;
    color: var(--ps-text);
}

.ps-masthead__title a {
    color: inherit;
    text-decoration: none;
}

.ps-masthead__subtitle {
    font-family: var(--ps-serif);
    font-size: 1rem;
    font-weight: 400;
    font-style: italic;
    color: var(--ps-text-mid);
    margin-top: 2px;
    letter-spacing: 0.12em;
}

.ps-masthead__dateline {
    font-family: var(--ps-sans);
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--ps-text-light);
    margin-top: 10px;
}

.ps-masthead__dateline .dot { color: var(--ps-accent); }

.ps-masthead__rule-bottom {
    border: none;
    border-top: 1px solid var(--ps-rule);
    margin-top: 14px;
}

/* ── Navigation ── */
.ps-nav {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 10px 0;
    border-bottom: 1px solid var(--ps-rule-thin);
    margin-bottom: 28px;
}

.ps-nav a {
    font-family: var(--ps-sans);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--ps-text-mid);
    text-decoration: none;
    transition: color 0.2s;
}

.ps-nav a:hover,
.ps-nav a.active { color: var(--ps-accent); text-decoration: none; }

/* ── Main content ── */
.ps-main {
    min-height: 50vh;
}

/* ── Footer ── */
.ps-footer {
    margin-top: 48px;
    padding-top: 16px;
    border-top: 4px double var(--ps-rule);
    text-align: center;
}

.ps-footer__title {
    font-family: var(--ps-serif);
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.ps-footer__text {
    font-family: var(--ps-sans);
    font-size: 0.65rem;
    color: var(--ps-text-light);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 4px;
}

.ps-footer__links {
    font-family: var(--ps-sans);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
}

.ps-footer__links a {
    color: var(--ps-text-light);
    margin: 0 8px;
}

.ps-footer__links a:hover { color: var(--ps-accent); }

/* ── Shared component styles ── */
.ps-section-label {
    font-family: var(--ps-sans);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--ps-accent);
    margin-bottom: 12px;
}

.ps-thin-rule {
    border: none;
    border-top: 1px solid var(--ps-rule-thin);
    margin: 24px 0;
}

.ps-headline {
    font-family: var(--ps-serif);
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 8px;
}

.ps-badge-live {
    display: inline-block;
    font-family: var(--ps-sans);
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: var(--ps-accent);
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    vertical-align: middle;
}

.ps-badge-closed {
    display: inline-block;
    font-family: var(--ps-sans);
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: var(--ps-bar-bg);
    color: var(--ps-text-mid);
    padding: 2px 8px;
    border-radius: 3px;
    vertical-align: middle;
}

/* ── Lead section (home) ── */
.ps-lead {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--ps-text-mid);
    margin-bottom: 24px;
}

.ps-lead strong { color: var(--ps-text); }

/* ── Stats row (home) ── */
.ps-stats-row {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding: 20px 0;
    border-top: 1px solid var(--ps-rule-thin);
    border-bottom: 1px solid var(--ps-rule-thin);
    margin-bottom: 32px;
}

.ps-stat { text-align: center; }

.ps-stat-value {
    font-family: var(--ps-serif);
    font-size: 2rem;
    font-weight: 900;
    color: var(--ps-accent);
    line-height: 1;
}

.ps-stat-label {
    font-family: var(--ps-sans);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--ps-text-light);
    margin-top: 4px;
}

/* ── How it works (home) ── */
.ps-how {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.ps-how-step { text-align: center; }

.ps-how-num {
    font-family: var(--ps-serif);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--ps-accent);
    margin-bottom: 6px;
}

.ps-how-title {
    font-family: var(--ps-serif);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.ps-how-desc {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--ps-text-mid);
}

/* ── Poll list (home) ── */
.ps-poll-list { margin-bottom: 32px; }

.ps-poll-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 14px 0;
    border-bottom: 1px dotted var(--ps-rule-thin);
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

.ps-poll-item:hover { color: var(--ps-accent); text-decoration: none; }

.ps-poll-item .question {
    font-size: 1.05rem;
    font-weight: 700;
    flex: 1;
    margin-right: 16px;
}

.ps-poll-item .votes {
    font-family: var(--ps-serif);
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--ps-accent);
    white-space: nowrap;
}

.ps-more-link {
    display: block;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ps-accent);
    text-decoration: none;
    margin-top: 20px;
    letter-spacing: 0.05em;
}

.ps-more-link:hover { text-decoration: underline; }

/* ── Results archive ── */
.ps-page-subtitle {
    font-size: 0.95rem;
    color: var(--ps-text-mid);
    margin-bottom: 24px;
}

.ps-results-list { margin-bottom: 32px; }

.ps-result-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 14px 0;
    border-bottom: 1px dotted var(--ps-rule-thin);
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

.ps-result-row:hover { color: var(--ps-accent); text-decoration: none; }

.ps-result-row .question {
    font-size: 1.05rem;
    font-weight: 700;
    flex: 1;
    margin-right: 16px;
}

.ps-result-row .meta {
    font-size: 0.8rem;
    color: var(--ps-text-light);
    margin-top: 2px;
}

.ps-result-row .votes {
    font-family: var(--ps-serif);
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--ps-accent);
    white-space: nowrap;
}

/* ── Poll detail ── */
.ps-poll-meta {
    font-size: 0.85rem;
    color: var(--ps-text-light);
    margin-bottom: 28px;
}

.ps-poll-intro {
    font-size: 0.95rem;
    color: var(--ps-text-mid);
    line-height: 1.6;
    margin-top: 8px;
}

/* ── Result bars ── */
.ps-result-item { margin-bottom: 18px; }

.ps-result-item .label-row {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    margin-bottom: 4px;
    font-size: 1rem;
}

.ps-result-item .pct {
    color: var(--ps-accent);
    font-family: var(--ps-sans);
    font-weight: 800;
}

.ps-result-item .bar-track {
    height: 22px;
    background: var(--ps-bar-bg);
    border-radius: 4px;
    overflow: hidden;
}

.ps-result-item .bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s ease-out;
}

.ps-total {
    text-align: right;
    font-family: var(--ps-sans);
    font-size: 0.75rem;
    color: var(--ps-text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--ps-rule-thin);
}

/* ── Vote CTA ── */
.ps-vote-cta {
    border: 2px solid var(--ps-accent);
    border-radius: 4px;
    padding: 24px;
    text-align: center;
    margin-top: 32px;
}

.ps-vote-cta h3 {
    font-family: var(--ps-serif);
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--ps-accent);
    margin-bottom: 8px;
}

.ps-vote-cta p {
    font-size: 0.9rem;
    color: var(--ps-text-mid);
    margin-bottom: 12px;
}

.ps-vote-cta a {
    display: inline-block;
    background: var(--ps-accent);
    color: white;
    padding: 12px 32px;
    font-family: var(--ps-sans);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 4px;
}

.ps-vote-cta a:hover { background: #A01818; text-decoration: none; }

.ps-back-link {
    display: block;
    margin-top: 24px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ps-accent);
    text-decoration: none;
}

.ps-back-link:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 600px) {
    .ps-masthead__title { font-size: 2.2rem; }
    .ps-headline { font-size: 1.6rem; }
    .ps-nav { gap: 14px; flex-wrap: wrap; }
    .ps-page { padding: 0 16px 32px; }
    .ps-how { grid-template-columns: 1fr; gap: 16px; }
    .ps-stats-row { flex-direction: column; gap: 16px; }
}
