:root {
  color-scheme: light;
  --ink: #18221d;
  --muted: #5d6861;
  --quiet: #eef2ec;
  --panel: #fbfcf8;
  --line: #cbd5cc;
  --line-strong: #9aa89d;
  --accent: #146b59;
  --accent-strong: #0b4e41;
  --warn: #9f5a12;
  --danger: #9a2e22;
  --ok: #247f42;
  --shadow: 0 18px 50px rgba(33, 45, 38, 0.12);
  font-family: "Aptos", "Segoe UI", "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(20, 107, 89, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(20, 107, 89, 0.04) 1px, transparent 1px),
    #f5f7f1;
  background-size: 44px 44px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
}

a {
  color: var(--accent-strong);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.shell {
  min-height: 100vh;
}

.topbar {
  align-items: center;
  background: rgba(245, 247, 241, 0.94);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 14px clamp(18px, 4vw, 52px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  align-items: center;
  color: var(--ink);
  display: flex;
  font-weight: 760;
  gap: 10px;
  letter-spacing: 0;
}

.brand-mark {
  background: conic-gradient(from 120deg, #143c35, #1d806a, #d5b056, #143c35);
  border: 1px solid rgba(24, 34, 29, 0.18);
  border-radius: 6px;
  height: 28px;
  width: 28px;
}

.nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.nav a {
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  padding: 8px 10px;
}

.nav a[aria-current="page"],
.nav a:hover {
  background: #e6ece4;
  color: var(--ink);
  text-decoration: none;
}

.nav .primary-link {
  background: var(--accent);
  color: #fff;
}

.nav .primary-link:hover {
  background: var(--accent-strong);
  color: #fff;
}

.page {
  margin: 0 auto;
  max-width: 1180px;
  padding: clamp(28px, 5vw, 60px) clamp(18px, 4vw, 52px) 60px;
}

.workbench {
  align-items: start;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
}

.lead {
  max-width: 760px;
}

.eyebrow {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 760;
  margin: 0 0 10px;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  letter-spacing: 0;
  line-height: 1.08;
  margin: 0;
}

h1 {
  font-size: clamp(36px, 7vw, 72px);
  max-width: 900px;
}

h2 {
  font-size: clamp(26px, 4vw, 42px);
}

h3 {
  font-size: 18px;
}

.copy {
  color: var(--muted);
  font-size: 18px;
  margin: 18px 0 0;
  max-width: 720px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.button,
button {
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 720;
  gap: 8px;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
}

.button.primary,
button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.button.secondary,
button.secondary {
  background: #fff;
  color: var(--ink);
}

.button:hover,
button:hover {
  text-decoration: none;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.panel {
  background: rgba(251, 252, 248, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel-body {
  padding: 18px;
}

.status-wall {
  display: grid;
  gap: 12px;
}

.camera-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: 90px minmax(0, 1fr) auto;
  padding: 13px 16px;
}

.camera-row:last-child {
  border-bottom: 0;
}

.feed-tile {
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 44%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 9px),
    #26352d;
  border: 1px solid #607064;
  border-radius: 4px;
  position: relative;
}

.feed-tile::after {
  background: var(--feed, #4fb06f);
  border-radius: 50%;
  content: "";
  height: 8px;
  left: 8px;
  position: absolute;
  top: 8px;
  width: 8px;
}

.camera-row strong {
  display: block;
  font-size: 14px;
}

.camera-row span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-top: 3px;
}

.severity {
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 760;
  padding: 5px 8px;
  white-space: nowrap;
}

.severity.ok {
  color: var(--ok);
}

.severity.warn {
  color: var(--warn);
}

.severity.critical {
  color: var(--danger);
}

.band {
  border-top: 1px solid var(--line);
  margin-top: 44px;
  padding-top: 28px;
}

.feature-grid,
.plan-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.feature,
.plan {
  background: rgba(251, 252, 248, 0.84);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.feature p,
.plan p {
  color: var(--muted);
  margin: 8px 0 0;
}

.plan {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.plan-price {
  font-size: 30px;
  font-weight: 800;
}

.plan-price small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.checkout-layout {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 0.65fr);
  margin-top: 24px;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 7px;
}

input,
select,
textarea {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  min-height: 42px;
  padding: 9px 10px;
  resize: vertical;
  width: 100%;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.notice {
  background: #fff8e7;
  border: 1px solid #e0c878;
  border-radius: 7px;
  color: #67470a;
  margin-top: 14px;
  padding: 12px;
}

.notice.error {
  background: #fff0ed;
  border-color: #e5a398;
  color: #72261c;
}

.notice.ok {
  background: #eef8f0;
  border-color: #9ac8a6;
  color: #1e6030;
}

.quiet-list {
  color: var(--muted);
  margin: 12px 0 0;
  padding-left: 18px;
}

.quiet-list li {
  margin: 6px 0;
}

.download-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 20px;
  overflow: hidden;
}

.download-row {
  align-items: center;
  background: rgba(251, 252, 248, 0.9);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 15px 16px;
}

.download-row:last-child {
  border-bottom: 0;
}

.meta {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.release-panel {
  margin-top: 24px;
}

.release-panel .notice {
  margin-bottom: 14px;
}

.release-summary {
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
  padding-bottom: 14px;
}

.release-summary h2 {
  margin-top: 4px;
}

.release-summary p {
  color: var(--muted);
  margin: 10px 0 0;
}

.release-table:empty {
  display: none;
}

.release-artifact {
  background: #fff;
}

.checksum-wrap {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}

.checksum {
  background: #eef2ec;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  display: inline-block;
  font-size: 12px;
  line-break: anywhere;
  margin-top: 3px;
  padding: 3px 5px;
}

.manifest-meta {
  margin-top: 12px;
}

.disabled-link {
  cursor: not-allowed;
  opacity: 0.65;
}

.compact-lead h1 {
  font-size: clamp(32px, 5vw, 54px);
}

.portal-layout {
  display: grid;
  gap: 22px;
  margin-top: 24px;
}

.account-signin {
  max-width: 460px;
}

.account-signin .panel-body {
  display: grid;
  gap: 14px;
}

.account-workspace {
  display: grid;
  gap: 16px;
}

.account-toolbar {
  align-items: end;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding-bottom: 16px;
}

.account-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(251, 252, 248, 0.86);
  padding: 13px;
}

.metric strong {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.metric span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 5px;
}

.license-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.license-card {
  background: rgba(251, 252, 248, 0.92);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.55fr);
  padding: 16px;
}

.license-card:last-child {
  border-bottom: 0;
}

.license-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 760;
  padding: 4px 8px;
  white-space: nowrap;
}

.pill.active {
  border-color: #9ac8a6;
  color: var(--ok);
}

.license-facts {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}

.fact {
  border-left: 2px solid var(--line);
  padding-left: 9px;
}

.fact span {
  color: var(--muted);
  display: block;
  font-size: 12px;
}

.fact strong {
  display: block;
  font-size: 14px;
  margin-top: 2px;
}

.license-actions {
  align-content: start;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.activation-code {
  background: #eef2ec;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  display: block;
  font-size: 13px;
  line-break: anywhere;
  margin-top: 10px;
  padding: 9px;
}

.offline-request-panel {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
  margin-top: 2px;
  padding-top: 14px;
}

.footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 12px;
  justify-content: space-between;
  margin: 20px auto 0;
  max-width: 1180px;
  padding: 22px clamp(18px, 4vw, 52px);
}

.hidden {
  display: none !important;
}

@media (max-width: 860px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

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

  .workbench,
  .checkout-layout,
  .license-card,
  .feature-grid,
  .plan-grid,
  .account-grid {
    grid-template-columns: 1fr;
  }

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

  .license-actions {
    justify-content: flex-start;
  }

  .camera-row {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .severity {
    grid-column: 2;
    justify-self: start;
  }

  .download-row {
    grid-template-columns: 1fr;
  }
}
