/* ============================================================
   TNT — components.css
   Test cards · instrument spec cards · live-quote console
   ============================================================ */

/* ---------- WHAT WE TEST ---------- */
.test-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.test-card {
  position: relative;
  padding: 30px 22px 24px;
  background: linear-gradient(180deg, rgba(30, 30, 30, 0.28), rgba(16, 16, 16, 0.55));
  border: 1px solid var(--line-soft);
  border-top: 1px solid rgba(192, 198, 206, 0.22);
  min-height: 218px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.45s var(--ease-out),
              transform 0.45s var(--ease-out),
              box-shadow 0.45s var(--ease-out);
}
.test-card::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: 38px; height: 38px;
  border-top: 1px solid var(--gold);
  border-left: 1px solid var(--gold);
  opacity: 0;
  transition: opacity 0.45s var(--ease-out);
}
.test-card:hover {
  transform: translateY(-5px);
  border-color: var(--gold-line);
  box-shadow: 0 18px 44px rgba(3, 7, 15, 0.55), 0 0 30px rgba(212, 175, 55, 0.07);
}
.test-card:hover::before { opacity: 1; }
.test-card:hover .tc-icon { color: var(--gold); }

.tc-idx {
  position: absolute;
  top: 14px; right: 16px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.18em;
  color: var(--silver-dim);
}
.tc-icon {
  width: 34px; height: 34px;
  color: var(--silver);
  margin-bottom: 20px;
  transition: color 0.45s var(--ease-out), filter 0.45s;
}
.test-card:hover .tc-icon { filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.4)); }
.test-card h3 {
  font-size: 23px;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  line-height: 1.35;
}
.test-card p {
  font-size: 19.5px;
  color: var(--silver);
  line-height: 1.5;
}
.tc-tag {
  margin-top: auto;
  padding-top: 18px;
  font-family: var(--font-mono);
  font-size: 15.5px;
  letter-spacing: 0.24em;
  color: var(--gold-2);
}

/* ---------- THE SUITE ---------- */
.suite-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.spec-card {
  background: linear-gradient(180deg, #0E1A31, var(--panel));
  border: 1px solid var(--line-soft);
  padding: 20px 20px 0;
  display: flex;
  flex-direction: column;
  transition: border-color 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out);
}
.spec-card:hover {
  border-color: var(--gold-line);
  box-shadow: 0 0 34px rgba(212, 175, 55, 0.08), inset 0 0 34px rgba(212, 175, 55, 0.03);
}
.spec-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  margin-bottom: 6px;
}
.spec-unit { color: var(--silver-dim); }
.spec-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--gold-2);
}
.spec-status i {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}
.spec-trace {
  width: 100%; height: 30px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}
.spec-trace polyline {
  fill: none;
  stroke: var(--gold-2);
  stroke-width: 1;
  opacity: 0.85;
}
.spec-card h3 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.spec-type {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.26em;
  color: var(--gold-2);
  margin-top: 6px;
}
.spec-role {
  font-size: 15px;
  color: var(--silver);
  margin: 12px 0 18px;
}
.spec-rows {
  margin-top: auto;
  border-top: 1px solid var(--line-soft);
}
.spec-rows > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 2px;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
}
.spec-rows dt { color: var(--silver-dim); }
.spec-rows dd { color: var(--white); text-align: right; }

/* ---------- LIVE QUOTE CONSOLE ---------- */
.quote-sec { padding-bottom: 0; }

.console {
  --ink: #141414;
  --ink-dim: #5d6880;
  --line-l: #d3dae5;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-top: 1px solid var(--gold-line);
  background:
    radial-gradient(120% 90% at 50% -20%, rgba(212, 175, 55, 0.08), transparent 55%),
    linear-gradient(180deg, #f7f9fc, #e6eaf1);
  box-shadow: 0 34px 90px rgba(3, 7, 15, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.console-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--gold-line);
  background: linear-gradient(180deg, #0d0d0d, var(--navy-900));
  font-family: var(--font-body);
}
.cb-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--white);
}
.cb-title em { font-style: normal; color: var(--gold); }
.cb-meta {
  font-size: 14px;
  letter-spacing: 0.14em;
  color: var(--silver-dim);
}

.console-body {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
}

/* controls column */
.qc { padding: 22px 24px 24px; }
.qc-group { margin-bottom: 20px; }
.qc-group:last-child { margin-bottom: 0; }
.qc-row {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
  align-items: start;
}
.qc-row .qc-group { margin-bottom: 0; }

.qc-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0.16em;
  color: var(--ink-dim);
  margin-bottom: 10px;
}
.qc-label span { color: var(--gold-2); font-size: 9px; }
.qc-qty {
  margin-left: auto;
  font-size: 18px;
  color: var(--gold-2);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

/* test-type option rows */
.qc-tests {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.test-opt {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line-l);
  background: #ffffff;
  text-align: left;
  font-family: var(--font-body);
  transition: border-color 0.3s, background 0.3s, box-shadow 0.3s;
}
.test-opt:hover { border-color: rgba(184, 143, 24, 0.55); }
.test-opt .led {
  width: 6px; height: 6px;
  border: 1px solid var(--ink-dim);
  transform: rotate(45deg);
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.test-opt .to-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ink);
}
.test-opt .to-name small {
  display: block;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
  margin-top: 1px;
}
.test-opt .to-arrow {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink-dim);
}
.test-opt.is-on {
  border-color: var(--gold-2);
  background: rgba(212, 175, 55, 0.09);
  box-shadow: inset 0 0 22px rgba(212, 175, 55, 0.08);
}
.test-opt.is-on .led {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 9px rgba(212, 175, 55, 0.75);
}
.test-opt.is-on .to-name { color: var(--ink); }
.test-opt.is-on .to-arrow { color: var(--gold-2); }

/* slider */
.qc-slider input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  background: transparent;
  cursor: pointer;
}
.qc-slider input[type="range"]::-webkit-slider-runnable-track {
  height: 2px;
  background: linear-gradient(90deg, var(--gold-2) 0%, var(--gold-2) var(--fill, 0%), var(--line-l) var(--fill, 0%));
}
.qc-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px; height: 15px;
  margin-top: -6.5px;
  background: var(--navy-900);
  border: 1.5px solid var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.45);
}
.qc-slider input[type="range"]::-moz-range-track {
  height: 2px;
  background: var(--line-l);
}
.qc-slider input[type="range"]::-moz-range-progress {
  height: 2px;
  background: var(--gold-2);
}
.qc-slider input[type="range"]::-moz-range-thumb {
  width: 13px; height: 13px;
  border-radius: 0;
  background: var(--navy-900);
  border: 1.5px solid var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.45);
}
.qc-scale {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
  padding: 4px 2px 0;
}
/* turnaround segmented control */
.qc-tat {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line-l);
}
.tat-btn {
  padding: 10px 8px;
  background: #ffffff;
  border-right: 1px solid var(--line-l);
  transition: background 0.3s, box-shadow 0.3s;
}
.tat-btn:last-child { border-right: 0; }
.tat-btn b {
  display: block;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
}
.tat-btn em {
  display: block;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
  margin-top: 3px;
}
.tat-btn.is-on {
  background: rgba(212, 175, 55, 0.1);
  box-shadow: inset 0 -2px 0 var(--gold-2);
}
.tat-btn.is-on b { color: var(--gold-2); }
.tat-btn.is-on em { color: var(--ink); }

/* readout column */
.readout {
  border-left: 1px solid var(--line-l);
  padding: 22px 24px 24px;
  display: flex;
}
.ro-screen {
  position: relative;
  flex: 1;
  background:
    repeating-linear-gradient(0deg, rgba(192, 198, 206, 0.025) 0 1px, transparent 1px 4px),
    radial-gradient(120% 120% at 50% 0%, #141414, #060606 75%);
  border: 1px solid var(--line-soft);
  box-shadow: inset 0 0 60px rgba(3, 7, 15, 0.65);
  padding: 18px 20px 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.ro-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(212, 175, 55, 0.09) 50%, transparent 70%);
  transform: translateX(-110%);
  pointer-events: none;
}
.ro-screen.computing .ro-shimmer {
  animation: sweep 0.55s var(--ease-out);
}
@keyframes sweep {
  from { transform: translateX(-110%); }
  to   { transform: translateX(110%); }
}
.ro-rows { display: flex; flex-direction: column; flex: 1; }
.ro-row {
  display: flex;
  flex: 1;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  border-bottom: 1px dashed rgba(192, 198, 206, 0.3);
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0.08em;
}
.ro-row span {
  color: var(--silver-dim);
  font-size: 12px;
  letter-spacing: 0.16em;
  flex-shrink: 0;
}
.ro-row b {
  font-weight: 500;
  color: var(--white);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.ro-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed rgba(212, 175, 55, 0.55);
  font-family: var(--font-body);
}
.ro-total span {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--silver-dim);
}
.ro-total b {
  font-size: clamp(1.7rem, 2.4vw, 2.2rem);
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 34px rgba(212, 175, 55, 0.35);
}
.ro-note {
  margin-top: 10px;
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--silver-dim);
  opacity: 0.75;
}

/* request form */
.quote-form {
  border-top: 1px solid var(--line-l);
  padding: 18px 24px 22px;
}
.qf-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.qf-notes { grid-column: 1 / -1; }
.qf-field { display: flex; flex-direction: column; gap: 6px; }
.qf-field span {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--ink-dim);
}
.qf-field span i { font-style: normal; font-weight: 500; opacity: 0.6; letter-spacing: 0.08em; }
.qf-field input {
  background: #ffffff;
  border: 1px solid var(--line-l);
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  caret-color: var(--gold-2);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.qf-field textarea {
  background: #ffffff;
  border: 1px solid var(--line-l);
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink);
  caret-color: var(--gold-2);
  min-height: 60px;
  resize: vertical;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.qf-field input:focus,
.qf-field textarea:focus {
  outline: none;
  border-color: var(--gold-2);
  box-shadow: 0 0 0 1px var(--gold-2), 0 0 22px rgba(212, 175, 55, 0.12);
}
.qf-field input.err {
  border-color: var(--gold-2);
  border-style: dashed;
  background: rgba(212, 175, 55, 0.08);
}
.qf-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.qf-fine {
  font-family: var(--font-body);
  font-size: 13.5px;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
}
.qf-error {
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--gold-2);
  border: 1px dashed var(--gold-2);
  padding: 10px 14px;
  flex-basis: 100%;
}
.console .btn-ghost {
  color: var(--ink-dim);
  border-color: var(--line-l);
  background: #ffffff;
}
.console .btn-ghost:hover { color: var(--ink); }
#submitBtn.working { opacity: 0.65; pointer-events: none; }
#submitBtn.working span::after {
  content: "…";
  animation: dots 1s steps(3) infinite;
}
@keyframes dots {
  0% { content: ""; } 33% { content: "·"; } 66% { content: "··"; } 100% { content: "···"; }
}

/* ---------- CTA band ---------- */
.inst-cta {
  margin-top: clamp(70px, 8vw, 110px);
  padding: clamp(50px, 6vw, 80px) var(--gutter);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background:
    radial-gradient(70% 160% at 50% -60%, rgba(212, 175, 55, 0.07), transparent 60%),
    var(--navy-800);
  text-align: center;
}
.inst-cta h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.55rem);
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.inst-cta p {
  font-family: var(--font-mono);
  font-size: 17px;
  letter-spacing: 0.24em;
  color: var(--silver-dim);
  margin-bottom: 34px;
}
.inst-cta .btn { padding: 18px 38px; }

/* confirmation terminal */
.quote-done[hidden] { display: none; }
.quote-done {
  border-top: 1px solid var(--line-l);
  padding: 34px 30px 40px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.qd-term { font-family: var(--font-body); }
.qd-line {
  font-size: 17.5px;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  padding: 4px 0;
}
.qd-line b { color: var(--ink); font-weight: 500; }
.qd-gold {
  color: var(--gold-2);
  margin-top: 10px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1180px) {
  .test-grid { grid-template-columns: repeat(6, 1fr); }
  .test-card { grid-column: span 2; }
  .test-card:nth-child(4), .test-card:nth-child(5),
  .test-card:nth-child(9), .test-card:nth-child(10) { grid-column: span 3; }
  .suite-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px) {
  .console-body { grid-template-columns: 1fr; }
  .readout { border-left: 0; border-top: 1px solid var(--line-l); }
  .qf-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .test-grid { grid-template-columns: 1fr 1fr; }
  .test-grid .test-card { grid-column: auto; }
  .suite-grid { grid-template-columns: 1fr; }
  .test-card { padding: 18px 15px 14px; min-height: 0; }
  .tc-icon { width: 24px; height: 24px; margin-bottom: 14px; }
  .tc-idx { font-size: 11px; top: 12px; right: 12px; }
  .test-card h3 { font-size: 15px; margin-bottom: 8px; }
  .test-card p { font-size: 13.5px; margin-bottom: 18px; }
  .tc-tag { font-size: 11.5px; padding-top: 12px; }
  .cb-title { font-size: 13.5px; }
  .qc, .readout, .quote-form, .quote-done { padding-left: 18px; padding-right: 18px; }
  .qc { padding-top: 20px; padding-bottom: 22px; }
  .qc-group { margin-bottom: 18px; }
  .qc-row { grid-template-columns: 1fr; gap: 18px; }
  .qc-row .qc-group { margin-bottom: 0; }
  .qc-tests { grid-template-columns: 1fr; }
  .qc-label { font-size: 12.5px; margin-bottom: 10px; }
  .qc-qty { font-size: 16px; }
  .test-opt { padding: 10px 13px; gap: 11px; }
  .test-opt .to-name { font-size: 14px; }
  .test-opt .to-name small { font-size: 11px; }
  .test-opt .to-arrow { font-size: 14px; }
  .qc-scale { font-size: 11px; }
  .tat-btn { padding: 10px 8px; }
  .tat-btn b { font-size: 13px; }
  .tat-btn em { font-size: 11px; }
  .readout { padding-top: 20px; padding-bottom: 22px; }
  .ro-screen { padding: 16px 16px 12px; }
  .ro-row { font-size: 13.5px; }
  .ro-row span { font-size: 11px; }
  .ro-total { padding-top: 12px; }
  .ro-total span { font-size: 11.5px; }
  .ro-total b { font-size: 1.7rem; }
  .ro-note { font-size: 10.5px; margin-top: 8px; }
  .quote-form { padding-top: 18px; padding-bottom: 22px; }
  .qf-field span { font-size: 11px; }
  .qf-field input { font-size: 14px; padding: 10px 12px; }
  .qf-field textarea { font-size: 14px; min-height: 76px; padding: 10px 12px; }
  .qf-fine { font-size: 11px; }
  .qf-error { font-size: 11px; }
  .qd-line { font-size: 14px; }
  .quote-done { padding-top: 22px; padding-bottom: 26px; }
  .console-bar { padding: 12px 18px; }
  .cb-meta { display: none; }
  .inst-cta { padding: 40px var(--gutter); }
  .inst-cta h2 { font-size: 1.3rem; margin-bottom: 10px; }
  .inst-cta p { font-size: 11px; letter-spacing: 0.16em; margin-bottom: 24px; }
  .inst-cta .btn { padding: 14px 24px; }
}
@media (max-width: 460px) {
  .qf-grid { grid-template-columns: 1fr; }
  .qf-actions .btn { flex: 1 1 100%; }
}
