@layer reset, base, components, utilities;

@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  html {
    scroll-behavior: smooth;
  }

  body,
  h1,
  h2,
  h3,
  p,
  dl,
  dd,
  figure {
    margin: 0;
  }

  button,
  input,
  select {
    font: inherit;
  }

  button {
    border: 0;
  }

  img,
  svg {
    display: block;
    max-width: 100%;
  }

  table {
    border-collapse: collapse;
    border-spacing: 0;
  }
}

@layer base {
  :root {
    --paper: #f4f0e7;
    --paper-bright: #fbf8f1;
    --paper-deep: #ebe4d7;
    --ink: #1b1b18;
    --ink-soft: #34332e;
    --muted: #68645c;
    --muted-light: #8f897e;
    --line: #cec5b6;
    --line-strong: #a99f90;
    --accent: #df4b31;
    --accent-dark: #a83222;
    --accent-soft: #f7d8cf;
    --screen: #101315;
    --screen-soft: #1c2225;
    --success: #1f7356;
    --success-soft: #dbece5;
    --danger: #a33b30;
    --danger-soft: #f1d8d4;
    --warning: #9a5a16;
    --warning-soft: #f4e5ce;
    --shadow: 0 22px 50px rgb(48 39 25 / 10%);
    --font-sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    --radius-sm: 5px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --site-width: 1440px;
  }

  html {
    min-width: 320px;
    background: var(--paper);
  }

  body {
    min-height: 100vh;
    color: var(--ink);
    background:
      radial-gradient(circle at 12% 2%, rgb(255 255 255 / 48%), transparent 24rem),
      var(--paper);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.55;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
  }

  a {
    color: inherit;
    text-underline-offset: 0.2em;
  }

  button,
  select,
  input[type="range"] {
    cursor: pointer;
  }

  input,
  select,
  button {
    color: inherit;
  }

  :focus-visible {
    outline: 3px solid rgb(223 75 49 / 38%);
    outline-offset: 3px;
  }

  ::selection {
    color: var(--paper-bright);
    background: var(--accent-dark);
  }

  code {
    padding: 0.1em 0.35em;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--paper-bright);
    font-family: var(--font-mono);
    font-size: 0.88em;
  }
}

@layer components {
  .skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 1000;
    padding: 0.65rem 0.9rem;
    border-radius: var(--radius-sm);
    color: white;
    background: var(--ink);
    transform: translateY(-160%);
    transition: transform 160ms ease;
  }

  .skip-link:focus {
    transform: translateY(0);
  }

  .site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 4.25rem;
    padding: 0.65rem max(1rem, calc((100vw - var(--site-width)) / 2));
    border-bottom: 1px solid rgb(169 159 144 / 62%);
    background: rgb(244 240 231 / 92%);
    backdrop-filter: blur(18px);
  }

  .brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--ink);
    text-decoration: none;
  }

  .brand__mark {
    width: 2.35rem;
    height: 2.35rem;
    overflow: visible;
  }

  .brand__mark rect,
  .brand__mark path {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
  }

  .brand__mark path:nth-of-type(1),
  .brand__mark path:nth-of-type(2),
  .brand__mark path:nth-of-type(3) {
    stroke: var(--accent);
  }

  .brand__text {
    font-size: 0.95rem;
    font-weight: 760;
    letter-spacing: -0.02em;
  }

  .header-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
  }

  .unit-switch {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(2.6rem, 1fr));
    padding: 0.2rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper-deep);
  }

  .unit-switch__button {
    min-height: 2.1rem;
    padding: 0 0.72rem;
    border-radius: 999px;
    color: var(--muted);
    background: transparent;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .unit-switch__button.is-active {
    color: var(--ink);
    background: var(--paper-bright);
    box-shadow: 0 1px 4px rgb(50 41 27 / 13%);
  }

  .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.65rem;
    gap: 0.5rem;
    padding: 0.68rem 0.9rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
    font-weight: 720;
    line-height: 1;
    transition:
      background-color 150ms ease,
      border-color 150ms ease,
      color 150ms ease,
      transform 150ms ease;
  }

  .button svg {
    width: 1.05rem;
    height: 1.05rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
  }

  .button:hover {
    transform: translateY(-1px);
  }

  .button--primary {
    color: white;
    background: var(--ink);
  }

  .button--primary:hover {
    background: var(--accent-dark);
  }

  .button--quiet {
    border-color: var(--line);
    background: transparent;
  }

  .button--quiet:hover {
    border-color: var(--line-strong);
    background: var(--paper-bright);
  }

  .intro {
    max-width: var(--site-width);
    margin: 0 auto;
    padding: clamp(1.9rem, 4vw, 3.7rem) 1rem clamp(1.5rem, 3vw, 2.7rem);
  }

  .eyebrow {
    margin-bottom: 0.55rem;
    color: var(--accent-dark);
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 760;
    letter-spacing: 0.13em;
    text-transform: uppercase;
  }

  .intro h1 {
    max-width: 16ch;
    font-size: clamp(2.5rem, 6vw, 5.35rem);
    font-weight: 810;
    letter-spacing: -0.068em;
    line-height: 0.96;
  }

  .intro__lede {
    max-width: 52rem;
    margin-top: 1rem;
    color: var(--muted);
    font-size: clamp(1rem, 1.7vw, 1.28rem);
  }

  .calculator {
    width: min(calc(100% - 2rem), var(--site-width));
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    background: var(--paper-bright);
    box-shadow: var(--shadow);
  }

  .mode-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-bottom: 1px solid var(--line);
    background: var(--paper-deep);
  }

  .mode-tab {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 4.1rem;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    border-right: 1px solid var(--line);
    color: var(--muted);
    background: transparent;
    font-size: 0.92rem;
    font-weight: 720;
    transition:
      color 160ms ease,
      background-color 160ms ease;
  }

  .mode-tab:last-child {
    border-right: 0;
  }

  .mode-tab::after {
    position: absolute;
    right: 14%;
    bottom: -1px;
    left: 14%;
    height: 3px;
    background: var(--accent);
    content: "";
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 180ms ease;
  }

  .mode-tab:hover {
    color: var(--ink);
    background: rgb(255 255 255 / 34%);
  }

  .mode-tab.is-active {
    color: var(--ink);
    background: var(--paper-bright);
  }

  .mode-tab.is-active::after {
    transform: scaleX(1);
  }

  .mode-tab__number {
    color: var(--accent-dark);
    font-family: var(--font-mono);
    font-size: 0.69rem;
    font-weight: 800;
  }

  .calculator__workspace {
    display: grid;
    grid-template-columns: minmax(20rem, 25rem) minmax(0, 1fr);
    min-height: 37rem;
    height: clamp(37rem, calc(100svh - 17.5rem), 45rem);
  }

  .control-rail {
    position: relative;
    overflow-y: auto;
    padding: clamp(1.2rem, 2.2vw, 2rem);
    border-right: 1px solid var(--line);
    overscroll-behavior: contain;
    scrollbar-color: var(--line-strong) transparent;
    scrollbar-width: thin;
  }

  .control-rail::-webkit-scrollbar {
    width: 8px;
  }

  .control-rail::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: var(--line-strong);
    background-clip: padding-box;
  }

  .control-panel {
    animation: panel-in 180ms ease both;
  }

  .panel-heading {
    margin-bottom: 1.5rem;
  }

  .panel-heading__step {
    margin-bottom: 0.3rem;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
  }

  .panel-heading h2 {
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    letter-spacing: -0.045em;
    line-height: 1.08;
  }

  .field {
    min-width: 0;
  }

  .field > label,
  .field-cluster > legend {
    display: block;
    margin-bottom: 0.42rem;
    color: var(--ink-soft);
    font-size: 0.76rem;
    font-weight: 760;
    letter-spacing: 0.015em;
  }

  .field-cluster {
    min-width: 0;
    margin: 1.25rem 0;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
  }

  .field-cluster > legend {
    padding: 0 0.35rem;
  }

  .field--hero-number {
    margin-bottom: 0.55rem;
  }

  .number-input {
    position: relative;
    display: flex;
    align-items: center;
  }

  .number-input input {
    width: 100%;
    min-width: 0;
    height: 4.6rem;
    padding: 0.25rem 4.1rem 0.3rem 0;
    border: 0;
    border-bottom: 2px solid var(--ink);
    border-radius: 0;
    color: var(--ink);
    background: transparent;
    font-family: var(--font-mono);
    font-size: clamp(2.5rem, 5vw, 4.1rem);
    font-variant-numeric: tabular-nums;
    font-weight: 720;
    letter-spacing: -0.08em;
    line-height: 1;
  }

  .number-input input:focus {
    outline: 0;
    border-bottom-color: var(--accent);
  }

  .number-input__unit {
    position: absolute;
    right: 0.25rem;
    bottom: 0.85rem;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.84rem;
    font-weight: 760;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .number-input--compact input {
    height: 2.8rem;
    padding: 0.45rem 2.8rem 0.4rem 0.68rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--paper-bright);
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 650;
    letter-spacing: 0;
  }

  .number-input--compact input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgb(223 75 49 / 12%);
  }

  .number-input--compact .number-input__unit {
    right: 0.65rem;
    bottom: 0.72rem;
    font-size: 0.68rem;
  }

  .field__help {
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.45;
  }

  .range-control {
    width: 100%;
    height: 1.7rem;
    margin: 0.4rem 0 0.65rem;
    padding: 0;
    appearance: none;
    background: transparent;
  }

  .range-control::-webkit-slider-runnable-track {
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(to right, var(--accent) var(--range-progress, 42%), var(--line) var(--range-progress, 42%));
  }

  .range-control::-moz-range-track {
    height: 3px;
    border-radius: 999px;
    background: var(--line);
  }

  .range-control::-moz-range-progress {
    height: 3px;
    border-radius: 999px;
    background: var(--accent);
  }

  .range-control::-webkit-slider-thumb {
    width: 1.05rem;
    height: 1.05rem;
    margin-top: -0.44rem;
    border: 3px solid var(--paper-bright);
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 1px var(--accent-dark);
    appearance: none;
  }

  .range-control::-moz-range-thumb {
    width: 0.85rem;
    height: 0.85rem;
    border: 3px solid var(--paper-bright);
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 1px var(--accent-dark);
  }

  .preset-row,
  .preset-comparisons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.38rem;
    margin-bottom: 1.3rem;
  }

  .preset-row button,
  .preset-comparisons button {
    min-height: 2.25rem;
    padding: 0.38rem 0.62rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: transparent;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 720;
  }

  .preset-row button:hover,
  .preset-row button.is-selected,
  .preset-comparisons button:hover,
  .preset-comparisons button.is-selected {
    border-color: var(--ink);
    color: var(--paper-bright);
    background: var(--ink);
  }

  .field-grid {
    display: grid;
    gap: 0.8rem;
  }

  .field-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  select,
  .field > input:not([type="range"]) {
    width: 100%;
    min-height: 2.8rem;
    padding: 0.55rem 2.1rem 0.55rem 0.68rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background-color: var(--paper-bright);
    font-size: 0.84rem;
  }

  select {
    background-image:
      linear-gradient(45deg, transparent 50%, var(--muted) 50%),
      linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position:
      calc(100% - 15px) 50%,
      calc(100% - 10px) 50%;
    background-repeat: no-repeat;
    background-size: 5px 5px, 5px 5px;
    appearance: none;
  }

  select:focus,
  .field > input:not([type="range"]):focus {
    border-color: var(--accent);
    outline: 0;
    box-shadow: 0 0 0 3px rgb(223 75 49 / 12%);
  }

  .custom-ratio {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: end;
    gap: 0.55rem;
    margin-top: 0.85rem;
  }

  .custom-ratio > span {
    padding-bottom: 0.72rem;
    color: var(--muted);
    font-family: var(--font-mono);
  }

  .advanced-options {
    margin-top: 1rem;
    border-top: 1px solid var(--line);
  }

  .advanced-options summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 3.2rem;
    color: var(--ink-soft);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 740;
    list-style: none;
  }

  .advanced-options summary::-webkit-details-marker {
    display: none;
  }

  .advanced-options summary::after {
    color: var(--accent-dark);
    content: "+";
    font-family: var(--font-mono);
    font-size: 1rem;
  }

  .advanced-options[open] summary::after {
    content: "−";
  }

  .advanced-options__content {
    padding: 0.8rem 0 0.3rem;
  }

  .toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--line);
  }

  .toggle-row__label {
    font-size: 0.8rem;
    font-weight: 760;
  }

  .switch-control {
    position: relative;
    flex: 0 0 auto;
    width: 3rem;
    height: 1.65rem;
    padding: 0.2rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--paper-deep);
    transition:
      background-color 150ms ease,
      border-color 150ms ease;
  }

  .switch-control > span:first-child {
    display: block;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    background: var(--paper-bright);
    box-shadow: 0 1px 4px rgb(0 0 0 / 20%);
    transition: transform 160ms ease;
  }

  .switch-control[aria-checked="true"] {
    border-color: var(--success);
    background: var(--success);
  }

  .switch-control[aria-checked="true"] > span:first-child {
    transform: translateX(1.3rem);
  }

  .actual-dimensions {
    padding: 0.9rem;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-md);
    background: rgb(235 228 215 / 50%);
  }

  .compare-inputs {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: end;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  .field--compact-hero .number-input input {
    height: 4rem;
    padding-right: 2.8rem;
    font-size: clamp(2rem, 4vw, 3.2rem);
  }

  .compare-arrow {
    padding-bottom: 1.1rem;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 1.25rem;
  }

  .comparison-note {
    padding: 0.9rem 0 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.78rem;
  }

  .mobile-quick-result {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0.3rem 0 1rem;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--paper-deep);
  }

  .mobile-quick-result > div {
    min-width: 0;
    padding: 0.72rem 0.8rem;
    border-right: 1px solid var(--line);
  }

  .mobile-quick-result > div:last-child {
    border-right: 0;
  }

  .mobile-quick-result dt {
    overflow: hidden;
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 720;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-quick-result dd {
    margin-top: 0.12rem;
    overflow: hidden;
    font-family: var(--font-mono);
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
    font-weight: 780;
    letter-spacing: -0.035em;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-quick-result dd.is-fit {
    color: var(--success);
  }

  .mobile-quick-result dd.is-no-fit {
    color: var(--danger);
  }

  .control-error {
    margin-top: 1rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--danger);
    border-radius: var(--radius-sm);
    color: var(--danger);
    background: var(--danger-soft);
    font-size: 0.78rem;
  }

  .rail-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.55rem;
    margin-top: 1.35rem;
    padding-top: 1.15rem;
    border-top: 1px solid var(--line);
  }

  .output-area {
    display: flex;
    min-width: 0;
    padding: clamp(1.2rem, 2.3vw, 2rem);
    background: #f7f3ea;
    flex-direction: column;
  }

  .output-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
  }

  .output-heading__label {
    margin-bottom: 0.18rem;
    color: var(--accent-dark);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 760;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .output-heading h2 {
    font-size: clamp(1.15rem, 2vw, 1.65rem);
    letter-spacing: -0.035em;
    line-height: 1.15;
  }

  .output-heading__note {
    padding-top: 0.2rem;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.67rem;
    white-space: nowrap;
  }

  .visual-stage {
    position: relative;
    min-height: 19rem;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    background: #ded8cd;
    flex: 1 1 auto;
    isolation: isolate;
  }

  .stage-grid {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image:
      linear-gradient(rgb(88 79 65 / 8%) 1px, transparent 1px),
      linear-gradient(90deg, rgb(88 79 65 / 8%) 1px, transparent 1px),
      linear-gradient(rgb(88 79 65 / 5%) 1px, transparent 1px),
      linear-gradient(90deg, rgb(88 79 65 / 5%) 1px, transparent 1px);
    background-position: center;
    background-size: 64px 64px, 64px 64px, 16px 16px, 16px 16px;
  }

  .visual-stage::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at center, rgb(255 255 255 / 38%), transparent 66%);
    content: "";
    pointer-events: none;
  }

  .space-frame {
    position: absolute;
    z-index: 0;
    border: 2px solid var(--line-strong);
    background: rgb(251 248 241 / 28%);
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 35%);
    transition:
      width 220ms ease,
      height 220ms ease,
      transform 220ms ease,
      border-color 160ms ease;
  }

  .space-frame.is-fit {
    border-color: var(--success);
  }

  .space-frame.is-no-fit {
    border-color: var(--danger);
  }

  .space-frame__label {
    position: absolute;
    top: 0.45rem;
    left: 0.55rem;
    padding: 0.18rem 0.38rem;
    border-radius: 3px;
    color: var(--muted);
    background: rgb(251 248 241 / 86%);
    font-family: var(--font-mono);
    font-size: 0.62rem;
  }

  .tv-visual {
    position: absolute;
    z-index: 2;
    min-width: 3rem;
    min-height: 1.8rem;
    border: 1px solid #090b0c;
    border-radius: clamp(3px, 0.6vw, 8px);
    background: var(--screen);
    box-shadow:
      0 24px 40px rgb(21 23 24 / 24%),
      inset 0 0 0 1px rgb(255 255 255 / 5%);
    transition:
      width 220ms cubic-bezier(0.22, 1, 0.36, 1),
      height 220ms cubic-bezier(0.22, 1, 0.36, 1),
      left 220ms cubic-bezier(0.22, 1, 0.36, 1),
      top 220ms cubic-bezier(0.22, 1, 0.36, 1),
      opacity 160ms ease;
  }

  .tv-visual__screen {
    position: absolute;
    inset: var(--bezel-y-px, 3px) var(--bezel-x-px, 3px);
    overflow: hidden;
    border-radius: max(1px, calc(clamp(3px, 0.6vw, 8px) - 2px));
    background:
      linear-gradient(132deg, rgb(255 255 255 / 6%), transparent 32%),
      radial-gradient(circle at 68% 30%, #29353a, transparent 37%),
      linear-gradient(150deg, #14191c, #080a0b 70%);
  }

  .tv-visual__screen::before {
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(rgb(255 255 255 / 3%) 1px, transparent 1px),
      linear-gradient(90deg, rgb(255 255 255 / 3%) 1px, transparent 1px);
    background-size: 22px 22px;
    content: "";
  }

  .tv-visual__screen::after {
    position: absolute;
    right: 7%;
    bottom: 8%;
    width: 35%;
    height: 1px;
    background: rgb(255 255 255 / 16%);
    box-shadow: 0 -7px 0 rgb(255 255 255 / 8%);
    content: "";
  }

  .tv-visual--secondary {
    z-index: 4;
    border: 2px dashed var(--accent);
    background: rgb(223 75 49 / 7%);
    box-shadow: none;
  }

  .tv-visual--secondary .tv-visual__screen {
    inset: 0;
    background: rgb(223 75 49 / 8%);
  }

  .tv-visual--secondary .tv-visual__screen::before,
  .tv-visual--secondary .tv-visual__screen::after {
    display: none;
  }

  .tv-visual__tag {
    position: absolute;
    top: -1.9rem;
    left: 50%;
    padding: 0.18rem 0.42rem;
    border: 1px solid rgb(255 255 255 / 14%);
    border-radius: 3px;
    color: var(--paper-bright);
    background: var(--ink);
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 760;
    white-space: nowrap;
    transform: translateX(-50%);
  }

  .tv-visual--secondary .tv-visual__tag {
    border-color: var(--accent-dark);
    color: white;
    background: var(--accent-dark);
  }

  .screen-coordinate {
    position: absolute;
    width: 0.52rem;
    height: 0.52rem;
    border-color: rgb(255 255 255 / 34%);
  }

  .screen-coordinate--top-left {
    top: 0.5rem;
    left: 0.5rem;
    border-top: 1px solid;
    border-left: 1px solid;
  }

  .screen-coordinate--bottom-right {
    right: 0.5rem;
    bottom: 0.5rem;
    border-right: 1px solid;
    border-bottom: 1px solid;
  }

  .diagonal-measure {
    position: absolute;
    bottom: 7%;
    left: 7%;
    z-index: 2;
    height: 1px;
    background: var(--accent);
    box-shadow: 0 0 0 1px rgb(223 75 49 / 10%);
    transform-origin: left center;
  }

  .diagonal-measure::before,
  .diagonal-measure::after {
    position: absolute;
    top: -3px;
    width: 6px;
    height: 6px;
    border-top: 1px solid var(--accent);
    border-right: 1px solid var(--accent);
    content: "";
  }

  .diagonal-measure::before {
    left: -1px;
    transform: rotate(225deg);
  }

  .diagonal-measure::after {
    right: -1px;
    transform: rotate(45deg);
  }

  .diagonal-measure span {
    position: absolute;
    top: -0.8rem;
    left: 50%;
    padding: 0.08rem 0.28rem;
    border-radius: 2px;
    color: var(--paper-bright);
    background: rgb(16 19 21 / 84%);
    font-family: var(--font-mono);
    font-size: clamp(0.55rem, 1vw, 0.72rem);
    font-weight: 760;
    white-space: nowrap;
    transform: translateX(-50%) rotate(var(--diagonal-label-rotation, 0deg));
  }

  .dimension-line {
    position: absolute;
    z-index: 5;
    color: var(--accent-dark);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    pointer-events: none;
    transition:
      width 220ms ease,
      height 220ms ease,
      left 220ms ease,
      top 220ms ease;
  }

  .dimension-line--horizontal {
    height: 1px;
    border-top: 1px solid currentColor;
  }

  .dimension-line--horizontal::before,
  .dimension-line--horizontal::after {
    position: absolute;
    top: -4px;
    width: 7px;
    height: 7px;
    border-top: 1px solid currentColor;
    border-right: 1px solid currentColor;
    content: "";
  }

  .dimension-line--horizontal::before {
    left: 0;
    transform: rotate(225deg);
  }

  .dimension-line--horizontal::after {
    right: 0;
    transform: rotate(45deg);
  }

  .dimension-line--horizontal span {
    position: absolute;
    top: 0.42rem;
    left: 50%;
    padding: 0.12rem 0.35rem;
    border-radius: 3px;
    background: rgb(244 240 231 / 90%);
    white-space: nowrap;
    transform: translateX(-50%);
  }

  .dimension-line--vertical {
    width: 1px;
    border-left: 1px solid currentColor;
  }

  .dimension-line--vertical::before,
  .dimension-line--vertical::after {
    position: absolute;
    left: -4px;
    width: 7px;
    height: 7px;
    border-top: 1px solid currentColor;
    border-right: 1px solid currentColor;
    content: "";
  }

  .dimension-line--vertical::before {
    top: 0;
    transform: rotate(-45deg);
  }

  .dimension-line--vertical::after {
    bottom: 0;
    transform: rotate(135deg);
  }

  .dimension-line--vertical span {
    position: absolute;
    top: 50%;
    left: -0.45rem;
    padding: 0.12rem 0.35rem;
    border-radius: 3px;
    background: rgb(244 240 231 / 90%);
    white-space: nowrap;
    transform: translate(-100%, -50%);
  }

  .fit-badge {
    position: absolute;
    right: 0.8rem;
    bottom: 0.8rem;
    z-index: 8;
    display: inline-flex;
    align-items: center;
    max-width: calc(100% - 1.6rem);
    gap: 0.45rem;
    padding: 0.48rem 0.62rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--ink-soft);
    background: rgb(251 248 241 / 92%);
    font-size: 0.72rem;
    font-weight: 760;
    box-shadow: 0 6px 16px rgb(48 39 25 / 10%);
  }

  .fit-badge__icon {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--muted);
  }

  .fit-badge.is-fit {
    border-color: var(--success);
    color: var(--success);
    background: rgb(219 236 229 / 94%);
  }

  .fit-badge.is-fit .fit-badge__icon {
    background: var(--success);
  }

  .fit-badge.is-no-fit {
    border-color: var(--danger);
    color: var(--danger);
    background: rgb(241 216 212 / 94%);
  }

  .fit-badge.is-no-fit .fit-badge__icon {
    background: var(--danger);
  }

  .result-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 0.85rem;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .result-strip > div {
    min-width: 0;
    padding: 0.85rem 0.75rem 0.8rem;
    border-right: 1px solid var(--line);
  }

  .result-strip > div:first-child {
    padding-left: 0;
  }

  .result-strip > div:last-child {
    padding-right: 0;
    border-right: 0;
  }

  .result-strip dt {
    overflow: hidden;
    color: var(--muted);
    font-size: 0.67rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .result-strip dd {
    margin-top: 0.18rem;
    overflow: hidden;
    font-family: var(--font-mono);
    font-size: clamp(1rem, 1.9vw, 1.35rem);
    font-variant-numeric: tabular-nums;
    font-weight: 760;
    letter-spacing: -0.045em;
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .result-strip .result-secondary {
    display: block;
    margin-top: 0.25rem;
    overflow: hidden;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.61rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .output-footnote {
    margin-top: 0.65rem;
    color: var(--muted);
    font-size: 0.68rem;
  }

  .distance-section,
  .size-table-section,
  .method-section {
    width: min(calc(100% - 2rem), var(--site-width));
    margin: clamp(4.5rem, 9vw, 8rem) auto 0;
  }

  .section-heading {
    max-width: 52rem;
    margin-bottom: 2rem;
  }

  .section-heading--split {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.85fr);
    align-items: end;
    max-width: none;
    gap: 3rem;
  }

  .section-heading h2 {
    font-size: clamp(2rem, 4vw, 3.75rem);
    letter-spacing: -0.06em;
    line-height: 1;
  }

  .section-heading > p:last-child,
  .section-heading--split > p {
    color: var(--muted);
    font-size: 0.92rem;
  }

  .distance-ruler {
    position: relative;
    min-height: 12.5rem;
    margin: 1rem 0 1.8rem;
    border-top: 1px solid var(--line-strong);
    border-bottom: 1px solid var(--line-strong);
    background:
      linear-gradient(90deg, rgb(223 75 49 / 5%), transparent 50%),
      repeating-linear-gradient(90deg, transparent 0, transparent calc(10% - 1px), rgb(169 159 144 / 27%) calc(10% - 1px), rgb(169 159 144 / 27%) 10%);
  }

  .distance-ruler__track {
    position: absolute;
    top: 54%;
    right: 2%;
    left: 2%;
    height: 2px;
    background: var(--ink);
  }

  .distance-ruler__track::after {
    position: absolute;
    top: -4px;
    right: 0;
    width: 9px;
    height: 9px;
    border-top: 2px solid var(--ink);
    border-right: 2px solid var(--ink);
    content: "";
    transform: rotate(45deg);
  }

  .distance-ruler__origin {
    position: absolute;
    top: calc(54% + 0.65rem);
    left: 2%;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.65rem;
  }

  .distance-marker {
    position: absolute;
    top: 54%;
    left: var(--marker-position, 50%);
    display: flex;
    width: 8.2rem;
    color: var(--ink-soft);
    text-align: center;
    transform: translate(-50%, -100%);
    flex-direction: column;
    align-items: center;
  }

  .distance-marker__tick {
    order: 3;
    width: 1px;
    height: 2rem;
    margin-top: 0.35rem;
    background: currentColor;
  }

  .distance-marker__label {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    line-height: 1.15;
  }

  .distance-marker strong {
    margin-top: 0.15rem;
    font-family: var(--font-mono);
    font-size: 0.76rem;
  }

  .distance-marker--pixel {
    color: var(--accent-dark);
  }

  .distance-marker--pixel .distance-marker__tick {
    height: 3.3rem;
    background: repeating-linear-gradient(to bottom, currentColor 0 3px, transparent 3px 6px);
  }

  .distance-marker--immersive {
    color: var(--accent);
  }

  .distance-marker--balanced {
    color: var(--success);
  }

  .distance-marker--relaxed {
    color: var(--ink);
  }

  .distance-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--line);
  }

  .distance-list > div {
    padding: 1rem;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .distance-list > div:first-child {
    padding-left: 0;
  }

  .distance-list > div:last-child {
    border-right: 0;
  }

  .distance-list dt {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 720;
  }

  .distance-list dd {
    margin-top: 0.2rem;
    font-family: var(--font-mono);
    font-size: clamp(1rem, 2vw, 1.35rem);
    font-weight: 760;
  }

  .distance-list .distance-meta {
    color: var(--muted);
    font-size: 0.66rem;
  }

  .table-wrap {
    overflow-x: auto;
    border-top: 1px solid var(--line-strong);
    border-bottom: 1px solid var(--line-strong);
  }

  table {
    width: 100%;
    min-width: 46rem;
  }

  th,
  td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--line);
    text-align: right;
    white-space: nowrap;
  }

  th:first-child,
  td:first-child {
    padding-left: 0;
    text-align: left;
  }

  th:last-child,
  td:last-child {
    padding-right: 0;
  }

  th {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 760;
    letter-spacing: 0.02em;
  }

  td {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
  }

  tbody tr:last-child td {
    border-bottom: 0;
  }

  tbody tr {
    transition: background-color 130ms ease;
  }

  tbody tr:hover,
  tbody tr.is-selected {
    background: rgb(251 248 241 / 75%);
  }

  .size-row-button {
    display: inline-flex;
    align-items: center;
    min-height: 2.15rem;
    gap: 0.45rem;
    padding: 0.25rem 0.55rem 0.25rem 0;
    color: var(--ink);
    background: transparent;
    font-family: var(--font-mono);
    font-weight: 780;
  }

  .size-row-button::after {
    color: var(--accent);
    content: "→";
    opacity: 0;
    transform: translateX(-0.25rem);
    transition:
      opacity 130ms ease,
      transform 130ms ease;
  }

  tr:hover .size-row-button::after,
  .size-row-button:focus-visible::after {
    opacity: 1;
    transform: translateX(0);
  }

  .method-section {
    margin-bottom: clamp(5rem, 9vw, 8rem);
  }

  .method-grid {
    border-top: 1px solid var(--line-strong);
  }

  .method-grid details {
    border-bottom: 1px solid var(--line-strong);
  }

  .method-grid summary {
    position: relative;
    padding: 1.25rem 3rem 1.25rem 0;
    cursor: pointer;
    font-size: clamp(1rem, 1.8vw, 1.28rem);
    font-weight: 760;
    letter-spacing: -0.025em;
    list-style: none;
  }

  .method-grid summary::-webkit-details-marker {
    display: none;
  }

  .method-grid summary::after {
    position: absolute;
    top: 50%;
    right: 0.35rem;
    color: var(--accent-dark);
    content: "+";
    font-family: var(--font-mono);
    font-size: 1.35rem;
    transform: translateY(-50%);
  }

  .method-grid details[open] summary::after {
    content: "−";
  }

  .method-grid details > div {
    max-width: 52rem;
    padding: 0 0 1.45rem;
    color: var(--muted);
  }

  .method-grid details p + p {
    margin-top: 0.8rem;
  }

  .source-links a {
    color: var(--ink);
  }

  .site-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 2rem;
    padding: 2.2rem max(1rem, calc((100vw - var(--site-width)) / 2));
    border-top: 1px solid var(--line-strong);
    background: var(--paper-deep);
  }

  .brand--footer {
    margin-bottom: 0.65rem;
  }

  .site-footer p {
    max-width: 38rem;
    color: var(--muted);
    font-size: 0.78rem;
  }

  .footer-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 1rem;
  }

  .footer-actions a,
  .footer-actions button {
    padding: 0;
    color: var(--muted);
    background: transparent;
    font-size: 0.78rem;
    text-decoration: none;
  }

  .footer-actions a:hover,
  .footer-actions button:hover {
    color: var(--ink);
    text-decoration: underline;
  }

  .legal-dialog {
    width: min(calc(100% - 2rem), 46rem);
    max-height: min(44rem, calc(100svh - 2rem));
    padding: 0;
    overflow: auto;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    color: var(--ink);
    background: var(--paper-bright);
    box-shadow: 0 32px 80px rgb(25 23 18 / 32%);
  }

  .legal-dialog::backdrop {
    background: rgb(27 27 24 / 60%);
    backdrop-filter: blur(4px);
  }

  .legal-dialog__header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.35rem 1.5rem;
    border-bottom: 1px solid var(--line);
    background: rgb(251 248 241 / 94%);
    backdrop-filter: blur(12px);
  }

  .legal-dialog__header h2 {
    font-size: 1.75rem;
    letter-spacing: -0.045em;
  }

  .dialog-close {
    display: grid;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    place-items: center;
  }

  .dialog-close:hover {
    border-color: var(--ink);
  }

  .dialog-close svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.8;
  }

  .legal-dialog__content {
    display: grid;
    gap: 2rem;
    padding: 1.5rem;
  }

  .legal-dialog__content h3 {
    margin-bottom: 0.55rem;
    font-size: 1rem;
  }

  .legal-dialog__content p {
    color: var(--muted);
    font-size: 0.86rem;
  }

  .legal-dialog__content p + p {
    margin-top: 0.8rem;
  }

  .toast {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 120;
    max-width: min(24rem, calc(100% - 2rem));
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--ink);
    border-radius: var(--radius-sm);
    color: white;
    background: var(--ink);
    font-size: 0.78rem;
    font-weight: 680;
    box-shadow: 0 12px 28px rgb(27 27 24 / 24%);
    animation: toast-in 180ms ease both;
  }

  .not-found-page {
    display: grid;
    min-height: 100svh;
    padding: 2rem 1rem;
    place-items: center;
  }

  .not-found-page__content {
    width: min(100%, 46rem);
    padding: clamp(2rem, 8vw, 5rem);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    background: var(--paper-bright);
    box-shadow: var(--shadow);
  }

  .not-found-page__code {
    margin-bottom: 1rem;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: clamp(4rem, 18vw, 9rem);
    font-weight: 800;
    letter-spacing: -0.09em;
    line-height: 0.8;
  }

  .not-found-page h1 {
    font-size: clamp(2rem, 6vw, 4rem);
    letter-spacing: -0.06em;
    line-height: 0.98;
  }

  .not-found-page p {
    max-width: 34rem;
    margin: 1rem 0 1.5rem;
    color: var(--muted);
  }

  .noscript-message {
    position: fixed;
    inset: auto 1rem 1rem;
    z-index: 200;
    padding: 0.85rem 1rem;
    border: 1px solid var(--danger);
    border-radius: var(--radius-sm);
    color: var(--danger);
    background: var(--danger-soft);
    text-align: center;
  }

  @keyframes panel-in {
    from {
      opacity: 0;
      transform: translateY(0.35rem);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes toast-in {
    from {
      opacity: 0;
      transform: translateY(0.5rem);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

@layer utilities {
  .sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
  }

  [hidden] {
    display: none !important;
  }
}

@media (max-width: 980px) {
  .calculator__workspace {
    grid-template-columns: minmax(18.5rem, 22rem) minmax(0, 1fr);
  }

  .result-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-strip > div:nth-child(2) {
    border-right: 0;
  }

  .result-strip > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .result-strip > div:nth-child(3) {
    padding-left: 0;
  }

  .distance-marker {
    width: 6.8rem;
  }
}

@media (max-width: 760px) {
  .site-header {
    min-height: 3.8rem;
  }

  .brand__mark {
    width: 2rem;
    height: 2rem;
  }

  .site-header .brand__text {
    max-width: 9rem;
    font-size: 0.78rem;
    line-height: 1.08;
  }

  .header-actions .button span {
    display: none;
  }

  .header-actions .button {
    width: 2.55rem;
    padding: 0;
  }

  .intro {
    padding-top: 2.2rem;
  }

  .intro h1 {
    max-width: 10ch;
    font-size: clamp(2.6rem, 14vw, 4.25rem);
  }

  .calculator {
    width: 100%;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .mode-tab {
    min-height: 3.75rem;
    gap: 0.3rem;
    padding: 0.7rem 0.35rem;
    font-size: 0.76rem;
  }

  .mode-tab__number {
    display: none;
  }

  .calculator__workspace {
    display: block;
    height: auto;
    min-height: 0;
  }

  .control-rail {
    overflow: visible;
    max-height: none;
    padding: 1.2rem 1rem 1.35rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .output-area {
    min-height: 36rem;
    padding: 1.1rem 1rem 1.25rem;
  }

  .visual-stage {
    min-height: 22rem;
  }

  .number-input input {
    height: 4.25rem;
    font-size: 3rem;
  }

  .mobile-quick-result {
    display: grid;
  }

  .field-grid--two {
    gap: 0.65rem;
  }

  .rail-actions {
    grid-template-columns: 1fr auto;
  }

  .output-heading__note {
    display: none;
  }

  .result-strip dd {
    font-size: 1rem;
  }

  .distance-section,
  .size-table-section,
  .method-section {
    width: calc(100% - 2rem);
    margin-top: 4.5rem;
  }

  .section-heading--split {
    display: block;
  }

  .section-heading--split > p {
    margin-top: 1rem;
  }

  .distance-ruler {
    min-height: 14rem;
    overflow: hidden;
  }

  .distance-marker {
    width: 5.8rem;
  }

  .distance-marker__label {
    font-size: 0.56rem;
  }

  .distance-marker strong {
    font-size: 0.67rem;
  }

  .distance-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .distance-list > div:nth-child(2) {
    border-right: 0;
  }

  .distance-list > div:first-child,
  .distance-list > div:nth-child(3) {
    padding-left: 0;
  }

  .site-footer {
    display: block;
  }

  .footer-actions {
    justify-content: flex-start;
    margin-top: 1.4rem;
  }
}

@media (max-width: 430px) {
  .unit-switch {
    grid-template-columns: repeat(2, 2.15rem);
  }

  .unit-switch__button {
    min-height: 1.95rem;
    padding: 0;
  }

  .field-grid--two {
    grid-template-columns: 1fr;
  }

  .field-cluster .field-grid--two,
  .actual-dimensions .field-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compare-inputs {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0.4rem;
  }

  .field--compact-hero .number-input input {
    height: 3.6rem;
    padding-right: 2.2rem;
    font-size: 2rem;
  }

  .field--compact-hero .number-input__unit {
    right: 0;
  }

  .visual-stage {
    min-height: 19rem;
  }

  .dimension-line--vertical span {
    left: 0.35rem;
    transform: translate(0, -50%);
  }

  .result-strip > div {
    padding: 0.75rem 0.5rem;
  }

  .result-strip dt,
  .result-strip .result-secondary {
    font-size: 0.58rem;
  }

  .distance-ruler {
    margin-right: -0.25rem;
    margin-left: -0.25rem;
  }

  .distance-marker {
    width: 4.9rem;
  }

  .distance-marker--balanced {
    transform: translate(-58%, -100%);
  }

  .distance-marker--relaxed {
    transform: translate(-75%, -100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  @page {
    margin: 0.5in;
  }

  body {
    color: black;
    background: white;
  }

  .site-header,
  .skip-link,
  .mode-tabs,
  .control-rail,
  .size-table-section,
  .method-section,
  .site-footer,
  .toast,
  .button,
  .output-heading__note {
    display: none !important;
  }

  .intro {
    padding: 0 0 0.2in;
  }

  .intro h1 {
    font-size: 30pt;
  }

  .intro__lede {
    font-size: 10pt;
  }

  .calculator {
    width: 100%;
    border: 0;
    box-shadow: none;
  }

  .calculator__workspace {
    display: block;
    height: auto;
    min-height: 0;
  }

  .output-area {
    padding: 0;
    background: white;
  }

  .visual-stage {
    min-height: 4.8in;
    break-inside: avoid;
    background: white;
  }

  .stage-grid {
    opacity: 0.45;
  }

  .result-strip,
  .distance-list {
    break-inside: avoid;
  }

  .distance-section {
    width: 100%;
    margin-top: 0.35in;
  }

  .distance-ruler {
    min-height: 1.75in;
  }

  .section-heading h2 {
    font-size: 22pt;
  }
}
