:root {
  --primary: #0b57d0;
  --primary-dark: #084a9e;
  --secondary: #f3f3f3;
  --text: #202124;
  --text-light: #5f6368;
  --border: #dadce0;
  --error: #d33b27;
  --success: #0d7d0d;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: #fff;
}

/* Static pages (FAQ, Contact) - ensure normal document flow */
body.static-page {
  display: block;
  height: auto;
  min-height: auto;
  overflow: auto;
}

body.static-page > main {
  margin-top: 0;
  padding-top: 0;
}

header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  height: 120px;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  /* z-index 1001 keeps the header (and the nav drawer nested inside it)
     above the body.nav-open::before overlay, which sits at z-index 999.
     At the old value 100, the drawer was painted *behind* the overlay
     because the sticky header forms a stacking context, trapping nav's
     own z-index: 1000 inside it. Result: menu items were unclickable on
     mobile because the overlay captured taps. See change-226. */
  z-index: 1001;
}

/* Header is flex with brand on the left and nav pushed to the right via
   margin-left: auto on nav. `.brand-center` retained as the class name
   for compatibility across all nav copies, but is now left-aligned as
   the primary brand (change-233 removed the separate mods-logo; parent
   brand lives in the footer). */
.brand-center {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.brand-center:hover {
  text-decoration: none;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
}

#mainNav a {
  margin-left: 2rem;
  text-decoration: none;
  color: var(--text);
}

#mainNav a:hover {
  color: var(--primary);
}

/* Scoped to #mainNav so layout rules do not leak to other <nav> elements
   (breadcrumbs, footer nav, etc.). See change-228. Change-233 dropped the
   absolute positioning — nav now flex-pushes to the right edge via
   margin-left: auto since the header is a flex row with brand on the left. */
#mainNav {
  margin-left: auto;
  display: flex;
  align-items: center;
}

/* Nav dropdown (e.g. "Documents" → API / FAQ / .gitmd2pdf.yml config / Git Security).
   Introduced in change-217. Keep in sync with shared/dropdown.js, which toggles
   aria-expanded on click and handles Escape / click-outside. The :hover rule gives
   mouse users an immediate preview without requiring a click. */
.has-dropdown {
  position: relative;
  margin-left: 2rem;
}

.dropdown-trigger {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.dropdown-trigger:hover,
.has-dropdown.is-active .dropdown-trigger {
  color: var(--primary);
}

.dropdown-caret {
  font-size: 0.7em;
  line-height: 1;
  transition: transform 0.15s ease;
}

.dropdown-trigger[aria-expanded="true"] .dropdown-caret {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 14rem;
  margin: 0;
  padding: 0.5rem 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: none;
  z-index: 1000;
}

.has-dropdown:hover .dropdown-menu,
.dropdown-trigger[aria-expanded="true"] + .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  margin: 0;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus {
  background: var(--secondary);
  color: var(--primary);
}

.dropdown-menu a[aria-current="page"] {
  color: var(--primary);
  font-weight: 600;
}

/* Hamburger menu button - hidden on desktop */
.nav-toggle {
  display: none;
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.hamburger {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  position: relative;
  transition: background 0.2s ease;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--text);
  left: 0;
  transition: transform 0.3s ease, top 0.3s ease;
}

.hamburger::before {
  top: -7px;
}

.hamburger::after {
  top: 7px;
}

/* Hamburger animation when menu is open */
.nav-toggle[aria-expanded="true"] .hamburger {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Responsive nav - tablet and mobile (1024px catches horizontal phones + iPad Mini) */
@media (max-width: 1024px) {
  .nav-toggle {
    display: block;
  }

  header {
    height: 80px;
    padding: 0 1rem;
  }

  .logo-text {
    font-size: 1.25rem;
  }

  /* Scoped to #mainNav — see change-228. Bare `nav {...}` was leaking to
     <nav class="breadcrumb"> inside <main> and forcing breadcrumbs to
     300px × calc(100vh-80px) with white bg at mobile viewports. */
  #mainNav {
    position: fixed;
    top: 80px;
    right: 0;
    width: 100%;
    max-width: 300px;
    height: calc(100vh - 80px);
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 0;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
  }

  #mainNav.open {
    transform: translateX(0);
  }

  #mainNav a {
    margin: 0;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: block;
  }

  #mainNav a:hover {
    background: var(--secondary);
  }

  /* Mobile: flatten the dropdown so children render inline under the
     "Documents" section header. No tap-to-expand — the slide-out
     drawer is already a container; nesting another toggle is worse UX. */
  .has-dropdown {
    margin-left: 0;
    border-bottom: 1px solid var(--border);
  }

  .dropdown-trigger {
    width: 100%;
    padding: 1rem 1.5rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: default;
    pointer-events: none;
  }

  .dropdown-caret {
    display: none;
  }

  .dropdown-menu {
    position: static;
    display: block;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    background: transparent;
  }

  .dropdown-menu a {
    padding: 0.75rem 2.5rem;
    font-size: 1rem;
  }

  .currency-nav-item {
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .currency-nav-item label {
    font-size: 0.875rem;
    color: var(--text-light);
  }

  .currency-select-nav {
    width: 100%;
  }

  /* Overlay when menu is open */
  body.nav-open::before {
    content: '';
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999;
  }
}

/* Mobile - smaller adjustments */
@media (max-width: 480px) {
  header {
    height: 60px;
    padding: 0 0.75rem;
  }

  .logo-text {
    font-size: 1rem;
  }

  .nav-toggle {
    right: 0.75rem;
  }

  #mainNav {
    top: 60px;
    height: calc(100vh - 60px);
    /* Drawer keeps its 300px max-width from the 1024px rule so it stays as a
       side panel on narrow phones (the free space on the left is the
       tap-to-close overlay — intentional UX). */
  }

  body.nav-open::before {
    top: 60px;
  }
}

.api-keys-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1.5rem;
  background: #fff;
}

.api-keys-panel + [data-upgrade-panel] {
  margin-top: 20px;
}

.api-keys-summary {
  list-style: none;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  cursor: pointer;
}

.api-keys-summary::-webkit-details-marker {
  display: none;
}

.api-keys-summary::before {
  content: '▶';
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-right: 0.5rem;
  margin-top: 0.1rem;
}

.api-keys-panel[open] .api-keys-summary::before {
  content: '▼';
}

.api-keys-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0 0 0.35rem;
}

.api-keys-section-title {
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 0.25rem;
}

.api-keys-subtitle {
  margin: 0;
  color: var(--text-light);
}

.api-keys-toggle {
  display: none;
}

.api-keys-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  margin-left: auto;
}

.api-keys-body {
  margin-top: 1rem;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Dashboard Layout - Responsive sidebar for Upgrade section
   ───────────────────────────────────────────────────────────────────────────── */

.dashboard-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 2rem 0;
}

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

.dashboard-sidebar {
  min-width: 0;
}

@media (min-width: 1200px) {
  .dashboard-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    align-items: start;
  }

  .dashboard-sidebar {
    position: sticky;
    top: 2rem;
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Account Layout
   ───────────────────────────────────────────────────────────────────────────── */

.account-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 2rem 0;
}

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

.account-sidebar {
  min-width: 0;
}

.account-card {
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: 8px;
  background: var(--bg);
}

.account-card h3 {
  margin: 0 0 1rem;
}

.account-card .panel-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}

.account-card .panel-subtitle {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.account-danger-zone {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.account-danger-zone p {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.account-danger-zone .btn-ghost,
.account-danger-zone-card .btn-ghost {
  color: var(--error);
}

.account-danger-zone .btn-ghost:hover,
.account-danger-zone-card .btn-ghost:hover {
  background: rgba(239, 68, 68, 0.1);
}

@media (min-width: 900px) {
  .account-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    align-items: start;
  }

  .account-sidebar {
    position: sticky;
    top: 2rem;
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   File Drop Zone
   ───────────────────────────────────────────────────────────────────────────── */

.file-drop-zone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  position: relative;
}

.file-drop-zone:hover,
.file-drop-zone.is-dragover {
  border-color: var(--primary);
  background: rgba(11, 87, 208, 0.04);
}

.file-drop-zone.has-file {
  border-style: solid;
  border-color: var(--success);
  background: rgba(13, 125, 13, 0.04);
}

.file-drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* Disable file input click when file is selected (so clear button works) */
.file-drop-zone.has-file input[type="file"] {
  pointer-events: none;
}

.drop-zone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
}

.drop-zone-icon {
  font-size: 2.5rem;
}

.drop-zone-text {
  color: var(--text-light);
  font-size: 0.95rem;
}

.drop-zone-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  pointer-events: none;
}

.preview-filename {
  font-weight: 600;
  color: var(--text);
  word-break: break-all;
}

.preview-clear {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
  padding: 0.25rem;
  line-height: 1;
  pointer-events: auto;
}

.preview-clear:hover {
  color: var(--error);
}

/* Logo drop zone variant - smaller */
.file-drop-zone--logo {
  padding: 1rem;
}

.file-drop-zone--logo .drop-zone-icon {
  font-size: 1.75rem;
}

.file-drop-zone--logo .drop-zone-text {
  font-size: 0.85rem;
}

.drop-zone-hint {
  color: var(--text-lighter);
  font-size: 0.75rem;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Collapsible Options Sections
   ───────────────────────────────────────────────────────────────────────────── */

.options-section {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  background: #fafbfc;
}

.options-summary {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  cursor: pointer;
  user-select: none;
  gap: 0;
}

.options-summary::-webkit-details-marker {
  display: none;
}

.options-summary::before {
  content: '▶';
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-right: 0.5rem;
  margin-top: 0.15rem;
}

.options-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.options-title {
  font-weight: 700;
  font-size: 1.1rem;
}

.options-subtitle {
  font-size: 0.8rem;
  color: #5f6368;
  font-weight: 400;
  line-height: 1.3;
}

.options-subtitle:empty {
  display: none;
}

.options-subtitle.error {
  color: var(--danger);
}

.options-section[open] .options-subtitle {
  display: none;
}

.options-toggle {
  display: none;
}

.options-section[open] .options-summary::before {
  content: '▼';
}

.options-body {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.options-section[open] .options-body {
  animation: optionsSlideDown 0.2s ease;
}

@keyframes optionsSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   Radio Group for Timestamp Placement
   ───────────────────────────────────────────────────────────────────────────── */

.radio-group {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.radio-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0;
  cursor: pointer;
  font-weight: 400;
  font-size: 0.95rem;
}

.radio-label input[type="radio"] {
  width: auto;
  margin: 0;
  cursor: pointer;
}

/* ─────────────────────────────────────────────────────────────────────────────
   API Keys Count Preview (when collapsed)
   ───────────────────────────────────────────────────────────────────────────── */

.api-keys-count {
  font-size: 0.85rem;
  color: var(--text-light);
  margin: 0.35rem 0 0;
}

.api-keys-panel[open] .api-keys-count {
  display: none !important;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Credential Row with Copy Button
   ───────────────────────────────────────────────────────────────────────────── */

.credential-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  gap: 1rem;
}

.credential-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  min-width: 0;
}

.credential-type {
  color: var(--text-light);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.credential-id {
  font-size: 0.8rem;
  color: var(--text-light);
  background: #f1f5f9;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-family: monospace;
}

.credential-last-used {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
  margin-left: auto;
}

.copy-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.copy-btn:hover {
  border-color: var(--primary);
  background: rgba(11, 87, 208, 0.04);
}

.copy-btn.copied {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Info Icon Tooltips
   ───────────────────────────────────────────────────────────────────────────── */

.info-trigger {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-light);
  font-size: 0.7rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.35rem;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.info-trigger:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* ==================== HERO SECTION ==================== */
.hero {
  background: linear-gradient(180deg, #ffffff 0%, #F0F4FF 100%);
  padding: 5rem 2rem;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.hero h1 span {
  color: var(--primary);
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-visual {
  margin-top: 3rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-visual img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Hero responsive */
@media (max-width: 768px) {
  .hero {
    padding: 3rem 1.5rem;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero p {
    font-size: 1rem;
  }
}

/* ==================== TRUST BAR / TESTIMONIALS ==================== */
.trust-bar {
  background: #F0F4FF;
  padding: 3rem 2rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.trust-bar > p {
  color: var(--text-light);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2rem;
}

.testimonials {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.testimonial {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  text-align: left;
}

.testimonial-quote {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 1rem;
  font-style: italic;
}

.testimonial-quote::before {
  content: '"';
  color: var(--primary);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 0;
  margin-right: 0.25rem;
}

.testimonial-author {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.testimonial-role {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* Trust bar responsive */
@media (max-width: 900px) {
  .testimonials {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 550px) {
  .testimonials {
    grid-template-columns: 1fr;
  }

  .trust-bar {
    padding: 2rem 1.5rem;
  }
}

/* ==================== HOW IT WORKS ==================== */
.how-it-works {
  background: #ffffff;
  padding: 5rem 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text);
}

.section-header p {
  color: var(--text-light);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  width: 60px;
  height: 60px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto 1.5rem;
}

.step h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.step p {
  color: var(--text-light);
  font-size: 1rem;
  line-height: 1.6;
}

.step-arrow {
  position: absolute;
  top: 30px;
  right: -1rem;
  color: var(--border);
  font-size: 2rem;
}

.step:last-child .step-arrow {
  display: none;
}

/* How It Works responsive */
@media (max-width: 768px) {
  .how-it-works {
    padding: 3rem 1.5rem;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .step-arrow {
    display: none;
  }

  .section-header h2 {
    font-size: 1.75rem;
  }
}

/* ==================== FEATURES SECTION ==================== */
.features {
  background: #F0F4FF;
  padding: 5rem 2rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.feature-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.feature-card-icon {
  width: 48px;
  height: 48px;
  background: #E8F0FF;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.feature-card-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.feature-card-emoji {
  font-size: 1.5rem;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.feature-card p {
  color: var(--text-light);
  line-height: 1.6;
  font-size: 1rem;
}

/* Features responsive */
@media (max-width: 768px) {
  .features {
    padding: 3rem 1.5rem;
  }

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

/* ==================== USE CASES SECTION ==================== */
.use-cases {
  background: white;
  padding: 5rem 2rem;
}

.use-cases-grid {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  max-width: 800px;
  margin: 0 auto;
}

.use-case {
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  font-weight: 500;
  color: var(--text);
  transition: all 0.2s;
}

.use-case:hover {
  background: #E8F0FF;
  border-color: var(--primary);
  color: var(--primary);
}

.use-cases-description {
  max-width: 800px;
  margin: 2.5rem auto 0;
  text-align: center;
  color: var(--text-light);
  font-size: 1rem;
  line-height: 1.7;
}

/* Use Cases responsive */
@media (max-width: 768px) {
  .use-cases {
    padding: 3rem 1.5rem;
  }

  .use-cases-grid {
    gap: 1rem;
  }

  .use-case {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
}

/* ==================== INLINE FAQ SECTION ==================== */
.faq-inline {
  background: #F0F4FF;
  padding: 5rem 2rem;
}

.faq-list {
  max-width: 700px;
  margin: 0 auto;
}

.faq-item {
  background: white;
  border-radius: 8px;
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.faq-question {
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text);
}

.faq-question:hover {
  background: #f8f9fa;
}

.faq-arrow {
  transition: transform 0.2s;
  color: var(--text-light);
}

.faq-item.open .faq-arrow {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-light);
  line-height: 1.6;
  display: none;
}

.faq-item.open .faq-answer {
  display: block;
}

.view-all-link {
  text-align: center;
  margin-top: 2rem;
}

.view-all-link a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.view-all-link a:hover {
  text-decoration: underline;
}

/* FAQ responsive */
@media (max-width: 768px) {
  .faq-inline {
    padding: 3rem 1.5rem;
  }

  .faq-question {
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
  }

  .faq-answer {
    padding: 0 1.25rem 1rem;
  }
}

/* ==================== FINAL CTA SECTION ==================== */
.final-cta {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 5rem 2rem;
  text-align: center;
  color: white;
}

.final-cta h2 {
  font-size: 2.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.final-cta p {
  font-size: 1.125rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.final-cta .btn-primary {
  background: white;
  color: var(--primary);
}

.final-cta .btn-primary:hover {
  background: #f8f9fa;
}

/* Final CTA responsive */
@media (max-width: 768px) {
  .final-cta {
    padding: 3rem 1.5rem;
  }

  .final-cta h2 {
    font-size: 1.75rem;
  }
}

/* Legacy feature-icon for inline icons */
.feature-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 0.35rem;
}

.btn {
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  text-decoration: none;
  display: inline-block;
}

.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.7;
}

.btn.is-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn-success {
  background: #28a745;
}

.btn-success:hover {
  background: #218838;
}

.config-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

.config-badge.config-applied {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.config-badge.structure-applied {
  background: rgba(96, 165, 250, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.3);
}

.btn:hover {
  background: var(--primary-dark);
}

.btn-primary {
  background: var(--primary);
  color: white;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-secondary {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
  font-weight: 600;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #E8F0FF;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  grid-template-rows: 44px auto;
  column-gap: 2rem;
  row-gap: 1rem;
  padding: 2rem 0;
  align-items: stretch;
  align-content: start;
}

.price-card {
  align-self: stretch;
  display: flex;
  flex-direction: column;
}

/* Currency Selector (Nav) */
.currency-nav-item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  color: var(--text);
  margin-left: 1.5rem;
}

.currency-nav-item label {
  font-size: 0.65rem;
  font-weight: 500;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.currency-select-nav {
  padding: 0.2rem 0.3rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
  min-width: auto;
}

.currency-select-nav:focus {
  outline: none;
  border-color: var(--primary);
}

.currency-select-nav option {
  background: var(--bg);
  color: var(--text);
}

.billing-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  height: 44px;
  line-height: 1;
  margin-bottom: 0;
}

.pricing-toggle-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  align-self: start;
}

.toggle-left { grid-column: 1; grid-row: 1; }
.toggle-center { grid-column: 2; grid-row: 1; }
.toggle-right { grid-column: 3; grid-row: 1; }
.card-free { grid-column: 1; grid-row: 2; }
.card-center { grid-column: 2; grid-row: 2; }
.card-right { grid-column: 3; grid-row: 2; }

.billing-label {
  color: var(--text);
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 32px;
  margin-bottom: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5f5;
  transition: 0.2s;
  border-radius: 999px;
}

.slider::before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  transition: 0.2s;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.2);
}

.switch input:checked + .slider {
  background-color: var(--primary);
}

.switch input:checked + .slider::before {
  transform: translateX(28px);
}

@media (max-width: 1080px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    row-gap: 1.5rem;
  }

  /* Override the explicit grid-column / grid-row placements set above —
     without this, cards stay pinned to columns 2/3 (auto-created
     content-sized) and Free ends up narrow. See change-232. */
  .toggle-left, .toggle-center, .toggle-right,
  .card-free, .card-center, .card-right {
    grid-column: 1;
    grid-row: auto;
  }

  .toggle-left { order: 1; }
  .card-free { order: 2; }
  .toggle-center { order: 3; }
  .card-center { order: 4; }
  .toggle-right { order: 5; }
  .card-right { order: 6; }
}

.upgrade-billing-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  margin-bottom: 0;
}

.upgrade-options-grid {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.upgrade-options-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.upgrade-option-card {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.upgrade-option-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.upgrade-option-card h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.upgrade-price-line {
  margin-bottom: 0.25rem;
}

.upgrade-price {
  font-size: 1.75rem;
  font-weight: bold;
  color: var(--primary);
}

.upgrade-price-suffix {
  font-size: 0.85rem;
  color: var(--text-light);
}

.upgrade-billed {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
  min-height: 1.2em;
}

.upgrade-button {
  width: 100%;
  margin-bottom: 1rem;
}

.upgrade-list {
  list-style: none;
  text-align: left;
  width: 100%;
  margin: 0;
}

.upgrade-list li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.upgrade-list li:last-child {
  border-bottom: none;
}

@media (max-width: 600px) {
  .upgrade-options-grid {
    flex-direction: column;
  }
}

/* Current Plan Indicator */
.current-plan-indicator {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}

.current-plan-label {
  color: var(--text-light);
}

.current-plan-value {
  font-weight: 600;
  color: var(--text);
}

.current-plan-value.is-premium {
  color: var(--primary);
}

/* Premium Badge Highlight - connects to upgrade */
.panel-badge {
  background: rgba(11, 87, 208, 0.12);
  color: var(--primary);
  font-weight: 600;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  white-space: nowrap;
  cursor: help;
  transition: background-color 0.15s ease;
}

.panel-badge:hover {
  background: rgba(11, 87, 208, 0.2);
}

.price-note {
  color: #0d7d0d;
  margin-bottom: 1rem;
  font-weight: 600;
}

.price-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  background: white;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.price-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.15), 0 4px 8px -2px rgba(0, 0, 0, 0.1);
}

.price-card.featured {
  border: 2px solid var(--primary);
  box-shadow: 0 12px 24px rgba(11, 87, 208, 0.18);
}

.price-card.featured:hover {
  box-shadow: 0 20px 32px rgba(11, 87, 208, 0.25);
}

/* Annual Savings Badge */
.savings-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: white;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
  display: none;
}

.savings-badge.visible {
  display: block;
}

.price-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.price-card .price {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 1rem;
}

.price-card ul {
  list-style: none;
  text-align: left;
  margin-bottom: 2rem;
}

.price-card-footnote {
  margin-top: 1rem;
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.4;
}

.price-card-footnote p {
  margin: 0.25rem 0;
}

.price-card li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.auth-form {
  max-width: 400px;
  margin: 2rem auto;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.form-group {
  margin-bottom: 1.5rem;
}

/* change-239 — proactive PAT field on the Repository tab. Reveals when the
   Repository URL has a `username@host` shape but no embedded token. Visually
   distinct so users notice it without it dominating the form. */
.repo-credentials {
  margin: 0.75rem 0 1rem;
  padding: 0.75rem 1rem;
  background: var(--surface-muted, #f6f8fb);
  border: 1px solid var(--border-muted, #e2e8f0);
  border-radius: 6px;
}

.repo-credentials .hint a {
  color: var(--link, #0b57d0);
  text-decoration: underline;
}

.footer-options .footer-option-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 600px) {
  .footer-options .footer-option-row {
    grid-template-columns: 1fr;
  }
}

.footer-option {
  min-width: 0;
}

.footer-option span {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.footer-option select {
  width: 100%;
  font-size: 0.8rem;
}

.footer-alternate {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
}

.info-tooltip {
  cursor: help;
  opacity: 0.6;
  font-size: 0.85em;
  margin-left: 0.25rem;
  position: relative;
}
.info-tooltip:hover {
  opacity: 1;
}
.info-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: #333;
  padding: 0.6rem 0.85rem;
  border-radius: 6px;
  font-size: 0.8rem;
  white-space: pre;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 100;
  margin-bottom: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  border: 1px solid #ddd;
}
.info-tooltip:hover::after {
  opacity: 1;
}

#signupTerms {
  width:auto;
  vertical-align: baseline;
}

.social-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.social-btn:hover {
  border-color: rgba(11, 87, 208, 0.35);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.social-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f1f5f9;
  flex-shrink: 0;
}

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

.social-divider {
  text-align: center;
  color: var(--text-light);
  margin: 2.45rem 0 0.75rem;
  font-size: calc(0.95rem + 2pt);
  font-weight: 600;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0;
  white-space: nowrap;
}

.checkbox-label input[type="checkbox"] {
  margin: 0;
}

.label-with-tooltip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.tooltip-trigger {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #f8fafc;
  color: var(--text-light);
  font-weight: 700;
  font-size: 0.75rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-3px);
}

.tooltip-trigger:hover {
  color: var(--text);
  border-color: rgba(11, 87, 208, 0.3);
}

.tooltip-content {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.5rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  width: 240px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
  display: none;
  z-index: 10;
}

.tooltip-content.is-open {
  display: block;
}

.tooltip-content p {
  margin: 0 0 0.5rem;
  font-weight: 600;
}

.tooltip-content ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text-light);
  font-size: 0.85rem;
}

input, textarea, select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 1rem;
}

.input-with-icon {
  position: relative;
}

.input-with-icon input {
  padding-right: 2.75rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.6rem;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 6px;
}

.password-toggle:hover {
  color: var(--text);
  background: rgba(15, 23, 42, 0.06);
}

.password-toggle svg {
  width: 18px;
  height: 18px;
}

.auth-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: -0.5rem 0 1.5rem;
  flex-wrap: wrap;
}

.remember-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1;
}

.remember-toggle input {
  display: none;
}

.toggle-track {
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: #e2e8f0;
  position: relative;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
  transition: transform 0.2s ease;
}

.remember-toggle input:checked + .toggle-track {
  background: #22c55e;
}

.remember-toggle input:checked + .toggle-track::after {
  transform: translateX(18px);
}

.forgot-link {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
  margin-top: -9px;
}

.remember-text {
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.forgot-link:hover {
  text-decoration: underline;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11, 87, 208, 0.1);
}

.tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  padding: 0.95rem 1rem;
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  color: var(--text-light);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.conversion-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: stretch;
}

.conversion-form.has-premium-panel {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

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

.conversion-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
  padding: 1.25rem;
}

.conversion-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
  padding: 1.25rem;
  position: static;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.panel-title {
  font-weight: 700;
  margin: 0 0 0.15rem;
  font-size: 1rem;
}

.panel-subtitle {
  margin: 0;
  color: var(--text-light);
  font-size: 0.85rem;
}

.panel-badge {
  background: rgba(11, 87, 208, 0.12);
  color: var(--primary);
  font-weight: 600;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  white-space: nowrap;
}

.panel-body .form-group {
  margin-bottom: 1rem;
}

.timestamp-options {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.helper-text {
  color: var(--text-secondary);
  font-size: 0.85rem;
  display: block;
  margin-top: 0.35rem;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

@media (max-width: 768px) {
  .conversion-form.has-premium-panel {
    grid-template-columns: 1fr;
  }

  .conversion-panel {
    position: static;
  }
}

.loading {
  display: none;
  color: var(--text-light);
  margin-top: 1rem;
}

.success {
  color: var(--success);
  margin-top: 1rem;
}

.error {
  color: var(--error);
  margin-top: 1rem;
}

.message {
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.terms-check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
  width: fit-content;
  margin: 0 auto;
}

.terms-check input {
  margin: 0;
}

.terms-check > * {
  flex: 0 0 auto;
}

.terms-check span,
.terms-check a {
  display: inline;
}

.link-button {
  background: none;
  border: none;
  padding: 0;
  margin-left: 0;
  color: var(--primary);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  max-width: 420px;
  width: 100%;
  border: 1px solid var(--border);
}

.terms-scroll {
  max-height: 220px;
  overflow-y: auto;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  margin: 0.5rem 0 1rem;
  font-size: 0.95rem;
  color: var(--text);
}

.terms-scroll p {
  margin: 0 0 0.75rem;
}

.terms-instructions {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.modal h3 {
  margin-bottom: 0.5rem;
}

.modal p {
  margin-bottom: 1rem;
  color: var(--text);
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

footer {
  background: #1A1A1A;
  color: white;
  padding: 4rem 2rem 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto 3rem;
}

.footer-col h4 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  color: #6B7280;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.875rem;
}

.footer-col a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  color: #6B7280;
  font-size: 0.875rem;
}

.footer-bottom .footer-logo {
  height: 80px;
  width: auto;
  margin-bottom: 1rem;
  filter: brightness(0) invert(1);
}

.footer-bottom p {
  margin-bottom: 0.25rem;
}

/* Footer responsive */
@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.loading-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: radial-gradient(circle at top, rgba(11, 87, 208, 0.12), transparent 55%),
    radial-gradient(circle at 20% 80%, rgba(34, 197, 94, 0.12), transparent 50%),
    #f8fafc;
  z-index: 2000;
}

body.loading .loading-overlay {
  display: flex;
}

.loading-overlay.is-visible {
  display: flex;
}

.loading-card {
  width: min(420px, 90vw);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 20px;
  padding: 2rem 2.25rem;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.15);
  text-align: center;
  backdrop-filter: blur(6px);
}

.loading-ring {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 3px solid rgba(148, 163, 184, 0.3);
  border-top-color: var(--primary);
  margin: 0 auto 1rem;
  animation: spin 0.9s linear infinite;
}

.loading-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.loading-timer {
  color: var(--text-light);
  font-size: 0.95rem;
}

.loading-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.25);
  margin-top: 1.2rem;
  overflow: hidden;
}

.loading-bar span {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1b4ea8, #3aa0ff, #22c55e);
  animation: slide 1.4s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes slide {
  0% {
    transform: translateX(-60%);
  }
  50% {
    transform: translateX(60%);
  }
  100% {
    transform: translateX(160%);
  }
}


.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: #f1f5f9;
}

/* Responsive modal for mobile */
@media (max-width: 480px) {
  .modal {
    margin: 0.5rem;
    padding: 1rem;
    max-width: calc(100% - 1rem);
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Password confirmation input in modal */
.modal .form-group {
  margin-bottom: 1rem;
}

.modal .form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.modal .form-group .input {
  width: 100%;
}

.modal .form-hint {
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.modal .input-error {
  border-color: var(--danger);
}

/* Input Validation States */
input.input-error {
  border-color: var(--danger) !important;
  background-color: rgba(220, 53, 69, 0.05);
}

input.input-valid {
  border-color: var(--success) !important;
}

input.input-validating {
  border-color: var(--primary) !important;
  background-image: linear-gradient(90deg, transparent, rgba(66, 133, 244, 0.1), transparent);
  background-size: 200% 100%;
  animation: validating-pulse 1.5s ease-in-out infinite;
}

@keyframes validating-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.tab-btn {
  border: none;
  background: transparent;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: var(--border);
  color: var(--primary);
}

