@font-face {
  font-family: Bricolage;
  src: url("fonts/bricolage.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: DM;
  src: url("fonts/dm-sans.ttf") format("truetype");
  font-weight: 100 1000;
  font-display: swap;
}
@font-face {
  font-family: Plex;
  src: url("fonts/plex-mono.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
:root {
  color-scheme: light;
  --ink: #17283b;
  --muted: #52647a;
  --line: #d9e0e5;
  --blue: #3768bb;
  --orange: #ff784f;
  --grid: #eaf4fa;
  --surface: #fbfcfd;
  --heading: Bricolage, Arial, sans-serif;
  --mono: Plex, Consolas, monospace;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  background: #f8fafb;
  color: var(--ink);
  font:
    500 16px/1.5 DM,
    Arial,
    sans-serif;
}
button,
input,
a {
  font: inherit;
  color: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button {
  background: none;
  border: 0;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
svg:focus-visible {
  outline: 3px solid #3768bb;
  outline-offset: 4px;
}
a {
  text-decoration: none;
}
button,
input {
  accent-color: var(--ink);
}
h1,
h2,
h3,
p,
dl,
dd {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: var(--heading);
  font-weight: 750;
}
i {
  display: inline-flex;
  font-style: normal;
  flex-shrink: 0;
}
i svg {
  width: 100%;
  height: 100%;
}
.header {
  height: 70px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.header-inner,
main {
  width: min(1248px, calc(100% - clamp(40px, 9vw, 150px)));
  margin: auto;
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 48px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  font: 800 29px/1 var(--heading);
  letter-spacing: -2px;
}
.wordmark svg {
  width: 32px;
  height: 32px;
  margin-right: 10px;
}
.wordmark span {
  color: #596b80;
}
.header nav {
  align-self: stretch;
  display: flex;
  gap: 28px;
  align-items: stretch;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 22px);
}
.guide-link {
  color: #294f76;
  font-size: 13px;
  font-weight: 720;
  text-underline-offset: 4px;
}
.header nav a {
  position: relative;
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 650;
  color: var(--muted);
}
.header nav a[aria-current] {
  color: var(--ink);
}
.header nav a[aria-current]:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--orange);
  border-radius: 2px;
}
.method-link,
.source-link,
.study,
.privacy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.method-link {
  margin-left: auto;
  font-size: 14px;
  font-weight: 650;
}
.method-link i,
.source-link i,
.study i {
  width: 17px;
  height: 17px;
}
main {
  padding: 43px 0 55px;
}
h1 {
  font-size: clamp(39px, 5vw, 72px);
  letter-spacing: -0.065em;
  line-height: 1.04;
}
h1 span,
.compare-head h2 span {
  color: #e46741;
}
.intro {
  color: var(--muted);
  margin-top: 10px;
  font-size: clamp(15px, 1.3vw, 18px);
}
.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.95fr) minmax(300px, 1fr);
  gap: 20px;
  margin-top: 27px;
}
.stage-card,
.controls,
.compare-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.stage-card {
  border-color: #bdced8;
  position: relative;
  display: flex;
  min-height: 434px;
  flex-direction: column;
  background-color: var(--grid);
  isolation: isolate;
}
.stage-card:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(90deg, #a8c6d52b 1px, transparent 1px),
    linear-gradient(#a8c6d52b 1px, transparent 1px),
    linear-gradient(90deg, #a4c3d540 1px, transparent 1px),
    linear-gradient(#a4c3d540 1px, transparent 1px);
  background-size:
    16px 16px,
    16px 16px,
    80px 80px,
    80px 80px;
  background-position: center;
}
.stage-top,
.stage-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  position: relative;
  z-index: 2;
}
.stage-top {
  padding: 16px 18px 0;
}
.stage-bottom {
  padding: 0 18px 15px;
}
.stage-top > *,
.stage-bottom > * {
  pointer-events: auto;
}
.segmented {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #edf1f4;
}
.segmented button {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 680;
  white-space: nowrap;
  color: var(--muted);
}
.segmented i,
.square i,
.primary i {
  width: 18px;
  height: 18px;
}
.segmented button[aria-pressed="true"] {
  background: var(--ink);
  color: white;
}
.states,
.tools {
  background: #ffffffd9;
  border-color: #c4d3db;
}
.square {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}
.stage-top .square {
  border-color: #c4d3db;
}
.square:hover,
.method-link:hover,
.source-link:hover {
  color: var(--blue);
}
.stage-hint {
  font-size: 12px;
  color: #4b667b;
  margin-right: auto;
}
.hair-option {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 4px;
  width: clamp(130px, 29%, 205px);
  min-width: 0;
  padding: 5px 10px 1px;
  border: 1px solid #c4d3db;
  border-radius: 10px;
  background: #fffffff0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
}
.hair-option span {
  color: #425a70;
  font: 500 10px/1.2 var(--mono);
  white-space: nowrap;
}
.hair-option .slider {
  grid-column: 1 / -1;
  height: 24px;
  margin: 0;
  touch-action: pan-y;
}
.hair-option:has(.slider:focus-visible) {
  outline: 2px solid #3768bb;
  outline-offset: 1px;
}
.hair-option .slider:focus-visible {
  outline: none;
}
#hit-pouch {
  pointer-events: fill;
}
#hit-pouch:focus-visible {
  outline: none;
  stroke: #294f76;
  stroke-width: 2px;
  vector-effect: non-scaling-stroke;
}
.tools button[aria-pressed="true"] {
  background: #dae7ef;
  color: var(--ink);
}
#scene {
  position: relative;
  flex: 1;
  min-height: 250px;
}
#surface,
#gestures {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
#gestures {
  /* The SVG viewport owns touch gestures only when a hit path is targeted. */
  touch-action: none;
  pointer-events: none;
  border-radius: 4px;
}
.hit {
  touch-action: none;
  pointer-events: stroke;
  cursor: grab;
}
.hit:active {
  cursor: grabbing;
}
.handle {
  pointer-events: all;
  cursor: ew-resize;
}
#hit-girth {
  cursor: ns-resize;
}
.controls {
  padding: 24px 25px 20px;
  background: white;
  display: flex;
  flex-direction: column;
}
.panel-heading,
.compare-head,
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.panel-heading h2 {
  font-size: clamp(22px, 2vw, 30px);
  letter-spacing: -0.055em;
  line-height: 1.05;
}
.panel-heading .square {
  width: 35px;
  height: 35px;
}
.panel-heading .square i {
  width: 16px;
  height: 16px;
}
#measurements {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  margin: 18px 0 23px;
}
.measure-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.measure-row label {
  font-size: 15px;
  font-weight: 680;
}
.diameter-readout {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
  padding: 11px 0;
  margin-bottom: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.diameter-readout output {
  flex-shrink: 0;
  color: var(--ink);
  font: 500 12px var(--mono);
}
.simulator-help-link {
  align-self: center;
  color: #294f76;
  margin-top: 8px;
  padding: 5px 7px;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.number-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 6px;
}
.number-wrap input {
  width: 4.25ch;
  min-width: 0;
  text-align: right;
  appearance: textfield;
  padding: 0 1px;
  background: transparent;
  border: 0;
  border-bottom: 1px dashed #a9b6c1;
  border-radius: 0;
  color: var(--ink);
  font: 500 22px/1.4 var(--mono);
}
.number-wrap > span,
.limits {
  font: 500 11px/1.3 var(--mono);
  color: var(--muted);
}
.number-wrap input::-webkit-inner-spin-button {
  appearance: none;
}
.slider {
  width: 100%;
  margin: 7px 0 0;
  display: block;
  height: 26px;
  appearance: none;
  background: transparent;
  cursor: pointer;
  --fill: 0%;
}
.slider::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 6px;
  background: linear-gradient(to right, var(--ink) var(--fill), #e1e7eb var(--fill));
}
.slider::-moz-range-track {
  height: 5px;
  border-radius: 6px;
  background: #e1e7eb;
}
.slider::-moz-range-progress {
  height: 5px;
  background: var(--ink);
  border-radius: 6px;
}
.slider::-webkit-slider-thumb {
  appearance: none;
  border: 3px solid #fff;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  margin-top: -7px;
  background: var(--ink);
  box-shadow: 0 0 0 1px #708192;
}
.slider::-moz-range-thumb {
  border: 3px solid #fff;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 1px #708192;
}
.limits {
  display: flex;
  justify-content: space-between;
  color: #657488;
}
.primary {
  width: 100%;
  border-radius: 11px;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 46px;
  padding: 0 16px;
  font-weight: 680;
}
.primary:hover {
  background: #28405a;
}
.primary .end-icon {
  margin-left: auto;
}
.privacy {
  justify-content: center;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.3;
  margin-top: 13px;
}
.privacy i {
  width: 14px;
  height: 14px;
}
#palyginimas {
  margin-top: 38px;
  scroll-margin-top: 6px;
}
.compare-head {
  margin-bottom: 15px;
}
.compare-head h2 {
  font-size: clamp(29px, 3.25vw, 44px);
  letter-spacing: -0.063em;
  line-height: 1.08;
}
.compare-tabs button[aria-pressed="true"] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px #17283b24;
}
.compare-card {
  display: grid;
  grid-template-columns: minmax(0, 1.95fr) minmax(300px, 1fr);
  background: white;
}
.compare-plot {
  min-width: 0;
  padding: 23px 26px 17px;
}
.plot-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 5px;
}
.diagram {
  display: block;
  width: 100%;
  height: auto;
  max-height: 164px;
}
.legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend b {
  width: 15px;
  height: 8px;
  border: 1.5px solid #b04a2d;
  background: #ff9b79;
  border-radius: 5px;
}
.legend span + span b {
  background: #e5effa;
  border: 1.5px dashed var(--blue);
}
.report {
  border-left: 1px solid var(--line);
  padding: 23px 25px;
}
.report h3 {
  font-size: 20px;
  letter-spacing: -0.045em;
}
.report dl {
  display: flex;
  gap: 26px;
  margin: 15px 0 12px;
}
.report dt {
  color: var(--muted);
  font-size: 12px;
}
.report dd {
  font: 500 17px var(--mono);
  margin-top: 3px;
}
.report p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.source-link {
  margin-top: 12px;
  padding: 6px 0;
  font-size: 12px;
  color: var(--muted);
}
dialog {
  width: min(490px, calc(100vw - 28px));
  max-height: 88dvh;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  color: var(--ink);
  box-shadow: 0 20px 70px #102c4333;
}
dialog::backdrop {
  background: #15263866;
}
.dialog-head h2 {
  font-size: 29px;
  letter-spacing: -0.05em;
}
dialog p {
  font-size: 14px;
  color: var(--muted);
  margin: 12px 0;
}
.study {
  color: var(--blue);
  font-weight: 650;
  font-size: 14px;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin: 17px 0;
  font-size: 14px;
}
caption {
  text-align: left;
  font-weight: 700;
  margin-bottom: 5px;
}
th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 5px 0;
}
td small {
  display: block;
  font: 500 10px var(--mono);
  color: var(--muted);
}
@media (max-width: 910px) {
  main,
  .header-inner {
    width: calc(100% - 44px);
  }
  .workbench,
  .compare-card {
    grid-template-columns: minmax(0, 1.55fr) minmax(260px, 1fr);
  }
  .controls,
  .report {
    padding: 18px;
  }
  .stage-top {
    padding: 12px 12px 0;
  }
  .stage-bottom {
    padding: 0 12px 12px;
  }
  .stage-hint {
    display: none;
  }
  .stage-card {
    min-height: 410px;
  }
}
@media (max-width: 715px) {
  .header {
    height: 56px;
  }
  .header nav {
    display: none;
  }
  .wordmark {
    font-size: 25px;
  }
  .wordmark svg {
    width: 29px;
    height: 29px;
  }
  .method-link {
    font-size: 13px;
  }
  main,
  .header-inner {
    width: calc(100% - 32px);
  }
  main {
    padding: 26px 0 32px;
  }
  h1 {
    font-size: clamp(35px, 7.8vw, 49px);
  }
  .intro {
    font-size: 14px;
    max-width: 42ch;
    line-height: 1.4;
    margin-top: 8px;
  }
  .workbench {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 17px;
  }
  .stage-card {
    min-height: 0;
    height: clamp(305px, 83vw, 385px);
    border-radius: 15px;
  }
  .stage-top {
    padding: 9px 10px 0;
  }
  .stage-bottom {
    padding: 0 10px 9px;
  }
  #scene {
    min-height: 0;
  }
  .segmented button {
    font-size: 12px;
    min-height: 36px;
    padding: 6px 9px;
  }
  .stage-hint {
    font-size: 11px;
  }
  .controls {
    border-radius: 15px;
    padding: 16px;
  }
  .panel-heading h2 {
    font-size: 24px;
  }
  #measurements {
    gap: 11px;
    margin: 12px 0 13px;
  }
  .measure-row label {
    font-size: 14px;
  }
  .number-wrap input {
    font-size: 19px;
  }
  .privacy {
    margin-top: 9px;
  }
  .compare-card {
    grid-template-columns: 1fr;
  }
  .compare-head {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
  }
  .compare-plot,
  .report {
    padding: 16px;
  }
  .report {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  #palyginimas {
    margin-top: 26px;
  }
  .compare-head h2 {
    font-size: 30px;
  }
  .compare-tabs button {
    min-height: 33px;
  }
  .report dl {
    margin: 10px 0;
  }
  .diagram {
    min-height: 95px;
  }
}
@media (max-width: 370px) {
  main,
  .header-inner {
    width: calc(100% - 24px);
  }
  .stage-hint {
    font-size: 10px;
  }
  .stage-card {
    height: 304px;
  }
  .stage-top .square {
    width: 37px;
    height: 37px;
  }
}
@media (max-width: 480px) {
  .stage-card {
    --extra-tool-row: 38px;
  }
  .stage-bottom {
    flex-wrap: wrap;
    row-gap: 6px;
  }
  .hair-option {
    width: 100%;
    grid-template-columns: auto 1fr 4ch;
    gap: 9px;
    padding: 3px 9px;
  }
  .hair-option .slider {
    grid-area: 1 / 2;
  }
  .hair-option span {
    text-align: right;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
@media (min-width: 390px) and (max-width: 480px) {
  .stage-hint {
    display: inline;
    margin-right: 0;
  }
}
h1 {
  letter-spacing: -0.043em;
  word-spacing: 0.045em;
}
.compare-head h2,
.panel-heading h2,
.report h3 {
  letter-spacing: -0.035em;
}
.number-wrap input {
  width: 5.25ch;
}
.diagram {
  max-height: none;
}

.stage-card {
  min-height: 510px;
}
.subgroup-label {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  color: #425a70;
  margin: 0 0 14px;
}
.subgroup-label[hidden],
#region-controls[hidden] {
  display: none;
}
.subgroup-label select {
  font: inherit;
  font-weight: 650;
  border-radius: 7px;
  padding: 5px 8px;
  border: 1px solid #c5d3df;
  background: white;
  color: #26465e;
}
.region-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 0 13px;
}
.region-picker[hidden] {
  display: none;
}
.region-picker button {
  border: 1px solid #c5d3df;
  border-radius: 18px;
  padding: 6px 14px;
  min-height: 36px;
  background: white;
  font-size: 13px;
  color: #375670;
  font-weight: 650;
}
.region-picker button[aria-pressed="true"] {
  background: #294f76;
  color: white;
  border-color: #294f76;
}
.reference-ink {
  pointer-events: none;
  fill: none;
  stroke-linejoin: round;
}
.reference-underlay {
  stroke: #f2f8ff;
  stroke-width: 3.4px;
  opacity: 0.85;
}
.reference-dashes {
  stroke: #275791;
  stroke-width: 1.8px;
  stroke-dasharray: 5 3;
}
.reference-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px 14px;
  min-height: 64px;
  padding: 8px 18px;
  background: #f7fbfdf5;
  border-top: 1px solid #c5d6e0;
}
.reference-picker {
  display: grid;
  gap: 2px;
}
.reference-picker label,
.reference-details span {
  font-size: 11px;
  color: #425a70;
}
.reference-picker label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.dash-key {
  width: 17px;
  border-top: 2px dashed #275791;
}
.reference-picker select {
  font:
    650 14px/1.2 DM,
    Arial,
    sans-serif;
  color: var(--ink);
  cursor: pointer;
  padding: 3px 3px 3px 0;
  background: transparent;
  border: 0;
  width: 147px;
}
.reference-picker select:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.reference-details {
  display: grid;
  gap: 2px;
  text-align: right;
}
.reference-details output {
  font: 500 12px/1.45 var(--mono);
  color: #284d72;
}
@media (max-width: 715px) {
  .stage-card {
    height: calc(clamp(390px, 104vw, 450px) + var(--extra-tool-row, 0px));
    min-height: 0;
  }
  .reference-strip {
    padding: 7px 10px;
    min-height: 58px;
    gap: 5px;
  }
  .reference-picker select {
    width: 125px;
    font-size: 13px;
  }
  .reference-details output {
    font-size: 10px;
  }
  .reference-details span {
    font-size: 10px;
  }
}
