/* Economic News page (/economic-news): the Forex Factory economic calendar.
 *
 * Built on theme-dark.css and auth.css (aurora backdrop, gold button, ghost
 * buttons, --auth-* tokens), like /whiteboard and /json-reader. This file adds
 * the hero with the "next high-impact event" card, the time-zone panel, the
 * calendar (week navigation, day tabs, filter chips, day groups with sticky
 * headers, the event table) and the learn/FAQ sections.
 *
 * Responsive: the event table is a real <table> on wider screens (it scrolls
 * inside its own wrapper when narrow) and each row becomes a compact card on
 * phones (below 720px), with the column names from data-label.
 *
 * Motion (nothing under prefers-reduced-motion; transform and opacity only):
 * rows fade/slide in with a short stagger, high-impact badges pulse, the hero
 * motif drifts, the calendar fades while a filter link loads, sections reveal
 * on scroll. Start states apply only after economic-news.js marks <html>
 * (`en-js`, `en-reveal`), so everything is visible without JavaScript. The
 * heading and the intro never animate in.
 */

.en-body {
  --en-max: clamp(64rem, 50rem + 24vw, 86rem);
  --en-surface: rgba(17, 18, 24, 0.82);
  --en-surface-solid: #111218;
  --en-raised: rgba(255, 255, 255, 0.035);
  --en-raised-strong: rgba(255, 255, 255, 0.07);
  --en-radius: var(--auth-radius);
  --en-radius-sm: var(--auth-radius-sm);

  /* Impact colours (always paired with an icon and a text label). */
  --en-high: #ff6b6b;
  --en-high-soft: rgba(255, 107, 107, 0.14);
  --en-medium: #ffa94d;
  --en-medium-soft: rgba(255, 169, 77, 0.14);
  --en-low: #f2d35b;
  --en-low-soft: rgba(242, 211, 91, 0.13);
  --en-holiday: #9fb0cc;
  --en-holiday-soft: rgba(159, 176, 204, 0.14);
  --en-none: #8a8d9b;
  --en-none-soft: rgba(138, 141, 155, 0.12);
  --en-next: var(--auth-gold);
  --en-off-bar: rgba(255, 255, 255, 0.16);
  --en-ease: var(--auth-ease);
}

html:has(.en-body) {
  scroll-padding-top: calc(var(--site-header-height) + 1rem);
}

@media (prefers-reduced-motion: no-preference) {
  html:has(.en-body) {
    scroll-behavior: smooth;
  }
}

.en-main {
  display: block;
  padding-bottom: clamp(3rem, 2rem + 4vw, 6rem);
  overflow-x: clip;
}

.en-container {
  width: 100%;
  max-width: calc(var(--en-max) + 2 * var(--site-header-gutter));
  margin-inline: auto;
  padding-inline: var(--site-header-gutter);
}

/* ----------------------------------------------------------------- Hero */

.en-hero {
  position: relative;
  isolation: isolate;
  padding-block: clamp(1.5rem, 1rem + 3vw, 4rem) clamp(2rem, 1.5rem + 2.5vw, 4rem);
  overflow: hidden;
}

/* Decorative market line behind the hero. */
.en-motif {
  position: absolute;
  inset: auto 0 0 0;
  z-index: -1;
  width: 100%;
  height: 55%;
  opacity: 0.55;
  pointer-events: none;
}

.en-motif__line {
  fill: none;
  stroke: rgba(235, 196, 42, 0.35);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.en-motif__dot {
  fill: var(--auth-gold);
  transform-box: fill-box;
  transform-origin: center;
}

.en-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(1.5rem, 1rem + 2vw, 3rem);
  align-items: center;
}

@media (min-width: 1024px) {
  .en-hero__grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr);
  }
}

.en-hero__copy {
  display: grid;
  justify-items: start;
  gap: clamp(0.8rem, 0.6rem + 0.6vw, 1.25rem);
  min-width: 0;
}

.en-breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--auth-subtle);
  font-size: var(--font-size-xs);
}

.en-breadcrumb__list li + li::before {
  content: "/";
  margin-right: 0.5rem;
  color: var(--auth-line-strong);
}

.en-breadcrumb__list a {
  color: var(--auth-muted);
  text-decoration: none;
}

.en-breadcrumb__list a:hover {
  color: var(--auth-gold);
}

.en-hero__title {
  max-width: 18ch;
  font-family: var(--font-brand);
  font-size: clamp(2rem, 1.2rem + 3vw, 4rem);
  font-weight: var(--font-weight-brand);
  line-height: 1.05;
  letter-spacing: -0.035em;
  background: linear-gradient(100deg, var(--auth-text) 40%, var(--auth-gold-strong) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.en-hero__lead {
  max-width: 42em;
  color: var(--auth-muted);
  font-size: clamp(1rem, 0.92rem + 0.35vw, 1.18rem);
  line-height: 1.65;
}

.en-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.en-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--auth-line);
  border-radius: var(--radius-pill);
  background-color: var(--en-raised);
  color: var(--auth-text);
  font-size: var(--auth-fs-small);
}

.en-chip__icon {
  width: 1rem;
  height: 1rem;
  flex: none;
  color: var(--auth-gold);
}

.en-clock {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.6rem;
  color: var(--auth-subtle);
  font-size: var(--auth-fs-small);
}

.en-clock__value {
  color: var(--auth-text);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: var(--font-weight-semibold);
}

/* The "Next high-impact event" card. */
.en-next {
  position: relative;
  display: grid;
  gap: 0.75rem;
  min-width: 0;
  padding: clamp(1.25rem, 1rem + 1vw, 2rem);
  border: 1px solid var(--auth-line-strong);
  border-radius: var(--en-radius);
  background:
    radial-gradient(120% 90% at 100% 0%, var(--en-high-soft), transparent 60%),
    var(--en-surface);
  box-shadow: 0 40px 80px -50px rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(14px);
}

.en-next__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--en-high);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.en-next__bolt {
  width: 1.05rem;
  height: 1.05rem;
  flex: none;
}

.en-next__title {
  color: var(--auth-text);
  font-size: clamp(1.2rem, 1rem + 0.8vw, 1.6rem);
  font-weight: var(--font-weight-bold);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.en-next__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  color: var(--auth-muted);
  font-size: var(--auth-fs-small);
}

.en-next__countdown {
  display: grid;
  gap: 0.15rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--auth-line);
  border-radius: var(--en-radius-sm);
  background-color: var(--en-raised);
}

.en-next__countdown-label {
  color: var(--auth-subtle);
  font-size: var(--font-size-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.en-next__countdown-value {
  color: var(--auth-gold-strong);
  font-family: var(--font-mono);
  font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  font-variant-numeric: tabular-nums;
  font-weight: var(--font-weight-bold);
}

.en-next__link {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 0.4rem;
  min-height: 44px;
  color: var(--auth-gold);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
}

.en-next__link:hover {
  text-decoration: underline;
}

.en-next__link-icon {
  width: 1rem;
  height: 1rem;
}

.en-next__empty {
  color: var(--auth-muted);
  line-height: 1.6;
}

/* ------------------------------------------------------------ Panels */

.en-content {
  display: grid;
  gap: clamp(2.5rem, 2rem + 2.5vw, 4.5rem);
}

.en-panel {
  padding: clamp(1rem, 0.8rem + 1vw, 1.75rem);
  border: 1px solid var(--auth-line);
  border-radius: var(--en-radius);
  background-color: var(--en-surface);
}

.en-panel__title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--auth-text);
  font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.3rem);
  font-weight: var(--font-weight-bold);
}

.en-panel__icon {
  width: 1.2rem;
  height: 1.2rem;
  color: var(--auth-gold);
}

/* Time zone panel. */
.en-zone {
  display: grid;
  gap: 1rem;
}

.en-zone__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.en-zone__detected {
  color: var(--auth-muted);
  font-size: var(--auth-fs-small);
  overflow-wrap: anywhere;
}

.en-zone__detected strong {
  color: var(--auth-text);
}

.en-zone__fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  align-items: end;
}

@media (min-width: 760px) {
  .en-zone__fields {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto;
  }

  .en-zone__filter[hidden] + .en-zone__select {
    grid-column: 1 / span 2;
  }
}

.en-zone__apply {
  width: auto;
  min-height: 48px;
  padding: 0 1.4rem;
}

.en-zone__hint {
  margin-top: 0.5rem;
  color: var(--auth-subtle);
  font-size: var(--font-size-xs);
}

.en-field {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.en-field__label {
  color: var(--auth-muted);
  font-size: var(--auth-fs-small);
  font-weight: var(--font-weight-semibold);
}

.en-field__input {
  width: 100%;
  min-height: 48px;
  padding: 0 0.9rem;
  border: 1px solid var(--auth-line-strong);
  border-radius: var(--en-radius-sm);
  background-color: var(--auth-field);
  color: var(--auth-text);
  font: inherit;
  font-size: var(--auth-fs-body);
}

.en-field__input:hover {
  background-color: var(--auth-field-hover);
}

.en-field__input:focus-visible {
  outline: 2px solid var(--auth-gold);
  outline-offset: 2px;
}

select.en-field__input option,
select.en-field__input optgroup {
  background-color: var(--en-surface-solid);
  color: var(--auth-text);
}

.en-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.en-quick__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid var(--auth-line);
  border-radius: var(--radius-pill);
  background-color: var(--en-raised);
  color: var(--auth-muted);
  font-size: var(--auth-fs-small);
  text-decoration: none;
  transition: transform var(--transition-fast);
}

.en-quick__link:hover {
  border-color: var(--auth-gold);
  color: var(--auth-text);
  transform: translateY(-1px);
}

.en-quick__link.is-active {
  border-color: var(--auth-gold);
  background-color: var(--auth-gold-soft);
  color: var(--auth-gold-strong);
  font-weight: var(--font-weight-semibold);
}

/* ---------------------------------------------------------- Calendar */

.en-calendar {
  display: grid;
  gap: 1.1rem;
  min-width: 0;
}

.en-calendar__head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.en-calendar__title {
  color: var(--auth-text);
  font-size: var(--auth-fs-title);
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.02em;
}

.en-calendar__week {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
  color: var(--auth-muted);
}

.en-weeknav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.en-weeknav__link {
  text-decoration: none;
}

.en-weeknav__link.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.en-weeknav__icon {
  width: 1.1rem;
  height: 1.1rem;
}

.en-weeknav__now {
  border-color: var(--auth-gold);
  color: var(--auth-gold-strong);
}

.en-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.en-tag--now,
.en-tag--today {
  background-color: var(--auth-gold-soft);
  color: var(--auth-gold-strong);
}

.en-tag--next {
  margin-left: 0.4rem;
  background-color: var(--auth-gold);
  color: var(--color-brand-contrast);
}

/* Day tabs: one row that scrolls sideways on small screens. */
.en-days {
  margin-inline: calc(-1 * var(--site-header-gutter));
  padding-inline: var(--site-header-gutter);
  overflow-x: auto;
  scrollbar-width: thin;
}

.en-days__list {
  display: grid;
  grid-template-columns: repeat(8, minmax(4.75rem, 1fr));
  gap: 0.5rem;
  min-width: max-content;
  margin: 0;
  padding: 0.15rem 0 0.4rem;
  list-style: none;
}

@media (min-width: 900px) {
  .en-days__list {
    min-width: 0;
  }
}

.en-days__tab {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.1rem;
  min-height: 44px;
  padding: 0.55rem 0.5rem;
  border: 1px solid var(--auth-line);
  border-radius: var(--en-radius-sm);
  background-color: var(--en-raised);
  color: var(--auth-muted);
  text-decoration: none;
  transition: transform var(--transition-fast);
}

.en-days__tab:hover {
  border-color: var(--auth-line-strong);
  color: var(--auth-text);
  transform: translateY(-1px);
}

.en-days__tab.is-today {
  border-color: rgba(235, 196, 42, 0.45);
}

.en-days__tab.is-active {
  border-color: var(--auth-gold);
  background-color: var(--auth-gold-soft);
  color: var(--auth-text);
}

.en-days__name {
  font-weight: var(--font-weight-bold);
}

.en-days__date {
  font-size: var(--font-size-xs);
}

.en-days__tab.is-today .en-days__date {
  color: var(--auth-gold-strong);
  font-weight: var(--font-weight-bold);
}

.en-days__count {
  position: absolute;
  top: 0.3rem;
  right: 0.45rem;
  color: var(--auth-subtle);
  font-size: 0.6875rem;
  font-variant-numeric: tabular-nums;
}

/* Filters. */
.en-filters {
  display: grid;
  gap: 0.85rem;
  padding: clamp(0.9rem, 0.7rem + 0.8vw, 1.4rem);
  border: 1px solid var(--auth-line);
  border-radius: var(--en-radius);
  background-color: var(--en-surface);
}

.en-filters__row {
  display: grid;
  gap: 0.5rem;
}

@media (min-width: 900px) {
  .en-filters__row {
    grid-template-columns: 8rem minmax(0, 1fr);
    align-items: center;
  }
}

.en-filters__label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--auth-muted);
  font-size: var(--auth-fs-small);
  font-weight: var(--font-weight-semibold);
}

.en-filters__icon {
  width: 1rem;
  height: 1rem;
  color: var(--auth-gold);
}

.en-chipset {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.en-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0 0.85rem;
  border: 1px solid var(--auth-line);
  border-radius: var(--radius-pill);
  background-color: var(--en-raised);
  color: var(--auth-muted);
  font-size: var(--auth-fs-small);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  transition: transform var(--transition-fast);
}

.en-toggle:hover {
  border-color: var(--auth-line-strong);
  color: var(--auth-text);
  transform: translateY(-1px);
}

.en-toggle:active {
  transform: scale(0.97);
}

/* A selected chip: tinted, with a check mark drawn by CSS. */
.en-toggle.is-on {
  border-color: var(--auth-gold);
  background-color: var(--auth-gold-soft);
  color: var(--auth-text);
}

.en-toggle.is-on::after {
  content: "✓";
  color: var(--auth-gold-strong);
  font-weight: var(--font-weight-bold);
}

.en-toggle__icon {
  width: 1rem;
  height: 1rem;
  flex: none;
}

.en-toggle--high .en-toggle__icon { color: var(--en-high); }
.en-toggle--medium .en-toggle__icon { color: var(--en-medium); }
.en-toggle--low .en-toggle__icon { color: var(--en-low); }
.en-toggle--holiday .en-toggle__icon { color: var(--en-holiday); }
.en-toggle--upcoming .en-toggle__icon { color: var(--auth-gold); }

.en-search__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.en-search__input {
  flex: 1 1 14rem;
  width: auto;
}

.en-search__button {
  min-height: 48px;
}

.en-search__icon {
  width: 1rem;
  height: 1rem;
}

.en-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  color: var(--auth-muted);
  font-size: var(--auth-fs-small);
}

.en-summary__count strong {
  color: var(--auth-text);
}

.en-summary__clear {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  color: var(--auth-gold);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
}

.en-summary__clear:hover {
  text-decoration: underline;
}

.en-summary__clear-icon {
  width: 1rem;
  height: 1rem;
}

/* Results fade while a filter link loads the next page (economic-news.js). */
.en-results {
  display: grid;
  gap: 1.5rem;
  min-width: 0;
  transition: opacity 200ms ease;
}

.en-results.is-leaving {
  opacity: 0.35;
}

/* One day. The heading stays visible below the sticky site header. */
.en-day {
  min-width: 0;
}

.en-day__head {
  position: sticky;
  top: var(--site-header-height);
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--auth-line);
  border-radius: var(--en-radius-sm);
  background-color: var(--en-surface-solid);
  color: var(--auth-text);
  font-size: clamp(0.98rem, 0.92rem + 0.25vw, 1.1rem);
  font-weight: var(--font-weight-bold);
}

.en-day.is-today .en-day__head {
  border-color: rgba(235, 196, 42, 0.5);
  box-shadow: inset 3px 0 0 var(--auth-gold);
}

.en-day.is-past .en-day__label {
  color: var(--auth-muted);
}

.en-day__count {
  margin-left: auto;
  color: var(--auth-subtle);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
}

/* Wide data scrolls inside its own wrapper, never the page. */
.en-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--auth-line);
  border-radius: var(--en-radius-sm);
  background-color: var(--en-surface);
}

.en-table {
  width: 100%;
  min-width: 42rem;
  border-collapse: collapse;
  color: var(--auth-text);
  font-size: var(--auth-fs-small);
}

.en-table thead th {
  padding: 0.6rem 0.65rem;
  border-bottom: 1px solid var(--auth-line);
  color: var(--auth-subtle);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
}

.en-table td,
.en-table tbody th {
  padding: 0.75rem 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-align: left;
  vertical-align: middle;
}

.en-table tbody tr:last-child > * {
  border-bottom: 0;
}

.en-table tbody th {
  font-weight: var(--font-weight-semibold);
  overflow-wrap: anywhere;
}

.en-col-time {
  width: 6.25rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.en-col-ccy { width: 5.75rem; }
.en-col-impact { width: 7.75rem; }
.en-col-title { min-width: 10rem; }
.en-col-num { width: 5.5rem; font-variant-numeric: tabular-nums; }
.en-col-link { width: 5.75rem; text-align: right; }

.en-time-text {
  color: var(--auth-muted);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.en-none {
  color: var(--auth-subtle);
}

.en-row {
  position: relative;
}

.en-row:hover {
  background-color: var(--en-raised);
}

.en-row.is-past > * {
  opacity: 0.5;
}

.en-row.is-next {
  background-color: var(--auth-gold-soft);
  box-shadow: inset 3px 0 0 var(--en-next);
}

/* Currency badge. */
.en-ccy {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem 0.2rem 0.25rem;
  border: 1px solid var(--auth-line);
  border-radius: var(--radius-pill);
  background-color: var(--en-raised);
  color: var(--auth-text);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.en-ccy__sym {
  display: inline-grid;
  place-items: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.2rem;
  border-radius: var(--radius-pill);
  background-color: var(--en-raised-strong);
  color: var(--auth-gold-strong);
  font-size: 0.6875rem;
}

.en-ccy--usd .en-ccy__sym { background-color: rgba(88, 166, 255, 0.2); color: #9cc8ff; }
.en-ccy--eur .en-ccy__sym { background-color: rgba(120, 140, 255, 0.2); color: #b5c0ff; }
.en-ccy--gbp .en-ccy__sym { background-color: rgba(200, 110, 255, 0.2); color: #e0b4ff; }
.en-ccy--jpy .en-ccy__sym { background-color: rgba(255, 110, 130, 0.2); color: #ffb3bf; }
.en-ccy--aud .en-ccy__sym { background-color: rgba(80, 210, 160, 0.2); color: #9ef0cf; }
.en-ccy--nzd .en-ccy__sym { background-color: rgba(60, 200, 210, 0.2); color: #a3eef3; }
.en-ccy--cad .en-ccy__sym { background-color: rgba(255, 120, 90, 0.2); color: #ffbca8; }
.en-ccy--chf .en-ccy__sym { background-color: rgba(255, 90, 90, 0.18); color: #ffb0b0; }
.en-ccy--cny .en-ccy__sym { background-color: rgba(255, 190, 60, 0.2); color: #ffd98f; }

.en-ccy--chip {
  border: 0;
  background: none;
  padding: 0;
}

/* Impact indicator: icon + colour + text. */
.en-impact {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.6rem 0.2rem 0.45rem;
  border-radius: var(--radius-pill);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  white-space: nowrap;
}

.en-impact__icon {
  width: 1rem;
  height: 1rem;
  flex: none;
}

.en-impact__icon .is-on,
.en-toggle__icon .is-on { fill: currentColor; }
.en-impact__icon .is-off,
.en-toggle__icon .is-off { fill: var(--en-off-bar); }

.en-impact--high { background-color: var(--en-high-soft); color: var(--en-high); }
.en-impact--medium { background-color: var(--en-medium-soft); color: var(--en-medium); }
.en-impact--low { background-color: var(--en-low-soft); color: var(--en-low); }
.en-impact--holiday { background-color: var(--en-holiday-soft); color: var(--en-holiday); }
.en-impact--none { background-color: var(--en-none-soft); color: var(--en-none); }

.en-details {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
  min-height: 44px;
  padding: 0 0.25rem;
  color: var(--auth-gold);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  white-space: nowrap;
}

.en-details:hover {
  text-decoration: underline;
}

.en-details__icon {
  width: 0.95rem;
  height: 0.95rem;
}

/* Phones: each event becomes a compact card. */
@media (max-width: 719.98px) {
  .en-table-wrap {
    overflow: visible;
    border: 0;
    background: none;
  }

  .en-table {
    min-width: 0;
  }

  .en-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .en-table,
  .en-table tbody {
    display: block;
  }

  .en-table tbody {
    display: grid;
    gap: 0.6rem;
  }

  .en-table tr {
    display: grid;
    grid-template-columns: auto auto 1fr;
    grid-template-areas:
      "time ccy impact"
      "title title title"
      "forecast previous link";
    align-items: center;
    gap: 0.45rem 0.75rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--auth-line);
    border-radius: var(--en-radius-sm);
    background-color: var(--en-surface);
  }

  .en-table td,
  .en-table tbody th {
    display: block;
    width: auto;
    padding: 0;
    border: 0;
  }

  .en-table tr > .en-col-time { grid-area: time; }
  .en-table tr > .en-col-ccy { grid-area: ccy; }
  .en-table tr > .en-col-impact { grid-area: impact; justify-self: end; }
  .en-table tr > .en-col-title { grid-area: title; font-size: var(--auth-fs-body); }
  .en-table tr > .en-col-forecast { grid-area: forecast; }
  .en-table tr > .en-col-previous { grid-area: previous; }
  .en-table tr > .en-col-link { grid-area: link; justify-self: end; }

  /* The column name above each value (Forecast / Previous). */
  .en-table .en-col-num::before {
    content: attr(data-label);
    display: block;
    color: var(--auth-subtle);
    font-size: 0.6875rem;
    font-weight: var(--font-weight-semibold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .en-row:hover {
    background-color: var(--en-surface);
  }

  .en-row.is-next {
    background-color: var(--auth-gold-soft);
    border-color: var(--auth-gold);
  }
}

/* Empty and error states. */
.en-empty {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  padding: clamp(2rem, 1.5rem + 3vw, 3.5rem) 1.25rem;
  border: 1px dashed var(--auth-line-strong);
  border-radius: var(--en-radius);
  background-color: var(--en-raised);
  text-align: center;
}

.en-empty__icon {
  width: 2.25rem;
  height: 2.25rem;
  color: var(--auth-gold);
}

.en-empty--error .en-empty__icon {
  color: var(--auth-error);
}

.en-empty__title {
  color: var(--auth-text);
  font-size: var(--auth-fs-body);
  font-weight: var(--font-weight-bold);
}

.en-empty__text {
  max-width: 34em;
  color: var(--auth-muted);
  font-size: var(--auth-fs-small);
}

.en-empty__text a,
.en-source a,
.en-prose a {
  color: var(--auth-gold);
}

/* Attribution and disclaimer. */
.en-source {
  display: grid;
  gap: 0.4rem;
  padding-top: 0.5rem;
  color: var(--auth-subtle);
  font-size: var(--font-size-xs);
  line-height: 1.6;
}

.en-source__line time {
  color: var(--auth-muted);
}

.en-source__disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}

.en-source__icon {
  width: 0.95rem;
  height: 0.95rem;
  flex: none;
  margin-top: 0.15rem;
}

/* ---------------------------------------------------- Learn sections */

.en-section {
  display: grid;
  gap: 1.1rem;
  min-width: 0;
}

.en-section__title {
  color: var(--auth-text);
  font-size: var(--auth-fs-title);
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.02em;
}

.en-prose {
  display: grid;
  gap: 0.85rem;
  max-width: 52em;
  color: var(--auth-muted);
  line-height: 1.7;
}

.en-section--split {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 1.25rem;
  padding: clamp(1.25rem, 1rem + 1.5vw, 2.25rem);
  border: 1px solid var(--auth-line);
  border-radius: var(--en-radius);
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(88, 132, 255, 0.12), transparent 60%),
    var(--en-surface);
}

.en-section--split > div {
  display: grid;
  gap: 0.85rem;
}

.en-section__badge {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
  background-color: var(--auth-gold-soft);
  color: var(--auth-gold);
}

.en-section__badge svg {
  width: 1.5rem;
  height: 1.5rem;
}

@media (max-width: 559.98px) {
  .en-section--split {
    grid-template-columns: minmax(0, 1fr);
  }
}

.en-guide {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.en-guide__item {
  display: grid;
  align-content: start;
  gap: 0.6rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--auth-line);
  border-radius: var(--en-radius-sm);
  background-color: var(--en-surface);
}

.en-guide__item--high { box-shadow: inset 0 3px 0 var(--en-high); }
.en-guide__item--medium { box-shadow: inset 0 3px 0 var(--en-medium); }
.en-guide__item--low { box-shadow: inset 0 3px 0 var(--en-low); }
.en-guide__item--holiday { box-shadow: inset 0 3px 0 var(--en-holiday); }

.en-guide__title {
  font-size: var(--auth-fs-body);
}

.en-guide__title .en-impact {
  font-size: var(--auth-fs-small);
}

.en-guide__text {
  color: var(--auth-muted);
  font-size: var(--auth-fs-small);
  line-height: 1.6;
}

.en-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.en-step {
  display: grid;
  align-content: start;
  gap: 0.5rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--auth-line);
  border-radius: var(--en-radius-sm);
  background-color: var(--en-surface);
}

.en-step__number {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--auth-gold-strong), var(--auth-gold));
  color: var(--color-brand-contrast);
  font-weight: var(--font-weight-bold);
}

.en-step__title {
  color: var(--auth-text);
  font-size: var(--auth-fs-body);
  font-weight: var(--font-weight-bold);
}

.en-step__text {
  color: var(--auth-muted);
  font-size: var(--auth-fs-small);
  line-height: 1.6;
}

.en-faq {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 1rem;
}

.en-faq__item {
  display: grid;
  align-content: start;
  gap: 0.5rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--auth-line);
  border-radius: var(--en-radius-sm);
  background-color: var(--en-surface);
}

.en-faq__question {
  color: var(--auth-text);
  font-size: var(--auth-fs-body);
  font-weight: var(--font-weight-bold);
}

.en-faq__answer {
  color: var(--auth-muted);
  font-size: var(--auth-fs-small);
  line-height: 1.65;
}

/* Visible keyboard focus everywhere on the page. */
.en-main a:focus-visible,
.en-main button:focus-visible {
  outline: 2px solid var(--auth-gold);
  outline-offset: 3px;
}

/* ------------------------------------------------------------- Motion */

@media (prefers-reduced-motion: no-preference) {
  .en-motif {
    animation: en-drift 18s ease-in-out infinite alternate;
  }

  .en-motif__dot {
    animation: en-dot 3.2s ease-in-out infinite;
  }

  .en-motif__dot--2 { animation-delay: 1s; }
  .en-motif__dot--3 { animation-delay: 2s; }

  /* A soft ring pulses around high-impact badges. */
  .en-impact--high::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: 0 0 0 1px var(--en-high);
    opacity: 0;
    animation: en-pulse 2.6s ease-out infinite;
    pointer-events: none;
  }

  .en-next__bolt {
    animation: en-bolt 2.6s ease-in-out infinite;
  }

  .en-hero.is-offscreen .en-motif,
  .en-hero.is-offscreen .en-motif__dot,
  .en-hero.is-offscreen .en-next__bolt {
    animation-play-state: paused;
  }

  /* Rows fade and slide in with a short stagger (start state only with JS). */
  .en-js .en-row {
    animation: en-row-in 480ms var(--en-ease) both;
  }

  .en-js .en-row:nth-child(2) { animation-delay: 40ms; }
  .en-js .en-row:nth-child(3) { animation-delay: 80ms; }
  .en-js .en-row:nth-child(4) { animation-delay: 120ms; }
  .en-js .en-row:nth-child(5) { animation-delay: 160ms; }
  .en-js .en-row:nth-child(6) { animation-delay: 200ms; }
  .en-js .en-row:nth-child(7) { animation-delay: 240ms; }
  .en-js .en-row:nth-child(n + 8) { animation-delay: 280ms; }

  .en-js .en-days__tab.is-active,
  .en-js .en-toggle.is-on {
    animation: en-pop 260ms var(--en-ease) both;
  }

  .en-reveal [data-reveal] {
    transition: opacity 650ms var(--en-ease), transform 650ms var(--en-ease);
  }

  .en-reveal [data-reveal]:not(.is-revealed) {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
  }
}

@keyframes en-drift {
  from { transform: translate3d(-2%, 0, 0); }
  to { transform: translate3d(2%, -4%, 0); }
}

@keyframes en-dot {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.8); opacity: 0.35; }
}

@keyframes en-pulse {
  0% { transform: scale(1); opacity: 0.85; }
  70%, 100% { transform: scale(1.35, 1.6); opacity: 0; }
}

@keyframes en-bolt {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.88); }
}

@keyframes en-row-in {
  from { opacity: 0; transform: translate3d(0, 10px, 0); }
  to { opacity: 1; transform: none; }
}

@keyframes en-pop {
  from { transform: scale(0.94); }
  to { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-aurora {
    animation: none;
  }

  .en-results {
    transition: none;
  }
}
