/* Solar System Scale Model Calculator, 2026-11-06: only what /css/ft-tool-20261106.css lacks.
   Classes are prefixed ssm-; colours come from the --ft-* tokens, so light and dark themes follow the shell. */

.ssm-row { margin-top: var(--ft-space-4); }
.ssm-muted { color: var(--ft-ink-2); font-weight: 400; }
.ssm-small { margin: 0; color: var(--ft-ink-2); font-size: var(--ft-text-sm); line-height: 1.5; }
.ssm-lead { margin: 0 0 var(--ft-space-2); color: var(--ft-ink); font-size: var(--ft-text-md); line-height: 1.5; }
.ssm-subtitle { margin: 0 0 var(--ft-space-2); color: var(--ft-ink); font-size: var(--ft-text-md); font-weight: 650; line-height: 1.3; }

/* Inputs ------------------------------------------------------------------------------------------ */
.ssm-settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: var(--ft-space-4); align-items: start; }
.ssm-show { min-width: 0; margin: 0; padding: 0; border: 0; }
/* Live readout under the inputs, for narrow screens where the results panel comes after the inputs. */
.ssm-peek { display: none; margin: 0; padding: var(--ft-space-3) var(--ft-space-4); border-left: 3px solid var(--ft-accent); border-radius: 0 var(--ft-radius) var(--ft-radius) 0; background: var(--ft-accent-soft); color: var(--ft-ink); font-size: var(--ft-text-sm); line-height: 1.5; font-variant-numeric: tabular-nums; }
@media not all and (min-width: 56rem) { .ssm-peek { display: block; } }
.ssm-show > legend { margin-bottom: var(--ft-space-1); padding: 0; }
.ssm-show .ft-cluster { gap: 0 var(--ft-space-5); }

/* Results ----------------------------------------------------------------------------------------- */
.ssm-scale .ft-result__value { letter-spacing: -0.01em; }
/* While a typed value can't be used, the results keep the last model that worked: a note says so and they dim. */
.ssm-stale { margin: 0 0 var(--ft-space-3); padding: var(--ft-space-2) var(--ft-space-3); border-left: 4px solid var(--ft-warn); border-radius: 0 var(--ft-radius) var(--ft-radius) 0; background: var(--ft-warn-soft); color: var(--ft-ink); font-size: var(--ft-text-sm); font-weight: 600; line-height: 1.45; }
.ssm-is-stale #tool-results, .ssm-is-stale .ssm-tablecap, .ssm-is-stale .ssm-tablewrap, .ssm-is-stale #ssm-light-lead, .ssm-is-stale #ssm-arrivals, .ssm-is-stale #ssm-proxima { opacity: 0.55; }
.ssm-is-stale .ssm-peek { border-left-color: var(--ft-warn); background: var(--ft-warn-soft); }
.ssm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Scale strip: fixed height so nothing moves when it is redrawn at the panel's width. */
.ssm-strip .ssm-strip__frame { aspect-ratio: auto; height: calc(var(--ft-space-8) * 2.75); }
.ssm-strip__axis { stroke: var(--ft-plot-axis); stroke-width: 2; stroke-linecap: round; }
.ssm-strip__arrow { fill: none; stroke: var(--ft-plot-axis); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ssm-strip__tick { stroke: var(--ft-plot-axis); stroke-width: 1; }
.ssm-strip__leader { stroke: var(--ft-plot-axis); stroke-width: 1; stroke-dasharray: 2 3; }
.ssm-strip__ticklabel, .ssm-strip__name, .ssm-strip__dist {
  font-family: var(--ft-font);
  font-size: var(--ft-text-xs);
  paint-order: stroke;
  stroke: var(--ft-plot-surface);
  stroke-width: 3px;
  stroke-linejoin: round;
}
.ssm-strip__ticklabel { fill: var(--ft-plot-ink-2); font-variant-numeric: tabular-nums; }
.ssm-strip__name { fill: var(--ft-plot-ink); font-weight: 650; }
.ssm-strip__dist { fill: var(--ft-plot-ink-2); font-variant-numeric: tabular-nums; }
.ssm-dot { fill: var(--ft-plot-ink-2); stroke: var(--ft-plot-surface); stroke-width: 2; }
.ssm-dot--sun { fill: var(--ft-plot-4); }
.ssm-dot--earth { fill: var(--ft-plot-1); }
.ssm-dot--dwarf { fill: var(--ft-plot-surface); stroke: var(--ft-plot-ink-2); stroke-width: 1.5; }
.ssm-zoom { margin-top: var(--ft-space-3); }
.ssm-zoom .ft-range__value { min-width: 9rem; }

/* Table: body names stay in view while the columns scroll sideways on a phone. The wrapper is the containing
   block for the visually hidden "not needed" text, so it is clipped with the table instead of widening the page. */
.ssm-tablewrap { position: relative; }
.ssm-tablecap { margin: 0 0 var(--ft-space-2); color: var(--ft-ink-2); font-size: var(--ft-text-sm); }
.ssm-table thead th, .ssm-table thead th.ft-num { white-space: normal; vertical-align: bottom; min-width: 5.5rem; }
.ssm-table thead th:first-child { position: sticky; left: 0; z-index: 2; min-width: 0; }
.ssm-table tbody th[scope="row"] { position: sticky; left: 0; z-index: 1; background: var(--ft-surface); white-space: nowrap; }
.ssm-table .ssm-objcell { min-width: 13rem; }
.ssm-table .ssm-objcell .ssm-muted { white-space: nowrap; }
.ssm-table td.ft-num .ssm-muted { display: block; font-size: var(--ft-text-xs); }
.ssm-table tbody th .ssm-muted { display: block; font-size: var(--ft-text-xs); }
.ssm-table .ssm-row--moon th[scope="row"] { padding-left: var(--ft-space-5); }
.ssm-note { margin-top: var(--ft-space-2); }

/* Print placards */
.ssm-print { display: grid; gap: var(--ft-space-3) var(--ft-space-5); align-items: end; }
.ssm-print__controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--ft-space-3); }
.ssm-print__status { margin: 0; }
@media (min-width: 56rem) {
  .ssm-print { grid-template-columns: minmax(0, 1fr) auto; }
  .ssm-print__status { grid-column: 1 / -1; }
}

/* Light timer */
.ssm-timer { display: grid; gap: var(--ft-space-2); padding: var(--ft-space-4); border: 1px solid var(--ft-line); border-radius: var(--ft-radius); background: var(--ft-surface-2); }
.ssm-timer__clock { margin: 0; color: var(--ft-ink); font-size: var(--ft-text-2xl); font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ssm-timer__where { margin: 0; min-height: 3em; color: var(--ft-ink-2); font-size: var(--ft-text-sm); line-height: 1.5; }
.ssm-arrivals { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ft-line); font-size: var(--ft-text-sm); }
.ssm-arrival { display: grid; grid-template-columns: minmax(4.5rem, 1fr) auto auto 4.5rem; gap: var(--ft-space-3); align-items: baseline; padding: var(--ft-space-1) 0; border-bottom: 1px solid var(--ft-line); color: var(--ft-ink); }
.ssm-arrival__time, .ssm-arrival__dist { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ssm-arrival__dist { color: var(--ft-ink-2); }
.ssm-arrival__state { color: var(--ft-ok); font-weight: 650; text-align: right; }
.ssm-arrival.is-reached .ssm-arrival__name { font-weight: 650; }

/* How it works */
.ssm-objects li { margin: 0.35em 0; }

@media print {
  .ssm-zoom, .ssm-timer, .ssm-peek, #ssm-trade-use, .ssm-print__controls, .ssm-print__status { display: none !important; }
  /* The printout is the model: the scale note already names the Sun's size, so the inputs are left out. */
  #tool > .ft-workspace--split { display: block; }
  #tool > .ft-workspace--split > .ft-panel:first-child { display: none; }
  .ssm-table { font-size: var(--ft-text-xs); }
  .ssm-table th, .ssm-table td { padding: var(--ft-space-1) var(--ft-space-2); }
  .ssm-table thead th, .ssm-table thead th.ft-num, .ssm-table .ssm-objcell { min-width: 0; }
  .ssm-table thead th:first-child, .ssm-table tbody th[scope="row"] { position: static; }
  .ssm-strip .ssm-strip__frame { break-inside: avoid; }
}

/* Mobile form controls (16px to prevent iOS Safari zoom) and 44px primary buttons */
@media screen and (max-width: 640px), screen and (hover: none) and (pointer: coarse) {
  .ft-tool input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]),
  .ft-tool select,
  .ft-tool textarea,
  .ft-tool .ft-input,
  .ft-tool .ft-select,
  .ft-tool .ft-textarea,
  .ft-tool .ft-inputgroup > .ft-select.ft-inputgroup__unit {
    font-size: max(16px, 1rem);
  }
  .ft-tool .ft-btn--primary {
    min-height: 44px;
  }
}
