:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #172228;
  background: #eef2f0;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #172228;
  --ink-soft: #3e4b50;
  --muted: #6b777b;
  --line: #d9e0dc;
  --line-strong: #c6d0cb;
  --surface: #ffffff;
  --surface-soft: #f5f7f6;
  --accent: #26a65c;
  --accent-dark: #205f33;
  --accent-light: #eaf6ee;
  --lime: #8ac452;
  --warning: #a7611a;
  --offline: #8a4b42;
  --shadow: 0 15px 38px rgba(20, 39, 29, 0.09);
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: #eef2f0;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: #eef2f0;
}

a {
  color: inherit;
}

button {
  color: inherit;
  font: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(38, 166, 92, 0.24);
  outline-offset: 3px;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.site-header {
  border-top: 3px solid var(--accent);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 5px 18px rgba(25, 47, 35, 0.04);
}

.site-header__inner {
  display: flex;
  align-items: center;
  width: min(1240px, 100%);
  min-height: 82px;
  margin: 0 auto;
  padding: 15px 28px;
  gap: 18px;
}

.company-brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  text-decoration: none;
}

.company-brand img {
  display: block;
  width: 154px;
  height: auto;
}

.brand-divider {
  flex: 0 0 1px;
  width: 1px;
  height: 38px;
  background: var(--line-strong);
}

.site-identity {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.site-identity span {
  color: var(--accent);
  font-size: 9px;
  font-weight: 800;
}

.site-identity strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.2;
}

.official-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  margin-left: auto;
  padding: 8px 2px;
  gap: 7px;
  border-bottom: 1px solid transparent;
  color: #566268;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  transition: color 160ms ease, border-color 160ms ease;
}

.official-link:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.official-link svg {
  width: 16px;
  height: 16px;
}

.page-shell {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 38px 28px 48px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  min-height: 72px;
  margin-bottom: 22px;
  padding-bottom: 17px;
  gap: 28px;
  border-bottom: 1px solid var(--line-strong);
}

.section-kicker {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
}

.page-heading h1 {
  margin: 0;
  color: var(--ink);
  font-size: 29px;
  line-height: 1.2;
}

.page-heading__actions {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.page-heading__actions p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.icon-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.icon-button:hover {
  border-color: #a9beb0;
  color: var(--accent-dark);
  background: #f8fbf9;
}

.icon-button svg {
  width: 17px;
  height: 17px;
}

.icon-button.is-loading svg {
  animation: spin 800ms linear infinite;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.tool-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.tool-card:hover {
  border-color: #b9c9c0;
  box-shadow: 0 19px 46px rgba(20, 39, 29, 0.13);
  transform: translateY(-2px);
}

.tool-preview {
  position: relative;
  display: block;
  aspect-ratio: 16 / 8.35;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #dfe6e2;
}

.tool-preview::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.24);
  content: "";
  pointer-events: none;
}

.tool-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 240ms ease;
}

.tool-preview--depth {
  background: #0d1117;
}

.tool-preview-diagram {
  display: block;
  width: 100%;
  height: 100%;
  transition: transform 240ms ease;
}

.tool-card:hover .tool-preview img {
  transform: scale(1.015);
}

.tool-card:hover .tool-preview-diagram {
  transform: scale(1.015);
}

.preview-index {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 30px;
  border-radius: 4px;
  color: #ffffff;
  background: rgba(20, 30, 25, 0.82);
  box-shadow: 0 4px 14px rgba(7, 18, 12, 0.18);
  font-size: 12px;
  font-weight: 800;
}

.tool-card__body {
  padding: 20px 21px 19px;
}

.tool-card__heading {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid #cde5d5;
  border-radius: 5px;
  color: var(--accent-dark);
  background: var(--accent-light);
}

.tool-icon--fa {
  border-color: #d8dfbd;
  color: #4d741f;
  background: #f2f7e8;
}

.tool-icon--calibration {
  border-color: #cfd7e5;
  color: #3f5d86;
  background: #eef3f9;
}

.tool-icon--depth {
  border-color: #c7dced;
  color: #2f6e9f;
  background: #edf6fc;
}

.tool-icon svg {
  width: 21px;
  height: 21px;
}

.tool-card__heading p {
  margin: 0 0 2px;
  color: var(--accent);
  font-size: 9px;
  font-weight: 800;
}

.tool-card__heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.25;
}

.service-status {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 78px;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.service-status > span {
  width: 8px;
  height: 8px;
  border: 2px solid #b5c0ba;
  border-radius: 50%;
  background: #ffffff;
}

.service-status strong {
  font-weight: 650;
}

.service-status[data-state="checking"] > span {
  border-color: var(--warning);
  animation: pulse 1.1s ease-in-out infinite;
}

.service-status[data-state="online"] {
  color: var(--accent-dark);
}

.service-status[data-state="online"] > span {
  border-color: var(--accent);
  background: var(--accent);
}

.service-status[data-state="offline"] {
  color: var(--offline);
}

.service-status[data-state="offline"] > span {
  border-color: #b77a70;
  background: #b77a70;
}

.tool-summary {
  min-height: 22px;
  margin: 18px 0 17px;
  color: var(--ink-soft);
  font-size: 14px;
}

.tool-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 14px 0 16px;
  border: 1px solid var(--ink);
  border-radius: 5px;
  color: #ffffff;
  background: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease;
}

.tool-action:hover {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
}

.tool-action svg {
  width: 18px;
  height: 18px;
  transition: transform 160ms ease;
}

.tool-action:hover svg {
  transform: translateX(3px);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1240px, calc(100% - 56px));
  min-height: 65px;
  margin: 0 auto;
  padding: 15px 0 24px;
  gap: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.site-footer > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

@media (max-width: 1080px) {
  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .site-header__inner {
    min-height: 74px;
    padding: 13px 20px;
    gap: 13px;
  }

  .company-brand img {
    width: 128px;
  }

  .brand-divider {
    height: 32px;
  }

  .site-identity strong {
    font-size: 15px;
  }

  .official-link span {
    display: none;
  }

  .official-link {
    width: 38px;
    height: 38px;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 5px;
  }

  .page-shell {
    padding: 30px 20px 38px;
  }

  .page-heading {
    align-items: center;
    margin-bottom: 18px;
  }

  .page-heading h1 {
    font-size: 25px;
  }

  .page-heading__actions p {
    display: none;
  }

  .tool-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-footer {
    width: calc(100% - 40px);
  }
}

@media (max-width: 480px) {
  .site-header__inner {
    padding-right: 16px;
    padding-left: 16px;
  }

  .company-brand img {
    width: 112px;
  }

  .brand-divider {
    display: none;
  }

  .site-identity span {
    display: none;
  }

  .site-identity strong {
    font-size: 14px;
  }

  .page-shell {
    padding: 25px 16px 34px;
  }

  .page-heading {
    min-height: 64px;
    gap: 12px;
  }

  .page-heading h1 {
    max-width: 13ch;
    font-size: 23px;
  }

  .tool-card__body {
    padding: 18px 16px 16px;
  }

  .tool-card__heading {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
  }

  .tool-icon {
    width: 38px;
    height: 38px;
  }

  .tool-card__heading h2 {
    font-size: 18px;
  }

  .service-status {
    grid-column: 2;
    justify-content: flex-start;
    min-width: 0;
  }

  .tool-summary {
    margin-top: 15px;
  }

  .site-footer {
    align-items: flex-start;
    width: calc(100% - 32px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
