/* TinyStar Labs layout adaptation, 2026-10-09.
   The published calculation engine and tail-expanded gauge scale are unchanged. */
:root {
  --ink: #192e3a;
  --navy: #175c91;
  --teal: #175c91;
  --teal-dark: #104a77;
  --line: #dce5eb;
  --max-width: 1640px;
}
body { font-size: 15px; }
.content-width, .header-inner { width: min(calc(100% - 64px), var(--max-width)); }
.app-header { background: #fff; color: var(--ink); border: 0; }
.header-inner { min-height: 108px; padding: 22px 0; border-bottom: 2px solid var(--ink); }
.product-kicker { color: var(--navy); font-size: 11px; letter-spacing: .13em; margin-bottom: 7px; }
h1 { font-size: clamp(25px, 2.1vw, 36px); font-weight: 700; letter-spacing: -.025em; }
h2 { font-size: clamp(19px, 1.55vw, 25px); letter-spacing: -.025em; }
.header-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.company-link { margin: 0; color: var(--muted); font-size: 13px; }
.model-state, .model-state.ready { padding: 0; border: 0; color: #287356; font-size: 11px; }
.model-state.error { color: var(--red); }
.governance-band { background: #fff; border: 0; }
.governance-layout { gap: 24px; border-bottom: 1px solid var(--line); }
.governance-layout > div { min-height: 0; padding: 12px 0; }
.governance-layout > div + div { border: 0; padding-left: 0; }
.governance-layout strong { font-size: 11px; color: var(--ink); }
.governance-layout span { font-size: 11px; line-height: 1.4; }
.explorer-layout { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(320px, 1.1fr) minmax(350px, 1.35fr); gap: 28px; padding: 28px 0 24px; }
.explorer-layout > section { min-width: 0; }
.input-band, .result-band, .profile-band { background: transparent; padding: 0; border: 0; }
.input-band { padding-right: 26px; border-right: 1px solid var(--line); }
.profile-band { padding-left: 26px; border-left: 1px solid var(--line); }
.explorer-layout .content-width { width: 100%; }
.section-heading { align-items: flex-start; gap: 10px; margin-bottom: 21px; }
.section-index { font-size: 10px; letter-spacing: .1em; color: #81929d; margin-bottom: 6px; }
.result-heading-row { flex-wrap: wrap; gap: 8px; }
.result-model-chip { padding: 0; border: 0; color: var(--muted); font-weight: 400; font-size: 12px; }
.input-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
label span { margin-bottom: 4px; color: var(--ink); font-size: 14px; }
label small { font-size: 10px; color: var(--muted); }
input { height: 39px; padding: 5px 8px; font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }
.form-footer { display: flex; flex-direction: column; align-items: stretch; margin-top: 16px; gap: 8px; }
.button { min-height: 36px; padding: 7px 10px; font-size: 13px; }
.button-primary { width: 100%; min-width: 0; }
.input-grid .button-primary { align-self: end; height: 39px; }
.secondary-actions { display: grid; grid-template-columns: 1fr auto; }
.form-feedback { margin-top: 4px; min-height: 0; }
.example-caption { font-size: 11px; line-height: 1.5; margin-bottom: 5px; }
.model-preview, .model-selection-warning, .validation-message { font-size: 11px; line-height: 1.5; }
.model-preview { color: var(--muted); font-weight: 400; }
.result-empty { min-height: 190px; align-items: flex-start; padding-top: 12px; font-size: 13px; }
.empty-rule { display: none; }
.primary-results { display: flex; flex-direction: column; border: 0; gap: 7px; }
.primary-results > div, .primary-results > div:first-child { min-height: 0; padding: 0; border: 0; }
.metric-label { font-size: 12px; font-weight: 400; margin-bottom: 5px; }
.percentile-result strong { display: block; font-size: clamp(64px, 6vw, 102px); letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.percentile-result strong small { font-size: .38em; margin-left: 7px; letter-spacing: 0; }
.percentile-result .metric-label { display: none; }
.score-result .metric-label { display: none; }
.meaning-value { font-size: clamp(21px, 1.9vw, 29px) !important; }
.distance-result { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 7px; margin-top: 3px; }
.distance-result .metric-label { margin: 0; }
.distance-result strong { font-size: 15px; }
.metric-caption { margin: 0; font-size: 11px; }
.percentile-track { margin-top: 55px; height: 38px; }
.track-segment { font-size: 11px; padding: 0 3px; }
.track-marker { height: 54px; }
.track-marker-badge { font-size: 13px; }
.track-labels { font-size: 11px; }
.score-explainer { margin: 15px 0 16px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.deviation-row { flex-direction: column; align-items: flex-start; gap: 4px; padding: 13px 0 0; border-top: 1px solid var(--line); border-bottom: 0; }
.deviation-row > span { font-size: 11px; font-weight: 400; }
.deviation-row strong { text-align: left; font-size: 16px; line-height: 1.5; }
.result-warning { margin-bottom: 12px; padding: 8px 10px; font-size: 11px; line-height: 1.5; }
.profile-subtitle { margin: -10px 0 29px; color: var(--muted); font-size: 12px; }
.profile-axis, .profile-row { display: grid; grid-template-columns: 64px minmax(80px, 1fr) 78px; gap: 12px; }
.profile-axis { display: flex; justify-content: space-between; margin: 0 90px 16px 76px; color: var(--muted); font-size: 11px; }
.profile-list { gap: 18px; }
.profile-row { min-height: 33px; }
.profile-name { font-size: 14px; white-space: nowrap; }
.profile-track { height: 18px; background: #f3f6f8; }
.profile-range95 { background: #dce5ec; }
.profile-range50 { top: 0; height: 100%; background: #9ab6c9; }
.profile-median { top: -3px; height: 24px; background: #9aadb8; }
.profile-marker { top: -6px; height: 30px; width: 4px; border-radius: 2px; background: var(--navy); transform: translateX(-50%); transition: left .6s ease; }
.profile-value { font-size: 15px; font-variant-numeric: tabular-nums; }
.profile-value strong { display: block; font-size: 10px; font-weight: 400; color: var(--muted); }
.profile-legend { display: flex; flex-wrap: wrap; gap: 8px 15px; margin-top: 24px; color: var(--muted); font-size: 11px; }
.profile-legend span { white-space: nowrap; }
.profile-legend i { display: inline-block; width: 11px; height: 11px; margin-right: 5px; vertical-align: -1px; }
.range95 { background: #dce5ec; }
.range50 { background: #9ab6c9; }
.point { background: var(--navy); }
.profile-calibration { margin: 16px 0 0; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.5; }
.interpretation-note { padding: 13px 0; border-top: 2px solid var(--ink); font-size: 11px; gap: 6px 14px; flex-wrap: wrap; }
.interpretation-note strong { color: var(--ink); }
.details-row { display: flex; flex-wrap: wrap; column-gap: 28px; border-top: 1px solid var(--line); }
.result-details, .model-band { padding: 0; background: #fff; border: 0; }
.details-row > details[open] { width: 100%; }
.result-details > summary, .model-band > summary { padding: 11px 0; cursor: pointer; color: var(--muted); font-size: 12px; }
summary:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.expanded-results { padding-bottom: 20px; }
.detail-grid { margin-top: 10px; }
.model-layout { grid-template-columns: 1fr; padding: 10px 0 20px; }
.model-band .content-width { width: 100%; }
.model-facts { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.model-facts dd { font-size: 13px; overflow-wrap: anywhere; }
footer { margin-top: 10px; padding: 12px 0; background: #fff; color: var(--muted); font-size: 10px; }
footer .content-width { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; }
footer a { color: inherit; text-underline-offset: 3px; }
@media (min-width: 1101px) and (max-height: 800px) {
  .header-inner { min-height: 85px; padding: 15px 0; }
  .governance-layout > div { padding: 8px 0; }
  .explorer-layout { padding: 20px 0; }
  .section-heading { margin-bottom: 16px; }
  .input-grid { gap: 8px 12px; }
  input { height: 35px; font-size: 19px; }
  .input-grid .button-primary { height: 35px; min-height: 35px; }
  .form-footer { margin-top: 12px; }
  .percentile-result strong { font-size: 72px; }
  .profile-subtitle { margin-bottom: 21px; }
  .profile-list { gap: 10px; }
  .profile-legend { margin-top: 18px; }
  .profile-subtitle { margin-bottom: 16px; }
  .profile-axis { margin-bottom: 12px; }
  .profile-calibration { margin-top: 13px; padding-top: 10px; }
  .interpretation-note { padding: 10px 0; }
  footer { padding: 8px 0; margin-top: 2px; }
}
@media (min-width: 1101px) and (max-height: 740px) {
  .header-inner { min-height: 75px; padding: 11px 0; }
  .explorer-layout { padding: 16px 0; }
  .input-grid { gap: 6px 12px; }
  .form-footer { margin-top: 9px; gap: 6px; }
  .form-feedback { margin-top: 0; }
  .example-caption, .model-preview { font-size: 10px; }
  .percentile-track { margin-top: 50px; }
  .profile-list { gap: 6px; }
  .profile-legend { margin-top: 16px; }
  .profile-calibration { margin-top: 12px; padding-top: 8px; }
}
@media (max-width: 1100px) {
  .content-width, .header-inner { width: min(calc(100% - 40px), var(--max-width)); }
  .explorer-layout { grid-template-columns: minmax(220px, .85fr) minmax(320px, 1.3fr); gap: 24px; }
  .profile-band { grid-column: 1 / -1; padding: 24px 0 0; border: 0; border-top: 1px solid var(--line); }
  .profile-subtitle { margin-bottom: 24px; }
  .percentile-result strong { font-size: 80px; }
  .model-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px 0; }
}
@media (max-width: 680px) {
  .content-width, .header-inner { width: calc(100% - 32px); }
  .header-inner { flex-direction: column; align-items: flex-start; gap: 14px; padding: 20px 0; }
  .header-meta { flex-direction: row; align-items: baseline; justify-content: space-between; width: 100%; gap: 12px; }
  .model-state { text-align: right; font-size: 10px; white-space: normal; }
  .governance-layout { grid-template-columns: 1fr; gap: 0; padding: 5px 0; }
  .governance-layout > div, .governance-layout > div + div { padding: 7px 0; border: 0; }
  .explorer-layout { grid-template-columns: minmax(0, 1fr); gap: 26px; padding: 24px 0; }
  .input-band { padding: 0 0 24px; border: 0; border-bottom: 1px solid var(--line); }
  .profile-band { grid-column: auto; }
  .section-heading { flex-direction: row; gap: 10px; margin-bottom: 20px; }
  .result-heading-row { flex-direction: column; gap: 8px; }
  .primary-results > div:first-child { border: 0; padding: 0; }
  .primary-results strong { font-size: 15px; }
  .percentile-result strong { font-size: 80px; }
  .form-footer { flex-direction: column; }
  .secondary-actions { flex-direction: row; }
  .profile-row { grid-template-columns: 58px minmax(70px, 1fr) 65px; gap: 9px; }
  .profile-axis { margin-left: 67px; margin-right: 74px; }
  .profile-value { grid-column: auto; margin-top: 0; text-align: right; font-size: 13px; }
  .profile-name { font-size: 12px; }
  .model-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .interpretation-note { flex-direction: column; align-items: flex-start; }
  .interpretation-note strong { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .profile-marker { transition: none; }
}
