:root {
  --dark: #3d4651;
  --dark-2: #2f3640;
  --light-bg: #e8e8ea;
  --section-bg: #f1f1f3;
  --text: #2d3540;
  --muted: #5a6068;
  --logo-light: #b0b5bd;
  --logo-dark: #5a6068;
  --border: #d4d8e0;
  --accent: #2d3540;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.5;
}

a { color: var(--text); }

/* Top dark utility bar */
.top-bar {
  background: var(--dark);
  color: #fff;
  height: 56px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}
.top-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 0 2rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 2rem;
}
.top-link {
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.top-link:hover { opacity: 0.85; }
.top-link.lang { font-weight: 500; }
.flag { display: inline-flex; align-items: center; }

/* Light header */
.site-header {
  background: var(--light-bg);
  height: 76px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 56px;
  z-index: 99;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.site-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  text-decoration: none;
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: -0.5px;
}
.logo-light { color: var(--logo-light); font-weight: 400; }
.logo-dark  { color: var(--logo-dark); font-weight: 700; }
.logo-dark.light { color: #fff; }

.help-link {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
}
.help-link.light { color: #fff; }
.help-link:hover { opacity: 0.8; }
.help-link.active {
  border-bottom: 2px solid var(--dark);
  padding-bottom: 0.25rem;
}

/* Main nav */
.main-nav {
  display: flex;
  gap: 1.75rem;
  margin-left: auto;
  margin-right: 2rem;
}
.main-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 500;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.main-nav a:hover { color: var(--text); }
.main-nav a.active {
  color: var(--text);
  border-bottom-color: var(--dark);
}

/* Page hero (slim title bar on inner pages) */
.page-hero {
  background: var(--light-bg);
  padding: 2.5rem 2rem;
}
.page-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.page-hero h1 {
  font-size: 2rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.page-lead {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 700px;
}

/* Page content shell */
.page-section {
  background: var(--section-bg);
  padding: 0 2rem 3rem;
}
.page-content {
  max-width: 1100px;
  margin: 0 auto;
  background: #fff;
  padding: 2.5rem 3rem;
}
.page-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}
.page-content > h2:first-of-type { margin-top: 0; }
.page-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.page-content p {
  margin-bottom: 1rem;
  color: var(--muted);
  line-height: 1.7;
}
.page-content ul,
.page-content ol {
  margin: 0 0 1rem 1.25rem;
  color: var(--muted);
  line-height: 1.7;
}
.page-content li { margin-bottom: 0.4rem; }
.page-content a {
  color: var(--dark);
  text-decoration: underline;
}
.page-cta {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
}

/* FAQ accordion */
.faq-group { margin-bottom: 2rem; }
.faq-group h2 {
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.faq-item {
  border-bottom: 1px solid #ececee;
}
.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: inherit;
}
.faq-question:hover { color: var(--dark); }
.faq-question::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--muted);
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 1rem;
}
.faq-item.open .faq-question::after {
  content: "\2212"; /* minus */
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-answer p {
  padding-bottom: 1rem;
  margin-bottom: 0;
}

/* Contact cards on Help page */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1rem 0 2rem;
}
.contact-card {
  background: var(--section-bg);
  padding: 1.5rem 1.25rem;
  border-radius: 4px;
  text-align: center;
  border: 1px solid var(--border);
}
.contact-card h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
  letter-spacing: 0.6px;
  font-weight: 600;
}
.contact-card p {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem !important;
  line-height: 1.4;
}
.contact-note {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Hero */
.hero {
  position: relative;
  height: 540px;
  background: var(--light-bg);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--light-bg);
}
.hero-photo {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 1;
}
.hero-svg { width: 100%; height: 100%; display: block; }


.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 2.5rem 2rem;
  display: flex;
  align-items: flex-start;
}

.card-form {
  background: #fff;
  width: 420px;
  max-width: 100%;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.10);
}

.card-form-title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
  padding: 1rem 1.75rem 0.85rem;
  color: #1a2530;
  letter-spacing: 0.1px;
}

.form-header {
  background: var(--dark);
  color: #fff;
  padding: 0.95rem 1.75rem;
}
.form-header h2 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.tab-panel {
  padding: 1.75rem 1.75rem 1.75rem;
}
.tab-panel.hidden { display: none; }

.form-lead {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.field { margin-bottom: 1rem; }

.field input,
.exp-row input {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: 1rem;
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s;
}
.field input:focus,
.exp-row input:focus {
  outline: none;
  border-color: var(--dark);
}

.field input.error,
.exp-row input.error {
  border-color: #c0392b;
  background: #fdf3f2;
}

.field-label {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.exp-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.6fr;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.cvv-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.cvv-wrap input { padding-right: 2.2rem; }
.help-bubble {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: #b0b5bd;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: help;
  display: flex;
  align-items: center;
  justify-content: center;
}

.show-card-info {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.4rem 0;
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.show-card-info:hover { color: var(--dark); }
.eye { font-size: 0.95rem; }

.btn-primary {
  width: 100%;
  padding: 0.9rem;
  background: var(--dark);
  color: #fff;
  border: none;
  border-radius: 2px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-primary:hover { background: var(--dark-2); }

.result {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 2px;
  text-align: center;
  font-weight: 500;
  font-size: 0.95rem;
}
.result.hidden { display: none; }
.result.success { background: #e8f0e9; color: #2c6b3c; border: 1px solid #c0dfc7; }
.result.error   { background: #fbeaea; color: #8b2929; border: 1px solid #ecc4c4; }

/* Balance card */
.balance-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.25rem;
  text-align: left;
  font-weight: 400;
}
.balance-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
  margin-bottom: 0.85rem;
}
.balance-card-num {
  font-family: "Courier New", monospace;
  letter-spacing: 1px;
  color: var(--text);
  font-size: 0.95rem;
}
.balance-status {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  border: 1px solid;
}
.balance-status.ok {
  color: #2c6b3c;
  background: #e8f0e9;
  border-color: #c0dfc7;
}
.balance-status.warn {
  color: #8b5a29;
  background: #fbf2e6;
  border-color: #ecd9b8;
}
.balance-initial {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.2rem;
}
.balance-message {
  font-size: 0.9rem;
  color: var(--muted);
  background: var(--section-bg);
  padding: 0.6rem 0.75rem;
  border-radius: 3px;
  margin: 0 0 1rem 0;
  line-height: 1.45;
}
.tx-history {
  font-family: "Courier New", monospace;
  font-size: 0.82rem;
  color: var(--text);
  background: var(--section-bg);
  padding: 0.75rem;
  border-radius: 3px;
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 220px;
  overflow-y: auto;
  margin: 0 0 1rem 0;
}
.balance-amount-wrap {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}
.balance-label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.balance-amount {
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark);
  margin-top: 0.15rem;
}
.tx-section h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.tx-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
}
.tx-row {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f1f3;
  font-size: 0.9rem;
  align-items: center;
}
.tx-row:last-child { border-bottom: none; }
.tx-date { color: var(--muted); font-size: 0.8rem; }
.tx-merchant { color: var(--text); }
.tx-amount { font-weight: 600; font-family: "Courier New", monospace; }
.tx-debit { color: #8b2929; }
.tx-credit { color: #2c6b3c; }

.btn-secondary {
  width: 100%;
  padding: 0.7rem;
  background: transparent;
  color: var(--dark);
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.5rem;
}
.btn-secondary:hover {
  background: #f5f5f7;
  border-color: var(--dark);
}

/* Features */
.features {
  background: var(--section-bg);
  padding: 3rem 2rem;
}
.features-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.feature {
  background: #fff;
  padding: 2rem 1.75rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.feature-icon { margin-bottom: 1rem; }
.feature h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.85rem;
  color: var(--text);
}
.feature p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  flex: 1;
}
.feature p a { color: var(--dark); text-decoration: underline; }
.learn-more {
  align-self: flex-end;
  text-decoration: underline;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  margin-top: auto;
}

/* Getting Started */
.getting-started {
  background: var(--section-bg);
  padding: 0 2rem 3rem;
}
.getting-started-inner {
  max-width: 1200px;
  margin: 0 auto;
  background: #fff;
  padding: 2.5rem 2.5rem 2rem;
}
.getting-started h2 {
  font-size: 2rem;
  font-weight: 500;
  margin-bottom: 1.75rem;
  color: var(--text);
}
.gs-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 2.5rem;
  align-items: center;
}
.gs-image { width: 100%; }
.gs-text h3 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text);
}
.gs-text p {
  color: var(--muted);
  margin-bottom: 1.25rem;
  font-size: 1rem;
}

.back-top {
  display: block;
  text-align: right;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 1.5rem;
}
.back-top:hover { color: var(--dark); }

/* Footer */
.site-footer {
  background: var(--dark);
  color: #d6d8db;
  padding: 2.5rem 2rem 2rem;
  font-size: 0.85rem;
  line-height: 1.55;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.footer-logo { font-size: 1.4rem; }

.copy { margin-bottom: 1rem; color: #d6d8db; }
.legal { margin-bottom: 1rem; color: #c0c4c9; }
.legal a { color: #fff; text-decoration: underline; }

.footer-links {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
}
.footer-links a {
  color: #fff;
  text-decoration: underline;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

/* Responsive — tablet and below */
@media (max-width: 900px) {
  .features-inner { grid-template-columns: 1fr; gap: 1rem; }
  .gs-grid { grid-template-columns: 1fr; gap: 1.5rem; }

  .site-header { height: auto; padding: 0.75rem 0; }
  .site-header-inner {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
  .main-nav {
    width: 100%;
    order: 3;
    margin: 0;
    justify-content: center;
    gap: 1.25rem;
    border-top: 1px solid #d4d8e0;
    padding-top: 0.5rem;
  }
  .main-nav a { font-size: 0.95rem; }

  .contact-grid { grid-template-columns: 1fr; }
  .page-content { padding: 2rem 1.75rem; }

  .hero {
    height: auto;
    display: flex;
    flex-direction: column;
  }
  .hero-bg {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
  }
  .hero-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-position: center 30%;
  }
  .hero-inner {
    position: relative;
    padding: 1.5rem 1rem;
    width: 100%;
  }
  .card-form { width: 100%; }
}

/* Phones */
@media (max-width: 600px) {
  .top-bar { height: 48px; }
  .top-bar-inner {
    padding: 0 1rem;
    gap: 1.25rem;
  }
  .top-link { font-size: 0.9rem; }

  .site-header { top: 48px; }
  .site-header-inner { padding: 0 1rem; }
  .logo { font-size: 1.35rem; }

  .hero-bg { height: 200px; }
  .hero-inner { padding: 1.25rem 1rem; }

  .tab { padding: 0.85rem 0.75rem; font-size: 0.95rem; }
  .tab-panel { padding: 1.25rem; }
  .form-lead { font-size: 0.9rem; margin-bottom: 1rem; }

  /* 16px font on inputs prevents iOS auto-zoom on focus */
  .field input,
  .exp-row input {
    padding: 0.85rem;
    font-size: 16px;
  }
  .btn-primary {
    padding: 1rem;
    font-size: 1rem;
  }
  .show-card-info { font-size: 0.95rem; padding: 0.5rem 0; }

  .features { padding: 1.5rem 1rem; }
  .feature { padding: 1.5rem 1.25rem; }
  .feature h3 { font-size: 1.25rem; }
  .feature p { font-size: 0.9rem; }
  .learn-more { align-self: center; }

  .getting-started { padding: 0 1rem 1.5rem; }
  .getting-started-inner { padding: 1.5rem 1.25rem; }
  .getting-started h2 { font-size: 1.5rem; margin-bottom: 1.25rem; }
  .gs-text h3 { font-size: 1.2rem; }
  .gs-text p { font-size: 0.95rem; }
  .back-top { text-align: center; margin-top: 1rem; }

  .page-hero { padding: 1.5rem 1rem; }
  .page-hero h1 { font-size: 1.5rem; }
  .page-lead { font-size: 0.95rem; }
  .page-section { padding: 0 1rem 1.5rem; }
  .page-content { padding: 1.5rem 1.25rem; }
  .page-content h2 { font-size: 1.25rem; }
  .faq-question { font-size: 0.95rem; }

  .site-footer {
    padding: 2rem 1rem 1.5rem;
    font-size: 0.82rem;
  }
  .footer-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
  }
  .footer-logo { font-size: 1.25rem; }
  .footer-links {
    flex-direction: column;
    gap: 0.75rem;
  }
  .footer-links a { font-size: 0.85rem; margin-bottom: 0; }
  .legal { font-size: 0.8rem; }
}

/* Very small phones */
@media (max-width: 360px) {
  .tab { font-size: 0.9rem; padding: 0.75rem 0.5rem; }
  .exp-row { gap: 0.4rem; }
}
