:root {
  --xau-navy: #071a33;
  --xau-navy-soft: #0d2a50;
  --xau-ink: #10233f;
  --xau-muted: #607086;
  --xau-line: #dce4ee;
  --xau-blue: #1769e0;
  --xau-blue-dark: #0f55ba;
  --xau-bg: #f5f7fa;
  --xau-card: #fff;
}

.dnai-xau-route {
  overflow-x: hidden;
  background: var(--xau-bg);
  color: var(--xau-ink);
}

.dnai-xau-page,
.dnai-xau-page main,
.dnai-xau-feed,
.dnai-xau-list { max-width: 100%; min-width: 0; overflow-x: hidden; }

.dnai-xau-route *,
.dnai-xau-route *::before,
.dnai-xau-route *::after { box-sizing: border-box; }

.dnai-xau-shell {
  width: min(calc(100% - 40px), 980px);
  margin-inline: auto;
}

.dnai-xau-hero {
  padding: 22px 0 16px;
  background: var(--xau-navy);
  color: #fff;
}

.dnai-xau-hero__intro { margin-bottom: 14px; }

.dnai-xau-eyebrow {
  margin: 0 0 6px;
  color: #8fc2ff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .12em;
}

.dnai-xau-eyebrow span { margin-inline: 4px; color: #5d8fc8; }

.dnai-xau-hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(29px, 3.5vw, 40px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.025em;
}

.dnai-xau-hero__subtitle {
  margin: 7px 0 0;
  color: #b9cbe0;
  font-size: 14px;
  line-height: 1.35;
}

.dnai-xau-snapshot {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1.15fr;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 12px;
  background: rgba(255,255,255,.055);
}

.dnai-xau-snapshot > div {
  min-width: 0;
  padding: 11px 16px;
  border-right: 1px solid rgba(255,255,255,.11);
}

.dnai-xau-snapshot > div:nth-child(3) { border-right: 0; }
.dnai-xau-snapshot span,
.dnai-xau-snapshot small { display: block; color: #9fb5cf; font-size: 11px; line-height: 1.25; }

.dnai-xau-snapshot strong {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 3px;
  color: #fff;
  font-size: 15px;
  line-height: 1.3;
}

.dnai-xau-snapshot__price strong {
  font-size: clamp(20px, 2.4vw, 27px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  line-height: 1.08;
}

.dnai-xau-market-badge {
  display: inline-flex;
  width: fit-content;
  margin-top: 5px;
  padding: 3px 7px;
  border: 1px solid rgba(134,229,183,.35);
  border-radius: 999px;
  background: rgba(27,157,99,.15);
  color: #9cebc3;
  font-size: 9px;
  font-style: normal;
  font-weight: 850;
  letter-spacing: .06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.dnai-xau-snapshot.is-market-closed { border-color: rgba(240,185,94,.42); }
.dnai-xau-snapshot.is-market-closed .dnai-xau-market-badge { border-color: rgba(240,185,94,.42); background: rgba(240,185,94,.12); color: #ffd994; }

.dnai-xau-snapshot__price b {
  display: block;
  margin-top: 1px;
  color: #88e0ba;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
}

.dnai-xau-snapshot__metric { display: flex; flex-direction: column; justify-content: center; }

.dnai-xau-snapshot > small {
  grid-column: 1 / -1;
  padding: 5px 16px;
  border-top: 1px solid rgba(255,255,255,.09);
  background: rgba(0,0,0,.09);
}

.dnai-xau-snapshot.is-stale { border-color: rgba(240,185,94,.4); }

.dnai-xau-hero__actions {
  display: flex;
  gap: 8px;
  margin-top: 9px;
}

.dnai-xau-weekly-feature {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 9px;
  padding: 9px 12px;
  border: 1px solid rgba(143,194,255,.22);
  border-radius: 9px;
  background: rgba(255,255,255,.045);
}

.dnai-xau-weekly-feature div { display: grid; min-width: 0; gap: 2px; }
.dnai-xau-weekly-feature div span { color: #8fc2ff; font-size: 9px; font-weight: 850; letter-spacing: .08em; }
.dnai-xau-weekly-feature strong { overflow: hidden; color: #fff; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.dnai-xau-weekly-feature a { flex: 0 0 auto; color: #a9d1ff; font-size: 11px; font-weight: 800; text-decoration: none; }

.dnai-xau-hero__actions a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 7px 13px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 7px;
  color: #dbe8f7;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.dnai-xau-hero__actions a:first-child { border-color: #2c79e8; background: var(--xau-blue); color: #fff; }
.dnai-xau-hero__actions a:hover { border-color: #75afff; color: #fff; }
.dnai-xau-hero__actions a:focus-visible,
.dnai-xau-card a:focus-visible,
.dnai-xau-card button:focus-visible,
.dnai-xau-retry:focus-visible { outline: 3px solid #70d7ff; outline-offset: 3px; }

.dnai-xau-feed { padding-block: 28px 84px; }

.dnai-xau-feed__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 19px;
}

.dnai-xau-feed__header p {
  margin: 0 0 3px;
  color: var(--xau-blue);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .12em;
}

.dnai-xau-feed__header h2 {
  margin: 0;
  color: var(--xau-ink);
  font-size: clamp(20px, 2.4vw, 25px);
  line-height: 1.25;
}

.dnai-xau-list { position: relative; }

.dnai-xau-item {
  position: relative;
  padding: 0 0 16px 29px;
}

.dnai-xau-item::before {
  position: absolute;
  top: 12px;
  bottom: -4px;
  left: 7px;
  width: 1px;
  background: #cfd9e5;
  content: "";
}

.dnai-xau-item::after {
  position: absolute;
  top: 19px;
  left: 3px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--xau-bg);
  border-radius: 50%;
  background: var(--xau-blue);
  box-shadow: 0 0 0 1px #adc4df;
  content: "";
}

.dnai-xau-item:last-child::before { bottom: 24px; }

.dnai-xau-card {
  min-width: 0;
  overflow: hidden;
  padding: 19px 21px 17px;
  border: 1px solid var(--xau-line);
  border-radius: 12px;
  background: var(--xau-card);
  box-shadow: 0 3px 13px rgba(19,48,82,.035);
}

.dnai-xau-card__top { display: flex; align-items: center; gap: 9px; }

.dnai-xau-card__top time {
  flex: 0 0 auto;
  color: #41556f;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.dnai-xau-card__badges { display: flex; min-width: 0; flex-wrap: wrap; gap: 5px; }

.dnai-xau-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 5px;
  background: #e9f2ff;
  color: #165cae;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
  text-transform: uppercase;
}

.dnai-xau-badge--breaking_news { background: #fcebed; color: #aa2e3a; }
.dnai-xau-badge--economic_event { background: #fff2d9; color: #8a5b0b; }
.dnai-xau-badge--entry_update,
.dnai-xau-badge--entry_analysis { background: #e6f6ed; color: #167044; }
.dnai-xau-badge--weekly_outlook { background: #f0eafb; color: #69439b; }
.dnai-xau-badge--market_update,
.dnai-xau-badge--daily_summary { background: #edf1f5; color: #4c6078; }
.dnai-xau-badge--trend_change { background: #e7f3f6; color: #24687a; }
.dnai-xau-badge--ai { background: #e8edf4; color: #304964; }

.dnai-xau-card h2 {
  margin: 9px 0 7px;
  font-size: clamp(20px, 2.5vw, 24px);
  line-height: 1.3;
  letter-spacing: -.012em;
}

.dnai-xau-card h2 a { color: var(--xau-ink); text-decoration: none; }
.dnai-xau-card h2 a:hover { color: var(--xau-blue-dark); }

.dnai-xau-card > p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--xau-muted);
  font-size: 15px;
  line-height: 1.58;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.dnai-xau-card__market {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 22px;
  margin-top: 12px;
  padding: 9px 11px;
  border-left: 2px solid #b8cbe1;
  background: #f7f9fc;
  color: var(--xau-muted);
  font-size: 12px;
}

.dnai-xau-card__market strong { color: var(--xau-ink); }

.dnai-xau-card__actions,
.dnai-xau-single__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px 15px;
  margin-top: 13px;
}

.dnai-xau-card__actions a,
.dnai-xau-card__actions button,
.dnai-xau-single__actions a,
.dnai-xau-single__actions button {
  appearance: none;
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 7px 0;
  border: 0;
  background: transparent;
  color: #53667e;
  font: inherit;
  font-size: 12px;
  font-weight: 720;
  text-decoration: none;
  cursor: pointer;
}

.dnai-xau-card__actions a { color: var(--xau-blue-dark); font-weight: 800; }
.dnai-xau-card__actions a span { margin-left: 4px; transition: transform .15s ease; }
.dnai-xau-card__actions a:hover span { transform: translateX(2px); }

.dnai-xau-skeleton { display: grid; gap: 12px; margin-left: 29px; }
.dnai-xau-skeleton[hidden] { display: none; }
.dnai-xau-skeleton span { height: 132px; border-radius: 12px; background: linear-gradient(90deg,#e8edf3 25%,#f6f8fa 37%,#e8edf3 63%); background-size: 400% 100%; animation: xau-shimmer 1.35s infinite; }

.dnai-xau-load-state { padding: 18px; text-align: center; color: var(--xau-muted); }
.dnai-xau-load-state.is-empty { display: grid; justify-items: center; max-width: 560px; margin: 10px auto 0; padding: 32px 20px; border: 1px dashed #cbd7e5; border-radius: 12px; background: #fff; }
.dnai-xau-load-state.is-empty > span { display: grid; width: 34px; height: 34px; place-items: center; margin-bottom: 9px; border-radius: 50%; background: #edf4fd; color: var(--xau-blue); font-size: 20px; }
.dnai-xau-load-state.is-empty strong { color: var(--xau-ink); font-size: 16px; }
.dnai-xau-load-state.is-empty small { max-width: 400px; margin-top: 5px; color: var(--xau-muted); line-height: 1.5; }

.dnai-xau-retry { display: block; min-height: 42px; margin: 0 auto; padding: 9px 15px; border: 0; border-radius: 7px; background: var(--xau-blue); color: #fff; font-weight: 750; }
.dnai-xau-retry[hidden] { display: none; }

.dnai-xau-single { padding: 42px 0 92px; }
.dnai-xau-breadcrumb { display: flex; gap: 8px; margin-bottom: 26px; color: var(--xau-muted); font-size: 13px; }
.dnai-xau-breadcrumb a { color: var(--xau-blue); text-decoration: none; }
.dnai-xau-single header { padding-bottom: 24px; border-bottom: 1px solid var(--xau-line); }
.dnai-xau-single h1 { max-width: 800px; margin: 13px 0; font-size: clamp(29px,5vw,48px); line-height: 1.13; }
.dnai-xau-single__meta { color: var(--xau-muted); }
.dnai-xau-single__content { padding-block: 26px; font-size: 17px; line-height: 1.78; }
.dnai-xau-single__content h2 { margin-top: 34px; font-size: 27px; line-height: 1.25; }
.dnai-xau-single__content h3 { margin-top: 27px; font-size: 21px; }
.dnai-xau-single__content img { max-width: 100%; height: auto; }
.dnai-xau-single__content section { margin: 30px 0; }
.dnai-xau-single__content section > h2,
.dnai-xau-single__content section > h3 { margin: 0 0 14px; }
.dnai-xau-single__content p { max-width: 78ch; margin: 0 0 14px; }
.dnai-xau-single__content ul { margin: 0; padding-left: 22px; }
.dnai-xau-single__content li + li { margin-top: 8px; }
.dnai-xau-analysis__quick { padding: 22px 24px; border: 1px solid #cfe3ea; border-radius: 14px; background: linear-gradient(135deg,#f5fbfc,#eef6fa); }
.dnai-xau-analysis__quick strong { color: #082f49; }
.dnai-xau-analysis__lead { margin: 24px 0 !important; padding-left: 16px; border-left: 4px solid var(--xau-teal); font-size: 18px; }
.dnai-xau-news-impact { margin: 16px 0; padding: 18px 20px; border: 1px solid var(--xau-line); border-radius: 12px; background: #fff; }
.dnai-xau-news-impact h3 { margin: 0 0 12px; font-size: 19px; }
.dnai-xau-analysis__disclaimer { padding: 18px 20px; border-radius: 12px; background: #f7f9fb; color: var(--xau-muted); font-size: 14px; }
.dnai-xau-sources { padding: 18px; border-radius: 12px; background: #eef4fa; }
.dnai-xau-sources h2 { margin-top: 0; font-size: 18px; }
.dnai-xau-sources a { overflow-wrap: anywhere; color: var(--xau-blue); }

@keyframes xau-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

@media (max-width: 720px) {
  .dnai-xau-shell { width: calc(100% - 28px); max-width: calc(100% - 28px); min-width: 0; margin-inline: 14px; }
  .dnai-xau-hero { padding: 14px 0 12px; }
  .dnai-xau-hero__intro { margin-bottom: 9px; }
  .dnai-xau-eyebrow { margin-bottom: 4px; font-size: 9px; }
  .dnai-xau-hero h1 { font-size: clamp(24px, 7vw, 29px); }
  .dnai-xau-hero__subtitle { margin-top: 4px; font-size: 12px; }
  .dnai-xau-hero h1 { overflow-wrap: anywhere; white-space: normal !important; word-break: break-word; }
  .dnai-xau-snapshot { width: 100%; grid-template-columns: minmax(0,1.08fr) minmax(0,.92fr); }
  .dnai-xau-snapshot > div { padding: 9px 11px; }
  .dnai-xau-snapshot__price { grid-row: 1 / 3; }
  .dnai-xau-snapshot__metric { border-right: 0 !important; }
  .dnai-xau-snapshot__metric:nth-child(2) { border-bottom: 1px solid rgba(255,255,255,.09); }
  .dnai-xau-snapshot__price strong { margin-top: 5px; font-size: 20px; }
  .dnai-xau-snapshot__metric strong { font-size: 12px; }
  .dnai-xau-snapshot strong { min-width: 0; white-space: normal !important; word-break: break-word; }
  .dnai-xau-snapshot > small { padding: 5px 11px; font-size: 9px; }
  .dnai-xau-hero__actions { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; margin-top: 9px; }
  .dnai-xau-weekly-feature { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: flex-start; padding: 8px 10px; overflow: hidden; }
  .dnai-xau-weekly-feature strong { max-width: none; min-width: 0; font-size: 11px; white-space: normal !important; word-break: break-word; }
  .dnai-xau-weekly-feature a { max-width: 88px; min-width: 0; padding-top: 10px; font-size: 10px; text-align: right; white-space: normal !important; }
  .dnai-xau-hero__actions a { min-width: 0; min-height: 32px; padding: 6px 4px; font-size: 10px; white-space: nowrap; }
  .dnai-xau-feed { padding-block: 20px calc(130px + env(safe-area-inset-bottom)); }
  .dnai-xau-feed__header { align-items: flex-start; margin-bottom: 14px; }
  .dnai-xau-feed__header h2 { font-size: 19px; }
  .dnai-xau-item { width: auto; max-width: none; min-width: 0; padding: 0 0 12px 19px; }
  .dnai-xau-item::before { left: 4px; }
  .dnai-xau-item::after { left: 0; }
  .dnai-xau-card { width: auto; max-width: 100%; min-width: 0; padding: 15px 15px 12px; border-radius: 10px; }
  .dnai-xau-card h2 { margin-top: 8px; font-size: 20px; }
  .dnai-xau-card h2,
  .dnai-xau-card h2 a { overflow-wrap: anywhere; white-space: normal !important; word-break: break-word; }
  .dnai-xau-card > p { font-size: 15px; line-height: 1.52; -webkit-line-clamp: 3; }
  .dnai-xau-card__market { display: grid; gap: 5px; margin-top: 10px; padding-block: 7px; }
  .dnai-xau-card__actions { gap: 2px 13px; margin-top: 9px; }
  .dnai-xau-card__actions a,
  .dnai-xau-card__actions button { min-height: 42px; font-size: 11px; }
  .dnai-xau-skeleton { margin-left: 19px; }
  .dnai-xau-single { padding-top: 24px; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .dnai-xau-single__content { font-size: 16px; }
  .dnai-xau-analysis__quick,
  .dnai-xau-news-impact { padding: 17px 16px; }
  .dnai-xau-route .dnai-assistant { --dnai-assistant-size: 52px; top: auto !important; bottom: calc(112px + env(safe-area-inset-bottom)) !important; }
}

@media (max-width: 390px) {
  .dnai-xau-shell { width: auto !important; max-width: none; margin-inline: 12px !important; }
  .dnai-xau-hero { padding-top: 16px; }
  .dnai-xau-hero__subtitle { max-width: 330px; }
  .dnai-xau-snapshot > div { padding-inline: 9px; }
  .dnai-xau-card { padding-inline: 13px; }
  .dnai-xau-card__top { align-items: flex-start; }
  .dnai-xau-badge { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .dnai-xau-skeleton span { animation: none; }
  .dnai-xau-hero__actions a,
  .dnai-xau-card__actions a span { transition: none; }
}
