/* The online Potential Investor Enquiry Form (src/views/SpiForm.astro). On chalk, square, no boxes around the steps: the
   steps down the side, one step at a time in a readable column, every question with its label above it, white inputs with
   a navy edge so each is plain to see, and choices as square tiles. */

.spi-hero h1 { max-width: none; }
.spi-kind { display: block; font-style: italic; color: var(--brick-accent); }
.spi-kind:empty { display: none; }
.spi-body { padding-block: clamp(2.5rem, 5vw, 4.5rem) clamp(4rem, 8vw, 6.5rem); }
.spi-in { display: grid; grid-template-columns: minmax(12.5rem, 18.5rem) minmax(0, 46rem);   /* the steps a little wider, for their 16px names (5 November 2026) */
  justify-content: space-between; column-gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.spi-form { min-width: 0; }

/* the steps down the side */
.spi-side { position: sticky; top: calc(var(--rh, 34px) + 1.5rem); display: grid; gap: 1rem; }
.spi-count { font: 600 .75rem var(--sans); font-stretch: 80%; letter-spacing: .12em; text-transform: uppercase; color: var(--brick-word); }
.spi-count:empty { display: none; }
.spi-steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.spi-steps:empty { display: none; }
.spi-steps li { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr); align-items: baseline; border-bottom: 1px solid var(--rule); }
.spi-steps .n { font: 600 .75rem var(--sans); letter-spacing: .08em; color: var(--taupe); font-variant-numeric: tabular-nums; }
.spi-steps button { text-align: left; min-height: 44px; padding: .5rem 0; background: none; border: 0; font: 500 1rem/1.35 var(--sans); color: var(--ink); cursor: pointer; }   /* navigation: 16px Medium (type scale, 5 November 2026) */
.spi-steps button:disabled { color: var(--ink); cursor: default; }   /* text is ink; the pale number says it is still to come */
.spi-steps li.done { padding-block: 0; gap: 0; text-align: left; }   /* not the site's generic .done (seneca.css), which made a finished step's row taller */
.spi-steps button:not(:disabled):hover { color: var(--brick-word); }
.spi-steps li.done .n { color: var(--navy); }
.spi-steps li.on .n { color: var(--brick-word); }
.spi-steps li.on button { font-weight: 600; color: var(--navy); }
.spi-paper { font-size: .875rem; line-height: 1.5; color: var(--ink); }
.spi-paper a { color: var(--navy); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.spi-paper a svg { width: 12px; height: 12px; margin-left: .25rem; vertical-align: -1px; }

/* a step */
.spi-step { display: grid; gap: 1.5rem; }
.spi-step[hidden] { display: none; }
.spi-h { --serif-size: clamp(2rem, calc(3.2vw * var(--ts)), 2.75rem); --serif-ls: -.012em; --serif-ws: -.02em; font: 400 var(--serif-fit)/1.05 var(--serif); color: var(--navy); text-wrap: balance; outline: none; letter-spacing: var(--serif-ls); word-spacing: var(--serif-ws); }
.spi-q, .spi-lead { font-size: var(--t-body); line-height: 1.6; color: var(--ink); font-weight: 600; }
.spi-q i { font-style: normal; font-weight: 400; }
.spi-note { font-size: .875rem; line-height: 1.55; color: var(--ink); }
.spi-intro { display: grid; gap: .875rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.spi-intro p { font-size: var(--t-body); line-height: 1.65; color: var(--ink); }
.spi-intro p:last-child { font-weight: 600; }
.spi-fields { display: grid; gap: 1.5rem; }
.spi-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.spi-nav .spi-next, .spi-nav #spi-send { margin-left: auto; }
.spi-nojs { padding: 1rem 1.25rem; border-left: 2px solid var(--brick); }
.spi-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* a question */
.sf { display: grid; gap: .5rem; }
.sf[hidden] { display: none; }
.sf-l { font: 600 var(--t-body)/1.45 var(--sans); color: var(--navy); }
.sf-l i { font-style: normal; font-weight: 400; color: var(--ink); font-size: .875rem; }
.sf-hint { font-size: .875rem; line-height: 1.5; color: var(--ink); margin-top: -.25rem; }
.sf-err { font: 600 .875rem/1.45 var(--sans); color: var(--brick-word); }
.spi-form input:not([type=radio]):not([type=checkbox]), .spi-form textarea {
  width: 100%; min-height: 48px; padding: .6875rem .875rem; font: var(--t-body)/1.4 var(--sans); color: var(--ink);
  background: #fff; border: 1px solid var(--navy); border-radius: 0; }
.spi-form textarea { resize: vertical; min-height: 6rem; }
.spi-form input:focus-visible, .spi-form textarea:focus-visible { outline: 2px solid var(--trim-focus); outline-offset: 2px; }
.spi-form .sf input.w-pc { width: min(100%, 10rem); text-transform: uppercase; }
.sf.bad input:not([type=radio]):not([type=checkbox]), .sf.bad textarea, tr.bad input { border-color: var(--brick-word); border-width: 2px; }
.sf.bad { padding-left: 1rem; border-left: 2px solid var(--brick-word); }
.sf-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: end; }
.sf-sub { display: flex; align-items: center; gap: .5rem; font-size: .875rem; color: var(--ink); }
.spi-form .sf-row .sf-sub input { width: 4.5rem; }
.sf-dmy .sf-sub { flex-direction: column; align-items: flex-start; gap: .25rem; }
.spi-form .sf-dmy .sf-yyyy input { width: 6rem; }
.sf-money { display: flex; align-items: stretch; }
.sf-money > span { display: grid; place-items: center; min-width: 2.5rem; font: 600 var(--t-body) var(--sans); color: var(--navy); background: var(--stone); border: 1px solid var(--navy); border-right: 0; }
.spi-form .sf-money input { max-width: 14rem; }
/* yes or no: the question on the left, the two tiles on the right; stacked on a phone */
.sf.sfk-yn { grid-template-columns: minmax(0, 1fr) auto; column-gap: 1.5rem; align-items: start; }
.sf.sfk-yn > .sf-l { grid-column: 1; }
.sf.sfk-yn > .sf-yn { grid-column: 2; grid-row: 1 / span 3; }
.sf.sfk-yn > .sf-err, .sf.sfk-yn > .sf-hint { grid-column: 1; }
/* yes or no: two square tiles side by side */
.sf-yn { display: flex; gap: .625rem; }
.sf-yn label, .sf-opts label, .sf-check { position: relative; display: flex; align-items: center; gap: .75rem; min-height: 48px; padding: .625rem 1rem; background: #fff; border: 1px solid var(--navy); cursor: pointer; font-size: var(--t-body); line-height: 1.45; color: var(--ink); }
.sf-yn label { min-width: 6.5rem; justify-content: center; font-weight: 600; color: var(--navy); }
.sf-yn input, .sf-opts input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sf-yn label:has(input:checked) { background: var(--navy); color: var(--chalk); }
.sf-yn label:has(input:focus-visible), .sf-opts label:has(input:focus-visible), .sf-check:has(input:focus-visible), .spi-k:has(input:focus-visible) { outline: 2px solid var(--trim-focus); outline-offset: 2px; }
.sf-opts { display: grid; gap: .5rem; }
.sf-opts label::before { content: ""; flex: none; box-sizing: border-box; width: 18px; height: 18px; padding: 3px; border: 1.5px solid var(--navy); background: #fff content-box; }
.sf-opts label:has(input:checked) { border-color: var(--navy); border-width: 2px; padding: calc(.625rem - 1px) calc(1rem - 1px); }
.sf-opts label:has(input:checked)::before { background: var(--navy) content-box; }
.sf-check { align-items: flex-start; }
.sf-check input { flex: none; width: 18px; height: 18px; margin-top: .125rem; accent-color: var(--navy); }
.sf-check i { font-style: normal; color: var(--ink); font-size: .875rem; }
.sf-opts label:hover, .sf-check:hover, .sf-yn label:hover { border-color: var(--brick-word); }

/* the start: the three kinds of form */
.spi-kinds { display: grid; gap: .75rem; }
.spi-k { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem; padding: 1.125rem 1.25rem; background: #fff; border: 1px solid var(--navy); cursor: pointer; }
.spi-k input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.spi-kt { display: grid; gap: .25rem; }
.spi-kt b { font: 600 1.25rem var(--sans); color: var(--navy); }
.spi-kt small { font-size: .875rem; line-height: 1.45; color: var(--ink); }
.spi-k .rad { width: 20px; height: 20px; border: 1.5px solid var(--navy); display: grid; place-items: center; }
.spi-k .rad::after { content: ""; width: 10px; height: 10px; background: var(--navy); transform: scale(0); transition: transform .2s var(--ease); }
.spi-k:has(input:checked) { border-width: 2px; padding: calc(1.125rem - 1px) calc(1.25rem - 1px); }
.spi-k:has(input:checked) .rad::after { transform: scale(1); }
.spi-k:hover { border-color: var(--brick-word); }

/* experience: a table on a desktop, a stack on a phone */
.spi-x { width: 100%; border-collapse: collapse; }
.spi-x thead th { padding: 0 0 .625rem; font: 600 .75rem var(--sans); font-stretch: 80%; letter-spacing: .12em; text-transform: uppercase; color: var(--navy); text-align: left; border-bottom: 1px solid var(--navy); }
.spi-x tbody th { padding: .75rem 1rem .75rem 0; font: 500 1rem/1.4 var(--sans); color: var(--ink); text-align: left; vertical-align: middle; }
.spi-x td { padding: .5rem 0 .5rem .75rem; vertical-align: middle; white-space: nowrap; }
.spi-x tbody tr { border-bottom: 1px solid var(--rule); }
.spi-form .spi-x td:nth-child(2) input { width: 4.5rem; }
.spi-x td .sf-u { margin-left: .5rem; font-size: .875rem; color: var(--ink); }
.spi-form .spi-x .sf-money input { width: 9rem; }

/* the High Net Worth statement: A, B, or C */
.hnw-row { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: 1rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.hnw-l { --serif-size: 2rem; --serif-ls: 0em; --serif-ws: 0em; font: 400 var(--serif-fit)/1 var(--serif); color: var(--brick-word); letter-spacing: var(--serif-ls); word-spacing: var(--serif-ws); }
.hnw-q { display: grid; gap: 1rem; }
.hnw-if[hidden] { display: none; }
.hnw-or { font: 600 .75rem var(--sans); font-stretch: 80%; letter-spacing: .12em; text-transform: uppercase; color: var(--navy); }
.spi-sign { display: grid; gap: 1rem; padding: 1.5rem 0 0; border-top: 2px solid var(--navy); }
.spi-statement { font-size: var(--t-body); line-height: 1.6; color: var(--ink); font-weight: 600; }

/* the declaration */
.spi-list { margin: 0; padding-left: 1.25rem; display: grid; gap: .625rem; }
.spi-list li { font-size: var(--t-body); line-height: 1.6; color: var(--ink); list-style: square; }
.spi-list li::marker { color: var(--brick); }
.spi-int { border: 0; margin: 0; padding: 0; display: grid; gap: 1rem; }
.spi-intg { display: grid; gap: .5rem; }
.spi-intg + .spi-intg { padding-top: 1rem; border-top: 1px solid var(--rule); }

/* errors */
.spi-errs { padding: 1.125rem 1.25rem; border: 2px solid var(--brick-word); background: #fff; outline: none; }
.spi-errs[hidden] { display: none; }
.spi-errs b { display: block; font: 600 var(--t-body) var(--sans); color: var(--brick-word); margin-bottom: .5rem; }
.spi-errs ul { margin: 0; padding-left: 1.125rem; display: grid; gap: .375rem; }
.spi-errs a { color: var(--brick-word); text-decoration: underline; text-underline-offset: 3px; font-size: var(--t-body); }
.spi-err-send { padding: 1rem 1.25rem; border-left: 2px solid var(--brick-word); font-size: var(--t-body); line-height: 1.6; color: var(--ink); }
.spi-err-send a { color: var(--navy); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* the review */
.spi-review { display: grid; gap: 2rem; }
.rv-h { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-bottom: .625rem; border-bottom: 1px solid var(--navy); }
.rv-h h3 { font: 600 var(--t-body)/1.35 var(--sans); color: var(--navy); }
.rv-ch { min-height: 44px; padding: 0 .25rem; background: none; border: 0; font: 600 .875rem var(--sans); color: var(--brick-word); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.spi-review dl { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.spi-review dt, .spi-review dd { margin: 0; padding: .625rem 0; border-bottom: 1px solid var(--rule); font-size: .875rem; line-height: 1.5; }
.spi-review dt { color: var(--ink); padding-right: 1.5rem; }
.spi-review dd { color: var(--navy); font-weight: 600; overflow-wrap: anywhere; white-space: pre-line; }

/* sent */
.spi-done { justify-items: start; outline: none; }
.spi-done .ico { width: 48px; height: 48px; display: grid; place-items: center; background: var(--brick); color: var(--chalk); }
.spi-done .ico svg { width: 24px; height: 24px; }
.spi-done p { font-size: var(--t-body); line-height: 1.6; color: var(--ink); max-width: 40rem; }
.spi-done a, .spi-save { color: var(--navy); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 900px) {
  .spi-in { grid-template-columns: minmax(0, 1fr); row-gap: 2rem; }
  .spi-side { position: static; }
  .spi-steps { display: none; }
  .spi-x thead { display: none; }
  .spi-x, .spi-x tbody, .spi-x tr, .spi-x th, .spi-x td { display: block; }
  .spi-x tbody tr { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .5rem .75rem; padding: .875rem 0; }
  .spi-x tbody th { grid-column: 1 / -1; padding: 0; }
  .spi-x td { padding: 0; }
  .spi-x td:nth-child(2)::before { content: none; }
  .spi-review dl { grid-template-columns: minmax(0, 1fr); }
  .spi-review dt { border-bottom: 0; padding-bottom: 0; }
  .spi-nav .btn { flex: 1 1 auto; justify-content: center; }
  .sf.sfk-yn { grid-template-columns: minmax(0, 1fr); }
  .sf.sfk-yn > .sf-yn { grid-column: 1; grid-row: auto; }
  .sf-yn label { flex: 1 1 0; }
}
