/* /spy-spx-converter — page layer. Tokens only (no colour literals); geometry from base.css.
   Mobile first: one column, the tool first; the copy sits beside it from 900px up. */

.cv-layout{display:grid;grid-template-columns:1fr;gap:28px;align-items:start}
.cv-card{padding:26px 22px;align-items:stretch;height:auto}
/* .card--u p out-ranks a single class, so the card's own text rules carry the card selector */
.cv-card .cv-eyebrow{font-size:10.5px;letter-spacing:.18em;text-transform:uppercase;color:var(--text-muted);margin:0 0 14px}
.cv-title{font-size:24px;font-weight:700;letter-spacing:-.02em;line-height:1.15;margin:0 0 8px}
.cv-card .cv-intro{font-size:15px;line-height:1.6;color:var(--text-secondary);margin:0 0 22px}

/* the linked pair: two fields joined by the ratio glyph */
.cv-pair{display:grid;grid-template-columns:1fr;gap:12px;align-items:end}
.cv-x{display:none;font-size:12px;letter-spacing:.08em;color:var(--text-muted);text-align:center;padding:0 0 14px}
.cv-field{display:grid;gap:8px;min-width:0}
.cv-field label{font-size:13px;font-weight:600;color:var(--text)}
.cv-field input,.cv-field textarea{
  width:100%;min-height:48px;border-radius:12px;padding:0 14px;font-size:16px;font-weight:500;
  background:var(--input-bg);border:1px solid var(--border);color:var(--text);
  font-variant-numeric:tabular-nums;-moz-appearance:textfield;appearance:textfield;
  transition:border-color var(--duration-hover) ease,box-shadow var(--duration-hover) ease;
}
.cv-field input::-webkit-outer-spin-button,.cv-field input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.cv-field textarea{padding:12px 14px;min-height:92px;resize:vertical;line-height:1.5}
.cv-field input:focus,.cv-field textarea:focus{outline:0;border-color:var(--primary);box-shadow:0 0 0 3px var(--focus-ring)}
.cv-card .cv-help{font-size:12.5px;line-height:1.5;color:var(--text-muted);margin:0}
.cv-hair{height:1px;margin:22px 0;
  background:linear-gradient(90deg,transparent,var(--card-border) 16%,var(--card-border) 84%,transparent)}

/* list direction: one segmented control, the pressed half carries the text colour only */
.cv-listhead{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.cv-dir{display:flex;gap:3px;padding:3px;border:1px solid var(--border);border-radius:999px}
.cv-dirbtn{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:0 12px;border-radius:999px;
  font-family:var(--font-mono);font-size:11.5px;font-weight:700;letter-spacing:.06em;color:var(--text-muted);
  transition:color var(--duration-hover) ease,background var(--duration-hover) ease}
.cv-dirbtn svg{width:13px;height:13px}
.cv-dirbtn:hover{color:var(--text)}
.cv-dirbtn[aria-pressed="true"]{color:var(--text);background:var(--chip-bg)}
.cv-dirbtn:focus-visible{outline:0;box-shadow:0 0 0 3px var(--focus-ring)}
.cv-go{width:100%;margin-top:16px}

/* result: stat-tile grammar — label, the figure, its qualifier. Mono, tabular, no direction colour. */
.cv-result{margin-top:22px;padding-top:20px;border-top:1px solid var(--border)}
.cv-card .cv-rlabel{font-size:10.5px;letter-spacing:.14em;text-transform:uppercase;color:var(--text-muted);margin:0 0 10px}
.cv-card .cv-rvalue{font-size:clamp(22px,6vw,30px);font-weight:700;letter-spacing:-.02em;line-height:1.25;color:var(--text);
  margin:0 0 12px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.cv-card .cv-rvalue.is-empty{font-family:var(--font);font-size:15px;font-weight:500;color:var(--text-secondary);letter-spacing:0}
.cv-card .cv-fine{margin:20px 0 0;font-size:13px;line-height:1.6;color:var(--text-muted)}

/* the copy beside the tool */
.cv-copy .eyebrow{margin-bottom:12px}
.cv-h2{font-size:30px;font-weight:700;letter-spacing:-.025em;line-height:1.15;margin:0 0 16px}
.cv-example{grid-template-columns:1fr;margin:24px 0 0}
.cv-exlabel{font-size:10.5px;letter-spacing:.14em;text-transform:uppercase;color:var(--gold-text);margin:0 0 8px}
.cv-example code{font-size:.94em;color:var(--text);font-weight:500}

.cv-prose .eyebrow{margin-bottom:12px}
.cv-prose h2:first-of-type{margin-top:0}
.cv-related{margin-top:56px}
.cv-relhead{margin:0 0 18px}

@media (min-width:560px){
  .cv-card{padding:30px 28px}
  .cv-pair{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:14px}
  .cv-go{width:auto}
  .cv-x{display:block}
}
@media (min-width:900px){
  .cv-layout{grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:48px}
  .cv-card{order:2}
  .cv-copy{order:1}
}
@media (max-width:640px){
  .cv-h2{font-size:26px}
  .cv-related{margin-top:40px}
}
@media (prefers-reduced-motion:reduce){
  .cv-field input,.cv-field textarea,.cv-dirbtn{transition:none}
}
