:root {
  color-scheme: dark;
  --ink: #f8fbff;
  --muted: #a8b3c7;
  --dim: #738198;
  --bg: #030712;
  --panel: rgba(8, 19, 34, 0.92);
  --panel-strong: rgba(10, 23, 42, 0.96);
  --line: rgba(142, 169, 214, 0.22);
  --lime: #c9ff00;
  --blue: #18a7ff;
  --violet: #b526ff;
  --purple: #7c35ff;
  --orange: #ffb000;
  --green: #8eff00;
  --red: #ff5271;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-lime: 0 0 34px rgba(201, 255, 0, 0.28);
  --shadow-blue: 0 0 38px rgba(24, 167, 255, 0.3);
  --shadow-purple: 0 0 40px rgba(181, 38, 255, 0.34);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1280px;
  min-height: 100vh;
  overflow-x: auto;
  color: var(--ink);
  background:
    radial-gradient(circle at 78% 12%, rgba(60, 22, 120, 0.28), transparent 23rem),
    radial-gradient(circle at 15% 86%, rgba(0, 132, 255, 0.16), transparent 28rem),
    linear-gradient(180deg, #01040b 0%, #06101f 45%, #020610 100%);
  font-family: var(--font);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

button[data-pressed="true"] {
  transform: translateY(1px);
}

button[data-state="loading"] {
  color: #d7e0f1;
  background: rgba(10, 22, 39, 0.82);
  box-shadow: none;
}

button[data-state="success"] {
  border-color: rgba(201, 255, 0, 0.72);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(24, 167, 255, 0.72);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 20;
  padding: 12px 16px;
  border-radius: 10px;
  background: white;
  color: #06101f;
}

.skip-link:focus {
  top: 16px;
}

.decision-banner {
  position: fixed;
  z-index: 12;
  right: 16px;
  bottom: 16px;
  pointer-events: none;
  max-width: 360px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 176, 0, 0.42);
  border-radius: 10px;
  color: #fff1bc;
  background: rgba(28, 18, 2, 0.94);
  font-size: 12px;
  font-weight: 800;
}

.decision-banner[data-tone="success"] {
  color: #efffc0;
  border-color: rgba(201, 255, 0, 0.48);
  background: rgba(18, 31, 4, 0.94);
}

.decision-banner[data-tone="error"] {
  color: #ffdce4;
  border-color: rgba(255, 82, 113, 0.5);
  background: rgba(34, 6, 13, 0.94);
}

.decision-banner[data-tone="pending"],
.decision-banner[data-tone="warning"] {
  color: #fff1bc;
  border-color: rgba(255, 176, 0, 0.42);
  background: rgba(28, 18, 2, 0.94);
}

.app-shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

.side-rail {
  position: relative;
  min-height: 100vh;
  padding: 28px 18px 22px;
  border-right: 1px solid rgba(80, 145, 255, 0.16);
  background: linear-gradient(180deg, rgba(5, 13, 27, 0.98), rgba(5, 15, 30, 0.96));
  overflow: hidden;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 44px;
  font-size: 22px;
  font-weight: 900;
}

.brand__mark {
  width: 40px;
  height: 32px;
  background: linear-gradient(135deg, #39f0ff, #7c35ff 52%, #c9ff00);
  clip-path: polygon(0 28%, 48% 0, 100% 12%, 66% 45%, 76% 100%, 35% 75%, 4% 86%, 18% 52%);
  filter: drop-shadow(0 0 12px rgba(201, 255, 0, 0.35));
}

.side-nav {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 8px;
}

.side-nav__item {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 18px;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 16px;
  font-weight: 750;
}

.side-nav__item.is-active {
  color: white;
  border-color: var(--blue);
  background: linear-gradient(90deg, rgba(24, 167, 255, 0.28), rgba(124, 53, 255, 0.12));
  box-shadow: inset 0 0 0 1px rgba(24, 167, 255, 0.12), var(--shadow-blue);
}

.side-nav__item.is-secondary {
  color: #d4dbe8;
  font-weight: 650;
}

.side-nav__divider {
  height: 1px;
  margin: 6px 10px 10px;
  background: rgba(160, 180, 220, 0.18);
}

.rail-art {
  position: absolute;
  left: -8px;
  right: 0;
  bottom: 96px;
  height: 250px;
  opacity: 0.9;
  pointer-events: none;
}

.rail-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% 58%;
}

.policy-card {
  position: absolute;
  z-index: 2;
  left: 18px;
  right: 18px;
  bottom: 22px;
  padding: 18px;
  border: 1px solid rgba(201, 255, 0, 0.64);
  border-radius: 12px;
  background: rgba(7, 18, 32, 0.94);
  box-shadow: var(--shadow-lime);
}

.policy-card__icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 10px;
  color: var(--lime);
  border: 2px solid var(--lime);
  border-radius: 9px;
  font-weight: 950;
}

.policy-card p {
  margin: 0 0 14px;
  color: white;
  font-size: 13px;
  line-height: 1.45;
}

.policy-card a {
  color: var(--lime);
  font-weight: 850;
  text-decoration: none;
}

.workspace {
  min-width: 0;
  padding: 16px 16px 92px 28px;
}

.top-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  margin-bottom: 16px;
}

.mode-tabs {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mode-tabs > i {
  display: block;
  width: 64px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--lime), var(--blue), var(--violet));
  box-shadow: 0 0 18px rgba(201, 255, 0, 0.36);
}

.mode-tab {
  display: grid;
  grid-template-columns: 48px auto;
  grid-template-rows: auto auto;
  column-gap: 14px;
  align-items: center;
  min-width: 220px;
  min-height: 66px;
  padding: 10px 22px 10px 12px;
  color: white;
  text-align: left;
  border: 1px solid rgba(110, 128, 185, 0.34);
  border-radius: 22px;
  background: rgba(4, 10, 22, 0.72);
}

.mode-tab span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #070b13;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
  font-size: 24px;
  font-weight: 950;
}

.mode-tab strong,
.mode-tab small {
  display: block;
}

.mode-tab strong {
  font-size: 20px;
}

.mode-tab small {
  color: #d2d9e7;
  font-size: 13px;
}

.mode-tab.is-active[data-mode="build"],
.mode-tab.is-complete[data-mode="build"] {
  border-color: rgba(201, 255, 0, 0.74);
  box-shadow: var(--shadow-lime);
}

.mode-tab.is-active[data-mode="test"],
.mode-tab.is-complete[data-mode="test"] {
  border-color: rgba(24, 167, 255, 0.82);
  box-shadow: var(--shadow-blue);
}

.mode-tab.is-active[data-mode="learn"] {
  border-color: rgba(181, 38, 255, 0.88);
  box-shadow: var(--shadow-purple);
}

.mode-tab[data-mode="build"] span,
.mode-tab.is-complete[data-mode="build"] span {
  background: var(--lime);
}

.mode-tab[data-mode="test"] span,
.mode-tab.is-complete[data-mode="test"] span {
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--purple));
}

.mode-tab[data-mode="learn"] span {
  color: white;
  background: linear-gradient(135deg, var(--violet), var(--purple));
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pill,
.badge,
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 14px;
  border: 1px solid rgba(135, 165, 220, 0.28);
  border-radius: 8px;
  color: white;
  background: rgba(4, 10, 22, 0.74);
  font-size: 13px;
  font-weight: 850;
}

.pill--sample::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 14px rgba(201, 255, 0, 0.65);
}

.icon-button,
.operator {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: white;
  border: 1px solid rgba(135, 165, 220, 0.3);
  border-radius: 50%;
  background: rgba(4, 10, 22, 0.74);
  font-weight: 950;
}

.operator {
  border-color: rgba(181, 38, 255, 0.9);
}

.screen {
  display: none;
}

.screen.is-active {
  display: block;
}

.mobile-mode-pages {
  min-width: 0;
}

.mobile-mode-controls {
  display: none;
}

.workspace,
.screen,
.panel,
.build-panel,
.mode-tab,
.pill,
.badge,
.status-chip,
.dock article {
  min-width: 0;
}

.mode-tab strong,
.mode-tab small,
.pill,
.badge,
.status-chip,
.dock strong,
.dock span,
.side-nav__item {
  overflow: hidden;
  text-overflow: ellipsis;
}

.screen-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 100px;
  margin-bottom: 18px;
}

.screen-kicker,
.eyebrow {
  margin: 0 0 8px;
  color: var(--lime);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 6px;
  font-size: 34px;
  line-height: 1.06;
}

h2 {
  margin-bottom: 8px;
  font-size: 24px;
  line-height: 1.12;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

p {
  color: #d5dbe8;
  line-height: 1.45;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
}

.primary-action,
.secondary-action,
.ghost-action {
  min-height: 42px;
  border-radius: 10px;
  font-weight: 900;
}

.primary-action {
  padding: 0 28px;
  color: #06101f;
  border: 0;
  background: linear-gradient(135deg, var(--lime), #fff000);
  box-shadow: 0 0 34px rgba(201, 255, 0, 0.36);
}

.primary-action--test {
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  box-shadow: 0 0 36px rgba(24, 167, 255, 0.32);
}

.primary-action--learn {
  color: #06101f;
  background: linear-gradient(135deg, var(--lime), #e8ff4a);
}

.secondary-action,
.ghost-action {
  padding: 0 18px;
  color: white;
  border: 1px solid rgba(135, 165, 220, 0.28);
  background: rgba(10, 22, 39, 0.82);
}

.dock {
  position: fixed;
  z-index: 6;
  right: 16px;
  bottom: 8px;
  left: 266px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.dock article {
  flex: 1;
  min-width: 0;
  padding: 12px 14px 10px;
  border: 1px solid rgba(135, 165, 220, 0.2);
  border-radius: 10px;
  background: rgba(6, 15, 28, 0.94);
}

.dock strong,
.dock span {
  display: block;
}

.dock strong {
  font-size: 13px;
}

.dock span {
  margin: 4px 0 8px;
  color: var(--lime);
  font-weight: 850;
}

.dock button {
  width: 100%;
  min-height: 28px;
  color: #dce8fb;
  border: 0;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
}

.action-overlay[hidden] {
  display: none;
}

.action-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  justify-items: end;
  background: rgba(1, 5, 13, 0.28);
}

.action-overlay__scrim {
  position: absolute;
  inset: 0;
  background: rgba(1, 5, 13, 0.58);
}

.action-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(570px, 100vw);
  max-height: 100vh;
  overflow: hidden;
  border-left: 1px solid rgba(135, 165, 220, 0.32);
  background:
    radial-gradient(circle at 18% 12%, rgba(201, 255, 0, 0.08), transparent 14rem),
    linear-gradient(180deg, rgba(8, 20, 38, 0.98), rgba(4, 11, 22, 0.99));
  box-shadow: -26px 0 70px rgba(0, 0, 0, 0.46);
}

.action-panel__header,
.action-panel__footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  border-bottom: 1px solid rgba(135, 165, 220, 0.18);
}

.action-panel__header h2 {
  margin-bottom: 8px;
}

.action-panel__header p:last-child {
  margin-bottom: 0;
  color: #cbd6e8;
}

.action-panel__body {
  display: grid;
  gap: 16px;
  min-height: 0;
  overflow-y: auto;
  padding: 22px 24px 28px;
}

.clone-preview-meta { display: grid; gap: 4px; padding: 12px; border: 1px solid rgba(135, 165, 220, 0.18); border-radius: 8px; background: rgba(3, 8, 18, 0.5); }
.clone-preview-meta span, .clone-route-queue span, .clone-logo-picker span { color: #a8b3c7; font-size: 12px; }
.clone-frame-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.clone-frame-switch button { min-height: 40px; color: #dce8fb; border: 1px solid rgba(135, 165, 220, 0.24); border-radius: 7px; background: rgba(255, 255, 255, 0.04); font-weight: 800; }
.clone-frame-switch button.is-active { color: #06101f; border-color: var(--lime); background: var(--lime); }
.clone-page-list { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; max-height: 170px; overflow-y: auto; }
.clone-page-list button { position: relative; z-index: 3; display: grid; grid-template-columns: 25px 1fr; gap: 2px 8px; min-height: 48px; padding: 7px 9px; color: #dce8fb; text-align: left; border: 1px solid rgba(135, 165, 220, 0.2); border-radius: 7px; background: rgba(255, 255, 255, 0.04); }
.clone-page-list button.is-selected { border-color: var(--blue); background: rgba(24, 167, 255, 0.1); }
.clone-route-selector { display: grid; gap: 6px; color: #dce8fb; font-size: 12px; font-weight: 800; }
.clone-route-selector select { min-height: 42px; max-width: 100%; padding: 0 10px; border: 1px solid rgba(135, 165, 220, 0.3); border-radius: 7px; color: #dce8fb; background: #101d30; font-size: 12px; }
.clone-page-list button span { grid-row: span 2; display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; color: #06101f; background: #a8b3c7; font-weight: 900; }
.clone-page-list button strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clone-page-list button small { color: #a8b3c7; }
.clone-frames { display: grid; gap: 12px; }
.clone-device-toggle { display: flex; gap: 8px; margin: 12px 0; }
.clone-device-toggle button { min-height: 36px; padding: 0 12px; border: 1px solid rgba(135, 165, 220, 0.3); border-radius: 7px; color: #dce8fb; background: rgba(255, 255, 255, 0.04); font-size: 12px; font-weight: 800; }
.clone-device-toggle button.is-active { border-color: var(--lime); color: #111923; background: var(--lime); }
.clone-route-bridge-wrap { display: flex; justify-content: center; margin: 10px auto 0; }
.clone-route-bridge { min-height: 32px; padding: 0 10px; border: 1px solid #d4d9df; border-radius: 6px; color: #174a88; background: #fff; font-size: 11px; font-weight: 800; }
.clone-route-bridge:focus-visible { outline: 3px solid #8bd646; outline-offset: 2px; }
.clone-frame[hidden] { display: none; }
.clone-frame { overflow: hidden; border: 1px solid rgba(24, 167, 255, 0.42); border-radius: 10px; background: #0b1727; }
.clone-frame--phone { width: min(280px, 100%); height: min(520px, calc(100vh - 200px)); min-height: 360px; justify-self: center; border: 7px solid #1b2637; border-radius: 24px; }
.clone-frame--phone .clone-reference-page { height: 100%; overflow-y: auto; }
.clone-frame__browser { display: flex; align-items: center; gap: 5px; min-height: 30px; padding: 0 10px; background: #162437; }
.clone-frame__browser > span { width: 7px; height: 7px; border-radius: 50%; background: #6f87a7; }
.clone-frame__browser small { min-width: 0; margin-left: 4px; overflow: hidden; color: #9cb0c8; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.clone-frame__page { min-height: 350px; color: #122035; background: linear-gradient(180deg, #f8fbff, #deebf8); }
.clone-frame--phone .clone-frame__page { min-height: 490px; }
.clone-frame__page header { display: flex; align-items: center; gap: 8px; padding: 13px 15px; color: #18304c; border-bottom: 1px solid rgba(25, 58, 95, 0.15); background: rgba(255, 255, 255, 0.78); }
.clone-frame__page header img { width: 26px; height: 26px; object-fit: contain; }
.clone-frame__brand-mark { width: 26px; height: 26px; border-radius: 7px; background: linear-gradient(135deg, #1aafff, #6838ff); }
.clone-frame__page main { display: grid; align-content: center; min-height: 270px; padding: 26px 24px; }
.clone-frame--phone .clone-frame__page main { min-height: 395px; padding: 23px 18px; }
.clone-frame__eyebrow { color: #64758c; font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.clone-frame__page h4 { margin: 8px 0 12px; color: #102c4b; font-size: 23px; line-height: 1.08; }
.clone-frame--phone .clone-frame__page h4 { font-size: 20px; }
.clone-frame__page main > p:not(.clone-frame__eyebrow) { max-width: 520px; color: #40556e; font-size: 12px; line-height: 1.5; }
.clone-frame__page main button { width: fit-content; min-height: 38px; margin-top: 12px; padding: 0 16px; color: white; border: 0; border-radius: 6px; background: #173b66; font-weight: 800; }
.clone-frame__page footer { padding: 12px 15px; color: #71839b; border-top: 1px solid rgba(25, 58, 95, 0.15); font-size: 10px; }
.clone-logo-picker, .clone-route-queue { display: grid; gap: 8px; padding: 12px; border: 1px solid rgba(135, 165, 220, 0.18); border-radius: 8px; background: rgba(3, 8, 18, 0.5); }
.clone-logo-picker label { display: grid; gap: 4px; }
.clone-logo-picker input { max-width: 100%; color: #dce8fb; font-size: 12px; }
.clone-logo-list { display: flex; flex-wrap: wrap; gap: 8px; }
.clone-logo-choice { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; max-width: 100%; padding: 5px 8px; color: #dce8fb; border: 1px solid rgba(135, 165, 220, 0.22); border-radius: 7px; background: rgba(255, 255, 255, 0.04); }
.clone-logo-choice.is-selected { border-color: var(--lime); box-shadow: 0 0 0 1px rgba(201, 255, 0, .25); }
.clone-logo-choice img { width: 28px; height: 28px; object-fit: contain; border-radius: 4px; background: white; }
.clone-logo-choice span { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clone-logo-empty { color: #a8b3c7; font-size: 12px; }
.clone-route-queue ul { margin: 0; padding-left: 18px; color: #a8b3c7; font-size: 12px; overflow-wrap: anywhere; }
.clone-contract-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.clone-contract-grid > div { display: grid; gap: 8px; padding: 12px; border: 1px solid rgba(135, 165, 220, 0.18); border-radius: 8px; background: rgba(3, 8, 18, 0.5); }
.clone-contract-grid span { color: #a8b3c7; font-size: 12px; line-height: 1.4; }
.clone-contract-grid textarea { min-height: 90px; padding: 9px; color: #dce8fb; border: 1px solid rgba(135, 165, 220, 0.24); border-radius: 7px; background: rgba(2, 7, 16, 0.82); resize: vertical; }
.clone-contract-grid button, .clone-local-actions button { min-height: 40px; padding: 0 12px; color: #06101f; border: 0; border-radius: 7px; background: var(--lime); font-weight: 850; }
.clone-local-actions { display: flex; flex-wrap: wrap; gap: 8px; }

@font-face { font-family: "AltRx Liberation Serif"; src: url("/local-assets/altrx/dependencies/103-1f7fd76f5f10.ttf") format("truetype"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "AltRx Liberation Serif"; src: url("/local-assets/altrx/dependencies/100-8474d37c37cc.ttf") format("truetype"); font-style: normal; font-weight: 700; font-display: swap; }
@font-face { font-family: "AltRx Liberation Serif"; src: url("/local-assets/altrx/dependencies/102-b6c6967a9a1a.ttf") format("truetype"); font-style: italic; font-weight: 400; font-display: swap; }
.clone-reference-page { overflow: hidden; color: #34434f; background: #faf9f5; font-family: Roboto, "Roboto Fallback", system-ui, -apple-system, "system-ui", "Segoe UI", sans-serif; }
.clone-reference-promo { display: grid; place-items: center; min-height: 54px; padding: 9px 20px; color: #fff; background: #292929; font-size: 14px; font-weight: 800; line-height: 1.25; text-align: center; }
.clone-reference-header { display: flex; align-items: center; justify-content: center; min-height: 78px; padding: 10px 20px; border-bottom: 1px solid #dddcd8; background: #faf9f5; }
.clone-reference-back { position: absolute; left: 18px; width: 34px; height: 34px; border: 0; border-radius: 50%; color: #d7d8d8; background: #fff; font-size: 26px; }
.clone-reference-brand { display: flex; align-items: center; gap: 12px; color: #101419; }
.clone-reference-brand strong { font-family: "AltRx Liberation Serif", Georgia, serif; font-size: 42px; letter-spacing: -2px; }
.clone-reference-brand .clone-reference-logo { width: 94px; height: 42px; object-fit: contain; }
.clone-reference-brand span { color: #3b596f; font-size: 9px; line-height: 1.05; text-align: right; }
.clone-reference-brand b { color: #274f7d; font-size: 11px; line-height: 1.35; text-align: center; }
.clone-reference-brand i { color: #6122a4; font-style: italic; }
.clone-reference-steps { display: flex; align-items: center; justify-content: center; gap: 16px; max-width: 620px; margin: 20px auto 0; padding: 0 12px 16px; border-bottom: 1px solid #20262d; color: #17191c; font-size: 12px; font-weight: 700; }
.clone-reference-steps span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.clone-reference-steps span::before { content: ""; width: 20px; height: 20px; border: 2px solid #111; border-radius: 50%; }
.clone-reference-steps span:not(:last-child)::after { content: ""; width: 28px; height: 2px; margin-left: 11px; background: #111; }
.clone-reference-steps .is-current { color: #1b477e; }
.clone-reference-steps .is-current::before { border-color: #164a91; box-shadow: inset 0 0 0 5px #faf9f5; background: #164a91; }
.clone-reference-main { max-width: 670px; margin: 0 auto; padding: 34px 28px 32px; }
.clone-reference-main h4 { max-width: 620px; margin: 0 0 22px; color: #364550; font-size: 30px; font-weight: 500; line-height: 1.12; }
.clone-reference-main--state1 { width: min(670px, 100%); }
.clone-reference-main--state1 h4 { max-width: 620px; margin-bottom: 10px; color: #0f172a; font-family: "Funnel Sans", "Funnel Sans Fallback", Roboto, system-ui, sans-serif; font-size: 27px; font-weight: 700; line-height: 32.94px; }
.clone-reference-intro { margin: 0 0 34px; font-size: 15px; }
.clone-reference-main--state1 .clone-reference-intro { margin: 0; color: #475569; font-size: 18px; font-weight: 400; line-height: 27.9px; }
.clone-reference-main--state1 > .clone-reference-note { margin: 14px 0 22px; color: #64748b; font-size: 15px; font-weight: 400; line-height: 21.75px; }
.clone-reference-main--state1 .clone-reference-fields { width: min(620px, 100%); }
.clone-reference-main--state1 .clone-reference-fields label { font-family: Roboto, "Roboto Fallback", system-ui, -apple-system, "system-ui", "Segoe UI", sans-serif; }
.clone-reference-main--state1 .clone-reference-next { width: min(517px, 100%); min-height: 52px; margin: 34px auto 0; font-family: Roboto, "Roboto Fallback", system-ui, -apple-system, "system-ui", "Segoe UI", sans-serif; font-size: 18px; font-weight: 700; line-height: 26.1px; }
.clone-reference-source-footer { display: grid; justify-items: center; gap: 14px; margin: 36px -28px -32px; padding: 28px 20px 22px; color: #5d646b; background: #fff; text-align: center; }
.clone-reference-source-footer p { margin: 0; font-size: 14px; font-weight: 800; }
.clone-reference-source-footer p strong { color: #18a878; }
.clone-reference-trust-badges { display: flex; align-items: center; justify-content: center; gap: 12px; }
.clone-reference-trust-badges img { width: 58px; height: 58px; object-fit: contain; }
.clone-reference-source-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 14px; max-width: 580px; font-size: 12px; }
.clone-reference-main h5 { margin: 0 0 28px; color: #364550; font-size: 16px; }
.clone-reference-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; }
.clone-reference-dob { grid-template-columns: 1.4fr .8fr 1fr; }
.clone-reference-fields label { display: grid; gap: 8px; color: #35434e; font-size: 14px; font-weight: 700; }
.clone-reference-fields select, .clone-reference-fields input { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid #d3d5d7; border-radius: 12px; color: #101419; background: #f7f8f9; font-size: 16px; }
.clone-reference-fields input::placeholder { color: #9ca7b2; }
.clone-reference-sex { display: flex; flex-wrap: wrap; gap: 14px 18px; margin: 22px 0 0; padding: 0; border: 0; }
.clone-reference-sex legend { width: 100%; margin-bottom: 2px; color: #35434e; font-weight: 800; }
.clone-reference-sex label { display: inline-flex; align-items: center; gap: 8px; }
.clone-reference-options { display: grid; gap: 12px; }
.clone-reference-options label { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 12px 14px; border: 1px solid #d3d5d7; border-radius: 12px; background: #f7f8f9; font-weight: 700; }
.clone-reference-options input { width: 18px; height: 18px; flex: 0 0 auto; }
.clone-fixture-harness { display: grid; gap: 10px; margin: 24px 0; padding: 14px; border: 1px dashed #aeb5bd; border-radius: 12px; background: #f1f3f5; }
.clone-fixture-harness span { font-size: 13px; line-height: 1.4; }
.clone-fixture-harness div { display: flex; flex-wrap: wrap; gap: 8px; }
.clone-fixture-harness button { min-height: 40px; padding: 0 12px; border: 1px solid #9aa5b0; border-radius: 8px; color: #24313c; background: #fff; font-size: 12px; font-weight: 800; }
.clone-reference-note { margin: 22px 0 28px; font-size: 14px; }
.clone-reference-next { width: 100%; min-height: 56px; border: 0; border-radius: 28px; color: #747e8c; background: #d1d5dc; font-size: 17px; font-weight: 700; }
.clone-reference-next:not(:disabled) { color: #fff; background: #164a91; }
.clone-reference-footer { padding: 16px 28px; border-top: 1px solid #e5e4e0; color: #5d646b; background: #fff; font-size: 10px; line-height: 1.45; }
.clone-reference-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.clone-reference-footer button, .clone-logo-reset { min-height: 32px; padding: 0 10px; border: 1px solid #c9cdd1; border-radius: 7px; color: #34434f; background: #fff; font-size: 11px; font-weight: 700; }
.clone-reference-unavailable { min-height: 360px; }
.clone-route-links { display: grid; gap: 8px; margin: 20px 0 24px; }
.clone-route-links button, .clone-route-links span { overflow-wrap: anywhere; color: #274f7d; font-size: 12px; text-align: left; }
.clone-route-links button { padding: 9px 10px; border: 1px solid #d3d5d7; border-radius: 8px; background: #f7f8f9; }
.clone-reference-unavailable p:not(.clone-reference-eyebrow) { max-width: 500px; line-height: 1.5; }
.clone-reference-eyebrow { color: #65717b; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.clone-logo-status { margin: 0; color: #a8b3c7; font-size: 11px; }
.clone-asset-summary { display: grid; gap: 4px; padding: 12px; border: 1px solid rgba(135, 165, 220, 0.18); border-radius: 8px; background: rgba(3, 8, 18, 0.5); color: #dce8fb; }
.clone-asset-summary span { color: #a8b3c7; font-size: 12px; }
.clone-reference-assets { display: grid; gap: 10px; margin: 0 28px 24px; padding: 14px; border: 1px solid #deddd8; border-radius: 10px; background: #fff; }
.clone-reference-assets > div { display: flex; flex-wrap: wrap; gap: 10px; }
.clone-reference-assets figure { width: 72px; margin: 0; }
.clone-reference-assets img { display: block; width: 72px; height: 52px; object-fit: contain; border: 1px solid #e1e1df; border-radius: 6px; background: #fafafa; }
.clone-reference-assets figcaption { margin-top: 4px; overflow: hidden; color: #65717b; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.clone-frame--phone .clone-reference-header { min-height: 72px; padding: 8px 12px; }
.clone-frame--phone .clone-reference-promo { min-height: 54px; padding: 8px 14px; font-size: 12px; }
.clone-frame--phone .clone-reference-brand strong { font-size: 30px; }
.clone-frame--phone .clone-reference-brand .clone-reference-logo { width: 68px; height: 30px; }
.clone-frame--phone .clone-reference-brand span, .clone-frame--phone .clone-reference-brand b { font-size: 7px; }
.clone-frame--phone .clone-reference-back { left: 10px; width: 30px; height: 30px; }
.clone-frame--phone .clone-reference-steps { justify-content: flex-start; gap: 2px; margin-top: 15px; padding: 0 10px 14px; font-size: 9px; overflow: hidden; }
.clone-frame--phone .clone-reference-steps span::before { width: 15px; height: 15px; }
.clone-frame--phone .clone-reference-steps span:not(:last-child)::after { width: 8px; margin-left: 2px; }
.clone-frame--phone .clone-reference-main { padding: 20px 16px 24px; }
.clone-frame--phone .clone-reference-main h4 { margin-bottom: 24px; font-size: 22px; }
.clone-frame--phone .clone-reference-intro { margin-bottom: 34px; font-size: 14px; line-height: 1.35; }
.clone-frame--phone .clone-reference-main h5 { margin-bottom: 28px; font-size: 17px; }
.clone-frame--phone .clone-reference-fields { grid-template-columns: 1fr; gap: 18px; }
.clone-frame--phone .clone-reference-dob { grid-template-columns: 1fr; }
.clone-frame--phone .clone-reference-note { margin: 26px 0 18px; font-size: 14px; line-height: 1.35; }
.clone-frame--phone .clone-reference-main--state1 .clone-reference-note { margin: -10px 0 26px; }
.clone-frame--phone .clone-reference-source-footer { margin: 28px -16px -24px; padding: 24px 14px 20px; }
.clone-frame--phone .clone-reference-source-footer nav { gap: 8px 10px; font-size: 11px; }
.clone-frame--phone .clone-reference-footer { display: none; }
.clone-frame--phone .clone-reference-assets { margin: 0 16px 18px; }

/* The owner-authorized RX Pros source is rendered as a page surface, not a compact device card. */
.action-panel:has(.clone-frames--source) {
  background: #faf9f5;
  color: #34434f;
}
.action-panel:has(.clone-frames--source) .action-panel__header,
.action-panel:has(.clone-frames--source) .action-panel__footer {
  color: #34434f;
  background: #fff;
  border-color: #e5e4e0;
}
.action-panel:has(.clone-frames--source) .action-panel__header p:last-child { color: #5d646b; }
.clone-frames--source { display: block; margin: 0 -24px; }
.clone-frames--source .clone-frame {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: #faf9f5;
}
.clone-frames--source .clone-frame--phone {
  width: 390px;
  max-width: 100%;
  height: auto;
  min-height: 0;
  margin: 0 auto;
  border: 0;
  border-radius: 0;
}
.clone-frames--source .clone-frame--phone .clone-reference-page {
  height: auto;
  min-height: 100vh;
  overflow: visible;
}
.clone-frames--source .clone-reference-page { min-height: 680px; }
.clone-frames--source .clone-reference-main { min-height: 470px; }

body.hosted-clone { min-height: 100vh; background: #faf9f5; }
body.hosted-clone .app-shell { display: none; }
body.hosted-clone .action-overlay { position: static; display: block; min-height: 100vh; background: transparent; }
body.hosted-clone .action-overlay__scrim { display: none; }
body.hosted-clone .action-panel { width: 100%; max-width: none; min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; background: #faf9f5; }
body.hosted-clone .action-panel__header,
body.hosted-clone .action-panel__footer { display: none; }
body.hosted-clone .action-panel__body { overflow: visible; padding: 0; }
body.hosted-clone .clone-preview-meta { display: none; }
body.hosted-clone .clone-frames--source { margin: 0; }

.action-panel__footer {
  align-items: center;
  border-top: 1px solid rgba(135, 165, 220, 0.18);
  border-bottom: 0;
}

.surface-grid,
.surface-list {
  display: grid;
  gap: 12px;
}

.surface-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.surface-field,
.surface-card,
.surface-row,
.surface-error,
.surface-success,
.surface-gate {
  border: 1px solid rgba(135, 165, 220, 0.2);
  border-radius: 10px;
  background: rgba(5, 13, 26, 0.76);
}

.surface-field {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.surface-field span,
.surface-card small,
.surface-row small {
  color: #9fabc0;
  font-size: 12px;
  font-weight: 800;
}

.surface-field input,
.surface-field select,
.surface-field textarea {
  width: 100%;
  min-height: 42px;
  color: white;
  border: 1px solid rgba(135, 165, 220, 0.24);
  border-radius: 8px;
  background: rgba(2, 7, 16, 0.82);
  padding: 0 12px;
}

.surface-field textarea {
  min-height: 86px;
  padding: 12px;
  resize: vertical;
}

.surface-card,
.surface-row,
.surface-error,
.surface-success,
.surface-gate {
  padding: 14px;
}

.surface-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.surface-row strong,
.surface-card strong {
  color: white;
}

.surface-row.is-selected,
.surface-card.is-selected {
  border-color: rgba(201, 255, 0, 0.72);
  box-shadow: inset 0 0 0 1px rgba(201, 255, 0, 0.14);
}

.surface-error {
  color: #ffdce4;
  border-color: rgba(255, 82, 113, 0.5);
  background: rgba(34, 6, 13, 0.62);
}

.surface-success {
  color: #efffc0;
  border-color: rgba(201, 255, 0, 0.42);
  background: rgba(18, 31, 4, 0.68);
}

.surface-gate {
  color: #fff1bc;
  border-color: rgba(255, 176, 0, 0.36);
  background: rgba(28, 18, 2, 0.62);
}

.surface-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.surface-actions button {
  min-height: 42px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 1279px) {
  html {
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    min-width: 0;
    overflow-x: hidden;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .side-rail {
    position: sticky;
    top: 0;
    z-index: 10;
    min-height: 0;
    padding: 14px 16px;
    border-right: 0;
    border-bottom: 1px solid rgba(80, 145, 255, 0.2);
    overflow: visible;
  }

  .brand {
    margin-bottom: 12px;
    font-size: 18px;
  }

  .brand__mark {
    width: 34px;
    height: 28px;
  }

  .side-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
  }

  .side-nav__item {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 14px;
    font-size: 14px;
    white-space: nowrap;
  }

  .side-nav__divider,
  .rail-art,
  .policy-card {
    display: none;
  }

  .workspace {
    min-width: 0;
    padding: 16px 16px 132px;
  }

  .top-stepper {
    position: sticky;
    top: 86px;
    z-index: 8;
    align-items: flex-start;
    min-height: 0;
    gap: 12px;
    padding: 0 0 10px;
    background: linear-gradient(180deg, rgba(3, 7, 18, 0.96), rgba(3, 7, 18, 0.72));
  }

  .mode-tabs {
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .mode-tabs > i {
    flex: 0 0 38px;
    width: 38px;
  }

  .mode-tab {
    flex: 0 0 184px;
    grid-template-columns: 38px auto;
    min-width: 184px;
    min-height: 58px;
    padding: 8px 14px 8px 10px;
    border-radius: 16px;
  }

  .mode-tab span {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }

  .mode-tab strong {
    font-size: 16px;
  }

  .mode-tab small {
    font-size: 12px;
  }

  .top-actions {
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 180px;
    gap: 8px;
  }

  .top-actions .pill {
    display: none;
  }

  .icon-button,
  .operator,
  .primary-action,
  .secondary-action,
  .ghost-action {
    min-height: 44px;
  }

  .screen-header {
    min-height: 0;
    gap: 16px;
  }

  .dock {
    left: 12px;
    right: 12px;
    bottom: max(8px, env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(4, minmax(128px, 1fr));
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .dock article {
    min-width: 128px;
  }
}

@media (max-width: 720px) {
  .side-rail {
    position: static;
    max-width: 100%;
    overflow: hidden;
    padding: 12px;
  }

  .brand {
    width: 100%;
    max-width: 100%;
    margin-bottom: 10px;
  }

  .workspace {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    padding: 14px 12px 146px;
  }

  .top-stepper,
  .screen-header {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    max-width: 100%;
    min-width: 0;
  }

  .top-stepper {
    position: static;
    top: auto;
  }

  .top-actions {
    width: 100%;
    max-width: none;
    justify-content: space-between;
  }

  .mode-tab {
    flex-basis: 152px;
    min-width: 152px;
  }

  .mode-tabs,
  .side-nav {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    contain: layout paint;
  }

  .icon-button,
  .operator {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
  }

  .primary-action,
  .secondary-action,
  .ghost-action,
  .mode-tab,
  .side-nav__item,
  .dock button {
    touch-action: manipulation;
  }

  .screen-kicker,
  .eyebrow,
  h1,
  h2,
  h3,
  p,
  strong,
  span,
  small,
  dd,
  dt,
  label,
  button,
  input,
  textarea,
  select {
    overflow-wrap: anywhere;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 20px;
  }

  .dock {
    grid-template-columns: repeat(8, minmax(118px, 1fr));
    contain: layout paint;
  }

  .mobile-mode-pages {
    display: flex;
    width: 100%;
    max-width: 100%;
    contain: layout paint;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }

  .mobile-mode-pages .screen {
    display: block;
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .mobile-mode-pages .screen > * {
    max-width: 100%;
    min-width: 0;
  }

  .mobile-mode-pages .screen:not(.is-active) {
    opacity: 0.82;
  }

  .mobile-mode-controls {
    position: sticky;
    top: 0;
    z-index: 7;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    margin: 0 0 12px;
    padding: 6px;
    border: 1px solid rgba(135, 165, 220, 0.22);
    border-radius: 12px;
    background: rgba(3, 8, 18, 0.94);
  }

  .mobile-mode-control {
    min-width: 0;
    width: auto;
    min-height: 46px;
    color: #dce6f7;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    font-weight: 900;
    touch-action: manipulation;
  }

  .mobile-mode-control.is-active {
    color: #06101f;
    border-color: rgba(201, 255, 0, 0.74);
    background: linear-gradient(135deg, var(--lime), #e8ff4a);
    box-shadow: 0 0 18px rgba(201, 255, 0, 0.3);
  }

  .action-overlay {
    justify-items: stretch;
    align-items: end;
  }

  .action-panel {
    width: 100%;
    max-height: 88vh;
    border-top: 1px solid rgba(135, 165, 220, 0.32);
    border-left: 0;
    border-radius: 18px 18px 0 0;
  }

  .action-panel__header,
  .action-panel__footer {
    padding: 16px;
  }

  .action-panel__body {
    padding: 16px 16px 20px;
  }

  .surface-grid {
    grid-template-columns: 1fr;
  }

  .action-panel__footer {
    display: grid;
    grid-template-columns: 1fr;
  }
}
