:root {
  --ae-black: #11100e;
  --ae-charcoal: #23221f;
  --ae-graphite: #5c5951;
  --ae-red: #c0342e;
  --ae-red-dark: #8f1e1b;
  --ae-red-glow: #ff5b52;
  --ae-cream: #f4efe6;
  --ae-warm: #d9d2c6;
  --ae-primary: var(--ae-cream);
  --ae-accent: var(--ae-red);
  --ae-accent-soft: var(--ae-red-glow);
  --ae-alert: var(--ae-red);
  --ink: var(--ae-cream);
  --muted: #b7afa2;
  --line: rgba(244, 239, 230, 0.14);
  --panel: rgba(35, 34, 31, 0.80);
  --panel-solid: #23221f;
  --soft: #171613;
  --soft-blue: rgba(192, 52, 46, 0.14);
  --shadow: 0 26px 76px rgba(0, 0, 0, 0.44);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max: 1440px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 8% 2%, rgba(53, 174, 226, 0.18), transparent 28rem),
    radial-gradient(circle at 94% 10%, rgba(237, 28, 36, 0.10), transparent 24rem),
    linear-gradient(180deg, #f8fbfe 0%, #eef5fa 46%, #f8fbfe 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 48, 79, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 48, 79, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.75), transparent 82%);
  z-index: -1;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(var(--max), calc(100% - 28px));
  margin: 14px auto 0;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.76);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 50px rgba(0, 48, 79, 0.12);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}
.brand-logo {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 92px;
  height: 48px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.8);
}
.brand-logo img { max-width: 72px; height: auto; display: block; }
.brand-copy { display: grid; line-height: 1.15; }
.brand-copy strong { color: var(--ae-primary); font-size: 0.98rem; letter-spacing: -0.01em; }
.brand-copy span { color: var(--muted); font-size: 0.74rem; }

.navlinks {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.navlinks a {
  padding: 0.72rem 0.95rem;
  border-radius: 999px;
  color: #2e4056;
  font-size: 0.9rem;
  transition: 180ms ease;
}
.navlinks a:hover { color: var(--ae-primary); background: var(--soft-blue); }

.section-pad {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 78px 0 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  align-items: center;
  gap: 34px;
  min-height: 620px;
  padding-top: 64px;
}
.hero-copy h1 {
  margin: 18px 0 18px;
  color: var(--ae-primary);
  font-size: clamp(2.7rem, 6vw, 6.4rem);
  line-height: 0.92;
  letter-spacing: -0.075em;
  max-width: 1020px;
}
.hero-lede {
  max-width: 780px;
  margin: 0;
  color: #405266;
  font-size: clamp(1.02rem, 1.65vw, 1.32rem);
  line-height: 1.65;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ae-accent);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}
.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ae-alert);
  box-shadow: 0 0 0 8px rgba(237, 28, 36, 0.12);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 28px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.78rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: -0.01em;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary { color: #fff; background: linear-gradient(135deg, var(--ae-primary), var(--ae-accent)); box-shadow: 0 12px 30px rgba(0, 100, 166, 0.28); }
.btn.secondary { color: var(--ae-primary); background: #fff; border-color: var(--line); }
.btn.ghost { color: var(--ae-primary); background: var(--soft-blue); border-color: rgba(0,100,166,0.12); }

.hero-panel,
.brief-card,
.viewer-card,
.controls-card,
.table-card,
.code-card,
.roadmap-card,
.source-card {
  border: 1px solid rgba(255,255,255,0.86);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.hero-panel {
  padding: 24px;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.hero-panel::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -94px;
  top: -98px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(53,174,226,0.24), transparent 68%);
}
.panel-head {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.panel-head span { color: var(--muted); font-size: 0.86rem; }
.panel-head strong { color: var(--ae-primary); }
.objective-list {
  position: relative;
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.objective-list article {
  padding: 15px;
  border: 1px solid #dce7ef;
  border-radius: 16px;
  background: rgba(255,255,255,0.64);
}
.objective-list strong { display: block; color: var(--ae-primary); font-size: 1.1rem; }
.objective-list span { display: block; color: var(--muted); line-height: 1.5; margin-top: 4px; }

.brief-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.68fr 0.68fr;
  gap: 18px;
  padding-top: 24px;
}
.brief-card {
  border-radius: var(--radius-md);
  padding: 24px;
}
.brief-card.large { background: linear-gradient(135deg, rgba(255,255,255,0.92), rgba(232,243,251,0.74)); }
.card-kicker,
.metric-label {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--ae-accent);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.brief-card h2, .section-title h2 {
  color: var(--ae-primary);
  letter-spacing: -0.045em;
}
.brief-card h2 { margin: 0 0 12px; font-size: clamp(1.8rem, 3vw, 3.1rem); line-height: 1.02; }
.brief-card p { color: #4a5d72; line-height: 1.62; margin: 0; }
.tight-list { margin: 0; padding-left: 1.1rem; color: #43566b; line-height: 1.55; }
.tight-list li + li { margin-top: 0.45rem; }

.section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.section-title.slim { display: block; max-width: 980px; }
.section-title h2 {
  margin: 9px 0 0;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
}
.section-title p {
  max-width: 640px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}
.section-title.slim p { margin-top: 12px; }

.sim-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 18px;
  align-items: stretch;
}
.viewer-card,
.controls-card,
.table-card,
.code-card,
.roadmap-card {
  border-radius: var(--radius-lg);
}
.viewer-card { overflow: hidden; background: rgba(255,255,255,0.94); }
.viewer-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.viewer-toolbar strong { color: var(--ae-primary); display: block; }
.viewer-toolbar span { color: var(--muted); font-size: 0.88rem; }
.viewer-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: flex-end; }
.viewer-badges span {
  padding: 0.44rem 0.62rem;
  border-radius: 999px;
  background: var(--soft-blue);
  color: var(--ae-primary);
  font-weight: 800;
  font-size: 0.78rem;
}
#runStateBadge.running { color: #fff; background: var(--ae-alert); }
#twinCanvas {
  display: block;
  width: 100%;
  height: 560px;
  background: radial-gradient(circle at 46% 18%, #ffffff, #eef5fb 70%);
}
.canvas-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1rem;
  padding: 12px 18px 17px;
  border-top: 1px solid var(--line);
  color: #526579;
  font-size: 0.82rem;
}
.canvas-legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.canvas-legend i { width: 14px; height: 8px; display: inline-block; border-radius: 999px; }
.legend-hole { background: #fff; border: 2px solid var(--ae-accent); }
.legend-path { background: var(--ae-accent-soft); }
.legend-robot { background: #f2a32b; }
.legend-qa { background: var(--ae-alert); }

.controls-card {
  padding: 18px;
  background: rgba(255,255,255,0.92);
}
.control-section { margin-bottom: 15px; }
.control-section label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--ae-primary);
  font-weight: 850;
  margin-bottom: 7px;
  font-size: 0.9rem;
}
.control-section select,
.control-section input[type="file"] {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cbdbe8;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  padding: 0 0.78rem;
  outline: none;
}
.control-section select:focus,
.control-section input:focus { border-color: var(--ae-accent); box-shadow: 0 0 0 4px rgba(0,100,166,0.12); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.slider-row input[type="range"] { width: 100%; accent-color: var(--ae-accent); }
.check-grid {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #dce7ef;
  border-radius: 16px;
  background: #f7fbfe;
}
.check-grid label {
  display: flex;
  justify-content: flex-start;
  font-weight: 700;
  color: #405266;
  margin: 0;
  line-height: 1.35;
}
.check-grid input { accent-color: var(--ae-accent); }
.file-drop small { display: block; color: var(--muted); margin-top: 7px; line-height: 1.45; }
.button-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.button-grid .btn { width: 100%; }
.export-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.export-row button,
.code-card button {
  min-height: 38px;
  border: 1px solid #cbdbe8;
  border-radius: 12px;
  color: var(--ae-primary);
  background: #fff;
  font-weight: 850;
}
.export-row button:hover,
.code-card button:hover { border-color: var(--ae-accent); background: var(--soft-blue); }

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.kpi-strip article {
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.78);
  background: rgba(255,255,255,0.82);
  box-shadow: 0 14px 36px rgba(0, 48, 79, 0.08);
}
.kpi-strip span { display: block; color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 850; }
.kpi-strip strong { display: block; margin-top: 7px; color: var(--ae-primary); font-size: clamp(1.35rem, 2.5vw, 2rem); letter-spacing: -0.05em; }
.kpi-strip small { color: #708095; }

.data-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  margin-top: 18px;
}
.table-card { padding: 20px; background: rgba(255,255,255,0.94); }
.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 13px;
}
.card-head h3,
.table-card h3,
.code-card h3,
.roadmap-card h3,
.source-card h3 {
  margin: 0;
  color: var(--ae-primary);
  letter-spacing: -0.03em;
}
.card-head > span { color: var(--muted); font-weight: 800; white-space: nowrap; }
.table-wrap { max-height: 430px; overflow: auto; border: 1px solid var(--line); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; min-width: 860px; }
th, td { padding: 0.78rem 0.82rem; text-align: left; border-bottom: 1px solid #e4edf4; vertical-align: top; }
th { position: sticky; top: 0; z-index: 1; background: #f7fbfe; color: var(--ae-primary); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
td { color: #34475b; font-size: 0.88rem; }
tr.active-row td { background: rgba(237,28,36,0.08); }
tr.done-row td { background: rgba(0,100,166,0.055); }
.compact-card { align-self: stretch; }
.tool-rack-list { display: grid; gap: 10px; margin-top: 14px; }
.tool-rack-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid #dce7ef;
  border-radius: 14px;
  background: #f9fcff;
}
.tool-color { width: 12px; height: 34px; border-radius: 999px; background: var(--ae-accent); }
.tool-rack-item strong { color: var(--ae-primary); display: block; font-size: 0.92rem; }
.tool-rack-item span { color: var(--muted); font-size: 0.8rem; }
.slot-pill { color: var(--ae-primary); font-weight: 900; background: #fff; border: 1px solid #dce7ef; border-radius: 999px; padding: 0.32rem 0.5rem; font-size: 0.74rem; }
.mini-note {
  margin-top: 14px;
  padding: 13px;
  border-radius: 14px;
  color: #4d6074;
  line-height: 1.5;
  background: #f1f7fb;
  border: 1px solid #dce7ef;
}

.cadcam-section, .stations-section, .roadmap-section { padding-top: 92px; }
.pipeline {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-top: 24px;
}
.pipeline article {
  position: relative;
  min-height: 220px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.78);
  background: rgba(255,255,255,0.86);
  box-shadow: 0 16px 42px rgba(0,48,79,0.08);
  overflow: hidden;
}
.pipeline article::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -32px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(53,174,226,0.16);
}
.pipeline span { color: var(--ae-alert); font-weight: 950; letter-spacing: -0.06em; font-size: 1.7rem; }
.pipeline h3 { margin: 8px 0 8px; color: var(--ae-primary); }
.pipeline p { margin: 0; color: #526579; line-height: 1.55; font-size: 0.91rem; }
.format-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}
.code-card { padding: 20px; background: rgba(255,255,255,0.94); }
.code-card pre {
  margin: 14px 0 0;
  overflow: auto;
  padding: 16px;
  border-radius: 16px;
  background: #071827;
  color: #dceeff;
  line-height: 1.55;
  font-size: 0.84rem;
}

.station-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.station-card {
  position: relative;
  min-height: 250px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.75);
  box-shadow: 0 14px 38px rgba(0,48,79,0.08);
  overflow: hidden;
}
.station-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 6px;
  background: var(--station-color, var(--ae-accent));
}
.station-letter {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #fff;
  background: var(--station-color, var(--ae-accent));
  font-weight: 950;
  font-size: 1.25rem;
}
.station-card h3 { color: var(--ae-primary); margin: 14px 0 8px; letter-spacing: -0.03em; }
.station-card ul { margin: 0; padding-left: 1.05rem; color: #526579; line-height: 1.5; font-size: 0.88rem; }
.source-card {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 18px;
  align-items: center;
  margin-top: 18px;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.9);
}
.source-card p { color: var(--muted); line-height: 1.6; }
.source-card img { width: 100%; border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 16px 36px rgba(0,48,79,0.12); }

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 24px;
}
.roadmap-card {
  padding: 24px;
  background: rgba(255,255,255,0.9);
}
.roadmap-card.active { background: linear-gradient(180deg, #ffffff, #eaf6fd); border-color: rgba(0,100,166,0.24); }
.roadmap-card > span {
  display: inline-flex;
  padding: 0.42rem 0.7rem;
  border-radius: 999px;
  color: #fff;
  background: var(--ae-primary);
  font-size: 0.78rem;
  font-weight: 900;
}
.roadmap-card.active > span { background: var(--ae-alert); }
.roadmap-card h3 { margin: 14px 0 12px; font-size: 1.45rem; }
.roadmap-card ul { margin: 0; padding-left: 1.05rem; color: #4b5f73; line-height: 1.58; }
.roadmap-card li + li { margin-top: 0.42rem; }

.footer {
  width: min(var(--max), calc(100% - 32px));
  margin: 86px auto 28px;
  padding: 20px 4px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
}
.footer strong { display: block; color: var(--ae-primary); }
.footer a { color: var(--ae-accent); font-weight: 850; }

@media (max-width: 1180px) {
  .hero,
  .sim-layout,
  .data-grid,
  .source-card { grid-template-columns: 1fr; }
  .brief-grid { grid-template-columns: 1fr 1fr; }
  .brief-card.large { grid-column: 1 / -1; }
  .kpi-strip { grid-template-columns: repeat(3, 1fr); }
  .pipeline, .station-grid { grid-template-columns: repeat(3, 1fr); }
  .controls-card { order: -1; }
}

@media (max-width: 780px) {
  .topbar { align-items: flex-start; border-radius: 24px; flex-direction: column; }
  .navlinks { width: 100%; overflow-x: auto; padding-bottom: 2px; }
  .navlinks a { white-space: nowrap; }
  .section-pad { width: min(100% - 20px, var(--max)); padding-top: 54px; }
  .hero { min-height: auto; padding-top: 42px; }
  .hero-copy h1 { font-size: clamp(2.45rem, 15vw, 4.1rem); }
  .brief-grid, .format-grid, .roadmap-grid, .pipeline, .station-grid, .kpi-strip { grid-template-columns: 1fr; }
  .section-title { display: block; }
  .section-title p { margin-top: 12px; }
  .two-col, .button-grid, .export-row { grid-template-columns: 1fr; }
  #twinCanvas { height: 460px; }
  .viewer-toolbar { align-items: flex-start; flex-direction: column; }
  .footer { flex-direction: column; }
}


/* Aetec dark brand theme and interactive 3D viewer refinements */
body {
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 2%, rgba(192, 52, 46, 0.28), transparent 30rem),
    radial-gradient(circle at 92% 16%, rgba(92, 89, 81, 0.32), transparent 24rem),
    linear-gradient(180deg, #0d0c0b 0%, #171613 48%, #0f0e0c 100%);
}
body::before {
  background-image:
    linear-gradient(rgba(244, 239, 230, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 239, 230, 0.045) 1px, transparent 1px);
}
.topbar {
  background: rgba(17, 16, 14, 0.82);
  border-color: rgba(244, 239, 230, 0.16);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
}
.brand-logo {
  width: 58px;
  height: 58px;
  background: radial-gradient(circle at 35% 26%, #34332e, #11100e 72%);
  border-color: rgba(244, 239, 230, 0.14);
  box-shadow: 0 0 0 1px rgba(192, 52, 46, 0.18), 0 14px 32px rgba(0,0,0,0.32);
  overflow: hidden;
}
.brand-logo img {
  max-width: 58px;
  width: 58px;
  height: 58px;
  object-fit: cover;
}
.brand-copy strong,
.hero-copy h1,
.panel-head strong,
.objective-list strong,
.brief-card h2,
.section-title h2,
.viewer-toolbar strong,
.control-section label,
.kpi-strip strong,
.card-head h3,
.table-card h3,
.code-card h3,
.roadmap-card h3,
.source-card h3,
.station-card h3,
.footer strong,
.tool-rack-item strong,
.slot-pill,
th {
  color: var(--ae-cream);
}
.brand-copy span,
.hero-lede,
.panel-head span,
.objective-list span,
.brief-card p,
.tight-list,
.section-title p,
.viewer-toolbar span,
.file-drop small,
.card-head > span,
td,
.tool-rack-item span,
.mini-note,
.pipeline p,
.station-card ul,
.source-card p,
.roadmap-card ul,
.footer,
.kpi-strip small,
.kpi-strip span {
  color: var(--muted);
}
.eyebrow { color: var(--ae-red-glow); }
.pulse-dot { background: var(--ae-red); box-shadow: 0 0 0 8px rgba(192, 52, 46, 0.16), 0 0 22px rgba(192, 52, 46, 0.36); }
.navlinks a { color: #c5bdb0; }
.navlinks a:hover { color: #fff; background: rgba(192, 52, 46, 0.18); }
.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, #c0342e, #8f1e1b);
  box-shadow: 0 16px 34px rgba(192, 52, 46, 0.24);
}
.btn.secondary {
  color: var(--ae-cream);
  background: rgba(244, 239, 230, 0.07);
  border-color: rgba(244, 239, 230, 0.18);
}
.btn.ghost {
  color: var(--ae-cream);
  background: rgba(192, 52, 46, 0.12);
  border-color: rgba(192, 52, 46, 0.25);
}
.hero-panel,
.brief-card,
.viewer-card,
.controls-card,
.table-card,
.code-card,
.roadmap-card,
.source-card {
  border-color: rgba(244, 239, 230, 0.14);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.hero-panel::before { background: radial-gradient(circle, rgba(192,52,46,0.26), transparent 68%); }
.brief-card.large,
.roadmap-card.active {
  background: linear-gradient(135deg, rgba(35,34,31,0.94), rgba(192,52,46,0.13));
  border-color: rgba(192, 52, 46, 0.24);
}
.objective-list article,
.pipeline article,
.station-card,
.kpi-strip article,
.tool-rack-item,
.mini-note,
.check-grid {
  background: rgba(17, 16, 14, 0.58);
  border-color: rgba(244, 239, 230, 0.12);
}
.card-kicker,
.metric-label,
.pipeline span {
  color: var(--ae-red-glow);
}
.viewer-card {
  background: rgba(18, 17, 15, 0.92);
}
.viewer-toolbar {
  border-bottom-color: rgba(244, 239, 230, 0.12);
  align-items: center;
}
.viewer-badges span {
  color: var(--ae-cream);
  background: rgba(192, 52, 46, 0.14);
  border: 1px solid rgba(192, 52, 46, 0.18);
}
#runStateBadge.running { background: var(--ae-red); color: #fff; }
.viewer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}
.viewer-actions button {
  min-height: 34px;
  padding: 0.42rem 0.68rem;
  border-radius: 999px;
  border: 1px solid rgba(244, 239, 230, 0.16);
  color: var(--ae-cream);
  background: rgba(244, 239, 230, 0.07);
  font-weight: 850;
}
.viewer-actions button:hover,
.viewer-actions button.active {
  background: rgba(192, 52, 46, 0.22);
  border-color: rgba(192, 52, 46, 0.42);
}
#twinCanvas {
  height: 590px;
  background: radial-gradient(circle at 50% 28%, #241d1a, #11100e 72%);
  cursor: grab;
  touch-action: none;
  outline: none;
}
#twinCanvas:active { cursor: grabbing; }
#twinCanvas:focus-visible { box-shadow: inset 0 0 0 3px rgba(192,52,46,0.56); }
.navigation-hint {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 10px 18px 0;
  background: rgba(18, 17, 15, 0.92);
}
.navigation-hint span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.28rem 0.58rem;
  border-radius: 999px;
  color: #d6cec1;
  background: rgba(244, 239, 230, 0.07);
  border: 1px solid rgba(244, 239, 230, 0.10);
  font-size: 0.76rem;
  font-weight: 800;
}
.canvas-legend {
  background: rgba(18, 17, 15, 0.92);
  border-top-color: rgba(244, 239, 230, 0.10);
  color: #c7bfb3;
}
.legend-hole { background: var(--ae-cream); border-color: var(--ae-red); }
.legend-path { background: var(--ae-red-glow); }
.legend-robot { background: #d7954a; }
.legend-qa { background: var(--ae-red); }
.controls-card,
.table-card,
.code-card { background: rgba(24, 23, 20, 0.90); }
.control-section select,
.control-section input[type="file"] {
  background: rgba(17, 16, 14, 0.84);
  border-color: rgba(244, 239, 230, 0.14);
  color: var(--ae-cream);
}
.control-section select:focus,
.control-section input:focus {
  border-color: rgba(192, 52, 46, 0.74);
  box-shadow: 0 0 0 4px rgba(192, 52, 46, 0.16);
}
.control-section option { background: #171613; color: var(--ae-cream); }
.slider-row input[type="range"],
.check-grid input { accent-color: var(--ae-red); }
.export-row button,
.code-card button {
  color: var(--ae-cream);
  border-color: rgba(244, 239, 230, 0.14);
  background: rgba(244, 239, 230, 0.07);
}
.export-row button:hover,
.code-card button:hover {
  border-color: rgba(192, 52, 46, 0.52);
  background: rgba(192, 52, 46, 0.16);
}
.table-wrap {
  border-color: rgba(244, 239, 230, 0.12);
}
th {
  background: #171613;
  border-bottom-color: rgba(244, 239, 230, 0.12);
}
td {
  border-bottom-color: rgba(244, 239, 230, 0.08);
}
tr.active-row td { background: rgba(192,52,46,0.18); }
tr.done-row td { background: rgba(244,239,230,0.05); }
.slot-pill {
  background: rgba(244, 239, 230, 0.08);
  border-color: rgba(244, 239, 230, 0.14);
}
.code-card pre {
  background: #0c0b0a;
  color: #f4efe6;
  border: 1px solid rgba(244, 239, 230, 0.10);
}
.pipeline article::after { background: rgba(192,52,46,0.14); }
.station-card::before { background: var(--station-color, var(--ae-red)); }
.source-card img {
  border-color: rgba(244, 239, 230, 0.14);
  box-shadow: 0 20px 50px rgba(0,0,0,0.34);
}
.roadmap-card > span { background: #3a3934; color: var(--ae-cream); }
.roadmap-card.active > span { background: var(--ae-red); color: #fff; }
.footer { border-top-color: rgba(244, 239, 230, 0.12); }
.footer a { color: var(--ae-red-glow); }
@media (max-width: 780px) {
  .viewer-toolbar { align-items: flex-start; }
  .viewer-actions { justify-content: flex-start; }
  #twinCanvas { height: 500px; }
}
.hero-brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.42rem 0.82rem 0.42rem 0.45rem;
  border: 1px solid rgba(244, 239, 230, 0.14);
  border-radius: 999px;
  background: rgba(17, 16, 14, 0.62);
  box-shadow: 0 18px 46px rgba(0,0,0,0.26);
  margin-bottom: 18px;
}
.hero-brand-mark img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  box-shadow: 0 0 30px rgba(192,52,46,0.22);
}
.hero-brand-mark span {
  color: var(--ae-cream);
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}


/* Company website link refinements */
.navlinks .website-link {
  color: #fff;
  background: linear-gradient(135deg, rgba(192, 52, 46, 0.90), rgba(143, 30, 27, 0.90));
  border: 1px solid rgba(255, 91, 82, 0.36);
  box-shadow: 0 12px 28px rgba(192, 52, 46, 0.18);
}
.navlinks .website-link:hover {
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 91, 82, 0.95), rgba(192, 52, 46, 0.95));
}
.website-cta {
  color: var(--ae-cream);
  border-color: rgba(255, 91, 82, 0.34);
  background: rgba(192, 52, 46, 0.12);
}
.footer > div:first-child {
  display: grid;
  gap: 0.28rem;
}
.footer-site a {
  color: var(--ae-red-glow);
  font-weight: 850;
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.footer-links a:first-child {
  padding: 0.58rem 0.82rem;
  border-radius: 999px;
  color: #fff;
  background: rgba(192, 52, 46, 0.20);
  border: 1px solid rgba(255, 91, 82, 0.32);
}
@media (max-width: 780px) {
  .footer-links {
    justify-content: flex-start;
  }
}
