/* Coda Bank Sync — single stylesheet, no dependencies. Light theme, one accent. */

:root {
  --bg: #ffffff;
  --surface: #f6f7f9;
  --ink: #171a21;
  --muted: #5c6572;
  --line: #e4e7ec;
  --accent: #4f46e5;
  --accent-dark: #4338ca;
  --accent-soft: #eef0fe;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(23, 26, 33, 0.08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

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

.skip-link {
  position: absolute;
  top: -60px; left: 16px;
  z-index: 20;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

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

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-small { padding: 8px 16px; font-size: 0.9rem; }
.btn-block { width: 100%; }

/* ---------- Header / footer ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.brand img { width: 28px; height: 28px; }

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9rem;
  padding: 28px 0 36px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
}
.copyright { margin: 0; }
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.site-footer a:hover { color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  padding: 88px 0 72px;
  text-align: center;
  background: radial-gradient(640px 320px at 50% -90px, var(--accent-soft), transparent 70%);
}
.hero-inner { max-width: 760px; }
.badge {
  display: inline-block;
  margin: 0 0 22px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 0.85rem;
}
h1 {
  margin: 0 0 20px;
  font-size: clamp(2.3rem, 5.4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.lede {
  margin: 0 auto 32px;
  max-width: 640px;
  font-size: 1.15rem;
  color: var(--muted);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--surface); }
.section-head { max-width: 660px; margin: 0 auto 40px; text-align: center; }
h2 {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.section-head p { margin: 0; color: var(--muted); }

/* ---------- Steps ---------- */
.steps {
  list-style: none;
  margin: 0 0 48px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}
.step h3 { margin: 0 0 8px; font-size: 1.08rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ---------- Doc mockup ---------- */
.doc {
  margin: 0 auto;
  max-width: 780px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.doc-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.85rem;
  color: var(--muted);
}
.doc-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); }
.doc-title { margin-right: auto; font-weight: 600; color: var(--ink); }
.doc-sync { color: var(--accent); font-weight: 600; }
.doc-body { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); }
.table-wrap { overflow-x: auto; }
.tx { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.tx th {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}
.tx td { padding: 11px 14px; border-bottom: 1px solid var(--line); }
.tx tbody tr:nth-child(even) { background: #fafbfc; }
.tx .num, .tx th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx td.neg { color: var(--muted); }
.balances {
  border-left: 1px solid var(--line);
  padding: 8px 16px 16px;
  min-width: 0;
}
.balances-label {
  display: block;
  padding: 12px 0 8px;
  border-bottom: 1px solid var(--line);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.balances dl { margin: 0; }
.bal {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.bal:last-child { border-bottom: 0; }
.bal dt { color: var(--muted); }
.bal dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.doc-caption {
  margin: 0;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}

/* ---------- Features ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.feature h3 { margin: 0 0 8px; font-size: 1.02rem; }
.feature p { margin: 0; color: var(--muted); font-size: 0.94rem; }

.uses-title {
  margin: 44px 0 18px;
  text-align: center;
  font-size: 1.1rem;
}
.uses {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.use { margin: 0; text-align: center; color: var(--muted); font-size: 0.95rem; }
.use strong { display: block; margin-bottom: 4px; color: var(--ink); font-size: 1rem; }

/* ---------- Security ---------- */
.security-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.security-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  border-left: 3px solid var(--accent);
}
.security-item h3 { margin: 0 0 8px; font-size: 1.02rem; }
.security-item p { margin: 0; color: var(--muted); font-size: 0.94rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 720px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative;
  padding: 18px 44px 18px 4px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--accent);
}
.faq details[open] summary::after { content: "\2212"; }
.faq p { margin: 0 0 18px; padding-left: 4px; color: var(--muted); }

/* ---------- Signup ---------- */
.signup-section { padding-bottom: 96px; }
.signup-card {
  max-width: 520px;
  margin: 0 auto;
  padding: 40px 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: center;
}
.signup-card > p { margin: 0 0 24px; color: var(--muted); }
.field { text-align: left; margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-size: 0.9rem; font-weight: 600; }
.field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  color: var(--ink);
}
.field input::placeholder { color: #9aa3b0; }
.field input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-note { margin: 14px 0 0; font-size: 0.82rem; color: var(--muted); }
.signup-message {
  margin: 8px 0 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-size: 1.02rem;
  line-height: 1.55;
}

/* ---------- Prose (privacy page) ---------- */
.page { padding: 64px 0 88px; }
.prose { max-width: 720px; }
.prose h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); letter-spacing: -0.02em; margin: 0 0 24px; line-height: 1.1; }
.prose p, .prose li { color: var(--ink); }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.muted { color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .steps, .features, .uses { grid-template-columns: repeat(2, 1fr); }
  .security-grid { grid-template-columns: 1fr; }
  .doc-body { grid-template-columns: 1fr; }
  .balances { border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 600px) {
  .hero { padding: 56px 0 48px; }
  .section { padding: 52px 0; }
  .steps, .features, .uses { grid-template-columns: 1fr; }
  .signup-card { padding: 32px 20px; }
  .tx { font-size: 0.84rem; }
}