:root {
  color-scheme: dark;
  --bg: #050609;
  --bg-soft: #090a0f;
  --panel: #111219;
  --panel-alt: #191a23;
  --panel-deep: #08090d;
  --line: #2e171f;
  --line-strong: #5a1c28;
  --text: #f8f4f4;
  --muted: #b8afb2;
  --red: #d51f31;
  --red-bright: #f23242;
  --green: #20c56b;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 82% 6%, rgba(213, 31, 49, 0.2), transparent 34rem),
    linear-gradient(180deg, #07080c 0%, var(--bg) 34rem);
  color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
}

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: 70px;
  padding: 14px 32px;
  border-bottom: 1px solid rgba(90, 28, 40, 0.62);
  background: rgba(5, 6, 9, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
}

.brand img {
  width: 64px;
  height: 42px;
  object-fit: contain;
}

nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  color: var(--muted);
  font-size: 14px;
}

nav a {
  border-radius: 8px;
  padding: 8px 0;
}

nav a:hover,
nav a.is-active {
  color: var(--text);
}

.header-account {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-account span {
  max-width: 180px;
  overflow: hidden;
  font-size: 14px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-cta,
.primary-link,
button {
  border: 0;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-weight: 850;
  cursor: pointer;
}

.header-cta {
  padding: 10px 15px;
}

main {
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
}

.page {
  display: none;
  min-height: calc(100svh - 118px);
  padding: 48px 0 52px;
}

body[data-page="home"] #homePage,
body[data-page="features"] #featuresPage,
body[data-page="pricing"] #pricingPage,
body[data-page="account"] #accountPage,
body[data-page="terms"] #termsPage,
body[data-page="privacy"] #privacyPage,
body[data-page="refund"] #refundPage {
  display: block;
}

body[data-page="home"] #homePage {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: calc(100svh - 118px);
  padding: clamp(8px, 1.4vh, 14px) 0 clamp(8px, 1.4vh, 14px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.8fr);
  gap: 42px;
  align-items: center;
  min-height: calc(100svh - 170px);
}

.home-page .hero {
  min-height: 0;
  gap: clamp(28px, 4vw, 56px);
}

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

.hero-wordmark {
  display: block;
  width: min(520px, 100%);
  max-height: 300px;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 22px;
}

.home-page .hero-wordmark {
  width: min(250px, 34vw);
  max-height: 105px;
  margin-bottom: clamp(10px, 1.6vh, 16px);
}

.eyebrow {
  color: var(--red-bright);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  max-width: 840px;
  margin-top: 10px;
  font-size: clamp(48px, 7vw, 92px);
  line-height: 0.94;
  letter-spacing: 0;
}

.home-page h1 {
  max-width: 760px;
  font-size: clamp(36px, 4.9vw, 58px);
  line-height: 0.98;
}

h2 {
  margin-top: 8px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.04;
}

h3 {
  font-size: 21px;
}

.hero-text,
.page-heading p,
.home-cards p,
.feature-grid p,
.plan-card p,
.plan-card li,
.account-card p,
.form-status,
label {
  color: var(--muted);
  line-height: 1.65;
}

.hero-text,
.page-heading p {
  max-width: 720px;
  margin-top: 18px;
  font-size: 18px;
}

.home-page .hero-text {
  max-width: 650px;
  margin-top: clamp(10px, 1.6vh, 16px);
  font-size: clamp(15px, 1.35vw, 17px);
}

.hero-actions,
.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-actions {
  margin-top: 30px;
}

.home-page .hero-actions {
  margin-top: clamp(14px, 2vh, 20px);
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  padding: 12px 18px;
  font-weight: 850;
}

.primary-link.compact {
  min-height: 42px;
  margin-top: 0;
  padding: 10px 14px;
}

.secondary-link {
  background: var(--panel-alt);
}

.hero-panel,
.home-cards article,
.feature-grid article,
.plan-card,
.account-card,
.current-plan,
.dashboard-grid article {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(17, 18, 25, 0.92);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.24);
}

.hero-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.home-page .hero-panel {
  align-self: center;
  gap: 12px;
  padding: 16px;
}

.session-card,
.session-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a0b10;
  padding: 14px;
}

.session-card div {
  display: flex;
  align-items: center;
  gap: 9px;
}

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

.session-card b {
  color: var(--green);
}

.session-card p,
.session-row strong,
.session-row.muted {
  color: var(--muted);
}

.session-window {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(213, 31, 49, 0.16) 0 1px, transparent 1px 72px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 42px),
    #10141a;
}

.home-page .session-window {
  min-height: clamp(165px, 24vh, 220px);
}

.channel-strip {
  position: absolute;
  inset: 22px auto 22px 22px;
  width: 94px;
  border-radius: 8px;
  background: linear-gradient(180deg, #222833, #151922);
}

.timeline {
  position: absolute;
  inset: 42px 24px 42px 142px;
  display: grid;
  gap: 22px;
  align-content: center;
}

.timeline span {
  height: 32px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--red), rgba(213, 31, 49, 0.25));
}

.timeline span:nth-child(2) {
  width: 70%;
}

.timeline span:nth-child(3) {
  width: 88%;
}

.timeline span:nth-child(4) {
  width: 54%;
}

.home-cards,
.feature-grid,
.plan-grid,
.dashboard-grid {
  display: grid;
  gap: 16px;
}

.home-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 34px;
}

.home-page .home-cards {
  margin-top: clamp(12px, 2vh, 20px);
}

.home-cards article,
.feature-grid article {
  padding: 24px;
}

.home-page .home-cards article {
  min-height: 88px;
  padding: 16px 18px;
}

.home-cards p,
.feature-grid p {
  margin-top: 10px;
}

.home-page .home-cards p {
  font-size: 14px;
  line-height: 1.42;
}

.page-heading {
  margin-bottom: 28px;
}

.page-heading.compact,
.features-page .page-heading,
.pricing-page .page-heading,
.account-page .page-heading {
  margin-bottom: 18px;
}

.features-page,
.pricing-page,
.account-page,
.legal-page {
  min-height: calc(100svh - 118px);
  padding: clamp(16px, 2vh, 26px) 0 clamp(10px, 1.5vh, 16px);
}

.features-page h1,
.pricing-page h1,
.account-page h1,
.legal-page h1 {
  font-size: clamp(36px, 4.4vw, 58px);
}

.features-page .page-heading p,
.pricing-page .page-heading p,
.account-page .page-heading p,
.legal-page .page-heading p {
  margin-top: 12px;
  font-size: 16px;
}

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

.features-page .feature-grid.large {
  gap: 12px;
}

.features-page .feature-grid article {
  min-height: 108px;
  padding: 15px 16px;
}

.features-page .feature-grid h3 {
  font-size: 18px;
}

.features-page .feature-grid p {
  font-size: 13.5px;
  line-height: 1.36;
}

.pricing-page {
  max-width: 1040px;
  margin: 0 auto;
}

.current-plan {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding: 18px 20px;
}

.current-plan[hidden] {
  display: none;
}

.current-plan span,
.dashboard-grid span {
  color: var(--muted);
  font-size: 13px;
}

.current-plan strong {
  color: var(--red-bright);
  font-size: 22px;
}

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

.plan-card {
  display: grid;
  gap: 22px;
  padding: 28px;
}

.pricing-page .plan-card {
  gap: 16px;
  padding: 22px;
}

.pricing-page .plan-card p,
.pricing-page .plan-card li {
  font-size: 15px;
  line-height: 1.5;
}

.plan-card.featured {
  border-color: var(--red);
  background: linear-gradient(180deg, rgba(213, 31, 49, 0.14), rgba(17, 18, 25, 0.92));
}

.plan-card strong {
  display: block;
  margin-top: 14px;
  color: var(--red-bright);
  font-size: 30px;
}

.plan-card ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 20px;
}

.account-page {
  max-width: 1060px;
  margin: 0 auto;
}

.account-card {
  padding: 26px;
}

.account-page .account-card {
  padding: 22px;
}

.account-auth-card {
  display: grid;
  gap: 15px;
  max-width: 560px;
}

.account-auth-card[hidden],
#accountForm[hidden],
#signedInPanel[hidden],
.security-panel[hidden],
button[hidden],
a[hidden] {
  display: none !important;
}

.account-dashboard {
  display: grid;
  gap: 12px;
}

.dashboard-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.dashboard-hero h2,
.action-panel h2 {
  font-size: clamp(24px, 3vw, 34px);
}

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

.dashboard-grid article {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.dashboard-grid strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-panel {
  display: grid;
  gap: 14px;
}

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

.dashboard-actions button {
  background: var(--panel-alt);
}

.dashboard-actions button:nth-last-child(-n + 2) {
  border: 1px solid var(--line-strong);
  background: #170a0d;
}

.security-panel {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090a0f;
  padding: 18px;
}

.legal-page {
  max-width: 1120px;
  margin: 0 auto;
}

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

.legal-grid article {
  min-height: 128px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(17, 18, 25, 0.92);
  padding: 18px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.18);
}

.legal-grid h3 {
  font-size: 18px;
}

.legal-grid p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

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

label {
  display: grid;
  gap: 8px;
  font-weight: 750;
}

input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #07080c;
  color: var(--text);
}

button {
  min-height: 42px;
  padding: 10px 16px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.form-actions button:last-child {
  background: var(--panel-alt);
}

.form-status {
  min-height: 24px;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  border-top: 1px solid var(--line);
  padding: 10px 32px;
  color: var(--muted);
  font-size: 13px;
}

.footer-links {
  display: flex;
  gap: 16px;
  margin-left: 0;
  font-size: 13px;
}

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

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 4, 7, 0.72);
  backdrop-filter: blur(12px);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  position: relative;
  display: grid;
  gap: 16px;
  width: min(520px, calc(100vw - 40px));
  border: 1px solid var(--red);
  border-radius: 10px;
  padding: 28px;
  background: var(--panel);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
}

.setup-modal-card {
  width: min(680px, calc(100vw - 40px));
}

.modal-card h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.modal-card p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.6;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  min-height: 34px;
  width: 34px;
  padding: 0;
  background: transparent;
}

#twoFactorSetupModal img {
  width: 240px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #050609;
}

@media (max-width: 940px) {
  nav {
    display: none;
  }

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

  body[data-page="home"] #homePage {
    display: block;
    min-height: calc(100vh - 76px);
  }

  .home-page .hero {
    gap: 24px;
  }

  .home-cards,
  .feature-grid.large,
  .legal-grid,
  .policy-grid,
  .dashboard-grid,
  .dashboard-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .site-header {
    padding: 12px 16px;
  }

  .header-cta,
  .header-account span {
    display: none;
  }

  main {
    width: calc(100vw - 32px);
  }

  .page {
    padding: 44px 0 56px;
  }

  body[data-page="home"] #homePage {
    padding: 28px 0 38px;
  }

  h1 {
    font-size: clamp(42px, 13vw, 64px);
  }

  .dashboard-hero {
    display: grid;
  }

  footer {
    display: grid;
  }

  .footer-links {
    display: flex;
  }
}
