/* XCR9 site theme (promoted from /lab). Public pages only; panel/admin use ui/app.css. */

/* Latin digits (XCR9, GPT-5.6, 10 ms) from the system font; Persian digits typed as ۰-۹ are unaffected. */
@font-face { font-family: "SiteDigits"; src: local("Segoe UI"), local("Roboto"), local("Helvetica Neue"), local("Arial"); unicode-range: U+0030-0039; }
@font-face { font-family: "LabSans"; src: url("fonts/Vazirmatn-FD-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "LabSans"; src: url("fonts/Vazirmatn-FD-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "LabSans"; src: url("fonts/Vazirmatn-FD-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #f6f6f3;
  --surface: #ffffff;
  --surface-2: #efefeb;
  --line: rgba(20, 22, 26, 0.09);
  --line-strong: rgba(20, 22, 26, 0.16);
  --text: #121417;
  --muted: #676d76;
  --faint: #9aa0a8;
  --accent: #3f6d00;
  --accent-ink: #f7ffe6;
  --accent-soft: rgba(95, 150, 0, 0.12);
  --warn: #b45309;
  --shadow: 0 1px 0 rgba(20, 22, 26, 0.04), 0 12px 32px -18px rgba(20, 22, 26, 0.18);
  --radius: 18px;
  --radius-sm: 12px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: "SiteDigits", "LabSans", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0b0d;
    --surface: #111317;
    --surface-2: #171a1f;
    --line: rgba(255, 255, 255, 0.07);
    --line-strong: rgba(255, 255, 255, 0.14);
    --text: #eceef1;
    --muted: #8b929c;
    --faint: #5c636d;
    --accent: #c6f432;
    --accent-ink: #0d1200;
    --accent-soft: rgba(198, 244, 50, 0.1);
    --warn: #fbbf24;
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 20px 40px -24px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0b0d;
  --surface: #111317;
  --surface-2: #171a1f;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #eceef1;
  --muted: #8b929c;
  --faint: #5c636d;
  --accent: #c6f432;
  --accent-ink: #0d1200;
  --accent-soft: rgba(198, 244, 50, 0.1);
  --warn: #fbbf24;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 20px 40px -24px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.mono { font-family: var(--mono); direction: ltr; unicode-bidi: isolate; letter-spacing: 0; }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* ---------- top bar ---------- */
.bar { position: sticky; top: 0; z-index: 20; background: transparent; border-bottom: 1px solid transparent; transition: border-color .2s, background-color .2s; }
.bar.scrolled { border-bottom-color: var(--line); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
.bar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.mark { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .02em; }
.mark-glyph { width: 26px; height: 26px; border-radius: 8px; background: var(--text); color: var(--bg); display: grid; place-items: center; font-family: var(--mono); font-size: 12px; font-weight: 700; }
.mark-name { font-family: var(--mono); font-size: 15px; }
.bar-actions { display: flex; align-items: center; gap: 6px; }
.status-pill { display: none; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; }
@media (min-width: 560px) { .status-pill { display: inline-flex; } }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.ok { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.dot.bad { background: var(--warn); }
.icon-btn { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: transparent; display: grid; place-items: center; transition: background .15s, border-color .15s; }
.icon-btn:hover { background: var(--surface-2); border-color: var(--line-strong); }
.icon-btn svg { width: 17px; height: 17px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 500; font-size: 15px; transition: transform .12s ease, background .15s, border-color .15s; white-space: nowrap; }
.btn:hover { border-color: var(--text); }
.btn:active { transform: scale(.98); }
.btn-accent { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 700; }
.btn-accent:hover { border-color: transparent; filter: brightness(1.05); }
.btn-sm { height: 38px; padding: 0 14px; font-size: 14px; border-radius: 11px; }
.btn-ghost { background: transparent; }

/* ---------- hero ---------- */
.hero { padding: 64px 0 28px; }
@media (min-width: 720px) { .hero { padding: 104px 0 40px; } }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.kicker b { color: var(--text); font-weight: 500; }
.hero h1 { margin: 0; font-size: clamp(44px, 9vw, 92px); line-height: 1.08; font-weight: 700; letter-spacing: -.02em; }
.hero h1 .strike { position: relative; color: var(--faint); white-space: nowrap; }
.hero h1 .strike::after { content: ""; position: absolute; inset-inline: -4%; top: 54%; height: .07em; background: var(--accent); transform-origin: right; transform: scaleX(0); animation: strike .9s .35s cubic-bezier(.7,0,.2,1) forwards; }
@keyframes strike { to { transform: scaleX(1); } }
.lede { margin: 22px 0 0; max-width: 560px; font-size: clamp(16px, 2.2vw, 19px); color: var(--muted); }

/* ---------- DNS console ---------- */
.console { margin-top: 40px; display: grid; gap: 14px; }
@media (min-width: 880px) { .console { grid-template-columns: 1.25fr 1fr; align-items: stretch; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.dns-card { padding: 8px; }
.dns-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 13px; transition: background .15s; }
.dns-row + .dns-row { border-top: 1px solid var(--line); border-radius: 0 0 13px 13px; }
.dns-row:hover { background: var(--surface-2); }
.dns-meta { flex: 1; min-width: 0; }
.dns-label { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.dns-ip { font-family: var(--mono); direction: ltr; text-align: right; font-size: clamp(22px, 5vw, 30px); font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.copy { flex: none; height: 38px; min-width: 38px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line-strong); background: transparent; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); transition: all .15s; }
.copy:hover { color: var(--text); border-color: var(--text); }
.copy.done { color: var(--accent-ink); background: var(--accent); border-color: transparent; }
.copy svg { width: 15px; height: 15px; }
.dns-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px 8px; flex-wrap: wrap; }
.hint { font-size: 13px; color: var(--muted); }
@media (hover: none) { .kbd-hint { display: none; } }
.hint kbd { font-family: var(--mono); font-size: 11px; padding: 1px 6px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 6px; color: var(--text); }

.me-card { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.me-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.me-ip { font-family: var(--mono); direction: ltr; font-size: 20px; font-weight: 600; }
.me-note { font-size: 14px; color: var(--muted); margin: 0; }
.me-note strong { color: var(--text); font-weight: 500; }
.me-card .btn { width: 100%; height: 50px; font-size: 16px; }
.tag { font-size: 12px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); white-space: nowrap; }
.tag.accent { background: var(--accent-soft); border-color: transparent; color: var(--text); }

/* ---------- route (signature) ---------- */
.section { padding: 56px 0; }
@media (min-width: 720px) { .section { padding: 88px 0; } }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.sec-head h2 { margin: 0; font-size: clamp(26px, 4.4vw, 38px); line-height: 1.2; letter-spacing: -.01em; }
.sec-head p { margin: 6px 0 0; color: var(--muted); max-width: 520px; }
.eyebrow { font-family: var(--mono); direction: ltr; text-align: right; font-size: 12px; color: var(--faint); letter-spacing: .08em; text-transform: uppercase; }

.route { padding: 26px 20px 22px; overflow: hidden; }
@media (min-width: 720px) { .route { padding: 34px 32px 28px; } }
.path { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.path::before { content: ""; position: absolute; top: 11px; inset-inline: 12.5%; height: 1px; background: var(--line-strong); }
.pulse { position: absolute; top: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft), 0 0 18px var(--accent); inset-inline-start: 12.5%; animation: travel 3.2s cubic-bezier(.6,0,.4,1) infinite; }
@keyframes travel { 0% { inset-inline-start: 12.5%; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { inset-inline-start: calc(87.5% - 7px); opacity: 0; } }
.node { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; }
.node-dot { width: 23px; height: 23px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line-strong); display: grid; place-items: center; z-index: 1; }
.node-dot::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--text); }
.node.hot .node-dot { border-color: var(--accent); }
.node.hot .node-dot::after { background: var(--accent); }
.node-name { font-size: 14px; font-weight: 500; line-height: 1.4; }
.node-sub { font-family: var(--mono); direction: ltr; font-size: 11px; color: var(--muted); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
@media (max-width: 520px) { .node-sub { font-size: 10px; } .node-name { font-size: 13px; } }

.meter { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr; gap: 18px 28px; align-items: center; }
.rtt { display: flex; align-items: baseline; gap: 6px; }
.rtt-num { font-family: var(--mono); font-size: clamp(40px, 8vw, 60px); font-weight: 600; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; min-width: 2.2ch; }
.rtt-unit { font-family: var(--mono); color: var(--muted); font-size: 15px; }
.spark { width: 100%; height: 56px; display: block; overflow: visible; }
.spark .area { fill: var(--accent-soft); }
.spark .ln { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark .head { fill: var(--accent); }
.meter-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13px; color: var(--muted); }
.meter-foot .mono { color: var(--text); }
@media (max-width: 520px) { .meter { grid-template-columns: 1fr; } }

/* ---------- steps ---------- */
.steps { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--surface); padding: 24px 22px; }
.step-n { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.step h3 { margin: 10px 0 6px; font-size: 18px; }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---------- setup ---------- */
.tabs { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; height: 38px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 14px; transition: background .15s, color .15s; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: var(--text); color: var(--bg); font-weight: 500; }
.setup { margin-top: 14px; display: grid; gap: 14px; }
@media (min-width: 880px) { .setup { grid-template-columns: 1.4fr 1fr; } }
.setup-steps { padding: 24px 24px 22px; }
.setup-steps h3 { margin: 0 0 14px; font-size: 18px; }
.setup-steps ol { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 12px; }
.setup-steps li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 10px; font-size: 15px; }
.setup-steps li::before { content: counter(s); width: 24px; height: 24px; border-radius: 8px; background: var(--surface-2); color: var(--muted); font-size: 12px; display: grid; place-items: center; margin-top: 3px; }
.setup-steps .path-txt { font-family: var(--mono); direction: ltr; unicode-bidi: isolate; font-size: 13px; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); }
.setup-note { margin-top: 16px; font-size: 13.5px; color: var(--muted); padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.values { padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.kv { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px dashed var(--line-strong); border-radius: 12px; }
.kv span:first-child { font-size: 13px; color: var(--muted); }
.kv .mono { font-size: 15px; font-weight: 600; word-break: break-all; }

/* ---------- coverage ---------- */
.cover { display: grid; gap: 14px; }
@media (min-width: 720px) { .cover { grid-template-columns: 1fr 1fr; } }
.cover .card { padding: 22px; }
.cover h3 { margin: 0 0 14px; font-size: 16px; color: var(--muted); font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 14px; padding: 7px 13px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); direction: ltr; }
.auto-line { margin-top: 14px; display: flex; gap: 12px; align-items: flex-start; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--line); color: var(--muted); font-size: 14.5px; }
.auto-line .dot { margin-top: 9px; }

/* ---------- plans ---------- */
.seg { display: inline-flex; gap: 2px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.seg button { height: 36px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.seg button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.seg .off { font-size: 11px; color: var(--accent); font-weight: 700; }
.seg button[aria-pressed="true"] .off { color: inherit; opacity: .7; }
.plans { display: grid; gap: 14px; margin-top: 20px; }
@media (min-width: 880px) { .plans { grid-template-columns: repeat(3, 1fr); } }
.plan { padding: 26px 24px 24px; display: flex; flex-direction: column; gap: 18px; position: relative; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.plan-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.plan h3 { margin: 0; font-size: 17px; font-weight: 500; }
.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-num { font-size: 38px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.price-unit { color: var(--muted); font-size: 14px; }
.price-was { color: var(--faint); font-size: 14px; text-decoration: line-through; width: 100%; line-height: 1.3; min-height: 1.3em; }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14.5px; color: var(--muted); flex: 1; }
.plan li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; line-height: 1.6; }
.plan li::before { content: ""; width: 12px; height: 7px; border-inline-start: 1.6px solid var(--accent); border-bottom: 1.6px solid var(--accent); transform: rotate(-45deg) scaleX(-1); margin-top: 8px; }
.plan .btn { width: 100%; }

/* ---------- faq ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 2px; font-weight: 500; font-size: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--muted); font-size: 20px; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: -6px 0 20px; color: var(--muted); max-width: 720px; font-size: 15px; }

/* ---------- footer ---------- */
.foot { padding: 48px 0 28px; border-top: 1px solid var(--line); margin-top: 32px; font-size: 14px; color: var(--muted); }
.foot a { transition: color .15s; }
.foot a:hover { color: var(--text); }
.foot-grid { display: grid; gap: 32px 20px; grid-template-columns: 1fr 1fr; }
.foot-brand { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.foot-brand p { margin: 0; max-width: 320px; line-height: 1.8; }
.foot-dns { display: flex; gap: 8px; flex-wrap: wrap; }
.foot-ip { height: 32px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font-size: 13px; transition: border-color .15s, background .15s; }
.foot-ip:hover { border-color: var(--accent); }
.foot-contact { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; }
.foot-col { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.foot-col h3 { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: var(--text); letter-spacing: .01em; }
.foot-trust img { height: 96px; width: auto; display: block; }
.foot-bottom { display: flex; justify-content: space-between; gap: 8px 18px; flex-wrap: wrap; margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--faint); }
@media (min-width: 720px) {
  .foot-grid { grid-template-columns: repeat(3, 1fr); }
  .foot-grid.has-trust { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 960px) {
  .foot-grid { grid-template-columns: minmax(260px, 1.6fr) repeat(3, 1fr); }
  .foot-grid.has-trust { grid-template-columns: minmax(260px, 1.6fr) repeat(3, 1fr) auto; }
  .foot-brand { grid-column: auto; }
}

/* ---------- toast ---------- */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 12px; font-size: 14px; transition: opacity .2s, transform .2s; z-index: 50; white-space: nowrap; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .pulse { display: none; }
  .reveal { opacity: 1; transform: none; }
  .hero h1 .strike::after { transform: scaleX(1); }
}

/* ---------- atmosphere (background) ---------- */
.atmo { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.atmo::before { /* dot grid, fading out from the top */
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(var(--dot) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(120% 70% at 50% 0%, #000 0%, transparent 72%);
          mask-image: radial-gradient(120% 70% at 50% 0%, #000 0%, transparent 72%);
}
.atmo::after { /* accent glow */
  content: ""; position: absolute; width: 900px; height: 900px; top: -520px; inset-inline-start: 50%;
  transform: translateX(50%); border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow), transparent);
  animation: breathe 9s ease-in-out infinite alternate;
}
@keyframes breathe { from { opacity: .65; } to { opacity: 1; } }
:root { --dot: rgba(20, 22, 26, 0.11); --glow: rgba(120, 180, 0, 0.16); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --dot: rgba(255, 255, 255, 0.07); --glow: rgba(198, 244, 50, 0.13); } }
:root[data-theme="dark"] { --dot: rgba(255, 255, 255, 0.07); --glow: rgba(198, 244, 50, 0.13); }

.hero { position: relative; isolation: isolate; }
.hero-art {
  overflow: hidden;
  position: absolute; z-index: -1; top: 0; left: 0; width: 66%; height: 780px; pointer-events: none;
  -webkit-mask-image: radial-gradient(72% 68% at 50% 44%, #000 20%, transparent 80%);
          mask-image: radial-gradient(72% 68% at 50% 44%, #000 20%, transparent 80%);
}
@media (max-width: 720px) { .hero-art { width: 100%; height: 560px; opacity: .3; } }
.hero-art svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transition: transform .9s cubic-bezier(.2,.7,.2,1); will-change: transform; }
.c-trace { fill: none; stroke: var(--c-trace); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.c-node { fill: var(--bg); stroke: var(--c-node); stroke-width: 1.3; }
.c-via { fill: var(--c-node); }
.c-ctrl { fill: none; stroke: var(--c-ctrl); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.c-ctrl-fill { fill: var(--c-ctrl-fill); stroke: none; }
#circuitLit .c-trace, #circuitLit .c-ctrl { stroke: var(--c-lit); }
#circuitLit .c-node { stroke: var(--c-lit); }
#circuitLit .c-via { fill: var(--c-lit); }
#circuitLit {
  -webkit-mask-image: radial-gradient(circle 230px at var(--mx, 50%) var(--my, 45%), #000 0%, rgba(0,0,0,.45) 42%, transparent 72%);
          mask-image: radial-gradient(circle 230px at var(--mx, 50%) var(--my, 45%), #000 0%, rgba(0,0,0,.45) 42%, transparent 72%);
}
.c-pulses { filter: drop-shadow(0 0 3px var(--c-pulse)); }
.c-pulse { fill: none; stroke: var(--c-pulse); stroke-width: 2; stroke-linecap: round; animation: pulse-in var(--dur, 5s) linear var(--delay, 0s) infinite; }
.c-pulse.out { animation-name: pulse-out; }
@keyframes pulse-in { from { stroke-dashoffset: calc(var(--len) * -1); } to { stroke-dashoffset: 40; } }
@keyframes pulse-out { from { stroke-dashoffset: 40; } to { stroke-dashoffset: calc(var(--len) * -1); } }
.c-draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 2.4s cubic-bezier(.6,0,.2,1) .2s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.c-btn { fill: none; stroke: var(--c-ctrl); stroke-width: 1.6; animation: blink 6s ease-in-out infinite; animation-delay: var(--bd, 0s); }
@keyframes blink { 0%, 86%, 100% { fill: transparent; } 90% { fill: var(--c-pulse); } }
:root { --c-trace: rgba(20,22,26,.10); --c-node: rgba(20,22,26,.2); --c-ctrl: rgba(20,22,26,.28); --c-ctrl-fill: rgba(20,22,26,.02); --c-lit: rgba(63,109,0,.75); --c-pulse: #4d7c0f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --c-trace: rgba(150,165,215,.14); --c-node: rgba(160,180,235,.32); --c-ctrl: rgba(175,195,245,.42); --c-ctrl-fill: rgba(120,140,200,.04); --c-lit: rgba(198,244,50,.85); --c-pulse: #c6f432; } }
:root[data-theme="dark"] { --c-trace: rgba(150,165,215,.14); --c-node: rgba(160,180,235,.32); --c-ctrl: rgba(175,195,245,.42); --c-ctrl-fill: rgba(120,140,200,.04); --c-lit: rgba(198,244,50,.85); --c-pulse: #c6f432; }
@media (prefers-reduced-motion: reduce) { .c-pulses { display: none; } .c-draw { stroke-dashoffset: 0; } .hero-art svg { transition: none; } }

/* ---------- games ---------- */
.games { display: grid; gap: 14px; }
@media (min-width: 760px) { .games { grid-template-columns: repeat(3, 1fr); } }
.game { position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; color: var(--text); box-shadow: var(--shadow); transition: border-color .2s, transform .2s; }
.game:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.game img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 669; object-fit: cover; background: #0a0b0d; border-bottom: 1px solid var(--line); }
.game-top { padding: 16px 20px 0; display: flex; }
.game-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; padding: 4px 11px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2, var(--muted)); }
.game-badge .dot { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.game-badge.soon .dot { background: #fbbf24; box-shadow: 0 0 0 3px rgba(251,191,36,.18); }
.game-body { padding: 10px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.game-title { margin: 0; font-family: var(--mono); direction: ltr; text-align: right; font-size: clamp(20px, 2.4vw, 24px); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.game p { margin: 0; font-size: 14px; color: var(--muted); }
.game-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.game-tags span { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); direction: ltr; color: var(--muted); }
.game-note { margin-top: 12px; font-size: 13px; color: var(--muted); display: flex; gap: 10px; align-items: flex-start; }
.game-note .dot { margin-top: 8px; }

/* ---------- nav + setup page ---------- */
.nav-link { display: none; font-size: 14px; color: var(--muted); padding: 0 10px; }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--text); }
@media (min-width: 640px) { .nav-link { display: inline-flex; } }
.inline-link { color: var(--text); border-bottom: 1px solid var(--accent); padding-bottom: 1px; }
.inline-link:hover { color: var(--accent); }
.page-hero { padding: 64px 0 20px; }
@media (min-width: 720px) { .page-hero { padding: 96px 0 28px; } }
.page-hero h1 { margin: 0; font-size: clamp(36px, 7vw, 64px); line-height: 1.1; letter-spacing: -.02em; }
.page-hero p { margin: 16px 0 0; color: var(--muted); max-width: 560px; font-size: 17px; }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); margin-bottom: 22px; }
.back:hover { color: var(--text); }

/* ======================= production additions ======================= */
/* Old-theme variable names still referenced by js/app.js (modal tab colours). */
:root { --pencil-ink: var(--text); --paper-bg-day: var(--bg); --pencil-soft: var(--muted); --accent-coral: var(--accent); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }

/* header nav */
.nav { display: none; align-items: center; gap: 2px; }
.nav a { font-size: 14px; color: var(--muted); padding: 8px 10px; border-radius: 10px; transition: color .15s, background .15s; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--text); }
@media (min-width: 980px) { .nav { display: flex; } .menu-btn { display: none !important; } }
.user-chip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 6px 0 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; max-width: 220px; }
.user-chip .avatar { width: 26px; height: 26px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.user-chip .email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .plan { font-family: var(--mono); font-size: 10px; color: var(--muted); }
@media (max-width: 640px) { .user-chip .email, .user-chip .plan { display: none; } .user-chip { padding: 0 6px; } }
.nav-guest, .nav-user { display: flex; align-items: center; gap: 6px; }

/* mobile drawer (ids driven by js/app.js toggleMobileMenu) */
.drawer { position: fixed; inset: 64px 12px auto 12px; z-index: 40; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 18px; box-shadow: var(--shadow); padding: 10px; display: none; flex-direction: column; gap: 2px; }
.drawer.open { display: flex; }
.drawer > a, .drawer button.link { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 12px; font-size: 15px; background: none; border: 0; text-align: start; width: 100%; }
.drawer > a:hover, .drawer button.link:hover { background: var(--surface-2); }
.drawer hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.drawer .drawer-auth { display: flex; gap: 8px; padding: 6px 4px 2px; flex-wrap: wrap; }
.drawer .drawer-auth .btn { flex: 1; }
.menu-btn .icon-close { display: none; }

/* auth modal (markup injected by ui/xcr9.js, logic in js/app.js) */
#authModal { position: fixed; inset: 0; z-index: 90; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(5, 6, 8, .62); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); overflow-y: auto; }
.modal-card { position: relative; width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 22px; padding: 28px 24px 22px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.6); margin: auto; animation: pop .25s cubic-bezier(.2,.8,.2,1); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal-close { position: absolute; top: 14px; inset-inline-end: 14px; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: transparent; display: grid; place-items: center; font-size: 18px; color: var(--muted); }
.modal-close:hover { color: var(--text); border-color: var(--line-strong); }
.modal-head { text-align: center; margin-bottom: 18px; }
.modal-head .mark-glyph { margin: 0 auto 10px; width: 38px; height: 38px; border-radius: 12px; font-size: 14px; }
.modal-head h2 { margin: 0; font-size: 20px; }
.modal-head p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.modal-tabs { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; margin-bottom: 18px; background: var(--surface-2); }
.modal-tabs button { flex: 1; height: 38px; border: 0; border-radius: 10px; font-size: 14px; font-weight: 500; background: none; color: var(--muted); transition: background .15s, color .15s; }
.field { margin-bottom: 14px; }
.field label, .field .lbl { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.input, .modal-card input { width: 100%; height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--text); font: inherit; font-size: 15px; transition: border-color .15s, box-shadow .15s; }
.input:focus, .modal-card input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.modal-card input[dir="ltr"] { text-align: left; font-family: var(--mono); font-size: 14px; }
.modal-card .btn { width: 100%; height: 48px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--text); font-size: 13px; border-bottom: 1px solid var(--accent); cursor: pointer; }
.form-err { padding: 10px 12px; border-radius: 12px; background: rgba(239, 68, 68, .1); border: 1px solid rgba(239, 68, 68, .35); color: #ef4444; font-size: 13.5px; margin-bottom: 14px; }
.form-ok { padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--text); font-size: 13.5px; margin-bottom: 14px; line-height: 1.7; }
.form-foot { text-align: center; font-size: 13.5px; color: var(--muted); margin: 14px 0 0; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: 12px; margin: 18px 0 12px; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.gbtn { width: 100%; height: 46px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 14px; font-weight: 500; }
.gbtn svg { width: 18px; height: 18px; }
#modal_g_id_signin_render { display: flex; justify-content: center; min-height: 44px; margin-top: 4px; }

/* app.js toast: #toast + #toastMsg + .show */
#toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-size: 14px; transition: opacity .2s, transform .2s; z-index: 120; max-width: calc(100vw - 32px); white-space: pre-line; text-align: center; line-height: 1.7; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* generic content pages */
.prose { max-width: 760px; }
.prose p { color: var(--muted); }
.grid-2 { display: grid; gap: 14px; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.grid-3 { display: grid; gap: 14px; }
@media (min-width: 880px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.svc { padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.svc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.svc h3 { margin: 0; font-size: 18px; font-family: var(--mono); direction: ltr; text-align: right; letter-spacing: -.01em; }
.svc .dom { font-family: var(--mono); direction: ltr; text-align: right; font-size: 13px; color: var(--muted); }
.svc p { margin: 0; color: var(--muted); font-size: 14.5px; }
.svc .code { font-family: var(--mono); direction: ltr; text-align: left; font-size: 12.5px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); overflow-x: auto; white-space: nowrap; }
.svc .btn { align-self: flex-start; margin-top: auto; }
.svc-status { font-family: var(--mono); font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.svc-status span, .svc-status * { color: inherit !important; font-weight: 500 !important; }
.stat-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 760px) { .stat-row { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--surface); padding: 20px; }
.stat b { display: block; font-size: 26px; font-family: var(--mono); letter-spacing: -.02em; }
.stat span { font-size: 13px; color: var(--muted); }

/* developers explorer (ids driven by js/app.js) */
.explorer { display: grid; gap: 14px; margin-top: 14px; }
@media (min-width: 900px) { .explorer { grid-template-columns: 1fr 1.15fr; } }
.explorer .card { padding: 22px; position: relative; overflow: hidden; }
#svcTitle { margin: 0; font-family: var(--mono); direction: ltr; text-align: right; font-size: 20px; }
#svcLink { font-family: var(--mono); direction: ltr; font-size: 13px; color: var(--muted); }
#svcDesc { color: var(--muted); font-size: 14.5px; }
#svcFeatures { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
#svcFeatures li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--muted); }
#svcFeatures svg { width: 15px; height: 15px; flex: none; margin-top: 5px; color: var(--accent); }
.term { background: #0b0d10; color: #d7dde6; border-radius: 14px; border: 1px solid var(--line-strong); overflow: hidden; }
.term-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,.07); font-family: var(--mono); font-size: 12px; color: #8b929c; }
.term-bar .btn { height: 30px; padding: 0 12px; font-size: 12px; background: transparent; color: #d7dde6; border-color: rgba(255,255,255,.18); }
.term pre { margin: 0; padding: 16px; max-height: 440px; overflow: auto; font-family: var(--mono); font-size: 12.5px; line-height: 1.7; direction: ltr; text-align: left; white-space: pre; }
.lock { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 24px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lock p { margin: 0; color: var(--muted); max-width: 380px; font-size: 14px; }
.lock .row { display: flex; gap: 8px; }
.subdomains { display: grid; gap: 10px; }
@media (min-width: 760px) { .subdomains { grid-template-columns: repeat(4, 1fr); } }
.subdomain { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; transition: border-color .15s, transform .15s; }
.subdomain:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.subdomain b { font-family: var(--mono); direction: ltr; text-align: right; font-size: 14px; font-weight: 600; }
.subdomain span { font-size: 13px; color: var(--muted); }

/* 404 */
.big-code { font-family: var(--mono); font-size: clamp(90px, 22vw, 200px); line-height: 1; letter-spacing: -.06em; font-weight: 700; color: var(--text); }
.big-code em { font-style: normal; color: var(--accent); }
.hero h1 .kicker { display: flex; align-items: center; gap: 8px; margin: 0 0 20px; font-size: 13px; font-weight: 400; line-height: 1.6; letter-spacing: 0; color: var(--muted); }
.hero h1 .kicker b { color: var(--text); font-weight: 500; }
.hero h1 .h1-big { display: block; }
.svc-tab-btn.active { background: var(--text); color: var(--bg); font-weight: 500; }
.stat b { direction: ltr; text-align: right; unicode-bidi: isolate; }
html, body { overflow-x: clip; }
@media (max-width: 640px) { #navAdminBtn { display: none !important; } }
.setup-steps .path-txt { white-space: nowrap; }
.drawer-auth .btn { height: 46px; }

/* gateways: developers grid (6) */
@media (min-width: 760px) { .subdomains { grid-template-columns: repeat(3, 1fr); } }
.grid-3 > *, .grid-2 > * { min-width: 0; }
