:root {
  color-scheme: light;
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  --ink: #152033;
  --muted: #667184;
  --navy: #12243d;
  --navy-dark: #0b1728;
  --navy-soft: #1a365a;
  --gold: #c5973e;
  --gold-light: #e0b864;
  --gold-pale: #fbf5e8;
  --line: #e3e8ef;
  --surface: #ffffff;
  --background: #f4f6f9;
  --success: #178467;
  --danger: #b83c45;
  --shadow: 0 18px 60px rgba(13, 29, 49, 0.1);
  background: var(--background);
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--background);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(197, 151, 62, 0.35);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.site-header {
  align-items: center;
  background: rgba(11, 23, 40, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  height: 72px;
  justify-content: space-between;
  padding: 0 5vw;
  position: sticky;
  top: 0;
  z-index: 50;
}

body.studio-active .site-header {
  display: none;
}

.brand,
.sidebar-brand {
  align-items: center;
  background: none;
  border: 0;
  color: white;
  display: flex;
  font-size: 1.05rem;
  font-weight: 800;
  gap: 0.65rem;
  letter-spacing: 0.08em;
  padding: 0;
  text-transform: uppercase;
}

.brand strong {
  color: var(--gold-light);
}

.brand-mark,
.sidebar-brand span {
  color: var(--gold-light);
  font-size: 1.45rem;
}

.marketing-nav {
  align-items: center;
  display: flex;
  gap: 1.5rem;
}

.nav-link,
.text-button {
  background: none;
  border: 0;
  color: inherit;
  font-weight: 700;
  padding: 0.5rem;
}

.nav-link {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.button {
  align-items: center;
  background: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 0.65rem;
  color: #111820;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 46px;
  padding: 0.75rem 1.2rem;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.button:hover:not(:disabled) {
  background: var(--gold-light);
  box-shadow: 0 10px 28px rgba(197, 151, 62, 0.22);
  transform: translateY(-1px);
}

.button-small {
  min-height: 38px;
  padding: 0.5rem 0.9rem;
}

.button-secondary {
  background: white;
  border-color: var(--line);
  color: var(--navy);
}

.button-secondary:hover:not(:disabled) {
  background: var(--gold-pale);
  border-color: rgba(197, 151, 62, 0.4);
}

.button-danger {
  background: #fff;
  border-color: #efcdd0;
  color: var(--danger);
}

.hero-shell {
  background:
    radial-gradient(
      circle at 82% 18%,
      rgba(197, 151, 62, 0.18),
      transparent 28%
    ),
    linear-gradient(140deg, var(--navy-dark), var(--navy) 60%, #17365a);
  color: white;
  display: grid;
  gap: 5rem;
  grid-template-columns: minmax(0, 0.9fr) minmax(440px, 1.1fr);
  min-height: calc(100vh - 72px);
  overflow: hidden;
  padding: clamp(4rem, 8vw, 8rem) 6vw;
  position: relative;
}

.hero-copy {
  align-self: center;
  max-width: 670px;
  position: relative;
  z-index: 2;
}

.eyebrow,
.kicker {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  margin: 0 0 0.8rem;
  text-transform: uppercase;
}

.hero-shell .eyebrow {
  color: var(--gold-light);
}

.hero-copy h1,
.content-heading h1 {
  font-size: clamp(2.8rem, 6vw, 5.8rem);
  letter-spacing: -0.055em;
  line-height: 0.98;
  margin: 0;
}

.hero-lede {
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  line-height: 1.7;
  margin: 1.6rem 0 2rem;
  max-width: 600px;
}

.hero-actions,
.trust-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.trust-list {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.82rem;
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
}

.trust-list li::before {
  color: var(--gold-light);
  content: '✓';
  margin-right: 0.45rem;
}

.hero-product {
  align-self: center;
  background: #0b1422;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1.2rem;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.42);
  min-height: 510px;
  overflow: hidden;
  transform: perspective(1400px) rotateY(-5deg) rotateX(2deg);
}

.window-bar {
  align-items: center;
  background: #111d2c;
  display: flex;
  gap: 0.4rem;
  height: 38px;
  padding: 0 1rem;
}

.window-bar span {
  background: #34445a;
  border-radius: 50%;
  height: 8px;
  width: 8px;
}

.preview-grid {
  display: grid;
  grid-template-columns: 68px 1fr;
  min-height: 472px;
}

.preview-sidebar {
  align-items: center;
  background: #0e1a2a;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  padding: 1.4rem 0;
}

.preview-sidebar span:not(.preview-logo) {
  background: #293a50;
  border-radius: 0.25rem;
  height: 26px;
  width: 26px;
}

.preview-logo {
  color: var(--gold-light);
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
}

.preview-content {
  padding: 2.4rem;
}

.preview-kicker,
.preview-meta {
  color: #8da0ba;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.preview-title {
  font-size: 1.35rem;
  font-weight: 750;
  margin-top: 0.5rem;
}

.preview-model {
  align-items: center;
  background: radial-gradient(circle at center, #253e5e, #101d2d 68%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.8rem;
  display: flex;
  height: 300px;
  justify-content: center;
  margin: 1.5rem 0;
  overflow: hidden;
  position: relative;
}

.model-orbit {
  border: 1px solid rgba(224, 184, 100, 0.26);
  border-radius: 50%;
  height: 230px;
  position: absolute;
  transform: rotateX(70deg);
  width: 330px;
}

.model-building {
  color: var(--gold-light);
  font-size: 7rem;
  text-shadow: 20px 28px 0 rgba(197, 151, 62, 0.24);
  transform: rotate(-14deg) skewY(6deg);
}

.preview-progress {
  background: #29394e;
  border-radius: 99px;
  height: 5px;
  margin-bottom: 0.7rem;
  overflow: hidden;
}

.preview-progress span {
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  display: block;
  height: 100%;
  width: 68%;
}

.section-shell {
  margin: 0 auto;
  max-width: 1320px;
  padding: 6rem 5vw;
}

.value-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(3, 1fr);
}

.value-grid article {
  border-top: 2px solid var(--gold);
  padding: 1.6rem 0;
}

.value-grid h2 {
  color: var(--navy);
  margin: 0.8rem 0;
}

.value-grid p,
.content-heading p,
.architecture-flow p,
.plan-card p {
  color: var(--muted);
  line-height: 1.65;
}

.feature-number {
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.content-view {
  margin: 0 auto;
  max-width: 1320px;
  min-height: calc(100vh - 72px);
  padding: 6rem 5vw;
}

.content-heading {
  margin-bottom: 4rem;
  max-width: 850px;
}

.content-heading h1 {
  color: var(--navy);
  font-size: clamp(2.5rem, 5vw, 4.8rem);
}

.architecture-flow,
.plan-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr auto 1fr auto 1fr;
}

.architecture-flow article,
.plan-card,
.card,
.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: 0 8px 28px rgba(13, 29, 49, 0.04);
}

.architecture-flow article {
  padding: 2rem;
}

.architecture-flow article > span {
  align-items: center;
  background: var(--gold-pale);
  border-radius: 50%;
  color: var(--gold);
  display: flex;
  font-weight: 800;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.architecture-flow h2 {
  color: var(--navy);
}

.flow-arrow {
  align-self: center;
  color: var(--gold);
  font-size: 1.8rem;
}

.privacy-callout {
  background: var(--navy);
  border-radius: 1rem;
  color: white;
  margin-top: 2rem;
  padding: 1.6rem 2rem;
}

.privacy-callout p {
  color: rgba(255, 255, 255, 0.7);
  margin: 0.4rem 0 0;
}

.plan-grid {
  align-items: stretch;
  grid-template-columns: repeat(3, 1fr);
}

.plan-card {
  display: flex;
  flex-direction: column;
  padding: 2rem;
  position: relative;
}

.plan-card.featured {
  border-color: rgba(197, 151, 62, 0.7);
  box-shadow: var(--shadow);
}

.plan-name {
  color: var(--gold) !important;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  margin: 0;
  text-transform: uppercase;
}

.plan-card h2 {
  color: var(--navy);
  font-size: 2.4rem;
  margin: 0.8rem 0;
}

.plan-card ul {
  color: var(--muted);
  flex: 1;
  line-height: 2;
  padding-left: 1.2rem;
}

.plan-badge {
  background: var(--gold);
  border-radius: 99px;
  color: #111820;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  padding: 0.35rem 0.6rem;
  position: absolute;
  right: 1.2rem;
  top: 1.2rem;
}

.auth-view {
  align-items: center;
  background:
    radial-gradient(
      circle at 20% 20%,
      rgba(197, 151, 62, 0.16),
      transparent 32%
    ),
    var(--navy-dark);
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 72px);
  padding: 3rem 1rem;
}

.auth-card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.3);
  max-width: 480px;
  padding: 2.5rem;
  width: 100%;
}

.account-auth-card {
  max-width: 620px;
}

.auth-title-row,
.account-project-heading {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.auth-tabs {
  background: #eef2f6;
  border-radius: 0.7rem;
  display: grid;
  gap: 0.25rem;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 1.4rem;
  padding: 0.25rem;
}

.auth-tab {
  background: transparent;
  border: 0;
  border-radius: 0.52rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.7rem;
}

.auth-tab.active {
  background: white;
  box-shadow: 0 3px 12px rgba(13, 29, 49, 0.08);
  color: var(--navy);
}

.account-form .button {
  width: 100%;
}

.password-note {
  color: var(--muted);
  font-size: 0.7rem;
  margin: -0.5rem 0 0;
}

.service-badge {
  background: #edf1f6;
  border: 1px solid #d9e0e9;
  border-radius: 99px;
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  padding: 0.4rem 0.65rem;
}

.service-badge.available {
  background: #e7f6f0;
  border-color: #bde2d4;
  color: #12664f;
}

.service-badge.unavailable,
.service-badge.demo {
  background: var(--gold-pale);
  border-color: #ead4a7;
  color: #79591f;
}

.demo-fallback {
  align-items: center;
  background: #f7f8fa;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  display: grid;
  gap: 1rem;
  margin-top: 1.4rem;
  padding: 1rem;
}

.demo-fallback strong {
  color: var(--navy);
  font-size: 0.8rem;
}

.demo-fallback p {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.5;
  margin: 0.3rem 0 0;
}

.demo-form {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: 1fr 1.2fr auto;
}

.demo-form input,
.demo-form .button {
  min-height: 40px;
}

.auth-brand {
  color: var(--gold);
  font-size: 2rem;
}

.auth-card h1 {
  color: var(--navy);
  margin: 0.4rem 0;
}

.auth-card > p:not(.eyebrow, .form-note) {
  color: var(--muted);
  line-height: 1.6;
}

.stack-form,
.pairing-card form {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

label {
  color: var(--ink);
  display: grid;
  font-size: 0.8rem;
  font-weight: 750;
  gap: 0.4rem;
}

input,
select {
  background: white;
  border: 1px solid #ccd4df;
  border-radius: 0.6rem;
  color: var(--ink);
  min-height: 46px;
  padding: 0.7rem 0.8rem;
  width: 100%;
}

.form-note,
.form-status {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.form-status.error {
  color: var(--danger);
}

.form-status.success {
  color: var(--success);
}

.studio-view {
  background: var(--background);
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.studio-sidebar {
  background: linear-gradient(180deg, var(--navy-dark), var(--navy));
  color: white;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 1.4rem 1rem;
  position: sticky;
  top: 0;
}

.sidebar-brand {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.3rem 0.6rem 1.4rem;
}

.studio-sidebar nav {
  display: grid;
  gap: 0.35rem;
  margin-top: 1.5rem;
}

.studio-nav {
  align-items: center;
  background: none;
  border: 1px solid transparent;
  border-radius: 0.55rem;
  color: rgba(255, 255, 255, 0.66);
  display: flex;
  font-size: 0.84rem;
  font-weight: 700;
  gap: 0.8rem;
  padding: 0.75rem 0.8rem;
  text-align: left;
}

.studio-nav span {
  color: var(--gold-light);
  font-size: 1.1rem;
  width: 18px;
}

.studio-nav:hover,
.studio-nav.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.07);
  color: white;
}

.sidebar-footer {
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 0.7rem;
  margin-top: auto;
  padding: 1rem 0.45rem 0;
}

.sidebar-footer > span {
  align-items: center;
  background: var(--gold);
  border-radius: 50%;
  color: var(--navy-dark);
  display: flex;
  font-size: 0.7rem;
  font-weight: 900;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.sidebar-footer div {
  display: grid;
}

.sidebar-footer strong {
  font-size: 0.78rem;
}

.sidebar-footer small {
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.66rem;
}

.studio-main {
  min-width: 0;
}

.studio-topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  display: flex;
  height: 82px;
  justify-content: space-between;
  padding: 0 2.2rem;
  position: sticky;
  top: 0;
  z-index: 20;
}

.studio-topbar > div:first-of-type {
  flex: 1;
}

.studio-topbar p {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  margin: 0;
  text-transform: uppercase;
}

.studio-topbar h1 {
  color: var(--navy);
  font-size: 1.15rem;
  margin: 0.2rem 0 0;
}

.icon-button {
  background: none;
  border: 0;
  color: var(--navy);
  display: none;
  font-size: 1.4rem;
  margin-right: 0.75rem;
}

.worker-pill {
  align-items: center;
  background: #edf1f6;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  display: flex;
  font-size: 0.72rem;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
}

.worker-pill span {
  background: #a5afbd;
  border-radius: 50%;
  height: 8px;
  width: 8px;
}

.worker-pill.online {
  background: #e9f8f3;
  border-color: #c9ebdf;
  color: #11684f;
}

.worker-pill.online span {
  background: #1aa376;
  box-shadow: 0 0 0 4px rgba(26, 163, 118, 0.12);
}

.worker-pill.unpaired {
  background: var(--gold-pale);
  color: #8a641d;
}

.worker-pill.unpaired span {
  background: var(--gold);
}

.studio-content {
  margin: 0 auto;
  max-width: 1440px;
  padding: 2.2rem;
}

.welcome-row,
.panel-heading,
.card-heading {
  align-items: flex-start;
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
}

.welcome-row h2,
.panel-heading h2 {
  color: var(--navy);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  margin: 0;
}

.welcome-row p:not(.eyebrow),
.panel-heading p:not(.eyebrow) {
  color: var(--muted);
  margin: 0.5rem 0 0;
}

.metric-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, 1fr);
  margin: 2rem 0;
}

.metric-grid article {
  background: white;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  display: grid;
  gap: 0.35rem;
  padding: 1.2rem;
}

.metric-grid span,
.metric-grid small {
  color: var(--muted);
  font-size: 0.7rem;
}

.metric-grid strong {
  color: var(--navy);
  font-size: 1.7rem;
}

.dashboard-grid,
.connection-grid,
.account-grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.8fr);
}

.card {
  padding: 1.35rem;
}

.card-heading h2 {
  color: var(--navy);
  font-size: 1.15rem;
  margin: 0;
}

.card-heading .kicker {
  margin-bottom: 0.35rem;
}

.text-button {
  color: var(--gold);
  font-size: 0.78rem;
}

.text-button.danger {
  color: var(--danger);
  margin-top: 1rem;
}

.empty-state,
#dashboard-worker,
.viewer-empty {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 220px;
  text-align: center;
}

.empty-state p,
#dashboard-worker p {
  font-size: 0.82rem;
  line-height: 1.5;
  max-width: 390px;
}

.worker-card .button {
  width: 100%;
}

.status-orb {
  background: var(--gold-pale);
  border: 2px solid var(--gold);
  border-radius: 50%;
  height: 52px;
  margin-bottom: 1rem;
  position: relative;
  width: 52px;
}

.status-orb::after {
  background: var(--gold);
  border-radius: 50%;
  content: '';
  height: 12px;
  left: 18px;
  position: absolute;
  top: 18px;
  width: 12px;
}

.panel-heading {
  margin-bottom: 1.6rem;
}

.project-list {
  display: grid;
  gap: 1rem;
}

.project-row {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  padding: 1rem;
}

.project-row-icon {
  align-items: center;
  background: var(--gold-pale);
  border-radius: 0.6rem;
  color: var(--gold);
  display: flex;
  font-weight: 900;
  height: 42px;
  justify-content: center;
}

.project-row h3,
.project-row p {
  margin: 0;
}

.project-row h3 {
  color: var(--navy);
  font-size: 0.95rem;
}

.project-row p,
.project-row time {
  color: var(--muted);
  font-size: 0.72rem;
}

.project-status {
  background: #edf1f6;
  border-radius: 99px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  padding: 0.4rem 0.65rem;
  text-transform: uppercase;
}

.project-status.succeeded {
  background: #e9f8f3;
  color: var(--success);
}

.project-status.running,
.project-status.staging,
.project-status.queued {
  background: var(--gold-pale);
  color: #8a641d;
}

.wizard-layout {
  align-items: start;
  display: grid;
  gap: 1.3rem;
  grid-template-columns: minmax(0, 1fr) 310px;
}

.wizard-main {
  display: grid;
  gap: 1rem;
}

.form-card {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: 36px minmax(0, 1fr);
  padding: 1.35rem;
}

.form-card h3,
.job-summary h3,
.connection-card h3,
.pairing-card h3,
.account-grid h3 {
  color: var(--navy);
  margin: 0;
}

.form-card p,
.connection-card p,
.pairing-card p,
.account-grid p {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.step-number {
  align-items: center;
  background: var(--gold-pale);
  border-radius: 50%;
  color: var(--gold);
  display: flex;
  font-size: 0.75rem;
  font-weight: 900;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr 1fr;
  margin-top: 1rem;
}

.drop-zone {
  align-items: center;
  background: #fafbfc;
  border: 1px dashed #b7c1cf;
  border-radius: 0.8rem;
  color: var(--navy);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 145px;
  padding: 1rem;
  width: 100%;
}

.drop-zone:hover {
  background: var(--gold-pale);
  border-color: var(--gold);
}

.drop-zone > span {
  color: var(--gold);
  font-size: 1.8rem;
}

.drop-zone small {
  color: var(--muted);
}

.selection-summary {
  background: #eef8f5;
  border: 1px solid #cce9df;
  border-radius: 0.65rem;
  color: #17664f;
  font-size: 0.78rem;
  margin-top: 0.8rem;
  padding: 0.8rem;
}

.quality-options {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 1rem;
}

.quality-options label {
  display: block;
  position: relative;
}

.quality-options input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.quality-options span {
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  display: grid;
  gap: 0.25rem;
  padding: 0.8rem;
}

.quality-options input:checked + span {
  background: var(--gold-pale);
  border-color: var(--gold);
}

.quality-options small {
  color: var(--muted);
  font-weight: 500;
}

.job-summary {
  position: sticky;
  top: 104px;
}

.job-summary dl {
  margin: 1.3rem 0;
}

.job-summary dl > div {
  border-bottom: 1px solid var(--line);
  display: flex;
  font-size: 0.76rem;
  justify-content: space-between;
  padding: 0.7rem 0;
}

.job-summary dt {
  color: var(--muted);
}

.job-summary dd {
  color: var(--navy);
  font-weight: 750;
  margin: 0;
  max-width: 145px;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.local-notice {
  align-items: flex-start;
  background: #edf5fc;
  border-radius: 0.65rem;
  display: flex;
  gap: 0.7rem;
  margin-bottom: 1rem;
  padding: 0.8rem;
}

.local-notice span {
  color: #3172a6;
}

.local-notice p {
  color: #46657e;
  font-size: 0.72rem;
  margin: 0;
}

.job-summary .button {
  width: 100%;
}

.connection-grid {
  grid-template-columns: 0.8fr 1.2fr;
}

.connection-card {
  text-align: center;
}

.large-status {
  align-items: center;
  background: var(--gold-pale);
  border-radius: 50%;
  color: var(--gold);
  display: flex;
  font-size: 2rem;
  height: 72px;
  justify-content: center;
  margin: 0 auto 1rem;
  width: 72px;
}

.pairing-card form {
  grid-template-columns: minmax(0, 1fr) auto;
}

.pairing-card form label {
  grid-column: 1 / -1;
}

#pair-code {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.32em;
  text-align: center;
}

.hardware-card {
  margin-top: 1.2rem;
}

.hardware-card dl {
  display: grid;
  gap: 1rem;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  margin: 1.4rem 0 0;
}

.hardware-card dl > div {
  background: #f8f9fb;
  border-radius: 0.65rem;
  display: grid;
  gap: 0.35rem;
  padding: 0.8rem;
}

.hardware-card dt {
  color: var(--muted);
  font-size: 0.66rem;
  text-transform: uppercase;
}

.hardware-card dd {
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 750;
  margin: 0;
}

.job-layout {
  display: grid;
  gap: 1.2rem;
}

.progress-card {
  align-items: center;
  display: grid;
  gap: 2rem;
  grid-template-columns: 150px 1fr;
  padding: 2rem;
}

.progress-ring {
  align-items: center;
  background: conic-gradient(var(--gold) 0%, #e8edf2 0);
  border-radius: 50%;
  display: flex;
  height: 140px;
  justify-content: center;
  position: relative;
  width: 140px;
}

.progress-ring::after {
  background: white;
  border-radius: 50%;
  content: '';
  inset: 12px;
  position: absolute;
}

.progress-ring strong {
  color: var(--navy);
  font-size: 1.6rem;
  position: relative;
  z-index: 1;
}

.progress-copy h3 {
  color: var(--navy);
  font-size: 1.6rem;
  margin: 0;
}

.progress-copy > p:not(.kicker) {
  color: var(--muted);
}

.linear-progress {
  background: #e8edf2;
  border-radius: 99px;
  height: 8px;
  margin-top: 1.2rem;
  overflow: hidden;
}

.linear-progress span {
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  display: block;
  height: 100%;
  transition: width 0.3s ease;
  width: 0;
}

.job-log {
  display: grid;
  gap: 0.5rem;
  list-style: none;
  margin: 1rem 0 0;
  max-height: 300px;
  overflow: auto;
  padding: 0;
}

.job-log li {
  border-left: 2px solid var(--line);
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  line-height: 1.5;
  padding: 0.35rem 0 0.35rem 0.8rem;
}

.job-log li.warning {
  border-color: var(--gold);
}

.job-log li.error {
  border-color: var(--danger);
}

.results-layout {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: minmax(0, 1fr) 300px;
}

.viewer-card {
  padding: 0;
  overflow: hidden;
}

.result-viewer {
  background: radial-gradient(circle at center, #243d5d, #0e1a2a 70%);
  color: white;
  height: min(65vh, 640px);
  min-height: 420px;
  position: relative;
}

.result-viewer canvas,
.result-viewer img {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.viewer-empty {
  color: rgba(255, 255, 255, 0.68);
  height: 100%;
}

.viewer-empty span {
  color: var(--gold-light);
  font-size: 3rem;
}

.viewer-hint {
  background: var(--navy-dark);
  color: rgba(255, 255, 255, 0.54);
  font-size: 0.7rem;
  padding: 0.7rem 1rem;
  text-align: center;
}

.output-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 1rem;
}

.output-item {
  background: #f8f9fb;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  display: grid;
  gap: 0.5rem;
  padding: 0.8rem;
}

.output-item strong,
.output-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.output-item strong {
  color: var(--navy);
  font-size: 0.8rem;
}

.output-item small {
  color: var(--muted);
  font-size: 0.68rem;
}

.output-actions {
  display: flex;
  gap: 0.5rem;
}

.output-actions button {
  flex: 1;
  min-height: 34px;
  padding: 0.4rem;
}

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

.account-grid .card {
  min-height: 230px;
  position: relative;
}

.account-grid .button {
  margin-top: 1rem;
}

.credit-summary {
  background: var(--gold-pale);
  border-radius: 0.55rem;
  color: #75551a !important;
  font-size: 0.75rem !important;
  font-weight: 750;
  padding: 0.65rem 0.75rem;
}

.plan-simulator {
  margin-top: 1.2rem;
}

.plan-simulator > p {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.plan-switcher {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 1rem;
}

.plan-switcher button {
  align-items: flex-start;
  background: #f8f9fb;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  color: var(--navy);
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem;
  text-align: left;
}

.plan-switcher button:hover,
.plan-switcher button.active {
  background: var(--gold-pale);
  border-color: var(--gold);
}

.plan-switcher button small {
  color: var(--muted);
  font-size: 0.66rem;
}

.notice-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 0.8rem;
  grid-template-columns: 34px 1fr auto;
  padding: 0.8rem 0;
  text-align: left;
}

.notice-row:last-child {
  border-bottom: 0;
}

.notice-row > span:first-child {
  align-items: center;
  background: var(--gold-pale);
  border-radius: 0.4rem;
  color: var(--gold);
  display: flex;
  height: 34px;
  justify-content: center;
}

.notice-row strong,
.notice-row small {
  display: block;
}

.notice-row strong {
  color: var(--navy);
  font-size: 0.8rem;
}

.notice-row small {
  color: var(--muted);
  font-size: 0.68rem;
  margin-top: 0.2rem;
}

@media (max-width: 1100px) {
  .hero-shell {
    gap: 3rem;
    grid-template-columns: 1fr;
  }

  .hero-product {
    max-width: 800px;
    transform: none;
  }

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

  .wizard-layout,
  .results-layout {
    grid-template-columns: 1fr;
  }

  .job-summary {
    position: static;
  }
}

@media (max-width: 860px) {
  .architecture-flow {
    grid-template-columns: 1fr;
  }

  .flow-arrow {
    justify-self: center;
    transform: rotate(90deg);
  }

  .plan-grid,
  .value-grid {
    grid-template-columns: 1fr;
  }

  .studio-view {
    grid-template-columns: 1fr;
  }

  .studio-sidebar {
    display: none;
    inset: 0 auto 0 0;
    position: fixed;
    width: 248px;
    z-index: 60;
  }

  .studio-view.sidebar-open .studio-sidebar {
    display: flex;
  }

  .icon-button {
    display: block;
  }

  .dashboard-grid,
  .connection-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 0 1rem;
  }

  .marketing-nav .nav-link {
    display: none;
  }

  .hero-shell,
  .content-view {
    padding-left: 1.2rem;
    padding-right: 1.2rem;
  }

  .hero-copy h1 {
    font-size: 2.8rem;
  }

  .hero-product {
    min-height: 390px;
  }

  .preview-grid {
    grid-template-columns: 48px 1fr;
    min-height: 352px;
  }

  .preview-content {
    padding: 1.2rem;
  }

  .preview-model {
    height: 220px;
  }

  .studio-topbar,
  .studio-content {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .worker-pill strong {
    display: none;
  }

  .welcome-row,
  .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .metric-grid,
  .form-grid,
  .quality-options,
  .hardware-card dl,
  .account-grid {
    grid-template-columns: 1fr;
  }

  .plan-switcher {
    grid-template-columns: 1fr;
  }

  .form-card {
    grid-template-columns: 1fr;
  }

  .pairing-card form {
    grid-template-columns: 1fr;
  }

  .project-row {
    grid-template-columns: 38px 1fr auto;
  }

  .project-row time {
    display: none;
  }

  .progress-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .progress-ring {
    justify-self: center;
  }

  .result-viewer {
    min-height: 330px;
  }
}

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

/* Crown Studio workspace -------------------------------------------------- */

.crown-workspace.studio-view {
  background:
    radial-gradient(
      circle at 10% 0%,
      rgba(197, 151, 62, 0.08),
      transparent 30rem
    ),
    #eef2f6;
  display: block;
  min-height: 100vh;
}

.workspace-header {
  align-items: center;
  background: rgba(9, 21, 37, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  color: white;
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, auto) minmax(
      220px,
      1fr
    );
  min-height: 76px;
  padding: 0 3vw;
  position: sticky;
  top: 0;
  z-index: 40;
}

.workspace-brand {
  align-items: center;
  background: transparent;
  border: 0;
  color: white;
  display: flex;
  gap: 0.8rem;
  justify-self: start;
  padding: 0;
  text-align: left;
}

.workspace-brand > span:first-child {
  color: var(--gold-light);
  font-size: 1.7rem;
}

.workspace-brand > span:last-child {
  display: grid;
  font-size: 0.91rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1.05;
  text-transform: uppercase;
}

.workspace-brand strong {
  color: var(--gold-light);
}

.workspace-brand small {
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.53rem;
  letter-spacing: 0.2em;
  margin-top: 0.35rem;
}

.workspace-project-chip {
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  display: grid;
  min-width: 280px;
  padding: 0.1rem 2rem;
  text-align: center;
}

.workspace-project-chip small {
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.55rem;
  font-weight: 850;
  letter-spacing: 0.18em;
}

.workspace-project-chip strong {
  font-size: 0.82rem;
  margin-top: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-header-actions {
  align-items: center;
  display: flex;
  gap: 0.8rem;
  justify-self: end;
}

.workspace-header .worker-pill {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
}

.workspace-header .worker-pill.online {
  background: rgba(23, 132, 103, 0.18);
  border-color: rgba(64, 210, 169, 0.25);
  color: #a9ead7;
}

.workspace-header .worker-pill.unpaired {
  background: rgba(197, 151, 62, 0.15);
  border-color: rgba(224, 184, 100, 0.28);
  color: #f1d497;
}

.avatar-button {
  align-items: center;
  background: var(--gold);
  border: 0;
  border-radius: 50%;
  color: var(--navy-dark);
  display: flex;
  font-size: 0.7rem;
  font-weight: 900;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.workspace-body {
  margin: 0 auto;
  max-width: 1500px;
  padding: 2.6rem clamp(1.2rem, 3vw, 3.2rem) 6rem;
}

.account-project-panel {
  margin-bottom: 1.2rem;
  padding: 1.35rem;
}

.account-project-heading h2 {
  color: var(--navy-dark);
  font-size: 1.2rem;
  margin: 0.2rem 0 0.45rem;
}

.account-project-heading p:last-child,
.account-project-demo p {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.55;
  margin: 0;
}

.account-project-form {
  align-items: end;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(180px, 0.8fr) minmax(240px, 1.4fr) auto;
  margin-top: 1rem;
  padding-top: 1rem;
}

.account-project-list {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0.8rem;
}

.account-project-choice {
  background: white;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  color: var(--ink);
  display: grid;
  gap: 0.28rem;
  min-height: 88px;
  padding: 0.85rem;
  text-align: left;
}

.account-project-choice:hover,
.account-project-choice.active {
  background: var(--gold-pale);
  border-color: rgba(197, 151, 62, 0.65);
}

.account-project-choice strong {
  color: var(--navy);
  font-size: 0.82rem;
}

.account-project-choice small {
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.4;
}

.account-project-empty {
  color: var(--muted);
  font-size: 0.75rem;
  grid-column: 1 / -1;
  margin: 0;
  padding: 0.75rem 0;
}

.account-job-intent-heading {
  border-top: 1px solid var(--line);
  color: var(--navy);
  font-size: 0.85rem;
  margin: 1.1rem 0 0.15rem;
  padding-top: 1rem;
}

.account-job-intent-list {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.account-job-intent-row {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  display: grid;
  gap: 0.05rem 0.9rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0.6rem 0.85rem;
}

.account-job-intent-row strong {
  color: var(--navy);
  font-size: 0.8rem;
  grid-column: 1;
}

.account-job-intent-row small {
  color: var(--muted);
  font-size: 0.65rem;
  grid-column: 1;
}

.job-status-pill {
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 600;
  grid-column: 2;
  grid-row: 1 / span 2;
  justify-self: end;
  letter-spacing: 0.04em;
  padding: 0.22rem 0.6rem;
  text-transform: uppercase;
}

.job-status-completed {
  background: rgba(31, 122, 63, 0.12);
  color: #1f7a3f;
}

.job-status-failed {
  background: rgba(191, 63, 63, 0.12);
  color: #a5333a;
}

.job-status-queued,
.job-status-draft {
  background: rgba(12, 27, 46, 0.06);
  color: var(--muted);
}

.job-status-leased {
  background: var(--gold-pale);
  color: var(--gold);
}

.job-status-cancelled {
  background: rgba(12, 27, 46, 0.06);
  color: var(--muted);
}

.account-project-demo {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 1rem;
}

.workspace-intro {
  align-items: flex-end;
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  margin-bottom: 1.7rem;
}

.workspace-intro h1 {
  color: var(--navy-dark);
  font-size: clamp(2.35rem, 5vw, 4.7rem);
  letter-spacing: -0.055em;
  line-height: 0.95;
  margin: 0.18rem 0 0.8rem;
}

.workspace-intro > div > p:last-child {
  color: var(--muted);
  font-size: 1.02rem;
  margin: 0;
}

.local-boundary {
  align-items: center;
  background: #e5f5ef;
  border: 1px solid #c4e6d9;
  border-radius: 0.7rem;
  color: #12664f;
  display: flex;
  flex: 0 0 auto;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
}

.local-boundary > span {
  font-size: 1.45rem;
}

.local-boundary p {
  display: grid;
  margin: 0;
}

.local-boundary strong {
  font-size: 0.75rem;
}

.local-boundary small {
  font-size: 0.65rem;
  margin-top: 0.12rem;
  opacity: 0.75;
}

.mode-recommendation {
  margin: 0 0 1rem;
  padding: 0.7rem 0.95rem;
  border-radius: 0.7rem;
  font-size: 0.9rem;
  border: 1px solid #dce3eb;
  background: rgba(12, 27, 46, 0.04);
  color: #16324f;
}

.mode-recommendation[data-mode='local'] {
  border-color: #b9d9c2;
  background: rgba(31, 122, 63, 0.08);
}

.mode-recommendation[data-mode='cloud'] {
  border-color: #c7b98a;
  background: rgba(191, 149, 63, 0.1);
}

.card-elevated {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #dce3eb;
  border-radius: 0.9rem;
  box-shadow: 0 10px 36px rgba(12, 27, 46, 0.06);
}

.cloud-preview {
  margin-bottom: 2rem;
  overflow: hidden;
  padding: clamp(1.2rem, 3vw, 2rem);
  position: relative;
}

.cloud-preview::before {
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  content: '';
  height: 4px;
  inset: 0 0 auto;
  position: absolute;
}

.cloud-preview-heading {
  align-items: flex-start;
  display: flex;
  gap: 2rem;
  justify-content: space-between;
}

.cloud-preview-heading h2,
.local-option-heading h2 {
  color: var(--navy);
  margin: 0 0 0.45rem;
}

.cloud-preview-heading p:last-child,
.local-option-heading > p:last-child,
.cloud-progress p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
  max-width: 780px;
}

.cloud-mode-badge {
  background: #e5f5ef;
  border: 1px solid #c4e6d9;
  border-radius: 99px;
  color: #12664f;
  flex: 0 0 auto;
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  padding: 0.55rem 0.7rem;
}

.cloud-mode-badge.checking {
  background: var(--gold-pale);
  border-color: #ebd8ae;
  color: #805b1d;
}

.cloud-mode-badge.unavailable {
  background: #f8e9ea;
  border-color: #efcdd0;
  color: var(--danger);
}

.cloud-preview-form {
  align-items: end;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: 1fr 0.8fr minmax(250px, 1.2fr) auto;
  margin-top: 1.5rem;
}

.cloud-preview-form input,
.cloud-preview-form select {
  background: #f8fafc;
}

.cloud-file-field input {
  padding: 0.55rem;
}

.cloud-file-field input::file-selector-button {
  background: var(--navy);
  border: 0;
  border-radius: 0.4rem;
  color: white;
  cursor: pointer;
  font-weight: 750;
  margin-right: 0.65rem;
  padding: 0.45rem 0.65rem;
}

.cloud-progress {
  background: #f7f9fb;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  margin-top: 1rem;
  padding: 1rem;
}

.cloud-progress > div:first-child {
  color: var(--navy);
  display: flex;
  justify-content: space-between;
}

.cloud-progress .linear-progress {
  margin: 0.65rem 0;
}

.cloud-progress .button {
  margin-top: 0.9rem;
}

.cloud-progress-actions {
  display: flex;
  gap: 0.65rem;
}

.cloud-result {
  background: #eef2f6;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  margin: 1rem 0 0;
  overflow: hidden;
}

.cloud-result img {
  display: block;
  max-height: 520px;
  object-fit: contain;
  width: 100%;
}

.cloud-result figcaption {
  color: var(--muted);
  font-size: 0.75rem;
  padding: 0.65rem 0.8rem;
}

.local-option-heading {
  margin: 2.2rem 0 1rem;
}

.project-command {
  align-items: center;
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  padding: 1.15rem 1.25rem;
}

.project-command-copy {
  align-items: center;
  display: flex;
  gap: 1rem;
  min-width: 0;
}

.project-folder-mark {
  align-items: center;
  background: var(--gold-pale);
  border-radius: 0.65rem;
  color: #9c7127;
  display: flex;
  flex: 0 0 auto;
  font-size: 1.45rem;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.project-command small {
  color: var(--gold);
  font-size: 0.57rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.project-command h2 {
  color: var(--navy);
  font-size: 1.05rem;
  margin: 0.16rem 0 0.18rem;
}

.project-command p {
  color: var(--muted);
  font-size: 0.72rem;
  margin: 0;
}

.project-command-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
}

.button-quiet {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
}

.button-quiet:hover:not(:disabled) {
  background: #f2f5f8;
  border-color: var(--line);
  color: var(--navy);
}

.workflow-section {
  margin-top: 3.2rem;
}

.section-heading {
  align-items: flex-end;
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}

.section-heading h2 {
  color: var(--navy-dark);
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  letter-spacing: -0.035em;
  margin: 0.18rem 0 0;
}

.section-heading > p {
  color: var(--muted);
  font-size: 0.78rem;
  margin: 0 0 0.2rem;
}

.workflow-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.workflow-card {
  background: white;
  border: 1px solid #dce3eb;
  border-radius: 0.9rem;
  color: var(--ink);
  display: grid;
  min-height: 245px;
  overflow: hidden;
  padding: 1.15rem;
  position: relative;
  text-align: left;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.workflow-card::before {
  background: var(--tool-color, var(--gold));
  content: '';
  height: 3px;
  inset: 0 0 auto;
  position: absolute;
}

.workflow-card:nth-child(1) {
  --tool-color: #2f79c8;
}

.workflow-card:nth-child(2) {
  --tool-color: #2b9b78;
}

.workflow-card:nth-child(3) {
  --tool-color: #8a64c7;
}

.workflow-card:nth-child(4) {
  --tool-color: #d1783c;
}

.workflow-card:nth-child(5) {
  --tool-color: #b84d62;
}

.workflow-card:hover,
.workflow-card.active {
  border-color: var(--tool-color);
  box-shadow: 0 18px 40px rgba(13, 29, 49, 0.11);
  transform: translateY(-4px);
}

.workflow-card.unavailable {
  background: #f4f6f8;
  border-style: dashed;
  color: #6f7986;
}

.workflow-card.unavailable:hover {
  box-shadow: none;
  transform: none;
}

.workflow-card.unavailable em {
  color: #a13f4f;
}

.workflow-number {
  color: #9da7b5;
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.workflow-icon {
  align-items: center;
  background: color-mix(in srgb, var(--tool-color) 10%, white);
  border-radius: 0.7rem;
  color: var(--tool-color);
  display: flex;
  font-size: 1.65rem;
  height: 48px;
  justify-content: center;
  margin: 0.85rem 0 0.9rem;
  width: 48px;
}

.workflow-card strong {
  color: var(--navy-dark);
  font-size: 1rem;
  line-height: 1.2;
}

.workflow-card small {
  color: var(--muted);
  font-size: 0.69rem;
  line-height: 1.5;
  margin-top: 0.45rem;
}

.workflow-card em {
  align-self: end;
  color: var(--tool-color);
  font-size: 0.55rem;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.1em;
  margin-top: 1rem;
}

.tool-workspace,
.job-panel {
  margin-top: 1.2rem;
  scroll-margin-top: 100px;
}

.tool-header {
  align-items: flex-start;
  background: linear-gradient(135deg, var(--navy-dark), #183350);
  border-radius: 0.85rem 0.85rem 0 0;
  color: white;
  display: grid;
  gap: 1.1rem;
  grid-template-columns: auto 1fr auto;
  padding: 1.45rem 1.6rem;
}

.tool-heading-mark {
  align-items: center;
  border: 1px solid rgba(224, 184, 100, 0.38);
  border-radius: 0.6rem;
  color: var(--gold-light);
  display: flex;
  font-size: 0.7rem;
  font-weight: 900;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.tool-header .kicker {
  color: var(--gold-light);
}

.tool-header h2 {
  font-size: 1.55rem;
  margin: 0.18rem 0 0.35rem;
}

.tool-header p:last-child {
  color: rgba(255, 255, 255, 0.63);
  font-size: 0.77rem;
  line-height: 1.55;
  margin: 0;
  max-width: 800px;
}

.close-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0.45rem;
  color: inherit;
  display: flex;
  font-size: 1.5rem;
  height: 34px;
  justify-content: center;
  opacity: 0.65;
  width: 34px;
}

.close-button:hover {
  background: rgba(128, 140, 155, 0.13);
  opacity: 1;
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
}

.tool-main {
  border-right: 1px solid var(--line);
  padding: 1.6rem;
}

.tool-step + .tool-step {
  border-top: 1px solid var(--line);
  margin-top: 1.6rem;
  padding-top: 1.6rem;
}

.tool-step-label {
  align-items: flex-start;
  display: flex;
  gap: 0.85rem;
}

.tool-step-label > span {
  align-items: center;
  background: var(--navy);
  border-radius: 50%;
  color: white;
  display: flex;
  flex: 0 0 auto;
  font-size: 0.6rem;
  font-weight: 900;
  height: 26px;
  justify-content: center;
  width: 26px;
}

.tool-step h3 {
  color: var(--navy-dark);
  font-size: 1rem;
  margin: 0;
}

.tool-step p {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
  margin: 0.28rem 0 0;
}

.source-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 1rem 0 0 2.55rem;
}

.source-button {
  align-items: center;
  background: #f7f9fb;
  border: 1px solid #d5dde7;
  border-radius: 0.7rem;
  color: var(--navy);
  display: flex;
  gap: 0.7rem;
  min-width: 220px;
  padding: 0.75rem 0.9rem;
  text-align: left;
}

.source-button:hover {
  background: var(--gold-pale);
  border-color: #ddbd7d;
}

.source-button > span:first-child {
  color: var(--gold);
  font-size: 1.2rem;
}

.source-button > span:last-child {
  display: grid;
}

.source-button strong,
.artifact-source-group > strong {
  font-size: 0.76rem;
}

.source-button small {
  color: var(--muted);
  font-size: 0.62rem;
  margin-top: 0.13rem;
}

.artifact-source-group {
  align-items: center;
  display: grid;
  gap: 0.4rem;
  max-width: 420px;
  width: 100%;
}

.selection-summary {
  align-items: center;
  background: #e9f7f2;
  border: 1px solid #c7e8dc;
  border-radius: 0.65rem;
  color: #12684f;
  display: flex;
  gap: 0.7rem;
  margin: 0.8rem 0 0 2.55rem;
  padding: 0.7rem 0.85rem;
}

.selection-summary > span {
  align-items: center;
  background: #ccecdf;
  border-radius: 50%;
  display: flex;
  flex: 0 0 auto;
  font-size: 0.65rem;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.selection-summary > div {
  display: grid;
  min-width: 0;
}

.selection-summary strong {
  font-size: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selection-summary small {
  font-size: 0.62rem;
  margin-top: 0.12rem;
  opacity: 0.75;
}

.tool-settings {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 1rem 0 0 2.55rem;
}

.setting-field {
  color: var(--navy);
  display: grid;
  font-size: 0.68rem;
  font-weight: 800;
  gap: 0.4rem;
}

.setting-field select,
.setting-field input {
  background: #f8fafc;
  font-weight: 500;
}

.settings-note {
  background: #f6f8fb;
  border-left: 3px solid var(--gold);
  border-radius: 0.45rem;
  grid-column: 1 / -1;
  padding: 0.8rem 1rem;
}

.settings-note strong {
  color: var(--navy);
  font-size: 0.75rem;
}

.run-card {
  background: #f7f9fb;
  border-radius: 0 0 0.85rem 0;
  padding: 1.5rem;
}

.run-card h3 {
  color: var(--navy);
  font-size: 1rem;
  margin: 0.4rem 0 1.15rem;
}

.run-card dl {
  display: grid;
  gap: 0;
  margin: 0 0 1rem;
}

.run-card dl > div {
  border-top: 1px solid var(--line);
  display: flex;
  font-size: 0.68rem;
  justify-content: space-between;
  padding: 0.65rem 0;
}

.run-card dt {
  color: var(--muted);
}

.run-card dd {
  color: var(--navy);
  font-weight: 750;
  margin: 0;
  max-width: 180px;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-card > .button {
  width: 100%;
}

.run-privacy {
  align-items: center;
  background: #eaf5f1;
  border-radius: 0.55rem;
  color: #176850;
  display: flex;
  font-size: 0.66rem;
  gap: 0.65rem;
  margin: 1rem 0;
  padding: 0.7rem 0.8rem;
}

.run-privacy > span {
  font-size: 1.15rem;
}

.run-privacy p {
  line-height: 1.4;
  margin: 0;
}

.button-large {
  min-height: 48px;
}

.job-panel {
  padding: 1.5rem;
}

.job-panel-heading {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
}

.job-panel-heading h2 {
  color: var(--navy);
  font-size: 1.35rem;
  margin: 0.25rem 0;
}

.job-panel-heading p:last-child {
  color: var(--muted);
  font-size: 0.75rem;
  margin: 0;
}

.job-progress-row {
  align-items: center;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: auto 1fr;
  margin-top: 1.4rem;
}

.job-panel .progress-ring {
  background: conic-gradient(var(--gold) var(--progress, 0deg), #e5e9ef 0deg);
}

.progress-detail > span {
  color: var(--navy);
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.progress-detail small {
  color: var(--muted);
  display: block;
  font-size: 0.62rem;
  margin-top: 0.55rem;
}

.job-panel .job-log {
  background: #0d1c2d;
  border-radius: 0.6rem;
  margin-top: 1.2rem;
  max-height: 180px;
  padding: 0.7rem 1rem;
}

.results-panel {
  margin-top: 3rem;
  scroll-margin-top: 100px;
}

.results-panel .viewer-card,
.results-panel .output-card {
  border-radius: 0.9rem;
}

.results-panel .result-viewer iframe,
.results-panel .result-viewer img {
  border: 0;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.output-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 0.7rem;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 0.85rem 0;
}

.output-icon {
  align-items: center;
  background: var(--gold-pale);
  border-radius: 0.5rem;
  color: #9c7127;
  display: flex;
  grid-row: 1 / span 2;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.output-row > div:nth-child(2) {
  display: grid;
  min-width: 0;
}

.output-row strong {
  color: var(--navy);
  font-size: 0.73rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.output-row small {
  color: var(--muted);
  font-size: 0.6rem;
  margin-top: 0.15rem;
}

.output-actions {
  display: flex;
  flex-wrap: wrap;
  grid-column: 2;
  margin-left: -0.5rem;
}

.output-actions .text-button {
  color: #8b6520;
  font-size: 0.62rem;
  padding: 0.25rem 0.5rem;
}

.connection-strip {
  align-items: center;
  display: grid;
  gap: 1rem;
  grid-template-columns: auto 1fr auto;
  margin-top: 3rem;
  padding: 1rem 1.2rem;
}

.connection-icon {
  align-items: center;
  background: #e7edf4;
  border-radius: 50%;
  color: var(--navy);
  display: flex;
  font-size: 1.3rem;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.connection-strip h2 {
  color: var(--navy);
  font-size: 0.88rem;
  margin: 0.2rem 0;
}

.connection-strip p:last-child {
  color: var(--muted);
  font-size: 0.67rem;
  margin: 0;
}

.crown-dialog {
  background: white;
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 30px 90px rgba(3, 12, 23, 0.32);
  color: var(--ink);
  max-height: calc(100vh - 3rem);
  max-width: 720px;
  padding: 1.6rem;
  width: calc(100% - 2rem);
}

.crown-dialog::backdrop,
.inspection-dialog::backdrop {
  background: rgba(5, 14, 25, 0.76);
  backdrop-filter: blur(5px);
}

.compact-dialog {
  max-width: 520px;
}

.dialog-heading {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.dialog-heading h2 {
  color: var(--navy-dark);
  font-size: 1.55rem;
  margin: 0.25rem 0 0.4rem;
}

.dialog-heading p:last-child {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.55;
  margin: 0;
}

.dialog-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.4rem;
}

.dialog-grid label,
.pair-form label {
  color: var(--navy);
  display: grid;
  font-size: 0.68rem;
  font-weight: 800;
  gap: 0.35rem;
}

.dialog-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.pair-form {
  align-items: end;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 1fr auto;
  margin-top: 1.3rem;
}

.pair-form input {
  font-size: 1.3rem;
  font-weight: 850;
  letter-spacing: 0.2em;
  text-align: center;
}

.hardware-details {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.55rem;
  margin: 1.1rem 0;
  padding: 0.8rem 0;
}

.hardware-details > div {
  display: flex;
  font-size: 0.67rem;
  justify-content: space-between;
}

.hardware-details strong {
  color: var(--navy);
}

.hardware-details span {
  color: var(--muted);
  text-align: right;
}

.account-plan {
  background: #f5f7fa;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  display: grid;
  margin: 1.2rem 0;
  padding: 1rem;
}

.account-identity {
  background: var(--gold-pale);
  border: 1px solid #ead4a7;
  border-radius: 0.75rem;
  display: grid;
  gap: 0.25rem;
  margin-top: 1rem;
  padding: 0.85rem 1rem;
}

.account-identity strong {
  color: var(--navy);
  font-size: 0.82rem;
}

.account-identity p {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.45;
  margin: 0;
}

.account-plan > small {
  color: var(--muted);
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  margin-top: 0.7rem;
}

.account-plan > strong {
  color: var(--navy);
  font-size: 1.1rem;
  margin-top: 0.2rem;
}

.account-plan p {
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.5;
  margin: 0.35rem 0 0;
}

.inspection-dialog {
  background: #0a1626;
  border: 0;
  color: white;
  height: calc(100vh - 2rem);
  max-height: none;
  max-width: none;
  padding: 0;
  width: calc(100vw - 2rem);
}

.inspection-dialog header {
  align-items: center;
  background: #0a1626;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  height: 70px;
  justify-content: space-between;
  padding: 0 1.3rem;
}

.inspection-dialog h2 {
  font-size: 1rem;
  margin: 0.2rem 0 0;
}

.inspection-dialog .kicker {
  color: var(--gold-light);
}

.inspection-dialog iframe {
  background: #101c2c;
  border: 0;
  height: calc(100% - 70px);
  width: 100%;
}

@media (max-width: 1150px) {
  .cloud-preview-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .workflow-card {
    min-height: 220px;
  }

  .workspace-header {
    grid-template-columns: 1fr auto;
  }

  .workspace-project-chip {
    display: none;
  }
}

@media (max-width: 850px) {
  .cloud-preview-heading {
    flex-direction: column;
    gap: 1rem;
  }

  .workspace-intro,
  .project-command,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .project-command-actions {
    justify-content: flex-start;
  }

  .account-project-form {
    grid-template-columns: 1fr 1fr;
  }

  .account-project-form .button {
    grid-column: 1 / -1;
  }

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

  .tool-layout {
    grid-template-columns: 1fr;
  }

  .tool-main {
    border-bottom: 1px solid var(--line);
    border-right: 0;
  }

  .run-card {
    border-radius: 0 0 0.85rem 0.85rem;
  }
}

@media (max-width: 640px) {
  .auth-card {
    padding: 1.45rem;
  }

  .auth-title-row,
  .account-project-heading,
  .account-project-demo {
    align-items: stretch;
    flex-direction: column;
  }

  .service-badge {
    align-self: flex-start;
  }

  .demo-form,
  .account-project-form,
  .account-project-list {
    grid-template-columns: 1fr;
  }

  .demo-form .button,
  .account-project-form .button {
    grid-column: auto;
    width: 100%;
  }

  .cloud-preview-form {
    grid-template-columns: 1fr;
  }

  .cloud-preview-form .button {
    width: 100%;
  }

  .workspace-header {
    gap: 0.5rem;
    padding: 0 1rem;
  }

  .workspace-header .worker-pill strong {
    display: none;
  }

  .workspace-body {
    padding: 1.5rem 1rem 4rem;
  }

  .workspace-intro h1 {
    font-size: 2.55rem;
  }

  .local-boundary {
    align-self: flex-start;
  }

  .project-command-copy {
    align-items: flex-start;
  }

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

  .workflow-card {
    min-height: 190px;
  }

  .tool-header {
    padding: 1.2rem;
  }

  .tool-main,
  .run-card {
    padding: 1.15rem;
  }

  .source-actions,
  .selection-summary,
  .tool-settings {
    margin-left: 0;
  }

  .source-button {
    min-width: 100%;
  }

  .tool-settings,
  .dialog-grid {
    grid-template-columns: 1fr;
  }

  .connection-strip {
    grid-template-columns: auto 1fr;
  }

  .connection-strip .button {
    grid-column: 1 / -1;
  }

  .pair-form {
    grid-template-columns: 1fr;
  }

  .inspection-dialog {
    height: 100vh;
    width: 100vw;
  }
}

/* Cloud 3D guidance, disclaimer, and model result viewer. */
.cloud-guidance {
  background: var(--gold-pale);
  border: 1px solid rgba(197, 151, 62, 0.45);
  border-radius: 0.7rem;
  margin-top: 0.9rem;
  padding: 0.85rem 1rem;
}

.cloud-guidance h3 {
  align-items: center;
  color: var(--navy);
  display: flex;
  font-size: 0.85rem;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
}

.cloud-guidance-badge {
  background: var(--navy);
  border-radius: 999px;
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.5rem;
  text-transform: uppercase;
}

.cloud-guidance ul {
  color: var(--ink);
  display: grid;
  font-size: 0.75rem;
  gap: 0.28rem;
  margin: 0;
  padding-left: 1.1rem;
}

.cloud-disclaimer {
  border-top: 1px solid rgba(197, 151, 62, 0.4);
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.5;
  margin: 0.7rem 0 0;
  padding-top: 0.6rem;
}

.cloud-result-model {
  background: #101c2c;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  min-height: 320px;
  overflow: hidden;
  width: 100%;
}

@media (max-width: 720px) {
  .cloud-result-model {
    min-height: 240px;
  }
}
