:root {
  color-scheme: light dark;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #0f172a;
  color: #e2e8f0;
}

body {
  margin: 0;
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.site-nav {
  margin-bottom: 2rem;
  background: rgba(15, 23, 42, 0.75);
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 0.75rem 1.25rem;
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.08), 0 10px 30px rgba(15, 23, 42, 0.35);
}

.site-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-nav__item {
  display: flex;
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border 0.2s ease,
    box-shadow 0.2s ease;
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
  background: rgba(148, 163, 184, 0.2);
  border-color: rgba(148, 163, 184, 0.35);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.4);
  outline: none;
}

.site-nav__link--active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.9), rgba(129, 140, 248, 0.9));
  color: #0f172a;
  border-color: transparent;
  box-shadow: 0 14px 36px rgba(59, 130, 246, 0.35);
}

.site-nav__link--active:hover,
.site-nav__link--active:focus-visible {
  background: linear-gradient(135deg, rgba(56, 189, 248, 1), rgba(129, 140, 248, 1));
  color: #0f172a;
  transform: translateY(0);
}

main {
  max-width: 960px;
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(16px);
}

h1 {
  margin-top: 0;
  font-size: 2.5rem;
}

h2 {
  margin-bottom: 1rem;
}

p {
  line-height: 1.6;
  font-size: 1.05rem;
}

.hero {
  margin-bottom: 2.5rem;
}

.code {
  font-family: "JetBrains Mono", "Fira Code", monospace;
  background: rgba(148, 163, 184, 0.12);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  display: inline-block;
}

footer {
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #94a3b8;
}

@media (max-width: 640px) {
  body {
    padding: 1.5rem;
  }

  .site-nav {
    padding: 0.75rem 1rem;
  }

  .site-nav__link {
    width: 100%;
    justify-content: flex-start;
  }
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.6rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(148, 163, 184, 0.15);
  color: #e2e8f0;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border 0.2s ease;
  text-decoration: none;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.4);
  background: rgba(148, 163, 184, 0.25);
}

.button:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.35);
}

.button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.button--primary {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.95), rgba(99, 102, 241, 0.95));
  border: none;
  color: #0f172a;
  box-shadow: 0 18px 45px rgba(79, 70, 229, 0.45);
}

.button--primary:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 1), rgba(129, 140, 248, 1));
}

.button--primary:disabled {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.4), rgba(99, 102, 241, 0.4));
  color: rgba(15, 23, 42, 0.7);
  box-shadow: none;
}

.section {
  margin-top: 2rem;
  background: rgba(15, 23, 42, 0.65);
  border-radius: 20px;
  padding: 1.75rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.section__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.section__status {
  font-size: 0.95rem;
  color: #cbd5f5;
  opacity: 0.85;
}

.section__subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
  color: #94a3b8;
}

.summary__metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.metric-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.25rem;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 14px 45px rgba(15, 23, 42, 0.35);
}

.metric-card__label {
  font-size: 0.9rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.metric-card__value {
  font-size: 1.6rem;
  font-weight: 700;
}

.metric-card__delta {
  font-size: 0.9rem;
  color: #38bdf8;
}

.section__grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.agent-download {
  margin-top: 1.25rem;
  display: grid;
  gap: 0.75rem;
}

.agent-download__label {
  font-weight: 600;
  color: #cbd5f5;
}

.agent-download__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.agent-download__input {
  flex: 1 1 260px;
  min-width: 0;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.65);
  color: #e2e8f0;
}

.agent-download__input::placeholder {
  color: rgba(148, 163, 184, 0.75);
}

.agent-download__button {
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  color: #0f172a;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 10px 25px rgba(14, 165, 233, 0.35);
}

.agent-download__button:hover,
.agent-download__button:focus {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.45);
}

.agent-download__result {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.15);
  color: #e0f2fe;
  display: grid;
  gap: 0.35rem;
}

.agent-download__link {
  color: #0f172a;
  font-weight: 700;
  text-decoration: none;
}

.agent-download__link:hover,
.agent-download__link:focus {
  text-decoration: underline;
}

.agent-download__meta {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(15, 23, 42, 0.85);
}

.info-card {
  padding: 1.5rem;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.15);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.33);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.info-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.info-card__title {
  margin: 0;
  font-size: 1.35rem;
}

.info-card__text {
  margin: 0;
  color: #e2e8f0;
  line-height: 1.55;
}

.info-card__meta {
  margin: 0;
  color: #cbd5f5;
  font-size: 0.95rem;
}

.info-card__link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.25rem;
  color: #38bdf8;
  text-decoration: none;
  font-weight: 600;
}

.info-card__link::after {
  content: "→";
  font-size: 1rem;
}

.info-card__link:hover,
.info-card__link:focus {
  text-decoration: underline;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
  background: rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
}

.orders__list {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.order-card {
  padding: 1.5rem;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.15);
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.35);
}

.order-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.4rem;
}

.order-meta {
  margin: 0;
  font-size: 0.95rem;
  color: #cbd5f5;
}

.order-preview {
  margin-top: 1rem;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 12px;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.order-download {
  display: inline-block;
  margin-top: 0.75rem;
  color: #38bdf8;
  text-decoration: none;
  font-weight: 600;
}

.order-download:hover,
.order-download:focus {
  text-decoration: underline;
}

.tests {
  align-items: flex-start;
}

.tests__main {
  width: 100%;
}

@media (max-width: 720px) {
  .agent-download__controls {
    flex-direction: column;
    align-items: stretch;
  }

  .agent-download__button {
    width: 100%;
  }
}

.page__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.page__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  color: #38bdf8;
  margin: 0 0 0.5rem;
}

.page__subtitle {
  margin: 0.5rem 0 0;
  color: #94a3b8;
  max-width: 540px;
}

.page__nav {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.page__footer {
  margin-top: 3rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.9rem;
}

.agent-card__role {
  margin: 0;
  font-weight: 600;
  color: #cbd5f5;
}

.agent-card__contact {
  margin: 0;
  color: #38bdf8;
}

.agent-card__contact a {
  color: inherit;
  text-decoration: none;
}

.agent-card__contact a:hover,
.agent-card__contact a:focus {
  text-decoration: underline;
}

.agent-card__subtitle {
  margin: 1.5rem 0 0.75rem;
  font-size: 1.1rem;
}

.device-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.device-list__item {
  background: rgba(15, 23, 42, 0.55);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.device-list__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.device-list__name {
  font-weight: 600;
}

.device-list__meta {
  margin: 0.5rem 0 0;
  color: #94a3b8;
  font-size: 0.9rem;
}

.device-list__description {
  margin: 0.75rem 0 0;
  color: #cbd5f5;
  font-size: 0.95rem;
}

.badge--subtle {
  background: rgba(148, 163, 184, 0.2);
  border-color: rgba(148, 163, 184, 0.35);
  color: #e2e8f0;
}

.hero--tests {
  margin-bottom: 2rem;
}

.tests__settings {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: flex-end;
  margin-bottom: 2.5rem;
}

.tests__settings-field {
  flex: 1 1 280px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tests__settings label {
  font-weight: 600;
}

.tests__settings input[type="url"],
.tests__settings input[type="text"],
.tests__settings input[type="password"] {
  padding: 0.75rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.7);
  color: #e2e8f0;
  font-size: 1rem;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.tests__settings input[type="url"]:focus,
.tests__settings input[type="text"]:focus,
.tests__settings input[type="password"]:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.8);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}

.tests__help {
  margin: 0;
  font-size: 0.9rem;
  color: #94a3b8;
}

.tests__tokens {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.tests__tokens-header {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.tests__tokens-info {
  flex: 1 1 260px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tests__token-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.tests__token-status {
  margin: 0;
  min-height: 1.5rem;
  font-size: 0.95rem;
  color: #94a3b8;
}

.tests__token-status[data-state="progress"] {
  color: #38bdf8;
}

.tests__token-status[data-state="success"] {
  color: #34d399;
}

.tests__token-status[data-state="error"] {
  color: #f87171;
}

.tokens__grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.token-card {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  padding: 1.5rem;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.3);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.token-card__header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.token-card__title {
  margin: 0;
  font-size: 1.15rem;
}

.token-card__description {
  margin: 0;
  color: #94a3b8;
  font-size: 0.95rem;
}

.token-card__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.token-card__actions .button {
  flex: 0 1 auto;
}

.token-card__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.token-card__value {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(30, 41, 59, 0.75);
  color: #38bdf8;
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 0.95rem;
}

.token-card__value[data-state="empty"] {
  color: #94a3b8;
}

.token-card__meta {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 0.8rem;
  font-size: 0.9rem;
  color: #94a3b8;
}

.token-card__meta dt {
  font-weight: 600;
}

.token-card__meta dd {
  margin: 0;
}

.tests__results {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tests__summary {
  margin: 0;
  font-size: 1rem;
  min-height: 1.5rem;
}

.tests__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.tests__item {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 1.5rem;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.tests__item[data-status="running"] {
  border-color: rgba(96, 165, 250, 0.6);
  box-shadow: 0 14px 40px rgba(59, 130, 246, 0.25);
}

.tests__item[data-status="success"] {
  border-color: rgba(74, 222, 128, 0.7);
  box-shadow: 0 14px 40px rgba(74, 222, 128, 0.18);
}

.tests__item[data-status="error"] {
  border-color: rgba(248, 113, 113, 0.7);
  box-shadow: 0 14px 40px rgba(248, 113, 113, 0.18);
}

.tests__item-header {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tests__label {
  font-weight: 600;
  font-size: 1.05rem;
}

.tests__status {
  font-size: 0.95rem;
  color: #cbd5f5;
}

.tests__controls {
  display: flex;
  gap: 0.75rem;
}

.tests__details {
  margin: 0;
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.18);
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 0.9rem;
  white-space: pre-wrap;
  color: #e2e8f0;
  max-height: 12rem;
  overflow-y: auto;
}

.tests__footer {
  margin-top: 2.5rem;
  font-size: 0.95rem;
  color: #94a3b8;
}

.docs {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.hero--docs {
  margin-bottom: 0;
}

.docs__cta {
  margin-top: 1.5rem;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.docs__section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.docs__grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.docs__grid--columns {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.docs-card,
.docs-endpoint {
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  padding: 1.6rem;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.38);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.docs-card h3 {
  margin: 0;
  font-size: 1.3rem;
}

.docs-card p {
  margin: 0;
  color: #cbd5f5;
  line-height: 1.6;
}

.docs-endpoint {
  position: relative;
}

.docs-endpoint--wide {
  grid-column: span 2;
}

.docs-endpoint__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.docs-endpoint__method {
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.docs-endpoint__method + .docs-endpoint__method {
  margin-left: 0.25rem;
}

.docs-endpoint__method--get {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.docs-endpoint__method--post {
  background: rgba(129, 140, 248, 0.18);
  border-color: rgba(129, 140, 248, 0.35);
  color: #818cf8;
}

.docs-endpoint__method--put {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.docs-endpoint__path {
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 0.95rem;
  background: rgba(15, 23, 42, 0.55);
  padding: 0.35rem 0.8rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.docs-endpoint p {
  margin: 0;
  color: #e2e8f0;
  line-height: 1.6;
}

.docs-endpoint__example {
  margin: 0;
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 0.85rem;
  line-height: 1.6;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.75);
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  overflow-x: auto;
}

.docs__footer {
  color: #94a3b8;
  line-height: 1.6;
  font-size: 0.95rem;
}

@media (max-width: 1024px) {
  body {
    padding: 1.75rem;
  }

  main {
    padding: 2rem;
  }
}

@media (max-width: 768px) {
  body {
    align-items: stretch;
    padding: 1.5rem;
  }

  main {
    padding: 1.75rem;
    border-radius: 20px;
  }

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

  .summary__metrics {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .section__grid {
    grid-template-columns: 1fr;
  }

  .tests__settings {
    flex-direction: column;
    align-items: stretch;
  }

  .docs__grid,
  .docs__grid--columns {
    grid-template-columns: 1fr;
  }

  .docs-endpoint--wide {
    grid-column: span 1;
  }

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

  .tokens__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  body {
    padding: 1rem;
  }

  main {
    padding: 1.4rem;
    border-radius: 18px;
  }

  h1 {
    font-size: 2rem;
  }

  p {
    font-size: 1rem;
  }

  .section {
    padding: 1.35rem;
    border-radius: 16px;
  }

  .metric-card__value {
    font-size: 1.4rem;
  }

  .info-card__title {
    font-size: 1.2rem;
  }

  .tests__details {
    font-size: 0.85rem;
  }

  .docs__cta {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .docs__cta .button {
    width: 100%;
    justify-content: center;
  }
}
