.home-shell {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(125deg, rgba(20, 241, 149, 0.12), transparent 28%),
    linear-gradient(305deg, rgba(153, 69, 255, 0.18), transparent 30%),
    linear-gradient(180deg, #050505 0%, #08090d 46%, #050505 100%);
}

.home-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(20, 241, 149, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(153, 69, 255, 0.035) 1px, transparent 1px);
  background-size: 78px 78px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 78%);
  z-index: 0;
}

[hidden] {
  display: none !important;
}

.home-nav,
.home-main {
  position: relative;
  z-index: 1;
}

.home-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  padding: 14px clamp(18px, 4vw, 54px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 5, 7, 0.78);
  backdrop-filter: blur(18px);
}

.home-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.home-brand strong {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 15px;
  line-height: 1.1;
}

.home-brand strong span {
  color: var(--green);
  text-shadow: 0 0 18px rgba(20, 241, 149, 0.52);
}

.home-brand small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.home-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-links a,
.nav-logout-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: rgba(241, 245, 242, 0.78);
  text-decoration: none;
  font-size: 14px;
}

.home-links a:hover,
.home-links a:focus-visible,
.nav-logout-button:hover,
.nav-logout-button:focus-visible {
  border-color: rgba(20, 241, 149, 0.24);
  color: var(--green);
  background: rgba(20, 241, 149, 0.06);
  outline: none;
}

.nav-logout-button {
  color: rgba(255, 196, 179, 0.86);
  background: transparent;
}

.nav-logout-button:hover,
.nav-logout-button:focus-visible {
  border-color: rgba(255, 92, 69, 0.28);
  color: var(--red);
  background: rgba(255, 92, 69, 0.07);
}

.home-main {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 54px 0 54px;
}

.home-hero {
  position: relative;
  min-height: min(690px, calc(100vh - 76px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
  align-items: center;
  gap: clamp(24px, 5vw, 62px);
  padding: clamp(32px, 7vw, 84px) 0;
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 9% -18% 8% 38%;
  pointer-events: none;
  background:
    linear-gradient(118deg, transparent 0 22%, rgba(20, 241, 149, 0.16) 22% 28%, transparent 28% 42%, rgba(153, 69, 255, 0.19) 42% 49%, transparent 49% 100%),
    linear-gradient(118deg, transparent 0 58%, rgba(0, 212, 255, 0.13) 58% 63%, transparent 63%);
  filter: blur(0.2px);
  opacity: 0.95;
}

.hero-copy {
  position: relative;
}

.hero-copy h1 {
  max-width: 860px;
  margin-top: 20px;
  font-size: clamp(46px, 8.5vw, 112px);
  line-height: 0.96;
  letter-spacing: 0;
  background: linear-gradient(92deg, #ffffff 0%, #d7ffe9 36%, #14f195 63%, #9945ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy p {
  max-width: 680px;
  margin-top: 22px;
  color: rgba(241, 245, 242, 0.76);
  font-size: clamp(17px, 2.1vw, 22px);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-panel-button {
  min-height: 54px;
  padding: 0 28px;
  font-size: 17px;
}

.hero-panel-button svg {
  width: 20px;
  height: 20px;
}

.hero-price,
.entry-card {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.018)),
    rgba(8, 9, 12, 0.72);
  box-shadow:
    0 22px 80px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.hero-price {
  position: relative;
  padding: clamp(22px, 3vw, 30px);
  overflow: hidden;
}

.hero-price::before {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 3px solid rgba(20, 241, 149, 0.78);
  border-image: linear-gradient(90deg, var(--green), var(--cyan), var(--purple)) 1;
  pointer-events: none;
}

.price-live-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.price-live-top span:first-child,
.section-kicker {
  color: var(--green);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.hero-price strong {
  display: block;
  margin-top: 34px;
  color: var(--text);
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(42px, 6vw, 68px);
  line-height: 0.94;
}

.hero-price p {
  margin-top: 18px;
  color: rgba(241, 245, 242, 0.74);
  font-size: 16px;
  line-height: 1.45;
}

.hero-price small {
  display: block;
  margin-top: 24px;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
}

.signal-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto auto;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.signal-strip div {
  min-width: 0;
}

.signal-strip span,
.account-strip span,
.api-command span,
.request-controls span,
.home-auth-form label span,
.key-create-form label span,
.price-meta span {
  display: block;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.signal-strip strong {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  color: var(--text);
  font-size: 22px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signal-time {
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  white-space: nowrap;
}

.price-section,
.entry-section,
.provider-section {
  margin-top: clamp(54px, 8vw, 92px);
}

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

.section-heading h2,
.entry-copy h2 {
  margin-top: 8px;
  font-size: clamp(28px, 4.8vw, 56px);
  line-height: 1.04;
  letter-spacing: 0;
}

.section-heading p,
.entry-copy p {
  max-width: 650px;
  margin-top: 10px;
  color: rgba(241, 245, 242, 0.68);
  font-size: 16px;
  line-height: 1.62;
}

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

.price-card {
  min-width: 0;
  min-height: 184px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(20, 241, 149, 0.095), transparent 42%),
    rgba(10, 11, 14, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.price-card:nth-child(2n) {
  background:
    linear-gradient(135deg, rgba(153, 69, 255, 0.11), transparent 42%),
    rgba(10, 11, 14, 0.78);
}

.price-card-top {
  min-width: 0;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.price-card h3 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 20px;
  line-height: 1.16;
}

.price-card small {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-value {
  color: var(--green);
  font-family: "JetBrains Mono", monospace;
  font-size: 29px;
  line-height: 1;
}

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

.price-meta strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entry-copy {
  max-width: 760px;
}

.entry-auth-button {
  width: fit-content;
  min-height: 44px;
  margin-top: 12px;
  padding: 0 18px;
  white-space: nowrap;
}

.entry-section .cyan-button,
.entry-section .action-button.cyan,
.entry-section .action-button.secondary,
.entry-section .endpoint-chip.active {
  border-color: rgba(20, 241, 149, 0.34);
  color: var(--green);
  background: rgba(20, 241, 149, 0.08);
}

.entry-section .cyan-button:hover,
.entry-section .cyan-button:focus-visible,
.entry-section .action-button.cyan:hover,
.entry-section .action-button.cyan:focus-visible,
.entry-section .action-button.secondary:hover,
.entry-section .action-button.secondary:focus-visible,
.entry-section .endpoint-chip.active:hover,
.entry-section .endpoint-chip.active:focus-visible {
  border-color: rgba(20, 241, 149, 0.68);
  color: var(--green);
  background: rgba(20, 241, 149, 0.12);
  box-shadow: var(--shadow-green);
}

.entry-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 14px;
  margin-top: 22px;
}

.entry-card {
  padding: 18px;
}

.api-entry {
  order: 2;
}

.account-entry {
  order: 1;
}

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

.compact-head {
  padding: 0;
}

.compact-head h3,
.form-head h3 {
  margin: 0;
  font-size: 20px;
}

.compact-head p,
.form-head p,
.request-subtitle {
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-command {
  display: grid;
  gap: 8px;
  margin-top: 22px;
  padding: 14px;
  border: 1px solid rgba(20, 241, 149, 0.2);
  border-radius: var(--radius);
  background: rgba(20, 241, 149, 0.045);
}

.api-command code,
.generated-line code {
  min-width: 0;
  display: block;
  overflow: hidden;
  color: var(--green);
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-lab {
  margin-top: 18px;
}

.format-switch {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  min-width: 206px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.format-option {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
}

.format-option.active {
  border-color: rgba(20, 241, 149, 0.34);
  color: var(--green);
  background: rgba(20, 241, 149, 0.08);
}

.request-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 0.6fr);
  gap: 12px;
  margin-top: 14px;
}

.request-controls label,
.home-auth-form label,
.key-create-form label {
  min-width: 0;
}

.request-controls span,
.home-auth-form label span,
.key-create-form label span {
  margin-bottom: 7px;
}

.request-controls select,
.home-auth-form input,
.key-create-form input {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

.request-controls select:focus,
.home-auth-form input:focus,
.key-create-form input:focus {
  border-color: rgba(20, 241, 149, 0.52);
  outline: none;
  box-shadow: 0 0 0 3px rgba(20, 241, 149, 0.07);
}

.endpoint-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.endpoint-chip {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
}

.endpoint-chip.active {
  border-color: rgba(20, 241, 149, 0.34);
  color: var(--green);
  background: rgba(20, 241, 149, 0.08);
}

.code-card {
  min-width: 0;
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(3, 5, 7, 0.74);
  overflow: hidden;
}

.code-card-head {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 9px 7px 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.code-card-head span {
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
}

.code-card pre {
  min-height: 130px;
  max-height: 180px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  color: var(--text);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.request-subtitle {
  margin: 10px 0 0;
}

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

.account-strip div {
  min-width: 0;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.account-strip strong {
  display: block;
  min-height: 27px;
  margin-top: 6px;
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-panel,
.keys-panel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

#loginPanel[hidden] + .keys-panel {
  margin-top: 18px;
}

.home-auth-form,
.key-create-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.key-create-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.auth-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.generated-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(20, 241, 149, 0.22);
  border-radius: var(--radius);
  background: rgba(20, 241, 149, 0.055);
}

.key-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.key-row {
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 9px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.key-row:first-child {
  border-top: 0;
}

.key-row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.key-row code {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-state {
  min-height: 54px;
  display: grid;
  place-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
}

.provider-section {
  padding-bottom: 16px;
}

.simple-heading {
  margin-bottom: 12px;
}

.provider-rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.provider-pill-row {
  min-width: 0;
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.provider-pill-row strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provider-pill-row span {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  max-width: min(360px, calc(100vw - 40px));
  padding: 12px 14px;
  border: 1px solid rgba(20, 241, 149, 0.28);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(8, 12, 10, 0.92);
  box-shadow: var(--shadow-green);
}

@media (max-width: 980px) {
  .home-hero,
  .entry-grid {
    grid-template-columns: 1fr;
  }

  .home-hero {
    min-height: auto;
  }

  .signal-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .home-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .home-main {
    width: min(100% - 24px, 1180px);
    padding-top: 32px;
  }

  .hero-actions,
  .section-heading,
  .auth-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .primary-button,
  .section-heading .primary-button,
  .auth-actions .action-button {
    width: 100%;
  }

  .entry-auth-button {
    width: 100%;
  }

  .signal-strip,
  .account-strip,
  .request-controls,
  .price-meta {
    grid-template-columns: 1fr;
  }

  .format-switch {
    width: 100%;
    min-width: 0;
  }

  .key-create-form,
  .generated-line,
  .key-row {
    grid-template-columns: 1fr;
  }

  .key-row .action-button,
  .generated-line .action-button {
    width: 100%;
  }
}
