:root {
    --fb-primary: #2f6fcc;
    --fb-primary-dark: #1f4e92;
    --fb-bg: #f3f6fb;
    --fb-surface: #ffffff;
    --fb-sidebar: #eef2f6;
    --fb-border: #d9e2ef;
    --fb-text: #17304d;
    --fb-muted: #5f7086;
    --fb-radius: 22px;
    --fb-shadow: 0 18px 40px rgba(26, 61, 104, 0.08);
}

body {
    font-family: "Segoe UI", "Helvetica Neue", sans-serif;
    background: radial-gradient(circle at top left, #eef6ff, #f8fbff 35%, #f3f6fb 100%);
    color: var(--fb-text);
}

a {
    color: var(--fb-primary);
    text-decoration: none;
}

a:hover {
    color: var(--fb-primary-dark);
}

.site-header,
.site-footer {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
}

.navbar-brand {
    letter-spacing: -0.03em;
}

.hero-card,
.content-card,
.calendar-card,
.metric-card,
.sidebar-card,
.info-card {
    background: var(--fb-surface);
    border: 1px solid var(--fb-border);
    border-radius: var(--fb-radius);
    box-shadow: var(--fb-shadow);
}

.hero-card {
    background: linear-gradient(135deg, #fefefe 0%, #f1f7ff 100%);
}

.hero-card-home {
    padding-top: 2.1rem !important;
    padding-bottom: 2.1rem !important;
}

.hero-card-home .eyebrow {
    margin-bottom: .5rem;
}

.hero-card-home h1 {
    line-height: 1.08;
}

.eyebrow {
    display: inline-block;
    margin-bottom: .75rem;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--fb-primary);
}

.metric-card,
.info-card,
.sidebar-card,
.content-card,
.calendar-card {
    padding: 1.25rem;
}

.metric-card span {
    display: block;
    color: var(--fb-muted);
    font-size: .9rem;
}

.metric-card strong {
    display: block;
    font-size: 1.4rem;
    margin-top: .2rem;
}

.year-progress-inline {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin-top: .65rem;
}

.year-progress-bar {
    flex: 1;
    height: 12px;
    background: #e6edf7;
    border-radius: 999px;
    overflow: hidden;
    margin: 0;
}

.year-progress-bar .progress-bar {
    background: linear-gradient(90deg, var(--fb-primary), #6fa8ff);
    border-radius: 999px;
}

.year-progress-value {
    margin: 0;
    white-space: nowrap;
    line-height: 1;
}

.icon-label-display {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin-top: .45rem;
}

.icon-label-display strong {
    margin: 0;
}

.moon-phase-icon,
.season-icon {
    --moon-dark: #17304d;
    --moon-light: #f5f9ff;
    position: relative;
    width: 2.2rem;
    height: 2.2rem;
    flex: 0 0 2.2rem;
    border-radius: 50%;
    border: 1px solid rgba(23, 48, 77, 0.08);
    overflow: hidden;
}

.moon-phase-icon::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    border-radius: 50%;
    background: var(--moon-dark);
}

.moon-phase-icon {
    background: var(--moon-light);
    box-shadow: inset -6px 0 10px rgba(23, 48, 77, 0.08), 0 6px 14px rgba(47, 111, 204, 0.12);
}

.moon-phase-icon.phase-full::after {
    display: none;
}

.moon-phase-icon.phase-full {
    background: #d7e7fb;
    border-color: rgba(47, 111, 204, 0.28);
    box-shadow: inset 0 0 0 1px rgba(47, 111, 204, 0.08), 0 4px 10px rgba(47, 111, 204, 0.16);
}

.moon-phase-icon.phase-new {
    background: var(--moon-dark);
    box-shadow: inset -6px 0 10px rgba(255, 255, 255, 0.05), 0 6px 14px rgba(47, 111, 204, 0.12);
}

.moon-phase-icon.phase-new::after {
    display: none;
}

.moon-phase-icon.phase-waxing-crescent::after {
    left: 38%;
    right: -6%;
}

.moon-phase-icon.phase-first-quarter::after {
    left: 50%;
    right: 0;
    border-radius: 0 50% 50% 0;
}

.moon-phase-icon.phase-waxing-gibbous::after {
    left: 74%;
    right: -8%;
}

.moon-phase-icon.phase-waning-gibbous::after {
    left: -8%;
    right: 74%;
}

.moon-phase-icon.phase-last-quarter::after {
    left: 0;
    right: 50%;
    border-radius: 50% 0 0 50%;
}

.moon-phase-icon.phase-waning-crescent::after {
    left: -6%;
    right: 38%;
}

.season-icon {
    background: #f8fbff;
    box-shadow: 0 6px 14px rgba(47, 111, 204, 0.12);
}

.season-icon::before,
.season-icon::after {
    content: "";
    position: absolute;
}

.season-icon.season-summer {
    background:
        radial-gradient(circle, #ffd76d 0 34%, transparent 35%),
        repeating-conic-gradient(from 0deg, #ffd76d 0 12deg, transparent 12deg 30deg),
        #f8fbff;
}

.season-icon.season-summer::before,
.season-icon.season-summer::after {
    display: none;
}

.season-icon.season-autumn::before {
    width: 1.15rem;
    height: 1.45rem;
    left: .48rem;
    top: .28rem;
    background: linear-gradient(180deg, #f7b95c, #d97a32);
    border-radius: 60% 10% 60% 10%;
    transform: rotate(-28deg);
}

.season-icon.season-autumn::after {
    width: 2px;
    height: .75rem;
    left: 1.12rem;
    top: 1.22rem;
    background: #9f6235;
    transform: rotate(-18deg);
}

.season-icon.season-winter::after {
    inset: .32rem;
    border-radius: 50%;
    background:
        linear-gradient(#78a8e6, #78a8e6) center/2px 100% no-repeat,
        linear-gradient(#78a8e6, #78a8e6) center/100% 2px no-repeat,
        linear-gradient(45deg, transparent 47%, #78a8e6 47% 53%, transparent 53%) center/100% 100% no-repeat,
        linear-gradient(-45deg, transparent 47%, #78a8e6 47% 53%, transparent 53%) center/100% 100% no-repeat;
}

.season-icon.season-winter::before {
    width: .34rem;
    height: .34rem;
    left: calc(50% - .17rem);
    top: calc(50% - .17rem);
    background: #78a8e6;
    border-radius: 50%;
}

.season-icon.season-spring {
    background:
        radial-gradient(circle at 50% 50%, #ffd76d 0 18%, transparent 19%),
        radial-gradient(circle at 50% 18%, #ff8eb3 0 18%, transparent 19%),
        radial-gradient(circle at 82% 50%, #ff8eb3 0 18%, transparent 19%),
        radial-gradient(circle at 50% 82%, #ff8eb3 0 18%, transparent 19%),
        radial-gradient(circle at 18% 50%, #ff8eb3 0 18%, transparent 19%),
        #f8fbff;
}

.season-icon.season-spring::before,
.season-icon.season-spring::after {
    display: none;
}

.section-header {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--fb-border);
}

.month-nav-header {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    gap: 1rem;
}

.month-nav-title {
    text-align: center;
}

.month-nav-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid var(--fb-border);
    background: #f8fbff;
    color: var(--fb-primary);
    font-size: 2rem;
    line-height: 1;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.month-nav-arrow:hover {
    background: #eef5ff;
    border-color: rgba(47, 111, 204, 0.28);
    color: var(--fb-primary-dark);
}

.month-nav-arrow.is-disabled {
    color: #aab7c8;
    background: #f7f9fc;
    border-color: #e4ebf4;
    pointer-events: none;
}

.holiday-tile {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 1rem;
    align-items: center;
    padding: .85rem;
    border: 1px solid var(--fb-border);
    border-radius: 18px;
    background: #fbfdff;
}

.holiday-date {
    text-align: center;
    border-radius: 18px;
    padding: .65rem .45rem;
    background: #eff5fd;
}

.holiday-date strong {
    display: block;
    font-size: 1.5rem;
}

.holiday-date span {
    color: var(--fb-muted);
    font-size: .8rem;
}

.holiday-date-national {
    background: rgba(255, 193, 7, 0.18);
    border: 1px solid rgba(255, 193, 7, 0.45);
}

.holiday-date-optional {
    background: rgba(47, 111, 204, 0.18);
    border: 1px solid rgba(47, 111, 204, 0.4);
}

.holiday-date-important {
    background: #eee;
    border: 1px solid rgba(95, 112, 134, 0.24);
}

.holiday-content-important h3 a {
    color: var(--fb-text);
}

.holiday-content-important h3 a:hover {
    color: var(--fb-text);
}

.commemorative-year-list {
    display: grid;
    gap: 1.5rem;
}

.commemorative-month-group + .commemorative-month-group {
    padding-top: 1.25rem;
    border-top: 1px solid var(--fb-border);
}

.commemorative-month-title {
    margin-bottom: .9rem;
}

.commemorative-month-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: .55rem 1.2rem;
}

.commemorative-line-item {
    min-width: 0;
    font-size: .95rem;
    line-height: 1.35;
}

.commemorative-line-day {
    display: inline-block;
    min-width: 2rem;
    margin-right: .35rem;
    font-weight: 700;
    color: var(--fb-primary);
}

.commemorative-line-item a {
    color: var(--fb-text);
}

.commemorative-line-item a:hover {
    color: var(--fb-primary);
}

.holiday-remaining {
    color: #7e90a6;
    font-size: .9rem;
}

.sidebar-shell {
    display: grid;
    gap: 1rem;
}

.sidebar-card {
    background: var(--fb-sidebar);
}

.sidebar-links {
    display: grid;
    gap: .55rem;
}

.sidebar-card .h5 {
    margin-bottom: .85rem !important;
}

.shortcut-link {
    display: block;
    padding: 0;
    color: rgba(0, 0, 0, 0.8);
    font-size: .9375rem;
    font-weight: 400;
    line-height: 1.45;
}

.shortcut-link:hover {
    color: rgba(0, 0, 0, 0.8);
    text-decoration: underline;
}

.sidebar-event-link {
    display: block;
    color: rgba(0, 0, 0, 0.8);
    font-size: .9375rem;
    line-height: 1.35;
}

.sidebar-event-link:hover {
    color: rgba(0, 0, 0, 0.8);
    text-decoration: underline;
}

.sidebar-event-date {
    display: block;
    margin-bottom: .15rem;
    font-size: .8rem;
    color: var(--fb-muted);
    text-transform: uppercase;
    letter-spacing: .02em;
}

.sidebar-event-title {
    display: block;
}

.month-grid {
    display: grid;
    gap: .4rem;
    min-width: 0;
    overflow: visible;
}

.month-grid-head,
.month-grid-row {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: .4rem;
    min-width: 0;
    overflow: visible;
}

.month-grid-head span {
    text-align: center;
    font-size: .8rem;
    color: var(--fb-muted);
    font-weight: 700;
}

.day-cell {
    min-height: 78px;
    padding: .45rem;
    border-radius: 16px;
    background: #f8fbff;
    border: 1px solid var(--fb-border);
    display: flex;
    flex-direction: column;
    gap: .25rem;
    min-width: 0;
    overflow: visible;
}

.has-tooltip {
    position: relative;
}

.day-cell.has-tooltip:hover,
.day-cell.has-tooltip:focus-within {
    z-index: 30;
}

.day-cell.empty {
    background: transparent;
    border-style: dashed;
    min-height: 72px;
}

.day-cell.has-event.national {
    background: rgba(255, 193, 7, 0.18);
    border-color: rgba(255, 193, 7, 0.5);
    box-shadow: inset 0 0 0 1px rgba(255, 193, 7, 0.16);
}

.day-cell.has-event.national.scope-state {
    background: rgba(214, 83, 79, 0.14);
    border-color: rgba(214, 83, 79, 0.4);
    box-shadow: inset 0 0 0 1px rgba(214, 83, 79, 0.12);
}

.day-cell.has-event.national.scope-city {
    background: rgba(28, 130, 112, 0.14);
    border-color: rgba(28, 130, 112, 0.38);
    box-shadow: inset 0 0 0 1px rgba(28, 130, 112, 0.12);
}

.day-cell.has-event.optional {
    background: rgba(47, 111, 204, 0.18);
    border-color: rgba(47, 111, 204, 0.46);
    box-shadow: inset 0 0 0 1px rgba(47, 111, 204, 0.14);
}

.day-cell-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .35rem;
}

.day-number {
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1;
}

.day-number.is-today {
    color: #c62828;
}

.day-label {
    font-size: .68rem;
    line-height: 1.2;
    color: var(--fb-text);
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-wrap: balance;
}

.day-note {
    font-size: .66rem;
    line-height: 1.2;
    color: var(--fb-muted);
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.moon-phase-icon-calendar {
    width: .95rem;
    height: .95rem;
    flex: 0 0 .95rem;
    box-shadow: none;
    overflow: visible;
}

.calendar-tooltip {
    position: absolute;
    left: 50%;
    z-index: 20;
    max-width: 180px;
    padding: .38rem .55rem;
    border-radius: 10px;
    background: rgba(23, 48, 77, 0.94);
    color: #fff;
    font-size: .72rem;
    line-height: 1.25;
    text-align: center;
    box-shadow: 0 10px 24px rgba(23, 48, 77, 0.22);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 4px);
    transition: opacity .12s ease, transform .12s ease, visibility .12s ease;
    pointer-events: none;
}

.calendar-tooltip::after {
    content: "";
    position: absolute;
    left: 50%;
    width: 8px;
    height: 8px;
    background: rgba(23, 48, 77, 0.94);
    transform: translateX(-50%) rotate(45deg);
}

.tooltip-moon {
    bottom: calc(100% + 8px);
}

.tooltip-moon::after {
    top: calc(100% - 4px);
}

.tooltip-holiday {
    bottom: calc(100% + 10px);
}

.tooltip-holiday::after {
    top: calc(100% - 4px);
}

.has-tooltip:hover > .calendar-tooltip,
.has-tooltip:focus-within > .calendar-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.moon-legend {
    padding-top: 1rem;
}

.moon-legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: .7rem 1rem;
}

.moon-legend-item {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    color: var(--fb-text);
    font-size: .92rem;
    font-weight: 600;
}

.moon-phase-card-layout {
    display: flex;
    align-items: center;
    gap: .8rem;
}

.moon-phase-card-content {
    min-width: 0;
}

.season-card-layout {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
}

.season-card-content {
    min-width: 0;
}

.season-mini-calendar {
    padding: 1.1rem;
}

.season-mini-grid {
    display: grid;
    gap: .35rem;
}

.season-mini-grid-head,
.season-mini-grid-row {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: .35rem;
}

.season-mini-grid-head span {
    text-align: center;
    font-size: .76rem;
    font-weight: 700;
    color: var(--fb-muted);
}

.season-mini-day {
    min-height: 56px;
    padding: .35rem;
    border-radius: 14px;
    border: 1px solid var(--fb-border);
    background: #f8fbff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: .2rem;
}

.season-mini-day.empty {
    background: transparent;
    border-style: dashed;
}

.season-mini-day-number {
    font-size: .9rem;
    font-weight: 700;
    line-height: 1;
}

.season-mini-day .season-icon {
    width: 1.55rem;
    height: 1.55rem;
    flex: 0 0 1.55rem;
}

.season-mini-day.is-start {
    box-shadow: inset 0 0 0 1px rgba(47, 111, 204, 0.12);
}

.calendar-card {
    overflow: visible;
    min-width: 0;
}

.page-intro h1 {
    font-size: clamp(2rem, 2.3vw, 3rem);
    letter-spacing: -0.03em;
}

.article-content h2,
.article-content h3 {
    margin-top: 1.75rem;
}

.article-content > :first-child,
.article-content > section > :first-child {
    margin-top: 0;
}

.article-content h2 {
    font-size: 1.35rem;
    line-height: 1.25;
}

.article-content h3 {
    font-size: 1.1rem;
    line-height: 1.3;
}

.article-shell {
    padding: 1.8rem;
}

.holiday-quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.holiday-quick-card {
    box-shadow: none;
}

.holiday-quick-card .eyebrow {
    margin-bottom: .45rem;
}

.holiday-quick-card h3 {
    margin-bottom: .5rem;
}

.holiday-quick-card p {
    color: var(--fb-text);
    line-height: 1.6;
}

.faq-list {
    display: grid;
    gap: 1rem;
}

.faq-item {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--fb-border);
}

.faq-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.faq-item h3 {
    margin-bottom: .45rem;
}

.faq-item p {
    color: var(--fb-text);
    line-height: 1.65;
}

.article-content p {
    font-size: 1.02rem;
    line-height: 1.8;
    color: var(--fb-text);
}

.article-content p:last-child {
    margin-bottom: 0;
}

@media (min-width: 992px) {
    .article-shell {
        padding: 2.4rem 2.8rem;
    }
}

@media (max-width: 767.98px) {
    .holiday-quick-grid {
        grid-template-columns: 1fr;
    }
}

.related-holiday-link {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    padding: .9rem 1rem;
    border: 1px solid var(--fb-border);
    border-radius: 16px;
    background: #fbfdff;
    color: var(--fb-text);
}

.related-holiday-link span {
    color: var(--fb-muted);
    font-size: .92rem;
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.legend-badge {
    display: inline-flex;
    align-items: center;
    padding: .38rem .68rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 700;
    line-height: 1;
}

.legend-badge-national {
    color: #5f4300;
    background: rgba(255, 193, 7, 0.18);
    border-color: rgba(255, 193, 7, 0.5);
}

.legend-badge-optional {
    color: #17304d;
    background: rgba(47, 111, 204, 0.18);
    border-color: rgba(47, 111, 204, 0.46);
}

.legend-badge-state {
    color: #7a2b28;
    background: rgba(214, 83, 79, 0.14);
    border-color: rgba(214, 83, 79, 0.38);
}

.legend-badge-city {
    color: #165c50;
    background: rgba(28, 130, 112, 0.14);
    border-color: rgba(28, 130, 112, 0.34);
}

.footer-links li + li {
    margin-top: .4rem;
}

.location-directory-block + .location-directory-block {
    margin-top: 1.5rem;
}

.location-directory-state {
    color: var(--fb-text);
    font-weight: 700;
    text-decoration: none;
}

.location-directory-state:hover {
    text-decoration: underline;
}

.location-directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: .55rem 2rem;
}

.location-directory-link {
    color: rgba(23, 48, 77, 0.82);
    text-decoration: none;
    line-height: 1.45;
}

.location-directory-link:hover {
    text-decoration: underline;
}

@media (min-width: 992px) {
    .footer-intro {
        padding-right: 2.5rem;
    }
}

@media (max-width: 991.98px) {
    .day-cell {
        min-height: 72px;
    }
}

@media (max-width: 575.98px) {
    .hero-card,
    .content-card,
    .calendar-card,
    .metric-card,
    .sidebar-card,
    .info-card {
        border-radius: 18px;
    }

    .day-cell {
        min-height: 64px;
        padding: .4rem;
    }

    .day-label {
        -webkit-line-clamp: 1;
    }
}
