:root {
    color-scheme: light dark;
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    color: #1b2936;
    background:
        radial-gradient(900px 600px at 15% 10%, #fff6fb 0%, rgba(255, 246, 251, 0) 60%),
        radial-gradient(900px 600px at 85% 80%, #f3fbff 0%, rgba(243, 251, 255, 0) 60%),
        #ffffff;
}

a.home {
    position: fixed;
    top: 14px;
    left: 18px;
    z-index: 10;
    font: 400 15px -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    color: #111;
    text-decoration: none;
}

.container {
    min-height: 100vh;
    display: grid;
    place-items: start center;
    padding: 68px 14px 24px;
    /* leave space for Home link */
}

.screen {
    width: 100%;
    max-width: 1224px;
    /* widened by ~70% */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hidden {
    display: none
}

.intro {
    margin: 8px 0 16px;
    text-align: center
}

.intro h1 {
    margin: 0 0 4px;
    font-size: 24px;
    font-weight: 700;
    color: #2a3442;
    font-family: 'Quicksand', 'Nunito', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif
}

.intro .sub {
    margin: 0;
    color: #4b5563;
    font-weight: 500
}

.group {
    margin: 18px 0;
    display: grid;
    grid-auto-flow: row;
    justify-items: center;
}

.group-title {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    text-align: left;
    display: block;
    width: fit-content;
    justify-self: start
}

.choices {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    width: auto;
    max-width: 100%;
}

@media (min-width: 560px) {
    .choices {
        gap: 12px
    }
}

.chip {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(99, 102, 241, 0.20);
    background: linear-gradient(180deg, #eef2ff 0%, #e0e7ff 60%, #dee6ff 100%);
    color: #1b2936;
    border-radius: 16px;
    padding: 10px 12px;
    font-size: 15px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.85),
        /* soft top highlight */
        inset 0 -1px 0 rgba(99, 102, 241, 0.12),
        /* subtle bottom rim */
        0 1px 2px rgba(2, 6, 23, 0.06),
        /* tiny contact shadow */
        0 8px 18px rgba(99, 102, 241, 0.10);
    /* gentle lift */
    transition: background 120ms ease, box-shadow 120ms ease, border-color 120ms ease, transform 80ms ease;
}

.chip[aria-pressed="true"],
.chip[aria-checked="true"],
.chip.active {
    border-color: #6366f1;
    background: linear-gradient(180deg, #e7eaff 0%, #d6ddff 55%, #c7d2fe 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.90),
        inset 0 -1px 0 rgba(99, 102, 241, 0.16),
        0 2px 6px rgba(2, 6, 23, 0.08),
        0 12px 28px rgba(99, 102, 241, 0.20);
    animation: breathe 3.6s ease-in-out infinite;
}

.chip:hover {
    filter: brightness(1.02);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.88),
        inset 0 -1px 0 rgba(99, 102, 241, 0.12),
        0 2px 6px rgba(2, 6, 23, 0.08),
        0 12px 26px rgba(99, 102, 241, 0.14);
}

.chip:active {
    transform: translateY(1px);
}

/* A11y focus cues */
.chip:focus-visible,
button:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

.actions {
    margin: 12px auto 4px;
    display: flex;
    justify-content: center;
    width: fit-content
}

button.primary {
    padding: 12px 18px;
    border-radius: 18px;
    border: 1px solid rgba(99, 102, 241, 0.22);
    background: linear-gradient(180deg, #f5f7ff 0%, #e8ecff 55%, #dee6ff 100%);
    color: #1f3350;
    font-size: 16px;
    font-weight: 600;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.90),
        inset 0 -1px 0 rgba(99, 102, 241, 0.16),
        0 2px 8px rgba(2, 6, 23, 0.08),
        0 14px 34px rgba(99, 102, 241, 0.18);
    transition: filter 120ms ease, transform 80ms ease;
    animation: breathe 3.6s ease-in-out infinite;
}

button.primary:disabled {
    opacity: .6;
    animation: none;
}

button.primary:hover {
    filter: brightness(1.02);
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        inset 0 -1px 0 rgba(99, 102, 241, 0.18),
        0 4px 10px rgba(2, 6, 23, 0.10),
        0 18px 42px rgba(99, 102, 241, 0.22);
}

button.primary:active {
    transform: translateY(1px);
}

/* Warm sunrise focus for primary button */
button.primary:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 3px;
}

button.secondary {
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    color: #111;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.85),
        0 1px 2px rgba(2, 6, 23, 0.06),
        0 8px 18px rgba(15, 23, 42, 0.06);
}

button.ghost {
    padding: 8px 10px;
    border: none;
    background: transparent;
    color: #0b2942
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 2px 0 10px
}

.pill {
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f4f1ff;
    color: #6366f1
}

.card {
    border: 1px solid #e9ecf3;
    border-radius: 16px;
    padding: 16px;
    background: #fff;
    box-shadow: 0 16px 48px rgba(25, 35, 55, 0.08)
}

/* Ensure no list bullets appear inside cards */
.card ul,
.card ol {
    list-style: none;
    margin: 0;
    padding-left: 0;
}

.card li::marker {
    content: '';
}

.card h2 {
    margin: 2px 0 4px;
    font-size: 20px;
    text-align: center
}

.meta {
    color: #7b8798;
    font-size: 13px;
    display: none;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px
}

.dot {
    opacity: .5
}

.section h3 {
    margin: 12px 0 6px;
    font-size: 14px;
    color: #4c5768
}

/* Ensure consistent spacing between labels and following text */
.section p {
    margin: 0;
}

/* Calligraphic ornament divider between sections */
.ornament-divider {
    display: grid;
    place-items: center;
    margin: 12px 0;
    /* increased spacing above/below */
    line-height: 0;
    color: currentColor;
    opacity: .18;
}

.ornament-divider .ornament {
    width: 98%;
    /* nearly full width; symmetrical ends visible */
    height: 16px;
    /* ~12–16px spec */
}

.ornament-divider .ornament-stroke {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (prefers-color-scheme: dark) {
    .ornament-divider {
        opacity: .28;
    }
}

.bullets {
    margin: 0;
    padding-left: 18px
}

.bullets li {
    margin: 4px 0
}

.howtext {
    margin: 0;
    padding: 0;
    white-space: pre-line;
}

.controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
    justify-content: center;
    padding-bottom: env(safe-area-inset-bottom);
}

.countdown {
    margin-top: 10px;
    font-size: 28px;
    font-variant-numeric: tabular-nums;
    color: #334155
}

/* Gentle breathing glow used for primary and active chips */
@keyframes breathe {

    0%,
    100% {
        box-shadow: 0 10px 28px rgba(99, 102, 241, 0.12), 0 20px 50px rgba(99, 102, 241, 0.08);
    }

    50% {
        box-shadow: 0 14px 38px rgba(99, 102, 241, 0.20), 0 28px 60px rgba(99, 102, 241, 0.12);
    }
}

@media (min-width: 768px) {
    .container {
        padding-top: 72px
    }

    .card {
        padding: 18px
    }

    .intro h1 {
        font-size: 28px
    }
}

/* Vertically center when there is ample room (large, tall screens) */
@media (min-width: 768px) and (min-height: 760px) {
    .container {
        place-items: center center;
        /* horizontal + vertical center */
        padding-top: 40px;
        padding-bottom: 40px;
    }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important
    }
}