@font-face {
    font-family: Inter;
    src: url("./inter.woff2") format("woff2");
    font-weight: 400 700;
    font-display: swap;
}

:root {
    --canvas: #f1f4f9;
    --surface: #fff;
    --ink: #18243a;
    --muted: #4e5f76;
    --nav: #132139;
    --nav-deep: #0c1729;
    --nav-text: #e0ebfa;
    --mint: #a2eddb;
    --accent: #234c9b;
    --selection: #e7efff;
    --weekend: #f3f6fa;
    --rule: #d5deeb;
    --control-border: #78889f;
    --focus: #1d61c7;
    --holiday: #a12742;
    --holiday-bg: #fcebf0;
    --optional: #855007;
    --optional-bg: #fff2d7;
    --observance: #624196;
    --observance-bg: #f1ebfb;
    font-family: Inter, system-ui, sans-serif;
    color: var(--ink);
    background: var(--canvas);
    line-height: 1.5;
}

* { box-sizing: border-box; }
body { display: flex; flex-direction: column; min-height: 100vh; margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .2em; }
.content :is(p, dd, small) a, .day-card a.muted { text-decoration: underline; text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only, .skip:not(:focus) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.skip { position: absolute; z-index: 8; inset: 8px auto auto 12px; padding: 12px; background: var(--surface); }
.wrap { width: min(calc(100% - 24px), 78rem); margin-inline: auto; }
.content { padding-block: clamp(14px, 2.6vw, 38px) 36px; flex: 1; }
.icon { width: 1.125rem; height: 1.125rem; flex: none; vertical-align: middle; }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.035em; text-wrap: pretty; }
h1 { font-size: clamp(1.75rem, 5.3vw, 3.35rem); margin-bottom: 16px; }
h2 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); }
h3 { font-size: .94rem; }
p { margin-block: 0 12px; }
h1, h2, p, dd, li, a { overflow-wrap: anywhere; }
.eyebrow { color: var(--muted); font-size: .75rem; font-weight: 700; }
.context { margin-bottom: 3px; }
.muted, .version, .zone-note { color: var(--muted); }
.demo-banner { margin: 0; padding: 5px 12px; text-align: center; font: 700 .75rem/1.5 system-ui, sans-serif; background: var(--optional-bg); color: var(--optional); }

.masthead { background: var(--nav); color: var(--nav-text); --focus: var(--mint); }
.masthead-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 8px;
    padding-block: 5px 6px;
}
.brand { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: white; font-size: 1.125rem; font-weight: 700; letter-spacing: -.05em; justify-self: start; }
.brand:hover { color: var(--mint); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; background: var(--mint); color: var(--nav-deep); border-radius: 10px; }
.brand-mark .icon { width: 22px; height: 22px; }
.header-search { grid-column: 1/-1; grid-row: 2; display: flex; min-width: 0; }
.masthead .header-search input[type=search] {
    margin: 0;
    border: 1px solid #8091a9;
    border-radius: 10px 0 0 10px;
    min-height: 44px;
    padding-inline: 11px;
    color: white;
    background: #243650;
}
.header-search input::placeholder { color: #d4deec; opacity: 1; }
.header-search button { border-radius: 0 10px 10px 0; background: var(--mint); color: var(--nav-deep); border-color: var(--mint); }
.header-search button:hover { background: #c5f7ea; }
.masthead-nav { background: var(--nav-deep); }
.primary-links, .nav-years, .period-switch, .period-actions { display: flex; align-items: center; }
.primary-links { justify-content: space-between; gap: 2px; font-size: .8rem; }
.primary-links > a, .nav-menu summary, .market-menu summary, .nav-years a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    gap: 5px;
    color: inherit;
    font-weight: 600;
}
.primary-links > a { border-bottom: 2px solid transparent; }
.primary-links > a:is(:hover, [aria-current]), .nav-years a:hover, .masthead summary:hover { color: var(--mint); text-decoration: none; }
.primary-links > a[aria-current] { border-color: var(--mint); }
.primary-links .icon, .market-menu .icon { width: 1rem; height: 1rem; }
.primary-links > :is(.nav-holidays, .nav-observances, .nav-time, .nav-years) { display: none; }
.market-menu, .nav-menu, .period-menu, .event-filter { position: relative; }
.market-menu summary { font-size: .72rem; gap: 4px; }
.market-menu nav, .nav-menu div, .popover-form {
    position: absolute;
    z-index: 5;
    inset: calc(100% + 4px) 0 auto auto;
    width: max-content;
    max-width: min(19rem, calc(100vw - 32px));
    padding: 6px;
    border: 1px solid var(--rule);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 10px 28px #13213924;
    color: var(--ink);
    --focus: #1d61c7;
}
.market-menu nav { max-height: min(65vh, 31rem); overflow-y: auto; }
.market-menu nav a, .nav-menu div a {
    display: flex;
    align-items: center;
    min-height: 44px;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 7px;
}
.market-menu nav a:is(:hover,[aria-current]), .nav-menu div a:hover { background: var(--selection); }

.calendar-heading {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: end;
    gap: 4px 16px;
}
.calendar-heading { margin-bottom: 8px; }
.calendar-heading h1 { margin: 0; }
.calendar-heading--local h1 { font-size: clamp(1.4rem, 3.6vw, 2.5rem); }
.calendar-heading--local h1 span { display: block; font-size: .63em; color: var(--muted); letter-spacing: -.015em; margin-top: 3px; }
.period-switch { gap: 2px; padding: 2px; border-radius: 10px; background: #e1e8f4; }
.period-switch a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding-inline: 7px;
    border-radius: 8px;
    font-size: .8rem;
    font-weight: 700;
}
.period-switch [aria-current], .period-switch a:hover { background: var(--surface); color: var(--accent); text-decoration: none; }
.period-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.period-actions { gap: 4px; }
.control, button {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 9px;
    border: 1px solid var(--control-border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--accent);
    font: 600 .825rem/1.25 Inter, system-ui, sans-serif;
    text-decoration: none;
}
button { color: white; background: var(--accent); border-color: var(--accent); cursor: pointer; }
button:hover { background: #173875; }
.control:is(:hover, :focus-visible), .control--today, .control--active { background: var(--selection); text-decoration: none; }
.period-menu summary > span, .period-menu summary .icon:last-child, .icon-action span, .event-filter summary span { display: none; }
.popover-form { display: grid; gap: 9px; padding: 12px; }
.period-menu .popover-form { min-width: 11rem; }

.event-filter .popover-form { width: min(18rem, calc(100vw - 40px)); }

.agenda, .year-grid, .clock-grid, .tool-grid { display: grid; gap: 12px; align-items: start; }
.calendar-board, .mini-month, .day-card, .form-card, .fact-panel {
    min-width: 0;
    border: 1px solid var(--rule);
    border-radius: 14px;
    background: var(--surface);
}
.calendar-board { overflow: hidden; }
.calendar { width: 100%; table-layout: fixed; border-spacing: 0; background: var(--surface); }
.calendar th { padding: 5px 1px; color: var(--muted); font-size: .72rem; font-weight: 700; text-align: center; }
.calendar th.weekend { text-decoration: underline; text-underline-offset: .24em; }
.calendar-weekday-short { display: none; }
@media (max-width: 480px) {
    .calendar-weekday-wide { display: none; }
    .calendar-weekday-short { display: inline; }
}

.calendar td {
    height: clamp(44px, 6vw, 68px);
    padding: 0;
    vertical-align: top;
    border-top: 1px solid var(--rule);
    font-size: .875rem;
    font-variant-numeric: tabular-nums;
}
.calendar td + td { border-inline-start: 1px solid var(--rule); }
.calendar .empty { background: #fafbfd; }
.calendar .weekend { background: var(--weekend); }
.day-link, .day-mini {
    display: flex;
    height: clamp(44px, 6vw, 68px);
    flex-direction: column;
    align-items: center;
    justify-content: start;
    gap: 2px;
    padding: 4px 1px;
    color: var(--ink);
}
.day-link time, .day-mini time { min-width: 25px; text-align: center; line-height: 24px; font-weight: 600; }
.day-link:hover { background: var(--selection); text-decoration: none; }
.day-link:focus-visible { position: relative; outline-offset: -3px; z-index: 1; }
.calendar .highlight { background: var(--selection); }
.calendar .highlight > a { box-shadow: inset 0 0 0 2px var(--accent); }
.calendar .today time, .legend-today { color: white; background: var(--accent); border-radius: 6px; font-weight: 700; }
.day-marks { display: flex; align-items: center; gap: 2px; min-height: 10px; }
.marker, .category::before { display: inline-block; width: 8px; height: 8px; flex: none; border: 1px solid currentColor; }
.marker--holiday, .category--holiday { color: var(--holiday); }
.marker--optional, .category--optional { color: var(--optional); }
.marker--observance, .category--observance { color: var(--observance); }
.marker--holiday, .category--holiday::before { background: currentColor; border-radius: 50%; }
.marker--optional, .category--optional::before { width: 7px; height: 7px; background: currentColor; transform: rotate(45deg); }
.marker--observance, .category--observance::before { border-width: 2px; }
.legend-today, .legend-weekend { width: 12px; height: 12px; flex: none; border-radius: 3px; }
.legend-weekend { background: var(--weekend); border: 1px solid var(--control-border); text-decoration: none; }
.legend-weekend::after { content: ""; display: block; border-bottom: 1px solid var(--muted); margin: 7px 2px 0; }
.calendar-legend { display: flex; gap: 4px 14px; flex-wrap: wrap; padding: 9px 10px; margin: 0; list-style: none; font-size: .72rem; color: var(--muted); }
.calendar-legend li { display: inline-flex; align-items: center; gap: 5px; }
.calendar-legend .icon { width: 13px; height: 13px; }
.calendar-board .calendar-legend { border-top: 1px solid var(--rule); }
.calendar-board > p.muted { padding: 0 12px; font-size: .875rem; }
.year-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 12px; margin-bottom: 7px; }
.year-strip .calendar-legend { padding-inline: 0; }
.lunar-context { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; font-size: .75rem; font-weight: 600; }
.lunar-context .icon { width: 14px; height: 14px; }
.year-grid { align-items: stretch; }
.mini-month { padding: 8px; }
.mini-month--current { border-color: var(--accent); }
.mini-month h2 { font-size: 1.04rem; letter-spacing: -.025em; }
.mini-month h2 a { min-height: 44px; display: flex; align-items: center; gap: 7px; padding-inline: 3px; color: var(--ink); }
.month-number { padding: 4px 5px; border-radius: 6px; background: var(--selection); color: var(--accent); font-size: .66rem; font-variant-numeric: tabular-nums; }
.mini-month h2 .icon { margin-inline-start: auto; color: var(--accent); width: 14px; height: 14px; }
.calendar--compact th { font-size: .6rem; }
.calendar--compact td { height: 29px; font-size: .75rem; }
.calendar--compact td + td { border-inline-start: 0; }
.day-mini { height: 29px; padding: 0; gap: 0; }
.day-mini time { min-width: 18px; line-height: 18px; }
.day-mini .marker { width: 5px; height: 5px; }
.day-mini .marker--observance { border-width: 1px; }
.day-mini .phase { width: 7px; height: 7px; }
.month-summary, .day-lunar ul { list-style: none; padding: 0; margin: 0; }
.month-summary { border-top: 1px solid var(--rule); margin-top: 5px; padding-top: 3px; font-size: .73rem; }
.month-summary a { display: flex; align-items: center; gap: 5px; min-height: 32px; }
.month-summary time { flex: none; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--muted); }
.projection { color: var(--muted); font-size: .65rem; white-space: nowrap; }
.month-more { font-weight: 600; }
.day-card { padding: clamp(12px, 2vw, 22px); }
.day-card--calendar { scroll-margin: 10px; border-top: 3px solid var(--accent); }
.date-head { display: flex; align-items: center; gap: 10px; }
.date-head h2 { font-size: clamp(1.05rem, 2vw, 1.35rem); }
.date-head .eyebrow { margin-bottom: 4px; }
.date-number { min-width: 48px; padding: 7px 5px; text-align: center; border-radius: 9px; background: var(--selection); color: var(--accent); font-size: 1.55rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.day-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-block: 12px; }
.day-stats div { background: var(--weekend); padding: 7px; border-radius: 8px; }
.day-stats dt, .zone-note { font-size: .75rem; color: var(--muted); }
.day-stats dd { margin: 0; font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.day-stats small { font-size: .7rem; color: var(--muted); }
.day-lunar { border-top: 1px solid var(--rule); padding-top: 8px; margin-top: 8px; }
.day-lunar h3 { margin-bottom: 4px; }
.day-lunar h3 .icon { color: var(--accent); }
.day-lunar a { display: flex; align-items: center; gap: 6px; min-height: 36px; padding-inline: 4px; font-size: .76rem; }
.day-lunar time { margin-inline-start: auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chosen-phase { background: var(--selection); border-radius: 6px; }

.section-block { margin-top: clamp(16px, 2.5vw, 28px); }
.section-block > h2 { margin-bottom: 10px; }
.fact-panel { padding: clamp(12px, 2vw, 22px); }
.fact-panel > p:last-child { margin-bottom: 0; }
.event-list, .phase-list, .search-results { list-style: none; margin: 8px 0; padding: 0; }
.event-list > li, .phase-list > li, .search-results > li { border-top: 1px solid var(--rule); padding: 8px 0; }
.event-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.event-main a { font-weight: 700; }
.event-main time, .event-entry p, .source-link { color: var(--muted); font-size: .82rem; }
.event-main time { background: var(--weekend); padding: 2px 5px; border-radius: 4px; font-variant-numeric: tabular-nums; }
.event-entry p { margin: 4px 0 0; }
.source-link { display: inline-flex; min-height: 36px; align-items: center; text-decoration: underline; text-underline-offset: .2em; }
.category { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 6px; font-size: .74rem; font-weight: 700; overflow-wrap: normal; }
.category::before { content: ""; }
.category--holiday { background: var(--holiday-bg); }
.category--optional { background: var(--optional-bg); }
.category--observance { background: var(--observance-bg); }

.form-card { padding: clamp(14px, 2vw, 22px); display: grid; align-content: start; gap: 12px; }
.form-card > p { margin-block: 0; }
.agenda-dates { list-style: none; margin-block: 12px; padding: 0; }
.agenda-dates > li { border-block-start: 1px solid var(--rule); padding-block: 10px; break-inside: avoid; }
.agenda-dates p { margin-block: 2px 0; }
.agenda-filters summary { align-content: center; min-height: 44px; cursor: pointer; }
label { font-size: .83rem; font-weight: 600; max-width: 100%; }
input:not([type=checkbox], [type=hidden]), select {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    margin-top: 4px;
    padding: 6px 8px;
    border: 1px solid var(--control-border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    font: 1rem Inter, system-ui, sans-serif;
}
fieldset { min-inline-size: 0; margin: 0; border: 1px solid var(--control-border); border-radius: 8px; }
legend { font-size: .83rem; font-weight: 600; }
.weekday-options { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.checkbox { display: inline-flex; align-items: center; min-height: 44px; gap: 8px; }
.checkbox input { accent-color: var(--accent); width: 18px; height: 18px; flex-shrink: 0; }
.period-form, .search-form { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin-block: 12px; }
.search-form label { flex: 1 1 12rem; }
.search-form { max-width: 42rem; }
.period-form label { min-width: 0; }
.related { display: flex; flex-wrap: wrap; gap: 6px; margin-block: 12px; }
.related a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 11px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); font-size: .83rem; font-weight: 600; }
.related a:is(:hover,[aria-current]) { background: var(--selection); }
.tool-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 8px; }
.tool-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 62px;
    padding: 8px;
    border: 1px solid var(--rule);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink);
    font-size: .88rem;
    font-weight: 700;
}
.tool-links a:hover { border-color: var(--accent); }
.tile-icon { display: grid; place-items: center; flex: none; width: 35px; height: 35px; border-radius: 8px; color: var(--accent); background: var(--selection); }
.tile-arrow { margin-inline-start: auto; width: 15px; color: var(--accent); }
.metric { color: var(--accent); font-size: clamp(2rem, 5.5vw, 3.6rem); line-height: 1.1; letter-spacing: -.045em; font-weight: 700; font-variant-numeric: tabular-nums; margin-block: 10px; }
.metric small { font-size: .875rem; letter-spacing: 0; font-weight: 600; }
.result { border-top: 3px solid var(--accent); }
.result h3 { margin: 12px 0 5px; }
.error, .notice { padding: 12px; border-radius: 8px; background: var(--optional-bg); color: var(--optional); }
.error { background: var(--holiday-bg); color: var(--holiday); margin: 0; }
.phase-list, .search-results { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 4px 12px; }
.phase-list > li:first-child, .search-results > li:first-child { border: 0; }
.phase-list li { display: grid; grid-template-columns: 22px 1fr; align-items: center; gap: 2px 8px; }
.phase-list li :is(time, small) { grid-column: 2; }
.phase {
    display: inline-block;
    width: 13px;
    height: 13px;
    flex: none;
    border: 1px solid var(--nav);
    border-radius: 50%;
    background: var(--nav);
}
.phase--full { background: var(--surface); }
.phase--first_quarter { box-shadow: inset 5px 0 var(--surface); }
.phase--last_quarter { box-shadow: inset -5px 0 var(--surface); }
.phase-list .phase { width: 18px; height: 18px; }
.phase-list .phase--first_quarter { box-shadow: inset 8px 0 var(--surface); }
.phase-list .phase--last_quarter { box-shadow: inset -8px 0 var(--surface); }
.day-marks .phase { width: 9px; height: 9px; }
.day-marks .phase--first_quarter { box-shadow: inset 3px 0 var(--surface); }
.day-marks .phase--last_quarter { box-shadow: inset -3px 0 var(--surface); }
.search-results a { display: flex; align-items: center; min-height: 44px; gap: 8px; font-weight: 600; }
.search-results li { padding: 0; }
.search-results a .icon { margin-inline-start: auto; }
.ad-space { min-height: 90px; contain: layout; }
.site-footer { background: var(--surface); border-top: 1px solid var(--rule); }
.footer-inner, .markets { display: flex; flex-wrap: wrap; column-gap: 12px; align-items: center; font-size: .75rem; }
.footer-inner { justify-content: space-between; padding-block: 6px; color: var(--muted); }
.markets a { display: inline-flex; align-items: center; min-height: 44px; }
.markets [aria-current] { font-weight: 700; }

@media (min-width: 380px) {
    .wrap { width: min(calc(100% - 32px), 78rem); }
    .control, button { padding-inline: 11px; }
}
@media (max-width: 520px) {
    .calendar-heading { align-items: center; }
    .calendar-heading > div { flex: 1 1 9rem; }
    .period-switch a { font-size: .72rem; }
    .primary-links > a > .icon { display: none; }
}
@media (min-width: 440px) {
    .year-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 640px) {
    .masthead-inner { grid-template-columns: auto minmax(0, 25rem) auto; justify-content: space-between; gap: 16px; padding-block: 10px; }
    .header-search { grid-column: auto; grid-row: auto; }
    .brand { font-size: 1.4rem; }
    .market-menu summary { font-size: .83rem; }
    .primary-links > .nav-time { display: inline-flex; }
    .period-menu summary > span, .period-menu summary .icon:last-child, .icon-action span, .event-filter summary span { display: inline; }
}
@media (min-width: 768px) {
    .wrap { width: min(calc(100% - 56px), 78rem); }
    .clock-grid, .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .year-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .agenda { grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); gap: 16px; }
    .phase-list li { grid-template-columns: 22px 1fr 1fr 1fr; }
    .phase-list li :is(time, small) { grid-column: auto; }
    .upcoming-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1050px) {
    .primary-links { justify-content: start; gap: clamp(10px, 1.7vw, 25px); }
    .primary-links > :is(.nav-holidays, .nav-observances) { display: inline-flex; }
    .primary-links > .nav-years { display: flex; gap: 4px; margin-inline-start: auto; }
    .nav-years a { padding-inline: 10px; }
    .nav-menu { display: none; }
    .year-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .mini-month { padding: 10px; }
    .agenda { grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr); }
}
@media (forced-colors: active) {
    :focus-visible { outline-color: Highlight; }
    .calendar .highlight > a { box-shadow: none; outline: 2px solid Highlight; outline-offset: -2px; }
    .calendar .today time, .legend-today { border: 2px solid Highlight; }
    .marker, .category::before, .phase { forced-color-adjust: none; color: CanvasText; border-color: CanvasText; }
    .phase { background: CanvasText; }
    .phase--full { background: Canvas; }
    .phase.phase--first_quarter { box-shadow: inset .35em 0 Canvas; }
    .phase.phase--last_quarter { box-shadow: inset -.35em 0 Canvas; }
    .day-marks .phase.phase--first_quarter { box-shadow: inset 3px 0 Canvas; }
    .day-marks .phase.phase--last_quarter { box-shadow: inset -3px 0 Canvas; }
}
.print-only { display: none; }
@media print {
    @page { margin: 10mm; }
    :root { font-family: Arial, sans-serif; background: white; color: black; line-height: 1.35; }
    body { display: block; min-height: 0; }
    .masthead, .skip, .screen-only, .site-footer, .search-form, .period-form { display: none !important; }
    .demo-banner { color: black; background: white; border: 1px solid black; }
    .wrap { width: 100%; }
    .content { padding: 0; min-height: 0; }
    .calendar-heading { display: block; margin-bottom: 6px; }
    h1 { font-size: 24pt; margin: 0; }
    h2 { break-after: avoid; font-size: 15pt; }
    .agenda { display: block; }
    .calendar { print-color-adjust: exact; }
    .calendar td, .day-link { height: 29px; }
    .calendar .highlight > a { outline: 1px solid black; outline-offset: -1px; box-shadow: none; }
    .calendar .today time { border: 1px solid black; color: black; background: white; }
    .calendar--compact td, .day-mini { height: 17px; }
    .day-mini { position: relative; }
    .day-mini .day-marks { position: absolute; inset: auto 1px 0 auto; gap: 1px; }
    .mini-month h2 a { min-height: 0; margin-bottom: 4px; }
    .mini-month { padding: 5px; }
    .year-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
    .year-strip { margin-bottom: 2px; }
    .day-card { padding: 8px; margin-top: 8px; }
    .day-card--calendar {
        display: grid;
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
        align-items: center;
        column-gap: 12px;
    }
    .day-card--calendar .day-stats { margin: 0; }
    .day-card--calendar > p { grid-column: 1 / -1; margin: 4px 0 0; }
    .day-card--calendar .event-list { display: none; }
    .section-block { margin-top: 8px; }
    .fact-panel { padding: 6px; }
    .event-list > li { padding-block: 4px; }
    .event-entry .source-link { min-height: 0; }
    .calendar-facts .event-list { columns: 2; column-gap: 16px; }
    .calendar-facts .event-main { gap: 2px 5px; }
    .calendar-facts .event-entry { font-size: 9pt; }
    .calendar-facts .event-entry p { margin-top: 1px; font-size: 8pt; }
    .calendar-facts .event-entry .source-link { display: none; }
    .calendar-facts--annual .event-list > li:has(.category--observance) { display: none; }
    .print-only { display: block; }
    .version { break-before: avoid; }
    .mini-month, .calendar tr, .day-card, .phase-list li, .event-list li { break-inside: avoid; }
    .day-link, .mini-month h2 a { color: inherit; }
    .category { background: white; color: black; }
}

.short-nav-label { display: none; }
@media (max-width: 639px) {
    .event-filter .popover-form { inset-inline-end: -48px; }
    .full-nav-label { display: none; }
    .short-nav-label { display: inline; }
    .primary-links > a { white-space: nowrap; }
}
@media (max-width: 439px) {
    .period-toolbar:has(.event-filter) [rel] > span { display: none; }
}
@media (max-width: 379px) {
    .content { padding-top: 8px; }
    .calendar-heading { margin-bottom: 5px; column-gap: 8px; }
    .calendar-heading h1 { font-size: clamp(1.25rem, 5.7vw, 1.55rem); line-height: 1.05; }
    .period-actions [rel] > span { display: none; }
    .period-toolbar { margin-bottom: 5px; gap: 1px; }
    .period-actions { gap: 2px; }
    .day-marks { gap: 1px; }
    .header-search input[type=search] { font-size: .875rem; }
}
@media (min-width: 640px) {
    .nav-menu .menu-time { display: none; }
}

.page-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.page-heading h1, .page-heading p { margin: 0; }
.page-heading .tile-icon { width: clamp(36px, 5vw, 56px); height: clamp(36px, 5vw, 56px); }
.page-heading .tile-icon .icon { width: clamp(18px, 3vw, 28px); height: clamp(18px, 3vw, 28px); }
@media print { .page-heading .tile-icon { display: none; } }

.calendar-art-panel {
    display: grid;
    grid-template-columns: minmax(0, 21rem) minmax(0, 1fr);
    align-items: start;
    gap: 1.5rem;
}
.calendar-art-image {
    display: block;
    max-width: 21rem;
    border-radius: .6rem;
    box-shadow: 0 0 0 1px currentColor;
}
.calendar-art-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: inherit;
}
.calendar-art-options p {
    margin-top: 0;
}
.event-evidence {
    display: grid;
    gap: .25rem;
}
.event-evidence dt {
    margin-top: .5rem;
    color: var(--muted);
    font-weight: 650;
}
.event-evidence dd {
    margin: 0;
}
.event-evidence time {
    white-space: nowrap;
}
.calendar-art-links, .calendar-art-more li {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
}
.calendar-art-more {
    margin-top: 1rem;
}
.calendar-art-more summary {
    cursor: pointer;
}
.calendar-art-more ul {
    padding: 0;
    display: grid;
    gap: .75rem;
}
@media (max-width: 640px) {
    .calendar-art-panel {
        grid-template-columns: minmax(0, 1fr);
    }
}

.event-answer {
    margin-block: 1rem;
    padding: clamp(1rem, 4vw, 2rem);
    border-radius: 1rem;
    background: #102634;
    color: #fbfaf5;
}
.event-answer p { margin-block: .4rem .8rem; }
.event-answer .event-answer-date { font-size: clamp(1.3rem, 4vw, 2.3rem); font-weight: 700; }
.event-answer a { color: #bdebd6; text-decoration: underline; }
.event-answer a:focus-visible { outline: 2px solid #bdebd6; outline-offset: 3px; }
.event-actions { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; }
.event-years { width: 100%; border-collapse: collapse; }
.event-years th, .event-years td { text-align: start; padding: .55rem .65rem; border-bottom: 1px solid #9aaba8; }
.event-years th:first-child { white-space: nowrap; }
.event-years td small { display: block; }
.event-years [aria-current="page"] { text-decoration: underline; }
.month-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    gap: .35rem;
    margin-block-start: .5rem;
}
.month-options a { padding: .35rem; }
.event-image img { display: block; width: min(100%, 44rem); height: auto; margin-block-start: .75rem; }
@media print {
    .event-answer { background: white; color: black; border: 1px solid; }
    .event-answer a { color: black; }
    .event-years tr { break-inside: avoid; }
    .content:has(.event-answer) .fact-panel { margin-block: .5rem; }
    .content:has(.event-answer) .fact-panel :is(p, h2) { margin-block: .3rem; }
    .event-answer { margin-block: .4rem; padding: .55rem .7rem; }
    .event-years th, .event-years td { padding: .25rem .4rem; }
    .event-years td small { display: inline; }
    .event-years td small::before { content: " · "; }
}

.event-answer h2 { margin: 0; font-size: 1rem; }
@media screen {
    .content:has(.event-answer) > .fact-panel { margin-block: 1rem; }
    .event-editorial section + section {
        border-block-start: 1px solid #d2dae5;
        margin-block-start: 1.25rem;
        padding-block-start: 1.25rem;
    }
}
.event-editorial p { max-inline-size: 68ch; margin-block: .4rem 0; }
.event-editorial ul { margin-block-end: 0; }
.event-editorial-sources { padding-inline-start: 1.2rem; font-size: .9rem; }
.fact-panel[aria-labelledby="dias-de-carnaval"] .event-years th { white-space: normal; }

.local-next {
    border-inline-start: 3px solid var(--accent);
    margin-block: 12px;
    padding-inline-start: 12px;
}
