/* ---------- intake form ---------- */
.qwrap {
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: clamp(24px, 3.4vw, 44px);
}

/* progress rail */
.qrail { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.qrail button {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: ui-monospace, "SF Mono", "Menlo", "Cascadia Mono", monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.55;
  transition: opacity 0.15s ease, color 0.15s ease;
}
.qrail button::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--rule);
  transition: background 0.25s ease, width 0.25s ease;
}
.qrail button:hover { opacity: 0.9; }
.qrail button[aria-current="step"] { opacity: 1; color: var(--ink); }
.qrail button[aria-current="step"]::before { background: rgb(var(--glow-blue)); width: 34px; }
.qrail button[data-done="1"] { opacity: 0.9; }
.qrail button[data-done="1"]::before { background: rgba(var(--live), 0.75); }
.qrail button:focus-visible { outline: 2px solid var(--pill); outline-offset: 4px; border-radius: 4px; }

.qmeter { display: flex; align-items: center; gap: 14px; margin-bottom: 30px; }
.qbar { position: relative; flex: 1; height: 3px; border-radius: 3px; background: var(--rule); overflow: hidden; }
.qbar i { position: absolute; inset: 0 auto 0 0; width: 0; background: rgb(var(--glow-blue)); transition: width 0.35s cubic-bezier(0.2, 0.6, 0.2, 1); }
.qmeter .mono { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* steps. section{} in site.css carries page padding we do not want inside the card */
.qstep { display: none; padding: 0; }
.qstep.is-active { display: block; animation: qfade 0.35s cubic-bezier(0.2, 0.6, 0.2, 1); }
@keyframes qfade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .qstep.is-active { animation: none; } }

.qstep > header {
  position: static;
  display: block;
  margin: 0 0 26px;
  padding: 0 0 18px;
  background: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  box-shadow: none;
}
.qstep > header .mono { display: block; color: rgb(var(--glow-blue)); margin-bottom: 8px; }
.qstep > header h2 { font-size: 1.5rem; }
.qstep > header p { margin: 8px 0 0; color: var(--muted); font-size: 0.9063rem; max-width: 62ch; }

fieldset { border: 0; margin: 0; padding: 0; }
legend { padding: 0; }

.qgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px clamp(20px, 3vw, 36px); }
.field { min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field > label,
.field > .qlabel {
  display: block;
  margin-bottom: 9px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
}
.field .qnum {
  font-family: ui-monospace, "SF Mono", "Menlo", "Cascadia Mono", monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  color: rgb(var(--glow-blue));
  margin-right: 9px;
}
.field .hint { display: block; margin-top: 8px; font-size: 0.8125rem; color: var(--muted); }
.req { color: rgb(var(--glow-blue)); margin-left: 3px; }

.ctrl {
  width: 100%;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 13px 15px;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--ink);
  line-height: 1.45;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.ctrl::placeholder { color: var(--muted); opacity: 0.7; }
.ctrl:hover { border-color: #BCCFE8; }
.ctrl:focus {
  outline: 0;
  background: #fff;
  border-color: rgb(var(--glow-blue));
  box-shadow: 0 0 0 4px rgba(var(--glow-blue), 0.18);
}
textarea.ctrl { min-height: 92px; resize: vertical; }
select.ctrl {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%235D6B85' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  cursor: pointer;
}
.ctrl.is-bad { border-color: #C0392B; box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.12); }
.err-msg { display: none; margin-top: 8px; font-size: 0.8125rem; color: #A93226; }
.field.is-bad .err-msg { display: block; }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.unit { position: relative; }
.unit .ctrl { padding-right: 52px; }
.unit span {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-family: ui-monospace, "SF Mono", "Menlo", monospace;
  font-size: 0.75rem;
  color: var(--muted);
  pointer-events: none;
}

/* choice chips */
.choices { display: flex; flex-wrap: wrap; gap: 9px; }
.opt { position: relative; display: inline-flex; cursor: pointer; }
.opt input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.opt span {
  display: inline-block;
  border: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.875rem;
  color: var(--muted);
  transition: all 0.15s ease;
}
.opt:hover span { border-color: #BCCFE8; color: var(--ink); }
.opt input:checked + span {
  background: var(--pill);
  border-color: var(--pill);
  color: var(--pill-ink);
  font-weight: 500;
}
.opt input:focus-visible + span { outline: 2px solid var(--pill); outline-offset: 3px; }
.choices.stack { flex-direction: column; align-items: flex-start; }

/* conditional blocks */
.cond { display: none; margin-top: 18px; padding-left: 18px; border-left: 2px solid rgb(var(--glow-blue)); }
.cond.is-on { display: block; animation: qfade 0.3s cubic-bezier(0.2, 0.6, 0.2, 1); }
@media (prefers-reduced-motion: reduce) { .cond.is-on { animation: none; } }

.subhead {
  display: block;
  margin: 38px 0 20px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-family: ui-monospace, "SF Mono", "Menlo", monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgb(var(--glow-blue));
}

/* liquid cooling checklist */
.lc { margin-top: 8px; border-top: 1px solid var(--rule); }
.lc-row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 5fr);
  gap: 16px clamp(14px, 2.4vw, 30px);
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}
.lc-row .lc-item { font-size: 0.9063rem; }
.lc-row .lc-spec {
  font-family: ui-monospace, "SF Mono", "Menlo", monospace;
  font-size: 0.8125rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.lc-head { padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.lc-head span { font-family: ui-monospace, "SF Mono", "Menlo", monospace; font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.lc .choices { gap: 7px; }
.lc .opt span { padding: 7px 14px; font-size: 0.8125rem; }

details.annex { margin-top: 26px; border: 1px solid var(--rule); border-radius: 14px; padding: 16px 20px; background: rgba(255, 255, 255, 0.45); }
details.annex summary { cursor: pointer; font-size: 0.9063rem; font-weight: 500; }
details.annex summary::marker { color: rgb(var(--glow-blue)); }
details.annex .row { padding: 10px 0; }
details.annex .row:first-of-type { padding-top: 18px; }

/* attachments */
.drop {
  border: 1px dashed var(--rule);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.45);
  padding: 26px 24px;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.drop.is-over { border-color: rgb(var(--glow-blue)); background: rgba(var(--glow-blue), 0.07); }
.drop input[type="file"] { position: absolute; left: -9999px; }
.no-js .drop input[type="file"] { position: static; left: auto; }
.drop-line { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin: 0 0 10px; }
.drop-line span { font-size: 0.9063rem; color: var(--muted); }
.drop .hint { display: block; margin: 0 auto; max-width: 56ch; }
button.ghost.small { padding: 10px 20px; font-size: 0.875rem; color: var(--ink); border-color: var(--rule); background: rgba(255, 255, 255, 0.7); }

.filelist { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.filelist li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  padding: 11px 14px;
}
.filelist svg { display: block; color: rgb(var(--glow-blue)); }
.filelist .fname { font-size: 0.875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filelist .fsize {
  font-family: ui-monospace, "SF Mono", "Menlo", monospace;
  font-size: 0.75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.filelist button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 4px;
  cursor: pointer;
  color: var(--muted);
  line-height: 0;
  border-radius: 6px;
  transition: color 0.15s ease;
}
.filelist button:hover { color: #A93226; }
.filelist button:focus-visible { outline: 2px solid var(--pill); outline-offset: 2px; }
.file-note { margin: 10px 0 0; }
.file-note.bad { color: #A93226; }

/* review */
.qreview { margin: 0; }
.qreview h3 {
  margin: 30px 0 12px;
  font-family: ui-monospace, "SF Mono", "Menlo", monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgb(var(--glow-blue));
  font-weight: 400;
}
.qreview h3:first-child { margin-top: 0; }
.qreview .row dd.empty { color: var(--muted); opacity: 0.6; font-style: italic; }
.qreview p.hint { font-size: 0.8125rem; color: var(--muted); }

/* nav */
.qnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 38px;
  padding-top: 26px;
  border-top: 1px solid var(--rule);
}
.qnav .spacer { flex: 1; }
button.pill { appearance: none; border: 0; font-family: inherit; cursor: pointer; }
button.pill[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
button.ghost {
  appearance: none;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 14px 28px;
  font-family: inherit;
  font-size: 0.9063rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
button.ghost:hover { color: var(--ink); border-color: rgb(var(--glow-blue)); }
.qnav .savenote { font-size: 0.8125rem; color: var(--muted); }

/* form-level status */
.qstatus {
  display: none;
  margin-top: 22px;
  padding: 16px 20px;
  border-radius: 14px;
  font-size: 0.9063rem;
  border: 1px solid;
}
.qstatus.is-on { display: block; }
.qstatus.bad { background: rgba(192, 57, 43, 0.07); border-color: rgba(192, 57, 43, 0.35); color: #8E2A20; }

/* success */
.qdone { display: none; text-align: center; padding: clamp(30px, 6vh, 60px) 0; }
.qdone.is-on { display: block; animation: qfade 0.5s cubic-bezier(0.2, 0.6, 0.2, 1); }
.qdone .tick {
  width: 58px;
  height: 58px;
  margin: 0 auto 26px;
  border-radius: 50%;
  background: rgba(var(--live), 0.12);
  border: 1px solid rgba(var(--live), 0.4);
  display: grid;
  place-items: center;
  color: rgb(var(--live));
}
.qdone h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); letter-spacing: -0.02em; }
.qdone p { margin: 14px auto 0; color: var(--muted); max-width: 48ch; font-size: 0.9375rem; }
.qdone .ref { margin-top: 22px; }

/* honeypot */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* no-js */
.nojs-note { display: none; }
.no-js .nojs-note { display: block; margin-bottom: 26px; }
.no-js .qstep { display: block; }
.no-js .qrail, .no-js .qmeter, .no-js #qBack, .no-js #qNext, .no-js #qStepReview { display: none; }
.no-js .cond { display: block; }

@media (max-width: 860px) {
  .qgrid { grid-template-columns: 1fr; }
  .trio { grid-template-columns: 1fr; }
  .lc-row { grid-template-columns: 1fr; gap: 8px; padding: 18px 0; }
  .lc-head { display: none; }
  .qnav { flex-wrap: wrap; }
  .qnav .savenote { order: 3; width: 100%; }
  /* keep the section names, scroll them sideways like the site nav does */
  .qrail {
    flex-wrap: nowrap;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 6px;
    margin-bottom: 4px;
  }
  .qrail::-webkit-scrollbar { display: none; }
  .qrail button { flex: none; white-space: nowrap; }
  .qrail button::before { width: 12px; }
  .qrail button[aria-current="step"]::before { width: 18px; }
}
