/* ============================================================
   ARISTON — Mission Control · brand-kit edition
   Classical charcoal & gold — the Ariston brand palette:
   charcoal #14110C · basalt #1E1A13 · marble #F3ECDD
   gold #E8C872 · deep gold #C9A24A · silver #C0C6CC
   bronze #B87333 · olive #7A8450 (healthy) · sienna (danger)
   Cards: 12px radius · 1px gold-30% borders · meander on edges
   ============================================================ */

:root {
  --bg0: #14110C;
  --bg1: #1E1A13;
  --bg2: #262014;
  --bg3: #2C251A;
  --line: rgba(201, 162, 74, .30);
  --line-soft: rgba(201, 162, 74, .13);
  --gold: #E8C872;         /* brand gold — the accent */
  --gold-dim: rgba(232, 200, 114, .10);
  --deep: #C9A24A;         /* deep gold — rules, meander */
  --deep-dim: rgba(201, 162, 74, .12);
  --silver: #C0C6CC;
  --silver-dim: rgba(192, 198, 204, .10);
  --bronze: #B87333;
  --bronze-dim: rgba(184, 115, 51, .12);
  --olive: #7A8450;
  --olive-dim: rgba(122, 132, 80, .16);
  --red: #C0654A;          /* muted sienna — the one danger tone */
  --red-dim: rgba(192, 101, 74, .12);
  --txt: #F3ECDD;
  --txt2: #B3A379;
  --txt3: #83734F;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --display: "Cinzel", "Times New Roman", serif;
  --sans-fa: "Vazirmatn", "Inter", system-ui, sans-serif;
  --sans-en: "Inter", "Vazirmatn", system-ui, sans-serif;
  --r-lg: 12px;
  --r-md: 12px;
  --r-sm: 8px;
  --tr-fast: 140ms cubic-bezier(.4, 0, .2, 1);
  --tr-base: 240ms cubic-bezier(.22, .61, .36, 1);
  --shadow-panel: 0 18px 50px -28px rgba(0, 0, 0, .8);
  /* legacy aliases (kept so utility classes stay meaningful) */
  --mint: var(--gold);
  --mint-dim: var(--gold-dim);
  --sky: var(--silver);
  --sky-dim: var(--silver-dim);
  --amber: var(--bronze);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; color-scheme: dark; }
html[dir="rtl"] body { font-family: var(--sans-fa); }
html[dir="ltr"] body { font-family: var(--sans-en); }

body {
  background: var(--bg0);
  color: var(--txt);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

.mono { font-family: var(--mono); font-feature-settings: "tnum" 1; letter-spacing: -0.01em; }
.accent { color: var(--gold); font-size: .62em; letter-spacing: .04em; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input { font: inherit; }
:focus-visible { outline: 2px solid rgba(232, 200, 114, .55); outline-offset: 2px; border-radius: 4px; }
::selection { background: rgba(232, 200, 114, .26); }

/* ---------------- ambient background ---------------- */
.bg-fx { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg-glow { position: absolute; width: 60vw; height: 60vw; max-width: 900px; max-height: 900px; border-radius: 50%; filter: blur(90px); opacity: .5; }
.bg-glow--mint { top: -22vw; inset-inline-start: -12vw; background: radial-gradient(circle, rgba(232, 200, 114, .07), transparent 62%); }
.bg-glow--sky { bottom: -28vw; inset-inline-end: -14vw; background: radial-gradient(circle, rgba(122, 132, 80, .08), transparent 62%); }
.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(201, 162, 74, .10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 162, 74, .10) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, black 0%, transparent 78%);
}
.bg-noise {
  position: absolute; inset: 0; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

/* ---------------- nav ---------------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  background: rgba(20, 17, 12, .78);
  border-bottom: 1px solid var(--line-soft);
}
/* the meander — brand rule: only on a top or bottom edge */
.nav::after {
  content: ""; position: absolute; inset-inline: 0; bottom: -6px; height: 6px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='14' viewBox='0 0 20 14'%3E%3Cpath d='M0 14V0H14V10H5V5H9' fill='none' stroke='%23C9A24A' stroke-width='2'/%3E%3C/svg%3E");
  background-size: 15px 10.5px;
  background-repeat: repeat-x;
  opacity: .38;
  pointer-events: none;
}
.nav__inner {
  max-width: 1220px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 18px; height: 62px;
}
.brand { display: flex; align-items: baseline; gap: 9px; }
.brand__mark { width: 27px; height: 27px; align-self: center; }
.brand__name {
  font-family: var(--display); font-weight: 600; font-size: 17.5px;
  letter-spacing: .3em; color: var(--txt); text-transform: uppercase;
}
.brand__sub { font-family: var(--mono); font-size: 8.5px; letter-spacing: .3em; color: var(--txt3); font-weight: 600; }
.nav__links { display: flex; gap: 4px; margin-inline-start: 8px; }
.nav__links a {
  font-size: 13px; color: var(--txt2); padding: 7px 11px; border-radius: var(--r-sm);
  transition: color var(--tr-fast), background var(--tr-fast);
}
.nav__links a:hover { color: var(--gold); background: var(--gold-dim); }
.nav__tools { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }
.live-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .14em;
  color: var(--gold); background: var(--gold-dim); border: 1px solid rgba(232, 200, 114, .3);
  padding: 5px 11px; border-radius: 999px;
}
.live-pill__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--olive); box-shadow: 0 0 0 0 rgba(122, 132, 80, .5); animation: ping 2.2s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(122, 132, 80, .55); } 75% { box-shadow: 0 0 0 9px rgba(122, 132, 80, 0); } 100% { box-shadow: 0 0 0 0 rgba(122, 132, 80, 0); } }
.live-pill__time { color: var(--txt2); font-weight: 500; letter-spacing: 0; }
.countdown-chip {
  font-size: 11px; font-weight: 700; color: var(--silver);
  background: var(--silver-dim); border: 1px solid rgba(192, 198, 204, .3);
  padding: 5px 10px; border-radius: 999px; letter-spacing: .06em;
}
.lang-btn {
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .1em;
  color: var(--txt2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px;
  transition: all var(--tr-fast);
}
.lang-btn:hover { color: var(--gold); border-color: rgba(232, 200, 114, .45); }
.gh-btn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); color: var(--txt2); transition: all var(--tr-fast); }
.gh-btn svg { width: 16px; height: 16px; }
.gh-btn:hover { color: var(--txt); border-color: var(--txt3); transform: translateY(-1px); }

/* ---------------- hero ---------------- */
.hero { max-width: 1220px; margin: 0 auto; padding: 72px 20px 30px; }
.hero__kicker { font-size: 11px; letter-spacing: .22em; color: var(--gold); margin-bottom: 18px; font-weight: 600; }
.hero__title {
  font-size: clamp(1.9rem, 4.6vw, 3.35rem); font-weight: 800; line-height: 1.32; letter-spacing: -0.01em;
  max-width: 21ch;
}
html[dir="ltr"] .hero__title { font-family: var(--display); font-weight: 600; line-height: 1.14; letter-spacing: .01em; }
.hero__title em { font-style: normal; color: var(--gold); }
.hero__desc { color: var(--txt2); max-width: 62ch; margin-top: 16px; font-size: 15.5px; }

.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 38px; }
.kpi {
  position: relative; overflow: hidden;
  background: var(--bg1);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px 22px 16px; box-shadow: var(--shadow-panel);
  transition: border-color var(--tr-base), transform var(--tr-base), box-shadow var(--tr-base);
}
.kpi::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(240px 130px at var(--mx, 50%) var(--my, -20%), rgba(232, 200, 114, .06), transparent 70%);
  opacity: 0; transition: opacity var(--tr-base);
}
.kpi:hover { transform: translateY(-3px); border-color: rgba(232, 200, 114, .5); }
.kpi:hover::after { opacity: 1; }
.kpi__label { font-size: 11.5px; font-weight: 600; color: var(--txt2); letter-spacing: .05em; }
.kpi__value {
  font-family: var(--display); font-size: clamp(2rem, 3.2vw, 2.9rem); font-weight: 600;
  color: var(--txt); line-height: 1.15; margin-top: 6px; font-variant-numeric: tabular-nums;
  background: linear-gradient(160deg, #FBF4E4 15%, #E4D5AC 85%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.kpi__foot { font-size: 10.5px; color: var(--txt3); margin-top: 4px; letter-spacing: .04em; }
.kpi--gold { border-color: rgba(201, 162, 74, .5); }
.kpi--gold .kpi__value {
  background: linear-gradient(160deg, #F4DEA6 10%, var(--deep) 90%);
  -webkit-background-clip: text; background-clip: text;
}
.kpi--gold::after { background: radial-gradient(240px 130px at var(--mx, 50%) var(--my, -20%), rgba(201, 162, 74, .1), transparent 70%); }

/* ticker */
.ticker { margin-top: 26px; border-block: 1px solid var(--line-soft); overflow: hidden; padding: 9px 0; }
.ticker__track { display: flex; gap: 56px; width: max-content; animation: marquee 46s linear infinite; font-size: 11.5px; color: var(--txt3); letter-spacing: .05em; white-space: nowrap; }
.ticker__track b { color: var(--gold); font-weight: 600; }
.ticker__track i { color: var(--txt2); font-style: normal; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
html[dir="rtl"] .ticker__track { animation-name: marquee-rtl; }
@keyframes marquee-rtl { from { transform: translateX(0); } to { transform: translateX(50%); } }

/* ---------------- sections ---------------- */
.section { max-width: 1220px; margin: 0 auto; padding: 64px 20px 6px; scroll-margin-top: 76px; }
.section--last { padding-bottom: 90px; }
.section__head { margin-bottom: 24px; }
.section__title { font-size: clamp(1.35rem, 2.4vw, 1.8rem); font-weight: 800; letter-spacing: -0.01em; }
html[dir="ltr"] .section__title { font-family: var(--display); font-weight: 600; letter-spacing: .02em; }
.section__desc { color: var(--txt2); font-size: 14.5px; margin-top: 8px; max-width: 72ch; }

.panel {
  background: var(--bg1);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 22px; box-shadow: var(--shadow-panel);
  position: relative;
}
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--line-soft); }
.panel__title { font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--txt2); text-transform: uppercase; }
html[dir="rtl"] .panel__title { letter-spacing: .02em; font-size: 13px; }
.panel__chip { font-size: 11px; color: var(--txt3); }

/* ---------------- pipeline ---------------- */
.pipeline-panel { padding: 26px; overflow: hidden; }
.pipeline { position: relative; height: 250px; border-radius: var(--r-md); background: rgba(20, 17, 12, .55); border: 1px solid var(--line-soft); }
.pipeline canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pipeline__stages { position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: center; padding: 0 3%; }
.pstage { position: relative; text-align: center; width: 15%; }
.pstage__node {
  width: 15px; height: 15px; border-radius: 50%; margin: 0 auto;
  background: var(--bg0); border: 2px solid var(--silver);
  box-shadow: 0 0 0 3px rgba(192, 198, 204, .08);
  transition: transform var(--tr-fast), box-shadow var(--tr-fast);
}
.pstage--end .pstage__node { background: var(--deep); border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232, 200, 114, .14); }
.pstage:hover .pstage__node { transform: scale(1.35); }
.pstage__val { font-family: var(--display); font-weight: 600; font-size: clamp(.95rem, 1.7vw, 1.5rem); color: var(--txt); margin-top: 9px; letter-spacing: .01em; }
.pstage--end .pstage__val { color: var(--gold); }
.pstage__label { font-size: 10.5px; color: var(--txt2); margin-top: 3px; }
.pstage__tip {
  position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(4px);
  background: var(--bg3); border: 1px solid var(--line); border-radius: var(--r-sm);
  font-family: var(--mono); font-size: 10.5px; color: var(--txt2);
  padding: 8px 11px; white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity var(--tr-fast), transform var(--tr-fast); z-index: 5;
}
.pstage:hover .pstage__tip { opacity: 1; transform: translateX(-50%) translateY(0); }
.pipeline__legend { margin-top: 14px; font-size: 10.5px; color: var(--txt3); letter-spacing: .06em; display: flex; gap: 22px; flex-wrap: wrap; }
.pipeline__legend b { color: var(--gold); font-weight: 600; }

/* ---------------- bento ---------------- */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.bento__donut { grid-column: span 5; }
.bento__bars { grid-column: span 7; }
.bento__latency { grid-column: span 7; }
.bento__engines { grid-column: span 5; }

.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
#donutSvg { width: 178px; height: 178px; flex-shrink: 0; transform: rotate(-90deg); }
#donutSvg circle { transition: stroke-dashoffset .9s cubic-bezier(.22, .61, .36, 1); }
.donut-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 18px; flex: 1; min-width: 190px; }
.donut-legend__item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--txt2); }
.donut-legend__sw { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.donut-legend__v { margin-inline-start: auto; font-family: var(--mono); font-size: 12px; color: var(--txt); font-weight: 600; }

.hbars { display: grid; gap: 11px; }
.hbar { display: grid; grid-template-columns: 74px 1fr 64px; align-items: center; gap: 12px; }
.hbar__label { font-family: var(--mono); font-size: 12px; color: var(--txt2); font-weight: 600; }
.hbar__track { height: 8px; background: var(--bg0); border-radius: 999px; overflow: hidden; border: 1px solid var(--line-soft); }
.hbar__fill { height: 100%; border-radius: 999px; width: 0; transition: width .9s cubic-bezier(.22, .61, .36, 1); }
.hbar__val { font-family: var(--mono); font-size: 12.5px; color: var(--txt); font-weight: 700; text-align: end; }

.gauge-row { display: flex; gap: 26px; justify-content: space-around; padding: 8px 0 14px; }
.gauge { text-align: center; }
.gauge svg { width: 128px; height: 80px; }
.gauge__val { font-family: var(--display); font-size: 21px; font-weight: 600; color: var(--gold); margin-top: -46px; position: relative; }
.gauge__label { font-family: var(--mono); font-size: 10px; color: var(--txt3); letter-spacing: .18em; margin-top: 26px; }
.mini-rows { display: grid; gap: 7px; }
.mini-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--txt2); border-top: 1px dashed var(--line-soft); padding-top: 7px; }
.mini-row b { font-family: var(--mono); color: var(--txt); font-weight: 600; }

.engine-rows { display: grid; gap: 12px; }
.engine-row { display: flex; align-items: center; gap: 12px; }
.engine-row__name { font-family: var(--mono); font-size: 12px; color: var(--txt2); width: 86px; font-weight: 600; }
.engine-row__track { flex: 1; height: 9px; background: var(--bg0); border: 1px solid var(--line-soft); border-radius: 999px; overflow: hidden; }
.engine-row__fill { height: 100%; border-radius: 999px; width: 0; transition: width .9s cubic-bezier(.22, .61, .36, 1); }
.engine-row__val { font-family: var(--mono); font-size: 12.5px; font-weight: 700; }
.engine-note { margin-top: 14px; font-size: 12px; color: var(--txt3); }

/* ---------------- ISP cards ---------------- */
.isp-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.isp {
  background: var(--bg1);
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 15px 14px;
  transition: transform var(--tr-base), border-color var(--tr-base), box-shadow var(--tr-base);
  position: relative; overflow: hidden;
}
.isp:hover { transform: translateY(-3px); border-color: rgba(192, 198, 204, .5); box-shadow: 0 14px 34px -20px rgba(0, 0, 0, .7); }
.isp__fa { font-weight: 800; font-size: 15.5px; }
.isp__en { font-family: var(--mono); font-size: 10px; color: var(--txt3); letter-spacing: .12em; margin-top: 2px; }
.isp__val { font-family: var(--display); font-size: 26px; font-weight: 600; color: var(--silver); margin-top: 10px; }
.isp__actions { display: flex; gap: 6px; margin-top: 10px; }
.isp__btn {
  font-size: 11px; color: var(--txt2); border: 1px solid var(--line); border-radius: 6px;
  padding: 5px 9px; transition: all var(--tr-fast); display: inline-flex; align-items: center; gap: 5px;
}
.isp__btn svg { width: 12px; height: 12px; }
.isp__btn:hover { color: var(--gold); border-color: rgba(232, 200, 114, .5); background: var(--gold-dim); }

/* ---------------- import ---------------- */
.import-panel { padding: 24px; }
.tier-select { display: flex; flex-wrap: wrap; gap: 8px; }
.tier-chip {
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .04em;
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); color: var(--txt2);
  transition: all var(--tr-fast); display: inline-flex; align-items: center; gap: 7px;
}
.tier-chip__sw { width: 8px; height: 8px; border-radius: 50%; background: var(--txt3); }
.tier-chip:hover { color: var(--txt); border-color: var(--txt3); }
.tier-chip.is-active { color: var(--silver); border-color: rgba(192, 198, 204, .55); background: var(--silver-dim); }
.tier-chip.is-active .tier-chip__sw { background: var(--silver); }
.tier-chip.is-gold.is-active { color: var(--gold); border-color: rgba(232, 200, 114, .6); background: var(--gold-dim); }
.tier-chip.is-gold.is-active .tier-chip__sw { background: var(--gold); }
.target-line {
  margin: 15px 0 19px; font-size: 11px; color: var(--txt3); letter-spacing: .02em;
  background: rgba(20, 17, 12, .6); border: 1px solid var(--line-soft); border-radius: var(--r-sm);
  padding: 10px 13px; overflow-x: auto; white-space: nowrap; direction: ltr; text-align: left;
}
.client-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.client {
  display: flex; align-items: center; gap: 13px;
  background: rgba(20, 17, 12, .55); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 14px 16px; transition: all var(--tr-base); position: relative; overflow: hidden;
}
.client::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(200px 90px at var(--mx, 50%) var(--my, 50%), rgba(232, 200, 114, .07), transparent 70%);
  opacity: 0; transition: opacity var(--tr-base);
}
.client:hover { border-color: rgba(232, 200, 114, .55); transform: translateY(-2px); }
.client:hover::before { opacity: 1; }
.client__logo { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-family: var(--display); font-weight: 600; font-size: 14px; flex-shrink: 0; position: relative; }
.client__name { font-weight: 700; font-size: 14px; position: relative; }
.client__sub { font-size: 11px; color: var(--txt3); position: relative; }
.client__go {
  margin-inline-start: auto; position: relative;
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--txt2); transition: all var(--tr-fast); flex-shrink: 0;
}
.client__go svg { width: 15px; height: 15px; }
html[dir="rtl"] .client__go svg { transform: scaleX(-1); }
.client:hover .client__go { border-color: var(--gold); color: var(--gold); background: var(--gold-dim); }
.client__copy { position: absolute; inset-inline-end: 46px; top: 50%; transform: translateY(-50%); opacity: 0; font-size: 10px; color: var(--txt3); transition: opacity var(--tr-fast); }
.client:hover .client__copy { opacity: 1; }

/* ---------------- explorer ---------------- */
.explorer-panel { padding: 20px; }
.explorer__bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.explorer__filters { display: flex; gap: 7px; flex-wrap: wrap; }
.fchip {
  font-family: var(--mono); font-size: 11.5px; font-weight: 700; padding: 7px 13px;
  border-radius: 999px; border: 1px solid var(--line); color: var(--txt2); transition: all var(--tr-fast);
}
.fchip:hover { color: var(--txt); }
.fchip.is-active { color: var(--gold); border-color: rgba(232, 200, 114, .55); background: var(--gold-dim); }
.explorer__search, .sources__search {
  background: rgba(20, 17, 12, .65); border: 1px solid var(--line); border-radius: var(--r-sm);
  color: var(--txt); font-size: 13px; padding: 9px 14px; min-width: 220px; flex: 1; max-width: 340px;
  transition: border-color var(--tr-fast);
}
.explorer__search:focus, .sources__search:focus { border-color: rgba(232, 200, 114, .5); outline: none; box-shadow: 0 0 0 3px rgba(232, 200, 114, .08); }
.explorer__meta { font-size: 11px; color: var(--txt3); margin: 13px 2px 9px; letter-spacing: .04em; }
.explorer__list {
  border: 1px solid var(--line-soft); border-radius: var(--r-md); overflow: hidden;
  max-height: 480px; overflow-y: auto; background: rgba(20, 17, 12, .45);
}
.explorer__loading { display: flex; align-items: center; gap: 12px; padding: 34px 22px; color: var(--txt3); font-size: 13px; justify-content: center; }
.spinner { width: 17px; height: 17px; border: 2px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.nrow {
  display: grid; grid-template-columns: 88px 1fr minmax(90px, 1.2fr) 42px;
  gap: 12px; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--line-soft);
  transition: background var(--tr-fast); font-size: 12.5px; direction: ltr;
}
.nrow:hover { background: rgba(232, 200, 114, .04); }
.nrow:last-child { border-bottom: none; }
.nrow__proto { font-family: var(--mono); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.nrow__proto--vless { color: var(--gold); } .nrow__proto--vmess { color: var(--silver); }
.nrow__proto--trojan { color: var(--deep); } .nrow__proto--ss, .nrow__proto--ssr { color: #A8946A; }
.nrow__proto--hy2, .nrow__proto--hysteria2 { color: var(--bronze); } .nrow__proto--tuic { color: var(--red); }
.nrow__host { font-family: var(--mono); color: var(--txt2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.nrow__tag { color: var(--txt3); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nrow__copy {
  width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center;
  color: var(--txt3); border: 1px solid transparent; transition: all var(--tr-fast);
}
.nrow__copy svg { width: 13px; height: 13px; }
.nrow__copy:hover { color: var(--gold); border-color: rgba(232, 200, 114, .4); background: var(--gold-dim); }
.explorer__foot { display: flex; gap: 10px; margin-top: 14px; justify-content: flex-end; flex-wrap: wrap; }
.btn {
  font-size: 13px; font-weight: 700; padding: 10px 20px; border-radius: var(--r-sm);
  transition: all var(--tr-fast); display: inline-flex; align-items: center; gap: 8px;
}
.btn--mint { background: var(--gold); color: #14110C; }
.btn--mint:hover { background: #F0D79A; transform: translateY(-1px); }
.btn--ghost { border: 1px solid var(--line); color: var(--txt2); }
.btn--ghost:hover { color: var(--gold); border-color: rgba(232, 200, 114, .45); }

/* ---------------- sources matrix ---------------- */
.sources-panel { padding: 22px; }
.sources__bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.sources__search { max-width: 260px; flex: 0 1 auto; }
.sources__legend { display: flex; gap: 18px; margin-inline-start: auto; font-size: 11px; color: var(--txt3); }
.dot-legend { display: inline-flex; align-items: center; gap: 7px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot--ok { background: var(--olive); }
.dot--fail { background: var(--red); }
.dot-matrix { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-end; min-height: 120px; }
.sdot {
  border-radius: 50%; background: var(--silver); opacity: .82; position: relative;
  transition: transform var(--tr-fast), opacity var(--tr-fast); cursor: default; flex-shrink: 0;
}
.sdot:hover { transform: scale(1.6); opacity: 1; z-index: 3; }
.sdot--fail { background: var(--red); animation: failpulse 1.6s ease-in-out infinite; }
@keyframes failpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(192, 101, 74, .45); } 50% { box-shadow: 0 0 0 5px rgba(192, 101, 74, 0); } }
.sdot--dim { opacity: .12; }
.sdot__tip {
  position: absolute; bottom: calc(100% + 9px); left: 50%; transform: translateX(-50%) translateY(4px);
  background: var(--bg3); border: 1px solid var(--line); border-radius: 7px;
  font-family: var(--mono); font-size: 10.5px; color: var(--txt2);
  padding: 7px 10px; white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity var(--tr-fast), transform var(--tr-fast); z-index: 8; direction: ltr;
}
.sdot:hover .sdot__tip { opacity: 1; transform: translateX(-50%) translateY(0); }
.sdot__tip b { color: var(--gold); font-weight: 700; }
.sdot--fail .sdot__tip b { color: var(--red); }
.sources__meta { margin-top: 15px; font-size: 11px; color: var(--txt3); letter-spacing: .04em; }

/* ---------------- download ---------------- */
.dl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.dl {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg1);
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 15px;
  transition: all var(--tr-base);
}
.dl:hover { border-color: rgba(232, 200, 114, .5); transform: translateY(-2px); }
.dl__ico {
  width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--gold-dim); color: var(--gold);
}
.dl__ico svg { width: 17px; height: 17px; }
.dl__name { font-family: var(--mono); font-size: 12.5px; font-weight: 700; direction: ltr; text-align: start; }
.dl__sub { font-size: 11px; color: var(--txt3); }
.dl__arr { margin-inline-start: auto; color: var(--txt3); transition: all var(--tr-fast); }
.dl__arr svg { width: 15px; height: 15px; }
.dl:hover .dl__arr { color: var(--gold); transform: translateY(2px); }

/* ---------------- FAQ ---------------- */
.faq-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.faq {
  background: var(--bg1); border: 1px solid var(--line-soft); border-radius: var(--r-md);
  padding: 17px 19px;
}
.faq__q { font-weight: 700; font-size: 14px; display: flex; gap: 10px; align-items: baseline; }
.faq__q .mono { color: var(--gold); font-size: 11px; flex-shrink: 0; }
.faq__a { color: var(--txt2); font-size: 13px; margin-top: 7px; line-height: 1.75; }

/* ---------------- footer ---------------- */
.footer { border-top: 1px solid var(--line-soft); margin-top: 40px; background: rgba(20, 17, 12, .6); position: relative; }
.footer::before {
  content: ""; position: absolute; inset-inline: 0; top: -7px; height: 6px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='14' viewBox='0 0 20 14'%3E%3Cpath d='M0 14V0H14V10H5V5H9' fill='none' stroke='%23C9A24A' stroke-width='2'/%3E%3C/svg%3E");
  background-size: 15px 10.5px;
  background-repeat: repeat-x;
  opacity: .3;
  pointer-events: none;
}
.footer__inner {
  max-width: 1220px; margin: 0 auto; padding: 22px 20px;
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
  color: var(--txt3); font-size: 12px;
}
.footer__link { margin-inline-start: auto; color: var(--txt2); transition: color var(--tr-fast); }
.footer__link:hover { color: var(--gold); }

/* ---------------- QR modal ---------------- */
.qr-modal { border: none; padding: 0; background: transparent; }
.qr-modal::backdrop { background: rgba(10, 8, 5, .8); backdrop-filter: blur(6px); }
.qr-modal__box {
  background: var(--bg1); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 22px; width: min(360px, 92vw); box-shadow: 0 30px 80px rgba(0, 0, 0, .65);
  display: grid; gap: 14px; justify-items: center;
}
.qr-modal__head { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.icon-btn { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--txt3); border: 1px solid var(--line); transition: all var(--tr-fast); }
.icon-btn svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; }
.icon-btn:hover { color: var(--red); border-color: rgba(192, 101, 74, .4); }
.qr-modal__target { font-size: 10px; color: var(--txt3); word-break: break-all; text-align: center; max-height: 52px; overflow: hidden; }
.qr-modal__canvas { background: #F3ECDD; padding: 14px; border-radius: var(--r-md); border: 1px solid rgba(201, 162, 74, .3); }
.qr-modal__canvas img, .qr-modal__canvas canvas { display: block; width: 216px; height: 216px; image-rendering: pixelated; }

/* ---------------- toast ---------------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(18px);
  background: var(--bg3); color: var(--gold); border: 1px solid rgba(232, 200, 114, .4);
  font-size: 12px; font-weight: 600; padding: 11px 20px; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: all var(--tr-base); z-index: 100;
  box-shadow: 0 14px 34px -18px rgba(0, 0, 0, .75);
}
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------------- reveal ---------------- */
.rv { opacity: 0; transform: translateY(16px); transition: opacity .6s cubic-bezier(.22, .61, .36, 1), transform .6s cubic-bezier(.22, .61, .36, 1); }
.rv.is-in { opacity: 1; transform: none; }

/* ---------------- responsive ---------------- */
@media (max-width: 1080px) {
  .nav__links { display: none; }
  .bento__donut, .bento__bars, .bento__latency, .bento__engines { grid-column: span 12; }
  .isp-grid { grid-template-columns: repeat(3, 1fr); }
  .client-grid { grid-template-columns: repeat(2, 1fr); }
  .dl-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .hero { padding-top: 48px; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .isp-grid { grid-template-columns: repeat(2, 1fr); }
  .client-grid { grid-template-columns: 1fr; }
  .dl-grid { grid-template-columns: 1fr 1fr; }
  .faq-wrap { grid-template-columns: 1fr; }
  .pipeline { height: 210px; }
  .pipeline__stages { flex-wrap: wrap; gap: 4px 0; padding: 0 2%; }
  .pstage { width: 30%; }
  .pstage:nth-child(n+4) { margin-top: 12px; }
  .gauge-row { gap: 10px; }
  .nrow { grid-template-columns: 74px 1fr 42px; }
  .nrow__tag { display: none; }
  .brand__sub { display: none; }
  .live-pill__time { display: none; }
  .countdown-chip { display: none; }
  .donut-wrap { justify-content: center; }
  .sources__legend { margin-inline-start: 0; }
}
@media (max-width: 420px) {
  .dl-grid { grid-template-columns: 1fr; }
  .kpi__value { font-size: 1.9rem; }
}

/* ---------------- reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .ticker__track { animation: none; }
}

/* ============================================================
   v2 — hero countdown · explorer probe badges · final polish
   ============================================================ */

/* ---------- hero grid + countdown ring ---------- */
.hero__grid {
  display: grid; grid-template-columns: 1fr 268px; gap: 18px; align-items: stretch;
  margin-top: 26px;
}
.hero__countdown {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 16px; padding: 18px 20px;
}
.hero__countdown::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(150px 90px at 88% 15%, rgba(232, 200, 114, .08), transparent 70%);
}
.hc-ring { width: 92px; height: 92px; flex: none; }
.hc-ring__track { fill: none; stroke: rgba(201, 162, 74, .18); stroke-width: 7; }
.hc-ring__fill {
  fill: none; stroke: var(--gold); stroke-width: 7; stroke-linecap: round;
  stroke-dasharray: 320.44; stroke-dashoffset: 320.44;
  transform: rotate(-90deg); transform-origin: center;
  transition: stroke-dashoffset .9s linear;
}
.hc-label { font-size: 10.5px; letter-spacing: .16em; color: var(--txt3); text-transform: uppercase; }
.hc-digits {
  font-family: var(--display); font-size: 29px; font-weight: 600; color: var(--txt);
  line-height: 1.15; white-space: nowrap;
  font-variant-numeric: tabular-nums; letter-spacing: .03em;
}
.hc-sub { font-size: 11px; color: var(--gold); opacity: .85; }
.hc-body { display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__countdown { padding: 14px 16px; }
  .hc-ring { width: 84px; height: 84px; }
  .hc-digits { font-size: 28px; }
}

/* ---------- explorer tools ---------- */
.explorer__tools {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 12px 0 2px; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft);
}
.explorer__probemeta { margin-inline-start: auto; color: var(--txt3); font-size: 12px; }
.btn--ghost.is-active { color: var(--gold); border-color: rgba(232, 200, 114, .5); background: var(--gold-dim); }

/* ---------- node rows: latency + probe ---------- */
.nrow {
  display: grid; grid-template-columns: 88px 1fr minmax(80px, 1.1fr) 74px 34px 34px;
  gap: 10px; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--line-soft);
  transition: background var(--tr-fast), opacity var(--tr-base); font-size: 12.5px; direction: ltr;
}
.nrow--dead { opacity: .42; }
.nrow__lat {
  font-size: 11.5px; font-weight: 700; text-align: center; padding: 3px 6px;
  border-radius: 999px; border: 1px solid transparent; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.lat--fast { color: #C7D0A8; border-color: rgba(122, 132, 80, .45); background: var(--olive-dim); }
.lat--ok   { color: #A8946A; border-color: rgba(168, 148, 106, .35); background: rgba(168, 148, 106, .08); }
.lat--mid  { color: #D9A06B; border-color: rgba(184, 115, 51, .4); background: var(--bronze-dim); }
.lat--slow { color: var(--deep); border-color: rgba(201, 162, 74, .4); background: var(--deep-dim); }
.lat--dead { color: var(--red); border-color: rgba(192, 101, 74, .35); background: var(--red-dim); }
.lat--unk  { color: var(--txt3); border-color: var(--line); }
.lat--probing {
  color: var(--gold); border-color: rgba(232, 200, 114, .45); background: var(--gold-dim);
  animation: probePulse 1s ease-in-out infinite;
}
@keyframes probePulse { 50% { opacity: .35; } }
.nrow__probe {
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px;
  border: 1px solid var(--line); background: transparent; color: var(--txt3);
  cursor: pointer; transition: color var(--tr-fast), border-color var(--tr-fast), background var(--tr-fast), transform var(--tr-fast);
}
.nrow__probe svg { width: 13px; height: 13px; }
.nrow__probe:hover:not(:disabled) { color: var(--gold); border-color: rgba(232, 200, 114, .5); background: var(--gold-dim); transform: translateY(-1px); }
.nrow__probe:disabled { opacity: .35; cursor: not-allowed; }
@media (max-width: 900px) {
  .nrow { grid-template-columns: 74px 1fr 68px 30px 30px; gap: 8px; }
  .nrow__tag { display: none; }
}

/* ---------- polish pass ---------- */
.kpi { position: relative; overflow: hidden; }
.panel { transition: border-color var(--tr-base), box-shadow var(--tr-base); }
.panel:hover { border-color: rgba(232, 200, 114, .42); box-shadow: 0 0 0 1px rgba(232, 200, 114, .04), var(--shadow-panel); }
.section__title { letter-spacing: .01em; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg0); }
::-webkit-scrollbar-thumb { background: #3A3122; border-radius: 8px; border: 2px solid var(--bg0); }
::-webkit-scrollbar-thumb:hover { background: #4A3F27; }
:focus-visible { outline: 2px solid rgba(232, 200, 114, .55); outline-offset: 2px; }
.footer__inner { gap: 14px; }
@media (prefers-reduced-motion: reduce) {
  .hc-ring__fill { transition: none; }
  .lat--probing { animation: none; }
}

/* ============================================================
   v3 — wire test panel · active nav · micro polish
   ============================================================ */

/* ---------- active nav link ---------- */
.nav__links a.is-active { color: var(--gold); background: var(--gold-dim); }

/* ---------- wire test (browser ping + copy) ---------- */
.wire-panel { padding: 18px 24px 14px; margin-top: 14px; }
.wire-head-tools { display: flex; align-items: center; gap: 12px; }
.wire-rows { display: flex; flex-direction: column; }
.wire-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 2px; border-bottom: 1px solid var(--line-soft);
  transition: background var(--tr-fast);
}
.wire-row:last-child { border-bottom: 0; }
.wire-row:hover { background: rgba(232, 200, 114, .03); }
.wire-row__dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--txt3); transition: background var(--tr-fast), box-shadow var(--tr-fast);
}
.wire-row.is-fast .wire-row__dot { background: var(--olive); box-shadow: 0 0 9px rgba(122, 132, 80, .55); }
.wire-row.is-ok .wire-row__dot { background: var(--gold); box-shadow: 0 0 9px rgba(232, 200, 114, .5); }
.wire-row.is-slow .wire-row__dot { background: var(--bronze); box-shadow: 0 0 9px rgba(184, 115, 51, .45); }
.wire-row.is-fail .wire-row__dot { background: var(--red); box-shadow: 0 0 9px rgba(192, 101, 74, .45); }
.wire-row__name { font-size: 12.5px; color: var(--txt); min-width: 128px; }
.wire-row__sub { font-size: 11px; color: var(--txt3); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wire-row__ms { font-size: 12px; color: var(--txt2); min-width: 74px; text-align: end; }
.wire-row.is-fast .wire-row__ms { color: var(--olive); }
.wire-row.is-ok .wire-row__ms { color: var(--gold); }
.wire-row.is-slow .wire-row__ms { color: var(--bronze); }
.wire-row.is-fail .wire-row__ms { color: var(--red); }
.wire-row__btn {
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em;
  padding: 5px 11px; border-radius: 6px; border: 1px solid var(--line);
  background: transparent; color: var(--txt2); cursor: pointer;
  transition: color var(--tr-fast), border-color var(--tr-fast), transform var(--tr-fast);
}
.wire-row__btn:hover { color: var(--gold); border-color: rgba(232, 200, 114, .5); }
.wire-row__btn:active { transform: scale(.95); }
.wire-row__btn[disabled] { opacity: .4; cursor: wait; }
.wire-note { font-size: 10.5px; color: var(--txt3); margin-top: 10px; letter-spacing: .02em; }

/* ---------- micro polish ---------- */
.bento .panel, .dl-grid .dl, .isp-grid .isp { transition-delay: var(--rvd, 0ms); }
@media (max-width: 720px) {
  .wire-row { flex-wrap: wrap; gap: 8px; }
  .wire-row__name { min-width: 0; flex: 1; }
  .wire-row__ms { min-width: 0; }
}

/* ---------------- config bank strip (D7) ---------------- */
.bank { display: grid; gap: 12px; margin: 14px auto 0; max-width: var(--maxw, 1180px); padding: 16px 20px; }
.bank__head { display: flex; align-items: center; gap: 12px; }
.bank__ico { width: 42px; height: 42px; display: grid; place-items: center; font-size: 20px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--gold-dim); }
.bank__title { font-weight: 700; font-size: 15px; }
.bank__sub { color: var(--txt3); font-size: 11px; letter-spacing: .08em; }
.bank__tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.bank__tile { border: 1px solid var(--line-soft); border-radius: 12px; padding: 10px 12px; background: var(--bg1); }
.bank__tile b { display: block; font-size: 20px; color: var(--gold); direction: ltr; text-align: inherit; }
.bank__tile span { font-size: 10.5px; color: var(--txt3); letter-spacing: .1em; }
.bank__src { display: flex; flex-wrap: wrap; gap: 8px; font-size: 11px; color: var(--txt2); }
.bank__dot { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-soft);
  border-radius: 999px; padding: 4px 11px; }
.bank__dot i { width: 7px; height: 7px; border-radius: 50%; }
.bank__dot--h i { background: var(--olive); box-shadow: 0 0 8px var(--olive); }
.bank__dot--s i { background: var(--bronze); }
.bank__dot--q i { background: var(--red); }
[dir="ltr"] .bank__tile b { text-align: left; }

/* D9/U2 — 7-day health sparkline (bank panel) */
.health { margin-top: 12px; border-top: 1px dashed var(--line-soft); padding-top: 12px; }
.health__title { font-size: 11.5px; color: var(--txt3); margin-bottom: 8px; }
.health__bars { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.health__bar { flex: 1; min-width: 52px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; height: 74px; }
.health__bar i { display: block; width: 70%; max-width: 34px; border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, var(--gold), var(--bronze)); min-height: 5px; }
.health__bar i.na { background: var(--line-soft); }
.health__bar span { font-size: 10px; color: var(--txt3); direction: ltr; }
.health__bar b { font-size: 10.5px; color: var(--gold); font-weight: 600; direction: ltr; }
