:root {
  color-scheme: light;
  --ink: #101a42;
  --muted: #4c5a75;
  --blue: #244af4;
  --blue-dark: #1835b7;
  --surface: #fff;
  --background: #edf1f7;
  --line: #8494b3;
  --rule: #c9d4e4;
  --radius: 12px;
  font: 16px/1.5 "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--background);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
a { color: var(--blue-dark); }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, summary:focus-visible, .target:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
p, h1, h2, fieldset { margin: 0; }
h1, h2, .brand { font-family: Georgia, "Times New Roman", serif; }
h1 { font-size: clamp(2.15rem, 4.55vw, 3.5rem); line-height: 1.08; letter-spacing: -.045em; }
h2 { font-size: clamp(1.37rem, 2.5vw, 1.95rem); line-height: 1.13; letter-spacing: -.033em; }
.shell { width: min(100% - 56px, 1200px); margin-inline: auto; }
.masthead { background: var(--surface); border-bottom: 1px solid var(--ink); }
.masthead-inner { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 13px; font-size: 1.4rem; font-weight: 700; white-space: nowrap; }
.brand-mark {
  position: relative;
  display: block;
  width: 23px;
  height: 23px;
  border: 1.7px solid var(--blue);
  border-radius: 50%;
  color: var(--blue);
}
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; inset: -6px; }
.brand-mark::before { background: linear-gradient(currentColor,currentColor) center / 1.5px 100% no-repeat; }
.brand-mark::after { background: linear-gradient(currentColor,currentColor) center / 100% 1.5px no-repeat; }
.brand span:last-child { border-left: 1px solid var(--ink); padding-left: 12px; }
.button, .text-button { border-radius: 7px; }
.button {
  border: 1px solid var(--blue);
  background: var(--surface);
  color: var(--blue-dark);
  padding: 8px 15px;
  min-height: 44px;
  font-weight: 650;
}
.button:hover { background: #eef2ff; }
.intro { padding: 29px 4px 22px; }
.intro p { margin-top: 7px; font-size: clamp(.98rem, 1.6vw, 1.17rem); }
.quality-link { display: inline-block; margin-top: 7px; padding-block: 3px; font-size: .87rem; }
.intro .remember { margin-inline-start: 14px; }
.intro .field-error { font-size: .83rem; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr; margin-bottom: 19px; }
.steps button {
  position: relative;
  padding: 9px 10px;
  min-height: 49px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: .94rem;
  font-weight: 650;
}
.steps button:first-child { border-radius: 8px 0 0 8px; }
.steps button:last-child { border-radius: 0 8px 8px 0; }
.steps button + button { margin-left: -1px; }
.steps button span { margin-right: .38em; color: var(--muted); font-variant-numeric: tabular-nums; }
.steps button[aria-selected="true"] { border-color: var(--blue); background: #dfeaff; color: var(--blue-dark); z-index: 1; }
.steps button[aria-selected="true"] span { color: inherit; }
.steps button:hover:not([aria-selected="true"]) { background: #f5f8fc; }
.steps button:focus-visible { z-index: 2; }
.workbench { display: grid; grid-template-columns: 1.055fr 1fr; gap: 17px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 19px 21px; min-width: 0; }
.panel-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 9px 14px; flex-wrap: wrap; }
.muted { color: var(--muted); font-size: .89rem; }
.panel > .muted { margin-top: 7px; }
.text-button { border: 0; background: transparent; color: var(--blue-dark); font-size: .82rem; padding: 2px 4px; min-height: 32px; }
.text-button:hover:not(:disabled) { text-decoration: underline; }
.diameter-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 6px 10px;
  margin-top: 12px;
}
.diameter-controls label:first-child { display: grid; }
.diameter-controls input { max-width: 11em; }
.panel > .diameter-help { font-size: .78rem; }
.target {
  position: relative;
  cursor: crosshair;
  touch-action: manipulation;
  user-select: none;
  width: min(100%, 386px);
  aspect-ratio: 1;
  margin: 13px auto 5px;
  border: 1px solid #9dbde6;
  background-color: #f6fbff;
  background-image: linear-gradient(#a6c7ed 1px, transparent 1px), linear-gradient(90deg, #a6c7ed 1px, transparent 1px), linear-gradient(#d9eaf9 1px, transparent 1px), linear-gradient(90deg, #d9eaf9 1px, transparent 1px);
  background-size: 10% 10%, 10% 10%, 2% 2%, 2% 2%;
  background-position: -1px -1px;
}
.ring, .axis, .spot, .axis-label { position: absolute; }
.ring { border: 1px solid var(--blue); border-radius: 50%; top: 50%; left: 50%; aspect-ratio: 1; transform: translate(-50%, -50%); }
.ring-outer { width: 73%; }
.ring-outer.measured { border-width: 2px; }
.ring-inner { width: 46%; }
.horizontal { inset: 50% 0 auto; height: 1px; background: #324570; }
.vertical { inset: 0 auto 0 50%; width: 1px; background: #324570; }
.axis-label { font: 700 .72rem ui-monospace, monospace; padding: 1px 3px; background: #f6fbff; }
.label-x { right: 1%; top: calc(50% + 4px); }
.label-y { left: calc(50% + 4px); top: 1%; }
.spot { width: 15px; height: 15px; border-radius: 50%; transform: translate(-50%, -50%); }
.near { background: var(--blue); }
.far { background: #fff; border: 2px solid #a34a00; }
.spot.near { border: 2px solid #fff; z-index: 1; }
.spot.far { width: 25px; height: 25px; background: transparent; box-shadow: 0 0 0 1px #fff; z-index: 2; }
.target-caption { width: min(100%, 386px); margin-inline: auto; display: flex; justify-content: space-between; gap: 7px; font-size: .76rem; color: var(--muted); }
.mark-picker { margin-top: 10px; }
.mark-picker label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 3px 9px;
  margin: 2px 4px 0 0;
  border: 1px solid var(--rule);
  border-radius: 6px;
  cursor: pointer;
}
.mark-picker label:has(:checked) { background: #edf2ff; border-color: var(--blue); }
.mark-picker input { margin: 0; accent-color: var(--blue); }
.mark-picker input[value="far"]:checked { accent-color: #a34a00; }
.panel > .input-help { margin-top: 12px; font-size: .8rem; }
.mark-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 147px), 1fr)); gap: 14px; margin-top: 12px; }
fieldset { min-width: 0; padding: 0; border: 0; }
legend { padding: 0; font-weight: 650; font-size: .84rem; margin-bottom: 4px; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.number-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
label { font-size: .83rem; }
.number-pair input, .tolerance input, .diameter-controls input {
  width: 100%;
  padding: 7px 9px;
  margin-top: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 42px;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}
input[aria-invalid="true"] { border-color: #9b2c20; }
.target-options { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 15px; margin-top: 8px; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.checkbox input { margin: 0; width: 16px; height: 16px; accent-color: var(--blue); }
.tolerance { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 9px; }
.tolerance input { width: 80px; margin: 0; }
.field-error { color: #90291f; font-size: .83rem; margin-top: 7px; }
.inspection { display: flex; flex-direction: column; gap: 17px; min-width: 0; }
.result { border-color: #7094d6; background: #e1ecfd; }
.result[data-tone="warn"] { border-color: #b27122; background: #fff3dd; }
.result p { margin-top: 9px; }
.support-directions { margin: 11px 0 0; padding-inline-start: 20px; }
.support-directions li + li { margin-top: 5px; }
#result-action { font-size: .9rem; }
.tube-views { display: inline-flex; gap: 4px; padding: 3px; background: #edf2fb; border-radius: 8px; margin-top: 12px; }
.tube-views button { border: 1px solid transparent; border-radius: 7px; background: transparent; padding: 5px 8px; min-height: 38px; font-size: .82rem; }
.tube-views button[aria-pressed="true"] { border-color: #a3b4d5; background: white; color: var(--blue-dark); }
.tube-figure { margin: 9px 0 0; }
.tube-drawing { position: relative; height: 113px; }
.tube-drawing > div { position: absolute; }
.tube-body {
  top: 40px;
  inset-inline: 8%;
  height: 37px;
  border: 1.5px solid #7488af;
  border-radius: 19px;
  background: #edf2fb;
}
.tube-body::before, .tube-body::after {
  content: "";
  position: absolute;
  top: 10px;
  height: 13px;
  width: 12px;
  border: 1px solid #7488af;
  background: #edf2fb;
}
.tube-body::before { right: 100%; }
.tube-body::after { left: 100%; }
.tube-axis { top: 58px; inset-inline: 5%; border-top: 1px dashed #283c65; }
.tube-base {
  inset: auto 4% 1px;
  height: 9px;
  border-top: 1px solid #283c65;
  background: repeating-linear-gradient(135deg, transparent 0 6px, #283c65 6px 7px, transparent 7px 9px);
}
.tube-mount { top: 55px; bottom: 9px; width: 25px; border: 1px solid #283c65; background: #f0f4fc; }
.tube-rear { left: 18%; transform: translateX(-50%); }
.tube-output { right: 18%; transform: translateX(50%); }
.tube-drawing[data-view="top"] .tube-base { display: none; }
.tube-drawing[data-view="top"] .tube-mount { top: 33px; bottom: 29px; }
.tube-arrow { top: 1px; color: var(--blue-dark); font: 700 28px/1 system-ui, sans-serif; }
.tube-drawing[data-motion="up"] .tube-output::after,
.tube-drawing[data-motion="down"] .tube-rear::after { content: "↑"; }
.tube-drawing[data-motion="down"] .tube-output::after,
.tube-drawing[data-motion="up"] .tube-rear::after { content: "↓"; }
.tube-labels { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; text-align: center; min-width: 0; font-size: .81rem; }
.tube-labels span { display: block; color: var(--blue-dark); font-weight: 650; }
.tube-figure figcaption { margin-top: 9px; font-size: .77rem; }
.instructions { margin: 10px 0; padding-left: 22px; }
.instructions li + li { margin-top: 7px; }
details { border-top: 1px solid var(--rule); margin-top: 14px; padding-top: 10px; }
summary { cursor: pointer; font-weight: 650; min-height: 36px; }
details p { font-size: .89rem; margin-top: 5px; }
.nozzle-outcome { display: grid; gap: 4px; margin-top: 12px; }
.nozzle-outcome select { border: 1px solid var(--line); border-radius: 6px; min-height: 42px; color: inherit; font: inherit; width: 100%; }
.screw-guide { margin-top: 12px; padding: 11px 12px; border: 1px solid var(--rule); border-radius: 8px; background: #f7faff; }
.screw-title { margin: 0; font-size: 1rem; }
.screw-advice { margin-top: 5px; font-size: .9rem; font-weight: 650; }
.screw-guide > .muted { margin-top: 10px; font-size: .78rem; }
.screw-guide details { margin-top: 9px; }
.screw-figure { display: flex; align-items: center; gap: 12px; margin: 12px 0 0; }
.screw-layout { position: relative; flex: 0 0 88px; height: 83px; border: 1px solid #7488af; border-radius: 8px; background: #e9effa; }
.screw-layout::before { content: ""; position: absolute; top: 18px; left: 26px; width: 30px; height: 30px; border: 1px solid #7488af; background: white; border-radius: 50%; }
.screw-knob { position: absolute; display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid #7488af; border-radius: 50%; background: white; font-size: .76rem; font-weight: 700; }
.knob-a { bottom: 5px; left: 5px; }
.knob-b { top: 5px; right: 5px; }
.knob-c { bottom: 5px; right: 5px; }
.screw-layout[data-turned="true"] { transform: rotate(180deg); }
.screw-layout[data-turned="true"] .screw-knob { transform: rotate(180deg); }
.screw-layout[data-active="0"] .knob-a, .screw-layout[data-active="1"] .knob-b, .screw-layout[data-active="2"] .knob-c { color: white; background: var(--blue-dark); border-color: var(--blue-dark); }
.screw-figure figcaption { font-size: .78rem; }
.use-photo-layout { margin-top: 9px; font-size: .82rem; }
.screw-controls { display: grid; gap: 7px; margin-top: 8px; }
.screw-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 165px), 1fr)); gap: 5px 8px; }
.screw-controls label { min-width: 0; }
.screw-controls input, .screw-controls select { display: block; width: 100%; min-height: 42px; margin-top: 3px; border: 1px solid var(--line); border-radius: 6px; padding: 6px 7px; background: white; color: inherit; font: inherit; font-size: 1rem; }
.quality { margin-top: 17px; scroll-margin-top: 14px; }
.quality-status { margin-top: 8px; font-weight: 650; }
.quality[data-status="fail"] .quality-status,
.quality-list p[data-status="fail"] { color: #90291f; }
.quality[data-status="check"] .quality-status,
.quality-list p[data-status="check"] { color: #713e09; }
.quality[data-status="pass"] .quality-status { color: #1b6345; }
.quality-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 11px 21px; padding: 0; margin: 13px 0 0; list-style: none; }
.quality-list li { border-top: 1px solid var(--rule); padding-top: 9px; }
.quality-list h3 { font-size: .93rem; margin: 0 0 4px; }
.quality-list p { font-size: .81rem; overflow-wrap: anywhere; margin-bottom: 4px; }
.quality-list p[data-status="pending"] { color: var(--muted); }
.safety { display: flex; align-items: center; gap: 11px; margin-top: 17px; padding: 11px 14px; border: 1px solid #c8903e; border-radius: 8px; color: #713e09; background: #fff4df; font-size: .88rem; }
.info-icon { flex: 0 0 23px; height: 23px; border: 1px solid currentColor; border-radius: 50%; text-align: center; font: 700 16px/21px Georgia, serif; }
footer { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; padding: 11px 3px 18px; font-size: .82rem; color: var(--muted); }
footer a { display: inline-flex; align-items: center; min-height: 36px; }

@media (max-width: 790px) {
  .shell { width: calc(100% - 30px); }
  .workbench { grid-template-columns: minmax(0, 1fr); }
  .panel { padding: 15px 16px; }
}
@media (max-width: 490px) {
  .shell { width: calc(100% - 24px); }
  .masthead-inner { min-height: 57px; }
  .brand { font-size: 1.05rem; gap: 8px; padding-left: 4px; }
  .brand-mark { width: 16px; height: 16px; }
  .brand span:last-child { padding-left: 8px; }
  .button { padding-inline: 8px; font-size: .78rem; }
  .intro { padding: 22px 1px 16px; }
  .intro .remember { display: flex; margin-inline-start: 0; }
  .steps button { font-size: .75rem; padding: 6px 5px; line-height: 1.3; }
  .steps button span { display: block; margin: 0 0 2px; }
  .steps { margin-bottom: 13px; }
  .workbench, .inspection { gap: 12px; }
  .panel { padding: 12px; }
}
