:root {
  font-family:
    "Plus Jakarta Sans",
    "Nirmala UI",
    Arial,
    sans-serif;
  color: #142237;
  background: #f4f5f7;
  font-synthesis: none;
  --orange:#b91c1c;
  --line:#dce1e7;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
select,
input {
  font: inherit;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
button,
select {
  min-height: 44px;
  border: 1px solid #c4ccd6;
  border-radius: 8px;
  background: white;
  color: #18283d;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 600;
}
button:hover:not(:disabled) {
  border-color: var(--orange);
  background: #fff5ed;
}
button:disabled {
  opacity: .43;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
canvas:focus-visible {
  outline: 3px solid #0079b5;
  outline-offset: 4px;
}
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: #080c16;
  color: #fff;
  padding: 22px max(24px, calc((100vw - 1280px)/2));
  border-bottom: 3px solid #dc2626;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  font-size: 17px;
  letter-spacing: .5px;
  font-weight: 800;
}
.brand-mark {
  display: grid;
  place-items: center;
  background: #dc2626;
  width: 44px;
  height: 44px;
  border-radius: 9px;
  font-size: 26px;
}
.brand small {
  display: block;
  font-size: 10px;
  color: #adb8c9;
  font-weight: 500;
  letter-spacing: 1px;
  margin-top: 5px;
}
.brand-secondary {
  font-weight: 400;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 13px;
}
.language {
  display: flex;
  align-items: center;
  gap: 10px;
}
.language select {
  background: #172135;
  border-color: #465065;
  color: white;
  padding: 8px;
}
main {
  max-width: 1280px;
  padding: 38px 24px 56px;
  margin: auto;
}
.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.7px;
  color: var(--orange);
  margin: 0 0 10px;
}
h1 {
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -1.5px;
  margin: 0 0 10px;
  line-height: 1.2;
}
h2 {
  font-size: 21px;
  letter-spacing: -.5px;
  margin: 0 0 12px;
}
p {
  line-height: 1.65;
}
.subtitle {
  margin: 0;
  color: #536176;
  font-size: 16px;
}
.concept-badge {
  border: 1px solid #d5dde7;
  border-radius: 24px;
  padding: 10px 18px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.notice {
  display: flex;
  gap: 12px;
  border: 1px solid #ecd2b5;
  border-radius: 10px;
  background: #fff8ef;
  padding: 13px 18px;
  margin-bottom: 24px;
  color: #71441a;
  font-size: 13px;
}
.notice > span {
  font-size: 20px;
}
.notice p {
  margin: 0;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 345px;
  grid-template-areas: "viewer panel" "timeline panel";
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: white;
}
.viewer {
  grid-area: viewer;
  position: relative;
  background: #e9edf0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.viewer-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 23px 24px 0;
  z-index: 1;
}
.viewer-top h2 {
  font-size: 14px;
  margin: 0;
}
.schematic {
  font-size: 9px;
  letter-spacing: 1.2px;
  color: #5d6877;
}
#viewport {
  height: 430px;
  position: relative;
  flex: 1;
  min-height: 360px;
}
#viewport canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
#loading,
#viewer-error {
  position: absolute;
  inset: 35% 24px auto;
  text-align: center;
  font-size: 14px;
}
#viewer-error {
  padding: 20px;
  background: #fff8ef;
  border: 1px solid #b91c1c;
  border-radius: 8px;
}
#viewer-error[hidden] {
  display: none;
}
.viewer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 24px;
}
.viewer-bottom p {
  font-size: 11px;
  color: #536176;
}
.quiet {
  background: transparent;
  font-size: 11px;
}
.keyboard-help {
  font-size: 10px;
  color: #5d6877;
  padding: 0 24px 12px;
  margin: 7px 0 0;
}
.panel {
  grid-area: panel;
  padding: 25px;
  border-left: 1px solid var(--line);
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.panel-heading > span {
  font-size: 11px;
  color: #6c7788;
  font-variant-numeric: tabular-nums;
}
.panel-description {
  font-size: 12px;
  color: #5e6a7c;
  margin: 0 0 18px;
}
.stages {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 7px;
}
.stages button {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
  font-size: 12px;
  border-color: transparent;
  background: #f5f6f8;
  padding: 10px 12px;
}
.stages button[aria-current=step] {
  background: #fff0e3;
  border-color: #eaa068;
  color: #883408;
}
.stage-number {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 25px;
  height: 25px;
  border: 1px solid #c4ccd6;
  border-radius: 50%;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.stages button[aria-current=step] .stage-number {
  background: var(--orange);
  color: white;
  border-color: var(--orange);
}
.active-detail {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  min-height: 132px;
}
.active-detail .eyebrow {
  font-size: 9px;
}
.active-detail h3 {
  font-size: 15px;
  margin: 8px 0;
}
.active-detail p {
  font-size: 12px;
  color: #536176;
  margin: 0;
}
.timeline {
  grid-area: timeline;
  margin-top: 0;
  background: white;
  border-top: 1px solid var(--line);
  padding: 20px 24px;
}
.progress-heading {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
}
output {
  font-variant-numeric: tabular-nums;
  color: var(--orange);
}
input[type=range] {
  width: 100%;
  accent-color: var(--orange);
  cursor: pointer;
  margin: 8px 0 0;
  min-height: 32px;
}
.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #67758a;
  margin-top: 0;
}
.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.transport,
.endpoints {
  display: flex;
  gap: 9px;
}
.controls button {
  font-size: 12px;
  min-width: 94px;
}
.primary {
  background: #152337;
  color: white;
  border-color: #152337;
}
.primary:hover:not(:disabled) {
  background: #293d57;
  color: white;
}
.motion-note {
  font-size: 12px;
  color: #71441a;
  margin: 15px 0 0;
}
.reference {
  display: grid;
  grid-template-columns: 1fr 210px;
  gap: 45px;
  margin-top: 42px;
  align-items: center;
  max-width: 900px;
}
.reference p:not(.eyebrow) {
  font-size: 13px;
  color: #536176;
  max-width: 650px;
}
.reference a {
  font-size: 12px;
  font-weight: 600;
}
.reference img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.reference h2 {
  font-size: 22px;
}
footer {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px max(24px, calc((100vw - 1232px)/2));
  font-size: 10px;
  color: #617085;
  letter-spacing: .6px;
}
footer > span:first-child {
  font-weight: 800;
}
html[lang=ta] .eyebrow {
  letter-spacing: 0;
}
html[lang=ta] h1 {
  letter-spacing: 0;
}
html[lang=ta] .controls button {
  min-width: 0;
  font-size: 11px;
}
@media (min-width: 1400px) {
  #viewport {
    height: 480px;
  }
}
@media (max-width: 900px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 290px;
  }
  .panel {
    padding: 20px;
  }
  .viewer-top {
    flex-wrap: wrap;
  }
  .brand-secondary {
    display: none;
  }
  .header-actions {
    gap: 14px;
  }
  .language > span {
    display: none;
  }
}
@media (max-width: 700px) {
  .site-header {
    padding: 16px;
    flex-wrap: wrap;
    gap: 15px;
  }
  .brand {
    font-size: 14px;
  }
  .brand small {
    font-size: 8px;
  }
  .header-actions {
    flex: 1;
    justify-content: space-between;
  }
  .header-actions > a {
    font-size: 12px;
  }
  main {
    padding: 26px 14px 36px;
  }
  .intro {
    align-items: flex-start;
  }
  .concept-badge {
    font-size: 9px;
    padding: 8px 10px;
    white-space: normal;
    max-width: 100px;
  }
  .subtitle {
    font-size: 13px;
  }
  .notice {
    padding: 12px;
    font-size: 12px;
  }
  .workspace {
    grid-template-columns: 1fr;
    grid-template-areas: "viewer" "timeline" "panel";
  }
  .viewer-top {
    padding: 18px 16px 0;
  }
  .viewer-top h2 {
    font-size: 12px;
  }
  .schematic {
    font-size: 8px;
  }
  #viewport {
    height: 340px;
    min-height: 300px;
    flex: auto;
  }
  .viewer-bottom {
    padding: 0 16px;
  }
  .viewer-bottom p {
    font-size: 10px;
  }
  .keyboard-help {
    padding: 0 16px 14px;
  }
  .panel {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 20px;
  }
  .stages {
    grid-template-columns: 1fr 1fr;
  }
  .stages li:first-child {
    grid-column: 1 / -1;
  }
  .stages button {
    height: 100%;
    font-size: 11px;
  }
  .active-detail {
    min-height: 110px;
  }
  .timeline {
    padding: 18px 15px;
  }
  .controls {
    flex-wrap: wrap;
    gap: 12px;
  }
  .transport,
  .endpoints {
    width: 100%;
  }
  .controls button {
    min-width: 0;
    flex: 1;
    padding: 10px 7px;
  }
  .reference {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 30px;
  }
  .reference > a {
    max-width: 210px;
  }
  .reference h2 {
    font-size: 20px;
  }
  footer {
    padding: 20px 16px;
    flex-direction: column;
    gap: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

.guide-status-section {
  margin-top: 36px;
}
.guide-status-card {
  border: 1px solid var(--line);
  border-left: 4px solid #dc2626;
  border-radius: 12px;
  background: white;
  padding: 24px 28px;
}
.guide-status-card h2 {
  font-size: 20px;
  margin: 4px 0 10px;
  color: #0f172a;
}
.guide-status-card p {
  color: #475569;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}
.connection-status-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-left: 3px solid #dc2626;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 16px;
}
@media (max-width: 700px) {
  .guide-status-card {
    padding: 18px 16px;
  }
}
.guide-navigation{display:flex;flex-wrap:wrap;gap:12px;align-items:center;max-width:1440px;margin:auto;padding:16px 28px;font-size:13px;border-bottom:1px solid #dce1e7}.guide-navigation a{min-height:44px;display:inline-flex;align-items:center}.other-guide{margin-left:auto}.guide-navigation a:focus-visible{outline:3px solid #b91c1c;outline-offset:3px}@media(max-width:480px){.guide-navigation{padding:12px 16px}.other-guide{margin-left:0;flex-basis:100%}}

/* Measurement Overlay & Badges */
.measurement-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 10;
}
.measurement-overlay-badge {
  position: absolute;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.4;
  padding: 6px 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  pointer-events: auto;
  max-width: 90%;
  transition: opacity 0.2s ease;
}
.measurement-overlay-badge.verified {
  background: #080c16;
  color: #ffffff;
  border: 1px solid #dc2626;
  white-space: nowrap;
}
.measurement-overlay-badge.verified .badge-val {
  color: #fca5a5;
  margin-left: 4px;
}
.measurement-overlay-badge.pending {
  top: 16px;
  left: 16px;
  background: rgba(15, 23, 42, 0.94);
  color: #f1f5f9;
  border: 1px solid #f59e0b;
}
.measurement-overlay-badge.pending .badge-icon {
  margin-right: 4px;
}
.measurement-overlay-badge.pending .badge-val {
  color: #fbbf24;
  font-style: italic;
  margin-left: 4px;
}

/* Viewer actions bar */
.viewer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.measurement-toggle-btn {
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  min-height: 36px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.measurement-toggle-btn[aria-pressed="true"] {
  background: #dc2626;
  color: #ffffff;
  border-color: #b91c1c;
}
.measurement-toggle-btn:hover {
  border-color: #dc2626;
}
.measurement-select-wrapper select {
  min-height: 36px;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
}

/* Measurements Section */
.measurements-section {
  max-width: 1440px;
  margin: 32px auto;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.measurements-header h2 {
  margin: 4px 0 8px;
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}
.measurements-desc {
  margin: 0 0 16px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}
.measurements-disclaimers {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.measurement-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.45;
}
.measurement-note.warning-note {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  color: #92400e;
}
.measurement-note.info-note {
  background: #f0f9ff;
  border: 1px solid #e0f2fe;
  color: #0369a1;
}
.table-container {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}
.measurements-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}
.measurements-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
}
.measurements-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
}
.measurements-table tbody tr {
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.measurements-table tbody tr:hover {
  background: #f8fafc;
}
.measurements-table tbody tr.selected-measurement-row {
  background: #fef2f2;
}
.measurements-table tbody tr.selected-measurement-row td.param-name {
  font-weight: 700;
  color: #dc2626;
}
.param-val.pending-val {
  color: #d97706;
  font-style: italic;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.status-badge.verified {
  background: #dcfce7;
  color: #15803d;
}
.status-badge.pending {
  background: #fef3c7;
  color: #b45309;
}
.param-source {
  color: #64748b;
  font-size: 12px;
}
.param-note {
  color: #0284c7;
  font-size: 11px;
}

@media (max-width: 768px) {
  .viewer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .measurements-section {
    padding: 16px;
    margin: 20px 16px;
  }
  .measurements-table th,
  .measurements-table td {
    padding: 10px 12px;
    font-size: 12px;
  }
}

/* Fasteners Section */
.fasteners-section {
  max-width: 1440px;
  margin: 32px auto;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.fasteners-header h2 {
  margin: 4px 0 8px;
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}
.fasteners-desc {
  margin: 0 0 16px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}
.fasteners-disclaimers {
  margin-bottom: 20px;
}
.fastener-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.45;
}
.fasteners-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  align-items: start;
}
.fasteners-table-container {
  overflow-x: auto;
}
.fasteners-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}
.fasteners-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}
.fasteners-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
}
.fasteners-table tbody tr {
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.fasteners-table tbody tr:hover {
  background: #f8fafc;
}
.fasteners-table tbody tr.selected-fastener-row {
  background: #fef2f2;
}
.fastener-code {
  font-weight: 800;
  font-family: monospace;
  font-size: 13px;
  color: #dc2626;
}
.fastener-name {
  font-weight: 600;
}
.fastener-stage {
  color: #64748b;
  font-size: 11px;
}
.fastener-detail-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 18px 20px;
}
.fastener-detail-card h3 {
  margin: 4px 0 6px;
  font-size: 16px;
  color: #0f172a;
}
.detail-stage-tag {
  display: inline-block;
  background: #e2e8f0;
  color: #334155;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  margin: 0 0 14px;
}
.fastener-spec-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 16px;
}
.spec-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  border-bottom: 1px dashed #e2e8f0;
  padding-bottom: 4px;
}
.spec-row dt {
  color: #64748b;
  font-weight: 500;
}
.spec-row dd {
  margin: 0;
  font-weight: 600;
  color: #1e293b;
  text-align: right;
}
.fastener-location-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
}
.fastener-location-box h4 {
  margin: 0 0 6px;
  font-size: 12px;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.location-desc {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #475569;
}
.location-status.verified {
  color: #15803d;
  font-weight: 700;
}
.location-status.pending {
  color: #b45309;
  font-weight: 700;
}

/* Fastener Overlay Badges */
.fastener-overlay-badge {
  position: absolute;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.4;
  padding: 6px 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  pointer-events: auto;
  max-width: 85%;
  z-index: 12;
}
.fastener-overlay-badge.verified {
  background: #080c16;
  color: #ffffff;
  border: 2px solid #dc2626;
  white-space: nowrap;
}
.fastener-overlay-badge.pending {
  bottom: 16px;
  left: 16px;
  background: rgba(15, 23, 42, 0.94);
  color: #f1f5f9;
  border: 1px solid #f59e0b;
}

@media (max-width: 900px) {
  .fasteners-layout {
    grid-template-columns: 1fr;
  }
  .fasteners-section {
    padding: 16px;
    margin: 20px 16px;
  }
}

