:root {
  color-scheme: dark;
  --bg: #030710;
  --bg-deep: #01040a;
  --panel: #0b1a2e;
  --panel-strong: #112942;
  --panel-soft: rgba(11, 26, 46, .78);
  --line: rgba(230, 185, 91, .38);
  --line-cool: rgba(170, 210, 240, .18);
  --text: #fff8df;
  --muted: #d9cba4;
  --cool: #b9d8ee;
  --accent: #ffd36d;
  --accent-strong: #fff0b8;
  --cyan: #67e8f9;
  --violet: #a78bfa;
  --danger: #ff9f9f;
  --success: #8ff0b3;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 14% 6%, rgba(103, 232, 249, .16), transparent 25rem),
    radial-gradient(circle at 84% 10%, rgba(255, 211, 109, .16), transparent 28rem),
    radial-gradient(circle at 42% 46%, rgba(167, 139, 250, .11), transparent 30rem),
    linear-gradient(135deg, #030710, #071a2b 52%, #02050c);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button,
input,
select {
  font: inherit;
}

button,
.button {
  align-items: center;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
  color: #1b1402;
  cursor: pointer;
  display: inline-flex;
  font-size: 15px;
  font-weight: 900;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  max-width: 100%;
  box-shadow: 0 14px 28px rgba(0, 0, 0, .26), inset 0 1px 0 rgba(255, 255, 255, .48);
}

button:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.ghost,
.secondary-cta {
  border: 1px solid var(--line);
  background: rgba(7, 18, 32, .72);
  color: var(--text);
  box-shadow: none;
}

.compact {
  min-height: 34px;
  padding: 0 12px;
}

.danger-button {
  border-color: rgba(255, 159, 159, .55);
  color: var(--danger);
}

.full-width {
  width: 100%;
}

.shell {
  margin: 0 auto;
  min-height: 100vh;
  overflow: hidden;
  width: 100%;
}

.hero {
  position: relative;
}

.public-landing {
  margin: 0 auto;
  max-width: 1440px;
  padding: 20px 24px 56px;
  width: 100%;
}

.sales-nav {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin: 0 auto 28px;
}

.brand-mark {
  color: var(--accent-strong);
  display: grid;
  font-family: Georgia, "Times New Roman", serif;
  line-height: .92;
  text-transform: uppercase;
}

.brand-mark span {
  font-size: 16px;
  letter-spacing: .26em;
}

.brand-mark strong {
  font-size: 32px;
  letter-spacing: .08em;
}

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

.nav-actions a {
  border: 1px solid var(--line-cool);
  border-radius: 8px;
  color: var(--cool);
  font-size: 14px;
  font-weight: 800;
  min-height: 38px;
  padding: 9px 12px;
}

.nav-actions .nav-sign-in {
  border-color: var(--line);
  color: var(--accent-strong);
}

.sales-hero {
  min-height: 100vh;
}

.sales-hero__grid {
  align-items: center;
  display: grid;
  gap: 34px;
  grid-template-columns: minmax(0, .78fr) minmax(460px, 1.22fr);
  padding: 28px 0 54px;
}

.hero-copy {
  min-width: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  color: var(--accent-strong);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(54px, 8vw, 104px);
  line-height: .86;
  margin-bottom: 20px;
}

h2 {
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 5vw, 66px);
  line-height: .94;
  margin-bottom: 14px;
}

h3 {
  color: var(--text);
  font-size: 20px;
  line-height: 1.2;
  margin-bottom: 8px;
}

.hero-offer {
  color: var(--accent);
  font-size: clamp(25px, 3.2vw, 44px);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 18px;
}

.lede {
  color: var(--cool);
  font-size: clamp(18px, 1.7vw, 23px);
  line-height: 1.55;
  max-width: 720px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 18px;
}

.hero-proof {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-proof span {
  border: 1px solid var(--line-cool);
  border-radius: 999px;
  background: rgba(7, 18, 32, .68);
  font-size: 13px;
  font-weight: 800;
  padding: 8px 12px;
}

.hero-media,
.showcase-card,
.login-panel,
.price-card,
.feature-list article,
.session-card,
.admin-panel__surface {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(13, 31, 53, .94), rgba(7, 18, 32, .94));
  box-shadow: 0 22px 70px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .04);
}

.hero-media {
  aspect-ratio: 21 / 11;
  min-width: 0;
  overflow: hidden;
  padding: 10px;
  position: relative;
}

.hero-media::before {
  background: linear-gradient(90deg, rgba(255, 211, 109, .6), rgba(103, 232, 249, .35), rgba(167, 139, 250, .4));
  content: "";
  height: 4px;
  left: 10px;
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 1;
}

.hero-media img,
.showcase-card img {
  display: block;
  height: 100%;
  object-position: top center;
  width: 100%;
}

.hero-media img {
  background: #020914;
  border-radius: 6px;
  object-fit: contain;
}

.showcase-card img {
  object-fit: cover;
}

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

.section-head p,
.feature-copy p,
.showcase-card p,
.price-note,
.checkout-note,
.login-copy p,
.form-note,
.feature-list p {
  color: var(--cool);
  line-height: 1.55;
}

.showcase-section,
.feature-section,
.purchase-section {
  padding: 52px 0;
}

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

.showcase-card {
  display: grid;
  gap: 16px;
  overflow: hidden;
  padding: 12px;
}

.showcase-card img {
  aspect-ratio: 16 / 8.6;
  border-radius: 6px;
}

.showcase-card div {
  padding: 2px 4px 6px;
}

.feature-section {
  align-items: start;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(280px, .78fr) minmax(0, 1.22fr);
}

.feature-copy {
  position: sticky;
  top: 24px;
}

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

.feature-list article {
  min-height: 180px;
  padding: 18px;
}

.purchase-section {
  align-items: stretch;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(320px, .78fr) minmax(340px, 1fr);
}

.price-card {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.price {
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(72px, 11vw, 142px);
  font-weight: 900;
  line-height: .8;
  margin-bottom: 10px;
}

.price-card ul {
  color: var(--text);
  display: grid;
  gap: 10px;
  line-height: 1.4;
  margin: 0;
  padding-left: 20px;
}

.checkout-note {
  font-size: 12px;
  margin: 0;
}

.label {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.session-card {
  display: none;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  width: min(100%, 280px);
}

.session-card.authed {
  display: flex;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
  flex: 0 0 auto;
}

.session-card.authed .status-dot {
  background: var(--success);
}

.login-panel {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, .86fr) minmax(280px, 1fr);
  max-width: 100%;
  overflow: hidden;
  padding: 20px;
  position: relative;
  width: 100%;
}

.login-copy {
  min-width: 0;
  overflow-wrap: anywhere;
}

.orbit-stack {
  aspect-ratio: 1;
  display: grid;
  margin-top: 20px;
  max-width: 230px;
  min-width: 0;
  place-items: center;
  width: min(30vw, 230px);
}

.orbit-stack span {
  border: 1px solid rgba(255, 211, 109, .38);
  border-radius: 50%;
  grid-area: 1 / 1;
  height: 42%;
  transform: rotate(var(--turn));
  width: 96%;
}

.orbit-stack span:nth-child(1) {
  --turn: 0deg;
}

.orbit-stack span:nth-child(2) {
  --turn: 58deg;
}

.orbit-stack span:nth-child(3) {
  --turn: -58deg;
}

.login-form {
  align-self: center;
  display: grid;
  gap: 14px;
  min-width: 0;
  overflow-wrap: anywhere;
  width: 100%;
}

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

input,
select {
  border: 1px solid var(--line-cool);
  border-radius: 8px;
  background: #091521;
  color: var(--text);
  min-height: 44px;
  min-width: 0;
  padding: 0 12px;
  width: 100%;
}

input:focus,
select:focus,
.button:focus-visible,
button:focus-visible,
a:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 211, 109, .14);
  outline: none;
}

.protected-app {
  background: #020914;
  border: 1px solid var(--line);
  border-radius: 8px;
  height: min(900px, calc(100vh - 190px));
  min-height: 620px;
  overflow: hidden;
  width: 100%;
}

.science-app-frame {
  background: #020914;
  border: 0;
  display: block;
  height: 100%;
  width: 100%;
}

body.is-authed {
  --account-strip-height: 86px;
  height: 100vh;
  overflow: hidden;
}

body.is-authed .shell {
  height: 100vh;
  max-width: none;
  min-height: 100vh;
  overflow: hidden;
  padding: var(--account-strip-height) 0 0;
}

body.is-authed .hero {
  bottom: auto;
  display: block;
  height: auto;
  pointer-events: none;
  position: fixed;
  right: 16px;
  top: 12px;
  width: auto;
  z-index: 30;
}

body.is-authed .hero > div:first-child,
body.is-authed .notice,
body.is-authed .login-panel {
  display: none;
}

body.is-authed .session-card {
  backdrop-filter: blur(12px);
  background: rgba(7, 18, 32, .86);
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  pointer-events: auto;
  width: auto;
}

body.is-authed #sessionText {
  min-width: 210px;
}

body.is-authed .protected-app {
  border: 0;
  border-radius: 0;
  height: calc(100vh - var(--account-strip-height));
  min-height: calc(100vh - var(--account-strip-height));
}

.admin-panel {
  bottom: 18px;
  position: fixed;
  right: 18px;
  top: 76px;
  width: min(720px, calc(100vw - 36px));
  z-index: 40;
}

.admin-panel__surface {
  display: grid;
  gap: 16px;
  height: 100%;
  overflow: auto;
  padding: 18px;
}

.admin-panel__header {
  align-items: start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.admin-panel__header h2 {
  font-size: 32px;
  line-height: 1;
}

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

.admin-summary div {
  border: 1px solid var(--line-cool);
  border-radius: 8px;
  background: rgba(4, 14, 27, .72);
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
}

.admin-summary strong {
  color: var(--accent);
  font-size: 24px;
}

.admin-summary span,
.admin-table td span,
.admin-lock {
  color: #adbfce;
  font-size: 12px;
}

.admin-form {
  border: 1px solid var(--line-cool);
  border-radius: 8px;
  background: rgba(5, 18, 35, .72);
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 14px;
}

.admin-form__wide {
  grid-column: 1 / -1;
}

.admin-message {
  color: var(--muted);
  margin: 0;
  min-height: 22px;
}

.admin-message[data-tone="success"] {
  color: var(--success);
}

.admin-message[data-tone="error"] {
  color: var(--danger);
}

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

table {
  border-collapse: collapse;
  min-width: 760px;
  width: 100%;
}

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

.admin-table tr {
  cursor: default;
}

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

th {
  color: #f7dda0;
  font-size: 12px;
  text-transform: uppercase;
}

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

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-pill {
  border: 1px solid var(--line-cool);
  border-radius: 999px;
  color: var(--text);
  display: inline-block;
  padding: 4px 9px;
  text-transform: capitalize;
}

.status-pill--active {
  border-color: rgba(143, 240, 179, .55);
  color: var(--success);
}

.status-pill--disabled {
  border-color: rgba(255, 211, 109, .5);
  color: var(--accent);
}

.status-pill--deleted {
  border-color: rgba(255, 159, 159, .55);
  color: var(--danger);
}

.error {
  color: var(--danger);
  min-height: 24px;
}

.watermark {
  bottom: 14px;
  color: rgba(255, 255, 255, .38);
  font-size: 12px;
  pointer-events: none;
  position: fixed;
  right: 18px;
  text-align: right;
  z-index: 10;
}

body.is-authed .watermark {
  bottom: 76px;
}

@media (max-width: 980px) {
  .sales-hero__grid,
  .feature-section,
  .purchase-section {
    grid-template-columns: 1fr;
  }

  .sales-hero__grid {
    gap: 20px;
    padding: 24px 0 28px;
  }

  .feature-copy {
    position: static;
  }

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

@media (max-width: 820px) {
  .shell {
    max-width: 100vw;
  }

  .public-landing {
    padding: 14px 14px 34px;
  }

  .sales-nav {
    align-items: flex-start;
    display: grid;
  }

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

  .hero,
  .content-grid,
  .toolbar {
    grid-template-columns: 1fr;
  }

  .hero {
    display: grid;
  }

  .hero-actions,
  .hero-actions .button {
    width: 100%;
  }

  .hero-actions {
    margin: 18px 0 10px;
  }

  .hero-actions .secondary-cta,
  .hero-proof {
    display: none;
  }

  .hero-media {
    aspect-ratio: 21 / 8;
  }

  .section-head {
    align-items: start;
    display: grid;
  }

  .feature-list,
  .login-panel {
    grid-template-columns: 1fr;
  }

  .login-panel {
    gap: 16px;
    max-width: 100%;
    padding: 14px;
    width: 100%;
  }

  .session-card {
    max-width: 100%;
    width: 100%;
  }

  h1 {
    font-size: clamp(44px, 13vw, 56px);
    margin-bottom: 12px;
  }

  h2 {
    font-size: clamp(32px, 11vw, 48px);
  }

  .lede,
  .login-copy p:not(.label) {
    font-size: 16px;
  }

  .hero-offer {
    font-size: 24px;
    margin-bottom: 12px;
  }

  .lede {
    line-height: 1.45;
  }

  .orbit-stack {
    display: none;
  }

  .login-form {
    max-width: none;
    min-width: 0;
    padding: 0;
    width: 100%;
  }

  .login-form button {
    width: 100%;
  }

  .admin-form button {
    width: 100%;
  }

  .admin-panel {
    bottom: 84px;
    right: 12px;
    top: 12px;
    width: calc(100vw - 24px);
  }

  .admin-summary,
  .admin-form {
    grid-template-columns: 1fr;
  }
}
