:root {
  color-scheme: dark;
  --bg: #08131f;
  --surface: #112235;
  --surface2: #172c42;
  --text: #f2f6fa;
  --muted: #aabacb;
  --accent: #19bed4;
  --green: #36c98f;
  --amber: #dda24d;
  --line: #294158;
  --danger: #ff7a70;
  --radius: 18px;
  --shadow: 0 18px 50px #0007;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  background: var(--bg);
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background:
    radial-gradient(circle at 90% -10%, #123b55 0, transparent 32rem), var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.45;
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
}
button,
input,
select,
textarea {
  font: inherit;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 12px max(16px, env(safe-area-inset-left));
  background: #08131fe8;
  backdrop-filter: blur(18px);
  border-bottom: 1px solid #ffffff12;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: linear-gradient(145deg, var(--accent), #08748e);
  font-weight: 900;
}
.top-actions {
  display: flex;
  gap: 8px;
}
.icon-button,
.mode-pill {
  min-width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  color: var(--text);
  font-weight: 750;
}
.mode-pill {
  padding: 0 10px;
  font-size: 11px;
  color: var(--muted);
}
.mode-pill.active {
  border-color: var(--amber);
  color: #ffd994;
}
.demo-banner {
  position: sticky;
  top: 76px;
  z-index: 19;
  padding: 6px 16px;
  background: #7a4e0d;
  color: #fff1cf;
  text-align: center;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.06em;
}
main {
  width: min(1120px, 100%);
  margin: auto;
  padding: 22px 16px 40px;
}
.loading {
  padding: 60px 0;
  text-align: center;
  color: var(--muted);
}
h1 {
  font-size: clamp(28px, 6vw, 44px);
  line-height: 1.06;
  margin: 0 0 10px;
  letter-spacing: -0.035em;
}
h2 {
  font-size: 21px;
  line-height: 1.2;
  margin: 0 0 8px;
}
h3 {
  font-size: 16px;
  margin: 0 0 6px;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.lede {
  font-size: 18px;
  color: var(--muted);
  max-width: 750px;
  margin: 0;
}
.page-head {
  margin-bottom: 20px;
}
.hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  min-height: 360px;
  background: #0e1c2a;
  box-shadow: var(--shadow);
}
.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero:after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #08131ff2 0, #08131f9b 48%, transparent 78%),
    linear-gradient(0deg, #08131fc9, transparent 55%);
}
.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 360px;
  padding: 28px;
  max-width: 650px;
}
.hero h1 {
  font-size: clamp(34px, 7vw, 60px);
}
.hero p {
  color: #d5e1ea;
  max-width: 560px;
}
.status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #ffffff20;
  border-radius: 999px;
  background: #07121fc4;
  color: #dce7ef;
  font-size: 12px;
  font-weight: 700;
}
.badge.ok {
  color: #99f0cd;
  border-color: #36c98f66;
}
.badge.warn {
  color: #ffd99b;
  border-color: #dda24d66;
}
.section {
  margin-top: 28px;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 12px;
}
.card {
  display: block;
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, #14293e, #0f1f30);
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}
.card.interactive {
  transition:
    transform 0.18s,
    border-color 0.18s;
}
.card.interactive:hover,
.card.interactive:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
}
.card p {
  color: var(--muted);
  margin: 6px 0 0;
}
.card .meta {
  font-size: 13px;
}
.card-media {
  height: 150px;
  margin: -18px -18px 15px;
  overflow: hidden;
  background: #091725;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.action {
  display: flex;
  min-height: 84px;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-weight: 750;
}
.action span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #19bed41a;
  color: var(--accent);
  font-size: 22px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--accent);
  color: #05212a;
  text-decoration: none;
  font-weight: 850;
  cursor: pointer;
}
.button.secondary {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}
.button.warn {
  background: var(--amber);
  color: #291a04;
}
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.metric {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}
.metric strong {
  display: block;
  font-size: 27px;
  color: var(--text);
}
.metric span {
  font-size: 12px;
  color: var(--muted);
}
.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin: 16px 0;
}
.input,
select,
textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0c1c2b;
  color: var(--text);
}
textarea {
  min-height: 110px;
  resize: vertical;
}
.filter-chips {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding-bottom: 4px;
}
.chip {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
}
.chip.active {
  background: #19bed421;
  border-color: var(--accent);
  color: var(--text);
}
.asset-list {
  display: grid;
  gap: 10px;
}
.asset-card {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}
.asset-card img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
  background: #091725;
}
.asset-card b {
  display: block;
}
.asset-card small {
  display: block;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chevron {
  color: var(--accent);
  font-size: 24px;
}
.tabs {
  display: flex;
  gap: 4px;
  overflow: auto;
  border-bottom: 1px solid var(--line);
  margin: 16px 0;
}
.tabs button {
  min-height: 48px;
  padding: 8px 14px;
  background: transparent;
  color: var(--muted);
  border: 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tabs button.active {
  color: var(--text);
  border-color: var(--accent);
}
.detail-hero {
  display: grid;
  gap: 16px;
}
.detail-hero img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--line);
}
dl {
  display: grid;
  grid-template-columns: minmax(110px, 160px) 1fr;
  gap: 8px 14px;
  margin: 0;
}
dt {
  color: var(--muted);
  font-size: 13px;
}
dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.evidence-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
}
.evidence-gallery figure {
  margin: 0;
}
.evidence-gallery img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 13px;
  border: 1px solid var(--line);
}
figcaption {
  font-size: 12px;
  color: var(--muted);
  padding: 4px;
}
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 7px max(6px, env(safe-area-inset-right))
    calc(7px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
  background: #07111cee;
  backdrop-filter: blur(20px);
  border-top: 1px solid #ffffff14;
}
.bottom-nav a {
  display: grid;
  place-items: center;
  min-height: 58px;
  color: #8398aa;
  text-decoration: none;
  font-size: 11px;
}
.bottom-nav a span {
  font-size: 20px;
  line-height: 1;
}
.bottom-nav a.active {
  color: var(--accent);
}
.viewer {
  position: relative;
  height: min(68vh, 680px);
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: #050b12;
}
.viewer canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.viewer-toolbar {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 10px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.viewer-toolbar button {
  min-height: 42px;
  padding: 7px 11px;
  border: 1px solid #ffffff33;
  border-radius: 12px;
  background: #08131fd9;
  color: var(--text);
}
.viewer-status {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  max-width: calc(100% - 24px);
  padding: 8px 11px;
  border-radius: 10px;
  background: #08131fda;
  color: var(--muted);
  font-size: 12px;
}
.drawing-shell {
  position: relative;
  overflow: auto;
  max-height: 70vh;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #050a10;
}
.drawing-shell img {
  display: block;
  width: 100%;
  min-width: 650px;
}
.drawing-shell svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.drawing-tools {
  display: flex;
  gap: 8px;
  overflow: auto;
  margin: 10px 0;
}
.drawing-tools button {
  min-height: 48px;
  white-space: nowrap;
}
.timeline {
  position: relative;
  padding-left: 24px;
}
.timeline:before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}
.event {
  position: relative;
  margin: 0 0 18px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.event:before {
  content: "";
  position: absolute;
  left: -24px;
  top: 19px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--bg);
}
.event time {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}
.split {
  display: grid;
  gap: 14px;
}
.notice {
  padding: 13px 15px;
  border-left: 3px solid var(--amber);
  border-radius: 0 12px 12px 0;
  background: #dda24d13;
  color: #eed7ad;
}
.empty {
  padding: 30px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
}
.ask-box {
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}
.mic {
  width: 88px;
  height: 88px;
  margin: auto;
  border: 1px solid #19bed466;
  border-radius: 50%;
  background: #19bed420;
  color: var(--accent);
  font-size: 34px;
}
.answer {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #0d1d2c;
}
.assembly {
  display: grid;
  gap: 14px;
}
.bom {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.bom th,
.bom td {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.bom th {
  color: var(--muted);
}
input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}
.offline-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.report {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: #102030;
}
.report .muted {
  color: #586b78;
}
.report table {
  width: 100%;
  border-collapse: collapse;
}
.report th,
.report td {
  padding: 8px;
  border-bottom: 1px solid #d5dde3;
  text-align: left;
  font-size: 13px;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: 94px;
  z-index: 50;
  transform: translate(-50%, 20px);
  padding: 11px 15px;
  border-radius: 12px;
  background: #eff8ff;
  color: #102030;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  white-space: nowrap;
  max-width: calc(100% - 32px);
  overflow: hidden;
  text-overflow: ellipsis;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.field360 {
  margin: 18px 0 26px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}
.field360 iframe {
  display: block;
  width: 100%;
  height: min(68vh, 680px);
  min-height: 420px;
  border: 0;
  border-radius: 14px;
  background: #050b12;
}
.selection-panel {
  margin-top: 12px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, #14293e, #0f1f30);
}
.selection-panel > p {
  margin: 0;
  color: var(--muted);
}
.instruction-mode {
  display: flex;
  gap: 8px;
  overflow: auto;
  margin: 14px 0;
}
.instruction-mode .chip {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.notice.success {
  display: grid;
  gap: 10px;
  border-color: #36d39966;
  background: #12382f;
  color: #d7fff0;
}
.notice.success strong {
  color: #66e6ad;
}
.sync-connect {
  display: grid;
  gap: 14px;
  margin: 18px 0;
}
.sync-connect h2,
.sync-connect p {
  margin: 0;
}
.instruction-start {
  display: grid;
  gap: 10px;
}
.instruction-start .button {
  justify-self: start;
}
.instruction-list {
  display: grid;
  gap: 14px;
}
.instruction-card,
.instruction-review,
.instruction-form {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg, #14293e, #0f1f30);
}
.instruction-card > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}
.instruction-card details {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--muted);
}
.instruction-card summary {
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}
.instruction-language {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: start;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid #19bed43a;
  border-radius: 14px;
  background: #19bed40d;
}
.instruction-language.spanish {
  border-color: #36c98f55;
  background: #36c98f0d;
}
.instruction-language > span {
  display: grid;
  place-items: center;
  min-height: 34px;
  border-radius: 9px;
  background: var(--accent);
  color: #05212a;
  font-size: 12px;
  font-weight: 900;
}
.instruction-language.spanish > span {
  background: var(--green);
}
.instruction-language p {
  margin: 4px 0 0;
  white-space: pre-wrap;
}
.instruction-form {
  display: grid;
  gap: 14px;
}
.instruction-form label:not(.file-button) {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.inline-actions,
.capture-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.capture-actions .button,
.inline-actions .button {
  flex: 1 1 180px;
}
.file-button {
  cursor: pointer;
}
.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.instruction-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.instruction-media {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #071522;
}
.instruction-media img,
.instruction-media video {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 9px;
  background: #03080d;
}
.instruction-media audio {
  display: block;
  width: 100%;
}
.instruction-media small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.media-remove {
  position: absolute;
  right: 14px;
  top: 14px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #ffffff35;
  border-radius: 50%;
  background: #08131fe8;
  color: white;
  font-size: 22px;
}
.confirm-row {
  display: flex;
  align-items: start;
  gap: 10px;
  margin-top: 16px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #071522;
}
.confirm-row input {
  width: 22px;
  height: 22px;
  accent-color: var(--accent);
}
@media (min-width: 760px) {
  body {
    padding-bottom: 0;
  }
  .topbar {
    padding-left: 28px;
    padding-right: 28px;
  }
  .bottom-nav {
    position: sticky;
    top: 76px;
    bottom: auto;
    grid-template-columns: repeat(5, auto);
    justify-content: center;
    gap: 24px;
    padding: 0 20px;
    background: #091725f1;
  }
  .bottom-nav a {
    display: flex;
    gap: 8px;
    min-width: 110px;
    min-height: 54px;
  }
  .bottom-nav a span {
    font-size: 18px;
  }
  main {
    padding: 34px 24px 70px;
  }
  .detail-hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  }
  .split {
    grid-template-columns: 1fr 1fr;
  }
  .assembly {
    grid-template-columns: 1.15fr 0.85fr;
  }
  .action-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 420px) {
  .mode-pill {
    display: none;
  }
  .metric strong {
    font-size: 23px;
  }
  .hero-content {
    padding: 22px;
  }
  .asset-card {
    grid-template-columns: 56px 1fr auto;
  }
  .asset-card img {
    width: 56px;
    height: 56px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
@media print {
  .topbar,
  .bottom-nav,
  .button-row,
  .demo-banner {
    display: none !important;
  }
  body {
    padding: 0;
    background: white;
  }
  .report {
    border: 0;
  }
  main {
    max-width: none;
    padding: 0;
  }
}
