/* StraightCalc countdowns — independently scoped to countdown pages. */
.countdown-hero { padding: 34px 0 20px; }
.countdown-hero-copy { max-width: 820px; }
.countdown-hero h1, .countdowns-index-heading h1 { color: #13243c; font-size: clamp(2.4rem, 5.2vw, 3.9rem); line-height: 1.12; letter-spacing: -.055em; margin: 0 0 17px; }
.countdown-hero-copy > p:not(.home-section-kicker), .countdowns-index-heading > p { max-width: 740px; color: #61738a; line-height: 1.75; font-size: 1.02rem; margin: 0; }
.countdown-local-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 19px; color: #62758f; font-size: .78rem; }
.countdown-local-note strong { color: #344b68; font-weight: 700; }
.countdown-local-note > span:first-child { font-size: 1.2rem; }

.countdown-tool { min-width: 0; padding: clamp(22px, 3.2vw, 38px); margin: 17px 0 38px; background: #152943; color: #fff; border: 1px solid #243e61; border-radius: 14px; box-shadow: 0 16px 40px rgba(20, 42, 76, .09); }
.countdown-tool-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.countdown-overline { color: #8fb3f2; font-size: .69rem; font-weight: 850; letter-spacing: .105em; margin: 0 0 7px; }
.countdown-tool-heading h2 { color: #fff; margin: 0; font-size: clamp(1.1rem, 2.6vw, 1.48rem); letter-spacing: -.025em; }
.countdown-live-indicator { display: inline-flex; align-items: center; gap: 8px; color: #bdd0ef; font-size: .7rem; font-weight: 800; letter-spacing: .06em; }
.countdown-live-indicator > span { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #4ade80; }
.countdown-day-context { margin: 28px 0 14px; color: #bcd4ff; font-size: .92rem; font-weight: 650; }
.countdown-clock { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); gap: clamp(4px, 1.3vw, 15px); align-items: start; }
.countdown-unit { display: flex; flex-direction: column; align-items: center; min-width: 0; padding: clamp(15px, 3vw, 27px) 5px clamp(13px, 2.4vw, 20px); border: 1px solid #365072; border-radius: 10px; background: #223a59; }
.countdown-unit strong { display: block; color: #fff; font-size: clamp(1.75rem, 6vw, 4.65rem); font-weight: 820; line-height: 1.05; letter-spacing: -.05em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.countdown-unit span { display: block; color: #b7c9e4; font-size: clamp(.65rem, 1.5vw, .83rem); margin-top: 9px; }
.countdown-separator { color: #8fa9cb; font-size: clamp(1.6rem, 3.5vw, 3rem); font-weight: 600; padding-top: clamp(14px, 3vw, 25px); }
.countdown-tool-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 17px; margin-top: 27px; padding-top: 22px; border-top: 1px solid #365072; }
.countdown-tool-footer strong { color: #fff; font-size: .9rem; }
.countdown-tool-footer p { margin: 6px 0 0; color: #b8c8de; font-size: .81rem; line-height: 1.5; }
.countdown-share-actions { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.countdown-share-actions .home-button { font: inherit; font-size: .84rem; font-weight: 750; cursor: pointer; background: #3677f1; border-color: #3677f1; color: #fff; }
#countdown-copy-message { color: #cae4d6; font-size: .78rem; min-height: 1em; }

.countdown-explainer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 340px); gap: 24px; align-items: start; margin: 0 0 55px; }
.countdown-explainer-main { min-width: 0; padding: 8px 0; }
.countdown-explainer h2, .countdown-faq h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); letter-spacing: -.035em; color: #17243b; margin: 0 0 15px; }
.countdown-explainer-main p:not(.home-section-kicker) { font-size: .91rem; color: #596f88; line-height: 1.85; max-width: 700px; }
.countdown-explainer-main strong { color: #263d59; }
.countdown-facts { min-width: 0; padding: 24px; border-radius: 11px; border: 1px solid #dce4ef; background: #fff; }
.countdown-facts .countdown-overline { color: #3562b9; margin-bottom: 12px; }
.countdown-facts > div { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; padding: 11px 0; border-bottom: 1px solid #e9eef5; }
.countdown-facts > div:last-child { border: 0; padding-bottom: 0; }
.countdown-facts > div span { color: #647993; font-size: .8rem; }
.countdown-facts > div strong { color: #1c3554; font-size: .82rem; }
.countdown-faq { padding: 34px 0 44px; border-top: 1px solid #dce4ef; }
.countdown-faq details { border-bottom: 1px solid #dce4ef; }
.countdown-faq summary { position: relative; padding: 19px 28px 19px 0; cursor: pointer; color: #233d60; font-size: .95rem; font-weight: 700; }
.countdown-faq summary::marker { color: #356ddd; }
.countdown-faq details p { margin: 0 0 20px; color: #63758a; font-size: .88rem; line-height: 1.75; }
.countdown-faq summary:focus-visible { outline: 2px solid #2864ed; outline-offset: 3px; }
.countdown-next { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 18px; padding: 25px 0 8px; border-top: 1px solid #dce4ef; }
.countdown-next strong { color: #172943; }
.countdown-next p { margin: 5px 0 0; color: #667a91; font-size: .84rem; }
.countdown-next-links { display: flex; flex-wrap: wrap; gap: 18px; }
.countdown-next-links a { color: #2459c6; font-weight: 750; text-decoration: none; font-size: .86rem; }
.countdown-next-links a:hover { text-decoration: underline; }

/* Countdown collection */
.countdowns-index-heading { padding: 35px 0 45px; }
.countdowns-index-collection { border-top: 1px solid #dce4ef; padding: 34px 0 75px; }
.countdowns-index-collection h2 { color: #172943; margin: 0 0 21px; font-size: 1.55rem; }
.countdowns-index-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.countdown-collection-card { display: flex; flex-direction: column; min-width: 0; padding: 25px; border: 1px solid #dce4ef; border-radius: 12px; color: #203856; text-decoration: none; background: #fff; transition: border-color .15s, transform .15s; }
.countdown-collection-card:hover { border-color: #9ab8ee; transform: translateY(-2px); }
.countdown-collection-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 10px; background: #ebf2ff; color: #235ac8; font-size: 1.6rem; margin-bottom: 20px; }
.countdown-collection-card .countdown-overline { color: #3a65b0; }
.countdown-collection-card strong { font-size: 1.19rem; margin: 1px 0 10px; }
.countdown-collection-card > span:nth-last-child(2) { color: #63768d; line-height: 1.68; font-size: .87rem; }
.countdown-collection-link { color: #245bc9; font-weight: 770; font-size: .85rem; margin-top: 20px; }

@media (max-width: 850px) {
    .countdown-explainer { grid-template-columns: minmax(0, 1fr); }
    .countdown-facts { max-width: 580px; }
    .countdowns-index-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .countdown-hero { padding-top: 14px; }
    .countdown-hero-copy > p:not(.home-section-kicker) { font-size: .93rem; }
    .countdown-tool { padding: 17px 12px 21px; border-radius: 11px; margin: 16px 0 28px; }
    .countdown-day-context { margin: 22px 0 14px; font-size: .83rem; }
    .countdown-unit { padding: 14px 2px 12px; border-radius: 7px; }
    .countdown-unit strong { font-size: clamp(1.42rem, 6.4vw, 2.25rem); }
    .countdown-unit span { font-size: .64rem; margin-top: 6px; }
    .countdown-separator { font-size: 1.4rem; padding-top: 12px; }
    .countdown-tool-footer { align-items: stretch; }
    .countdown-share-actions { width: 100%; }
    .countdown-share-actions .home-button { width: 100%; }
    .countdown-explainer { margin-bottom: 32px; }
    .countdowns-index-heading { padding: 16px 0 33px; }
    .countdowns-index-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Christmas atmosphere: purely decorative, behind the countdown content. */
.countdown-festive { position: relative; isolation: isolate; overflow: hidden; }
.countdown-festive::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: -28%;
    pointer-events: none;
    background: radial-gradient(circle at 22% 16%, rgba(65, 120, 214, .19), transparent 39%),
                radial-gradient(circle at 80% 79%, rgba(45, 170, 170, .14), transparent 37%);
}
.countdown-festive.countdown-motion-on:not(.countdown-is-hidden)::before { animation: countdown-ambient-shift 18s ease-in-out infinite alternate; }
.countdown-festive > :not(.countdown-snow-layer) { position: relative; z-index: 1; }
@keyframes countdown-ambient-shift {
    from { transform: translate3d(-2%, -1%, 0) scale(1); }
    to { transform: translate3d(2%, 2%, 0) scale(1.06); }
}
.countdown-snow-layer { position: absolute; z-index: 0; inset: 0; overflow: hidden; pointer-events: none; }
.countdown-flake {
    position: absolute;
    top: 0;
    left: var(--snow-x);
    font-size: var(--snow-size);
    color: #f1f8ff;
    opacity: 0;
    animation: countdown-snow-fall var(--snow-duration) linear var(--snow-delay) infinite;
    animation-play-state: paused;
}
.countdown-motion-on:not(.countdown-is-hidden) .countdown-flake { animation-play-state: running; }
@keyframes countdown-snow-fall {
    0% { opacity: 0; transform: translate3d(0, -18px, 0); }
    8% { opacity: var(--snow-opacity); }
    90% { opacity: var(--snow-opacity); }
    100% { opacity: 0; transform: translate3d(var(--snow-drift), var(--snow-distance), 0); }
}
.countdown-heading-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.countdown-motion-toggle {
    font: inherit;
    font-size: .75rem;
    color: #d8e9ff;
    border: 1px solid #456386;
    border-radius: 7px;
    padding: 8px 12px;
    background: rgba(255,255,255,.055);
    cursor: pointer;
}
.countdown-motion-toggle:hover { background: rgba(255,255,255,.12); }
.countdown-motion-toggle:focus-visible { outline: 2px solid #d9efff; outline-offset: 3px; }
.countdown-motion-toggle[hidden] { display: none; }

/* Embeddable countdown generator */
.countdown-embed-builder { margin: 0 0 52px; padding: clamp(20px, 3.2vw, 35px); border: 1px solid #d9e5f2; border-radius: 13px; background: #fff; }
.countdown-embed-intro { display: flex; align-items: start; justify-content: space-between; gap: 18px; margin-bottom: 23px; }
.countdown-embed-intro h2 { font-size: clamp(1.35rem, 2.8vw, 1.95rem); color: #162d4a; line-height: 1.24; letter-spacing: -.035em; margin: 0 0 10px; }
.countdown-embed-intro p:not(.home-section-kicker) { font-size: .88rem; line-height: 1.7; color: #5b728b; margin: 0; max-width: 720px; }
.countdown-embed-tag { flex-shrink: 0; border: 1px solid #c7ddf7; border-radius: 100px; padding: 7px 10px; color: #315fb4; font-size: .65rem; font-weight: 800; letter-spacing: .06em; }
.countdown-embed-grid { display: grid; grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr); gap: 28px; }
.countdown-embed-options { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.countdown-embed-options > label:not(.countdown-check) { font-size: .84rem; font-weight: 750; color: #23405f; }
.countdown-embed-options select,
.countdown-embed-options textarea { width: 100%; min-width: 0; font: inherit; font-size: .85rem; border: 1px solid #cbd9e9; background: #f9fbfe; border-radius: 8px; color: #1c3451; }
.countdown-embed-options select { min-height: 43px; padding: 9px 10px; }
.countdown-embed-options textarea { font-family: ui-monospace, Consolas, monospace; resize: vertical; min-height: 112px; line-height: 1.5; overflow-wrap: anywhere; padding: 12px; }
.countdown-embed-options select:focus-visible,
.countdown-embed-options textarea:focus-visible { outline: 2px solid #3074eb; outline-offset: 2px; }
.countdown-check { display: flex; align-items: start; gap: 9px; padding: 8px 0 13px; font-size: .81rem; line-height: 1.5; color: #4f6781; cursor: pointer; }
.countdown-check input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: #286cdf; flex-shrink: 0; }
.countdown-embed-options .home-button { width: fit-content; border: 0; font-size: .82rem; font-weight: 750; cursor: pointer; }
.countdown-embed-feedback { color: #27664b; font-size: .77rem; min-height: 1.1em; }
.countdown-embed-preview { min-width: 0; }
.countdown-embed-preview-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 12px; }
.countdown-embed-preview-top strong { font-size: .84rem; color: #294263; }
.countdown-embed-preview-top small { font-size: .75rem; color: #7085a0; }
.countdown-embed-preview iframe { display: block; width: 100%; height: 250px; border: 0; border-radius: 12px; background: #152943; }
.countdown-embed-preview > p { font-size: .78rem; color: #647c95; line-height: 1.65; margin: 12px 0 0; }
@media (max-width: 850px) {
    .countdown-embed-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 600px) {
    .countdown-heading-actions { gap: 12px; }
    .countdown-motion-toggle { font-size: .69rem; padding: 7px 9px; }
    .countdown-embed-intro { flex-direction: column; gap: 10px; }
    .countdown-embed-builder { padding: 20px 15px; margin-bottom: 38px; }
    .countdown-embed-options .home-button { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
    .countdown-festive::before, .countdown-flake { animation: none !important; }
}

.countdown-embed-shortcut { color: #cde2ff; text-align: center; text-decoration: none; font-size: .76rem; font-weight: 700; }
.countdown-embed-shortcut:hover, .countdown-embed-shortcut:focus-visible { text-decoration: underline; }

/* Shared holiday themes — no images, canvas or downloaded assets. */
.countdown-festive[data-event="new-year"] {
    background: linear-gradient(125deg, #101b35 0%, #23234b 62%, #1a2d4c 100%);
    border-color: #373b6b;
}
.countdown-festive[data-event="easter"] {
    background: linear-gradient(128deg, #1d4654, #2f4b66 56%, #4a416b);
    border-color: #49778c;
}
.countdown-festive[data-event="fourth-of-july"] {
    background: linear-gradient(125deg, #112d54, #122440 62%, #45304c);
    border-color: #385b84;
}
.countdown-festive[data-event="valentines-day"] {
    background: linear-gradient(125deg, #401f3b, #602b4a 60%, #382849);
    border-color: #794560;
}
.countdown-festive[data-event="new-year"]::before {
    background: radial-gradient(circle at 12% 18%, rgba(249,207,103,.20), transparent 40%),
                radial-gradient(circle at 84% 77%, rgba(173,143,249,.18), transparent 42%);
}
.countdown-festive[data-event="easter"]::before {
    background: radial-gradient(circle at 22% 12%, rgba(138,241,189,.15), transparent 42%),
                radial-gradient(circle at 83% 75%, rgba(213,178,251,.23), transparent 42%);
}
.countdown-festive[data-event="fourth-of-july"]::before {
    background: radial-gradient(circle at 19% 22%, rgba(84,144,236,.23), transparent 40%),
                radial-gradient(circle at 84% 75%, rgba(237,107,123,.17), transparent 43%);
}
.countdown-festive[data-event="valentines-day"]::before {
    background: radial-gradient(circle at 12% 10%, rgba(243,132,174,.21), transparent 43%),
                radial-gradient(circle at 83% 81%, rgba(222,140,209,.14), transparent 40%);
}
.countdown-festive[data-event="easter"] .countdown-unit,
.countdown-festive[data-event="valentines-day"] .countdown-unit,
.countdown-festive[data-event="new-year"] .countdown-unit,
.countdown-festive[data-event="fourth-of-july"] .countdown-unit {
    background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.2);
}
.countdown-festive[data-event="easter"] .countdown-tool-footer,
.countdown-festive[data-event="valentines-day"] .countdown-tool-footer,
.countdown-festive[data-event="new-year"] .countdown-tool-footer,
.countdown-festive[data-event="fourth-of-july"] .countdown-tool-footer {
    border-color: rgba(255,255,255,.21);
}

/* Seasonal particles: absolute, decorative and isolated under the timer. */
.countdown-particle { position: absolute; z-index: 0; pointer-events: none; opacity: 0; animation-play-state: paused !important; }
.countdown-motion-on:not(.countdown-is-hidden) .countdown-particle { animation-play-state: running !important; }
.countdown-firework {
    left: var(--particle-x); top: var(--particle-y); width: 4px; height: 4px;
    background: #f6cf77; border-radius: 100%;
    box-shadow: 0 0 6px currentColor; color: #f6cf77;
    animation: holiday-firework 10.2s ease-out var(--particle-delay) infinite;
}
.countdown-firework.firework-color-1 { background: #c2abff; color: #c2abff; }
.countdown-firework.firework-color-2 { background: #c9ecff; color: #c9ecff; }
[data-event="fourth-of-july"] .firework-color-0 { background: #f48b93; color: #f48b93; }
[data-event="fourth-of-july"] .firework-color-1 { background: #fff; color: #fff; }
[data-event="fourth-of-july"] .firework-color-2 { background: #84bafe; color: #84bafe; }
@keyframes holiday-firework {
    0%, 2% { opacity: 0; transform: translate3d(0,0,0) scale(.25); }
    5% { opacity: .85; }
    15% { opacity: 0; transform: translate3d(var(--particle-dx),var(--particle-dy),0) scale(.6); }
    16%, 100% { opacity: 0; }
}
.countdown-petals, .countdown-hearts {
    left: var(--snow-x); font-size: var(--snow-size); opacity: 0;
    animation-duration: var(--snow-duration);
    animation-delay: var(--snow-delay);
    animation-timing-function: linear; animation-iteration-count: infinite;
}
.countdown-petals {
    top: -18px; color: #f6c5ed; line-height: 1;
    animation-name: holiday-petal-fall;
}
.countdown-petals:nth-child(4n+2) { color: #dfd0ff; }
.countdown-petals:nth-child(4n+3) { color: #f7e6b5; }
.countdown-petals:nth-child(4n+4) { color: #bdf7d7; }
.countdown-hearts {
    top: auto; bottom: -20px; color: #ff9cbc;
    animation-name: holiday-heart-float;
}
.countdown-hearts:nth-child(4n+2) { color: #fec7d9; }
.countdown-hearts:nth-child(4n+3) { color: #e6a9ec; }
@keyframes holiday-petal-fall {
    0% { opacity: 0; transform: translate3d(0,-18px,0) rotate(0deg); }
    9%, 84% { opacity: var(--snow-opacity); }
    100% { opacity: 0; transform: translate3d(var(--snow-drift),var(--snow-distance),0) rotate(225deg); }
}
@keyframes holiday-heart-float {
    0% { opacity: 0; transform: translate3d(0,0,0) rotate(-12deg); }
    12%, 82% { opacity: var(--snow-opacity); }
    100% { opacity: 0; transform: translate3d(var(--snow-drift),calc(-1 * var(--snow-distance)),0) rotate(17deg); }
}
@media (prefers-reduced-motion: reduce) {
    .countdown-particle { animation: none !important; }
}

/* Additional evergreen countdowns: restrained initial holiday palettes.
   Distinctive artwork and more elaborate motion can be added later. */
.countdown-festive[data-event="halloween"] {
    background: linear-gradient(125deg, #1c2036, #292440 58%, #493145);
    border-color: #54435a;
}
.countdown-festive[data-event="thanksgiving"] {
    background: linear-gradient(125deg, #2d343a, #38443f 53%, #5e4839);
    border-color: #5e6657;
}
.countdown-festive[data-event="black-friday"] {
    background: linear-gradient(125deg, #17202e, #232b3e 65%, #272a39);
}
.countdown-festive[data-event="mothers-day"] {
    background: linear-gradient(125deg, #42283f, #613b55 65%, #583849);
}
.countdown-festive[data-event="fathers-day"] {
    background: linear-gradient(125deg, #172d4a, #2b4267 65%, #344b5c);
}
.countdown-festive[data-event="memorial-day"] {
    background: linear-gradient(125deg, #142946, #283b57 65%, #323b55);
}
.countdown-festive[data-event="labor-day"] {
    background: linear-gradient(125deg, #183755, #2b4967 65%, #3d5367);
}
.countdown-festive[data-event="st-patricks-day"] {
    background: linear-gradient(125deg, #153d39, #26544a 64%, #2e5144);
}
.countdown-festive[data-event="christmas-eve"] {
    background: linear-gradient(125deg, #182e44, #233f4d 60%, #194c45);
}
/* The existing petal motion doubles as a low-key seasonal accent.
   Holiday-specific art/animations can replace these colors later. */
[data-event="halloween"] .countdown-petals,
[data-event="thanksgiving"] .countdown-petals { color: #efb567; }
[data-event="halloween"] .countdown-petals:nth-child(4n+2),
[data-event="thanksgiving"] .countdown-petals:nth-child(4n+2) { color: #d87658; }
[data-event="memorial-day"] .countdown-petals { color: #ef949f; }
[data-event="memorial-day"] .countdown-petals:nth-child(4n+2) { color: #efcad0; }
[data-event="st-patricks-day"] .countdown-petals { color: #8ddf9e; }
[data-event="st-patricks-day"] .countdown-petals:nth-child(4n+2) { color: #d0e793; }
