:root {
  --canvas: #f8f8f8;
  --white: #ffffff;
  --blue: #070154;
  --highlight-blue: #0047ff;
  --magenta: #f900d3;
  --dark-gray: #50658e;
  --medium-gray: #ced7e6;
  --light-gray: #e8eef8;
  --success: #1dd566;
  --danger: #a62212;
  --line: 1px solid var(--medium-gray);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--blue);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

button, input, textarea { font: inherit; }
button { cursor: pointer; }

button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid var(--magenta);
  outline-offset: 3px;
}

.site-header, main, .site-footer {
  width: min(1184px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  border-bottom: var(--line);
}

.wordmark { color: var(--blue); text-decoration: none; display: flex; align-items: center; gap: 12px; }
.wordmark-logo { display: block; width: 153px; height: auto; }
.wordmark-divider { width: 1px; height: 22px; background: var(--magenta); }
.wordmark-product { color: var(--dark-gray); font-size: 14px; }

.intro-grid {
  padding: 34px 0 28px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 40px;
  align-items: end;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--highlight-blue);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 0.1em;
}

h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { font-family: Arial, Helvetica, sans-serif; }
h1 { margin-bottom: 12px; font-size: clamp(38px, 4.8vw, 54px); line-height: 1.04; letter-spacing: -0.045em; font-weight: 700; }
h1 span { color: var(--magenta); }
.intro-lede { max-width: 510px; margin-bottom: 0; color: var(--dark-gray); font-size: 17px; line-height: 1.5; }

.flow-map { padding: 16px 0 0 20px; border-left: 2px solid var(--magenta); }
.flow-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.flow-heading .eyebrow { flex: 0 0 auto; margin-bottom: 0; }
.flow-caption { margin: 0; color: var(--dark-gray); font-size: 13px; }
.flow-steps { display: grid; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr) 24px minmax(0, 1fr); align-items: stretch; gap: 7px; }
.flow-step { display: grid; grid-template-columns: auto 1fr; gap: 9px; min-width: 0; padding: 12px 10px; border: var(--line); background: var(--white); }
.flow-number { color: var(--dark-gray); font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 1.4; }
.flow-label, .flow-detail { display: block; }
.flow-label { font-weight: 700; font-size: 14px; line-height: 1.35; }
.flow-detail { margin-top: 3px; color: var(--dark-gray); font-size: 12px; line-height: 1.35; }
.flow-step.is-active { border: 2px solid var(--highlight-blue); padding: 11px 9px; }
.flow-step.is-active .flow-number, .flow-step.is-active .flow-label { color: var(--highlight-blue); }
.flow-step.is-complete { background: var(--light-gray); border-color: var(--blue); }
.flow-step.is-complete .flow-number { color: var(--blue); }
.flow-line { align-self: center; height: 1px; background: var(--medium-gray); }

.workspace { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(290px, 0.8fr); gap: 22px; align-items: stretch; }
.input-panel, .guide-panel, .result-panel { background: var(--white); border: var(--line); }
.input-panel { min-width: 0; padding: 30px 34px; }
.panel-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 26px; }
.panel-heading h2, .guide-panel h2, .result-panel h2 { margin-bottom: 0; font-size: 24px; line-height: 1.2; letter-spacing: -0.02em; }
.step-badge, .iteration-chip { color: var(--highlight-blue); border: 1px solid var(--highlight-blue); padding: 6px 9px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; white-space: nowrap; }

.field-block { margin-bottom: 20px; }
.field-label { display: flex; justify-content: space-between; gap: 14px; align-items: baseline; margin-bottom: 8px; font-weight: 700; color: var(--blue); }
.required { flex: 0 0 auto; color: var(--dark-gray); font-size: 12px; font-weight: 400; }
input, textarea { width: 100%; border: 1px solid var(--dark-gray); border-radius: 0; background: var(--white); color: var(--blue); }
input { min-height: 48px; padding: 10px 14px; }
textarea { display: block; resize: vertical; padding: 12px 14px; font-size: 16px; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #6d7c9b; opacity: 1; }
input:hover, textarea:hover { border-color: var(--highlight-blue); }
.field-hint { margin: 7px 0 0; color: var(--dark-gray); font-size: 13px; }
.field-meta { display: flex; justify-content: space-between; gap: 14px; margin-top: 7px; color: var(--dark-gray); font-size: 12px; }
.field-meta > :last-child { flex: 0 0 auto; }

.action-row, .result-actions { display: flex; flex-wrap: wrap; gap: 11px; align-items: center; }
.action-row { justify-content: space-between; margin-top: 26px; }
.button { min-height: 48px; border: 1px solid var(--blue); border-radius: 80px; padding: 0 17px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-weight: 700; transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease; }
.button-primary { background: var(--blue); color: var(--white); }
.button-primary:hover { background: var(--highlight-blue); border-color: var(--highlight-blue); }
.button-secondary { background: transparent; color: var(--blue); }
.button-secondary:hover { background: var(--light-gray); }
.button-mark { color: var(--magenta); font-size: 18px; line-height: 0; }
.button:disabled { cursor: wait; opacity: 0.72; }
.button-small { min-height: 43px; padding-inline: 14px; font-size: 14px; }
.privacy-note { display: flex; align-items: flex-start; gap: 9px; margin: 18px 0 0; color: var(--dark-gray); font-size: 13px; line-height: 1.45; }
.privacy-mark { flex: 0 0 auto; width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid var(--highlight-blue); border-radius: 50%; color: var(--highlight-blue); font-size: 12px; font-weight: 700; }
.form-status { min-height: 1.4em; margin: 8px 0 0; color: var(--danger); font-size: 14px; }
.form-status.is-working { color: var(--highlight-blue); }

.guide-panel { padding: 28px; background: var(--blue); color: var(--white); border-color: var(--blue); display: flex; flex-direction: column; }
.guide-topline { display: flex; align-items: center; gap: 11px; color: var(--white); }
.guide-topline .eyebrow { color: var(--white); margin-bottom: 0; }
.guide-icon { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--magenta); color: var(--magenta); font-size: 15px; font-weight: 700; }
.guide-panel h2 { margin: 30px 0 12px; max-width: 320px; font-size: 29px; line-height: 1.1; }
.guide-panel > p { max-width: 340px; margin-bottom: 20px; color: #e3e7f1; line-height: 1.5; }
.signal-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid #43528b; counter-reset: none; }
.signal-list li { display: flex; gap: 15px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid #43528b; }
.signal-list li > span { color: var(--magenta); font-size: 12px; line-height: 1.6; }
.signal-list strong, .signal-list small { display: block; }
.signal-list strong { font-size: 15px; }
.signal-list small { margin-top: 4px; color: #e3e7f1; font-size: 13px; line-height: 1.4; }
.guide-callout { margin-top: auto; padding: 16px 0 0; }
.guide-callout span { display: inline-block; margin-bottom: 6px; color: var(--magenta); font-weight: 700; font-size: 13px; }
.guide-callout p { margin: 0; color: #e3e7f1; font-size: 13px; line-height: 1.45; }

.result-panel { margin-top: 22px; padding: 30px 34px; scroll-margin-top: 18px; }
.is-hidden { display: none !important; }
.result-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.result-kicker { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; color: var(--highlight-blue); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; }
.success-mark { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--success); color: var(--blue); font-size: 13px; letter-spacing: 0; }
.result-summary { max-width: 800px; margin: 12px 0 0; color: var(--dark-gray); }
.context-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 28px; }
.context-chip { max-width: 100%; padding: 7px 10px; background: var(--light-gray); color: var(--blue); font-size: 13px; overflow-wrap: anywhere; }
.result-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 0 0 14px; border-bottom: var(--line); padding-bottom: 12px; }
.result-section-heading .eyebrow { margin-bottom: 4px; }
.result-section-heading h3, .questions-heading h3 { margin-bottom: 0; font-size: 21px; line-height: 1.2; }
.result-section-heading > p { max-width: 470px; margin: 0; color: var(--dark-gray); font-size: 13px; }
.kpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kpi-card { min-width: 0; padding: 20px; border: var(--line); background: #fff; }
.kpi-card h4 { margin: 0 0 8px; font-size: 19px; line-height: 1.25; overflow-wrap: anywhere; }
.objective-link { margin: 0 0 16px; color: var(--highlight-blue); font-size: 13px; font-weight: 700; }
.metric-detail { padding-top: 12px; border-top: 1px solid var(--light-gray); }
.metric-detail + .metric-detail { margin-top: 11px; }
.metric-detail dt { margin-bottom: 4px; color: var(--dark-gray); font-size: 12px; line-height: 1.35; font-weight: 700; letter-spacing: 0.045em; text-transform: uppercase; }
.metric-detail dd { margin: 0; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }

.questions-block { display: grid; grid-template-columns: minmax(210px, 0.75fr) minmax(0, 1.25fr); gap: 28px; margin-top: 30px; padding: 24px; background: var(--light-gray); }
.questions-heading .eyebrow { margin-bottom: 6px; }
.questions-block ol { margin: 0; padding-left: 22px; }
.questions-block li { padding-left: 4px; margin-bottom: 10px; }
.questions-block li:last-child { margin-bottom: 0; }

.result-footer { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-top: 18px; padding-top: 16px; border-top: var(--line); }
.result-hint { max-width: 500px; margin: 0; color: var(--dark-gray); font-size: 13px; }
.text-button { min-height: 43px; padding: 8px; border: 0; background: transparent; color: var(--blue); text-decoration: underline; text-underline-offset: 3px; font-weight: 700; }
.text-button:hover { color: var(--highlight-blue); }
.prompt-fallback:not(.is-hidden) { display: block; margin: 12px 0 0 auto; }
.copy-status { min-height: 1.3em; margin: 8px 0 0; color: var(--dark-gray); font-size: 13px; }
.prompt-result textarea { min-height: 260px; margin: 10px 0 14px; }
.prompt-result .result-hint { margin-top: 10px; }

.site-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 28px; padding: 16px 0 24px; border-top: var(--line); color: var(--dark-gray); font-size: 13px; }

@media (max-width: 900px) {
  .intro-grid { grid-template-columns: 1fr; gap: 22px; }
  .flow-map { max-width: 700px; }
  .workspace { grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr); }
  .input-panel { padding: 26px; }
  .guide-panel { padding: 24px; }
  .result-panel { padding: 26px; }
}

@media (max-width: 680px) {
  .site-header, main, .site-footer { width: min(100% - 32px, 1184px); }
  .site-header { min-height: 68px; }
  .wordmark-logo { width: 126px; }
  .wordmark { gap: 9px; }
  .wordmark-product { font-size: 13px; }
  .intro-grid { padding: 26px 0 22px; }
  h1 { font-size: clamp(36px, 10vw, 46px); }
  .intro-lede { font-size: 16px; }
  .flow-map { padding-left: 14px; }
  .flow-heading { display: block; }
  .flow-heading .eyebrow { margin-bottom: 4px; }
  .flow-steps { grid-template-columns: minmax(0, 1fr) 12px minmax(0, 1fr) 12px minmax(0, 1fr); gap: 4px; }
  .flow-step { grid-template-columns: 1fr; gap: 4px; padding: 9px 7px; }
  .flow-step.is-active { padding: 8px 6px; }
  .flow-detail { font-size: 11px; }
  .workspace { grid-template-columns: 1fr; gap: 14px; }
  .input-panel, .guide-panel, .result-panel { padding: 22px 18px; }
  .panel-heading { margin-bottom: 22px; }
  .panel-heading h2, .guide-panel h2, .result-panel h2 { font-size: 22px; }
  .action-row { align-items: stretch; }
  .action-row .button { flex: 1 1 100%; }
  .guide-panel h2 { margin-top: 22px; }
  .result-header { gap: 12px; }
  .iteration-chip { padding: 5px 7px; font-size: 10px; }
  .result-section-heading { display: block; }
  .result-section-heading > p { margin-top: 8px; }
  .kpi-grid { grid-template-columns: 1fr; }
  .questions-block { grid-template-columns: 1fr; gap: 14px; padding: 18px; }
  .result-footer { display: block; }
  .result-actions { margin-top: 14px; }
  .site-footer { display: block; }
  .site-footer span { display: block; margin-top: 3px; }
}

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