/* Nadyuk Systems: the sentence form and its question cards (your-plan.html only).
   Loaded after health-check.css. Reuses .lead-hp (honeypot) from funnel.css. */

.sf-card { scroll-margin-top: calc(var(--hdr-h) + 24px); background: var(--card); border: var(--line) solid var(--ink); border-radius: var(--r-card); corner-shape: squircle; padding: clamp(20px, 3vw, 36px); }
.sf-card [hidden] { display: none; }
.doc-body .sf-card h2 { margin-top: 0; }
.doc-body .sf-card h2::before { display: none; }
.sf-intro p { margin-top: 10px; }

/* ---------- The sentence ---------- */
.sf-line { margin-top: 22px; font-size: 1.375rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.5; color: var(--ink); }
.sf-line + .sf-line { margin-top: 14px; padding-top: 20px; border-top: 1px solid var(--rule); }

/* One blank: the control and its full stop on the first row, the label and any error under them.
   The first row sets the baseline, so the typed words sit on the same line as the sentence. */
.sf-blank { display: inline-grid; grid-template-columns: minmax(0, auto) auto; justify-content: start; align-items: baseline; vertical-align: baseline; max-width: 100%; margin: 0 2px 12px; }
/* contain: the label and error wrap to the blank's width instead of widening it and leaving a gap after it. */
.sf-blank label { contain: inline-size; grid-row: 2; grid-column: 1 / -1; margin-top: 5px; font-size: 0.875rem; font-weight: 500; letter-spacing: 0; line-height: 1.3; color: var(--ink-3); }
.sf-in { grid-row: 1; grid-column: 1; box-sizing: border-box; field-sizing: content; width: auto; min-inline-size: 8.5ch; max-inline-size: 100%; min-height: 48px; padding: 6px 10px; font: inherit; letter-spacing: inherit; color: var(--cobalt-deep); background-color: var(--sand); border: 0; border-bottom: 3px solid var(--ink); border-radius: calc(8px * var(--sq, 1)) calc(8px * var(--sq, 1)) 0 0; corner-shape: squircle; }
.sf-in-wide { min-inline-size: 13ch; }
.sf-stop { grid-row: 1; grid-column: 2; }
/* The leak dropdown: wrapping text underneath, the real select invisible on top, so taps, keys and
   screen readers all use the select. The focus ring and error line go on what you can see. */
.sf-pick { grid-row: 1; grid-column: 1; position: relative; display: block; align-self: last baseline; }
.sf-pick select { position: absolute; inset: 0; box-sizing: border-box; width: 100%; height: 100%; margin: 0; font: inherit; opacity: 0; cursor: pointer; }
.sf-pick:has(select:focus-visible) { outline: 3px solid var(--cobalt); outline-offset: 3px; border-radius: calc(8px * var(--sq, 1)) calc(8px * var(--sq, 1)) 0 0; corner-shape: squircle; }
.sf-pick:has(select[aria-invalid="true"]) .sf-pick-text { border-bottom-color: var(--vermilion-deep); }
.sf-pick:has(select) + .sf-stop { align-self: last baseline; }
.sf-pick-text { display: block; padding-right: 38px; line-height: 1.35; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%2314172b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; }
/* Browsers without field-sizing keep a fixed blank and scroll inside it. */
@supports not (field-sizing: content) {
  input.sf-in { width: 11ch; }
  input.sf-in-wide { width: 17ch; }
}
.sf-in[aria-invalid="true"] { border-bottom-color: var(--vermilion-deep); }
.sf-err { contain: inline-size; grid-row: 3; grid-column: 1 / -1; margin-top: 3px; font-size: 0.875rem; font-weight: 650; letter-spacing: 0; line-height: 1.3; color: var(--vermilion-deep); }
.sf-err:empty { display: none; }

/* ---------- Send, error and sent ---------- */
.sf-ts:not(:empty) { margin-top: 16px; }
.sf-go { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 18px; }
.sf-go .btn[aria-disabled="true"] { opacity: 0.6; cursor: progress; }
.doc-body .sf-status { font-size: 0.95rem; font-weight: 600; color: var(--ink); }
.sf-card .fine { margin-top: 14px; }
.sf-error { margin-top: 20px; padding: 18px 20px; border: var(--line) solid var(--vermilion-deep); border-radius: var(--r-sm); corner-shape: squircle; }
.sf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 16px; }
.sf-actions a:not(.btn) { display: inline-flex; align-items: center; min-height: 42px; font-weight: 600; }
.sf-error:focus, .sf-done:focus { outline: none; }
.sf-error:focus-visible, .sf-done:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 6px; border-radius: var(--r-sm); corner-shape: squircle; }
.sf-done-mark { display: block; width: 20px; height: 20px; margin-bottom: 16px; border-radius: 50%; background: var(--green); }
.sf-done p + p { margin-top: 12px; }

/* ---------- The 14 optional sizing questions (pills reuse .hc-opts / .hc-opt from health-check.css) ---------- */
.sf-size { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--rule); }
.doc-body .sf-size h2 { margin-top: 0; }
.doc-body .sf-size h2::before { display: none; }
.doc-body .sf-size h2, .doc-body .sf-size h3 { font-size: 1.25rem; letter-spacing: -0.02em; color: var(--ink); }
.sf-size > p { margin-top: 6px; }
/* The deck: one card at a time. Every card is in the page; the ones not showing are [hidden]. */
.sf-deck { margin-top: 18px; padding: clamp(16px, 3vw, 22px); background: var(--sand); border-radius: var(--r-card); corner-shape: squircle; overflow: hidden; }
.sf-deck-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.sf-deck-group { font-weight: 600; color: var(--ink-2); }
.sf-deck-num { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-2); }
/* Read out by screen readers ("Question 2 of 14"); the eye sees 2/14. */
.sf-deck-count { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
/* The counter already says where you are. */
.sf-deck .sf-q-n { display: none; }
.sf-deck-bar { height: 4px; margin-top: 10px; background: var(--rule); border-radius: 2px; overflow: hidden; }
.sf-deck-bar i { display: block; height: 100%; width: 0; background: var(--ink); border-radius: 2px; }
.sf-deck .sf-q { margin-top: 16px; }
.sf-deck .sf-q:focus { outline: none; }
.sf-deck .sf-q:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 6px; border-radius: var(--r-sm); corner-shape: squircle; }
.sf-deck .sf-q[hidden], .sf-deck-done[hidden] { display: none; }
.sf-deck .hc-opt { background: var(--card); }
.sf-deck .hc-opt:hover { background: var(--sand-2); }
.sf-deck .hc-opt:has(input:checked) { background: var(--ink); }
.sf-deck .sf-q-in { background: var(--card); }
.sf-deck-done { margin-top: 16px; }
.sf-deck-done:focus { outline: none; }
.sf-deck-done-title { font-weight: 650; font-size: 1.1rem; color: var(--ink) !important; }
.sf-deck-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }
.sf-deck-nav .btn { margin-top: 0; min-width: 110px; }
.sf-deck-nav .btn[disabled] { visibility: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .sf-deck-bar i { transition: width 0.3s var(--ease); }
  .sf-deck .is-in-next { animation: sf-in-next 0.32s var(--ease) both; }
  .sf-deck .is-in-prev { animation: sf-in-prev 0.32s var(--ease) both; }
  .sf-deck .is-out-next { animation: sf-out-next 0.18s ease-in both; }
  .sf-deck .is-out-prev { animation: sf-out-prev 0.18s ease-in both; }
}
@keyframes sf-in-next { from { opacity: 0; transform: translateX(36px); } to { opacity: 1; transform: none; } }
@keyframes sf-in-prev { from { opacity: 0; transform: translateX(-36px); } to { opacity: 1; transform: none; } }
@keyframes sf-out-next { to { opacity: 0; transform: translateX(-36px); } }
@keyframes sf-out-prev { to { opacity: 0; transform: translateX(36px); } }

.doc-body .sf-group { margin-top: 26px; font-family: var(--mono); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-3); }
.sf-q { margin: 14px 0 0; padding: 0; border: 0; min-width: 0; }
.sf-q legend, .sf-q-label { display: block; padding: 0; font-weight: 650; font-size: 1.02rem; line-height: 1.35; color: var(--ink); }
.sf-q-n { color: var(--ink-3); font-weight: 600; }
.sf-q-hint { margin-left: 6px; font-family: var(--mono); font-size: 0.7rem; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.sf-q .hc-opts { margin-top: 10px; }
.sf-q .hc-opt { min-height: 48px; font-size: 0.975rem; }
.sf-q .hc-opt:has(input[type="checkbox"])::before { border-radius: 5px; }
.sf-q-in { display: block; box-sizing: border-box; width: 100%; min-height: 48px; margin-top: 10px; padding: 10px 14px; font: inherit; font-size: max(1rem, 1em); line-height: 1.45; color: var(--ink); background: var(--sand); border: var(--line) solid var(--ink); border-radius: var(--r-sm); corner-shape: squircle; }
textarea.sf-q-in { resize: vertical; min-height: 96px; }
.sf-q-in::placeholder { color: var(--ink-3); opacity: 1; }
.sf-done h3 { margin-top: 22px; font-size: 1.2rem; letter-spacing: -0.02em; color: var(--ink); }
.sf-done .sf-actions button { margin-top: 0; }

/* ---------- The terms box (native modal dialog) ---------- */
.sf-terms { box-sizing: border-box; width: min(36rem, 100% - 32px); max-height: calc(100dvh - 32px); margin: auto; padding: clamp(20px, 4vw, 32px); color: var(--ink-2); background: var(--card); border: var(--line) solid var(--ink); border-radius: var(--r-card); corner-shape: squircle; }
.sf-terms:modal { overscroll-behavior: contain; }
.sf-terms::backdrop { background: rgba(15, 18, 38, 0.6); overflow: hidden; overscroll-behavior: contain; }
.sf-terms h2 { font-size: clamp(1.4rem, 3vw, 1.75rem); letter-spacing: -0.03em; line-height: 1.12; color: var(--ink); }
.sf-terms p { margin-top: 12px; line-height: 1.55; }
.sf-terms strong { color: var(--ink); }
.sf-agree { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; margin-top: 20px; padding: 14px 16px; font-weight: 650; color: var(--ink); background: var(--sand); border-radius: var(--r-sm); corner-shape: squircle; cursor: pointer; }
.sf-agree input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--cobalt); }
.sf-agree:has(input[aria-invalid="true"]) { outline: 2px solid var(--vermilion-deep); outline-offset: 2px; }
/* Space reserved so the buttons never move when the error appears. */
.sf-terms .sf-agree-err { visibility: hidden; margin-top: 8px; font-size: 0.875rem; font-weight: 650; color: var(--vermilion-deep); }
.sf-terms .sf-agree-err.is-on { visibility: visible; }
.sf-terms .sf-actions { margin-top: 10px; }
.sf-terms .sf-ts:not(:empty) { margin-top: 14px; }
.sf-terms .sf-terms-status { margin-top: 4px; font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.sf-terms .sf-terms-status:empty { display: none; }
.sf-terms .sf-terms-fail { margin-top: 6px; padding: 10px 12px; font-size: 0.9rem; color: var(--ink); border: var(--line) solid var(--vermilion-deep); border-radius: var(--r-sm); }
.sf-terms .sf-terms-fail[hidden] { display: none; }
.sf-terms .btn[aria-disabled="true"] { opacity: 0.6; cursor: progress; }
/* On a short screen the terms scroll, while the tick box and buttons stay in view at the bottom of the box. */
.sf-terms form { position: sticky; bottom: calc(-1 * clamp(20px, 4vw, 32px)); margin: 0 calc(-1 * clamp(20px, 4vw, 32px)) calc(-1 * clamp(20px, 4vw, 32px)); padding: 4px clamp(20px, 4vw, 32px) clamp(20px, 4vw, 32px); background: var(--card); border-top: 1px solid var(--rule); }
.sf-terms .sf-actions .btn { margin-top: 0; }

/* ---------- The five-question check, now the second stop on the page ---------- */
.sf-second { margin-top: clamp(56px, 8vw, 112px); scroll-margin-top: calc(var(--hdr-h) + 24px); }
.sf-second .doc-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); font-weight: 650; letter-spacing: -0.035em; line-height: 1.04; }
.sf-more { margin-top: 28px; }
.sf-more p { margin-top: 0; }
.sf-alt { margin-top: 0; }
.sf-alt a { display: inline-block; padding: 10px 0; font-weight: 600; }
.sf-skip { margin-top: 4px; }
.sf-skip a { display: inline-block; padding: 10px 0; font-weight: 600; }

@media (min-width: 761px) {
  .sf-line { font-size: 1.625rem; }
}
/* Phones and tablets: one frame, not four. No side line, no card frame, no divider lines. */
@media (max-width: 760px) {
  .doc-body { border-left: 0; padding-left: 0; }
  .sf-card { padding: 0; border: 0; border-radius: 0; background: none; }
  .sf-line + .sf-line, .sf-size { border-top: 0; padding-top: 0; }
  .sf-size { margin-top: 18px; }
  .sf-deck { margin-top: 12px; padding: 14px; }
  .sf-deck .sf-q { margin-top: 12px; }
  .sf-deck .hc-opts { gap: 6px; }
  .sf-deck .hc-opt { padding: 10px 14px; gap: 12px; }
  .sf-deck-nav { margin-top: 14px; }
}
@media (max-width: 520px) {
  .sf-go .btn, .sf-actions .btn { width: 100%; }
  .sf-terms { width: calc(100% - 16px); max-height: calc(100dvh - 16px); }
}
@media print {
  .sf-go { display: none; }
}
