/* ATH v2 — layout from 14112026, Inter only */
.ath-v2 {
  --ath-bg: #07080f;
  --ath-bg2: #0b0d18;
  --ath-bg3: #0e1020;
  --ath-border: #131828;
  --ath-dim: #1a2040;
  --ath-text: #e0e4f0;
  --ath-text2: #8090b0;
  --ath-text3: #4a5880;
  --ath-green: #2dd4a0;
  --ath-red: #e05060;
  --ath-amber: #f59e0b;
  --ath-acc: #f59e0b;
  color: var(--ath-text);
}
.ath-v2 .wrap { max-width: 1440px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.ath-v2 .card {
  background: var(--ath-bg2);
  border: 1px solid var(--ath-border);
  border-radius: 12px;
  box-shadow: 0 2px 20px rgba(0,0,0,.3);
}
.ath-v2 .ch {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 10px; gap: 10px; flex-wrap: wrap;
}
.ath-v2 .ct {
  font-family: var(--font-sans);
  font-size: 12px; font-weight: 700; color: #fff;
  display: flex; align-items: center; gap: 8px;
}
.ath-v2 .ct svg {
  width: 15px; height: 15px; fill: none; stroke-width: 1.5; flex-shrink: 0;
}
.ath-v2 .csub { font-family: var(--font-mono); font-size: 9px; color: var(--ath-text3); }
.ath-v2 .seg {
  display: flex; flex-wrap: wrap; gap: 3px;
  background: var(--ath-bg); border: 1px solid var(--ath-border);
  border-radius: 8px; padding: 3px;
}
.ath-v2 .seg button {
  font-family: var(--font-sans);
  font-size: 9px; font-weight: 700; padding: 5px 10px;
  border-radius: 6px; color: var(--ath-text3);
  background: none; border: none; cursor: pointer; letter-spacing: .02em;
}
.ath-v2 .seg button.on {
  background: #150e00; color: var(--ath-acc);
  box-shadow: inset 0 0 0 1px #3a2a08;
}
.ath-v2 .sample {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ath-amber); background: #1a1205; border: 1px solid #3a2a08;
  border-radius: 5px; padding: 3px 8px;
}
.ath-v2 .hidden { display: none !important; }

/* Hero */
.ath-v2 .hero {
  position: relative; background: var(--ath-bg2); border: 1px solid var(--ath-border);
  border-radius: 14px; padding: 22px 24px 0; overflow: hidden;
}
.ath-v2 .hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 520px 200px at 160px 0, rgba(245,158,11,.08), transparent 70%),
    radial-gradient(ellipse 380px 160px at 100% 100%, rgba(45,212,160,.05), transparent 70%);
}
.ath-v2 .hero-top { position: relative; display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.ath-v2 .eyebrow {
  font-size: 8px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ath-acc); margin-bottom: 6px; display: flex; gap: 8px; align-items: center;
}
.ath-v2 .hero h1 {
  font-family: var(--font-sans);
  font-size: clamp(22px, 3vw, 26px); font-weight: 800; color: #fff;
  letter-spacing: -.02em; line-height: 1.15; margin: 0;
}
.ath-v2 .hero-sub {
  font-size: 12.5px; color: var(--ath-text2); margin-top: 8px; max-width: 540px; line-height: 1.55;
}
.ath-v2 .hero-stats { display: flex; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.ath-v2 .hstat {
  background: var(--ath-bg); border: 1px solid var(--ath-border);
  border-radius: 10px; padding: 10px 14px; min-width: 112px;
}
.ath-v2 .hstat-l { font-size: 9px; color: var(--ath-text3); margin-bottom: 4px; }
.ath-v2 .hstat-v { font-family: var(--font-sans); font-size: 20px; font-weight: 800; color: #fff; line-height: 1; }
.ath-v2 .hstat-s { font-family: var(--font-mono); font-size: 9px; margin-top: 4px; color: var(--ath-text3); }
.ath-v2 .hero-tabs {
  position: relative; display: flex; gap: 4px; margin-top: 20px;
  border-top: 1px solid #0f1222;
}
.ath-v2 .htab {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 16px 12px; font-size: 12px; font-weight: 700;
  color: var(--ath-text3); border: none; border-bottom: 2px solid transparent;
  margin-bottom: -1px; background: none; cursor: pointer; font-family: var(--font-sans);
}
.ath-v2 .htab.on { color: #fff; border-bottom-color: var(--ath-acc); }

.ath-v2 .controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ath-v2 .controls .sp { flex: 1; }

/* Fresh */
.ath-v2 .fresh {
  display: flex; gap: 10px; overflow-x: auto; padding: 2px 18px 16px;
  scroll-snap-type: x mandatory;
}
.ath-v2 .fresh::-webkit-scrollbar { height: 4px; }
.ath-v2 .fresh::-webkit-scrollbar-thumb { background: #1a2840; border-radius: 3px; }
.ath-v2 .fc {
  flex: 0 0 210px; scroll-snap-align: start; text-align: left;
  background: var(--ath-bg); border: 1px solid var(--ath-border);
  border-radius: 10px; padding: 11px 12px; cursor: pointer; position: relative; overflow: hidden;
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.ath-v2 .fc::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: var(--fcol, var(--ath-amber)); opacity: .8;
}
.ath-v2 .fc:hover {
  border-color: #2a3050; transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}
.ath-v2 .fc-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.ath-v2 .fc-n { font-size: 12px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ath-v2 .fc-v { font-size: 17px; font-weight: 800; color: #fff; margin-top: 6px; letter-spacing: -.02em; }
.ath-v2 .fc-s { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 4px; gap: 6px; }
.ath-v2 .fc-d { font-family: var(--font-mono); font-size: 9px; color: var(--ath-text3); line-height: 1.5; }
.ath-v2 .fc-foot {
  margin-top: 6px; display: flex; justify-content: space-between; align-items: center; gap: 6px;
}
.ath-v2 .cpill {
  font-size: 7.5px; font-weight: 700; letter-spacing: .05em; padding: 2px 6px;
  border-radius: 4px; border: 1px solid; white-space: nowrap; flex-shrink: 0;
}
.ath-v2 .badge {
  font-size: 7.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 6px; border-radius: 4px;
}
.ath-v2 .b-hi { background: #081a12; border: 1px solid #1a4030; color: var(--ath-green); }
.ath-v2 .b-lo { background: #200a10; border: 1px solid #4a1420; color: var(--ath-red); }
.ath-v2 .empty {
  padding: 22px 18px 24px; text-align: center; color: var(--ath-text3); font-size: 11.5px; width: 100%;
}

/* Strip */
.ath-v2 .strip { padding: 0 18px 14px; position: relative; }
.ath-v2 .strip svg { width: 100%; display: block; overflow: visible; }
.ath-v2 .tip {
  position: absolute; pointer-events: none; background: rgba(11,13,24,.97);
  border: 1px solid var(--ath-dim); border-radius: 8px; padding: 7px 10px;
  display: none; white-space: nowrap; z-index: 5;
}
.ath-v2 .tip.on { display: block; }
.ath-v2 .tip-n { font-size: 11px; font-weight: 700; color: #fff; }
.ath-v2 .tip-d { font-family: var(--font-mono); font-size: 9px; color: var(--ath-text2); margin-top: 2px; }

/* Table */
.ath-v2 .tbl-wrap { overflow-x: auto; }
.ath-v2 table { width: 100%; border-collapse: collapse; min-width: 980px; }
.ath-v2 thead th {
  font-family: var(--font-sans); font-size: 8px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ath-text3);
  text-align: right; padding: 9px 12px; border-top: 1px solid #0d0f1c; border-bottom: 1px solid #0d0f1c;
  white-space: nowrap; user-select: none; cursor: pointer;
}
.ath-v2 thead th:first-child { text-align: left; padding-left: 18px; }
.ath-v2 thead th.sorted { color: var(--ath-acc); }
.ath-v2 tbody tr { cursor: pointer; transition: background .12s; }
.ath-v2 tbody tr:hover { background: rgba(255,255,255,.018); }
.ath-v2 tbody tr[hidden] { display: none; }
.ath-v2 tbody td {
  padding: 10px 12px; border-bottom: 1px solid #0d0f1c; text-align: right;
  font-family: var(--font-mono); font-size: 11px; color: var(--ath-text); white-space: nowrap;
}
.ath-v2 tbody td:first-child { text-align: left; padding-left: 18px; }
.ath-v2 .as { display: flex; align-items: center; gap: 10px; }
.ath-v2 .as-ic {
  width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center;
  justify-content: center; font-size: 9px; font-weight: 800; flex-shrink: 0; border: 1px solid;
}
.ath-v2 .as-n { font-family: var(--font-sans); font-size: 12px; font-weight: 700; color: #fff; }
.ath-v2 .as-t { font-family: var(--font-mono); font-size: 9px; color: var(--ath-text3); margin-top: 1px; }
.ath-v2 .dist { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.ath-v2 .dist-bar {
  width: 70px; height: 5px; border-radius: 3px; background: var(--ath-bg3); position: relative; overflow: hidden;
}
.ath-v2 .dist-bar i { position: absolute; right: 0; top: 0; bottom: 0; border-radius: 3px; }
.ath-v2 .atrec {
  font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 7px; border-radius: 5px; background: #081a12; color: var(--ath-green); border: 1px solid #1a4030;
}
.ath-v2 .src {
  font-family: var(--font-mono); font-size: 9px; color: var(--ath-text2);
  border: 1px solid var(--ath-border); border-radius: 4px; padding: 2px 6px;
}
.ath-v2 .tfoot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 18px; font-size: 10px; color: var(--ath-text3); flex-wrap: wrap; gap: 8px;
}

/* Drawer */
.ath-v2-scrim {
  position: fixed; inset: 0; background: rgba(3,4,8,.6); backdrop-filter: blur(3px);
  z-index: 50; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.ath-v2-scrim.open { opacity: 1; pointer-events: auto; }
.ath-v2-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(680px, 100vw);
  background: var(--ath-bg2); border-left: 1px solid var(--ath-dim); z-index: 51;
  transform: translateX(100%); transition: transform .25s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; box-shadow: -20px 0 60px rgba(0,0,0,.5);
  font-family: var(--font-sans); color: var(--ath-text);
}
.ath-v2-drawer.open { transform: none; }
.ath-v2-drawer .dr-head {
  display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 14px;
  border-bottom: 1px solid var(--ath-border);
}
.ath-v2-drawer .dr-title { font-size: 20px; font-weight: 800; color: #fff; }
.ath-v2-drawer .dr-sub { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; font-size: 12px; color: var(--ath-text2); }
.ath-v2-drawer .dr-close {
  margin-left: auto; width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--ath-dim); color: var(--ath-text2); background: none; cursor: pointer;
}
.ath-v2-drawer .dr-body { flex: 1; overflow-y: auto; padding: 16px 20px 28px; display: flex; flex-direction: column; gap: 14px; }
.ath-v2-drawer .kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ath-v2-drawer .kpi {
  background: var(--ath-bg); border: 1px solid var(--ath-border); border-radius: 9px; padding: 9px 11px;
}
.ath-v2-drawer .kpi-l { font-size: 8.5px; color: var(--ath-text3); }
.ath-v2-drawer .kpi-v { font-size: 15px; font-weight: 800; color: #fff; margin-top: 3px; }
.ath-v2-drawer .kpi-s { font-family: var(--font-mono); font-size: 8.5px; color: var(--ath-text3); margin-top: 3px; }
.ath-v2-drawer .chart-box {
  background: var(--ath-bg); border: 1px solid var(--ath-border); border-radius: 10px;
  padding: 10px 10px 6px; position: relative;
}
.ath-v2-drawer .chart-tools {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  margin-bottom: 6px; flex-wrap: wrap;
}
.ath-v2-drawer .chart-tools .lbl {
  font-size: 10px; font-weight: 700; color: var(--ath-text2); letter-spacing: .02em;
}
.ath-v2-drawer .cb { position: relative; cursor: crosshair; }
.ath-v2-drawer .cb svg { width: 100%; display: block; }
.ath-v2-drawer .ax { font-family: var(--font-mono); font-size: 8.5px; fill: #3a4868; }
.ath-v2-drawer .axl { font-family: var(--font-mono); font-size: 8.5px; fill: var(--ath-text3); }
.ath-v2-drawer .gl { stroke: #111528; stroke-width: 1; }
.ath-v2-drawer .tip {
  position: absolute; pointer-events: none; display: none; z-index: 5;
  background: rgba(11, 13, 24, .97); border: 1px solid var(--ath-dim);
  border-radius: 8px; padding: 7px 10px; box-shadow: 0 4px 16px rgba(0, 0, 0, .5);
  white-space: nowrap;
}
.ath-v2-drawer .tip-n { font-size: 11px; font-weight: 700; color: #fff; }
.ath-v2-drawer .tip-d { font-family: var(--font-mono); font-size: 9px; color: var(--ath-text2); margin-top: 2px; }
.ath-v2-drawer .src-box {
  background: var(--ath-bg); border: 1px solid var(--ath-border); border-radius: 10px;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 8px;
  font-size: 12px; color: var(--ath-text2); line-height: 1.5;
}
.ath-v2-drawer .src-box .lbl {
  font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ath-text3);
}
.ath-v2-drawer code.ep {
  display: block; font-family: var(--font-mono); font-size: 10px; color: #38bdf8;
  background: #060710; border: 1px solid var(--ath-border); border-radius: 7px;
  padding: 8px 10px; white-space: pre-wrap; word-break: break-all; line-height: 1.5;
}
.ath-v2-drawer .facts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px;
  font-size: 11px; color: var(--ath-text2);
}
.ath-v2-drawer .facts b { color: var(--ath-text); font-weight: 600; }

/* Sources tab */
.ath-v2 .warn {
  display: flex; gap: 10px; align-items: flex-start;
  background: #1a1205; border: 1px solid #3a2a08; border-radius: 10px;
  padding: 11px 14px; font-size: 11px; color: #d8c8a0; line-height: 1.55; margin: 0 18px 16px;
}
.ath-v2 .warn b { color: var(--ath-amber); }
.ath-v2 .s-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px; padding: 0 18px 18px;
}
.ath-v2 .rule {
  background: var(--ath-bg); border: 1px solid var(--ath-border); border-radius: 10px; padding: 13px 14px;
}
.ath-v2 .rule-n { font-size: 10px; font-weight: 800; color: var(--ath-acc); }
.ath-v2 .rule-t { font-size: 12.5px; font-weight: 700; color: #fff; margin: 4px 0 6px; }
.ath-v2 .rule-d { font-size: 11px; color: var(--ath-text2); line-height: 1.55; }
.ath-v2 .pipe { display: flex; gap: 0; padding: 4px 18px 18px; flex-wrap: wrap; }
.ath-v2 .pstep {
  flex: 1 1 150px; position: relative; background: var(--ath-bg);
  border: 1px solid var(--ath-border); border-radius: 10px; padding: 12px 13px;
  margin-right: 18px; margin-bottom: 10px;
}
.ath-v2 .pstep-n { font-family: var(--font-mono); font-size: 9px; color: var(--ath-acc); }
.ath-v2 .pstep-t { font-size: 11.5px; font-weight: 700; color: #fff; margin: 3px 0 4px; }
.ath-v2 .pstep-d { font-size: 10.5px; color: var(--ath-text2); line-height: 1.5; }
.ath-v2 .st td, .ath-v2 .st th {
  white-space: normal; text-align: left; vertical-align: top;
  font-family: var(--font-sans); font-size: 11px; line-height: 1.5;
}
.ath-v2 .st thead th { text-align: left; cursor: default; }
.ath-v2 .st tbody tr { cursor: default; }
.ath-v2 .st td { color: var(--ath-text2); }
.ath-v2 .st td b { color: #fff; font-weight: 600; }

@media (max-width: 1060px) { .ath-v2 .hero-stats { margin-left: 0; } }
@media (max-width: 760px) {
  .ath-v2 .hero { padding: 18px 16px 0; }
  .ath-v2 .hstat { min-width: 0; flex: 1 1 calc(50% - 10px); }
  .ath-v2-drawer .kpis { grid-template-columns: repeat(2, 1fr); }
  .ath-v2 .pstep { margin-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ath-v2 .fc { transition: none; }
  .ath-v2-drawer, .ath-v2-scrim { transition: none; }
}
