:root {
    --ink: #292a2d;
    --muted: #6f7073;
    --page: #ffffff;
    --line: #d2d3d4;
    --soft-line: #e8e8e8;
    --panel: #eeeeef;
    --panel-strong: #a9aaac;
    --teal: #55575a;
    --teal-dark: #292a2d;
    --orange: #4b4c4f;
}

* { box-sizing: border-box; }

html {
    background: var(--page);
    color: var(--ink);
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--page);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.55;
}

button, input { font: inherit; }
a { color: inherit; }

.site-header {
    border-top: 2px solid #999;
}

.logo-row {
    display: flex;
    width: min(1100px, calc(100% - 40px));
    min-height: 215px;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 25px 0 18px;
}

.logo-row a {
    display: block;
    width: min(880px, 100%);
}

.logo-row img {
    display: block;
    width: 100%;
    height: auto;
}

.main-nav {
    display: flex;
    min-height: 46px;
    align-items: stretch;
    justify-content: center;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.main-nav a {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 24px;
    color: #444;
    font-family: Georgia, "Times New Roman", serif;
    text-decoration: none;
}

.main-nav a:hover { color: var(--teal-dark); }

.main-nav a.active::before {
    position: absolute;
    top: -1px;
    right: 20px;
    left: 20px;
    height: 3px;
    background: #999;
    content: "";
}

.layout {
    width: min(980px, calc(100% - 34px));
    margin: 38px auto 75px;
}

.hero {
    margin-bottom: 30px;
    text-align: center;
}

.title-rule {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
}

.title-rule span {
    height: 1px;
    background: var(--line);
}

.hero h1 {
    margin: 0;
    font: 400 clamp(30px, 5vw, 40px)/1.1 Georgia, "Times New Roman", serif;
    letter-spacing: -.025em;
}

.hero > p {
    margin: 12px 0 0;
    color: var(--muted);
}

.kicker {
    margin: 0;
    color: var(--orange);
    font-size: 12px;
    font-weight: 700;
}

.poll-shell {
    border: 1px solid #d0d1d2;
    background: var(--panel);
}

.poll-content {
    padding: clamp(25px, 5vw, 45px);
}

.poll-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--orange);
    font-size: 13px;
    font-weight: 700;
}

.poll-status::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.poll-status.closed { color: var(--muted); }

.poll-question {
    margin: 0;
    font-size: clamp(25px, 4vw, 34px);
    line-height: 1.2;
}

.poll-intro,
.muted,
.feedback {
    color: var(--muted);
    line-height: 1.6;
}

.poll-intro {
    margin: 11px 0 0;
    font-size: 16px;
}

.options,
.text-form {
    display: grid;
    gap: 10px;
    margin-top: 27px;
}

.option-button {
    width: 100%;
    border: 1px solid #bfc0c2;
    padding: 14px 17px;
    background: white;
    color: var(--ink);
    text-align: left;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.option-button:hover {
    border-color: var(--teal);
    background: #f5f5f5;
}

.option-button:disabled {
    cursor: wait;
    opacity: .6;
}

.result {
    position: relative;
    overflow: hidden;
    border: 1px solid #c5c6c8;
    background: white;
}

.result-fill {
    position: absolute;
    inset: 0 auto 0 0;
    min-width: 0;
    background: var(--panel-strong);
}

.result.selected {
    border-color: var(--teal-dark);
    box-shadow: inset 4px 0 var(--teal-dark);
}

.result-row {
    position: relative;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 16px;
    font-weight: 700;
}

.text-input {
    width: 100%;
    border: 1px solid #bfc0c2;
    padding: 14px 15px;
    background: white;
    color: var(--ink);
    outline: none;
}

.text-input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 2px rgba(41, 42, 45, .12);
}

.primary-button {
    justify-self: start;
    border: 0;
    padding: 13px 24px;
    background: var(--teal);
    color: white;
    font-weight: 700;
    cursor: pointer;
}

.primary-button:hover { background: var(--teal-dark); }
.primary-button:disabled { opacity: .6; cursor: wait; }

.current-poll-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    padding: 13px 22px;
    background: var(--teal);
    color: white;
    font-weight: 700;
    text-decoration: none;
    transition: background-color .2s ease, transform .2s ease;
}

.current-poll-button:hover {
    background: var(--teal-dark);
    transform: translateY(-1px);
}

.current-poll-button span {
    font-size: 19px;
    line-height: 1;
}

.thanks {
    margin-top: 25px;
    border-left: 4px solid var(--teal);
    padding: 18px 20px;
    background: white;
}

.thanks strong {
    display: block;
    font-size: 19px;
}

.thanks p {
    margin: 5px 0 0;
    color: var(--muted);
}

.feedback.error { color: #b1382e; }

.share-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.text-button {
    border: 0;
    border-bottom: 1px solid var(--teal);
    padding: 5px 0;
    background: transparent;
    color: var(--teal-dark);
    cursor: pointer;
}

.archive {
    margin-top: 55px;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.section-heading::before,
.section-heading::after {
    height: 1px;
    flex: 1;
    background: var(--line);
    content: "";
}

.section-heading .kicker { display: none; }

.section-heading h2 {
    margin: 0;
    font: 400 clamp(27px, 4vw, 36px)/1.1 Georgia, "Times New Roman", serif;
}

.archive-list {
    display: grid;
    border-top: 1px solid var(--line);
}

.archive-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--line);
    padding: 17px 10px;
    background: white;
    text-decoration: none;
}

.archive-item:hover { background: #f8f8f8; }
.archive-item strong { display: block; line-height: 1.4; }
.archive-item small { display: block; margin-top: 3px; color: var(--muted); }
.archive-item > span:last-child { color: var(--teal); font-size: 20px; }

.loading {
    display: grid;
    min-height: 260px;
    place-items: center;
    align-content: center;
    gap: 12px;
    color: var(--muted);
}

.loading span {
    width: 25px;
    height: 25px;
    border: 3px solid #d0d1d2;
    border-top-color: var(--teal);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

footer {
    display: flex;
    width: min(980px, calc(100% - 34px));
    justify-content: space-between;
    margin: 0 auto;
    border-top: 1px solid var(--line);
    padding: 22px 0 35px;
    color: var(--muted);
    font-size: 13px;
}

footer a { text-decoration: none; }

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 720px) {
    .logo-row {
        min-height: 120px;
        padding: 20px 0;
    }

    .main-nav {
        flex-wrap: wrap;
        padding: 6px;
    }

    .main-nav a {
        min-height: 36px;
        padding: 0 12px;
        font-size: 13px;
    }

    .main-nav a.active::before {
        top: auto;
        bottom: 0;
        right: 10px;
        left: 10px;
    }

    .layout { margin-top: 28px; }
    .title-rule { gap: 8px; }
    .hero h1 { font-size: 29px; }
    .poll-content { padding: 24px 20px; }
    .poll-question { font-size: 27px; }
    .section-heading h2 { font-size: 27px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
