/* Page frame: keep the existing title, subtitle, comparison band and footer note. */
.ragged-moto-calc .intro {
  max-width: var(--content-width);
  margin: 0 auto 64px;
  padding: 88px 24px 0;
  text-align: center;
}

.ragged-moto-calc .intro .eyebrow {
  display: inline-block;
  margin-bottom: 32px;
  padding: 7px 13px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 11px;
  letter-spacing: 0.16em;
}

.ragged-moto-calc .intro h1 {
  max-width: 860px;
  margin: 0 auto 16px;
  color: var(--text);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.12;
  text-wrap: normal;
}

.ragged-moto-calc .lede {
  max-width: 720px;
  margin: 0 auto;
  color: var(--secondary);
  font-size: 16px;
  line-height: 1.7;
  text-wrap: balance;
}

.rm-tool-crosslink {
  margin-top: 22px;
  text-align: center;
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.72rem;
  line-height: 1.4;
  white-space: nowrap;
}

.rm-tool-crosslink a {
  color: rgba(255, 255, 255, 0.62);
  text-decoration: none;
  transition: color 0.2s ease;
}

.rm-tool-crosslink a:hover {
  color: #ffffff;
}

/* Instrument housing and top strip. */
.instrument {
  position: relative;
  width: min(calc(100% - 48px), var(--instrument-width));
  margin: 0 auto;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
}

.instrument-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 48px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
}

.instrument-header-name,
.instrument-reset {
  color: var(--secondary);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  line-height: 1.3;
  text-transform: uppercase;
}

.instrument-header-name {
  font-size: 11px;
  letter-spacing: 0.18em;
}

.instrument-reset {
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: center;
}

.instrument-body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: stretch;
}

/* Input pane and option groups. */
.instrument .panel {
  position: relative;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 40px 32px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.instrument .instrument-inputs {
  min-width: 0;
  border-right: 1px solid var(--line);
}

.instrument .panel-heading {
  display: block;
  margin: 0 0 8px;
}

.instrument .input-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.ragged-moto-calc .destination-region {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  width: max-content;
  max-width: 100%;
  border-bottom: 1px solid var(--line);
}

.ragged-moto-calc .destination-region button {
  min-height: 40px;
  padding: 8px 14px 9px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--secondary);
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease;
}

.ragged-moto-calc .destination-region button:hover,
.ragged-moto-calc .destination-region button[aria-pressed="true"] {
  color: var(--text);
}

.ragged-moto-calc .destination-region button[aria-pressed="true"] {
  border-bottom-color: var(--red);
}

.ragged-moto-calc .destination-region button:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.guide-panel .destination-region-finder {
  grid-column: 1 / -1;
  justify-self: start;
  width: max-content;
}

.guide-panel .destination-region-message {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--text);
  font-size: 13px;
}

.guide-panel .destination-region-message[hidden] {
  display: none;
}

.instrument .input-heading-row .instrument-pane-label {
  margin: 0;
}

.instrument .tips-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--secondary);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.instrument .tips-toggle input {
  position: relative;
  flex: none;
  width: 34px;
  height: 18px;
  margin: 0;
  appearance: none;
  border: 1px solid var(--muted);
  border-radius: 999px;
  background: var(--panel-2);
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.instrument .tips-toggle input::before {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--secondary);
  content: "";
  transition: background-color 180ms ease, transform 180ms ease;
}

.instrument .tips-toggle input:checked {
  border-color: var(--secondary);
  background: rgba(255, 255, 255, 0.12);
}

.instrument .tips-toggle input:checked::before {
  background: var(--text);
  transform: translateX(16px);
}

.instrument #calculator:not([data-show-tips="true"]) .choice-group .option small:not(#decatNote):not(#dbKillerNote) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Hidden legacy heading and note markup is retained for now. */
.instrument .panel-heading h2,
.instrument .panel-heading .micro-note {
  display: none;
}

.instrument-pane-label {
  margin: 0 0 16px;
  color: var(--secondary);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  line-height: 1.4;
  text-transform: uppercase;
}

/* Hide unused group hints while retaining their existing markup hooks. */
.instrument .instrument-group-hint {
  display: none;
}

.instrument .explore-link,
.instrument .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

.instrument .choice-group {
  min-width: 0;
  margin: 0 0 32px;
  padding: 0;
  border: 0;
}

body .ragged-moto-calc .instrument fieldset.choice-group > legend {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  width: 100%;
  margin-bottom: 14px;
  padding: 0;
  border: 0;
  border-bottom: 0;
  background: none;
  box-shadow: none;
  text-decoration: none;
}

.instrument .choice-group legend .eyebrow {
  grid-column: 1;
  margin: 0 0 8px;
  color: var(--secondary);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.instrument .choice-group legend .eyebrow::before {
  display: block;
  width: 60px;
  height: 1px;
  margin: 0 0 10px;
  background: var(--rule);
  content: "";
}

.instrument .question {
  grid-column: 1;
  color: var(--text);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
}

.instrument .options {
  display: grid;
  gap: 0;
}

.instrument .two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 16px;
}

.instrument .option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 62px;
  padding: 10px 10px 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--secondary);
  cursor: pointer;
}

.instrument .option::before {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 2px;
  background: var(--text);
  content: "";
  opacity: 0;
}

.instrument .option:has(input:checked) {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.instrument .option:has(input:checked)::before {
  opacity: 1;
}

.instrument .option:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.4;
}

.instrument .option input {
  position: relative;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 0;
  appearance: none;
  border: 1px solid var(--secondary);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.instrument .option input[type="checkbox"] {
  border-radius: 2px;
}

.instrument .option input[type="radio"]:checked {
  border-color: var(--text);
}

.instrument .option input[type="radio"]:checked::after {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--text);
  content: "";
}

.instrument .option input[type="checkbox"]:checked {
  border-color: var(--text);
  background: var(--text);
}

.instrument .option input[type="checkbox"]:checked::after {
  position: absolute;
  top: 0;
  left: 4px;
  width: 5px;
  height: 9px;
  border-right: 1.5px solid var(--bg);
  border-bottom: 1.5px solid var(--bg);
  content: "";
  transform: rotate(45deg);
}

.instrument .option input:disabled {
  cursor: not-allowed;
}

/* Delete this rule to show per-option point values again. */
.instrument .option em {
  display: none;
}

.instrument .option span {
  flex: 1;
  min-width: 0;
}

.instrument .option b,
.instrument .option small {
  display: block;
}

.instrument .option b {
  color: var(--secondary);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}

.instrument .option:has(input:checked) b {
  color: var(--text);
}

.instrument .option small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.instrument .option small[hidden] {
  display: none;
}

.instrument .decat-option,
.instrument .dbkiller-option {
  width: 100%;
  min-height: 62px;
  margin-top: 8px;
}

/* Honour the live add-on states; the general option-description rule sets small elements to display:block. */
.instrument .decat-option #decatNote[hidden],
.instrument .dbkiller-option #dbKillerNote[hidden] {
  display: none;
}

.instrument .micro-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

/* Readout pane: score, status lamps, scale and selected setup. */
.instrument .instrument-readout {
  min-width: 0;
  align-self: stretch;
  padding: 0;
}

.instrument-display {
  margin: 24px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--panel-alt);
}

.instrument .instrument-readout > .instrument-pane-label {
  margin-bottom: 22px;
}

.instrument .result-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 20px;
}

.instrument .status-lights {
  display: flex;
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.instrument .status-lamp {
  display: block;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  border: 1px solid var(--line);
  border-radius: 50%;
  opacity: 0.28;
}

.instrument .lamp-green {
  background: var(--green);
}

.instrument .lamp-amber {
  background: var(--amber);
}

.instrument .lamp-red {
  background: var(--red);
}

.instrument .result-panel[data-tier="green"] .lamp-green,
.instrument .result-panel[data-tier="amber"] .lamp-amber,
.instrument .result-panel[data-tier="red"] .lamp-red {
  border-color: var(--text);
  opacity: 1;
}

.instrument .result-panel[data-tier="green"] .lamp-green {
  box-shadow: 0 0 8px rgba(117, 168, 138, 0.35);
}

.instrument .result-panel[data-tier="amber"] .lamp-amber {
  box-shadow: 0 0 8px rgba(210, 166, 83, 0.32);
}

.instrument .result-panel[data-tier="red"] .lamp-red {
  box-shadow: 0 0 8px rgba(209, 59, 47, 0.32);
}

.instrument .tier {
  margin: 0;
  color: var(--secondary);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.instrument .result-panel[data-tier="idle"] .tier,
.instrument .result-panel[data-tier="idle"] #resultTitle {
  color: var(--muted);
}

.instrument .instrument-readout .instrument-display > h2 {
  min-height: 2.4em;
  margin: 0;
  color: var(--text);
  font-size: clamp(1.75rem, 2.5vw, 2.1875rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-wrap: balance;
}

.instrument .result-layout {
  display: block;
  padding: 28px 0 20px;
}

.instrument .score-box {
  display: flex;
  flex-direction: column;
  width: auto;
  padding: 0;
  border: 0;
  color: var(--secondary);
  font-size: 12px;
  line-height: 1.2;
}

.instrument .score-box .eyebrow {
  margin: 0 0 2px;
  color: var(--secondary);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
}

.instrument .score-box strong {
  color: var(--text);
  font-size: clamp(4rem, 6vw, 4.5rem);
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.1;
  min-height: 1.1em;
}

.instrument .result-panel[data-tier="idle"] .score-box strong {
  color: var(--muted);
  font-weight: 300;
}

.instrument .result-panel[data-tier="idle"] #resultTitle {
  min-height: 1.35em;
  font-size: 16px;
  white-space: nowrap;
}

.instrument .score-scale-wrap {
  margin: 0 0 28px;
}

.instrument .score-scale {
  position: relative;
  height: 82px;
  margin: 0 0 6px;
  overflow: visible;
}

.instrument .instrument-scale-track {
  position: absolute;
  top: 20px;
  right: 0;
  left: 0;
  display: flex;
  height: 8px;
  overflow: hidden;
}

.instrument .instrument-scale-segment {
  display: block;
  height: 8px;
  border-top: 2px solid currentColor;
  opacity: 0.55;
}

.instrument .instrument-scale-green {
  width: 30%;
  color: var(--green);
  background: rgba(117, 168, 138, 0.38);
}

.instrument .instrument-scale-amber {
  width: 40%;
  color: var(--amber);
  background: rgba(210, 166, 83, 0.38);
}

.instrument .instrument-scale-red {
  width: 30%;
  color: var(--red);
  background: rgba(209, 59, 47, 0.38);
}

.instrument .result-panel[data-tier="idle"] .instrument-scale-segment {
  opacity: 0.4;
}

.instrument .result-panel[data-tier="green"] .instrument-scale-green,
.instrument .result-panel[data-tier="amber"] .instrument-scale-amber,
.instrument .result-panel[data-tier="red"] .instrument-scale-red {
  opacity: 1;
}

.instrument .instrument-scale-tick {
  position: absolute;
  z-index: 1;
  top: 20px;
  width: 1px;
  height: 8px;
  background: rgba(255, 255, 255, 0.5);
}

.instrument .instrument-scale-tick.instrument-tick-minor {
  top: 22px;
  height: 4px;
  background: rgba(255, 255, 255, 0.25);
}

.instrument .instrument-tick-start {
  left: 0;
}

.instrument .instrument-tick-amber {
  left: 30%;
}

.instrument .instrument-tick-red {
  left: 70%;
}

.instrument .instrument-tick-end {
  right: 0;
}

.instrument .instrument-tick-10 { left: 10%; }
.instrument .instrument-tick-20 { left: 20%; }
.instrument .instrument-tick-40 { left: 40%; }
.instrument .instrument-tick-50 { left: 50%; }
.instrument .instrument-tick-60 { left: 60%; }
.instrument .instrument-tick-80 { left: 80%; }
.instrument .instrument-tick-90 { left: 90%; }

.instrument .score-marker {
  position: absolute;
  z-index: 3;
  top: 2px;
  left: 0;
  width: 1px;
  height: 22px;
  background: var(--text);
  transform: translateX(-50%);
}

.instrument .instrument-marker-value {
  position: absolute;
  top: -20px;
  left: 50%;
  color: var(--text);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
  transform: translateX(-50%);
}

.instrument .score-marker::after {
  position: absolute;
  bottom: -7px;
  left: 50%;
  width: 0;
  height: 0;
  border-top: 6px solid var(--text);
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  content: "";
  transform: translateX(-50%);
}

.instrument .result-panel[data-tier="idle"] .score-marker {
  visibility: hidden;
}

.instrument .instrument-scale-legend {
  position: absolute;
  top: 33px;
  right: 0;
  left: 0;
  height: 38px;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.instrument .instrument-scale-number {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
}

.instrument .instrument-number-start {
  left: 0;
  transform: none;
}

.instrument .instrument-number-amber {
  left: 30%;
}

.instrument .instrument-number-red {
  left: 70%;
}

.instrument .instrument-number-end {
  right: 0;
  transform: none;
}

.instrument .instrument-scale-names {
  position: absolute;
  top: 23px;
  right: 0;
  left: 0;
  display: flex;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.instrument .instrument-scale-names span {
  text-align: center;
}

.instrument .instrument-scale-names span:first-child {
  width: 30%;
}

.instrument .instrument-scale-names span:nth-child(2) {
  width: 40%;
}

.instrument .instrument-scale-names span:last-child {
  width: 30%;
}

/* The score note and setup summary remain available to their JS hooks but are not shown. */
.instrument .score-scale-note,
.instrument .instrument-setup {
  display: none;
}

/* Detail band and calculation ledger. */
.instrument-detail {
  padding: 40px 32px;
  border-top: 1px solid var(--line);
}

.instrument .result-detail {
  display: block;
  margin-top: 26px;
  border-top: 1px solid var(--line);
}

.instrument .result-detail > div {
  min-width: 0;
  padding: 16px 0;
}

.instrument .result-detail > div + div {
  border-top: 1px solid var(--line);
}

.instrument .result-detail h3,
.instrument .compare-grid h3 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.instrument .result-detail p {
  margin: 0;
  color: var(--secondary);
  font-size: 14px;
  line-height: 1.55;
}

/* REVERSIBLE HIDE: keep the three explanation blocks available in the live readout only. */
.instrument[data-calculation-state="idle"] .result-detail {
  display: none;
}

.instrument .methodology {
  margin: 0;
  padding: 0;
  border: 0;
}

/* REVERSIBLE HIDE: keep the calculation disclosure out of the idle display. */
.instrument[data-calculation-state="idle"] .result-method {
  display: none;
}

.instrument-ledger-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 0.12em;
  list-style: none;
  text-transform: uppercase;
}

.instrument-ledger-summary::-webkit-details-marker {
  display: none;
}

.instrument-ledger-summary::after {
  width: 18px;
  height: 18px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background:
    linear-gradient(var(--secondary), var(--secondary)) center / 8px 1px no-repeat,
    linear-gradient(var(--secondary), var(--secondary)) center / 1px 8px no-repeat;
  content: "";
  transition: background-size 180ms ease, border-color 180ms ease;
}

.result-method[open] .instrument-ledger-summary::after {
  border-color: var(--secondary);
  background-size: 8px 1px, 0 0;
}

.instrument-ledger-summary #ledgerTotalValue {
  display: none;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.instrument-ledger-summary .instrument-ledger-heading {
  margin: 0;
}

.instrument-ledger-content {
  padding-top: 12px;
}

.instrument .instrument-method-sentence {
  max-width: 820px;
  margin: 0 0 16px;
  color: var(--secondary);
  font-size: 14px;
  line-height: 1.6;
}

/* REVERSIBLE HIDE: the former Part / Points table header is retained for its existing IDs, but not displayed or announced. */
.instrument .instrument-ledger-header {
  display: none;
}

.instrument .instrument-ledger-heading {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.instrument .method-copy,
.instrument .methodology > p:not(.override) {
  max-width: 820px;
  margin: 0 0 16px;
  color: var(--secondary);
  font-size: 14px;
  line-height: 1.6;
}

.instrument .instrument-ledger {
  width: 100%;
  border-collapse: collapse;
  border: 0;
  border-spacing: 0;
  color: var(--secondary);
  font-size: 14px;
  line-height: 1.45;
}

body .ragged-moto-calc .instrument table.instrument-ledger > tbody > tr > th,
body .ragged-moto-calc .instrument table.instrument-ledger > tbody > tr > td {
  padding: 12px;
  border-top: 0;
  border-bottom: 1px solid var(--line);
  border-left: 0;
  border-right: 0;
  background: transparent;
  text-align: left;
  font-weight: 400;
}

body .ragged-moto-calc .instrument table.instrument-ledger > tbody > tr:first-child > th,
body .ragged-moto-calc .instrument table.instrument-ledger > tbody > tr:first-child > td {
  border-top: 1px solid var(--line);
}

.instrument .instrument-ledger thead th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

body .ragged-moto-calc .instrument table.instrument-ledger > tbody > tr > :last-child,
body .ragged-moto-calc .instrument table.instrument-ledger > tfoot > tr > :last-child {
  width: 110px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

body .ragged-moto-calc .instrument table.instrument-ledger > tfoot > tr > th,
body .ragged-moto-calc .instrument table.instrument-ledger > tfoot > tr > td {
  padding: 12px;
  border-top: 1px solid var(--secondary);
  border-bottom: 0;
  border-left: 0;
  border-right: 0;
  background: transparent;
  color: var(--text);
  font-weight: 500;
}

body .ragged-moto-calc .instrument table.instrument-ledger > tfoot > tr > th:first-child {
  text-align: left;
}

.instrument .instrument-ledger .instrument-placeholder-row td {
  color: var(--muted);
  font-variant-numeric: normal;
  text-align: left;
}

.instrument .override {
  margin: 10px 0 0;
  color: var(--secondary);
  font-size: 13px;
  line-height: 1.55;
}

.instrument .override:empty {
  display: none;
}

.instrument .confidence {
  margin: 24px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  color: var(--secondary);
  font-size: 14px;
  line-height: 1.6;
}

.instrument .instrument-ledger tbody th {
  width: auto;
}

.instrument .instrument-ledger tfoot th {
  width: auto;
}

.instrument .confidence b {
  color: var(--text);
}

/* Keyboard focus and instrument motion. */
.instrument :focus-visible,
.guide-panel :focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.instrument .option:has(input:focus-visible) {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* The pinned readout is available at every viewport size after interaction. */
.instrument .instrument-pinned-readout {
  position: fixed;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  width: 100%;
  min-height: 56px;
  padding: 0 var(--gutter) env(safe-area-inset-bottom);
  border: 0;
  border-top: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(100%);
}

.instrument .instrument-pinned-readout.instrument-is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.instrument-pinned-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100%, var(--instrument-width));
  min-height: 56px;
  margin: 0 auto;
}

.instrument-pinned-tier {
  flex: 1 1 auto;
  color: var(--text);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.instrument-pinned-score {
  color: var(--text);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.instrument-pinned-arrow {
  color: var(--secondary);
  font-size: 18px;
  line-height: 1;
}

.ragged-moto-calc.instrument-has-pinned-readout {
  padding-bottom: calc(56px + env(safe-area-inset-bottom));
}

/* Next-step module: retain the current full-width homepage band. */
.panel.guide-panel {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: var(--section-pad) 24px;
  border: 0;
  border-radius: 0;
  background: var(--panel-alt);
}

.guide-panel > * {
  width: min(100%, var(--instrument-width));
  margin-right: auto;
  margin-left: auto;
}

.guide-panel > .eyebrow::before {
  display: block;
  width: 60px;
  height: 1px;
  margin-bottom: 12px;
  background: var(--rule);
  content: "";
}

.guide-panel > h2 {
  margin-block: 0 32px;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.compare-grid {
  display: grid;
  width: min(100%, var(--instrument-width));
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}

.compare-grid article {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 8px 32px 8px 0;
}

.compare-grid article + article {
  padding-right: 0;
  padding-left: 32px;
  border-left: 1px solid var(--line);
}

.compare-grid h3 {
  margin-top: 0;
}

.compare-grid p {
  margin: 0 0 16px;
  color: var(--secondary);
  font-size: 15px;
  line-height: 1.6;
}

.compare-grid small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.guide-panel .explore-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 16px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.35;
  text-decoration: none;
  text-transform: uppercase;
}

.guide-panel .button,
.guide-panel .instrument-drawer-toggle {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
  cursor: pointer;
}

.guide-panel .instrument-drawer-toggle[aria-expanded="true"] {
  border-color: rgba(255, 255, 255, 0.3);
  background: transparent;
  color: var(--text);
}

.guide-panel .instrument-drawer-toggle {
  align-self: flex-start;
  margin-top: 12px;
}

.guide-panel .instrument-finder-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.7fr) auto;
  align-items: end;
  gap: 8px 12px;
  margin: 0;
}

.guide-panel .instrument-field {
  min-width: 0;
}

.guide-panel .instrument-finder-fields > .instrument-field:nth-of-type(2) {
  padding-left: 4px;
}

.guide-panel .instrument-field label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.guide-panel .instrument-field input,
.guide-panel .instrument-field select {
  width: 100%;
  min-height: 48px;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}

.guide-panel .instrument-field input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.guide-panel .instrument-affiliate-action {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.guide-panel .instrument-affiliate-action .explore-link {
  margin-top: auto;
}

.instrument-finder-drawer {
  width: min(100%, var(--instrument-width));
  max-height: 0;
  margin: 0 auto;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px);
}

.instrument-finder-drawer.instrument-drawer-open {
  max-height: 360px;
  margin-top: 28px;
  opacity: 1;
  transform: translateY(0);
}

.instrument-finder-drawer .instrument-skip-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--secondary);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.instrument-match-choices {
  display: grid;
  gap: 8px;
  width: min(100%, var(--instrument-width));
  margin: 14px auto 0;
}

.instrument-match-choice {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--text);
  text-decoration: none;
  transition: border-color 180ms ease, background-color 180ms ease;
}

.instrument-match-choice:hover,
.instrument-match-choice:focus-visible {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.04);
}

.instrument-match-choice small {
  color: var(--secondary);
  font-size: 12px;
}

.guide-panel .instrument-field select:disabled {
  color: var(--muted);
  opacity: 0.65;
}

.affiliate-disclosure {
  max-width: var(--instrument-width);
  margin-top: 32px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
}

.ragged-moto-calc .footer-note {
  max-width: 500px;
  margin: 40px auto 60px;
  padding: 0 20px;
  color: var(--muted);
  font-size: 15px;
  text-align: center;
}

/* Hover and result transitions. */
@media (prefers-reduced-motion: no-preference) {
  .instrument .score-marker {
    transition: left 250ms cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .instrument .status-lamp {
    transition: opacity 200ms ease, box-shadow 200ms ease;
  }

  .instrument .option,
  .instrument .button,
  .instrument .explore-link,
  .instrument .instrument-reset,
  .guide-panel .explore-link {
    transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease, opacity 180ms ease;
  }

  .instrument .instrument-pinned-readout {
    transition: transform 200ms ease, opacity 200ms ease, visibility 0s linear 200ms;
  }

  .instrument .instrument-pinned-readout.instrument-is-visible {
    transition: transform 200ms ease, opacity 200ms ease, visibility 0s;
  }

  .instrument-finder-drawer {
    transition: max-height 200ms ease, margin 200ms ease, opacity 200ms ease, transform 200ms ease;
  }

  .instrument .explore-link:hover,
  .instrument .instrument-reset:hover,
  .guide-panel .explore-link:hover {
    background: var(--line);
    color: var(--text);
  }

  .guide-panel .button:hover {
    filter: brightness(1.08);
  }
}

.instrument :focus-visible,
.guide-panel :focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

/* Responsive instrument and page layout. */
@media (max-width: 1024px) {
  .ragged-moto-calc {
    --section-pad: 80px;
  }
}

@media (max-width: 900px) and (min-width: 769px) {
  .instrument-header {
    gap: 16px;
    padding: 0 24px;
  }

  .instrument .panel,
  .instrument .instrument-readout {
    padding-right: 24px;
    padding-left: 24px;
  }

  .instrument .two-col {
    column-gap: 10px;
  }
}

@media (min-width: 769px) and (min-height: 900px) {
  .instrument .instrument-readout {
    position: sticky;
    top: 24px;
    align-self: start;
  }
}

@media (max-width: 768px) {
  .ragged-moto-calc {
    --gutter: 16px;
  }

  .site-header {
    height: 66px;
    padding: 0 20px;
  }

  .header-note {
    font-size: 0.5rem;
    letter-spacing: 0.12em;
  }

  .ragged-moto-calc .intro {
    margin: 0 auto 48px;
    padding: 60px 18px 0;
  }

  .ragged-moto-calc .intro .eyebrow {
    margin-bottom: 22px;
  }

  .ragged-moto-calc .intro h1 {
    margin-bottom: 16px;
    font-size: 2rem;
    letter-spacing: -0.03em;
  }

  .ragged-moto-calc .lede {
    font-size: 15px;
    line-height: 1.7;
  }

  .instrument {
    width: 100%;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .instrument-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    padding: 6px 20px;
  }

  .instrument-header-name {
    grid-column: 1;
    font-size: 10px;
  }

  .instrument-reset {
    grid-column: 2;
    grid-row: 1;
  }

  .instrument-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .instrument .panel,
  .instrument .instrument-readout {
    padding: 32px 20px;
  }

  .instrument .instrument-inputs {
    border-right: 0;
  }

  .instrument .panel-heading {
    margin-bottom: 8px;
  }

  .instrument .input-heading-row {
    flex-wrap: wrap;
    gap: 8px 12px;
  }

  .instrument .input-heading-row > .tips-toggle {
    margin-left: auto;
  }

  .instrument .two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
  }

  .instrument .choice-group {
    margin-bottom: 36px;
  }

  .instrument .choice-group legend {
    column-gap: 12px;
  }

  .instrument .choice-group legend .eyebrow {
    font-size: 10px;
  }

.instrument .option {
    min-height: 56px;
    padding: 12px 8px;
    gap: 8px;
  }

  .instrument .option b {
    font-size: 14px;
    line-height: 1.35;
  }

  .instrument .option small {
    font-size: 12px;
  }

  .instrument .instrument-display {
    margin: 20px 12px;
    padding: 20px;
  }

  .instrument .instrument-readout {
    position: static;
    border-top: 1px solid var(--line);
  }

  .instrument .instrument-readout .instrument-display > h2 {
    min-height: 0;
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .instrument .score-box strong {
    font-size: 4rem;
  }

  .instrument-detail {
    padding: 32px 20px;
  }

  .instrument .methodology {
    margin-top: 24px;
  }

  body .ragged-moto-calc .instrument table.instrument-ledger > tbody > tr > :last-child,
  body .ragged-moto-calc .instrument table.instrument-ledger > tfoot > tr > :last-child {
    width: 76px;
  }

  .panel.guide-panel {
    padding: 72px 20px;
  }

  .guide-panel > h2 {
    margin-bottom: 24px;
  }

  .compare-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .compare-grid article {
    padding: 20px 0;
  }

  .compare-grid article + article {
    padding: 24px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .guide-panel .instrument-finder-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .guide-panel .destination-region-finder,
  .guide-panel .destination-region-message {
    grid-column: 1;
  }

  .guide-panel .instrument-finder-fields .explore-link {
    width: 100%;
  }

  .instrument-finder-drawer.instrument-drawer-open {
    max-height: 820px;
  }

  .affiliate-disclosure {
    margin-top: 24px;
    text-align: left;
  }

  .ragged-moto-calc .footer-note {
    margin: 32px auto 48px;
    padding: 0 20px;
  }

}

@media (max-width: 359px) {
  .instrument .two-col {
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
  }
}

@media (max-width: 380px) {
  .instrument-header-name {
    max-width: 210px;
    font-size: 9px;
    letter-spacing: 0.12em;
  }

  .instrument-pinned-inner {
    gap: 7px;
  }

  .instrument-pinned-tier {
    font-size: 10px;
    letter-spacing: 0.08em;
  }

  .instrument .instrument-scale-names {
    font-size: 9px;
    letter-spacing: 0.06em;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
