/* Google Fonts (ONLY). */
@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:ital,wght@0,200..900;1,200..900&display=swap');

/* Apply Source Code Pro uniformly on homepage */
html, body {
  font-family: "Source Code Pro";
  font-optical-sizing: auto;
  font-variant-numeric: tabular-nums;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}


/* Ensure form controls inherit the app font */
button, input, select, textarea {
  font-family: inherit;
  font-optical-sizing: auto;
}

/* homepage/styles.css */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: inherit;
  background-color: #1e1e1e;
  color: #e0e0e0;

  /* Keep content clear of the fixed footer */
  padding-bottom: calc(var(--ttc-footer-height, 64px) + env(safe-area-inset-bottom, 0px));
}

input, textarea, select, [contenteditable="true"], [contenteditable="plaintext-only"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

.is-hidden { display: none !important; }
.mt-10 { margin-top: 10px !important; }
.mt-12 { margin-top: 12px !important; }
.mt-14 { margin-top: 14px !important; }
.lh-155 { line-height: 1.55; }

.pill-toggle {
  display: block;
  width: 100%;
  position: relative;
}

.pill-toggle .checkbox-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.pill-toggle__pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.02);
  color: #e0e0e0;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.1;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.pill-toggle__pill span:last-child {
  flex: 1;
}

.pill-toggle__circle {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.55);
  background: transparent;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.pill-toggle__circle::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8ddcff, #5ac1ff);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 160ms ease, transform 160ms ease;
  box-shadow: 0 0 8px rgba(93, 184, 255, 0.35);
}

.pill-toggle__pill a { color: #95d4ff; }

.checkbox-input:focus-visible + .pill-toggle__pill {
  outline: none;
  border-color: rgba(141, 220, 255, 0.9);
  box-shadow: 0 0 0 2px rgba(141, 220, 255, 0.25);
}

.checkbox-input:checked + .pill-toggle__pill {
  border-color: rgba(76, 197, 255, 0.85);
  background: rgba(76, 197, 255, 0.14);
  color: #dff4ff;
}

.checkbox-input:checked + .pill-toggle__pill .pill-toggle__circle {
  border-color: rgba(141, 220, 255, 0.9);
  box-shadow: inset 0 0 0 3px rgba(76, 197, 255, 0.25);
}

.checkbox-input:checked + .pill-toggle__pill .pill-toggle__circle::after {
  opacity: 1;
  transform: scale(1);
}

.checkbox-input:disabled + .pill-toggle__pill {
  opacity: 0.55;
  cursor: not-allowed;
}

.checkbox-input:disabled + .pill-toggle__pill .pill-toggle__circle {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: none;
}

.checkbox-input:disabled + .pill-toggle__pill .pill-toggle__circle::after {
  opacity: 0;
  transform: scale(0.5);
}

:root {
  color-scheme: dark;
}

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

a:hover { text-decoration: underline; }

.container {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.4px;
}

.nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.header-cta {
  display: flex;
  gap: 10px;
}

.section {
  padding: 48px 0;
}

.hero {
  padding: 56px 0;
}

.hero-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
  align-items: start;
}

h1 {
  font-size: 44px;
  line-height: 1.05;
  margin: 0 0 12px;
}

h2 {
  font-size: 26px;
  margin: 0 0 10px;
}

.muted { color: #b0b0b0; }
.small { font-size: 12px; }

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

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

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.pricing-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pricing-title {
  font-weight: 700;
  font-size: 14px;
}

.pricing-price {
  font-size: 24px;
  font-weight: 700;
  margin-top: 4px;
}

.pricing-subtext {
  color: #b0b0b0;
  font-size: 12px;
}

.pricing-rules {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
}

.pricing-rules-title {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.2px;
  color: rgba(255, 255, 255, 0.86);
  margin-bottom: 6px;
}

.pricing-rules-list {
  margin: 0;
  padding-left: 16px;
  color: #c9c9c9;
  font-size: 12px;
  line-height: 1.45;
}

.pricing-list {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.pricing-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #d6d6d6;
  font-size: 12px;
}

.pricing-list li::before {
  content: "•";
  color: rgba(141, 220, 255, 0.9);
}

.pricing-cta {
  margin-top: auto;
}

/* Orbit dot around the "Choose plan" button (hover/focus). */
.pricing-cta a[data-open-signup-flow].btn {
  position: relative;
  overflow: visible;
}

.pricing-cta a[data-open-signup-flow].btn::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;

  background: radial-gradient(circle at 30% 30%, #e9fbff 0%, #8ddcff 35%, rgba(90, 193, 255, 0.15) 72%, rgba(90, 193, 255, 0) 100%);
  box-shadow:
    0 0 12px rgba(93, 184, 255, 0.45),
    0 0 22px rgba(93, 184, 255, 0.20);

  /* Follow the button's rounded rectangle path. */
  offset-path: inset(4px round 10px);
  offset-distance: 0%;
  offset-rotate: 0deg;

  transform: translateZ(0);
  transition: opacity 160ms ease;
}

.pricing-card:hover .pricing-cta a[data-open-signup-flow].btn::after,
.pricing-cta a[data-open-signup-flow].btn:hover::after,
.pricing-cta a[data-open-signup-flow].btn:focus-visible::after,
.pricing-cta:focus-within a[data-open-signup-flow].btn::after {
  opacity: 1;
  animation: ttc-choose-plan-orbit 2.4s linear infinite;
}

@keyframes ttc-choose-plan-orbit {
  to { offset-distance: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .pricing-cta a[data-open-signup-flow].btn::after {
    animation: none !important;
  }
}

/* Hide CTA buttons unless hovering the plan card (desktop).
   On touch devices, keep CTAs visible since hover isn't available. */
.pricing-card .pricing-cta {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.pricing-card:hover .pricing-cta,
.pricing-cta:focus-within {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (hover: none) {
  .pricing-card .pricing-cta {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
}

.card {
  background: rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
}

.card-title {
  padding: 10px 12px;
  font-weight: 600;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.card-body {
  padding: 10px 12px;
}

.kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
}

.kv-k {
  color: #b0b0b0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.kv-v {
  font-family: inherit;
  font-size: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.12);
  color: #e0e0e0;
  font-weight: 600;
}

.btn:hover { background: rgba(255, 255, 255, 0.16); text-decoration: none; }

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
}

.btn-block { width: 100%; margin-top: 10px; }

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 999;
  max-width: min(520px, calc(100% - 32px));
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.10);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #e0e0e0;
  font-weight: 600;
  opacity: 1;
  transition: opacity 200ms ease;
}

.toast-hide {
  opacity: 0;
}

.chart-embed-card {
  overflow: hidden;
}

.chart-embed {
  display: block;
  width: 100%;
  height: min(78vh, 860px);
  min-height: 520px;
  border: 0;
  background: rgba(0, 0, 0, 0.18);
}

.form {
  display: grid;
  gap: 12px;
  max-width: 520px;
  margin-top: 14px;
}

.ttc-stripe-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: rgba(242, 246, 255, 0.92);
  font-size: 12px;
  line-height: 1;
}

.ttc-stripe-pill__brand {
  color: #cfefff;
  font-weight: 700;
  letter-spacing: 0.1px;
}

.ttc-promo {
  margin-top: 12px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.ttc-promo-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}

.ttc-promo-label span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: rgba(242, 246, 255, 0.72);
}

#ttc-promo-code {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #f2f6ff;
  font: inherit;
}

#ttc-promo-code:focus {
  outline: none;
  border-color: rgba(141, 220, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(141, 220, 255, 0.12);
}

/* Stripe Payment Element container (Step 3) */
#ttc-payment-element {
  position: relative;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  border-radius: 14px;
  padding: 12px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

#ttc-payment-element::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(87, 87, 87, 0.87);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  z-index: 0;
  transition: background 140ms ease;
}

/* Ensure Stripe-rendered content stays above the glass blur layer */
#ttc-payment-element > * {
  position: relative;
  z-index: 1;
}

#ttc-payment-element:hover {
  border-color: rgba(87, 87, 87, 0.87);
}

#ttc-payment-element:hover::before {
  background: rgba(87, 87, 87, 0.87);
}

#ttc-payment-element:focus-within {
  border-color: rgba(141, 220, 255, 0.38);
  box-shadow: 0 0 0 2px rgba(141, 220, 255, 0.14);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal[aria-hidden="false"] {
  display: flex;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
}

.modal-dialog {
  position: relative;
  width: min(560px, calc(100% - 32px));
  max-height: min(86vh, 720px);
  overflow: auto;

  /* Modern scrolling behavior */
  overscroll-behavior: contain;
}

/* Themed scrollbars (Chromium/Safari) */
.modal-dialog::-webkit-scrollbar {
  width: 10px;
}

.modal-dialog::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
}

.modal-dialog::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  border: 2px solid rgba(0, 0, 0, 0);
  background-clip: padding-box;
}

.modal-dialog::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.20);
  border: 2px solid rgba(0, 0, 0, 0);
  background-clip: padding-box;
}

.auth-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.auth-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #e0e0e0;
  font-weight: 600;
}

.auth-tab:hover {
  background: rgba(255, 255, 255, 0.12);
}

.auth-tab.is-active {
  background: rgba(255, 255, 255, 0.16);
}

.auth-panel {
  display: none;
}

.auth-panel.is-active {
  display: block;
}

.modal-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.modal-open {
  overflow: hidden;
}

label:not(.pill-toggle) > span:first-child {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  color: #b0b0b0;
  margin-bottom: 6px;
}

#ttc-plan-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#ttc-plan-options .ttc-plan-choice__text {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

#ttc-plan-options .ttc-plan-choice__name {
  color: #e6e6e6;
}

#ttc-plan-options .ttc-plan-choice__price {
  color: #bfeaff;
  font-weight: 700;
  letter-spacing: 0.1px;
}

input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #e0e0e0;
}

select {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  padding: 10px 36px 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background-color: rgba(255, 255, 255, 0.06);
  color: #e0e0e0;
  font: inherit;
  line-height: 16px;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.65) 50%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.65) 50%, transparent 50%),
    linear-gradient(to right, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.14));
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 13px) 50%,
    calc(100% - 32px) 50%;
  background-size:
    6px 6px,
    6px 6px,
    1px 18px;
  background-repeat: no-repeat;
}

select:hover {
  background-color: rgba(255, 255, 255, 0.10);
}

select:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.22);
  outline-offset: 2px;
}

select option,
select optgroup {
  background-color: #1e1e1e;
  color: #e0e0e0;
}

.footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.28);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.footer-socials {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.06);
}

.footer-social.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.footer-social:hover {
  background: rgba(255, 255, 255, 0.10);
  text-decoration: none;
}

.footer-social-icon {
  width: 18px;
  height: 18px;
  display: block;
}

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  h1 { font-size: 34px; }

  .chart-embed {
    height: 74vh;
    min-height: 440px;
  }
}
