:root {
  --paper: #f7f6f2;
  --surface: rgba(255, 253, 248, 0.82);
  --solid-surface: #fffdf8;
  --ink: #111915;
  --muted: #66716b;
  --line: rgba(17, 25, 21, 0.12);
  --green: #0a6c4f;
  --green-soft: rgba(10, 108, 79, 0.1);
  --gold: #b98a36;
  --blue: #155bb8;
  --dark: #111915;
  --danger: #c43f34;
  --shadow: 0 28px 90px rgba(18, 22, 19, 0.12);
  --glass: rgba(255, 255, 255, 0.58);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.96), transparent 30%),
    radial-gradient(circle at 86% 12%, rgba(10, 108, 79, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(255, 253, 248, 0.94), rgba(238, 233, 223, 0.92)),
    var(--paper);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img,
video {
  max-width: 100%;
}

.hidden {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  min-height: 78px;
  padding: 14px 34px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.76);
  backdrop-filter: blur(24px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 136px;
  height: auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--dark);
  color: #f4c76a;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.account-bar span,
.eyebrow,
p,
dd,
small {
  color: var(--muted);
}

.site-nav,
.account-bar,
.hero-actions,
.detail-actions,
.login-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.site-nav {
  justify-content: center;
  width: fit-content;
  justify-self: center;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 16px 42px rgba(18, 22, 19, 0.06);
}

.nav-link,
.outline-btn,
.ghost-light-btn,
.primary-btn,
.text-btn,
.modal-close,
.login-tabs button {
  min-height: 42px;
  border-radius: 999px;
  padding: 10px 14px;
  border: 0;
  font-weight: 800;
}

.nav-link {
  background: transparent;
  color: #46504a;
}

.nav-link.active,
.nav-link:hover {
  background: var(--green-soft);
  color: var(--green);
}

.primary-btn {
  background: var(--green);
  color: #fff;
  box-shadow: 0 14px 30px rgba(10, 108, 79, 0.18);
}

.primary-btn:hover {
  background: #0b563d;
}

.outline-btn,
.ghost-light-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.text-btn {
  margin: 28px 0 0 30px;
  background: transparent;
  color: var(--green);
  padding-left: 0;
}

main {
  min-height: calc(100vh - 76px);
}

.view {
  display: none;
}

.active-view {
  display: block;
}

.hero {
  display: grid;
  grid-template-columns: minmax(360px, 0.86fr) minmax(560px, 1.14fr);
  gap: 34px;
  align-items: center;
  min-height: calc(100vh - 76px);
  padding: 44px 34px 44px 44px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--green);
  font-weight: 900;
}

.hero h1,
.form-intro h1,
.api-layout h1,
.box-detail h1,
.algorithm-detail h1,
.admin-layout h1 {
  margin: 0;
  font-size: clamp(46px, 6vw, 90px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero p,
.form-intro p,
.api-layout p,
.box-detail p,
.algorithm-copy p {
  max-width: 720px;
  margin: 16px 0 0;
  line-height: 1.78;
  font-size: 17px;
}

.hero-actions {
  margin-top: 26px;
}

.hero-scene-card {
  position: relative;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(17, 25, 21, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.scene-top {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.live-chip {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 9px 12px;
  border-radius: 999px;
  color: #0f1813;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(16px);
  font-size: 13px;
  font-weight: 900;
}

.live-chip i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #20cf84;
  box-shadow: 0 0 0 6px rgba(32, 207, 132, 0.16);
}

.vision-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: #121612;
  cursor: crosshair;
}

.vision-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition:
    opacity 240ms ease,
    transform 620ms ease;
}

.vision-stage.is-switching img {
  opacity: 0.44;
  transform: scale(1.018);
}

.vision-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.34;
  mix-blend-mode: screen;
  pointer-events: none;
}

.vision-stage::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: var(--scan-y, 42%);
  z-index: 2;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(118, 255, 206, 0.96), transparent);
  box-shadow: 0 0 24px rgba(118, 255, 206, 0.46);
  pointer-events: none;
}

.yolo-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: auto;
}

.yolo-box {
  --box-color: #31ef9a;
  --box-glow: rgba(49, 239, 154, 0.32);
  position: absolute;
  padding: 0;
  border: 2px solid var(--box-color);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.02);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 0 28px var(--box-glow),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  pointer-events: auto;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.yolo-box::before,
.yolo-box::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.yolo-box::before {
  right: -2px;
  top: -2px;
  border-top: 4px solid var(--box-color);
  border-right: 4px solid var(--box-color);
}

.yolo-box::after {
  left: -2px;
  bottom: -2px;
  border-left: 4px solid var(--box-color);
  border-bottom: 4px solid var(--box-color);
}

.yolo-box:hover {
  background: rgba(49, 239, 154, 0.1);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 0 34px var(--box-glow);
  transform: scale(1.015);
}

.yolo-box.is-risk {
  --box-color: #ffcf4a;
  --box-glow: rgba(255, 207, 74, 0.34);
  background: rgba(255, 207, 74, 0.05);
}

.yolo-box.is-target {
  --box-color: #ff4f3f;
  --box-glow: rgba(255, 79, 63, 0.44);
  background: rgba(255, 79, 63, 0.06);
}

.yolo-box.is-wrong {
  --box-color: #ff6b5c;
  --box-glow: rgba(255, 107, 92, 0.46);
  animation: nudge 260ms ease;
}

.yolo-box.is-hit {
  --box-color: #27f38d;
  --box-glow: rgba(39, 243, 141, 0.62);
  background: rgba(39, 243, 141, 0.16);
}

.yolo-label {
  position: absolute;
  left: -2px;
  top: -29px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  max-width: 260px;
  padding: 6px 8px;
  border-radius: 7px 7px 7px 0;
  color: #06130e;
  background: var(--box-color);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.yolo-box.is-target .yolo-label {
  color: #fff;
}

.success-feedback {
  position: absolute;
  left: var(--success-x, 50%);
  top: var(--success-y, 50%);
  z-index: 6;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  color: #fff;
  background: rgba(21, 181, 111, 0.9);
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.28),
    0 0 0 14px rgba(39, 243, 141, 0.14);
  font-size: 46px;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.72);
  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(0.2, 1.4, 0.36, 1);
}

.success-feedback.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.success-feedback::after {
  content: "命中成功";
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  min-width: 86px;
  transform: translateX(-50%);
  padding: 7px 10px;
  border-radius: 999px;
  color: #072219;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.14);
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

@keyframes nudge {
  0%,
  100% {
    transform: translateX(0);
  }
  35% {
    transform: translateX(-5px);
  }
  70% {
    transform: translateX(5px);
  }
}

.hero-task-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.78fr);
  gap: 12px;
  padding-top: 12px;
}

.hero-task-panel > div,
.mode-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.hero-task-panel strong {
  display: block;
  margin-top: 4px;
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1.1;
}

.hero-task-panel p {
  margin: 10px 0 0;
  line-height: 1.5;
}

.mode-card {
  display: grid;
  align-content: center;
  gap: 10px;
}

.mode-card span {
  width: fit-content;
  padding: 7px 9px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 13px;
  font-weight: 900;
}

.confidence {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(17, 25, 21, 0.1);
}

.confidence i {
  display: block;
  width: var(--confidence, 82%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #37c98c);
  transition: width 260ms ease;
}

.scenario-tabs {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  overflow-x: auto;
  padding: 2px 0 1px;
}

.scenario-tabs button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 9px 12px;
  border: 1px solid rgba(17, 25, 21, 0.1);
  border-radius: 999px;
  color: #344039;
  background: rgba(255, 255, 255, 0.68);
  font-size: 14px;
  font-weight: 900;
}

.scenario-tabs button.active {
  color: #fff;
  background: var(--dark);
}

.hero-media {
  position: relative;
  min-width: 0;
  margin: 0;
}

.hero-media img {
  display: block;
  width: 100%;
  height: min(62vh, 540px);
  object-fit: cover;
  border-radius: 8px 0 0 8px;
}

.hero-media figcaption {
  position: absolute;
  left: 18px;
  bottom: 18px;
  display: grid;
  gap: 4px;
  max-width: 310px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  background: rgba(15, 20, 18, 0.72);
  color: #fff;
  backdrop-filter: blur(10px);
}

.hero-media figcaption span {
  color: rgba(255, 255, 255, 0.78);
}

.trial-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.8fr) auto;
  gap: 18px;
  align-items: center;
  margin: 24px 30px 0;
  padding: 18px;
  border: 1px solid rgba(15, 107, 76, 0.28);
  border-radius: 8px;
  background: #eef8f2;
}

.trial-banner div {
  display: grid;
  gap: 5px;
}

.trial-banner span {
  color: var(--green);
  font-weight: 900;
}

.trial-banner strong {
  font-size: 22px;
}

.trial-banner p {
  margin: 0;
  line-height: 1.65;
}

.summary-grid,
.box-grid,
.flow-grid,
.admin-metrics {
  display: grid;
  gap: 14px;
}

.summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 24px 30px;
}

.summary-grid article,
.box-card,
.license-card,
.flow-grid article,
.admin-metrics article,
.admin-columns section,
.form-shell,
.algorithm-card,
.trial-panel,
.login-panel,
.result-card,
.upload-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 36px rgba(28, 34, 30, 0.06);
}

.summary-grid article {
  padding: 18px;
}

.summary-grid span,
.box-card-body > span,
.algorithm-card span,
.license-card span,
.flow-grid span {
  color: var(--gold);
  font-weight: 900;
}

.summary-grid h2,
.box-card h3,
.flow-grid h2,
.admin-columns h2 {
  margin: 10px 0 6px;
}

.section-block {
  padding: 36px 30px 46px;
}

#algorithmSection,
.compatible-section,
#trialPanel {
  scroll-margin-top: 96px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-head h2,
.section-head h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
}

.section-head p {
  max-width: 720px;
  margin: 8px 0 0;
  line-height: 1.7;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 0.75fr) minmax(180px, 0.75fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.result-count {
  min-height: 46px;
  display: grid;
  place-items: center;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 900;
}

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

.box-card {
  overflow: hidden;
}

.box-card img {
  width: 100%;
  height: 220px;
  display: block;
  object-fit: cover;
}

.box-card-body {
  padding: 18px;
}

.box-card p {
  line-height: 1.7;
}

dl {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}

dl div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

dt {
  color: var(--muted);
  font-weight: 800;
}

dd {
  margin: 0;
}

.box-detail,
.api-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.8fr);
  gap: 24px;
  padding: 28px 30px;
}

.box-detail-media img,
.algorithm-hero-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: var(--image-position, center center);
  border-radius: 8px;
}

.box-detail-copy,
.algorithm-copy {
  align-self: center;
}

.spec-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.spec-grid span,
.algorithm-copy li {
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 800;
}

.spec-grid span {
  padding: 8px 10px;
}

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

.algorithm-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.algorithm-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: 0;
  object-fit: cover;
  object-position: var(--image-position, center center);
}

.algorithm-card div {
  padding: 18px;
}

.catalog-card p {
  min-height: 54px;
  line-height: 1.65;
}

.card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.card-tags small {
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 800;
}

.algorithm-detail {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "overview"
    "trial"
    "boxes";
  gap: 24px;
  align-items: start;
  padding: 28px 30px 46px;
}

.algorithm-overview {
  grid-area: overview;
  display: grid;
  grid-template-columns: minmax(420px, 0.96fr) minmax(0, 1.04fr);
  gap: 24px;
  min-width: 0;
}

.algorithm-copy {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.algorithm-copy h1 {
  font-size: clamp(44px, 4.1vw, 64px);
  line-height: 1.08;
  word-break: keep-all;
}

.algorithm-copy ul {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0;
  margin: 20px 0;
  list-style: none;
}

.algorithm-copy li {
  padding: 8px 10px;
}

.inline-section {
  padding: 0;
}

.compatible-section {
  grid-area: boxes;
  min-width: 0;
}

.inline-section .section-head {
  margin-top: 10px;
}

.box-spec-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.box-spec-card {
  display: grid;
  grid-template-columns: minmax(360px, 42%) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 36px rgba(28, 34, 30, 0.06);
}

.box-spec-card img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  object-position: center bottom;
}

.box-spec-card > div {
  min-width: 0;
  padding: 16px;
}

.box-spec-card span {
  color: var(--gold);
  font-weight: 900;
}

.box-spec-card h3 {
  margin: 8px 0 10px;
  font-size: 24px;
  line-height: 1.25;
}

.box-spec-card dl {
  gap: 8px;
  margin: 14px 0;
}

.box-spec-card dl div {
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.box-spec-card dd {
  line-height: 1.5;
  word-break: normal;
  overflow-wrap: break-word;
}

.box-spec-card p {
  margin: 12px 0 0;
  line-height: 1.65;
}

.case-strip {
  display: grid;
  gap: 10px;
  margin: 18px 0 20px;
  padding: 14px;
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  background: #fff8e8;
}

.case-strip strong {
  color: var(--ink);
}

.case-strip div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.case-strip span {
  padding: 7px 9px;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
}

.trial-panel {
  grid-area: trial;
  position: static;
  padding: 20px;
}

.trial-panel h2 {
  margin-top: 0;
}

.upload-box {
  display: grid;
  place-items: center;
  min-height: 160px;
  margin: 16px 0;
  border: 1px dashed rgba(15, 107, 76, 0.42);
  border-radius: 8px;
  background: #f4faf6;
  color: var(--green);
  font-weight: 900;
  text-align: center;
}

.upload-box input {
  display: none;
}

.upload-box small {
  display: block;
  margin-top: 6px;
}

.upload-preview {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: 12px 0;
  padding: 10px;
}

.preview-thumb {
  width: 96px;
  height: 68px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--dark);
}

.preview-thumb img,
.preview-thumb video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.upload-preview strong,
.upload-preview span,
.upload-preview small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.processing {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  color: var(--muted);
}

.processing div {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #e1e6df;
}

.processing i {
  display: block;
  width: 58%;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--gold));
  animation: loading 0.9s ease-in-out infinite alternate;
}

@keyframes loading {
  from {
    transform: translateX(-40%);
  }
  to {
    transform: translateX(80%);
  }
}

.result-card {
  margin-top: 16px;
  overflow: hidden;
}

.result-media {
  position: relative;
}

.result-media img,
.result-media video {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: cover;
}

.result-media span {
  position: absolute;
  left: 24%;
  top: 20%;
  width: 36%;
  height: 44%;
  border: 3px solid #ff5c50;
  color: #fff;
  padding: 6px;
  font-weight: 900;
}

.result-summary {
  padding: 14px;
  border-left: 4px solid var(--gold);
  background: #fff8e8;
  line-height: 1.65;
}

.result-card button {
  margin: 0 14px 14px;
}

.form-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(360px, 1.15fr);
  gap: 28px;
  margin: 34px 30px;
  padding: 28px;
}

.security-note {
  display: grid;
  gap: 6px;
  margin-top: 22px;
  padding: 16px;
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: var(--green-soft);
}

.solution-form,
.login-form {
  display: grid;
  gap: 14px;
}

.solution-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wide {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 7px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(15, 107, 76, 0.12);
}

.success-message {
  min-height: 24px;
  margin: 0;
  color: var(--green);
  font-weight: 900;
}

.form-error {
  min-height: 22px;
  margin: 0;
  color: var(--danger);
  font-weight: 800;
}

.api-layout {
  align-items: center;
  padding-top: 54px;
}

.license-card {
  padding: 22px;
}

.license-card strong {
  display: block;
  margin: 10px 0;
  font-size: 28px;
}

.flow-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0 30px 46px;
}

.flow-grid article {
  padding: 20px;
}

.admin-layout {
  padding: 34px 30px 46px;
}

.admin-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

.admin-metrics article {
  padding: 18px;
}

.admin-metrics strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
}

.admin-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-columns section {
  padding: 18px;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-row {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.empty-state {
  color: var(--muted);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 24, 21, 0.58);
  backdrop-filter: blur(10px);
}

.login-panel {
  position: relative;
  width: min(480px, 100%);
  padding: 24px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  padding: 0;
  background: #eef3ed;
  color: var(--ink);
  font-size: 22px;
}

.login-tabs {
  margin: 18px 0;
}

.login-tabs button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

.login-tabs button.active {
  background: var(--green);
  color: #fff;
}

@media (max-width: 1080px) {
  .site-header {
    grid-template-columns: 1fr;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .hero,
  .box-detail,
  .algorithm-detail,
  .api-layout,
  .form-shell {
    grid-template-columns: 1fr;
  }

  .algorithm-detail {
    grid-template-areas:
      "overview"
      "trial"
      "boxes";
  }

  .algorithm-overview {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 30px;
  }

  .hero-media img {
    height: 360px;
    border-radius: 8px;
  }

  .summary-grid,
  .trial-banner,
  .filter-bar,
  .algorithm-grid,
  .box-grid,
  .flow-grid,
  .admin-metrics,
  .admin-columns {
    grid-template-columns: 1fr 1fr;
  }

  .trial-panel {
    position: static;
  }
}

@media (max-width: 680px) {
  .site-header,
  .hero,
  .section-block,
  .box-detail,
  .algorithm-detail,
  .api-layout,
  .admin-layout {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero h1,
  .form-intro h1,
  .api-layout h1,
  .box-detail h1,
  .algorithm-detail h1,
  .admin-layout h1 {
    font-size: 38px;
  }

  .summary-grid,
  .trial-banner,
  .filter-bar,
  .box-grid,
  .flow-grid,
  .admin-metrics,
  .admin-columns,
  .algorithm-grid,
  .box-spec-grid,
  .solution-form {
    grid-template-columns: 1fr;
  }

  .algorithm-card,
  .box-spec-card {
    grid-template-columns: 1fr;
  }

  .algorithm-card img {
    aspect-ratio: 16 / 9;
    height: auto;
  }

  .box-spec-card img,
  .box-detail-media img {
    height: 260px;
  }

  .algorithm-hero-image {
    aspect-ratio: 16 / 9;
    height: auto;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-logo {
    width: 118px;
  }
}
