/* BLADES — the support form on support.html (js/support.js). Builds on site.css and doc.css. */

.sf, .sf-done {
  margin-top: 32px; padding: clamp(22px, 4vw, 36px); border-radius: 24px; background: var(--white);
  box-shadow: inset 0 0 0 1px var(--line), 0 18px 50px rgba(10, 22, 40, 0.07);
}
.sf[hidden], .sf-done[hidden], .sf [hidden] { display: none !important; }
.sf-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 20px; }
.doc-body .sf-title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 2.6vw, 32px); line-height: 1.15; color: var(--ink); }
.sf-note { margin: 0; font-size: 14px; color: var(--muted); }
.doc-body .sf-note a { font-weight: 600; }

/* Each step: a number, a question, then its answers */
.sf-step { margin: 0; padding: 26px 0 0; border: 0; min-width: 0; }
.sf-step + .sf-step { margin-top: 26px; border-top: 1px solid var(--line); }
.sf-step legend { float: left; width: 100%; display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 0;
  font-size: 18px; font-weight: 650; line-height: 1.3; color: var(--ink); }
.sf-step > :not(legend) { clear: both; }
.sf-n { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--ink); color: var(--white); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sf-step { animation: sfIn 0.35s ease both; }
@keyframes sfIn { from { opacity: 0; transform: translateY(6px); } }

/* 1 — what it is about: three cards */
.sf-types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sf-type { position: relative; display: grid; align-content: start; gap: 6px; padding: 18px 16px 16px; border-radius: 16px; cursor: pointer;
  background: var(--light); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow 0.2s ease, background-color 0.2s ease; }
.sf-type:hover { box-shadow: inset 0 0 0 1px rgba(7, 134, 163, 0.45); }
.sf-type input { position: absolute; opacity: 0; pointer-events: none; }
.sf-type b { font-size: 16px; font-weight: 650; line-height: 1.3; color: var(--ink); }
.sf-type > span:last-child { font-size: 14px; line-height: 1.45; color: var(--muted); }
.sf-ico { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 6px; border-radius: 11px; background: var(--white); color: var(--cyan-deep);
  box-shadow: inset 0 0 0 1px var(--line); transition: background-color 0.2s ease, color 0.2s ease; }
.sf-ico svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sf-ico .dot { fill: currentColor; stroke: none; }
.sf-type.on, .sf-type:has(input:checked) { background: #eaf8fb; box-shadow: inset 0 0 0 2px var(--cyan-deep); }
.sf-type.on .sf-ico, .sf-type:has(input:checked) .sf-ico { background: var(--cyan-deep); color: var(--white); box-shadow: none; }
.sf-type:has(input:focus-visible) { outline: 2px solid var(--cyan-deep); outline-offset: 2px; }

/* 2 — where in Blades: chips */
.sf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sf-chip { position: relative; cursor: pointer; }
.sf-chip input { position: absolute; opacity: 0; pointer-events: none; }
.sf-chip span { display: block; padding: 9px 15px; border-radius: 999px; font-size: 15px; font-weight: 550; line-height: 1.2; color: var(--ink);
  background: var(--white); box-shadow: inset 0 0 0 1px rgba(10, 22, 40, 0.16); transition: background-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease; }
.sf-chip:hover span { box-shadow: inset 0 0 0 1px var(--cyan-deep); }
.sf-chip input:checked + span { background: var(--ink); color: var(--white); box-shadow: none; }
.sf-chip input:focus-visible + span { outline: 2px solid var(--cyan-deep); outline-offset: 2px; }
.sf-hint { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--light); font-size: 15px; line-height: 1.55; color: #26364c; }

/* 3 and 4 — the fields */
.sf-field { display: grid; gap: 7px; min-width: 0; }
.sf-field + .sf-field, .sf-field + .sf-row, .sf-row + .sf-field, .sf-row + .sf-more, .sf-field + .sf-more, .sf-more + .sf-answers, .sf-field + .sf-answers { margin-top: 18px; }
.sf-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.sf-row > .sf-field + .sf-field { margin-top: 0; }   /* side by side: the row's gap spaces them */
.sf-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sf label, .sf-label { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--ink); }
.sf label i, .sf-label i { font-style: normal; font-weight: 450; color: var(--muted); }
.sf input[type="text"], .sf input[type="email"], .sf textarea {
  width: 100%; padding: 12px 14px; border: 0; border-radius: 12px; background: var(--white);
  box-shadow: inset 0 0 0 1px rgba(10, 22, 40, 0.18); font: 400 16px/1.5 var(--sans); color: var(--ink);
  transition: box-shadow 0.2s ease;
}
.sf textarea { resize: vertical; min-height: 120px; }
.sf input::placeholder, .sf textarea::placeholder { color: #8a97a8; }
.sf input:focus, .sf textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--cyan-deep), 0 0 0 4px rgba(7, 134, 163, 0.12); }
.sf [aria-invalid="true"] { box-shadow: inset 0 0 0 2px #c2324b !important; }
.sf-tip { margin: 0; font-size: 13px; line-height: 1.4; color: var(--muted); }
.sf-err { margin: 6px 0 0; font-size: 14px; font-weight: 550; color: #c2324b; }
.sf-field .sf-err { margin: 0; }

/* A choice in a row of three (how often, how much it matters) */
.sf-seg { display: flex; padding: 3px; border-radius: 12px; background: var(--light); box-shadow: inset 0 0 0 1px var(--line); }
.sf-seg label { flex: 1; position: relative; cursor: pointer; }
.sf-seg input { position: absolute; opacity: 0; pointer-events: none; }
.sf-seg span { display: grid; place-items: center; min-height: 40px; padding: 6px 8px; border-radius: 9px; text-align: center;
  font-size: 14px; font-weight: 550; line-height: 1.2; color: var(--muted); transition: background-color 0.2s ease, color 0.2s ease; }
.sf-seg input:checked + span { background: var(--white); color: var(--ink); box-shadow: 0 1px 3px rgba(10, 22, 40, 0.14), inset 0 0 0 1px var(--line); }
.sf-seg input:focus-visible + span { outline: 2px solid var(--cyan-deep); outline-offset: 1px; }

/* Steps and device, folded away until wanted */
.sf-more { border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.sf-more summary { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; padding: 14px 16px; cursor: pointer; list-style: none;
  font-size: 15px; font-weight: 600; color: var(--ink); }
.sf-more summary::-webkit-details-marker { display: none; }
.sf-more summary::before { content: "+"; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--light); color: var(--cyan-deep); font-weight: 700; line-height: 1; transition: transform 0.2s ease; }
.sf-more[open] summary::before { transform: rotate(45deg); }
.sf-more summary span { font-weight: 450; font-size: 14px; color: var(--muted); }
.sf-more > .sf-field, .sf-more > .sf-row { padding: 0 16px; }
.sf-more > :last-child { padding-bottom: 16px; }

/* Answers from this page that fit what is being written */
.sf-answers { padding: 16px 18px; border-radius: 16px; background: #f1f9fb; box-shadow: inset 0 0 0 1px rgba(7, 134, 163, 0.22); }
.doc-body .sf-answers-h { margin: 0 0 6px; font-size: 14px; font-weight: 650; letter-spacing: 0.01em; color: var(--cyan-deep); }
.sf-answer + .sf-answer { border-top: 1px solid rgba(7, 134, 163, 0.18); }
.sf-answer summary { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; cursor: pointer; list-style: none;
  font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--ink); }
.sf-answer summary::-webkit-details-marker { display: none; }
.sf-answer summary::after { content: ""; flex: none; width: 9px; height: 9px; margin-top: 5px; border-right: 2px solid var(--cyan-deep); border-bottom: 2px solid var(--cyan-deep);
  transform: rotate(45deg); transition: transform 0.2s ease; }
.sf-answer[open] summary::after { transform: rotate(-135deg); margin-top: 9px; }
.sf-answer-a { padding: 0 0 12px; font-size: 15px; line-height: 1.6; color: #26364c; }
.sf-answer-a p { margin: 0; }

/* Sending */
.sf-send { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 22px; }
.sf-btn { flex: none; border: 0; cursor: pointer; font-family: var(--sans); }
.sf-btn:disabled { opacity: 0.6; cursor: progress; }
.doc-body .sf-fine { flex: 1; min-width: 220px; margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.sf-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.doc-body .sf-status { margin: 16px 0 0; padding: 14px 16px; border-radius: 12px; font-size: 15px; line-height: 1.55; }
.sf-status.is-warn { background: #fff6e5; color: #5b4300; box-shadow: inset 0 0 0 1px rgba(167, 106, 0, 0.25); }
.sf-fb { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.sf-fb a, .sf-fb button { padding: 9px 14px; border: 0; border-radius: 999px; cursor: pointer; font: 600 14px var(--sans); text-decoration: none;
  background: var(--ink); color: var(--white); }
.doc-body .sf-fb a { color: var(--white); }
.sf-fb button { background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(10, 22, 40, 0.2); }

/* Sent */
.sf-done { text-align: center; outline: none; }
.sf-done-ico { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #e3f6ee; color: #18865c; }
.sf-done-ico svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.doc-body .sf-done h2 { margin: 14px 0 0; font-family: var(--serif); font-weight: 400; font-size: 30px; }
.doc-body .sf-done p { max-width: 34em; margin: 10px auto 0; color: #26364c; }
.sf-ref { font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; letter-spacing: 0.04em; color: var(--ink); }
.sf-again { margin-top: 20px; padding: 10px 18px; border: 0; border-radius: 999px; cursor: pointer; font: 600 15px var(--sans);
  background: var(--light); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.sf-again:hover { box-shadow: inset 0 0 0 1px var(--cyan-deep); }

@media (max-width: 720px) {
  .sf-types { grid-template-columns: 1fr; gap: 10px; }
  .sf-type { grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; row-gap: 2px; padding: 14px; }
  .sf-type .sf-ico { grid-row: 1 / 3; margin: 0; align-self: center; }
  .sf-row, .sf-row-3 { grid-template-columns: 1fr; }
  .sf-chip span { padding: 8px 13px; font-size: 14.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .sf-step { animation: none; }
}
