/* MeshRepair — precision workbench. Shared by the tool and localized guides. */
:root {
  color-scheme: light;
  --page: #f8fafc;
  --paper: #fff;
  --ink: #17263d;
  --muted: #53647b;
  --subtle: #edf2f8;
  --line: #d7e0eb;
  --accent: #2155d9;
  --accent-hover: #163ea8;
  --accent-soft: #eaf0ff;
  --success: #156447;
  --success-soft: #eaf6ef;
  --error: #a82034;
  --error-soft: #fff1f3;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --radius: 12px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica,
    Arial, sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: var(--page);
  font-size: 16px;
  line-height: 1.6;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
[hidden] {
  display: none !important;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
button,
input,
select {
  font: inherit;
}
button,
summary,
select {
  cursor: pointer;
}
button {
  color: inherit;
}
button:disabled {
  cursor: not-allowed;
}
input,
select {
  accent-color: var(--accent);
}
button,
a,
summary,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a,
summary {
  touch-action: manipulation;
}
button,
a {
  transition:
    background-color 160ms ease,
    color 160ms ease,
    border-color 160ms ease;
}
svg {
  flex-shrink: 0;
}
img {
  max-width: 100%;
  height: auto;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  line-height: 1.16;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
h1,
h2 {
  font-weight: 650;
}
::selection {
  background: #cdddff;
  color: var(--ink);
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
:target {
  scroll-margin-top: 24px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  z-index: 100;
  top: 8px;
  left: 8px;
  transform: translateY(-160%);
  background: var(--ink);
  color: white;
  padding: 12px 20px;
  border-radius: 6px;
}
.skip-link:focus {
  transform: none;
}
.site-header {
  max-width: 1440px;
  margin: 0 auto;
  min-height: 88px;
  padding: 16px 48px;
  display: flex;
  align-items: center;
  gap: 40px;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 25px;
  font-weight: 750;
  letter-spacing: -0.055em;
  line-height: 1;
  white-space: nowrap;
}
.wordmark svg {
  width: 33px;
  height: 33px;
  color: var(--accent);
}
.wordmark-light {
  font-weight: 450;
}
.wordmark-dot {
  color: var(--accent);
}
.site-header > nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-left: auto;
}
.site-header > nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 550;
}
.site-header > nav a:hover,
.site-header > nav .nav-active {
  color: var(--accent);
}
.site-header > nav span {
  font-size: 15px;
}
.language-menu {
  position: relative;
  flex-shrink: 0;
  z-index: 10;
  font-size: 14px;
}
.language-menu summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  list-style: none;
}
.language-menu summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 1.5px solid;
  border-bottom: 1.5px solid;
  transform: rotate(45deg);
  margin: -3px 2px 0 4px;
}
.language-menu summary::-webkit-details-marker {
  display: none;
}
.language-menu[open] summary {
  border-color: var(--accent);
}
.language-menu nav {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 220px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 0 12px 32px #17263d18;
}
.language-menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 5px;
  text-decoration: none;
}
.language-menu a:hover,
.language-menu a[aria-current] {
  background: var(--accent-soft);
  color: var(--accent);
}
main {
  max-width: 1440px;
  margin: auto;
  padding: 0 48px;
}
.intro {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 48px 0 42px;
}
.eyebrow {
  font: 500 12px/1.6 var(--mono);
  letter-spacing: 0.09em;
  color: var(--muted);
  text-transform: uppercase;
}
.intro .eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  margin-bottom: 16px;
}
.small-cross {
  display: inline-grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border: 1px solid var(--accent);
  line-height: 1;
  font-size: 16px;
}
.intro h1 {
  font-size: clamp(42px, 4.7vw, 68px);
  letter-spacing: -0.055em;
  line-height: 1.06;
}
.intro h1 span {
  color: var(--accent);
}
.intro-aside {
  max-width: 475px;
  justify-self: end;
}
.intro-description {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}
.intro-facts {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 550;
  color: var(--ink);
}
.intro-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 22px;
}
.primary-button,
.guide-cta,
.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid var(--accent);
  border-radius: 7px;
  background: var(--accent);
  color: white;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.primary-button:hover:enabled,
.guide-cta:hover,
.download-button:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.primary-button:disabled {
  background: var(--subtle);
  border-color: var(--line);
  color: var(--muted);
}
.secondary-link,
.text-link,
.report-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.text-link {
  border: 0;
  padding: 0;
  background: none;
}
.secondary-link:hover,
.text-link:hover,
.report-link:hover {
  text-decoration: underline;
}
.workspace {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 8px 32px #17263d06;
  scroll-margin-top: 20px;
}
.workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 65px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
}
.workspace-header > div {
  display: flex;
  align-items: center;
  gap: 14px;
}
.index-mark {
  font: 12px var(--mono);
  color: var(--accent);
}
.workspace-header h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.connection {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
.connection i {
  width: 6px;
  height: 6px;
  background: var(--muted);
  border-radius: 50%;
}
.connection[data-state="online"] i {
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-soft);
}
.connection[data-state="offline"] i {
  background: var(--error);
}
.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
}
.visual-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 24px;
  border-radius: 0 0 0 var(--radius);
  background-color: #eef3fa;
  background-image: radial-gradient(#b9c9df 0.65px, transparent 0.65px);
  background-size: 20px 20px;
}
.viewer-topline,
.viewer-bottomline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font: 12px/1.6 var(--mono);
  letter-spacing: 0.02em;
}
.viewer-marker {
  display: flex;
  align-items: center;
  gap: 8px;
}
.viewer-marker i {
  width: 6px;
  height: 6px;
  border: 1px solid var(--accent);
}
.viewer-version {
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}
.viewer-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 18px;
}
.view-options,
.comparison {
  display: inline-flex;
  align-items: stretch;
  padding: 3px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 7px;
  max-width: 100%;
}
.view-options button,
.comparison button {
  min-height: 40px;
  padding: 6px 13px;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
  overflow-wrap: anywhere;
}
.view-options button[aria-pressed="true"],
.comparison button[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent);
}
.view-options button:hover:enabled,
.comparison button:hover:enabled {
  background: var(--subtle);
}
.reset-button {
  display: inline-grid;
  place-items: center;
  width: 46px;
  min-width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: var(--muted);
}
.reset-button:hover:enabled {
  color: var(--accent);
  background: var(--accent-soft);
}
.reset-button svg {
  width: 20px;
  height: 20px;
}
.viewer {
  position: relative;
  flex: 1;
  min-height: 400px;
  margin: 8px 0;
}
#meshCanvas {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
  border-radius: 8px;
}
#meshCanvas:active {
  cursor: grabbing;
}
#meshCanvas:focus-visible {
  outline-offset: -4px;
}
.viewer-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 22px;
  text-align: center;
  color: var(--muted);
}
.viewer-fallback svg {
  width: 150px;
  height: 150px;
  color: var(--accent);
}
.viewer-fallback p {
  max-width: 320px;
  font-size: 14px;
}
.axis-marker {
  position: absolute;
  bottom: 12px;
  left: 0;
  width: 58px;
  height: 58px;
  color: var(--muted);
  pointer-events: none;
}
.axis-marker svg {
  width: 54px;
  height: 54px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
}
.axis-marker span {
  position: absolute;
  font: 9px var(--mono);
}
.axis-x {
  right: 0;
  bottom: 5px;
}
.axis-y {
  top: -3px;
  left: 24px;
}
.axis-z {
  bottom: 5px;
  left: 0;
}
.viewer-bottomline {
  border-top: 1px solid #cbd7e8;
  padding-top: 14px;
}
.viewer-coordinate {
  white-space: nowrap;
}
.viewer-notice {
  margin-top: 14px;
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  color: var(--muted);
}
.comparison {
  align-self: center;
  margin-top: 16px;
}
.control-panel {
  min-width: 0;
  padding: 24px;
  border-left: 1px solid var(--line);
}
fieldset {
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}
fieldset:disabled {
  opacity: 0.65;
}
.step-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.step-number {
  color: var(--muted);
  font: 12px var(--mono);
}
.step-heading h3 {
  font-size: 14px;
  letter-spacing: -0.02em;
  font-weight: 650;
}
.sample-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  min-height: 44px;
  padding: 4px 0 4px 6px;
  color: var(--accent);
  font-size: 12px;
  background: none;
  border: 0;
}
.sample-button:hover:enabled {
  text-decoration: underline;
}
.dropzone {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 22px 12px;
  border: 1px dashed #9eafc7;
  border-radius: 8px;
  background: var(--page);
  text-align: center;
  cursor: pointer;
  position: relative;
  transition:
    border-color 160ms,
    background-color 160ms;
}
.dropzone:hover,
.dropzone:focus-within,
.dropzone.drag-over {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.dropzone:focus-within {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.dropzone.has-file {
  border-style: solid;
  border-color: var(--accent);
  background: var(--accent-soft);
}
.upload-icon {
  color: var(--accent);
  width: 30px;
  height: 30px;
  margin-bottom: 8px;
}
.drop-title {
  font-size: 14px;
  font-weight: 650;
  overflow-wrap: anywhere;
  max-width: 100%;
}
.drop-subtitle {
  font-size: 12px;
  color: var(--muted);
}
.formats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 9px;
  font: 12px/1.6 var(--mono);
  color: var(--muted);
}
.formats b {
  font-weight: 400;
  color: #6b7e98;
}
.formats > span {
  white-space: nowrap;
}
.settings-heading {
  margin-top: 28px;
  margin-bottom: 8px;
}
.optional-tag {
  font: 12px var(--mono);
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-left: auto;
}
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  gap: 16px;
  min-height: 68px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.toggle-row > span:first-child {
  min-width: 0;
}
.toggle-row strong {
  display: block;
  font-size: 14px;
  font-weight: 550;
  line-height: 1.5;
}
.toggle-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.switch {
  position: absolute;
  width: 40px;
  height: 24px;
  right: 0;
  opacity: 0;
}
.switch-track {
  display: block;
  flex: 0 0 38px;
  height: 22px;
  border: 1px solid #8a9bb3;
  border-radius: 20px;
  background: #e3eaf3;
  transition: background 160ms;
  pointer-events: none;
}
.switch-track::before {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #53647b;
  transform: translate(2px, 2px);
  transition: transform 160ms;
}
.switch:checked + .switch-track {
  background: var(--accent);
  border-color: var(--accent);
}
.switch:checked + .switch-track::before {
  transform: translate(18px, 2px);
  background: white;
}
.switch:focus-visible + .switch-track {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
.number-row {
  display: grid;
  grid-template-columns: 1fr minmax(90px, 120px);
  gap: 8px 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
  font-size: 12px;
}
.number-row > span {
  grid-column: 1 / -1;
  color: var(--muted);
}
.number-row input {
  width: 100%;
  min-height: 44px;
  padding: 8px;
  background: var(--paper);
  border: 1px solid #8a9bb3;
  border-radius: 5px;
  color: var(--ink);
}
.advanced {
  margin: 4px 0 14px;
  font-size: 12px;
}
.advanced summary,
.report-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  min-height: 44px;
  list-style: none;
  color: var(--muted);
}
.advanced summary::-webkit-details-marker,
.report-details summary::-webkit-details-marker {
  display: none;
}
.advanced summary span,
.report-details summary span {
  font-size: 20px;
}
.advanced[open] summary span,
.report-details[open] summary span {
  transform: rotate(45deg);
}
.advanced-content {
  padding: 4px 0 14px;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  cursor: pointer;
}
.check-row input {
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  margin: 0;
}
.select-label {
  display: block;
  margin: 14px 0 6px;
}
.export-options {
  grid-column: 1 / -1;
  min-width: 0;
}
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #8a9bb3;
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  padding: 8px;
}
.advanced-content p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}
.repair-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--accent);
  border-radius: 7px;
  background: var(--accent);
  color: white;
  font-size: 14px;
  font-weight: 600;
}
.repair-button:hover:enabled {
  background: var(--accent-hover);
}
.repair-button:disabled {
  color: var(--muted);
  background: var(--subtle);
  border-color: var(--line);
}
.button-arrow {
  font-size: 20px;
  line-height: 1;
}
.repair-button[data-busy="true"] .button-arrow {
  font-size: 0;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
#cancelJob {
  justify-content: center;
  margin-top: 8px;
  color: var(--accent);
  background: var(--paper);
}
.geometry-note {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 12px;
  text-align: center;
}
.geometry-note svg {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  fill: none;
  stroke: currentColor;
}
#processingLocation {
  margin-top: 6px;
  font-size: 12px;
}
.job-status {
  margin-top: 16px;
  padding: 12px;
  font-size: 13px;
  background: var(--accent-soft);
  border-radius: 6px;
  color: var(--accent);
  overflow-wrap: anywhere;
}
.job-status[data-state="error"],
.field-error {
  color: var(--error);
}
.job-status[data-state="error"] {
  background: var(--error-soft);
}
.field-error {
  margin-top: 12px;
  font-size: 13px;
}
.result-panel {
  padding: 32px;
  border-top: 1px solid var(--line);
  background: var(--paper);
  border-radius: 0 0 var(--radius) var(--radius);
}
.result-panel[data-state="working"] .result-icon,
.result-panel[data-state="working"] .result-badge,
.result-panel[data-state="working"] #resultEyebrow,
.result-panel[data-state="working"] #checkCount,
.result-panel[data-state="working"] #clear {
  visibility: hidden;
}
.result-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.result-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: var(--success);
  background: var(--success-soft);
  font-size: 20px;
}
.result-heading .eyebrow {
  color: var(--success);
  font-size: 12px;
  margin-bottom: 4px;
}
.result-heading h3 {
  font-size: 26px;
}
.result-badge {
  padding: 6px 10px;
  border: 1px solid #b1d8c4;
  background: var(--success-soft);
  color: var(--success);
  border-radius: 5px;
  margin-left: auto;
  font: 12px/1.6 var(--mono);
}
.result-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}
.result-stats > div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.result-stats > div > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 10px;
}
.result-stats strong {
  display: block;
  font-size: clamp(20px, 2.1vw, 30px);
  font-weight: 550;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}
.result-stats strong span {
  color: var(--success);
  font-size: 18px;
}
.defect-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.defect-chip {
  font-size: 12px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--page);
}
.result-warnings {
  margin-top: 16px;
  font-size: 13px;
  padding: 12px;
  border-left: 1px solid #a47010;
  background: #fffbef;
}
.result-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 28px;
  margin-top: 28px;
}
.download-button {
  gap: 10px;
}
.download-button svg {
  width: 18px;
  height: 18px;
}
.download-button > span {
  font: 12px var(--mono);
  padding-left: 12px;
  border-left: 1px solid #ffffff55;
}
.result-actions .text-link {
  margin-left: auto;
}
.report-details {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
#details {
  max-height: 420px;
  overflow: auto;
  padding: 20px;
  border-radius: 6px;
  background: #13213a;
  color: #dce6f7;
  font: 12px/1.7 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.result-panel[data-state="error"] .result-icon,
.result-panel[data-state="error"] .result-badge {
  color: var(--error);
  background: var(--error-soft);
  border-color: #ebbac3;
}
.result-panel[data-state="error"] .eyebrow {
  color: var(--error);
}
.result-error {
  color: var(--error);
  font-size: 14px;
  margin-top: 20px;
}
.how-section,
.learn-section {
  padding: 88px 0;
  border-bottom: 1px solid var(--line);
}
.section-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 64px;
  align-items: end;
}
.section-intro .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: 14px;
}
.section-intro h2 {
  font-size: clamp(30px, 3vw, 42px);
}
.section-intro > p:last-child {
  max-width: 460px;
  justify-self: end;
  color: var(--muted);
  font-size: 15px;
}
.how-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0;
  margin: 40px 0 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
.how-steps li {
  position: relative;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 38px;
}
.how-steps li + li {
  border-left: 1px solid var(--line);
}
.how-number {
  font: 12px var(--mono);
  color: var(--accent);
}
.how-steps h3 {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 12px;
}
.how-steps p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}
.how-steps svg {
  width: 38px;
  height: 38px;
  stroke: var(--accent);
  stroke-width: 1.1;
  position: absolute;
  top: 23px;
  right: 24px;
}
.guide-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 32px 0 24px;
}
.guide-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  text-decoration: none;
}
.guide-card:hover {
  background: #f2f6ff;
  border-color: #92acf0;
}
.guide-card .eyebrow {
  color: var(--accent);
  font-size: 12px;
}
.guide-card h3 {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 21px;
  font-weight: 600;
}
.guide-card h3 span {
  color: var(--accent);
  flex-shrink: 0;
}
.guide-card p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}
.guide-card img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.guide-paths {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}
.guide-paths a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  text-decoration: none;
}
.guide-paths a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
main > .mesh-faq {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 64px;
  padding: 80px 0;
}
.mesh-faq h2 {
  font-size: 36px;
}
.mesh-faq details {
  border-bottom: 1px solid var(--line);
}
.mesh-faq details:first-child {
  border-top: 1px solid var(--line);
}
.mesh-faq summary {
  position: relative;
  list-style: none;
  padding: 22px 32px 22px 0;
  font-size: 15px;
  font-weight: 550;
}
.mesh-faq summary::-webkit-details-marker {
  display: none;
}
.mesh-faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 18px;
  font-size: 22px;
  font-weight: 400;
  color: var(--accent);
}
.mesh-faq details[open] summary::after {
  content: "−";
}
.mesh-faq details p {
  padding: 0 20px 24px 0;
  font-size: 14px;
  color: var(--muted);
}
.mesh-faq a,
.guide-page article a:not(.guide-cta):not(.guide-card):not(.guide-paths a) {
  color: var(--accent);
}
.faq-questions > p {
  margin-top: 24px;
  font-size: 14px;
}
.site-footer {
  max-width: 1440px;
  margin: auto;
  padding: 36px 48px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  color: var(--muted);
  font-size: 13px;
}
.site-footer > span:first-child {
  font-size: 22px;
  font-weight: 650;
  color: var(--ink);
  letter-spacing: -0.04em;
}
.site-copyright {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
}
.site-footer > p {
  max-width: 320px;
  margin-left: 20px;
  margin-right: auto;
}
.site-footer > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}
.site-footer > a:hover {
  color: var(--accent);
}
.footer-tag {
  margin-left: auto;
  font: 12px var(--mono);
}
.privacy-settings {
  min-height: 44px;
  border: 0;
  padding: 4px;
  background: none;
  font-size: 12px;
  text-decoration: underline;
  color: var(--muted);
}
.noscript-note {
  padding: 20px;
  text-align: center;
}
/* Reading layouts share the workbench type, colors, and controls. */
.guide-page {
  padding-top: 28px;
  padding-bottom: 80px;
}
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 36px;
}
.breadcrumbs a {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  text-decoration: none;
}
.breadcrumbs span {
  align-self: center;
}
.breadcrumbs a:hover {
  color: var(--accent);
}
.guide-intro {
  padding: 28px 0 48px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}
.guide-intro .eyebrow {
  color: var(--accent);
  margin-bottom: 18px;
}
.guide-page h1 {
  max-width: 1000px;
  font-size: clamp(36px, 4.4vw, 62px);
  margin-bottom: 24px;
}
.guide-page .guide-lead {
  max-width: 850px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.7;
}
.guide-cta {
  margin-top: 28px;
}
.guide-page .guide-meta {
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
}
.article-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}
.article-body {
  max-width: 830px;
  min-width: 0;
}
.guide-toc {
  padding: 0 24px 20px 0;
  border-right: 1px solid var(--line);
  font-size: 13px;
}
.guide-toc ul {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
}
.guide-toc li {
  margin: 0;
}
.guide-toc a {
  display: block;
  padding: 10px 0;
  min-height: 44px;
  line-height: 1.6;
  text-decoration: none;
}
.guide-toc a:hover {
  text-decoration: underline;
}
.guide-page article > section,
.article-body > section,
.guide-sources {
  padding: 0 0 36px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--line);
}
.guide-page h2 {
  margin: 0 0 20px;
  font-size: 29px;
}
.guide-page h3 {
  margin: 28px 0 12px;
  font-size: 21px;
}
.guide-page p,
.guide-page li,
.guide-page dd {
  line-height: 1.8;
}
.guide-page p + p {
  margin-top: 16px;
}
.guide-page li {
  margin-bottom: 12px;
  padding-left: 4px;
}
.guide-page ul,
.guide-page ol {
  padding-left: 24px;
}
.guide-page .guide-toc ul {
  padding-left: 0;
}
.guide-page .guide-toc li {
  margin-bottom: 0;
  padding-left: 0;
}
.guide-page .guide-card h3 {
  margin: 0;
}
.guide-page .guide-card p {
  font-size: 14px;
}
.guide-page .guide-cards {
  margin-top: 28px;
}
.guide-page .guide-paths a {
  color: var(--ink);
}
.defect-list dt {
  font-weight: 650;
  margin-top: 24px;
}
.defect-list dd {
  margin: 8px 0 0;
  color: var(--muted);
}
.table-scroll {
  overflow-x: auto;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 24px 0;
  background: var(--paper);
}
.guide-page table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
.guide-page th,
.guide-page td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
  min-width: 130px;
}
.guide-page th {
  background: var(--subtle);
  font-weight: 600;
}
.guide-page caption {
  padding: 16px;
  text-align: left;
  font-weight: 600;
}
.guide-sources p {
  font-size: 13px;
  color: var(--muted);
}
.guide-sources li {
  font-size: 14px;
}
.mesh-figure {
  margin: 28px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}
.mesh-figure img {
  display: block;
  width: 100%;
}
.mesh-figure figcaption {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}
.guide-notice {
  padding: 20px;
  background: var(--accent-soft);
  border-left: 1px solid var(--accent);
  border-radius: 0 6px 6px 0;
  margin: 24px 0;
  font-size: 14px;
}
.guide-page code {
  font: 0.9em var(--mono);
  background: var(--subtle);
  padding: 2px 5px;
  border-radius: 3px;
  overflow-wrap: anywhere;
}
.guide-page:not(:has(.article-layout)):not(.guide-hub) {
  max-width: 1080px;
}
.analytics-preferences {
  position: fixed;
  z-index: 30;
  right: 24px;
  bottom: 24px;
  width: min(430px, calc(100% - 48px));
  max-height: calc(100dvh - 48px);
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 48px #17263d26;
  background: var(--paper);
}
.analytics-preferences h2 {
  font-size: 21px;
  margin-bottom: 12px;
}
.analytics-preferences p {
  color: var(--muted);
  font-size: 13px;
}
.analytics-preferences a {
  color: var(--accent);
}
.analytics-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.analytics-actions button {
  flex: 1;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  background: var(--paper);
  font-size: 13px;
}
.analytics-actions button:hover:enabled {
  background: var(--accent-soft);
}
.analytics-actions button:disabled {
  opacity: 0.5;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (min-width: 1500px) {
  .intro {
    padding-top: 60px;
    padding-bottom: 52px;
  }
}
@media (max-width: 1100px) {
  .site-header {
    flex-wrap: wrap;
  }
  .site-header > nav {
    order: 3;
    flex: 0 0 100%;
    justify-content: flex-start;
    border-top: 1px solid var(--line);
    padding-top: 6px;
  }
  .language-menu {
    margin-left: auto;
  }

  .site-header {
    gap: 20px;
    padding: 16px 28px;
  }
  .site-header > nav {
    gap: 20px;
  }
  main {
    padding: 0 28px;
  }
  .intro {
    gap: 32px;
  }
  .workspace-grid {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
  .visual-panel,
  .control-panel {
    padding: 20px;
  }
  .viewer-coordinate,
  .viewer-version {
    display: none;
  }
  .section-intro {
    gap: 28px;
  }
  .guide-cards {
    gap: 14px;
  }
  .guide-card,
  .how-steps li {
    padding: 22px;
  }
  .article-layout {
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 32px;
  }
  .site-footer {
    padding: 32px 28px;
  }
}
@media (max-width: 800px) {
  .site-header {
    flex-wrap: wrap;
    gap: 8px 20px;
  }
  .site-header > nav {
    order: 3;
    flex: 0 0 100%;
    justify-content: flex-start;
    gap: 24px;
    border-top: 1px solid var(--line);
    padding-top: 6px;
  }
  .language-menu {
    margin-left: auto;
  }
  .intro {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 36px 0;
  }
  .intro h1 {
    font-size: 52px;
  }
  .intro-aside {
    justify-self: start;
    max-width: 570px;
  }
  .intro-description br {
    display: none;
  }
  .workspace-grid {
    grid-template-columns: 1fr;
  }
  .visual-panel {
    border-radius: 0;
  }
  .viewer {
    flex: auto;
    height: 340px;
    min-height: 0;
  }
  .control-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 24px;
  }
  .control-panel fieldset {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 24px;
    align-items: start;
  }
  .step-heading,
  .dropzone,
  .settings-heading,
  .advanced,
  .field-error {
    grid-column: 1 / -1;
  }
  .toggle-row,
  .number-row {
    grid-column: 1 / -1;
  }
  .step-heading {
    margin-bottom: 8px;
  }
  .settings-heading {
    margin-top: 24px;
  }
  .dropzone {
    padding: 26px 16px;
  }
  .viewer-topline,
  .viewer-bottomline {
    font-size: 12px;
  }
  .viewer-version,
  .viewer-coordinate {
    display: inline;
  }
  .result-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .section-intro {
    display: block;
  }
  .section-intro > p:last-child {
    margin-top: 18px;
    max-width: 600px;
  }
  .how-section,
  .learn-section {
    padding: 60px 0;
  }
  .how-steps {
    grid-template-columns: 1fr;
  }
  .how-steps li {
    padding: 24px;
    gap: 22px;
  }
  .how-steps li + li {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .guide-cards {
    grid-template-columns: 1fr;
  }
  .guide-card {
    padding: 24px;
  }
  .guide-card img {
    max-height: 260px;
    object-fit: contain;
  }
  main > .mesh-faq {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 60px 0;
  }
  .mesh-faq h2 {
    font-size: 32px;
  }
  .article-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .guide-toc {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
  }
  .guide-toc ul {
    columns: 2;
    column-gap: 24px;
  }
  .guide-toc li {
    break-inside: avoid;
  }
  .guide-page {
    padding-top: 24px;
    padding-bottom: 36px;
  }
  .guide-intro {
    padding-top: 12px;
  }
  .site-footer {
    gap: 16px 24px;
  }
  .site-footer > p {
    margin-left: auto;
    max-width: 260px;
  }
}
@media (max-width: 480px) {
  .site-header {
    padding: 14px 20px 8px;
  }
  .wordmark {
    font-size: 23px;
    gap: 8px;
  }
  .wordmark svg {
    width: 28px;
    height: 28px;
  }
  .language-menu {
    font-size: 12px;
  }
  .language-menu summary {
    padding: 6px 9px;
    gap: 6px;
  }
  .site-header > nav {
    justify-content: space-between;
    gap: 8px;
  }
  .site-header > nav a {
    font-size: 12px;
  }
  .site-header > nav span {
    display: none;
  }
  main {
    padding: 0 20px;
  }
  .intro {
    padding: 32px 0;
  }
  .intro h1 {
    font-size: clamp(36px, 10.5vw, 48px);
  }
  .intro .eyebrow {
    font-size: 12px;
  }
  .intro-description {
    font-size: 15px;
  }
  .intro-facts {
    font-size: 12px;
  }
  .intro-actions {
    gap: 14px;
    margin-top: 20px;
  }
  .primary-button,
  .secondary-link {
    font-size: 13px;
  }
  .primary-button {
    padding: 12px 16px;
    gap: 16px;
  }
  .workspace-header {
    padding: 16px;
    gap: 8px 16px;
  }
  .workspace-header h2 {
    font-size: 14px;
  }
  .workspace-header > div {
    gap: 8px;
  }
  .connection {
    font-size: 12px;
  }
  .visual-panel {
    padding: 16px;
  }
  .viewer-version,
  .viewer-coordinate {
    display: none;
  }
  .viewer {
    height: 270px;
    margin: 0;
  }
  .viewer-toolbar {
    margin-top: 14px;
  }
  .view-options button {
    padding: 6px 11px;
  }
  .control-panel {
    padding: 20px 16px;
  }
  .step-heading h3 {
    font-size: 13px;
  }
  .sample-button {
    font-size: 12px;
  }
  .result-panel {
    padding: 24px 16px;
  }
  .result-heading {
    gap: 12px;
  }
  .result-heading h3 {
    font-size: 23px;
  }
  .result-badge {
    margin-left: 0;
  }
  .result-stats {
    gap: 10px;
  }
  .result-stats > div {
    padding: 12px;
  }
  .result-actions {
    gap: 12px 20px;
  }
  .result-actions .text-link {
    margin-left: 0;
  }
  .section-intro h2 {
    font-size: 32px;
  }
  .guide-card h3 {
    font-size: 22px;
  }
  .site-footer {
    padding: 28px 20px;
  }
  .site-footer > p {
    width: 100%;
    max-width: none;
    margin: 0;
  }
  .guide-page h1 {
    font-size: 36px;
  }
  .guide-page .guide-lead {
    font-size: 17px;
  }
  .guide-page h2 {
    font-size: 26px;
  }
  .guide-toc ul {
    columns: 1;
  }
  .mesh-figure {
    padding: 8px;
  }
  .analytics-preferences {
    bottom: 12px;
    right: 12px;
    width: calc(100% - 24px);
    padding: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
