:root {
  --ink: #17191d;
  --muted: #696e78;
  --soft: #f5f6f8;
  --line: #dfe2e7;
  --blue: #2d5bd1;
  --blue-dark: #2047aa;
  --blue-soft: #edf2ff;
  --green: #19714d;
  --green-soft: #edf8f2;
  --red: #b42318;
  --shadow: 0 18px 55px rgb(32 43 70 / 0.09);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #fafafa;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { min-width: 320px; margin: 0; background: radial-gradient(circle at 72% 5%, #f1f4fc 0, transparent 27rem), #fafafa; }
button, input, textarea, select { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

.site-header, .site-footer { display: flex; align-items: center; justify-content: space-between; width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.site-header { height: 76px; border-bottom: 1px solid #eceef1; }
.wordmark { color: #111318; font-size: 24px; font-weight: 750; letter-spacing: -.065em; text-decoration: none; }
.header-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #46a779; box-shadow: 0 0 0 4px #e7f5ee; }

.app-shell { display: grid; grid-template-columns: 300px minmax(0, 780px); gap: 64px; justify-content: center; min-height: calc(100vh - 142px); padding: 64px 32px 80px; }
.journey { padding-top: 16px; }
.journey h1 { margin: 8px 0 16px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(32px, 3vw, 43px); font-weight: 500; line-height: 1.08; letter-spacing: -.035em; }
.journey-intro { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.eyebrow { margin: 0 0 7px; color: #7a7f89; font-size: 10px; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
.step-list { position: relative; display: grid; gap: 4px; margin: 38px 0 0; padding: 0; list-style: none; }
.step-list::before { content: ""; position: absolute; top: 22px; bottom: 22px; left: 17px; width: 1px; background: #e1e4e9; }
.step-list li { position: relative; display: flex; align-items: center; gap: 13px; min-height: 52px; padding: 6px 8px; color: #9a9ea6; border-radius: 8px; }
.step-list li > span { z-index: 1; display: grid; place-items: center; width: 20px; height: 20px; margin-left: 0; border: 1px solid #d8dbe1; border-radius: 50%; background: #fafafa; font-size: 9px; font-weight: 700; }
.step-list li div { display: grid; gap: 2px; }
.step-list li strong { font-size: 13px; font-weight: 650; }
.step-list li small { font-size: 11px; }
.step-list li.active { color: var(--ink); background: #f0f3fa; }
.step-list li.active > span { border-color: var(--blue); background: var(--blue); color: #fff; box-shadow: 0 0 0 4px #e6ecfc; }
.step-list li.complete { color: #5d626b; }
.step-list li.complete > span { border-color: #a7d5bd; background: var(--green-soft); color: var(--green); font-size: 0; }
.step-list li.complete > span::after { content: "✓"; font-size: 10px; }
.trial-reference { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); color: #979ba3; font: 10px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }

.workspace { min-width: 0; }
.panel { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: rgb(255 255 255 / .96); box-shadow: var(--shadow); }
.panel-heading { padding: 34px 38px 26px; border-bottom: 1px solid #eceef2; }
.panel-heading h2 { margin: 0 0 8px; font-size: 25px; font-weight: 650; letter-spacing: -.025em; }
.panel-heading p:not(.eyebrow) { max-width: 620px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.compact-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; }
.loading-panel { display: grid; justify-items: center; padding: 90px 30px; text-align: center; }
.loading-panel h2 { margin: 20px 0 6px; font-size: 20px; }
.loading-panel p { margin: 0; color: var(--muted); font-size: 13px; }
.spinner { width: 28px; height: 28px; border: 2px solid #d9dfed; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
.alert { margin: 0 0 16px; padding: 13px 15px; border: 1px solid #efc5c1; border-radius: 9px; background: #fff5f4; color: var(--red); font-size: 13px; line-height: 1.5; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding: 30px 38px 36px; }
.field { display: grid; align-content: start; gap: 7px; color: #3e424a; font-size: 12px; font-weight: 650; }
.field-wide { grid-column: 1 / -1; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid #d3d7de; border-radius: 7px; outline: none; background: #fff; color: var(--ink); font-size: 14px; font-weight: 400; transition: border-color .15s, box-shadow .15s; }
.field input, .field select { height: 42px; padding: 0 12px; }
.field textarea { padding: 12px; resize: vertical; line-height: 1.55; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: #7896df; box-shadow: 0 0 0 3px #e9effe; }
.field small { color: #91959d; font-size: 10px; font-weight: 400; line-height: 1.4; }
.upload-field { position: relative; display: grid; grid-template-columns: 34px 1fr; gap: 2px 12px; padding: 20px; border: 1px dashed #bfc6d4; border-radius: 9px; background: #fafbfc; cursor: pointer; transition: border-color .15s, background .15s; }
.upload-field:hover, .upload-field.has-file { border-color: #7795df; background: #f4f7ff; }
.upload-field input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-field strong { align-self: end; color: #30343b; font-size: 13px; }
.upload-field small { color: #868b94; font-size: 11px; }
.upload-icon { grid-row: 1 / 3; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 7px; background: #e8edfa; color: var(--blue); font-size: 17px; }
.form-actions, .panel-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.form-actions { margin-top: 3px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: 7px; font-size: 12px; font-weight: 700; text-decoration: none; transition: background .15s, border-color .15s, transform .15s, opacity .15s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .45; }
.button-primary { background: var(--blue); color: #fff; box-shadow: 0 3px 8px rgb(45 91 209 / .18); }
.button-primary:hover:not(:disabled) { background: var(--blue-dark); }
.button-secondary { border-color: #d7dae0; background: #fff; color: #535861; }
.inline-status { min-height: 18px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.inline-status.error { color: var(--red); }

.run-visual { display: grid; place-items: center; height: 250px; }
.run-orbit { position: relative; display: grid; place-items: center; width: 150px; height: 150px; border: 1px solid #e1e6f1; border-radius: 50%; animation: orbit 12s linear infinite; }
.run-orbit::before { content: ""; position: absolute; inset: 26px; border: 1px dashed #d3dbec; border-radius: 50%; }
.run-orbit i { z-index: 1; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 14px; background: var(--blue); color: #fff; font-size: 12px; font-style: normal; font-weight: 750; box-shadow: 0 8px 22px rgb(45 91 209 / .24); animation: counter-orbit 12s linear infinite; }
.run-orbit span { position: absolute; width: 16px; height: 16px; border: 3px solid #fff; border-radius: 50%; background: #6e89cb; box-shadow: 0 2px 7px rgb(30 50 95 / .2); }
.run-orbit span:nth-child(1) { top: 10px; left: 24px; }
.run-orbit span:nth-child(2) { top: 44px; right: -2px; background: #6caa8d; }
.run-orbit span:nth-child(3) { bottom: 3px; left: 54px; background: #9877c5; }
.progress-track { height: 5px; margin: 0 38px; overflow: hidden; border-radius: 8px; background: #edf0f5; }
.progress-track span { display: block; width: 8%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #315ed0, #7b95da); transition: width .5s ease; }
.run-meta { display: flex; justify-content: space-between; gap: 20px; padding: 17px 38px 35px; color: #777c85; font-size: 11px; }
.run-meta strong { color: #3e434b; }

.counter-pill, .live-pill { flex: 0 0 auto; padding: 7px 10px; border: 1px solid #dce0e7; border-radius: 999px; background: #f8f9fb; color: #626771; font-size: 10px; font-weight: 700; }
.label-card { margin: 26px 38px 18px; padding: 24px; border: 1px solid #dfe3e9; border-radius: 10px; background: #fafbfc; }
.label-card h3 { margin: 0 0 11px; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; }
.example-input { max-height: 205px; overflow: auto; margin: 0 0 22px; padding: 15px; border: 1px solid #e2e5e9; border-radius: 7px; background: #fff; color: #3c4149; font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }
.model-note { margin: -10px 0 16px; color: #858a93; font-size: 10px; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 9px; }
.choice-button { min-height: 54px; padding: 10px 12px; border: 1px solid #d7dbe2; border-radius: 7px; background: #fff; color: #454a53; font-size: 12px; font-weight: 650; text-align: left; }
.choice-button:hover { border-color: #8da6e0; background: #f4f7ff; }
.choice-button.selected { border-color: var(--blue); background: var(--blue-soft); color: #21479f; box-shadow: inset 0 0 0 1px var(--blue); }
.rationale-field { display: grid; gap: 6px; margin-top: 16px; color: #686d76; font-size: 10px; font-weight: 650; }
.rationale-field textarea { min-height: 62px; padding: 9px 10px; border: 1px solid #d9dde3; border-radius: 7px; resize: vertical; font-size: 12px; line-height: 1.45; }
.label-nav { display: flex; align-items: center; justify-content: space-between; padding: 0 38px 22px; }
.label-dots { display: flex; gap: 5px; }
.label-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: #d7dbe2; }
.label-dots button.complete { background: #73b493; }
.label-dots button.active { box-shadow: 0 0 0 3px #dce5fb; background: var(--blue); }
.panel-footer { padding: 19px 38px 24px; border-top: 1px solid #eceef2; }

.panel-wide { width: min(900px, calc(100vw - 48px)); margin-left: max(-60px, calc((780px - min(900px, calc(100vw - 48px))) / 2)); }
.live-pill { display: flex; align-items: center; gap: 7px; border-color: #c7e5d6; background: var(--green-soft); color: var(--green); }
.live-pill span { width: 6px; height: 6px; border-radius: 50%; background: #39a371; animation: pulse 1.3s ease infinite; }
.metric-row { display: grid; grid-template-columns: repeat(3, 1fr); margin: 24px 38px 0; border: 1px solid var(--line); border-radius: 9px; }
.metric-row div { display: grid; gap: 4px; padding: 14px 17px; border-right: 1px solid var(--line); }
.metric-row div:last-child { border: 0; }
.metric-row small { color: #878c95; font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.metric-row strong { font-size: 20px; font-weight: 600; }
.diff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 18px 38px 27px; }
.prompt-pane { min-width: 0; overflow: hidden; border: 1px solid #dfe2e7; border-radius: 9px; background: #fbfbfc; }
.prompt-pane-new { border-color: #cfd9f0; background: #f8faff; }
.prompt-pane header { display: flex; justify-content: space-between; gap: 10px; padding: 10px 13px; border-bottom: 1px solid #e6e8ed; color: #555a63; font-size: 10px; font-weight: 700; }
.prompt-pane header small { color: #969aa2; font-weight: 500; }
.prompt-pane pre { min-height: 310px; max-height: 430px; margin: 0; padding: 16px; overflow: auto; color: #3a3f48; font: 11px/1.62 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }
.prompt-pane-new pre { color: #29467d; }

.comparison-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 28px 38px 12px; }
.comparison-metrics > div { padding: 17px; border: 1px solid var(--line); border-radius: 8px; background: #fafbfc; }
.comparison-metrics small { display: block; margin-bottom: 8px; color: #868b94; font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.comparison-metrics strong { font-size: 20px; font-weight: 600; }
.success-card { display: flex; gap: 14px; margin: 16px 38px 20px; padding: 19px; border: 1px solid #cce6d9; border-radius: 9px; background: var(--green-soft); }
.success-mark { display: grid; place-items: center; flex: 0 0 auto; width: 29px; height: 29px; border-radius: 50%; background: var(--green); color: #fff; font-size: 13px; }
.success-card h3 { margin: 1px 0 5px; font-size: 14px; }
.success-card p { margin: 0; color: #567064; font-size: 11px; line-height: 1.55; }
.signup-form { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 12px; padding: 0 38px 10px; }
.signup-note { margin: 0; padding: 0 38px 32px; color: #8b9098; font-size: 10px; }

.site-footer { height: 66px; border-top: 1px solid #eceef1; color: #989ca4; font-size: 10px; }
.site-footer div { display: flex; gap: 18px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #555a63; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes counter-orbit { to { transform: rotate(-360deg); } }
@keyframes pulse { 50% { opacity: .35; transform: scale(.8); } }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; gap: 28px; padding-top: 34px; }
  .journey { max-width: 760px; }
  .journey h1 { max-width: 560px; }
  .step-list { grid-template-columns: repeat(5, 1fr); margin-top: 26px; }
  .step-list::before { top: 16px; right: 9%; bottom: auto; left: 9%; width: auto; height: 1px; }
  .step-list li { display: grid; justify-items: center; gap: 5px; padding: 0; text-align: center; background: transparent !important; }
  .step-list li > span { margin: 0; }
  .step-list li small { display: none; }
  .panel-wide { width: auto; margin-left: 0; }
}

@media (max-width: 620px) {
  .site-header, .site-footer { width: min(100% - 28px, 1180px); }
  .app-shell { padding: 28px 14px 60px; }
  .journey { padding: 0 5px; }
  .journey h1 { font-size: 33px; }
  .journey-intro { font-size: 13px; }
  .step-list li strong { font-size: 10px; }
  .panel-heading, .form-grid { padding-right: 22px; padding-left: 22px; }
  .form-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .compact-heading { display: block; }
  .counter-pill, .live-pill { display: inline-flex; margin-top: 15px; }
  .run-meta, .panel-footer { align-items: flex-start; padding-right: 22px; padding-left: 22px; }
  .run-meta { flex-direction: column; gap: 4px; }
  .progress-track { margin-right: 22px; margin-left: 22px; }
  .label-card { margin-right: 22px; margin-left: 22px; }
  .label-nav { padding-right: 22px; padding-left: 22px; }
  .label-dots { display: none; }
  .panel-footer { flex-direction: column; }
  .panel-footer .button { width: 100%; }
  .metric-row { margin-right: 22px; margin-left: 22px; }
  .diff-grid { grid-template-columns: 1fr; padding-right: 22px; padding-left: 22px; }
  .prompt-pane pre { min-height: 190px; max-height: 300px; }
  .comparison-metrics { grid-template-columns: 1fr; padding-right: 22px; padding-left: 22px; }
  .success-card { margin-right: 22px; margin-left: 22px; }
  .signup-form { grid-template-columns: 1fr; padding-right: 22px; padding-left: 22px; }
  .signup-note { padding-right: 22px; padding-left: 22px; }
}

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