:root {
    --bg: #000309;
    --bg-panel: #05080f;
    --bg-panel-2: #090f1a;
    --line: #0d3547;
    --line-bright: #16647f;
    --ink: #d6f2ff;
    --ink-dim: #5a8fa6;
    --ink-mid: #8fb8cc;
    --cyan: #4df0ff;
    --cyan-deep: #1ac4dd;
    --orange: #ff7a18;
    --amber: #f2c94c;
    --font-display: 'Orbitron', 'Rajdhani', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Share Tech Mono', ui-monospace, monospace;
    --font-body: 'Rajdhani', 'Inter', system-ui, sans-serif;
  }
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
  }
  ::selection { background: var(--cyan); color: var(--bg); }

  /* Global scanline overlay — matches main site */
  body::before {
    content: ''; position: fixed; inset: 0; z-index: 9998; pointer-events: none;
    background-image: repeating-linear-gradient(0deg, transparent 0 3px, rgba(77,240,255,.025) 3px 4px);
    mix-blend-mode: screen;
  }

  @keyframes flicker { 0%,100%{opacity:1} 50%{opacity:.88} 52%{opacity:1} }
  @keyframes drift {
    0% { background-position: 0 0, 0 0; }
    100% { background-position: 0 80px, 80px 0; }
  }

  /* ── Nav ───────────────────────────────────────────────── */
  nav.tron-nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(0,3,9,0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    padding: 14px 56px;
  }
  nav.tron-nav .wrap {
    max-width: 1280px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
  }
  nav.tron-nav .brand {
    display: flex; align-items: center; gap: 10px; text-decoration: none;
  }
  .tron-hex {
    width: 22px; height: 22px;
    background: var(--cyan); color: var(--bg);
    clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-weight: 700; font-size: 11px;
    box-shadow: 0 0 12px var(--cyan);
  }
  nav.tron-nav .brand-text {
    font-family: var(--font-display); font-size: 14px; font-weight: 600;
    color: var(--ink); letter-spacing: 2px; text-transform: uppercase;
  }
  nav.tron-nav .brand-text span { color: var(--cyan); text-shadow: 0 0 10px var(--cyan); }
  nav.tron-nav .links { display: flex; gap: 28px; align-items: center; }
  nav.tron-nav .links a {
    font-family: var(--font-mono); font-size: 11px; color: var(--ink-dim);
    text-decoration: none; letter-spacing: 2px; text-transform: uppercase;
    transition: all .15s;
  }
  nav.tron-nav .links a:hover {
    color: var(--cyan); text-shadow: 0 0 12px var(--cyan);
  }
  nav.tron-nav .consult {
    font-family: var(--font-mono); font-size: 11px; font-weight: 700;
    letter-spacing: 2px; text-transform: uppercase;
    padding: 9px 16px;
    background: var(--cyan); color: var(--bg);
    text-decoration: none;
    box-shadow: 0 0 16px rgba(77,240,255,0.5);
  }

  /* ── Hero / article header ─────────────────────────────── */
  header.article-hero {
    position: relative; overflow: hidden;
    padding: 80px 56px 72px;
    border-bottom: 1px solid var(--line);
  }
  header.article-hero .grid-bg {
    position: absolute; inset: 0; opacity: .5;
    background-image:
      linear-gradient(rgba(77,240,255,0.08) 1px, transparent 1px),
      linear-gradient(90deg, rgba(77,240,255,0.08) 1px, transparent 1px);
    background-size: 64px 64px;
    animation: drift 16s linear infinite;
    mask-image: linear-gradient(180deg, black, transparent 90%);
    -webkit-mask-image: linear-gradient(180deg, black, transparent 90%);
  }
  header.article-hero .horizon {
    position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    box-shadow: 0 0 30px var(--cyan), 0 0 60px rgba(77,240,255,0.5);
  }
  header.article-hero .wrap {
    position: relative; max-width: 1080px; margin: 0 auto;
  }
  .breadcrumb {
    font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.5px;
    color: var(--ink-dim); text-transform: uppercase;
    margin-bottom: 28px;
  }
  .breadcrumb a { color: var(--ink-dim); text-decoration: none; }
  .breadcrumb a:hover { color: var(--cyan); }
  .breadcrumb .sep { color: var(--line-bright); margin: 0 10px; }
  .breadcrumb .active { color: var(--cyan); }

  .tron-chip {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font-mono); font-size: 11px; font-weight: 600;
    letter-spacing: 2px; text-transform: uppercase;
    padding: 6px 12px;
    border: 1px solid var(--line-bright);
    color: var(--cyan);
    background: rgba(77,240,255,0.05);
    box-shadow: 0 0 12px rgba(77,240,255,0.15) inset;
  }
  .tron-chip .dot {
    width: 6px; height: 6px; background: var(--cyan); border-radius: 1px;
    box-shadow: 0 0 8px var(--cyan); animation: flicker 3s infinite;
  }

  h1.article-title {
    font-family: var(--font-display);
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.05; letter-spacing: 1px;
    color: var(--ink); font-weight: 500; text-transform: uppercase;
    margin: 20px 0 24px; max-width: 18ch;
  }
  h1.article-title .glow {
    color: var(--cyan);
    text-shadow: 0 0 18px var(--cyan), 0 0 40px rgba(77,240,255,0.5);
    font-weight: 600;
  }

  .lede {
    font-family: var(--font-body); font-size: 20px; line-height: 1.55;
    color: var(--ink-mid); max-width: 68ch; margin: 0 0 32px;
  }

  .meta-row {
    display: flex; flex-wrap: wrap; gap: 12px 24px;
    padding: 16px 20px;
    border: 1px solid var(--line);
    background: rgba(5,8,15,0.6);
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  }
  .meta-row .meta-item {
    display: flex; align-items: baseline; gap: 10px;
    font-family: var(--font-mono); font-size: 12px;
    letter-spacing: 1.2px; text-transform: uppercase;
  }
  .meta-row .meta-label { color: var(--ink-dim); }
  .meta-row .meta-value { color: var(--ink); }
  .meta-row a { color: var(--cyan); text-decoration: none; }
  .meta-row a:hover { text-shadow: 0 0 10px var(--cyan); }

  .tag-stack {
    display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0;
  }
  .tag-stack .tag {
    font-family: var(--font-mono); font-size: 10.5px; font-weight: 500;
    letter-spacing: 1.5px; text-transform: uppercase;
    padding: 5px 10px;
    border: 1px solid var(--line);
    color: var(--ink-mid);
    background: rgba(9,15,26,0.5);
    text-decoration: none;
    transition: all .15s;
  }
  .tag-stack .tag:hover {
    border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 12px rgba(77,240,255,0.3);
  }

  /* ── Article body ──────────────────────────────────────── */
  main.article-body {
    max-width: 860px; margin: 0 auto;
    padding: 72px 56px 120px;
    font-family: var(--font-body); font-size: 18px; line-height: 1.75;
    color: var(--ink-mid);
  }
  main.article-body h2 {
    font-family: var(--font-display); font-size: 28px; line-height: 1.15;
    letter-spacing: 1px; color: var(--ink); font-weight: 500;
    text-transform: uppercase;
    margin: 72px 0 20px;
    position: relative; padding-left: 20px;
  }
  main.article-body h2::before {
    content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px;
    background: var(--cyan); box-shadow: 0 0 12px var(--cyan);
  }
  main.article-body h2 .idx {
    font-family: var(--font-mono); font-size: 12px; color: var(--cyan);
    letter-spacing: 2px; margin-right: 12px; opacity: 0.85;
  }
  main.article-body h3 {
    font-family: var(--font-display); font-size: 18px; letter-spacing: 0.8px;
    color: var(--cyan); font-weight: 500; text-transform: uppercase;
    margin: 44px 0 14px;
  }
  main.article-body p { margin: 0 0 18px; color: var(--ink-mid); }
  main.article-body p strong { color: var(--ink); font-weight: 600; }
  main.article-body a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
  main.article-body a:hover { text-shadow: 0 0 10px var(--cyan); }
  main.article-body ul { padding: 0; margin: 0 0 22px; list-style: none; }
  main.article-body li {
    position: relative; padding-left: 22px; margin-bottom: 10px;
  }
  main.article-body li::before {
    content: '▸'; position: absolute; left: 0; top: 0; color: var(--cyan);
    font-family: var(--font-mono); font-size: 14px;
  }
  main.article-body li strong { color: var(--ink); }
  main.article-body code {
    font-family: var(--font-mono); font-size: 0.88em;
    background: rgba(77,240,255,0.08);
    color: var(--cyan); padding: 2px 7px;
    border: 1px solid var(--line);
  }
  main.article-body pre {
    position: relative;
    background: var(--bg-panel); border: 1px solid var(--line-bright);
    padding: 22px 24px; margin: 28px 0;
    font-family: var(--font-mono); font-size: 13px; line-height: 1.6;
    color: var(--cyan);
    overflow-x: auto;
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
    box-shadow: 0 0 40px rgba(77,240,255,0.1), inset 0 0 40px rgba(77,240,255,0.04);
  }
  main.article-body pre::before {
    content: '// diagram · system flow';
    display: block;
    font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px;
    color: var(--ink-dim); text-transform: uppercase;
    margin-bottom: 14px; padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
  }
  main.article-body pre code {
    background: transparent; border: none; padding: 0; color: inherit;
  }

  /* Image frames */
  figure.shot {
    margin: 36px 0; position: relative;
    border: 1px solid var(--line-bright);
    background: var(--bg-panel);
    box-shadow: 0 0 50px rgba(77,240,255,0.12);
    clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  }
  figure.shot .frame-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
    background: var(--bg-panel-2);
    font-family: var(--font-mono); font-size: 10px; letter-spacing: 1.5px;
    text-transform: uppercase; color: var(--ink-dim);
  }
  figure.shot .frame-bar .dots { display: flex; gap: 5px; }
  figure.shot .frame-bar .dots span {
    width: 8px; height: 8px; background: var(--line-bright); border-radius: 1px;
  }
  figure.shot .frame-bar .dots span:first-child { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
  figure.shot img {
    display: block; width: 100%; height: auto; filter: saturate(1.1);
  }
  figure.shot .placeholder {
    aspect-ratio: 16 / 9;
    background:
      linear-gradient(135deg, rgba(77,240,255,0.05), rgba(26,196,221,0.02)),
      repeating-linear-gradient(45deg, rgba(77,240,255,0.04) 0 2px, transparent 2px 18px),
      var(--bg-panel-2);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-mono); font-size: 12px; letter-spacing: 2px;
    text-transform: uppercase; color: var(--ink-dim);
    text-align: center; padding: 40px;
  }
  figure.shot figcaption {
    padding: 12px 18px;
    border-top: 1px solid var(--line);
    font-family: var(--font-mono); font-size: 11px; letter-spacing: 1px;
    color: var(--ink-dim);
  }

  /* Results callout */
  .results-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px; margin: 28px 0;
  }
  .result-card {
    border: 1px solid var(--line);
    padding: 18px 20px;
    background: rgba(9,15,26,0.5);
    position: relative;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  }
  .result-card .icon {
    font-family: var(--font-mono); font-size: 11px; color: var(--cyan);
    letter-spacing: 2px; margin-bottom: 8px;
  }
  .result-card strong { color: var(--ink); display: block; margin-bottom: 4px; font-size: 15px; }
  .result-card span { font-size: 14px; line-height: 1.5; color: var(--ink-mid); }

  /* ── CTA band ──────────────────────────────────────────── */
  .cta-band {
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    padding: 80px 56px;
    background:
      radial-gradient(ellipse at center, rgba(77,240,255,0.08), transparent 70%),
      var(--bg);
    text-align: center;
    position: relative; overflow: hidden;
  }
  .cta-band::before {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 80%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    box-shadow: 0 0 30px var(--cyan);
  }
  .cta-band h2 {
    font-family: var(--font-display); font-size: clamp(32px, 4.5vw, 56px);
    line-height: 1.05; letter-spacing: 1px;
    color: var(--ink); font-weight: 500; text-transform: uppercase;
    margin: 16px 0 20px;
  }
  .cta-band h2 .glow { color: var(--cyan); text-shadow: 0 0 22px var(--cyan); }
  .cta-band p {
    font-family: var(--font-body); font-size: 18px; color: var(--ink-mid);
    max-width: 60ch; margin: 0 auto 32px;
  }
  .cta-band .actions { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
  .cta-primary {
    font-family: var(--font-mono); font-size: 13px; font-weight: 700;
    letter-spacing: 2px; text-transform: uppercase;
    padding: 16px 28px;
    background: var(--cyan); color: var(--bg);
    border: none; cursor: pointer;
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
    box-shadow: 0 0 30px rgba(77,240,255,0.6), 0 0 60px rgba(77,240,255,0.3);
    text-decoration: none;
    display: inline-block;
  }
  .cta-ghost {
    font-family: var(--font-mono); font-size: 13px; font-weight: 600;
    letter-spacing: 2px; text-transform: uppercase;
    padding: 16px 28px;
    background: transparent; color: var(--ink);
    border: 1px solid var(--line-bright);
    text-decoration: none;
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
    display: inline-block;
    transition: all .15s;
  }
  .cta-ghost:hover {
    border-color: var(--cyan); color: var(--cyan);
    box-shadow: 0 0 16px rgba(77,240,255,0.4);
  }

  /* ── Footer ────────────────────────────────────────────── */
  footer.tron-foot {
    background: var(--bg-panel);
    border-top: 1px solid var(--line);
    padding: 32px 56px;
  }
  footer.tron-foot .wrap {
    max-width: 1280px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 16px;
    font-family: var(--font-mono); font-size: 11px;
    letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink-dim);
  }
  footer.tron-foot a { color: var(--ink-mid); text-decoration: none; margin-left: 20px; }
  footer.tron-foot a:hover { color: var(--cyan); }

  /* ── Mobile ────────────────────────────────────────────── */
  @media (max-width: 720px) {
    nav.tron-nav { padding: 12px 20px; }
    nav.tron-nav .links { gap: 14px; }
    nav.tron-nav .links a { display: none; }
    header.article-hero { padding: 56px 20px 48px; }
    main.article-body { padding: 48px 20px 80px; font-size: 16.5px; }
    main.article-body pre { font-size: 11.5px; padding: 16px; }
    .cta-band { padding: 60px 20px; }
    footer.tron-foot { padding: 24px 20px; }
  }