:root {
  color-scheme: light;
  --bg: #f7f7f4;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: #ffffff;
  --text: #111318;
  --muted: #646b77;
  --faint: #8d96a3;
  --line: rgba(17, 19, 24, 0.1);
  --accent: #6f3cff;
  --accent-strong: #5d2ff0;
  --accent-soft: rgba(111, 60, 255, 0.1);
  --green: #18b981;
  --shadow: 0 24px 80px rgba(17, 19, 24, 0.1);
  --max: 1180px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: view-out 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

::view-transition-new(root) {
  animation: view-in 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgba(17, 19, 24, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 19, 24, 0.026) 1px, transparent 1px),
    linear-gradient(180deg, #ffffff 0, var(--bg) 42rem);
  background-size: 48px 48px, 48px 48px, auto;
}

.site-header,
main,
.site-footer,
.auth-header,
.auth-page {
  transition:
    opacity 260ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.page-transition-layer {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  overflow: hidden;
  background: transparent;
  transition:
    opacity 160ms ease,
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.page-transition-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 42%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--green), transparent);
  transform: translateX(-120%);
  box-shadow: 0 0 24px rgba(111, 60, 255, 0.24);
}

body.is-leaving .page-transition-layer {
  opacity: 1;
}

body.is-leaving .page-transition-layer::after {
  animation: page-progress 780ms cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

body.is-leaving .site-header,
body.is-leaving main,
body.is-leaving .site-footer,
body.is-leaving .auth-header,
body.is-leaving .auth-page {
  opacity: 0.72;
  filter: blur(1.5px) saturate(0.98);
  transform: translateY(-3px);
}

@keyframes view-out {
  from {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }

  to {
    opacity: 0.78;
    filter: blur(1px);
    transform: translateY(-4px);
  }
}

@keyframes view-in {
  from {
    opacity: 0;
    filter: blur(4px);
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@keyframes page-progress {
  0% {
    transform: translateX(-120%);
  }

  100% {
    transform: translateX(260%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .site-header,
  main,
  .site-footer,
  .auth-header,
  .auth-page,
  .page-transition-layer {
    transition: none;
    transform: none;
  }
}

body.dark {
  color-scheme: dark;
  --bg: #0d1016;
  --surface: rgba(20, 23, 31, 0.86);
  --surface-strong: #14171f;
  --text: #f4f6fb;
  --muted: #a2a9b4;
  --faint: #747c89;
  --line: rgba(255, 255, 255, 0.1);
  --accent-soft: rgba(111, 60, 255, 0.18);
  --shadow: 0 26px 86px rgba(0, 0, 0, 0.32);
  background:
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(180deg, #111520 0, var(--bg) 42rem);
  background-size: 48px 48px, 48px 48px, auto;
}

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

button {
  font: inherit;
}

svg,
img {
  display: block;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(18px);
}

body.dark .site-header {
  background: rgba(13, 16, 22, 0.78);
}

.auth-body {
  min-height: 100vh;
  background:
    linear-gradient(rgba(17, 19, 24, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 19, 24, 0.024) 1px, transparent 1px),
    linear-gradient(180deg, #ffffff 0, var(--bg) 100%);
  background-size: 48px 48px, 48px 48px, auto;
}

body.dark.auth-body {
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(180deg, #111520 0, var(--bg) 100%);
  background-size: 48px 48px, 48px 48px, auto;
}

.auth-header {
  display: flex;
  width: min(var(--max), calc(100% - 48px));
  height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
}

.auth-page {
  display: grid;
  width: min(440px, calc(100% - 32px));
  min-height: calc(100vh - 112px);
  place-items: center;
  margin: 0 auto;
  padding: 32px 0 72px;
}

.auth-panel {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 34px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.auth-panel h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.05;
}

.auth-panel > p:not(.auth-eyebrow):not(.auth-switch) {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 28px 0 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px;
  background: rgba(17, 19, 24, 0.035);
}

body.dark .auth-tabs {
  background: rgba(255, 255, 255, 0.055);
}

.auth-tabs button {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 760;
}

.auth-tabs button.active {
  color: var(--text);
  background: var(--surface-strong);
  box-shadow: 0 10px 26px rgba(17, 19, 24, 0.08);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.auth-form input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  outline: 0;
  font-weight: 650;
}

body.dark .auth-form input {
  background: rgba(255, 255, 255, 0.05);
}

.auth-form input:focus {
  border-color: rgba(111, 60, 255, 0.42);
  box-shadow: 0 0 0 4px rgba(111, 60, 255, 0.1);
}

.auth-message {
  margin: 0;
  border: 1px solid rgba(239, 68, 68, 0.24);
  border-radius: 8px;
  padding: 10px 12px;
  color: #b42318;
  background: rgba(239, 68, 68, 0.08);
  line-height: 1.5;
}

body.dark .auth-message {
  color: #fca5a5;
}

.auth-submit {
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #111318;
  cursor: pointer;
  font-weight: 780;
}

body.dark .auth-submit {
  color: #111318;
  background: #fff;
}

.auth-switch {
  margin: 22px 0 0;
  color: var(--muted);
  text-align: center;
}

.auth-legal {
  margin: 14px 0 0;
  color: var(--faint);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.auth-legal a {
  color: var(--text);
  font-weight: 760;
}

.auth-switch button {
  border: 0;
  padding: 0;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  font-weight: 780;
}

.nav-shell,
.hero,
.pricing,
.access,
.catalog,
.product-detail,
.checkout-page,
.dashboard-shell,
.admin-shell,
.site-footer {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

.nav-shell,
.brand,
.desktop-nav,
.nav-actions,
.hero-actions,
.status-row,
.site-footer {
  display: flex;
  align-items: center;
}

.nav-shell {
  height: 72px;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  gap: 12px;
  font-size: 18px;
  font-weight: 760;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(17, 19, 24, 0.18);
}

.desktop-nav {
  gap: 8px;
}

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

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--text);
  background: rgba(17, 19, 24, 0.045);
}

body.dark .desktop-nav a:hover,
body.dark .desktop-nav a.active {
  background: rgba(255, 255, 255, 0.07);
}

.nav-actions {
  gap: 10px;
}

.language-switcher {
  position: relative;
}

.icon-button,
.ghost-button,
.solid-button,
.menu-button,
.plan-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
}

.icon-button,
.menu-button,
.language-button {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.language-button {
  grid-auto-flow: column;
  width: auto;
  min-width: 58px;
  gap: 5px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-weight: 760;
}

.icon-button svg,
.language-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.language-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 20;
  display: none;
  width: 200px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.language-switcher.open .language-menu {
  display: block;
}

.language-menu p {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.language-menu button {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-bottom: 1px solid rgba(17, 19, 24, 0.055);
  padding: 0 18px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

body.dark .language-menu button {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.language-menu button:last-child {
  border-bottom: 0;
}

.language-menu button:hover,
.language-menu button.active {
  color: var(--text);
  background: rgba(17, 19, 24, 0.045);
}

body.dark .language-menu button:hover,
body.dark .language-menu button.active {
  background: rgba(255, 255, 255, 0.07);
}

.language-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.language-menu button.active .language-dot {
  background: var(--accent);
}

.ghost-button,
.solid-button,
.plan-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  font-weight: 680;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.solid-button,
.plan-button.primary {
  color: #fff;
  border-color: #111318;
  background: #111318;
  box-shadow: 0 14px 28px rgba(17, 19, 24, 0.18);
}

body.dark .solid-button {
  color: #111318;
  border-color: #f4f6fb;
  background: #f4f6fb;
}

.ghost-button:hover,
.solid-button:hover,
.plan-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(17, 19, 24, 0.1);
}

.large {
  min-height: 50px;
  padding: 0 26px;
}

.menu-button {
  display: none;
  gap: 5px;
}

.menu-button span {
  width: 17px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto 14px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.mobile-nav a {
  display: block;
  padding: 12px;
  border-radius: 6px;
  color: var(--muted);
}

.mobile-nav.open {
  display: block;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 76px;
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: 72px 0;
}

.eyebrow {
  width: fit-content;
  margin-bottom: 22px;
  padding: 8px 12px;
  border: 1px solid rgba(111, 60, 255, 0.14);
  border-radius: 999px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 14px;
  font-weight: 760;
}

h1,
h2,
h3,
p,
dl,
dd {
  margin: 0;
}

.hero h1 {
  max-width: 790px;
  font-size: 76px;
  line-height: 1.02;
  letter-spacing: 0;
}

.hero p {
  max-width: 690px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.75;
}

.hero-actions {
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.hero-card,
.price-card,
.access article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 24px;
}

.status-row {
  gap: 10px;
  color: var(--muted);
  font-weight: 700;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(24, 185, 129, 0.14);
}

.hero-logo {
  display: grid;
  place-items: center;
  padding: 42px 0 38px;
}

.hero-logo img {
  width: min(260px, 78%);
  border-radius: 20px;
  box-shadow: 0 28px 70px rgba(17, 19, 24, 0.24);
}

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

.metrics div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
}

body.dark .metrics div {
  background: rgba(255, 255, 255, 0.04);
}

.metrics dt {
  color: var(--muted);
  font-size: 12px;
}

.metrics dd {
  margin-top: 7px;
  font-size: 20px;
  font-weight: 760;
}

.pricing,
.access {
  padding: 28px 0 64px;
}

.section-head {
  max-width: 620px;
  margin-bottom: 24px;
}

.section-head.split {
  display: flex;
  max-width: none;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.section-head p {
  margin-bottom: 8px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 780;
  text-transform: uppercase;
}

.section-head h2 {
  font-size: 42px;
  line-height: 1.12;
  letter-spacing: 0;
}

.section-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  border-bottom: 1px solid currentColor;
  color: var(--muted);
  font-weight: 720;
}

.section-link:hover {
  color: var(--text);
}

.pricing-grid,
.access-grid {
  display: grid;
  gap: 16px;
}

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

.price-card {
  position: relative;
  display: flex;
  min-height: 300px;
  flex-direction: column;
  padding: 24px;
}

.price-card.featured {
  border-color: rgba(111, 60, 255, 0.34);
  box-shadow:
    0 0 0 1px rgba(111, 60, 255, 0.13),
    var(--shadow);
}

.badge,
.plan-label {
  width: fit-content;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 780;
}

.badge {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 6px 10px;
  color: #fff;
  background: var(--accent);
}

.plan-label {
  display: block;
  margin-bottom: 14px;
  padding: 6px 9px;
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.price-card h3,
.access h3 {
  font-size: 22px;
  line-height: 1.2;
}

.price-card p,
.access p {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.price {
  margin-top: auto;
  padding-top: 32px;
}

.price strong {
  display: block;
  font-size: 34px;
  line-height: 1;
}

.price span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.plan-button {
  width: 100%;
  min-height: 46px;
  margin-top: 22px;
}

.plan-button.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

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

.access article {
  padding: 24px;
  box-shadow: 0 16px 42px rgba(17, 19, 24, 0.06);
}

.access article span {
  display: block;
  margin-bottom: 28px;
  color: var(--faint);
  font-weight: 780;
}

.catalog {
  padding: 56px 0 76px;
}

.catalog-hero {
  display: grid;
  gap: 12px;
  padding: 34px 0 36px;
  border-bottom: 1px solid var(--line);
}

.catalog-hero p,
.catalog-toolbar a {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 780;
  text-transform: uppercase;
}

.catalog-hero h1 {
  font-size: 54px;
  line-height: 1.04;
  letter-spacing: 0;
}

.catalog-hero span {
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding-top: 28px;
}

.catalog-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 16px 42px rgba(17, 19, 24, 0.06);
}

.search-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.product-search {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.58);
  outline: none;
}

body.dark .product-search {
  background: rgba(255, 255, 255, 0.05);
}

.product-search:focus {
  border-color: rgba(111, 60, 255, 0.42);
  box-shadow: 0 0 0 4px rgba(111, 60, 255, 0.1);
}

.filter-group {
  display: grid;
  gap: 8px;
}

.filter-button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.filter-button:hover,
.filter-button.active {
  border-color: var(--line);
  color: var(--text);
  background: rgba(17, 19, 24, 0.045);
}

body.dark .filter-button:hover,
body.dark .filter-button.active {
  background: rgba(255, 255, 255, 0.07);
}

.catalog-main {
  min-width: 0;
}

.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  color: var(--muted);
}

.catalog-toolbar strong {
  color: var(--text);
}

.catalog-toolbar a {
  text-transform: none;
}

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

.product-card {
  min-height: 276px;
  box-shadow: 0 16px 42px rgba(17, 19, 24, 0.06);
}

.product-card.is-hidden {
  display: none;
}

.product-detail {
  padding: 46px 0 76px;
}

.breadcrumb-link {
  display: inline-flex;
  margin-bottom: 26px;
  color: var(--muted);
  font-weight: 720;
}

.breadcrumb-link:hover {
  color: var(--text);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: stretch;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.detail-copy,
.detail-purchase-card,
.detail-panel,
.checkout-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.detail-copy {
  padding: 34px;
}

.detail-copy h1 {
  max-width: 760px;
  margin-top: 16px;
  font-size: 54px;
  line-height: 1.05;
  letter-spacing: 0;
}

.detail-copy p {
  max-width: 680px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}

.detail-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.42);
  font-size: 13px;
  font-weight: 700;
}

body.dark .detail-tags span {
  background: rgba(255, 255, 255, 0.04);
}

.detail-purchase-card {
  display: flex;
  flex-direction: column;
  padding: 26px;
}

.detail-purchase-card > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.detail-purchase-card strong {
  margin-top: 16px;
  font-size: 42px;
  line-height: 1;
}

.detail-purchase-card p {
  margin-top: 10px;
  color: var(--muted);
}

.detail-purchase-card .plan-button {
  margin-top: auto;
}

.detail-purchase-card small {
  display: block;
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.6;
}

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

.detail-panel {
  padding: 26px;
  box-shadow: 0 16px 42px rgba(17, 19, 24, 0.06);
}

.detail-panel > p,
.checkout-panel p {
  margin-bottom: 10px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 780;
  text-transform: uppercase;
}

.detail-panel h2,
.checkout-panel h2 {
  font-size: 28px;
  line-height: 1.15;
}

.detail-list {
  display: grid;
  gap: 12px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.detail-list li {
  position: relative;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.65;
}

.detail-list li::before {
  content: "";
  position: absolute;
  top: 0.7em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.checkout-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 16px;
  padding: 28px;
  box-shadow: 0 16px 42px rgba(17, 19, 24, 0.06);
}

.checkout-panel span {
  display: block;
  max-width: 680px;
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.checkout-page {
  padding: 46px 0 76px;
}

.checkout-head {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.checkout-head p,
.checkout-step h2,
.checkout-methods h2,
.order-card > p {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 780;
  text-transform: uppercase;
}

.checkout-head h1 {
  margin-top: 10px;
  font-size: 54px;
  line-height: 1.04;
  letter-spacing: 0;
}

.checkout-summary,
.checkout-form-card,
.order-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.checkout-summary {
  min-width: 300px;
  padding: 22px;
}

.checkout-summary span {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 780;
}

.checkout-summary strong {
  display: block;
  margin-top: 12px;
  font-size: 26px;
  line-height: 1.18;
}

.checkout-summary p {
  margin-top: 8px;
  color: var(--muted);
}

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}

.checkout-form-card,
.order-card {
  padding: 26px;
}

.checkout-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.checkout-label,
.checkout-input-label span {
  color: var(--muted);
  font-weight: 760;
}

.quantity-stepper {
  display: inline-grid;
  grid-template-columns: 42px 54px 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.quantity-stepper button,
.quantity-stepper strong {
  display: grid;
  min-height: 44px;
  place-items: center;
  border: 0;
  color: var(--text);
  background: rgba(17, 19, 24, 0.04);
}

body.dark .quantity-stepper button,
body.dark .quantity-stepper strong {
  background: rgba(255, 255, 255, 0.05);
}

.quantity-stepper button {
  cursor: pointer;
}

.quantity-stepper button:hover {
  background: var(--accent-soft);
}

.quantity-stepper.locked button,
.quantity-stepper button:disabled {
  cursor: not-allowed;
  color: var(--faint);
  background: rgba(17, 19, 24, 0.025);
}

body.dark .quantity-stepper.locked button,
body.dark .quantity-stepper button:disabled {
  background: rgba(255, 255, 255, 0.035);
}

.quantity-stepper.locked button:hover,
.quantity-stepper button:disabled:hover {
  background: rgba(17, 19, 24, 0.025);
}

.quantity-stepper strong {
  border-inline: 1px solid var(--line);
  background: var(--surface-strong);
}

.checkout-step,
.checkout-methods {
  margin-top: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.choice-grid,
.payment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.choice-card,
.payment-method {
  display: grid;
  gap: 7px;
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.4);
  text-align: left;
  cursor: pointer;
}

body.dark .choice-card,
body.dark .payment-method {
  background: rgba(255, 255, 255, 0.04);
}

.choice-card span,
.payment-method span,
.checkout-step > p,
.checkout-input-label + p {
  color: var(--muted);
  line-height: 1.55;
}

.choice-card.active,
.payment-method.active {
  border-color: rgba(111, 60, 255, 0.52);
  background: var(--accent-soft);
}

.checkout-hint {
  margin-top: 14px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 8px;
  padding: 13px 15px;
  color: #8a5a00;
  background: rgba(255, 246, 214, 0.78);
  line-height: 1.6;
}

body.dark .checkout-hint {
  color: #ffd27a;
  background: rgba(245, 158, 11, 0.12);
}

.checkout-input-label {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.checkout-input-label input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.46);
  outline: none;
}

body.dark .checkout-input-label input {
  background: rgba(255, 255, 255, 0.05);
}

.checkout-input-label input:focus {
  border-color: rgba(111, 60, 255, 0.42);
  box-shadow: 0 0 0 4px rgba(111, 60, 255, 0.1);
}

.payment-method {
  grid-template-columns: auto 1fr;
  align-items: center;
  min-height: 68px;
}

.payment-method span {
  font-size: 20px;
}

.order-card {
  position: sticky;
  top: 96px;
}

.order-line,
.order-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.order-line span,
.order-total span {
  color: var(--muted);
}

.order-total strong {
  font-size: 32px;
}

.pay-button {
  width: 100%;
  min-height: 54px;
  margin-top: 22px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  font-weight: 780;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(111, 60, 255, 0.22);
}

.pay-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.payment-result {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(111, 60, 255, 0.06);
}

.payment-result[data-tone="success"] {
  border-color: rgba(24, 185, 129, 0.3);
  background: rgba(24, 185, 129, 0.08);
}

.payment-result[data-tone="error"] {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.08);
}

.payment-result-head {
  display: grid;
  gap: 6px;
}

.payment-result-head span,
.payment-qr span,
.fulfillment-result span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.payment-result-head strong {
  overflow-wrap: anywhere;
}

.payment-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  color: #fff;
  background: #151321;
  text-decoration: none;
  font-weight: 780;
}

.payment-qr,
.fulfillment-result {
  display: grid;
  gap: 8px;
}

.payment-qr code,
.fulfillment-result code {
  display: block;
  padding: 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.76);
  overflow-wrap: anywhere;
  line-height: 1.45;
  white-space: pre-wrap;
}

.payment-qr img {
  width: min(220px, 100%);
  aspect-ratio: 1;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

body.dark .payment-qr code,
body.dark .fulfillment-result code {
  background: rgba(255, 255, 255, 0.06);
}

.order-card small {
  display: block;
  margin-top: 15px;
  color: var(--muted);
  line-height: 1.6;
}

.dashboard-shell {
  padding: 46px 0 76px;
  font-size: 14px;
}

.admin-shell {
  padding: 46px 0 76px;
  font-size: 14px;
}

.dashboard-hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.dashboard-hero > div {
  min-width: 0;
  padding: 6px 0 0;
}

.dashboard-hero > div > p,
.dashboard-card-head p {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dashboard-hero h1 {
  margin: 0;
  font-size: clamp(34px, 5.5vw, 58px);
  line-height: 0.95;
}

.dashboard-hero > div > span {
  display: block;
  max-width: 660px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.dashboard-account {
  width: 310px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.dashboard-account span,
.metric-card span,
.api-row span {
  color: var(--muted);
}

.dashboard-account strong {
  display: block;
  margin-top: 10px;
  font-size: 25px;
}

.dashboard-account p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 28px 0;
}

.metric-card,
.dashboard-card,
.dashboard-sidebar {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.metric-card {
  min-height: 154px;
  padding: 22px;
  box-shadow: 0 16px 44px rgba(17, 19, 24, 0.055);
}

.metric-card strong {
  display: block;
  margin: 16px 0 10px;
  font-size: 28px;
  line-height: 1;
}

.metric-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
}

.dashboard-sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 10px;
}

.dashboard-sidebar a {
  display: block;
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--muted);
  font-weight: 700;
}

.dashboard-sidebar a:hover,
.dashboard-sidebar a.active {
  color: var(--text);
  background: rgba(17, 19, 24, 0.055);
}

body.dark .dashboard-sidebar a:hover,
body.dark .dashboard-sidebar a.active {
  background: rgba(255, 255, 255, 0.075);
}

.dashboard-main {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 18px;
}

.dashboard-card {
  padding: 22px;
  box-shadow: 0 18px 58px rgba(17, 19, 24, 0.06);
}

.usage-card,
.table-card,
.billing-card {
  grid-column: span 2;
}

.dashboard-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.dashboard-card-head h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.15;
}

.range-tabs {
  display: inline-flex;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  background: rgba(17, 19, 24, 0.03);
}

.range-tabs button {
  min-width: 52px;
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 760;
}

.range-tabs button.active {
  color: var(--text);
  background: var(--surface-strong);
  box-shadow: 0 8px 22px rgba(17, 19, 24, 0.08);
}

body.dark .range-tabs {
  background: rgba(255, 255, 255, 0.045);
}

.usage-bars {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 12px;
  height: 210px;
  border-bottom: 1px solid var(--line);
  padding-top: 20px;
}

.usage-bars span {
  min-height: 22px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, var(--accent), rgba(111, 60, 255, 0.18));
  box-shadow: 0 10px 28px rgba(111, 60, 255, 0.16);
}

.usage-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
  color: var(--muted);
}

.usage-legend span::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
}

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

.api-row:last-child {
  padding-bottom: 0;
}

.api-row code {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(17, 19, 24, 0.035);
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.dark .api-row code {
  background: rgba(255, 255, 255, 0.055);
}

.api-row button,
.mini-action {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  background: var(--surface-strong);
  color: var(--text);
  cursor: pointer;
  font-weight: 760;
}

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

.wallet-summary > div {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.wallet-summary span,
.redeem-field span,
.model-list span,
.billing-list span,
.setup-steps span {
  color: var(--muted);
}

.wallet-summary strong {
  display: block;
  margin-top: 8px;
  font-size: 21px;
}

.redeem-field {
  display: grid;
  gap: 9px;
  margin-top: 10px;
}

.redeem-field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--text);
  outline: 0;
}

body.dark .redeem-field input {
  background: rgba(255, 255, 255, 0.05);
}

.redeem-field input:focus {
  border-color: rgba(111, 60, 255, 0.42);
  box-shadow: 0 0 0 4px rgba(111, 60, 255, 0.1);
}

.pay-button.slim {
  min-height: 48px;
  margin-top: 12px;
}

.quick-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.quick-amounts a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 12px;
  color: var(--muted);
  background: var(--surface-strong);
  font-size: 14px;
  font-weight: 720;
}

.quick-amounts a:hover {
  color: var(--text);
  border-color: rgba(111, 60, 255, 0.28);
}

.setup-steps {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: setup;
}

.setup-steps li {
  position: relative;
  display: grid;
  gap: 5px;
  border-top: 1px solid var(--line);
  padding: 16px 0 0 42px;
  counter-increment: setup;
}

.setup-steps li:first-child {
  border-top: 0;
  padding-top: 0;
}

.setup-steps li::before {
  content: counter(setup);
  position: absolute;
  left: 0;
  top: 16px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--text);
  font-weight: 800;
}

.setup-steps li:first-child::before {
  top: 0;
}

body.dark .setup-steps li::before {
  color: #111318;
  background: #fff;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  color: var(--muted);
  background: rgba(17, 19, 24, 0.055);
  font-size: 13px;
  font-weight: 760;
  white-space: nowrap;
}

.status-pill.good {
  color: #087a52;
  background: rgba(24, 185, 129, 0.12);
}

.status-pill.warn {
  color: #9c6500;
  background: rgba(245, 158, 11, 0.16);
}

.status-pill.bad {
  color: #b42318;
  background: rgba(239, 68, 68, 0.12);
}

.status-pill.muted {
  color: var(--muted);
}

.channel-list {
  display: grid;
  gap: 14px;
}

.channel-list article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.channel-list article:first-child {
  border-top: 0;
  padding-top: 0;
}

.channel-list strong {
  display: block;
  margin-bottom: 4px;
}

.channel-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.channel-list small {
  color: var(--faint);
  font-weight: 760;
  white-space: nowrap;
}

.channel-dot {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--muted);
}

.channel-dot.good {
  background: var(--green);
}

.channel-dot.warn {
  background: #f59e0b;
}

.model-list {
  display: grid;
  gap: 18px;
}

.model-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 14px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.model-list article:first-child {
  border-top: 0;
  padding-top: 0;
}

.model-list strong {
  display: block;
  margin-bottom: 4px;
}

.model-list em,
.billing-list em {
  font-style: normal;
  font-weight: 800;
}

.model-list i {
  grid-column: 1 / -1;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(17, 19, 24, 0.07);
}

body.dark .model-list i {
  background: rgba(255, 255, 255, 0.08);
}

.model-list b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--green));
}

.billing-list {
  display: grid;
  gap: 0;
}

.billing-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 16px 0;
}

.billing-list article:first-child {
  border-top: 0;
  padding-top: 0;
}

.billing-list article:last-child {
  padding-bottom: 0;
}

.billing-list strong,
.billing-list span {
  display: block;
}

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

.dashboard-table {
  width: 100%;
  min-width: 690px;
  border-collapse: collapse;
}

.dashboard-table th,
.dashboard-table td {
  border-top: 1px solid var(--line);
  padding: 15px 12px;
  text-align: left;
}

.dashboard-table th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 780;
}

.dashboard-table td {
  color: var(--text);
}

.admin-hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.admin-hero > div > p {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 780;
}

.admin-hero h1 {
  margin: 0;
  font-size: 48px;
  line-height: 1.05;
}

.admin-token-card {
  display: grid;
  gap: 10px;
  width: min(100%, 460px);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.admin-token-card label,
.admin-token-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.admin-token-card span[data-tone="good"] {
  color: #087a52;
}

.admin-token-card span[data-tone="bad"] {
  color: #b42318;
}

.admin-token-card > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.admin-token-card input,
.admin-actions input,
.admin-actions select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

body.dark .admin-token-card input,
body.dark .admin-actions input,
body.dark .admin-actions select {
  background: rgba(255, 255, 255, 0.05);
}

.admin-token-card button,
.admin-actions button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #151321;
  padding: 0 14px;
  font-weight: 780;
  cursor: pointer;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  margin: 20px 0;
}

.admin-orders-card {
  grid-column: auto;
}

.admin-customers-card {
  margin-top: 18px;
}

.admin-config-card {
  margin-bottom: 18px;
}

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

.admin-config-grid article {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(17, 19, 24, 0.03);
}

body.dark .admin-config-grid article {
  background: rgba(255, 255, 255, 0.04);
}

.admin-config-grid article > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-config-grid p,
.admin-config-grid small {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.admin-actions {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 140px auto;
  gap: 10px;
}

.admin-table {
  min-width: 980px;
}

.admin-table td strong,
.admin-table td span {
  display: block;
}

.admin-table td span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.admin-order-row {
  cursor: pointer;
}

.admin-order-row.selected {
  background: rgba(111, 60, 255, 0.08);
}

.admin-link-button,
.admin-secret {
  border: 0;
  border-radius: 6px;
  background: rgba(111, 60, 255, 0.1);
  color: var(--accent-strong);
  padding: 7px 9px;
  font: inherit;
  font-weight: 760;
  cursor: pointer;
}

.admin-secret-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-detail-card {
  align-self: start;
  position: sticky;
  top: 96px;
}

.admin-detail-card pre {
  max-height: 620px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text);
  background: rgba(17, 19, 24, 0.04);
  border-radius: 8px;
  padding: 14px;
  line-height: 1.55;
}

body.dark .admin-detail-card pre {
  background: rgba(255, 255, 255, 0.05);
}

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

.legal-shell {
  display: grid;
  width: min(var(--max), calc(100% - 48px));
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  margin: 0 auto;
  padding: 46px 0 82px;
}

.legal-sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface);
  box-shadow: 0 18px 56px rgba(17, 19, 24, 0.06);
}

.legal-sidebar span {
  display: block;
  padding: 10px 12px 12px;
  color: var(--faint);
  font-size: 13px;
  font-weight: 760;
}

.legal-sidebar a {
  display: block;
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
  font-weight: 740;
}

.legal-sidebar a:hover,
.legal-sidebar a.active {
  color: var(--text);
  background: rgba(17, 19, 24, 0.055);
}

body.dark .legal-sidebar a:hover,
body.dark .legal-sidebar a.active {
  background: rgba(255, 255, 255, 0.075);
}

.legal-document {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(26px, 4vw, 54px);
  background: var(--surface);
  box-shadow: var(--shadow);
}

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

.legal-document h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 0.98;
}

.legal-document time {
  display: block;
  margin: 18px 0 30px;
  color: var(--muted);
}

.legal-document section {
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding-top: 28px;
}

.legal-document h2 {
  margin: 0 0 14px;
  font-size: 22px;
  line-height: 1.2;
}

.legal-document p,
.legal-document li {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}

.legal-document p {
  margin: 0 0 12px;
}

.legal-document ul {
  display: grid;
  gap: 8px;
  margin: 10px 0 18px;
  padding-left: 22px;
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--text);
}

.site-footer {
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer span:first-child {
  color: var(--text);
  font-weight: 760;
}

@media (max-width: 980px) {
  .desktop-nav {
    display: none;
  }

  .menu-button {
    display: inline-grid;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
    min-height: auto;
  }

  .hero h1 {
    font-size: 58px;
  }

  .hero-card {
    max-width: 520px;
  }

  .pricing-grid,
  .access-grid,
  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .catalog-layout,
  .detail-hero,
  .detail-panels,
  .checkout-layout,
  .dashboard-layout,
  .dashboard-main,
  .admin-layout,
  .legal-shell {
    grid-template-columns: 1fr;
  }

  .checkout-head,
  .dashboard-hero,
  .admin-hero {
    flex-direction: column;
  }

  .catalog-sidebar {
    position: static;
  }

  .order-card {
    position: static;
  }

  .admin-detail-card {
    position: static;
  }

  .admin-actions {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .dashboard-account {
    width: 100%;
  }

  .dashboard-sidebar {
    position: static;
    display: flex;
    overflow-x: auto;
  }

  .dashboard-sidebar a {
    flex: 0 0 auto;
  }

  .legal-sidebar {
    position: static;
    display: flex;
    overflow-x: auto;
  }

  .legal-sidebar span,
  .legal-sidebar a {
    flex: 0 0 auto;
  }

  .usage-card,
  .table-card,
  .billing-card {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .nav-shell,
  .auth-header,
  .hero,
  .pricing,
  .access,
  .catalog,
  .product-detail,
  .checkout-page,
  .dashboard-shell,
  .admin-shell,
  .legal-shell,
  .site-footer,
  .mobile-nav {
    width: min(100% - 32px, var(--max));
  }

  .nav-shell {
    height: 64px;
  }

  .auth-header {
    width: min(100% - 32px, var(--max));
  }

  .auth-panel {
    padding: 24px;
  }

  .auth-panel h1 {
    font-size: 30px;
  }

  .brand span {
    font-size: 16px;
  }

  .nav-actions .ghost-button,
  .nav-actions .solid-button {
    display: none;
  }

  .hero {
    padding: 46px 0 32px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .section-head.split,
  .catalog-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-head h2 {
    font-size: 30px;
  }

  .catalog {
    padding: 34px 0 56px;
  }

  .catalog-hero h1 {
    font-size: 42px;
  }

  .catalog-hero span {
    font-size: 16px;
  }

  .detail-copy,
  .detail-purchase-card,
  .detail-panel,
  .checkout-panel {
    padding: 22px;
  }

  .detail-copy h1 {
    font-size: 38px;
  }

  .detail-copy p {
    font-size: 16px;
  }

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

  .checkout-head h1 {
    font-size: 38px;
  }

  .admin-hero h1 {
    font-size: 34px;
  }

  .admin-token-card > div {
    grid-template-columns: 1fr;
  }

  .dashboard-hero h1 {
    font-size: 34px;
  }

  .checkout-summary,
  .checkout-form-card,
  .order-card,
  .metric-card,
  .dashboard-card,
  .admin-token-card,
  .dashboard-account {
    padding: 22px;
  }

  .checkout-row,
  .choice-grid,
  .payment-grid,
  .admin-config-grid,
  .metric-grid,
  .wallet-summary {
    grid-template-columns: 1fr;
  }

  .billing-list article {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

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

  .hero p {
    font-size: 17px;
  }

  .large {
    width: 100%;
  }

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

  .dashboard-card-head,
  .api-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .dashboard-card-head {
    flex-direction: column;
  }

  .usage-bars {
    gap: 7px;
    height: 160px;
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}
