/* ============================================================
   AINNA R&D — Agentic AI Controlled Modular Collapsible Drying System
   Design language: advanced industrial R&D + IoT + AI + engineering
   Dark technical base, aluminium/metallic accents, technical grid.
   Theme: defaults dark; [data-theme="light"] gives a lab-paper light mode.
   ============================================================ */

:root {
  --rd-bg: #06090f;
  --rd-bg2: #0a0e16;
  --rd-panel: rgba(255, 255, 255, 0.035);
  --rd-panel2: rgba(255, 255, 255, 0.06);
  --rd-line: rgba(148, 163, 184, 0.16);
  --rd-line-strong: rgba(148, 163, 184, 0.34);
  --rd-text: #eef3fa;
  --rd-muted: #94a3b8;
  --rd-dim: #64748b;
  --rd-alum: #c3ceda;
  --rd-iot: #38bdf8;
  --rd-iot-2: #22d3ee;
  --rd-ai: #a78bfa;
  --rd-ai-2: #c4b5fd;
  --rd-safety: #f59e0b;
  --rd-danger: #ef4444;
  --rd-ok: #34d399;
  --rd-grid: rgba(148, 163, 184, 0.05);
  --rd-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --rd-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --rd-radius: 16px;
  --rd-max: 1180px;
  --rd-nav-h: 60px;
}

html[data-theme="light"] {
  --rd-bg: #f1f4f9;
  --rd-bg2: #e7ecf3;
  --rd-panel: rgba(255, 255, 255, 0.82);
  --rd-panel2: rgba(255, 255, 255, 0.95);
  --rd-line: rgba(15, 23, 42, 0.13);
  --rd-line-strong: rgba(15, 23, 42, 0.28);
  --rd-text: #0f172a;
  --rd-muted: #475569;
  --rd-dim: #64748b;
  --rd-alum: #334155;
  --rd-iot: #0369a1;
  --rd-iot-2: #0e7490;
  --rd-ai: #6d28d9;
  --rd-ai-2: #7c3aed;
  --rd-safety: #b45309;
  --rd-danger: #b4232f;
  --rd-ok: #047857;
  --rd-grid: rgba(15, 23, 42, 0.045);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--rd-sans);
  color: var(--rd-text);
  background-color: var(--rd-bg);
  background-image:
    radial-gradient(circle at 12% -4%, rgba(56, 189, 248, 0.10), transparent 34%),
    radial-gradient(circle at 88% 6%, rgba(167, 139, 250, 0.09), transparent 30%),
    linear-gradient(180deg, var(--rd-bg) 0%, var(--rd-bg2) 55%, var(--rd-bg) 100%);
  background-attachment: fixed;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Technical grid overlay */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--rd-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--rd-grid) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 82%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 82%);
}

.rd-page { position: relative; z-index: 1; }

.rd-wrap { width: min(calc(100% - 36px), var(--rd-max)); margin: 0 auto; }
.rd-narrow { width: min(calc(100% - 36px), 880px); margin: 0 auto; }

.rd-mono { font-family: var(--rd-mono); }

/* ---------- Nav ---------- */
.rd-nav {
  position: sticky; top: 0; z-index: 500;
  background: color-mix(in srgb, var(--rd-bg) 86%, transparent);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid var(--rd-line);
}
.rd-nav-inner {
  min-height: var(--rd-nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; padding: 8px 0;
}
.rd-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--rd-text); }
.rd-brand-mark {
  width: 34px; height: 34px; border-radius: 9px; flex: 0 0 auto;
  display: grid; place-items: center;
  border: 1px solid var(--rd-line-strong);
  background: linear-gradient(140deg, rgba(56,189,248,.18), rgba(167,139,250,.14));
  box-shadow: 0 0 18px rgba(56,189,248,.16);
}
.rd-brand-mark svg { width: 20px; height: 20px; }
.rd-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.rd-brand-text strong { font-size: 13.5px; font-weight: 800; letter-spacing: -0.01em; }
.rd-brand-text span { font-size: 10px; font-family: var(--rd-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--rd-dim); }
.rd-nav-links { display: flex; gap: 16px; font-size: 13px; font-weight: 600; }
.rd-nav-links a { color: var(--rd-muted); text-decoration: none; transition: color .2s; }
.rd-nav-links a:hover { color: var(--rd-iot); }
.rd-nav-controls { display: inline-flex; align-items: center; }
@media (max-width: 900px) { .rd-nav-links { display: none; } }
@media (max-width: 460px) { .rd-brand-text span { display: none; } }

/* ---------- Section shell ---------- */
.rd-section { padding: clamp(56px, 8vw, 104px) 0; position: relative; }
.rd-section--tight { padding: clamp(40px, 5vw, 64px) 0; }
.rd-section--alt { background: color-mix(in srgb, var(--rd-panel) 55%, transparent); border-top: 1px solid var(--rd-line); border-bottom: 1px solid var(--rd-line); }

.rd-kicker {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--rd-line-strong);
  background: var(--rd-panel);
  font-family: var(--rd-mono); font-size: 10.5px; font-weight: 800;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--rd-muted);
}
.rd-kicker .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rd-iot); box-shadow: 0 0 10px var(--rd-iot); }
.rd-kicker--ai .dot { background: var(--rd-ai); box-shadow: 0 0 10px var(--rd-ai); }
.rd-kicker--safety .dot { background: var(--rd-safety); box-shadow: 0 0 10px var(--rd-safety); }

.rd-h2 { font-size: clamp(26px, 4vw, 44px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 800; margin: 18px 0 14px; }
.rd-h3 { font-size: clamp(18px, 2.2vw, 24px); line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; margin: 0 0 8px; }
.rd-lead { font-size: clamp(15px, 1.7vw, 18px); color: var(--rd-muted); max-width: 74ch; }
.rd-section-head { max-width: 860px; margin-bottom: clamp(28px, 4vw, 48px); }

.rd-note {
  font-family: var(--rd-mono); font-size: 11.5px; line-height: 1.65;
  color: var(--rd-dim); border-left: 2px solid var(--rd-line-strong);
  padding: 6px 0 6px 14px; margin-top: 22px;
}
.rd-note--warn { border-left-color: var(--rd-safety); color: var(--rd-safety); }

.rd-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-family: var(--rd-mono); font-size: 10px; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid var(--rd-line-strong); background: var(--rd-panel); color: var(--rd-muted);
}
.rd-tag--concept { border-color: rgba(245,158,11,.5); color: #fbbf24; background: rgba(245,158,11,.08); }
.rd-tag--iot { border-color: rgba(56,189,248,.5); color: var(--rd-iot); background: rgba(56,189,248,.08); }
.rd-tag--ai { border-color: rgba(167,139,250,.5); color: var(--rd-ai-2); background: rgba(167,139,250,.08); }
.rd-tag--safety { border-color: rgba(239,68,68,.5); color: #fca5a5; background: rgba(239,68,68,.08); }

/* ---------- Hero ---------- */
.rd-hero { padding: calc(var(--rd-nav-h) + clamp(30px, 6vw, 64px)) 0 clamp(40px, 5vw, 64px); position: relative; overflow: hidden; }
.rd-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(28px, 5vw, 60px); align-items: center; }

/* Desktop: keep the hero within the first viewport so nothing is cut off. */
@media (min-width: 1000px) {
  .rd-hero {
    min-height: calc(100svh - var(--rd-nav-h));
    display: flex;
    align-items: center;
    padding-top: clamp(20px, 3vh, 40px);
    padding-bottom: clamp(20px, 3vh, 40px);
  }
  .rd-hero > .rd-hero-grid {
    width: min(calc(100% - 36px), var(--rd-max));
    margin: 0 auto;
    gap: clamp(20px, 3vw, 44px);
  }
  .rd-hero h1 { font-size: clamp(30px, 3.4vw, 50px); margin: 12px 0 10px; }
  .rd-hero-sub { font-size: clamp(14px, 1.35vw, 18px); }
  .rd-hero .rd-lead { font-size: 15px; }
  .rd-hero-visual svg { max-height: 62vh; width: auto; max-width: 100%; margin: 0 auto; }
  .rd-hero .rd-note { margin-top: 14px; padding-top: 4px; padding-bottom: 4px; }
}
.rd-hero-copy { position: relative; z-index: 3; }
.rd-hero h1 {
  font-size: clamp(30px, 5.4vw, 62px); line-height: 1.02;
  letter-spacing: -0.04em; font-weight: 900; margin: 18px 0 12px;
}
.rd-hero h1 .grad {
  background: linear-gradient(100deg, var(--rd-iot), var(--rd-ai-2) 60%, var(--rd-alum));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.rd-hero-sub { font-size: clamp(15px, 1.9vw, 20px); font-weight: 600; color: var(--rd-alum); margin: 0 0 14px; max-width: 46ch; }
.rd-hero-copy p.rd-lead { max-width: 56ch; }
.rd-hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.rd-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.rd-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px;
  font-size: 14.5px; font-weight: 700; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .2s, box-shadow .3s, border-color .3s, background .3s;
}
.rd-btn-primary { background: linear-gradient(120deg, var(--rd-iot), #2563eb); color: #04121e; box-shadow: 0 10px 26px rgba(56,189,248,.24); }
.rd-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(56,189,248,.32); }
.rd-btn-ghost { border-color: var(--rd-line-strong); color: var(--rd-text); background: var(--rd-panel); }
.rd-btn-ghost:hover { border-color: var(--rd-iot); color: var(--rd-iot); }
.rd-btn:focus-visible { outline: 2px solid var(--rd-iot); outline-offset: 3px; }

.rd-hero-visual { position: relative; }
.rd-hero-visual svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 26px 60px rgba(0,0,0,.4)); }

/* floating telemetry chips on hero visual */
.rd-float {
  position: absolute; font-family: var(--rd-mono); font-size: 10.5px; font-weight: 700;
  padding: 7px 11px; border-radius: 10px; letter-spacing: .06em;
  border: 1px solid var(--rd-line-strong); background: color-mix(in srgb, var(--rd-bg) 78%, transparent);
  backdrop-filter: blur(8px); color: var(--rd-muted); white-space: nowrap;
  box-shadow: 0 10px 26px rgba(0,0,0,.32);
}
.rd-float b { color: var(--rd-iot); }
.rd-float--ai b { color: var(--rd-ai-2); }
.rd-float--ai { border-color: rgba(167,139,250,.4); }
.rd-float-1 { top: 8%; right: 2%; animation: rdFloat 6s ease-in-out infinite; }
.rd-float-2 { bottom: 20%; left: -2%; animation: rdFloat 7s ease-in-out infinite reverse; }
.rd-float-3 { bottom: 4%; right: 6%; animation: rdFloat 8s ease-in-out infinite; }
@media (max-width: 760px) { .rd-float { display: none; } }
@keyframes rdFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ---------- Reveal ---------- */
.rd-reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.rd-reveal.rd-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rd-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .rd-float { animation: none !important; }
  .rd-pkt { animation: none !important; }
}

/* ---------- Generic cards & grids ---------- */
.rd-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.rd-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.rd-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 940px) { .rd-grid-3 { grid-template-columns: 1fr; } .rd-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .rd-grid-2 { grid-template-columns: 1fr; } .rd-grid-4 { grid-template-columns: 1fr; } }

.rd-card {
  position: relative; border: 1px solid var(--rd-line); border-radius: var(--rd-radius);
  background: linear-gradient(150deg, var(--rd-panel2), var(--rd-panel));
  padding: 22px; overflow: hidden;
  transition: transform .3s cubic-bezier(.16,1,.3,1), border-color .3s, box-shadow .3s;
}
.rd-card:hover { transform: translateY(-4px); border-color: var(--rd-line-strong); box-shadow: 0 22px 52px rgba(0,0,0,.3); }
.rd-card h3 { font-size: 17px; font-weight: 700; margin: 0 0 8px; letter-spacing: -0.01em; }
.rd-card p { margin: 0; color: var(--rd-muted); font-size: 14px; line-height: 1.65; }
.rd-card-num { font-family: var(--rd-mono); font-size: 11px; font-weight: 800; letter-spacing: .14em; color: var(--rd-iot); margin-bottom: 12px; display: block; }
.rd-card--ai .rd-card-num { color: var(--rd-ai); }
.rd-card--safety .rd-card-num { color: var(--rd-safety); }
.rd-card-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 14px; border: 1px solid var(--rd-line-strong); background: var(--rd-panel2); }
.rd-card-icon svg { width: 22px; height: 22px; }

/* the three big concept cards */
.rd-concept-card { padding: 30px 26px; }
.rd-concept-card .rd-concept-glyph { margin-bottom: 18px; }
.rd-concept-card .rd-concept-glyph svg { width: 100%; height: 120px; display: block; }
.rd-concept-card h3 { font-size: clamp(20px, 2.4vw, 27px); }

/* ---------- Exploded unit / diagrams ---------- */
.rd-diagram {
  border: 1px solid var(--rd-line); border-radius: var(--rd-radius);
  background: linear-gradient(150deg, var(--rd-panel2), var(--rd-panel));
  padding: clamp(18px, 3vw, 34px); overflow: hidden;
}
.rd-diagram svg { width: 100%; height: auto; display: block; }
.rd-diagram-caption { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 18px; font-family: var(--rd-mono); font-size: 11px; color: var(--rd-dim); }

/* component legend list */
.rd-legend { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 22px; margin-top: 22px; }
@media (max-width: 700px) { .rd-legend { grid-template-columns: 1fr; } }
.rd-legend-item { display: flex; align-items: flex-start; gap: 11px; padding: 8px 0; border-bottom: 1px dashed var(--rd-line); }
.rd-legend-num {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 6px; margin-top: 1px;
  display: grid; place-items: center; font-family: var(--rd-mono); font-size: 10.5px; font-weight: 800;
  border: 1px solid var(--rd-line-strong); background: var(--rd-panel2); color: var(--rd-iot);
}
.rd-legend-txt { font-size: 13.5px; color: var(--rd-muted); }
.rd-legend-txt b { color: var(--rd-text); font-weight: 600; }

/* ---------- Dimension spec ---------- */
.rd-spec-hero {
  display: flex; flex-wrap: wrap; gap: 18px 40px; align-items: baseline;
  padding: 24px 26px; border: 1px solid var(--rd-line-strong); border-radius: var(--rd-radius);
  background: var(--rd-panel); font-family: var(--rd-mono);
}
.rd-spec-hero .bigdim { font-size: clamp(20px, 3vw, 30px); font-weight: 800; letter-spacing: -0.01em; color: var(--rd-text); }
.rd-spec-hero small { display: block; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--rd-dim); margin-bottom: 4px; }
.rd-spec-list { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 24px; }
@media (max-width: 700px) { .rd-spec-list { grid-template-columns: 1fr; } }
.rd-spec-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--rd-muted); }
.rd-spec-list li::before { content: "▹"; color: var(--rd-iot); flex: 0 0 auto; }

/* ---------- Material layers ---------- */
.rd-layers { display: grid; gap: 12px; }
.rd-layer {
  display: grid; grid-template-columns: 190px 1fr; gap: 20px; align-items: center;
  border: 1px solid var(--rd-line); border-radius: 14px; padding: 18px 22px;
  background: linear-gradient(150deg, var(--rd-panel2), var(--rd-panel));
}
.rd-layer-tag { font-family: var(--rd-mono); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--rd-alum); }
.rd-layer-body { font-size: 14px; color: var(--rd-muted); }
.rd-layer-body b { color: var(--rd-text); }
@media (max-width: 640px) { .rd-layer { grid-template-columns: 1fr; gap: 8px; } }

/* ---------- Equipment cards ---------- */
.rd-equip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 1000px) { .rd-equip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .rd-equip { grid-template-columns: 1fr; } }
.rd-equip-card { border: 1px solid var(--rd-line); border-radius: 14px; background: var(--rd-panel); padding: 18px; transition: border-color .3s, transform .3s; }
.rd-equip-card:hover { border-color: var(--rd-iot); transform: translateY(-3px); }
.rd-equip-vis { height: 74px; display: grid; place-items: center; border-radius: 10px; margin-bottom: 14px; border: 1px solid var(--rd-line); background: color-mix(in srgb, var(--rd-bg) 40%, transparent); }
.rd-equip-vis svg { width: 46px; height: 46px; }
.rd-equip-card h3 { font-size: 15px; margin: 0 0 6px; }
.rd-equip-card .spec { font-family: var(--rd-mono); font-size: 11px; color: var(--rd-iot); margin-bottom: 8px; letter-spacing: .04em; }
.rd-equip-card p { margin: 0; font-size: 13px; color: var(--rd-muted); line-height: 1.6; }
.rd-equip-optional { border-style: dashed; }

/* ---------- Vertical flow (architecture) ---------- */
.rd-flow { display: flex; flex-direction: column; align-items: center; gap: 0; }
.rd-flow-node {
  width: min(100%, 640px); text-align: center;
  border: 1px solid var(--rd-line-strong); border-radius: 12px;
  padding: 14px 20px; background: var(--rd-panel2);
  font-weight: 700; font-size: 14.5px; letter-spacing: -0.01em;
  position: relative;
}
.rd-flow-node small { display: block; font-family: var(--rd-mono); font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--rd-dim); margin-top: 3px; }
.rd-flow-node--iot { border-color: rgba(56,189,248,.5); box-shadow: 0 0 0 1px rgba(56,189,248,.1), 0 0 30px rgba(56,189,248,.08); }
.rd-flow-node--ai { border-color: rgba(167,139,250,.5); box-shadow: 0 0 30px rgba(167,139,250,.08); }
.rd-flow-node--act { border-color: rgba(52,211,153,.45); }
.rd-flow-arrow { width: 2px; height: 30px; background: var(--rd-line-strong); position: relative; }
.rd-flow-arrow::after { content: ""; position: absolute; bottom: -1px; left: 50%; transform: translateX(-50%); border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 7px solid var(--rd-line-strong); }
.rd-flow-arrow--ai { background: linear-gradient(var(--rd-iot), var(--rd-ai)); }
.rd-flow-arrow--ai::after { border-top-color: var(--rd-ai); }
.rd-flow-arrow--back { background: repeating-linear-gradient(180deg, var(--rd-iot) 0 5px, transparent 5px 10px); }
.rd-flow-arrow--back::after { border-top-color: var(--rd-iot); }
.rd-flow-feedback {
  margin-top: 4px; font-family: var(--rd-mono); font-size: 11px;
  color: var(--rd-iot); letter-spacing: .12em; text-transform: uppercase;
}
.rd-flow--horizontal { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 10px; }
.rd-flow--horizontal .rd-flow-node { width: auto; }
.rd-flow-arrow-h { align-self: center; color: var(--rd-line-strong); font-size: 18px; }

/* ---------- Three-layer architecture ---------- */
.rd-3layer { display: grid; gap: 14px; }
.rd-3layer-row { border-radius: var(--rd-radius); border: 1px solid var(--rd-line); padding: 24px; position: relative; overflow: hidden; }
.rd-3layer-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.rd-3layer-row--control { background: linear-gradient(120deg, rgba(56,189,248,.08), transparent 60%); }
.rd-3layer-row--control::before { background: var(--rd-iot); }
.rd-3layer-row--intel { background: linear-gradient(120deg, rgba(167,139,250,.09), transparent 60%); }
.rd-3layer-row--intel::before { background: var(--rd-ai); }
.rd-3layer-row--safety { background: linear-gradient(120deg, rgba(239,68,68,.09), transparent 60%); border-color: rgba(239,68,68,.32); }
.rd-3layer-row--safety::before { background: var(--rd-danger); }
.rd-3layer-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 6px; }
.rd-3layer-head h3 { margin: 0; font-size: 19px; }
.rd-3layer-row > p { margin: 0 0 14px; color: var(--rd-muted); font-size: 14px; }
.rd-chipset { display: flex; flex-wrap: wrap; gap: 8px; }
.rd-chip { padding: 7px 12px; border-radius: 9px; border: 1px solid var(--rd-line-strong); background: var(--rd-panel2); font-size: 12.5px; font-weight: 600; color: var(--rd-text); }
.rd-3layer-row--safety .rd-chip { border-color: rgba(239,68,68,.35); }
.rd-safety-callout {
  margin-top: 16px; display: flex; gap: 12px; align-items: center;
  padding: 14px 18px; border-radius: 12px;
  border: 1px solid rgba(239,68,68,.45); background: rgba(239,68,68,.09);
  font-weight: 800; font-size: 14px; letter-spacing: .01em; color: #fecaca;
}
html[data-theme="light"] .rd-safety-callout { color: #991b1b; }
.rd-safety-callout svg { width: 22px; height: 22px; flex: 0 0 auto; }

/* ---------- Agentic loop ---------- */
.rd-loop { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
@media (max-width: 1080px) { .rd-loop { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 620px) { .rd-loop { grid-template-columns: repeat(2, 1fr); } }
.rd-loop-step {
  border: 1px solid var(--rd-line); border-radius: 14px; padding: 16px;
  background: var(--rd-panel); position: relative; overflow: hidden;
  transition: border-color .3s, transform .3s, box-shadow .3s;
}
.rd-loop-step .n { font-family: var(--rd-mono); font-size: 10px; font-weight: 800; color: var(--rd-ai); letter-spacing: .1em; }
.rd-loop-step h4 { margin: 8px 0 6px; font-size: 14px; letter-spacing: .02em; }
.rd-loop-step p { margin: 0; font-size: 12.5px; color: var(--rd-muted); line-height: 1.55; }
.rd-loop-step::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, var(--rd-iot), var(--rd-ai)); transform: scaleX(0); transform-origin: left; transition: transform .5s; }
.rd-loop-step.rd-active { border-color: rgba(167,139,250,.55); transform: translateY(-4px); box-shadow: 0 18px 44px rgba(167,139,250,.16); }
.rd-loop-step.rd-active::after { transform: scaleX(1); }

/* ---------- States normal vs abnormal ---------- */
.rd-states { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1000px) { .rd-states { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .rd-states { grid-template-columns: 1fr; } }
.rd-state { border: 1px solid var(--rd-line); border-radius: 14px; padding: 22px; background: var(--rd-panel); position: relative; overflow: hidden; }
.rd-state-bar { height: 5px; border-radius: 999px; margin-bottom: 16px; }
.rd-state--normal .rd-state-bar { background: var(--rd-ok); box-shadow: 0 0 16px rgba(52,211,153,.5); }
.rd-state--minor .rd-state-bar { background: var(--rd-iot); box-shadow: 0 0 16px rgba(56,189,248,.5); }
.rd-state--abnormal .rd-state-bar { background: var(--rd-safety); box-shadow: 0 0 16px rgba(245,158,11,.5); }
.rd-state--serious .rd-state-bar { background: var(--rd-danger); box-shadow: 0 0 16px rgba(239,68,68,.5); }
.rd-state h3 { margin: 0 0 8px; font-size: 16px; }
.rd-state .who { font-family: var(--rd-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--rd-dim); margin-bottom: 10px; display: block; }
.rd-state p { margin: 0; font-size: 13.5px; color: var(--rd-muted); line-height: 1.6; }

/* ---------- Anomaly scenario cards ---------- */
.rd-anomaly { border: 1px solid var(--rd-line); border-radius: var(--rd-radius); background: var(--rd-panel); overflow: hidden; margin-bottom: 14px; }
.rd-anomaly-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--rd-line); }
.rd-anomaly-head .badge { font-family: var(--rd-mono); font-size: 10px; font-weight: 800; letter-spacing: .1em; padding: 4px 9px; border-radius: 7px; border: 1px solid rgba(245,158,11,.45); background: rgba(245,158,11,.1); color: #fbbf24; }
.rd-anomaly-head h3 { margin: 0; font-size: 16px; }
.rd-anomaly-track { display: grid; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) { .rd-anomaly-track { grid-template-columns: 1fr; } }
.rd-anomaly-cell { padding: 18px 22px; border-right: 1px solid var(--rd-line); position: relative; }
.rd-anomaly-cell:last-child { border-right: none; }
@media (max-width: 860px) { .rd-anomaly-cell { border-right: none; border-bottom: 1px solid var(--rd-line); } }
.rd-anomaly-cell .st { font-family: var(--rd-mono); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 8px; display: block; }
.rd-anomaly-cell:nth-child(1) .st { color: var(--rd-alum); }
.rd-anomaly-cell:nth-child(2) .st { color: var(--rd-ai); }
.rd-anomaly-cell:nth-child(3) .st { color: var(--rd-iot); }
.rd-anomaly-cell:nth-child(4) .st { color: var(--rd-safety); }
.rd-anomaly-cell p { margin: 0; font-size: 13px; color: var(--rd-muted); line-height: 1.6; }

/* ---------- Multi-unit scaling ---------- */
.rd-scale-visual { border: 1px solid var(--rd-line); border-radius: var(--rd-radius); background: var(--rd-panel); padding: clamp(18px, 3vw, 30px); }
.rd-scale-visual svg { width: 100%; height: auto; display: block; }
.rd-scale-steps { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; margin: 22px 0; font-family: var(--rd-mono); }
.rd-scale-step { padding: 10px 16px; border: 1px solid var(--rd-line-strong); border-radius: 10px; font-weight: 800; font-size: 13px; background: var(--rd-panel2); }
.rd-scale-step--now { border-color: var(--rd-iot); color: var(--rd-iot); }
.rd-scale-arrow { color: var(--rd-dim); }

/* ---------- Dashboard ---------- */
.rd-dash {
  border: 1px solid var(--rd-line-strong); border-radius: var(--rd-radius); overflow: hidden;
  background: linear-gradient(160deg, #0a0f18, #060a11);
  font-family: var(--rd-mono);
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
}
html[data-theme="light"] .rd-dash { background: linear-gradient(160deg, #0d1420, #0a1018); }
.rd-dash-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid rgba(148,163,184,.16); }
.rd-dash-title { display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 700; color: #e2e8f0; letter-spacing: .06em; text-transform: uppercase; }
.rd-dash-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rd-ok); box-shadow: 0 0 10px var(--rd-ok); animation: rdBlink 2.2s ease-in-out infinite; }
@keyframes rdBlink { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.rd-dash-sim { font-size: 10px; font-weight: 800; letter-spacing: .12em; color: #fbbf24; border: 1px solid rgba(245,158,11,.5); background: rgba(245,158,11,.1); padding: 4px 10px; border-radius: 999px; }
.rd-dash-body { padding: 18px; display: grid; gap: 16px; }
.rd-dash-units { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 900px) { .rd-dash-units { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .rd-dash-units { grid-template-columns: 1fr; } }
.rd-unit { border: 1px solid rgba(148,163,184,.18); border-radius: 12px; padding: 14px; background: rgba(255,255,255,.025); }
.rd-unit-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.rd-unit-name { font-size: 11.5px; font-weight: 800; color: #e2e8f0; letter-spacing: .05em; }
.rd-unit-status { font-size: 9.5px; font-weight: 800; letter-spacing: .1em; padding: 3px 8px; border-radius: 999px; }
.rd-st-normal { color: #34d399; background: rgba(52,211,153,.12); border: 1px solid rgba(52,211,153,.4); }
.rd-st-drying { color: #38bdf8; background: rgba(56,189,248,.12); border: 1px solid rgba(56,189,248,.4); }
.rd-st-monitor { color: #a78bfa; background: rgba(167,139,250,.12); border: 1px solid rgba(167,139,250,.4); }
.rd-st-anomaly { color: #fbbf24; background: rgba(245,158,11,.14); border: 1px solid rgba(245,158,11,.5); }
.rd-unit-rows { display: grid; gap: 6px; }
.rd-unit-row { display: flex; justify-content: space-between; font-size: 11px; color: #94a3b8; }
.rd-unit-row b { color: #e2e8f0; font-weight: 700; }
.rd-dash-lower { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; }
@media (max-width: 860px) { .rd-dash-lower { grid-template-columns: 1fr; } }
.rd-panel-box { border: 1px solid rgba(148,163,184,.18); border-radius: 12px; padding: 14px; background: rgba(255,255,255,.02); }
.rd-panel-box h4 { margin: 0 0 12px; font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #94a3b8; }
.rd-curve svg { width: 100%; height: auto; display: block; }
.rd-log { display: grid; gap: 7px; font-size: 11px; }
.rd-log-item { display: flex; gap: 9px; color: #94a3b8; }
.rd-log-time { color: #64748b; flex: 0 0 auto; }
.rd-log-item--warn { color: #fbbf24; }
.rd-log-item--ok { color: #34d399; }
.rd-dash-foot { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 12px 18px; border-top: 1px solid rgba(148,163,184,.16); font-size: 10.5px; color: #94a3b8; }

/* ---------- Cost table ---------- */
.rd-cost-wrap { border: 1px solid var(--rd-line); border-radius: var(--rd-radius); overflow: hidden; background: var(--rd-panel); }
.rd-cost-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rd-cost-table th, .rd-cost-table td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--rd-line); }
.rd-cost-table th { font-family: var(--rd-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--rd-dim); font-weight: 800; }
.rd-cost-table td:last-child, .rd-cost-table th:last-child { text-align: right; font-family: var(--rd-mono); white-space: nowrap; }
.rd-cost-table tbody tr:hover { background: var(--rd-panel2); }
.rd-cost-table tbody tr:last-child td { border-bottom: none; }
.rd-cost-total { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 20px 22px; border-top: 2px solid var(--rd-line-strong); background: linear-gradient(120deg, rgba(56,189,248,.1), rgba(167,139,250,.08)); }
.rd-cost-total .lbl { font-family: var(--rd-mono); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--rd-muted); }
.rd-cost-total .amt { font-family: var(--rd-mono); font-size: clamp(20px, 3vw, 30px); font-weight: 900; letter-spacing: -0.01em; }
.rd-excluded { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.rd-excluded span { font-family: var(--rd-mono); font-size: 11px; color: var(--rd-dim); border: 1px dashed var(--rd-line-strong); border-radius: 999px; padding: 5px 12px; }

/* ---------- Roadmap ---------- */
.rd-roadmap { position: relative; overflow-x: auto; padding-bottom: 10px; }
.rd-roadmap-track { display: flex; gap: 14px; min-width: max-content; padding: 6px; }
.rd-phase { width: 226px; flex: 0 0 auto; border: 1px solid var(--rd-line); border-radius: 14px; background: var(--rd-panel); padding: 18px; position: relative; }
.rd-phase-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.rd-phase-num { font-family: var(--rd-mono); font-size: 11px; font-weight: 800; color: var(--rd-iot); border: 1px solid var(--rd-line-strong); border-radius: 7px; padding: 3px 8px; }
.rd-phase h3 { margin: 0; font-size: 14.5px; }
.rd-phase p { margin: 0; font-size: 13px; color: var(--rd-muted); line-height: 1.6; }
.rd-phase-bar { height: 4px; border-radius: 999px; background: var(--rd-line-strong); margin-top: 14px; overflow: hidden; }
.rd-phase-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--rd-iot), var(--rd-ai)); }
.rd-phase small { display: block; margin-top: 8px; font-family: var(--rd-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--rd-dim); }

/* ---------- Validation list ---------- */
.rd-valid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 900px) { .rd-valid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .rd-valid { grid-template-columns: 1fr; } }
.rd-valid-item { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border: 1px solid var(--rd-line); border-radius: 12px; background: var(--rd-panel); }
.rd-valid-item .tick { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; border: 1px solid rgba(56,189,248,.5); color: var(--rd-iot); font-family: var(--rd-mono); font-size: 11px; font-weight: 800; }
.rd-valid-item span { font-size: 14px; color: var(--rd-muted); }
.rd-valid-item span b { color: var(--rd-text); font-weight: 600; }

/* ---------- Final section ---------- */
.rd-final { text-align: center; padding: clamp(70px, 10vw, 130px) 0; border-top: 1px solid var(--rd-line); }
.rd-final h2 { font-size: clamp(30px, 5vw, 58px); line-height: 1.03; letter-spacing: -0.035em; font-weight: 900; margin: 16px 0 18px; }
.rd-final p { max-width: 70ch; margin: 0 auto; color: var(--rd-muted); font-size: clamp(15px, 1.8vw, 19px); }
.rd-final-visual { margin-top: clamp(30px, 5vw, 54px); }
.rd-final-visual svg { width: 100%; height: auto; max-width: 1000px; display: block; margin: 0 auto; }

/* ---------- Recurring theme banner ---------- */
.rd-theme-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  border: 1px solid var(--rd-line-strong); border-radius: var(--rd-radius);
  padding: 22px 26px; background: linear-gradient(120deg, rgba(56,189,248,.08), rgba(167,139,250,.07));
}
.rd-theme-banner .big { font-size: clamp(17px, 2.6vw, 27px); font-weight: 900; letter-spacing: -0.02em; }
.rd-theme-banner .big em { font-style: normal; color: var(--rd-iot); }
.rd-theme-banner .sub { font-family: var(--rd-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--rd-dim); }

/* animated packet dot for diagrams */
.rd-pkt { animation: rdPkt 3s linear infinite; }
@keyframes rdPkt { 0% { offset-distance: 0%; } 100% { offset-distance: 100%; } }

/* utility */
.rd-mt-0 { margin-top: 0; }
.rd-center { text-align: center; }
.rd-muted { color: var(--rd-muted); }
.rd-strong { color: var(--rd-text); font-weight: 700; }
