/* USA page — production mockup layout */

.usa-page {
  --usa-navy: #13233f;
  --usa-orange: #f08a24;
  --usa-soft: #f4f7fb;
  --usa-chip-success-bg: #e8f7ef;
  --usa-chip-success: #1f8a4c;
  --usa-chip-warn-bg: #fff1e4;
  --usa-chip-warn: #d97706;
  --usa-chip-neutral-bg: #eef2f7;
  --usa-chip-neutral: #475569;
}

.usa-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(220px, 28vw, 320px);
  color: #fff;
  background:
    linear-gradient(90deg, rgba(10, 18, 34, 0.82) 0%, rgba(10, 18, 34, 0.55) 48%, rgba(10, 18, 34, 0.28) 100%),
    linear-gradient(0deg, rgba(19, 35, 63, 0.35), rgba(19, 35, 63, 0.1)),
    var(--usa-hero-image) center / cover no-repeat;
}

.usa-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 42%, rgba(255, 255, 255, 0.08) 58%, transparent 78%),
    repeating-linear-gradient(
      90deg,
      rgba(178, 34, 52, 0.18) 0 12px,
      rgba(255, 255, 255, 0.12) 12px 24px,
      rgba(60, 59, 110, 0.16) 24px 36px
    );
  opacity: 0.35;
  mask-image: linear-gradient(90deg, transparent 35%, #000 70%);
}

.usa-hero__inner {
  position: relative;
  z-index: 1;
  padding: 34px 0 42px;
}

.usa-hero__crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 0.85rem;
  font-weight: 600;
}

.usa-hero__crumbs a {
  color: var(--usa-orange);
  text-decoration: none;
}

.usa-hero__crumbs span {
  color: rgba(255, 255, 255, 0.78);
}

.usa-hero__row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.7fr);
  gap: 28px;
  align-items: end;
}

.usa-hero__copy h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #fff;
}

.usa-hero__copy p {
  margin: 0;
  max-width: 38rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
}

.usa-hero__callout {
  justify-self: end;
  max-width: 280px;
  padding: 18px 18px 16px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.usa-hero__callout p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #fff;
}

.usa-section {
  padding: 28px 0;
}

.usa-section--soft {
  background: color-mix(in srgb, var(--usa-soft) 88%, transparent);
}

.usa-section--sources {
  padding-top: 0;
  padding-bottom: 40px;
}

.usa-section__title {
  margin: 0 0 18px;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--usa-navy);
}

.usa-kpi,
.usa-macro-grid {
  display: grid;
  gap: 16px;
}

.usa-kpi {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: -46px;
  position: relative;
  z-index: 2;
}

.usa-macro-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.usa-card {
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  padding: 18px 18px 16px;
}

:root[data-theme='dark'] .usa-card {
  background: color-mix(in srgb, var(--surface) 96%, transparent);
}

.usa-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.usa-card__icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--usa-orange);
  background: color-mix(in srgb, var(--usa-orange) 12%, transparent);
}

.usa-card__icon svg {
  width: 22px;
  height: 22px;
}

.usa-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  cursor: default;
}

.usa-chip--tip {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.usa-chip__label {
  display: inline-block;
  white-space: nowrap;
}

.usa-chip--success {
  color: var(--usa-chip-success);
  background: var(--usa-chip-success-bg);
}

.usa-chip--warn {
  color: var(--usa-chip-warn);
  background: var(--usa-chip-warn-bg);
}

.usa-chip--neutral {
  color: var(--usa-chip-neutral);
  background: var(--usa-chip-neutral-bg);
}

.usa-status-pop-root {
  position: relative;
  z-index: 80;
}

.usa-status-pop {
  position: fixed;
  z-index: 90;
  width: min(280px, calc(100vw - 24px));
  padding: 12px 14px 10px;
  border-radius: 14px;
  background: #0b1220;
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.45);
  pointer-events: auto;
}

.usa-status-pop[hidden] {
  display: none !important;
}

.usa-status-pop__title {
  display: block;
  margin-bottom: 4px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
}

.usa-status-pop__meta {
  display: block;
  margin-bottom: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #93c5fd;
}

.usa-status-pop__chart {
  display: block;
  width: 100%;
  height: 64px;
  margin: 0 0 6px;
  color: #38bdf8;
  background: rgba(15, 23, 42, 0.65);
  border-radius: 10px;
  padding: 8px 6px;
  box-sizing: border-box;
}

.usa-status-pop__hint {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  color: #94a3b8;
}

.usa-card__title {
  margin: 0 0 8px;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.3;
  color: var(--usa-navy);
}

:root[data-theme='dark'] .usa-card__title,
:root[data-theme='dark'] .usa-section__title,
:root[data-theme='dark'] .usa-panel__head h2,
:root[data-theme='dark'] .usa-news-item__body h3,
:root[data-theme='dark'] .usa-cal-item__body h3 {
  color: var(--text-strong);
}

.usa-card__value {
  margin: 0 0 10px;
  font-size: clamp(1.35rem, 2vw, 1.55rem);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--usa-navy);
}

.usa-card__value--sm {
  font-size: 1.2rem;
}

:root[data-theme='dark'] .usa-card__value {
  color: var(--text-strong);
}

.usa-card__desc {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.usa-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 22px;
  align-items: start;
}

.usa-panel {
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
  border-radius: 20px;
  padding: 18px 18px 10px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

:root[data-theme='dark'] .usa-panel {
  background: color-mix(in srgb, var(--surface) 96%, transparent);
}

.usa-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
}

.usa-panel__head h2 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--usa-navy);
}

.usa-panel__head a {
  color: var(--usa-orange);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.usa-news-item,
.usa-cal-item {
  display: grid;
  gap: 14px;
  align-items: center;
  padding: 14px 4px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
}

.usa-news-item:last-child,
.usa-cal-item:last-child {
  border-bottom: 0;
}

.usa-news-item {
  grid-template-columns: 72px minmax(0, 1fr) 18px;
}

.usa-news-item__thumb {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: #dbe3ef center / cover no-repeat;
}

.usa-news-item__body time {
  display: block;
  margin-bottom: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.usa-news-item__body h3 {
  margin: 0 0 4px;
  font-size: 0.98rem;
  line-height: 1.3;
  color: var(--usa-navy);
}

.usa-news-item__body h3 a {
  color: inherit;
  text-decoration: none;
}

.usa-news-item__body p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.usa-news-item__chevron,
.usa-cal-item__chevron {
  color: color-mix(in srgb, var(--text-muted) 70%, transparent);
  font-size: 1.4rem;
  line-height: 1;
}

.usa-cal-item {
  grid-template-columns: 56px minmax(0, 1fr) 18px;
}

.usa-cal-item__date {
  display: grid;
  place-items: center;
  width: 56px;
  min-height: 56px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--usa-soft) 90%, transparent);
  color: var(--usa-navy);
  text-align: center;
}

.usa-cal-item__date strong {
  font-size: 1.25rem;
  line-height: 1;
}

.usa-cal-item__date span {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.usa-cal-item__body {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-width: 0;
}

.usa-cal-item__icon {
  display: inline-flex;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  margin-top: 2px;
  align-items: center;
  justify-content: center;
  color: var(--usa-orange);
}

.usa-cal-item__icon svg {
  width: 18px;
  height: 18px;
}

.usa-cal-item__body h3 {
  margin: 0 0 4px;
  font-size: 0.98rem;
  color: var(--usa-navy);
}

.usa-cal-item__body p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.usa-empty {
  margin: 0;
  padding: 1.1rem 1.15rem;
  border-radius: 14px;
  border: 1px dashed color-mix(in srgb, CanvasText 18%, transparent);
  background: color-mix(in srgb, var(--usa-soft) 70%, transparent);
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  grid-column: 1 / -1;
}

.usa-sources {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: right;
}

@media (max-width: 1100px) {
  .usa-kpi {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: -28px;
  }

  .usa-macro-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .usa-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .usa-hero__row {
    grid-template-columns: 1fr;
  }

  .usa-hero__callout {
    justify-self: stretch;
    max-width: none;
  }

  .usa-kpi,
  .usa-macro-grid {
    grid-template-columns: 1fr;
    margin-top: 0;
  }

  .usa-hero {
    min-height: 0;
  }

  .usa-hero__inner {
    padding: 24px 0 28px;
  }

  .usa-news-item {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .usa-news-item__chevron,
  .usa-cal-item__chevron {
    display: none;
  }

  .usa-cal-item {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .usa-sources {
    text-align: left;
  }
}
