/* Company enablement intake (contact/intake/, docs/leads.md). Loaded after refresh.css; reuses the contact form's
   card (.cf-card, .cf-field, .cf-error, .cf-alert, .cf-sent) and adds the side rail, the steps, the options and the
   review. Layout from Nick's mockup "Intake" (canvas of contact paths): a 300px rail beside the step card. */

.ik-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px; align-items: start; }
.ik-rail[hidden], .ik-main[hidden], .ik-form[hidden], .ik-step-top[hidden], .ik-saved[hidden], .ik-restored[hidden],
.ik-step[hidden], .ik-review[hidden], .ik-other[hidden] { display: none; }

/* Sent, or unavailable: the card alone */
.ik-grid.is-single { grid-template-columns: minmax(0, 1fr); }
.ik-grid.is-single .ik-card { width: 100%; max-width: 760px; }

/* The rail: how far along, and the ten steps */
.ik-rail { position: sticky; top: calc(var(--hdr-h, 88px) + 16px); padding: 26px 22px; border-radius: 28px; background: #fff; border: 1px solid var(--soft-border); box-shadow: var(--shadow-card); }
.ik-pct, .ik-step-label { margin: 0; font-size: .75rem; font-weight: 700; letter-spacing: .16em; line-height: 1.4; text-transform: uppercase; color: var(--pink); }
.ik-bar { height: 6px; margin: 10px 0 18px; border-radius: 999px; background: #eef1f7; overflow: hidden; }
.ik-bar-fill { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #a71158, #653477 40%, #343f87 70%, #12669f); transition: width .3s ease; }
.ik-step-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ik-step-link { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: center; width: 100%; min-height: 44px; padding: 9px 10px; border: 0; border-radius: 12px; background: transparent; font: inherit; font-size: .88rem; line-height: 1.35; color: var(--muted); text-align: left; cursor: pointer; }
.ik-step-link:not(:disabled):hover { background: var(--paper); color: var(--ink); }
.ik-step-link:disabled { cursor: default; opacity: .6; }
.ik-step-link:focus-visible { outline: 3px solid var(--pink); outline-offset: 1px; }
.ik-step-num { display: grid; place-items: center; width: 28px; height: 28px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 9px; background: #fff; font: 650 .74rem/1 var(--display); color: var(--muted); }
.ik-step-link.is-done { color: var(--ink); }
.ik-step-link.is-done .ik-step-num { background: var(--ink); border-color: var(--ink); color: #fff; }
.ik-step-link[aria-current="step"] { background: #fcf0f6; color: var(--ink); font-weight: 600; }
.ik-step-link[aria-current="step"] .ik-step-num { background: var(--brand-gradient, linear-gradient(115deg, #a71158, #653477 40%, #343f87 70%, #12669f)); border-color: transparent; color: #fff; }

/* The card: step count, then one step or the review */
.ik-card { scroll-margin-top: calc(var(--hdr-h, 88px) + 16px); }
.ik-step-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 6px; }
.ik-saved { margin: 0; font-size: .8rem; color: var(--muted); }
.ik-restored { margin: 10px 0 14px; padding: 10px 14px; border-radius: 12px; background: var(--paper); font-size: .88rem; line-height: 1.45; color: var(--muted); }
.ik-main .cf-alert { margin-top: 10px; }
.ik-link { padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--ink); text-decoration: underline; cursor: pointer; }
.ik-link:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }

/* One step */
.ik-step-title { font: 500 1.9rem/1.15 var(--display); letter-spacing: -.03em; color: var(--ink); }
.ik-step-title:focus { outline: none; }
.ik-step-desc { margin: 8px 0 0; font-size: .95rem; line-height: 1.55; color: var(--muted); }
.ik-questions { margin-top: 18px; }
/* The line between questions is a background, so a fieldset's legend never cuts through it */
.ik-q { display: block; min-width: 0; margin: 0; padding: 22px 0; border: 0; background: linear-gradient(#edf0f6, #edf0f6) top / 100% 1px no-repeat; }
.ik-q:first-child { padding-top: 6px; background: none; }
.ik-label, .ik-form .cf-field > .ik-label { display: block; margin-bottom: 8px; padding: 0; font-weight: 600; font-size: .98rem; line-height: 1.45; color: var(--ink); }
.ik-tag { margin-left: 4px; font-size: .8rem; font-weight: 450; color: var(--muted); }
.ik-help { margin: -2px 0 10px; font-size: .85rem; line-height: 1.5; color: var(--muted); }
.ik-form .cf-field textarea { min-height: 110px; }

/* Options: real inputs under chips, so a click, a tap and the keyboard all reach them */
.ik-options { display: flex; flex-wrap: wrap; gap: 8px; }
.ik-opt { position: relative; display: block; max-width: 100%; cursor: pointer; }
.ik-opt input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ik-opt-text { display: flex; align-items: center; min-height: 44px; box-sizing: border-box; padding: 9px 16px; border: 1px solid #c8d2e3; border-radius: 999px; background: #fff; font-size: .88rem; font-weight: 550; line-height: 1.35; color: var(--ink); transition: border-color .15s ease, background-color .15s ease, color .15s ease; }
.ik-options--check .ik-opt-text { border-radius: 12px; }
.ik-opt:hover .ik-opt-text { border-color: var(--pink); }
.ik-opt input:checked + .ik-opt-text { border-color: var(--ink); background: var(--ink); color: #fff; }
.ik-opt input:focus-visible + .ik-opt-text { outline: 3px solid var(--pink); outline-offset: 2px; }
.ik-q.is-invalid .ik-opt input:not(:checked) + .ik-opt-text { border-color: #b3261e; }

/* The 1 to 5 rating, between its two ends */
.ik-options--scale { align-items: center; }
.ik-opt--scale .ik-opt-text { justify-content: center; width: 48px; height: 48px; padding: 0; border-radius: 12px; font: 650 1rem/1 var(--display); }
.ik-scale-end { font-size: .8rem; color: var(--muted); }

.ik-other { margin-top: 14px; max-width: 480px; }

/* The review, before sending */
.ik-review .ik-step-title { margin-top: 0; }
.ik-review-list { list-style: none; margin: 20px 0 0; padding: 0; border-top: 1px solid var(--line); }
.ik-review-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .95rem; line-height: 1.45; color: var(--ink); }
.ik-edit { flex: none; min-height: 44px; padding: 0 4px; border: 0; background: none; font: inherit; font-weight: 600; color: var(--pink); cursor: pointer; }
.ik-edit:hover { text-decoration: underline; }
.ik-edit:focus-visible { outline: 3px solid var(--pink); outline-offset: 1px; border-radius: 6px; }

/* Back and next */
.ik-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 22px; padding-top: 24px; border-top: 1px solid var(--line); }
.ik-actions .btn:disabled { opacity: .45; cursor: default; transform: none; }
.ik-actions .ik-next:disabled { opacity: .7; cursor: progress; }

/* Sent: two ways on */
.ik-sent-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.ik-sent .ik-sent-actions .btn { margin-top: 0; }
.ik-sent .ik-sent-actions .btn-primary { color: #fff; }
.ik-sent .ik-sent-actions .btn-outline { color: var(--ink); }

@media (max-width: 960px) {
  .ik-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .ik-rail { position: static; }
  .ik-step-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .ik-rail { padding: 20px 22px; border-radius: 26px; }
  .ik-bar { margin-bottom: 0; }
  .ik-nav { display: none; }
  .ik-step-top { flex-wrap: wrap; gap: 4px 16px; }
  .ik-step-title { font-size: 1.55rem; }
  .ik-options--scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px 8px; max-width: 340px; }
  .ik-opt--scale .ik-opt-text { width: 100%; }
  .ik-scale-end { grid-row: 2; grid-column: 1 / span 2; }
  .ik-scale-end--high { grid-column: 4 / span 2; justify-self: end; text-align: right; }
  .ik-actions .btn { flex: 1 1 0; justify-content: center; min-height: 52px; padding-inline: 12px; gap: 10px; }
  .ik-sent-actions .btn { flex: 1 1 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .ik-bar-fill, .ik-opt-text { transition: none; }
}
