/* BotXAUUSD — giao diện phẳng, nền trắng, khung #F8FAFD */
:root {
  --bg: #ffffff;
  --panel: #f8fafd;
  --line: #e3e8ef;
  --line-2: #e9edf3;
  --line-3: #d9dfe8;
  --ink: #151922;
  --body: #3d4350;
  --muted: #5b6270;
  --blue: #1f6fb8;
  --blue-line: #2f8bd6;
  --blue-soft: #eaf2fb;
  --green: #1e6b45;
  --green-soft: #e8f3ec;
  --red: #c2412d;
  --gold: #85590f;
  --gold-bg: #fbf6ec;
  --gold-line: #eeddb8;
  --gold-text: #6b4a0e;
  --gold-text-2: #5c4a2a;
  --foot-row: #f1f4f9;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); }
a:hover { color: var(--blue); }
h1, h2, h3, p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.up { color: var(--green); }
.down { color: var(--red); }
.placeholder { color: var(--muted); }
svg { display: block; }

/* ---------- Header ---------- */
.site-header { position: relative; background: var(--panel); border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; gap: 4px 32px; align-items: center; justify-content: space-between;
  padding-top: 10px; padding-bottom: 10px;
}
.logo { text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.logo span { color: var(--gold); }
.nav { display: flex; flex-wrap: wrap; gap: 4px 28px; font-size: 15px; }
.nav a { text-decoration: none; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 16px;
  border-radius: 6px; font-size: 15px; font-weight: 500; text-decoration: none; border: 1px solid transparent;
}
.btn-primary { background: var(--blue); color: #fff; padding: 0 18px; }
.btn-primary:hover { background: #185a96; color: #fff; }
.btn-dark { border-color: var(--ink); color: var(--ink); }
.btn-blue { border-color: var(--blue); color: var(--blue); }
.btn-dark:hover, .btn-blue:hover { background: var(--panel); }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 48px; align-items: start; }
.hero h1 { font-size: 46px; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; max-width: 600px; text-wrap: balance; margin-bottom: 20px; }
.lead { font-size: 18px; line-height: 1.65; color: var(--body); max-width: 540px; margin-bottom: 28px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.callout {
  margin-top: 24px; display: flex; gap: 12px; align-items: flex-start; max-width: 540px; padding: 14px 16px;
  background: var(--gold-bg); border: 1px solid var(--gold-line); border-radius: 8px;
}
.callout strong { display: block; font-size: 15px; font-weight: 600; color: var(--gold-text); }
.callout span { display: block; margin-top: 2px; font-size: 14px; color: var(--gold-text-2); }

.summary { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 28px; }
.summary-top { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: baseline; }
.summary-top b { font-weight: 600; }
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  background: var(--green-soft); color: var(--green); font-size: 12.5px; font-weight: 600;
}
.badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.growth { margin: 20px 0 24px; font-size: 56px; line-height: 1; font-weight: 500; }
.kpis { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; border-top: 1px solid var(--line-2); }
.kpis div { padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.kpis dt { font-size: 13px; color: var(--muted); }
.kpis dd { margin: 2px 0 0; font-size: 20px; }
.updated { margin: 16px 0 4px; font-size: 13px; color: var(--body); display: flex; align-items: center; gap: 6px; }
.updated strong { color: var(--ink); }
.acct { font-size: 13px; color: var(--muted); }
.status { margin-top: 12px; font-size: 13px; color: var(--gold-text); }

/* ---------- Sections ---------- */
.section { padding: 40px 0; }
.section h2 { font-size: 28px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
.section .sub { margin: 4px 0 24px; color: var(--muted); font-size: 15px; max-width: 760px; }
.section-head { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-end; margin-bottom: 24px; }
.section-head .sub { margin-bottom: 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.caption { margin-top: 12px; font-size: 13px; color: var(--muted); }
.caption + .caption { margin-top: 4px; }
.dd-line { color: var(--body); }
.dd-line strong { font-weight: 600; color: var(--ink); }

.tabs { display: inline-flex; border: 1px solid var(--line-3); border-radius: 6px; overflow: hidden; background: #fff; }
.tabs { max-width: 100%; }
.tabs button {
  min-height: 44px; padding: 0 16px; border: 0; background: transparent; color: var(--ink);
  font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap;
}
.tabs button[aria-pressed="true"] { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.chart-card { padding: 24px 24px 12px; }
.chart-card svg { width: 100%; height: auto; }

/* ---------- Risk ---------- */

/* ---------- Bots table ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; min-width: 680px; font-size: 14px; }
.t th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-3); white-space: nowrap; }
.t td { padding: 16px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.t .r { text-align: right; }
.t col.c-bot { width: 28%; }
.t col.c-num { width: 14.4%; }
.t tfoot td { border-bottom: 0; background: var(--foot-row); font-weight: 600; }
.bot { display: flex; align-items: center; gap: 12px; }
.bot-ico { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 6px; background: var(--blue-soft); flex: none; }
.bot b { display: block; font-weight: 600; }
.bot small { display: block; font-size: 12px; color: var(--muted); }
.t small.risk-max { display: block; font-size: 12px; color: var(--muted); }
.notes { margin-top: 20px; }
.notes h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.notes ul { margin: 0; padding-left: 20px; font-size: 14px; color: var(--body); line-height: 1.75; }

/* ---------- 4 việc / 6 câu hỏi ---------- */
.four { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 32px 28px; margin-top: 8px; }
.four > div { border-top: 2px solid var(--ink); padding-top: 16px; }
.four .n, .six .n { font-size: 13px; color: var(--gold); }
.four h3 { margin: 8px 0; font-size: 19px; line-height: 1.35; font-weight: 600; }
.four p, .six p { font-size: 15px; color: var(--body); }
.six { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 28px 32px; }
.six li { display: flex; gap: 16px; }
.six .n { min-width: 22px; padding-top: 3px; }
.six h3 { margin: 0 0 6px; font-size: 17px; line-height: 1.4; font-weight: 600; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; list-style-position: inside; padding: 14px 0; font-size: 17px; font-weight: 600; line-height: 1.4; }
.faq details p { margin: 0 0 16px; font-size: 15px; color: var(--body); }

/* ---------- Quote ---------- */
.quote { padding: 48px 0; text-align: center; }
.quote .label { font-size: 13px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 16px; }
.quote blockquote { margin: 0 auto; max-width: 900px; font-size: 28px; line-height: 1.5; font-weight: 500; letter-spacing: -0.01em; text-wrap: balance; }

/* ---------- Support ---------- */
.support { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 28px 32px; margin-top: 8px; }
.support .ic {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 10px; background: #EAF2FB; margin-bottom: 14px;
}
.support h3 { margin-bottom: 8px; font-size: 18px; line-height: 1.4; font-weight: 600; }
.support p { font-size: 15px; color: var(--body); }

/* ---------- Footer ---------- */
.site-footer { background: var(--panel); border-top: 1px solid var(--line); }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center;
  padding-top: 24px; padding-bottom: 32px; font-size: 13px; color: var(--muted);
}
.site-footer p { max-width: 680px; }
.foot-right { display: flex; align-items: center; gap: 12px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

/* ---------- Menu trượt ngang trên điện thoại / máy tính bảng ---------- */
@media (max-width: 760px) {
  /* Dòng logo cuộn đi, thanh menu dính lại ở đầu màn hình */
  .site-header { position: sticky; top: -52px; z-index: 30; }
  .site-header .wrap { display: block; padding-top: 0; padding-bottom: 0; }
  .logo { display: flex; align-items: center; height: 52px; }
  .nav {
    flex-wrap: nowrap; gap: 4px; margin: 0 -24px; padding: 2px 24px 8px 12px;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(to right, #000 82%, transparent);
            mask-image: linear-gradient(to right, #000 82%, transparent);
  }
  .nav.at-end { -webkit-mask-image: none; mask-image: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; min-height: 40px; padding: 0 12px; border-radius: 8px; gap: 6px; white-space: nowrap; }
  .nav a.active { background: #E6F0FA; color: var(--blue); font-weight: 600; }
  .nav a.active svg { stroke: var(--blue); }
  main section[id] { scroll-margin-top: 64px; }
}

/* ---------- Điện thoại ---------- */
@media (max-width: 359px) {
  .actions .btn svg { display: none; }
}
@media (max-width: 640px) {
  .actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .actions .btn { justify-content: center; min-width: 0; padding: 0 6px; gap: 5px; font-size: 14px; white-space: nowrap; }
  .hero { padding-top: 32px; gap: 32px; }
  .hero h1 { font-size: 34px; }
  .lead { font-size: 16px; }
  .summary { padding: 20px; }
  .growth { font-size: 44px; }
  .section h2 { font-size: 24px; }
  .quote blockquote { font-size: 22px; }
  .chart-card { padding: 16px 12px 8px; }
  .section-head .tabs { width: 100%; }
  .tabs button { flex: 1; padding: 0 4px; font-size: 13px; }
}
