body.j-arcgisroute {
    --paper: var(--bg-a);
    --rust: var(--brand);
    --topo: var(--brand-deep);
    --mist: var(--muted);
    --gold: var(--brand);
    --grid: rgba(16, 35, 63, .06);
    overflow-x: hidden;
  }

  body.j-arcgisroute main,
  :where(body.j-arcgisroute) main *,
  :where(body.j-arcgisroute) main *::before,
  :where(body.j-arcgisroute) main *::after {
    margin: 0;
    padding: 0;
  }

  /* Topo grid background */
  body.j-arcgisroute::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
      repeating-linear-gradient(0deg, var(--grid) 0px, transparent 1px, transparent 60px, var(--grid) 61px),
      repeating-linear-gradient(90deg, var(--grid) 0px, transparent 1px, transparent 60px, var(--grid) 61px);
    pointer-events: none;
    z-index: 0;
  }

  .nav-logo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 0.12em;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .nav-logo .dot {
    width: 8px; height: 8px;
    background: var(--rust);
    border-radius: 50%;
  }

  .nav-links {
    display: flex;
    gap: 36px;
    list-style: none;
  }

  .nav-links a {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink);
    text-decoration: none;
    opacity: 0.6;
    transition: opacity 0.2s;
  }

  .nav-links a:hover { opacity: 1; }

  .nav-cta {
    font-family: 'DM Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    padding: 10px 22px;
    background: var(--ink);
    color: var(--paper);
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
  }

  .nav-cta:hover { background: var(--rust); }

  /* ── HERO ── */
  .hero {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    padding: 120px 48px 80px;
    gap: 60px;
    overflow: hidden;
    z-index: 1;
  }

  .hero-content {
    max-width: 760px;
  }

  .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'DM Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--topo);
    border: 1px solid var(--topo);
    padding: 6px 14px;
    margin-bottom: 28px;
    animation: fadeUp 0.8s ease both;
  }

  .hero-badge::before {
    content: '';
    width: 6px; height: 6px;
    background: var(--topo);
    border-radius: 50%;
    animation: pulse 2s infinite;
  }

  @keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
  }

  .hero h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(4rem, 7vw, 7.5rem);
    line-height: 0.95;
    letter-spacing: 0.02em;
    color: var(--ink);
    margin-bottom: 28px;
    animation: fadeUp 0.8s 0.1s ease both;
  }

  .hero h1 em {
    font-style: normal;
    color: var(--rust);
    display: block;
  }

  .hero-desc {
    font-size: 1.05rem;
    font-weight: 300;
    line-height: 1.7;
    color: rgba(10,15,26,0.65);
    max-width: 440px;
    margin-bottom: 40px;
    animation: fadeUp 0.8s 0.2s ease both;
  }

  .hero-actions {
    display: flex;
    gap: 16px;
    align-items: center;
    animation: fadeUp 0.8s 0.3s ease both;
  }

  .btn-primary {
    font-family: 'DM Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 16px 36px;
    background: var(--rust);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
  }

  .btn-primary:hover {
    background: var(--ink);
    transform: translateY(-2px);
  }

  .btn-secondary {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ink);
    opacity: 0.5;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s;
    text-decoration: none;
    cursor: pointer;
  }

  .btn-secondary:hover { opacity: 1; }

  .hero-visual {
    position: relative;
    animation: fadeIn 1.2s 0.4s ease both;
  }

  /* Topo contour illustration */
  .topo-map {
    width: 100%;
    aspect-ratio: 1;
    position: relative;
  }

  .topo-map svg {
    width: 100%;
    height: 100%;
    opacity: 0.15;
    position: absolute;
    inset: 0;
  }

  .map-card {
    position: relative;
    background: var(--ink);
    padding: 32px;
    overflow: hidden;
  }

  .map-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
      45deg,
      transparent,
      transparent 8px,
      rgba(255,255,255,0.02) 8px,
      rgba(255,255,255,0.02) 16px
    );
  }

  .map-label {
    font-family: 'DM Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--mist);
    margin-bottom: 20px;
  }

  .route-vis {
    position: relative;
    height: 320px;
  }

  .point-marker {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .point-marker .pin {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    color: white;
    flex-shrink: 0;
  }

  .point-marker .pin.start { background: var(--topo); }
  .point-marker .pin.end { background: var(--rust); }

  .point-marker .pin-label {
    font-family: 'DM Mono', monospace;
    font-size: 0.7rem;
    color: var(--mist);
  }

  .point-marker.a { top: 30px; left: 20px; }
  .point-marker.b { bottom: 30px; right: 20px; }

  .route-line {
    position: absolute;
    inset: 0;
  }

  /* Stats bar */
  .stats-row {
    display: flex;
    gap: 0;
    margin-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 20px;
  }

  .stat-item {
    flex: 1;
    text-align: center;
    padding: 0 16px;
    border-right: 1px solid rgba(255,255,255,0.08);
  }

  .stat-item:last-child { border-right: none; }

  .stat-val {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 4px;
  }

  .stat-lbl {
    font-family: 'DM Mono', monospace;
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    color: var(--mist);
    text-transform: uppercase;
  }

  /* ── SECTION BASE ── */
  :where(body.j-arcgisroute) main section {
    position: relative;
    z-index: 1;
    padding: 100px 48px;
  }

  .section-tag {
    font-family: 'DM Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--rust);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .section-tag::before {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--rust);
  }

  .section-h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2.5rem, 4vw, 4.5rem);
    line-height: 1;
    letter-spacing: 0.02em;
    color: var(--ink);
    margin-bottom: 20px;
  }

  .section-lead {
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.75;
    color: rgba(10,15,26,0.6);
    max-width: 520px;
    margin-bottom: 60px;
  }

  /* ── FEATURES ── */
  .features {
    background: var(--ink);
    color: var(--paper);
  }

  .features .section-tag { color: var(--gold); }
  .features .section-tag::before { background: var(--gold); }
  .features .section-h2 { color: var(--paper); }
  .features .section-lead { color: rgba(244,241,235,0.5); }

  .features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.08);
  }

  .feat-card {
    background: var(--ink);
    padding: 40px 36px;
    transition: background 0.3s;
    position: relative;
    overflow: hidden;
  }

  .feat-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 2px;
    background: var(--rust);
    transition: width 0.4s ease;
  }

  .feat-card:hover { background: #121927; }
  .feat-card:hover::after { width: 100%; }

  .feat-num {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3.5rem;
    line-height: 1;
    color: rgba(244,241,235,0.08);
    position: absolute;
    top: 20px; right: 24px;
  }

  .feat-icon {
    width: 44px; height: 44px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .feat-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--paper);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
  }

  .feat-desc {
    font-size: 0.875rem;
    font-weight: 300;
    line-height: 1.7;
    color: rgba(244,241,235,0.5);
  }

  /* ── HOW IT WORKS ── */
  .how-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
  }

  .step-list { counter-reset: steps; }

  .step-item {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 24px;
    padding: 32px 0;
    border-bottom: 1px solid rgba(10,15,26,0.08);
    counter-increment: steps;
    animation: fadeUp 0.6s ease both;
  }

  .step-item:first-child { padding-top: 0; border-top: 1px solid rgba(10,15,26,0.08); }

  .step-num {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    color: rgba(10,15,26,0.12);
    line-height: 1;
    padding-top: 4px;
  }

  .step-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--ink);
  }

  .step-body {
    font-size: 0.875rem;
    font-weight: 300;
    line-height: 1.7;
    color: rgba(10,15,26,0.55);
  }

  /* Parameter panel mockup */
  .panel-mockup {
    background: white;
    border: 1px solid rgba(10,15,26,0.1);
    box-shadow: 24px 24px 0px rgba(10,15,26,0.06);
    overflow: hidden;
  }

  .panel-header {
    background: var(--ink);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .panel-title {
    font-family: 'DM Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    color: var(--mist);
    text-transform: uppercase;
  }

  .panel-dots {
    margin-left: auto;
    display: flex;
    gap: 6px;
  }

  .panel-dots span {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
  }

  .panel-body { padding: 24px; }

  .field-group { margin-bottom: 20px; }

  .field-label {
    font-family: 'DM Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(10,15,26,0.4);
    margin-bottom: 6px;
  }

  .field-input {
    width: 100%;
    padding: 10px 14px;
    background: #f8f7f3;
    border: 1px solid rgba(10,15,26,0.1);
    font-family: 'DM Mono', monospace;
    font-size: 0.75rem;
    color: var(--ink);
  }

  .field-input.active {
    border-color: var(--topo);
    background: rgba(42,95,78,0.04);
  }

  .field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .field-coord {
    padding: 10px 14px;
    background: rgba(42,95,78,0.06);
    border: 1px solid var(--topo);
    font-family: 'DM Mono', monospace;
    font-size: 0.7rem;
    color: var(--topo);
  }

  .run-btn {
    width: 100%;
    padding: 14px;
    background: var(--rust);
    color: white;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    border: none;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.2s;
  }

  .run-btn:hover { background: var(--ink); }

  /* ── PARAMETERS ── */
  .params-section {
    background: #f0ede6;
  }

  .params-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    background: rgba(10,15,26,0.06);
  }

  .param-card {
    background: #f0ede6;
    padding: 32px 28px;
    transition: background 0.2s;
  }

  .param-card:hover { background: var(--paper); }

  .param-name {
    font-family: 'DM Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--rust);
    margin-bottom: 10px;
  }

  .param-default {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.2rem;
    line-height: 1;
    color: var(--ink);
    margin-bottom: 8px;
  }

  .param-desc {
    font-size: 0.8rem;
    font-weight: 300;
    line-height: 1.6;
    color: rgba(10,15,26,0.5);
  }

  /* ── TECH STACK ── */
  .tech-strip {
    padding: 40px 48px;
    background: var(--ink);
    display: flex;
    align-items: center;
    gap: 48px;
    overflow-x: auto;
  }

  .tech-label {
    font-family: 'DM Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    white-space: nowrap;
    flex-shrink: 0;
    margin-right: 8px;
  }

  .tech-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border: 1px solid rgba(255,255,255,0.12);
    white-space: nowrap;
    flex-shrink: 0;
  }

  .tech-pill span {
    font-family: 'DM Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.55);
  }

  /* ── FOOTER ── */
  footer {
    position: relative;
    z-index: 1;
    padding: 60px 48px 40px;
    border-top: 1px solid rgba(10,15,26,0.1);
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    gap: 40px;
  }

  .footer-brand {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    letter-spacing: 0.1em;
    color: var(--ink);
    opacity: 0.15;
  }

  .footer-meta {
    font-family: 'DM Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    color: rgba(10,15,26,0.35);
    line-height: 1.8;
    text-align: right;
  }

  /* ── ANIMATIONS ── */
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
  }

  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  @keyframes drawLine {
    from { stroke-dashoffset: 800; }
    to { stroke-dashoffset: 0; }
  }

  .route-svg path {
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    animation: drawLine 2.5s 1s ease forwards;
  }

  /* Scroll reveal */
  .reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* ── RESPONSIVE ── */
  @media (max-width: 900px) {

    .nav-links { display: none; }
    .hero { min-height: 0; grid-template-columns: 1fr; padding: 64px 24px 60px; }
    :where(body.j-arcgisroute) main section { padding: 70px 24px; }
    .how-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .params-grid { grid-template-columns: repeat(2, 1fr); }
    footer { grid-template-columns: 1fr; }
    .footer-meta { text-align: left; }
    .tech-strip { padding: 32px 24px; }
  }
