.intake-page {
  min-height: 100svh;
  background: #d3d7ce;
}

.intake-shell {
  display: grid;
  grid-template-columns: 14.5rem minmax(0, 1fr);
  min-height: 100svh;
}

.intake-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding: 1.5rem 1.25rem;
  color: var(--ink);
  background: #d3d7ce;
}

.intake-brand {
  color: var(--ink);
}

.intake-brand .brand-lockup {
  width: min(12rem, 100%);
}

.intake-brand .brand-en {
  color: var(--muted);
}

.sidebar-scope {
  margin: 4rem 0 2.5rem;
}

.sidebar-scope p {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: var(--step-small);
}

.sidebar-scope strong,
.sidebar-scope span {
  display: block;
}

.sidebar-scope strong {
  font-size: 1.15rem;
  font-weight: 600;
}

.sidebar-scope span {
  margin-top: 0.25rem;
  color: var(--muted);
}

.intake-progress {
  position: relative;
  display: grid;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: steps;
}

.intake-progress::before {
  position: absolute;
  top: 1.1rem;
  bottom: 1.1rem;
  left: 0.6rem;
  width: 2px;
  background: #aeb4aa;
  content: "";
}

.intake-progress li {
  position: relative;
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: 0.75rem;
  align-items: center;
  color: var(--muted);
  font-size: var(--step-small);
}

.intake-progress li::before {
  position: relative;
  z-index: 1;
  display: grid;
  width: 1.25rem;
  height: 1.25rem;
  place-items: center;
  color: var(--ink);
  background: #d3d7ce;
  border: 1px solid #7f877e;
  border-radius: 50%;
  content: "";
}

.intake-progress li.active,
.intake-progress li.complete {
  color: var(--ink);
}

.intake-progress li.active::before {
  background: var(--accent);
  border-color: var(--accent);
}

.intake-progress li.complete::before {
  background: var(--ink);
  border-color: var(--ink);
}

.sidebar-trust {
  margin-top: auto;
  padding-top: 2rem;
  font-size: var(--step-small);
}

.sidebar-trust p {
  max-width: 24ch;
  margin: 0 0 1rem;
  color: var(--muted);
}

.sidebar-trust a {
  font-weight: 600;
}

.intake-canvas {
  min-width: 0;
}

.intake-topbar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1.25rem;
  align-items: center;
  min-height: 3rem;
  padding: 0 1.5rem;
  color: var(--muted);
  font-size: var(--step-small);
}

.topbar-back {
  width: fit-content;
  color: var(--ink);
  text-decoration: none;
}

.intake-language button {
  color: var(--muted);
}

.intake-language button[aria-pressed="true"] {
  color: var(--dark-ink);
  background: var(--ink);
}

.intake-sheet {
  min-height: calc(100svh - 3.5rem);
  margin: 0 0.5rem 0.5rem 0;
  padding: clamp(1.5rem, 3vw, 2.75rem);
  background: #f2f3ed;
  border: 1px solid #bcc1b7;
  border-radius: 1rem;
}

.intake-title-row {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-end;
}

.intake-kicker {
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-size: var(--step-small);
}

.intake-title-row h1 {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(1.75rem, 1.5rem + 0.7vw, 2rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.assessment-chip {
  min-width: 7.5rem;
  padding: 0.75rem 1rem;
  background: #dfe2da;
  border: 1px solid #b9beb4;
}

.assessment-chip span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.assessment-chip strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.4rem;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.intake-lead {
  max-width: 52ch;
  margin: 1.25rem 0 2.5rem;
  color: var(--muted);
}

.intake-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17rem;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}

.intake-form {
  min-width: 0;
}

.intake-stage {
  margin: 0;
}

.js .intake-stage:not(.is-active) {
  display: none;
}

.stage-heading {
  margin-bottom: 2rem;
}

.stage-heading h2 {
  margin: 0;
  font-size: clamp(1.65rem, 1.2rem + 1vw, 2.25rem);
  font-weight: 400;
  line-height: 1.15;
}

.stage-heading h2:focus {
  outline: none;
}

.stage-heading p {
  max-width: 52ch;
  margin: 0.65rem 0 0;
  color: var(--muted);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field > span {
  font-size: var(--step-small);
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.7rem 0.8rem;
  color: var(--ink);
  background: #f7f7f2;
  border: 1px solid #aeb4aa;
  border-radius: 0;
}

.field textarea {
  min-height: 7rem;
  resize: vertical;
  line-height: 1.5;
}

.field-full {
  margin-top: 1.25rem;
}

.office-context {
  margin-top: 1.25rem;
  padding: 1rem;
  background: #e5e7df;
}

.check-line {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: var(--step-small);
  line-height: 1.5;
}

.check-line input {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  margin-top: 0.2rem;
  accent-color: var(--accent);
}

.required-check {
  padding-left: 1.65rem;
}

.required-check input {
  margin-left: -1.65rem;
}

.consent-policy-link {
  margin: 0.55rem 0 0 1.65rem;
}

.inline-link {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: var(--step-small);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.inline-link:hover,
.inline-link:focus-visible {
  color: var(--accent);
}

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

.upload-box {
  position: relative;
  display: grid;
  gap: 0.8rem;
  align-content: start;
  min-height: 13rem;
  padding: 1.25rem;
  background: #e3e6de;
  border: 1px solid #aeb4aa;
  cursor: pointer;
}

.upload-box:hover,
.upload-box:focus-within {
  background: #d9ddd4;
}

.upload-title {
  font-size: 1.2rem;
  font-weight: 600;
}

.upload-copy {
  max-width: 34ch;
  color: var(--muted);
  font-size: 0.9rem;
}

.upload-action {
  align-self: end;
  width: fit-content;
  padding: 0.55rem 0.75rem;
  color: var(--accent-ink);
  background: var(--accent);
  font-size: var(--step-small);
  font-weight: 600;
}

.upload-box input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.file-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.2rem;
}

.file-row {
  display: grid;
  grid-template-columns: 4.2rem minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.65rem;
  background: #e8eae3;
  border: 1px solid #c1c6bc;
}

.file-preview {
  display: grid;
  width: 4.2rem;
  height: 3.3rem;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  background: #d2d6cd;
  font-size: 0.78rem;
}

.file-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-meta strong,
.file-meta span {
  display: block;
}

.file-meta strong {
  overflow: hidden;
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta span {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.file-remove {
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.4rem;
  color: var(--muted);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.file-remove:hover {
  color: var(--accent);
}

.upload-guidance {
  margin-top: 1.5rem;
  padding: 1.2rem;
  background: #e8eae3;
}

.upload-guidance h3 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.upload-guidance ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.upload-guidance li + li {
  margin-top: 0.45rem;
}

.context-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.context-options legend {
  grid-column: 1 / -1;
  margin-bottom: 0.2rem;
  font-size: var(--step-small);
  font-weight: 600;
}

.context-options .choice {
  min-height: 3.25rem;
}

.context-boundary {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.order-summary {
  padding: 1.25rem;
  background: #e5e7e0;
  border: 1px solid #b9beb4;
}

.summary-row,
.scope-row {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: baseline;
}

.summary-row + .summary-row,
.scope-row + .scope-row {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
}

.summary-row span,
.scope-row span {
  color: var(--muted);
  font-size: 0.88rem;
}

.summary-row strong,
.scope-row strong {
  max-width: 55%;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: right;
}

.payment-state {
  margin-top: 1.5rem;
  padding: 1rem;
  background: #e5e7e0;
  border-left: 0.3rem solid var(--muted);
}

.payment-state[data-state="ready"] {
  border-left-color: var(--accent);
}

.payment-state strong {
  display: block;
  font-size: 1rem;
}

.payment-state p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: var(--step-small);
}

.checkout-button {
  width: 100%;
  margin-top: 1rem;
}

.intake-actions {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.25rem;
  padding-top: 1.5rem;
}

.intake-actions .button-secondary {
  order: 1;
}

.intake-actions .button-primary {
  order: 2;
  margin-left: auto;
}

.intake-aside {
  display: grid;
  gap: 1.5rem;
}

.aside-scope {
  padding: 1.25rem;
  background: #e5e7e0;
  border: 1px solid #b9beb4;
}

.aside-scope h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}

.aside-photo {
  margin: 0;
}

.aside-photo img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.aside-photo figcaption,
.aside-note p {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.intake-message {
  margin-bottom: 1rem;
}

.is-invalid {
  border-color: var(--accent) !important;
}

.submit-result {
  max-width: 46rem;
  margin: 3rem 0 0;
  padding: 1.5rem;
  background: #e5e7e0;
  border: 1px solid #b9beb4;
}

.submit-result h2 {
  margin: 0 0 0.75rem;
  font-size: 1.6rem;
  font-weight: 400;
}

.submit-result p {
  margin: 0;
  color: var(--muted);
}

.submit-steps {
  display: grid;
  gap: 0.8rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.submit-steps li {
  padding-left: 1.7rem;
  color: var(--muted);
}

.submit-steps li::before {
  position: absolute;
  margin-left: -1.7rem;
  color: var(--accent);
  content: "—";
}

.delivery-page {
  background: #d3d7ce;
}

.delivery-shell {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 1.25rem;
}

.delivery-brand {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  color: var(--ink);
}

.delivery-brand .brand-lockup {
  width: min(13rem, 55vw);
}

.delivery-sheet {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(16rem, 0.8fr);
  gap: clamp(2rem, 5vw, 5rem);
  width: min(86rem, 100%);
  padding: clamp(1.5rem, 4vw, 3rem);
  background: #f2f3ed;
  border: 1px solid #b9beb4;
  border-radius: 1rem;
}

.delivery-content {
  align-self: center;
}

.delivery-order {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: var(--step-small);
}

.delivery-sheet h1 {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(1.75rem, 1.55rem + 0.7vw, 2rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.delivery-content > p {
  max-width: 48ch;
  margin: 1rem 0 2rem;
  color: var(--muted);
}

.delivery-state {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  background: #e3e6de;
  border: 1px solid #b9beb4;
}

.delivery-mark {
  width: 1.25rem;
  height: 1.25rem;
  background: transparent;
  border: 2px solid var(--muted);
  border-radius: 50%;
}

.delivery-state[data-state="paid"] .delivery-mark {
  background: var(--accent);
  border-color: var(--accent);
}

.delivery-state[data-state="failed"] .delivery-mark {
  background: var(--ink);
  border-color: var(--ink);
}

.delivery-state[data-state="checking"] .delivery-mark {
  border-top-color: var(--accent);
  animation: delivery-spin 1s linear infinite;
}

.delivery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-top: 1.5rem;
}

.delivery-note {
  margin-top: 2.5rem !important;
  font-size: var(--step-small);
}

.delivery-visual {
  align-self: stretch;
  margin: 0;
}

.delivery-visual img {
  width: 100%;
  height: 100%;
  min-height: 26rem;
  object-fit: cover;
}

.delivery-visual figcaption {
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: var(--step-small);
}

@keyframes delivery-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1000px) {
  .intake-shell {
    display: block;
  }

  .intake-sidebar {
    display: none;
  }

  .intake-language button {
    color: var(--ink);
  }

  .intake-sheet {
    margin: 0;
    border-width: 1px 0 0;
    border-radius: 1rem 1rem 0 0;
  }

  .intake-layout {
    grid-template-columns: minmax(0, 1fr) 15rem;
    gap: 2rem;
  }
}

@media (max-width: 720px) {
  .intake-topbar {
    grid-template-columns: 1fr auto;
    padding: 0 1rem;
  }

  #topbar-status {
    display: none;
  }

  .intake-sheet {
    padding: 1.25rem;
  }

  .intake-title-row {
    display: block;
  }

  .delivery-sheet {
    display: block;
  }

  .delivery-visual {
    margin-top: 2rem;
  }

  .delivery-visual img {
    height: 18rem;
    min-height: 0;
  }

  .assessment-chip {
    width: fit-content;
    margin-top: 1rem;
  }

  .intake-layout {
    display: block;
  }

  .intake-aside {
    margin-top: 3rem;
  }

  .form-grid,
  .upload-grid,
  .context-options {
    grid-template-columns: 1fr;
  }

  .upload-box {
    min-height: 11rem;
  }

  .file-row {
    grid-template-columns: 3.5rem minmax(0, 1fr) auto;
  }

  .file-preview {
    width: 3.5rem;
    height: 3rem;
  }

  .summary-row {
    display: block;
  }

  .summary-row strong {
    display: block;
    max-width: none;
    margin-top: 0.2rem;
    text-align: left;
  }
}

/* Space questionnaire (stage 3) */
.space-questions { display: grid; gap: 18px; }
.space-room { border: 1px solid rgba(31, 36, 33, 0.14); border-radius: 12px; padding: 16px 18px 6px; margin: 0; }
.space-room > legend { padding: 0 6px; font-weight: 600; }
.space-room .form-grid { margin-bottom: 10px; }
.space-friction { margin-top: 6px; }
.consent-policy-link a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
