/* TZX Mesh site — Console identity, dark and light. Tokens first; components only use tokens. */
:root {
  --ground: #0B0F0D; --s1: #121815; --s2: #182019; --s3: #16201B; --line: #1B2621; --hair: #141C17;
  --ink: #E6EDE8; --ink-2: #D5DFD9; --mid: #A9BBB1; --dim: #829790; --faint: #5E6F66;
  --accent: #2ED38F; --accent-hi: #7FE6BB; --on-accent: #0B0F0D; --amber: #F5B942; --red: #FF7A7A;
  --grid: #121815; --shadow: 0 20px 60px rgba(0,0,0,.45);
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
/* Light: the TZX house tokens (paper, ink, deep green) so it reads as the same family as tzxerp. */
:root[data-theme="light"] {
  --ground: #F7F9F6; --s1: #FFFFFF; --s2: #EEF3F0; --s3: #E4ECE7; --line: #D5DFD9; --hair: #E6EDE8;
  --ink: #1B2420; --ink-2: #26332C; --mid: #3A4840; --dim: #5E6F66; --faint: #829790;
  --accent: #0F6E55; --accent-hi: #0B5443; --on-accent: #F7F9F6; --amber: #8A5A00; --red: #B3261E;
  --grid: #EEF3F0; --shadow: 0 20px 60px rgba(27,36,32,.12);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --ground: #F7F9F6; --s1: #FFFFFF; --s2: #EEF3F0; --s3: #E4ECE7; --line: #D5DFD9; --hair: #E6EDE8;
    --ink: #1B2420; --ink-2: #26332C; --mid: #3A4840; --dim: #5E6F66; --faint: #829790;
    --accent: #0F6E55; --accent-hi: #0B5443; --on-accent: #F7F9F6; --amber: #8A5A00; --red: #B3261E;
    --grid: #EEF3F0; --shadow: 0 20px 60px rgba(27,36,32,.12);
  }
}
:root[data-theme="dark"] {
  --ground: #0B0F0D; --s1: #121815; --s2: #182019; --s3: #16201B; --line: #1B2621; --hair: #141C17;
  --ink: #E6EDE8; --ink-2: #D5DFD9; --mid: #A9BBB1; --dim: #829790; --faint: #5E6F66;
  --accent: #2ED38F; --accent-hi: #7FE6BB; --on-accent: #0B0F0D; --amber: #F5B942; --red: #FF7A7A;
  --grid: #121815; --shadow: 0 20px 60px rgba(0,0,0,.45);
}
[dir="rtl"] { --sans: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .waiting-node, .waiting-link, .live .dot { animation: none !important; } }
body { margin: 0; background: var(--ground); color: var(--ink); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); } a:hover { color: var(--accent-hi); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono { font-family: var(--mono); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; inset-inline-start: 8px; top: 8px; transform: translateY(-200%); background: var(--accent); color: var(--on-accent); padding: 8px 12px; border-radius: 6px; z-index: 50; }
.skip:focus { transform: none; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 760px; }
.wrap.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; align-items: center; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 600; line-height: 1.2; margin-bottom: 14px; }
h3 { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
p { margin: 0 0 12px; max-width: 64ch; color: var(--mid); }
.eyebrow { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }
.fine { font-size: 13px; color: var(--dim); }

/* header */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 28px; height: 64px; padding: 0 clamp(16px, 4vw, 64px); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--ground) 88%, transparent); backdrop-filter: blur(10px); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand svg { color: var(--accent); }
.brand .mono { font-size: 14px; font-weight: 600; letter-spacing: .14em; }
.nav { display: flex; gap: 22px; }
.nav a { font-size: 13px; color: var(--mid); text-decoration: none; }
.nav a:hover { color: var(--ink); }
.top-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.ghost { background: transparent; border: 0; color: var(--mid); font-size: 12px; cursor: pointer; padding: 8px 10px; border-radius: 6px; text-decoration: none; }
.ghost:hover { color: var(--ink); background: var(--s2); }
.ghost.icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; }
.ico-sun { display: none; } :root[data-theme="light"] .ico-sun { display: block; } :root[data-theme="light"] .ico-moon { display: none; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .ico-sun { display: block; } :root:not([data-theme="dark"]) .ico-moon { display: none; } }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 20px; border-radius: 6px; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap; }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hi); color: var(--on-accent); }
.btn.outline { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn.outline:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
@media (max-width: 900px) { .nav { display: none; } .top { gap: 12px; } .top-actions .btn { display: none; } }

/* hero */
.hero { position: relative; overflow: hidden; min-height: 560px; display: flex; flex-direction: column; justify-content: center; padding: 72px clamp(16px, 4vw, 64px) 96px; background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 32px 32px; }
.topology { position: absolute; inset-inline-end: 0; top: 0; height: 100%; width: min(56%, 800px); pointer-events: none; }
.topology .links path { stroke: var(--accent); stroke-opacity: .5; stroke-width: 1; }
.topology .nodes circle { fill: var(--ground); stroke: var(--accent); stroke-width: 1.6; }
.topology .labels text { font-family: var(--mono); font-size: 11px; fill: var(--dim); }
.topology .waiting-link { stroke: var(--amber); stroke-width: 1.2; stroke-dasharray: 4 4; animation: march 1.6s linear infinite; }
.topology .waiting-node { fill: var(--s1); stroke: var(--amber); stroke-width: 1.6; stroke-dasharray: 3 3; animation: pulse 2.4s ease-in-out infinite; transform-origin: 230px 560px; }
.topology .waiting-label { fill: var(--amber); }
@keyframes march { to { stroke-dashoffset: -16; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
.hero-copy { position: relative; max-width: 720px; display: flex; flex-direction: column; gap: 20px; }
.hero h1 { font-size: clamp(30px, 4.2vw, 44px); line-height: 1.15; font-weight: 500; letter-spacing: -.01em; color: var(--ink); }
.lede { font-size: 17px; line-height: 1.55; color: var(--mid); max-width: 560px; text-wrap: pretty; }
.cta-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.cmd { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px 0 16px; border: 1px solid var(--faint); border-radius: 6px; background: var(--s1); color: var(--ink-2); font-size: 12px; max-width: 100%; min-width: 0; }
.cmd code { display: block; min-width: 0; white-space: nowrap; overflow-x: auto; direction: ltr; }
.prompt { color: var(--dim); }
.copy { background: transparent; border: 0; color: var(--dim); cursor: pointer; font-size: 14px; padding: 4px 6px; border-radius: 4px; }
.copy:hover { color: var(--ink); background: var(--s2); }
.chips { list-style: none; margin: 8px 0 0; padding: 0; display: flex; gap: 22px; flex-wrap: wrap; font-size: 11px; letter-spacing: .08em; color: var(--dim); }
.live { position: absolute; inset-inline-start: clamp(16px, 4vw, 64px); bottom: 24px; display: flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: .08em; color: var(--dim); }
.live .dot { width: 7px; height: 7px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: pulse 2.4s ease-in-out infinite; }
@media (max-width: 900px) { .topology { opacity: .35; width: 100%; } .hero { min-height: 0; padding-top: 56px; } .live { display: none; } }

/* sections */
.band { padding: 80px 0; border-top: 1px solid var(--line); background: var(--s1); }
.feature { padding: 80px 0; border-top: 1px solid var(--line); }
.steps { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.steps li { padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--ground); }
.steps .num { display: block; font-size: 11px; letter-spacing: .14em; color: var(--accent); margin-bottom: 12px; }
.ticks { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; color: var(--ink-2); }
.ticks li { padding-inline-start: 22px; position: relative; }
.ticks li::before { content: ""; position: absolute; inset-inline-start: 0; top: .5em; width: 12px; height: 7px; border-inline-start: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
[dir="rtl"] .ticks li::before { transform: rotate(45deg) scaleX(-1); }
.shot { margin: 0; }
.shot-frame { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #0B0F0D; box-shadow: var(--shadow); }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { margin-top: 10px; font-size: 11px; letter-spacing: .08em; color: var(--dim); text-transform: uppercase; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 12px; }
.grid3 article { padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--ground); }
.grid3 p { font-size: 14px; margin: 0; }
.cmds { list-style: none; margin: 20px 0; padding: 0; display: grid; gap: 10px; max-width: 760px; }
.cmds li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--s1); font-size: 13px; color: var(--ink-2); min-width: 0; }
.cmds code { display: block; min-width: 0; white-space: nowrap; overflow-x: auto; direction: ltr; }
/* Any remaining wide element scrolls inside its own box; the page itself never scrolls sideways. */
body { overflow-x: clip; }
.cmds span[data-i18n] { font-family: var(--sans); font-size: 14px; color: var(--mid); }
@media (max-width: 900px) { .wrap.two, .steps, .grid3 { grid-template-columns: 1fr; } .wrap.two { gap: 28px; } }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 12px; }
.plan { display: flex; flex-direction: column; gap: 10px; padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: var(--ground); }
.plan h3 { font-size: 12px; letter-spacing: .14em; color: var(--dim); font-weight: 600; }
.price { font-size: 26px; color: var(--ink); margin: 0; }
.price span { font-size: 13px; color: var(--dim); }
.plan p:not(.price) { font-size: 14px; flex-grow: 1; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }

/* compare */
.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--s1); margin-top: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; min-width: 640px; }
th { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); text-align: start; padding: 10px 14px; border-bottom: 1px solid var(--line); font-weight: 600; }
th:nth-child(2) { color: var(--accent); }
td { padding: 10px 14px; border-bottom: 1px solid var(--hair); color: var(--mid); }
td:first-child { color: var(--ink); }
td.yes { color: var(--accent); font-family: var(--mono); }
td.no { color: var(--faint); }
tr:last-child td { border-bottom: 0; }

/* faq */
details { border-top: 1px solid var(--line); padding: 14px 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--mono); color: var(--accent); }
details[open] summary::after { content: "−"; }
details p { margin: 10px 0 0; }

/* waitlist */
.wl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; max-width: 520px; }
.wl input[type="email"] { height: 44px; padding: 0 14px; border: 1px solid var(--faint); border-radius: 6px; background: var(--s1); color: var(--ink); font-size: 13px; min-width: 0; }
.wl input::placeholder { color: var(--faint); }
.wl input:focus { border-color: var(--accent); outline: none; }
/* Honeypot: hidden by clipping, never by a negative offset (a negative left offset in RTL becomes scrollable overflow). */
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wl-msg { grid-column: 1 / -1; min-height: 1.2em; font-size: 12px; color: var(--dim); margin: 0; }
.wl-msg.ok { color: var(--accent); } .wl-msg.err { color: var(--red); }
@media (max-width: 520px) { .wl { grid-template-columns: 1fr; } }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 40px 0 32px; background: var(--s1); }
.foot-grid { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; margin-bottom: 20px; }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.foot nav a { font-size: 13px; color: var(--mid); text-decoration: none; }
.foot nav a:hover { color: var(--ink); }
.foot .fine.mono { font-size: 11px; letter-spacing: .06em; }
