:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --ink: #18202f;
  --muted: #667085;
  --line: #d9dee8;
  --primary: #0f766e;
  --primary-strong: #115e59;
  --accent: #f59e0b;
  --danger: #b42318;
  --shadow: 0 18px 50px rgba(24, 32, 47, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 16px clamp(20px, 5vw, 64px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  color: var(--primary-strong);
  font-size: 22px;
  font-weight: 800;
}

.nav {
  align-items: center;
  display: flex;
  gap: 18px;
}

.nav form {
  margin: 0;
}

.link-button {
  background: none;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.hero {
  display: grid;
  gap: 42px;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  min-height: 620px;
  padding: clamp(48px, 8vw, 96px) clamp(20px, 5vw, 64px);
}

.hero-copy {
  align-self: center;
}

.eyebrow {
  color: var(--primary);
  font-weight: 800;
  margin: 0 0 12px;
}

h1 {
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  margin: 0 0 20px;
}

h2 {
  font-size: 22px;
  margin: 0 0 14px;
}

.lead {
  color: var(--muted);
  font-size: 19px;
  line-height: 1.8;
  margin: 0;
  max-width: 760px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
}

.button.primary {
  background: var(--primary);
  color: white;
}

.button.secondary {
  background: white;
  border-color: var(--line);
  color: var(--ink);
}

.button.full {
  width: 100%;
}

.release-line {
  color: var(--muted);
  margin-top: 18px;
}

.device-panel {
  align-items: center;
  display: flex;
  justify-content: center;
}

.screen {
  aspect-ratio: 9 / 13;
  background: #111827;
  border: 10px solid #263142;
  border-radius: 28px;
  box-shadow: var(--shadow);
  color: white;
  max-width: 360px;
  padding: 28px;
  width: 100%;
}

.screen-bar {
  background: #374151;
  border-radius: 99px;
  height: 10px;
  margin: 0 auto 34px;
  width: 84px;
}

.metric-row {
  background: #1f2937;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  padding: 18px;
}

.metric-row strong {
  color: #5eead4;
}

.tile-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
  margin: 18px 0;
}

.tile-grid span {
  background: #334155;
  border-radius: 8px;
  padding: 18px;
  text-align: center;
}

.order-line {
  background: #475569;
  border-radius: 99px;
  height: 14px;
  margin-top: 18px;
  width: 100%;
}

.order-line.short {
  width: 72%;
}

.band {
  background: white;
  border-top: 1px solid var(--line);
  padding: 44px clamp(20px, 5vw, 64px);
}

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

.feature-grid article,
.panel,
.auth-card,
.result-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

.feature-grid p,
.auth-card p {
  color: var(--muted);
  line-height: 1.7;
}

.auth-card {
  margin: 72px auto;
  max-width: 440px;
}

.auth-card h1 {
  font-size: 32px;
}

.stack-form {
  display: grid;
  gap: 16px;
}

label span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 7px;
}

input,
select,
textarea {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 42px;
  padding: 10px 12px;
  width: 100%;
}

textarea {
  resize: vertical;
}

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

.captcha-row img {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: block;
}

.captcha-refresh {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--primary-strong);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  min-height: 42px;
  padding: 0 10px;
  white-space: nowrap;
}

.admin-layout {
  display: grid;
  gap: 22px;
  padding: 32px clamp(20px, 5vw, 64px);
}

.admin-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.admin-heading h1 {
  font-size: 38px;
  margin-bottom: 0;
}

.badge {
  background: #ecfdf3;
  border: 1px solid #abefc6;
  border-radius: 999px;
  color: #067647;
  font-weight: 800;
  padding: 8px 12px;
}

.badge.muted {
  background: #f2f4f7;
  border-color: var(--line);
  color: var(--muted);
}

.flash {
  border-radius: 8px;
  margin: 18px auto 0;
  max-width: 900px;
  padding: 12px 14px;
}

.flash.inline {
  margin: 0 0 16px;
}

.flash.error {
  background: #fef3f2;
  border: 1px solid #fecdca;
  color: var(--danger);
}

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

.license-form .wide {
  grid-column: span 2;
}

.license-form button {
  align-self: end;
}

.result-box {
  background: #f0fdfa;
  border-color: #99f6e4;
}

.result-box textarea {
  font-family: "Cascadia Mono", Consolas, monospace;
}

.table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 13px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 13px;
}

code {
  font-family: "Cascadia Mono", Consolas, monospace;
}

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

.footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  padding: 24px clamp(20px, 5vw, 64px);
}

@media (max-width: 900px) {
  .hero,
  .feature-grid,
  .license-form {
    grid-template-columns: 1fr;
  }

  .license-form .wide {
    grid-column: auto;
  }

  .admin-heading,
  .footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 520px) {
  .captcha-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .captcha-row input {
    grid-column: 1 / -1;
  }
}
