:root {
  --ink: #14243b;
  --muted: #617086;
  --blue: #2563eb;
  --blue-dark: #1747ad;
  --green: #16775d;
  --mint: #e8f6f1;
  --surface: #fbfdff;
  --soft: #f2f5f9;
  --line: #dce5ef;
  --line-strong: #c6d3e2;
  --warning: #a35b00;
  --warning-soft: #fff5df;
  --danger: #b42318;
  --danger-soft: #fff0ee;
  --success: #16815f;
  --shadow: 0 20px 56px rgba(20, 36, 59, 0.1);
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 5% 7%, rgba(37, 99, 235, 0.08), transparent 24rem),
    linear-gradient(180deg, #f8fbff 0, var(--soft) 38rem, #f8fafc 100%);
}

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

button,
summary {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

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

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  color: white;
  background: var(--ink);
  border-radius: 8px;
  text-decoration: none;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  display: flex;
  width: min(1500px, calc(100% - 48px));
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
  border-bottom: 1px solid rgba(198, 211, 226, 0.74);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-logo {
  width: 42px;
  height: 42px;
  filter: drop-shadow(0 8px 10px rgba(37, 99, 235, 0.16));
}

.brand-copy,
.product-lockup {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.brand-name strong {
  color: var(--blue);
}

.brand-tagline,
.product-lockup span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.product-lockup {
  align-items: flex-end;
}

.product-lockup strong {
  margin-top: 2px;
  font-size: 14px;
}

.community-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  color: var(--green);
  background: var(--mint);
  border: 1px solid #c5e3d9;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease;
}

.community-link:hover {
  background: #ddf1ea;
  transform: translateY(-1px);
}

.community-note {
  width: min(1500px, calc(100% - 48px));
  margin: 14px auto 0;
  padding: 11px 14px;
  color: #516075;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(220, 229, 239, 0.82);
  border-radius: 10px;
  font-size: 12px;
  text-align: center;
}

main {
  width: min(1500px, calc(100% - 48px));
  margin: 0 auto;
  padding: 70px 0 84px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  align-items: end;
  gap: clamp(36px, 7vw, 110px);
  margin-bottom: 48px;
}

.eyebrow,
.step-label {
  display: block;
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(45px, 6.4vw, 92px);
  line-height: 0.96;
  letter-spacing: -0.065em;
}

h1 em {
  color: var(--blue);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

.hero-copy > p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 1.45vw, 20px);
  line-height: 1.65;
}

.local-badge,
.format-badge,
.fidelity-badge,
.generator-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  color: var(--blue-dark);
  background: white;
  border: 1px solid #cbdcf2;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(390px, 0.82fr) minmax(0, 1.18fr);
  min-height: 950px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.source-panel,
.result-panel {
  min-width: 0;
  padding: clamp(24px, 3vw, 40px);
}

.source-panel {
  background: linear-gradient(180deg, #f9fbfe, #f2f6fa);
  border-right: 1px solid var(--line);
}

.result-panel {
  background: var(--surface);
}

.panel-heading,
.detail-heading,
.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.panel-heading {
  margin-bottom: 22px;
}

.panel-heading .step-label,
.dialog-heading .step-label {
  margin-bottom: 7px;
}

.panel-heading h2,
.dialog-heading h2 {
  margin: 0;
  font-size: clamp(24px, 2.4vw, 34px);
  letter-spacing: -0.045em;
}

.editor-label {
  display: block;
  margin: 0 0 7px;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.code-input {
  display: block;
  width: 100%;
  resize: vertical;
  color: #24364f;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.58;
  tab-size: 2;
}

.code-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.09);
  outline: none;
}

.main-editor {
  min-height: 330px;
  padding: 15px;
}

.editor-help {
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.source-status {
  min-height: 42px;
  margin-top: 16px;
  padding: 11px 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  border-left: 3px solid var(--line-strong);
  border-radius: 0 8px 8px 0;
  font-size: 11px;
  line-height: 1.45;
}

.source-status.is-success {
  color: #0e684f;
  border-left-color: var(--success);
}

.source-status.is-error {
  color: var(--danger);
  background: var(--danger-soft);
  border-left-color: var(--danger);
}

.source-actions,
.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.source-actions {
  margin-top: 16px;
}

.primary-button,
.secondary-button,
.text-button,
.compact-button,
.icon-button {
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 850;
}

.primary-button {
  color: white;
  background: var(--blue);
  border: 1px solid var(--blue);
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.18);
}

.primary-button:hover {
  background: var(--blue-dark);
}

.secondary-button,
.compact-button {
  background: white;
  border: 1px solid var(--line-strong);
}

.secondary-button:hover,
.compact-button:hover:not(:disabled) {
  border-color: #9eb9dd;
}

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

.text-button:hover,
.icon-button:hover {
  color: var(--ink);
  background: white;
  border-color: var(--line);
}

.result-heading {
  align-items: center;
}

.fidelity-lockup {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 5px;
}

.fidelity-lockup > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fidelity-badge.is-local {
  color: #0e684f;
  background: var(--mint);
  border-color: #bee2d5;
}

.fidelity-badge.is-mocked {
  color: var(--warning);
  background: var(--warning-soft);
  border-color: #efd399;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.summary-card {
  min-width: 0;
  padding: 14px;
  background: #f6f9fc;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.summary-card span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.summary-card strong {
  display: block;
  margin-top: 6px;
  font-size: 25px;
  letter-spacing: -0.04em;
}

.warning-summary strong {
  color: var(--warning);
}

.error-summary strong {
  color: var(--danger);
}

.result-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.search-field {
  flex: 1;
}

.search-field input {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: 12px;
}

.compact-button {
  min-height: 40px;
  padding: 8px 11px;
  font-size: 11px;
}

.tabs {
  display: flex;
  gap: 3px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

.tab {
  min-height: 44px;
  padding: 9px 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.tab:hover {
  color: var(--ink);
}

.tab.is-active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.tab-count {
  display: inline-grid;
  min-width: 19px;
  min-height: 19px;
  place-items: center;
  margin-left: 4px;
  padding: 1px 5px;
  background: var(--soft);
  border-radius: 999px;
  font-size: 9px;
}

.tab-view {
  min-height: 560px;
  padding-top: 18px;
}

.is-hidden {
  display: none !important;
}

.empty-state {
  display: grid;
  min-height: 360px;
  place-items: center;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  text-align: center;
}

.empty-state > div {
  max-width: 300px;
  padding: 30px;
}

.empty-symbol {
  display: block;
  margin-bottom: 9px;
  color: var(--blue);
  font-size: 28px;
}

.empty-state strong {
  color: var(--ink);
  font-size: 13px;
}

.empty-state p {
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.5;
}

.application-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  max-height: 325px;
  overflow-y: auto;
}

.application-card {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  text-align: left;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.application-card:hover,
.application-card.is-selected {
  background: #f2f7ff;
  border-color: #aac3e6;
}

.application-card.is-selected {
  box-shadow: inset 3px 0 0 var(--blue);
}

.application-card > span:first-child {
  min-width: 0;
}

.application-card strong,
.application-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.application-card strong {
  font-family: var(--mono);
  font-size: 11px;
}

.application-card small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 3px;
  background: var(--success);
  border-radius: 50%;
}

.status-dot.has-warning {
  background: var(--warning);
}

.status-dot.has-error {
  background: var(--danger);
}

.application-detail {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.detail-heading {
  align-items: center;
  margin-bottom: 12px;
}

.detail-heading h3 {
  margin: 5px 0 0;
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: -0.025em;
}

.parameter-trace {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}

.parameter-chip {
  max-width: 100%;
  padding: 5px 7px;
  overflow: hidden;
  color: #39516f;
  background: #edf3f9;
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

pre {
  max-height: 420px;
  margin: 0;
  padding: 15px;
  overflow: auto;
  color: #d9e8fb;
  background: #17273d;
  border-radius: 12px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.58;
  white-space: pre;
}

.fleet-map {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 12px;
}

.destination-card {
  min-width: 0;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.destination-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}

.destination-card h3 {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
}

.destination-card header span {
  display: inline-grid;
  min-width: 28px;
  min-height: 28px;
  place-items: center;
  color: white;
  background: var(--blue);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 850;
}

.destination-card > small {
  display: block;
  margin: 8px 0 10px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fleet-apps {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.fleet-apps span {
  padding: 4px 6px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 8px;
}

.diagnostic-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.diagnostic-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 11px;
  padding: 13px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.diagnostic-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--blue);
  background: #eaf2ff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
}

.diagnostic-card.warning .diagnostic-icon {
  color: var(--warning);
  background: var(--warning-soft);
}

.diagnostic-card.error .diagnostic-icon {
  color: var(--danger);
  background: var(--danger-soft);
}

.diagnostic-card strong {
  display: block;
  font-size: 12px;
}

.diagnostic-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.diagnostic-suggestion {
  margin-top: 9px;
  padding: 9px 10px;
  background: white;
  border-left: 3px solid var(--blue);
  border-radius: 0 7px 7px 0;
}

.diagnostic-card.warning .diagnostic-suggestion {
  border-left-color: var(--warning);
}

.diagnostic-card.error .diagnostic-suggestion {
  border-left-color: var(--danger);
}

.diagnostic-suggestion span {
  display: block;
  color: var(--ink);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.diagnostic-card .diagnostic-suggestion p {
  margin-top: 3px;
  color: var(--ink);
}

.diagnostic-context {
  display: inline-block;
  margin-top: 7px;
  color: var(--blue-dark);
  font-family: var(--mono);
  font-size: 9px;
}

.change-summary {
  min-height: 360px;
}

.change-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.change-count {
  padding: 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.change-count span,
.change-group h3 {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.change-count strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
}

.change-group {
  margin-top: 14px;
}

.change-group h3 {
  margin: 0 0 7px;
}

.change-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.change-item {
  padding: 6px 8px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 9px;
}

.change-item.removed {
  color: var(--danger);
  background: var(--danger-soft);
}

.change-item.added {
  color: var(--success);
  background: var(--mint);
}

.scope-note p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.scope-note {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 36px;
  margin-top: 28px;
  padding: 28px;
  background: #17273d;
  border-radius: 18px;
}

.scope-note h2 {
  margin: 0;
  color: white;
  font-size: 22px;
}

.scope-note p {
  color: #bdcce0;
}

.scope-note code {
  color: #d7e8ff;
  font-family: var(--mono);
}

.dialog-backdrop {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(12, 25, 42, 0.64);
  backdrop-filter: blur(4px);
}

.export-dialog {
  width: min(600px, 100%);
  padding: 26px;
  background: white;
  border-radius: 18px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.28);
}

.icon-button {
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 24px;
}

.export-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.export-options button {
  min-height: 105px;
  padding: 16px;
  text-align: left;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.export-options button:hover {
  background: #f1f6fd;
  border-color: #a9c1e2;
}

.export-options strong,
.export-options span {
  display: block;
}

.export-options strong {
  font-size: 13px;
}

.export-options span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.toast {
  position: fixed;
  z-index: 80;
  right: 22px;
  bottom: 22px;
  max-width: min(380px, calc(100% - 44px));
  padding: 11px 14px;
  color: white;
  background: var(--ink);
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(20, 36, 59, 0.25);
  font-size: 11px;
  font-weight: 750;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 1080px) {
  .workspace {
    grid-template-columns: minmax(340px, 0.75fr) minmax(0, 1.25fr);
  }

  .source-panel,
  .result-panel {
    padding: 26px;
  }

  .application-list,
  .fleet-map {
    grid-template-columns: 1fr;
  }

  .summary-card {
    padding: 11px;
  }
}

@media (max-width: 820px) {
  .site-header,
  .community-note,
  main {
    width: min(100% - 28px, 1500px);
  }

  .product-lockup {
    display: none;
  }

  main {
    padding-top: 48px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .workspace {
    display: block;
  }

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

  .tab-view {
    min-height: 440px;
  }

  .scope-note {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 560px) {
  .site-header {
    min-height: 76px;
  }

  .brand-tagline,
  .community-link > span:last-child {
    display: none;
  }

  .brand-logo {
    width: 36px;
    height: 36px;
  }

  .community-link {
    min-height: 38px;
    padding: 8px 11px;
    font-size: 11px;
  }

  .community-note {
    text-align: left;
  }

  main {
    padding-top: 38px;
  }

  h1 {
    font-size: clamp(42px, 13.2vw, 64px);
  }

  .local-badge {
    display: none;
  }

  .workspace {
    margin-right: -4px;
    margin-left: -4px;
    border-radius: 18px;
  }

  .source-panel,
  .result-panel {
    padding: 20px;
  }

  .main-editor {
    min-height: 290px;
  }

  .source-actions > button {
    flex: 1 1 auto;
  }

  .result-heading {
    align-items: flex-start;
  }

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

  .result-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-actions > button {
    flex: 1;
  }

  .application-list {
    grid-template-columns: 1fr;
  }

  .export-options {
    grid-template-columns: 1fr;
    max-height: 65vh;
    overflow-y: auto;
  }

  .export-options button {
    min-height: 82px;
  }
}

/* Shared Native Cube page chrome */

.site-header,
.community-note,
.site-footer,
main {
  width: min(1400px, calc(100% - 56px));
  margin-inline: auto;
}

.site-header {
  min-height: 72px;
  gap: 20px;
  border-bottom: 1px solid rgba(121, 137, 128, 0.24);
}

.brand {
  gap: 11px;
  color: var(--ink);
}

.brand-logo {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  filter: drop-shadow(0 6px 10px rgba(37, 99, 235, 0.16));
}

.brand-copy {
  gap: 1px;
}

.brand-name {
  font-size: 15px;
  font-weight: 820;
}

.brand-tagline {
  color: var(--muted);
  font: 650 8px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-actions {
  gap: 18px;
}

.product-lockup {
  gap: 2px;
}

.product-lockup span {
  color: var(--blue);
  font: 750 8px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.1em;
}

.product-lockup strong {
  margin-top: 0;
  font-size: 11px;
  letter-spacing: -0.01em;
}

.community-link {
  min-height: 40px;
  gap: 6px;
  padding: 8px 15px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  border: 1px solid var(--blue-dark);
  box-shadow:
    0 8px 20px rgba(37, 99, 235, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  font-size: 12px;
  white-space: nowrap;
  transition:
    box-shadow 160ms ease,
    transform 160ms ease;
}

.community-link:hover {
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  box-shadow:
    0 11px 26px rgba(37, 99, 235, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  transform: translateY(-2px);
}

.community-note {
  margin-top: 14px;
  margin-bottom: 0;
  padding: 10px 15px;
  color: var(--muted);
  background: linear-gradient(90deg, rgba(232, 240, 255, 0.94), rgba(251, 253, 255, 0.86));
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(20, 36, 59, 0.045);
  font-size: 11px;
  line-height: 1.55;
  text-align: left;
}

.community-note strong {
  color: var(--ink);
}

.site-footer {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 11px;
}

.site-footer a {
  color: var(--blue);
  font-weight: 750;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-footer .author-credit {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 11px;
  color: var(--blue);
  background: #e8f0ff;
  border: 1px solid #c6d8ff;
  border-radius: 999px;
  text-decoration: none;
  transition:
    color 150ms ease,
    background 150ms ease,
    transform 150ms ease;
}

.author-credit span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
}

.author-credit strong {
  font-size: 11px;
  font-weight: 850;
}

.author-credit b {
  font-size: 12px;
}

.site-footer .author-credit:hover {
  color: white;
  background: var(--blue);
  text-decoration: none;
  transform: translateY(-1px);
}

.site-footer .author-credit:hover span {
  color: rgba(255, 255, 255, 0.74);
}

@media (max-width: 760px) {
  .site-header,
  .community-note,
  .site-footer,
  main {
    width: min(100% - 32px, 1400px);
  }

  .product-lockup,
  .community-link {
    display: none;
  }

  .site-footer {
    min-height: 150px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }

  .footer-links {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 440px) {
  .site-header,
  .community-note,
  .site-footer,
  main {
    width: min(100% - 22px, 1400px);
  }
}

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

/* Streamlined studio layout */

body {
  background:
    radial-gradient(circle at 8% 5%, rgba(37, 99, 235, 0.065), transparent 26rem),
    linear-gradient(180deg, #f9fbfe 0, #f3f6fa 44rem, #f8fafc 100%);
}

.site-header {
  width: min(1440px, calc(100% - 48px));
  min-height: 78px;
}

main {
  width: min(1440px, calc(100% - 48px));
  padding: 46px 0 64px;
}

.hero {
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  align-items: center;
  gap: clamp(34px, 6vw, 96px);
  margin-bottom: 34px;
}

h1 {
  font-size: clamp(44px, 5vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-copy > p {
  max-width: 620px;
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.6;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 19px;
}

.hero-metrics span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 7px 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 10px;
  font-weight: 750;
}

.hero-metrics strong {
  color: var(--blue);
  font-size: 13px;
}

.workspace {
  grid-template-columns: minmax(410px, 0.88fr) minmax(0, 1.12fr);
  min-height: 820px;
  border-radius: 18px;
  box-shadow:
    0 1px 2px rgba(20, 36, 59, 0.04),
    0 18px 48px rgba(20, 36, 59, 0.085);
}

.source-panel,
.result-panel {
  padding: clamp(24px, 2.4vw, 34px);
}

.source-panel {
  background: #f7f9fc;
}

.panel-heading {
  margin-bottom: 18px;
}

.panel-heading h2 {
  font-size: clamp(23px, 2vw, 29px);
}

.example-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 9px;
  margin-bottom: 9px;
  padding: 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.example-bar label {
  min-width: 0;
}

.example-bar label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.example-bar select {
  width: 100%;
  min-height: 39px;
  padding: 8px 34px 8px 10px;
  background: #fbfcfe;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 750;
}

.example-bar .secondary-button {
  min-height: 39px;
  white-space: nowrap;
}

.generator-guide {
  margin-bottom: 17px;
  padding: 15px 16px 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d8e1ed;
  border-left: 4px solid var(--blue);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(30, 55, 90, 0.055);
}

.generator-guide-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}

.generator-guide-mark {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  overflow: hidden;
  background: var(--ink);
  border-radius: 9px;
}

.generator-guide-mark::before,
.generator-guide-mark::after {
  position: absolute;
  width: 13px;
  height: 1px;
  background: rgba(255, 255, 255, 0.5);
  content: "";
}

.generator-guide-mark::before {
  transform: rotate(29deg);
}

.generator-guide-mark::after {
  transform: rotate(-29deg);
}

.generator-guide-mark i {
  z-index: 1;
  width: 5px;
  height: 5px;
  background: white;
  border: 1px solid var(--ink);
  border-radius: 50%;
}

.generator-guide-mark i:first-child {
  position: absolute;
  top: 8px;
  left: 7px;
}

.generator-guide-mark i:nth-child(2) {
  position: absolute;
  bottom: 8px;
  left: 7px;
}

.generator-guide-mark i:last-child {
  position: absolute;
  top: 15px;
  right: 7px;
  background: #68e1ac;
}

.generator-guide-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--blue);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.generator-guide h3 {
  margin: 0;
  overflow: hidden;
  font-size: 14px;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.generator-guide-result {
  max-width: 155px;
  padding: 6px 8px;
  color: var(--blue-dark);
  background: #edf4ff;
  border: 1px solid #cfe0f8;
  border-radius: 7px;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.025em;
  line-height: 1.3;
  text-align: center;
}

.generator-guide > p {
  margin: 10px 0 0 45px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
}

.generator-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 12px 0 0;
  padding: 1px;
  overflow: hidden;
  background: #dfe6ef;
  border-radius: 9px;
  list-style: none;
}

.generator-flow li {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 48px;
  padding: 8px 10px;
  background: #f7f9fc;
}

.generator-flow li:not(:last-child)::after {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: -5px;
  width: 9px;
  height: 9px;
  background: #f7f9fc;
  border-top: 1px solid #dfe6ef;
  border-right: 1px solid #dfe6ef;
  content: "";
  transform: translateY(-50%) rotate(45deg);
}

.generator-flow li > span:last-child,
.generator-flow small,
.generator-flow strong {
  display: block;
}

.generator-flow-index {
  color: var(--blue);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.generator-flow small {
  color: var(--muted);
  font-size: 7.5px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.generator-flow strong {
  margin-top: 3px;
  font-size: 9.5px;
  line-height: 1.3;
}

.generator-next-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  margin-top: 10px;
  padding: 10px 11px;
  background: #f3f8f6;
  border: 1px solid #d7e9e1;
  border-radius: 9px;
}

.generator-next-step-mark {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  color: white;
  background: var(--green);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
}

.generator-next-step strong {
  color: var(--green);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.generator-next-step p {
  margin: 3px 0 0;
  color: #4d665e;
  font-size: 9.5px;
  line-height: 1.45;
}

.source-tabs {
  display: flex;
  gap: 3px;
  padding: 3px;
  overflow-x: auto;
  background: #e9eef5;
  border-radius: 9px;
}

.source-tab {
  min-height: 34px;
  flex: 1 0 auto;
  padding: 7px 10px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.source-tab:hover {
  color: var(--ink);
}

.source-tab.is-active {
  color: var(--ink);
  background: white;
  box-shadow: 0 1px 3px rgba(20, 36, 59, 0.09);
}

.source-tab-view {
  padding-top: 16px;
}

.editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}

.editor-toolbar .editor-label {
  margin: 0;
}

.editor-toolbar > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.format-badge,
.import-button {
  min-height: 27px;
  padding: 5px 8px;
  font-size: 9px;
}

.import-button {
  display: inline-flex;
  align-items: center;
  color: var(--blue-dark);
  background: white;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  font-weight: 850;
  cursor: pointer;
}

.import-button:hover {
  border-color: #9eb9dd;
}

.import-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.main-editor {
  min-height: 460px;
  max-height: 680px;
  padding: 14px;
}

.editor-help {
  min-height: 17px;
  margin: 7px 0 0;
}

.source-status {
  min-height: 39px;
  margin-top: 12px;
  padding: 10px 12px;
}

.source-actions {
  margin-top: 11px;
}

.result-panel .tab-view {
  min-height: 510px;
}

.scope-note {
  display: block;
  margin-top: 16px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 0;
}

.scope-note summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.scope-note p {
  max-width: 980px;
  margin: 10px 0 0;
  padding: 14px 16px;
  color: var(--muted);
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 11px;
}

.scope-note code {
  color: var(--blue-dark);
}

@media (max-width: 1080px) {
  .workspace {
    grid-template-columns: minmax(370px, 0.8fr) minmax(0, 1.2fr);
  }

  .source-panel,
  .result-panel {
    padding: 24px;
  }
}

@media (max-width: 820px) {
  .site-header,
  main {
    width: min(100% - 28px, 1440px);
  }

  main {
    padding-top: 34px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 28px;
  }

  .workspace {
    display: block;
  }

  .main-editor {
    min-height: 390px;
  }
}

@media (max-width: 560px) {
  .site-header {
    min-height: 70px;
  }

  main {
    padding-top: 28px;
  }

  h1 {
    font-size: clamp(40px, 12vw, 54px);
  }

  .hero-copy > p {
    font-size: 15px;
  }

  .hero-metrics {
    gap: 6px;
  }

  .workspace {
    margin-right: 0;
    margin-left: 0;
    border-radius: 14px;
  }

  .source-panel,
  .result-panel {
    padding: 18px;
  }

  .example-bar {
    grid-template-columns: 1fr;
  }

  .example-bar .secondary-button {
    width: 100%;
  }

  .generator-guide-header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .generator-guide h3 {
    white-space: normal;
  }

  .generator-guide-result {
    grid-column: 1 / -1;
    max-width: none;
    margin-left: 45px;
    text-align: left;
  }

  .generator-guide > p {
    margin-left: 0;
  }

  .generator-flow {
    grid-template-columns: 1fr;
  }

  .generator-flow li:not(:last-child)::after {
    display: none;
  }

  .source-tab {
    font-size: 9px;
  }

  .main-editor {
    min-height: 350px;
  }
}
