#economic-calendar .economic-calendar-frame {
  height: 640px;
  min-height: 640px;
  margin-block: 1rem 3rem;
}
#economic-calendar { min-width: 0; }

/* Themed page: the widget sits right under the h1; loading and failed states (data-state is set by an inline script). */
.ec { margin-block-start: .2rem; }
.ec .economic-calendar-frame { position: relative; block-size: min(640px, 82svh); min-block-size: 440px; margin-block: 0 .8rem; }
.ec #economicCalendarWidget { position: relative; z-index: 1; block-size: calc(100% - 2rem); }
.ec .ecw-copyright { position: relative; z-index: 1; block-size: 2rem; line-height: 2rem; font-size: .8rem; }
.ec .ec-skeleton { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); }
.ec .ec-skeleton span { flex: 1 1 0; max-block-size: 72px; border-radius: 8px; background: linear-gradient(90deg, #e3e9f1 0%, #f4f7fb 50%, #e3e9f1 100%); background-size: 200% 100%; animation: ec-shimmer 1.3s linear infinite; }
@keyframes ec-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .ec .ec-skeleton span { animation: none; } }
html:not(.js) .ec .ec-skeleton, .ec:not([data-state="loading"]) .ec-skeleton { display: none; }
.ec .ec-source { margin-block: 0 .4rem; font-size: .85rem; color: var(--muted); }
.ec .ec-official { margin-block: .8rem 0; }
.ec[data-state="failed"] { display: flex; flex-direction: column; }
.ec[data-state="failed"] .economic-calendar-frame, .ec[data-state="failed"] noscript { display: none; }
.ec[data-state="failed"] .ec-official { order: -1; margin-block: 0 1.2rem; }
.ec[data-state="failed"] .ec-official a { display: flex; align-items: center; justify-content: center; min-block-size: 56px; padding: .8rem 1.2rem; border-radius: 12px; background: var(--navy); color: #fff; font-weight: 800; text-align: center; text-decoration: none; }
.ec[data-state="failed"] .ec-official a:focus-visible { outline-color: var(--gold); }
