:root {
  color-scheme: dark;
  --green-wash: rgba(66, 190, 101, .1);
  --line: 1px solid var(--overlay);
  --radius: 6px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--deep); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    repeating-linear-gradient(0deg, var(--rule) 0, var(--rule) 1px, transparent 1px, transparent 24px),
    repeating-linear-gradient(90deg, var(--rule) 0, var(--rule) 1px, transparent 1px, transparent 24px),
    var(--deep);
  font-family: var(--mono);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid rgba(111, 220, 140, .7); outline-offset: 3px; }

.intake-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.intake-honeypot { position: absolute; left: -9999px; }

.intake-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: calc(100vh - 32px);
  margin: 16px auto;
  border: var(--line);
  background: rgba(14, 14, 14, .96);
}
.intake-topbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 24px;
  border-bottom: var(--line);
  background: var(--base);
}
.intake-brand { display: flex; align-items: center; gap: 12px; color: var(--fg); font-weight: 600; }
.intake-brand:hover { color: var(--fg); }
.intake-brand-mark { position: relative; width: 26px; height: 26px; }
.intake-brand-mark::before,
.intake-brand-mark::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 1px solid var(--base);
  border-radius: 2px;
  background: var(--green);
}
.intake-brand-mark::before { left: 0; bottom: 0; }
.intake-brand-mark::after { right: 0; top: 0; }
.intake-brand-context { color: var(--comment); font-size: 15px; font-weight: 400; }
.intake-preview-badge {
  padding: 4px 9px;
  border: 1px solid var(--subtle);
  border-radius: 999px;
  color: var(--comment);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.intake-fallback {
  display: block;
  padding: 12px 24px;
  border-bottom: var(--line);
  background: var(--green-wash);
  color: var(--green-bright);
  font-size: 15px;
  text-align: center;
}
.intake-fallback:hover { color: var(--fg); }


.intake-workspace { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: calc(100vh - 102px); }
.intake-rail {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 20px;
  border-right: var(--line);
  background: var(--base);
}
.intake-rail-label {
  color: var(--comment);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.intake-steps { margin: 16px 0 0; padding: 0; list-style: none; }
.intake-steps li {
  position: relative;
  min-height: 42px;
  padding: 2px 0 18px 30px;
  color: var(--muted);
  font-size: 15px;
}
.intake-steps li::before {
  content: attr(data-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid var(--subtle);
  border-radius: 50%;
  color: var(--comment);
  font-size: 12px;
}
.intake-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 22px;
  height: 17px;
  border-left: 1px solid var(--overlay);
}
.intake-steps li.active { color: var(--fg); }
.intake-steps li.active::before { border-color: var(--green); color: var(--green-bright); background: var(--green-wash); }
.intake-steps li.done { color: var(--comment); }
.intake-steps li.done::before { content: "✓"; color: var(--green-bright); }
.intake-timebox { padding-top: 18px; border-top: var(--line); color: var(--comment); font-size: 14px; }
.intake-timebox strong { display: block; margin-top: 5px; color: var(--text); font-size: 16px; font-weight: 500; }

.intake-main { min-width: 0; display: grid; place-items: center; padding: 38px 54px; }
.intake-panel { width: min(720px, 100%); }
.intake-screen { display: none; }
.intake-screen.active { display: block; animation: intake-enter .16s linear both; }
@keyframes intake-enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.intake-question-number { margin-bottom: 14px; color: var(--green-bright); font-size: 14px; }
.intake-screen h1 {
  margin: 0;
  color: var(--fg);
  font-size: clamp(25px, calc(3vw + 3px), 35px);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.2;
  text-wrap: balance;
}
.intake-fields { display: grid; gap: 16px; margin-top: 28px; }
.intake-field-row { display: grid; grid-template-columns: 1fr 1.35fr; gap: 14px; }
.intake-fields label { display: grid; gap: 8px; color: var(--text); font-size: 15px; }
input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--subtle);
  border-radius: var(--radius);
  outline: none;
  background: var(--base);
  color: var(--fg);
  transition: border-color .12s linear, box-shadow .12s linear;
}
input:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 2px rgba(66, 190, 101, .18); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--red-bright); }
input::placeholder, textarea::placeholder { color: var(--muted); }
textarea { min-height: 148px; resize: vertical; line-height: 1.5; }
.intake-hint { min-height: 24px; color: var(--comment); font-size: 14px; }
.intake-submit-status { min-height: 4.7em; }
.intake-hint.error { color: var(--red-bright); }

.intake-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 26px; }
.intake-choice {
  position: relative;
  min-height: 84px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--overlay);
  border-radius: 8px;
  background: var(--base);
  text-align: left;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  transition: border-color .12s linear, background-color .12s linear;
}
.intake-choice:hover { border-color: var(--subtle); background: var(--surface); }
.intake-choice.selected { border-color: var(--green); background: var(--green-wash); box-shadow: inset 0 0 0 1px var(--green); }
.intake-choice-mark {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1px solid var(--subtle);
  border-radius: 50%;
  color: transparent;
  font-size: 13px;
}
.intake-choice.selected .intake-choice-mark { border-color: var(--green); color: var(--green-bright); }

.intake-actions {
  min-height: 70px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-top: 26px;
}
.intake-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 500;
  line-height: 1.2;
  transition: background-color .12s linear, color .12s linear, border-color .12s linear;
}
.intake-button-primary { background: var(--green); color: var(--base); }
.intake-button-primary:hover { background: var(--green-bright); }
.intake-button-ghost { padding-left: 0; background: transparent; color: var(--comment); }
.intake-button-ghost:hover { color: var(--fg); }
.intake-button[disabled] { cursor: wait; opacity: .55; }
kbd {
  margin-left: 7px;
  padding: 1px 5px;
  border: 1px solid rgba(14, 14, 14, .35);
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 12px;
}

@media (prefers-reduced-motion: reduce) {
  .intake-screen.active { animation: none; }
}
@media (max-width: 860px) {
  .intake-shell { width: min(100% - 16px, 1180px); margin: 8px auto; }
  .intake-workspace { grid-template-columns: 1fr; }
  .intake-rail { padding: 14px 18px; border-right: 0; border-bottom: var(--line); }
  .intake-steps { display: flex; margin-top: 10px; }
  .intake-steps li { flex: 1; min-height: 25px; padding: 0; border-top: 2px solid var(--overlay); font-size: 0; }
  .intake-steps li::before, .intake-steps li::after { display: none; }
  .intake-steps li.active, .intake-steps li.done { border-top-color: var(--green); }
  .intake-timebox { display: none; }
  .intake-main { padding: 30px 22px; }
}
@media (max-width: 620px) {
  .intake-topbar { padding: 14px 16px; }
  .intake-brand-context { display: none; }
  .intake-field-row, .intake-choices { grid-template-columns: 1fr; }
}
