/* CornerStone Agentic Score – Standalone onboarding site. Arnstein Banking Systems. */
/* Design system aligned with screens/ (Stitch): dark theme, emerald primary, Inter, Material Icons. */

/* Display font (screens use Inter) */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

/* Material Symbols Outlined (Google Fonts) */
@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0");

.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: 400;
  font-style: normal;
  font-size: 1.25em;
  line-height: 1;
  letter-spacing: normal;
  text-rendering: optimizeLegibility;
  vertical-align: middle;
}
.material-symbols-outlined.icon-sm { font-size: 1rem; }
.material-symbols-outlined.icon-lg { font-size: 1.5rem; }
.material-symbols-outlined.icon-xl { font-size: 2rem; }
.material-symbols-outlined.text-accent,
.material-symbols-outlined.accent { color: var(--accent); }

.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; }

:root {
  --bg: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.8);
  --bg-card-hover: rgba(30, 41, 59, 0.8);
  --border: rgba(51, 65, 85, 0.8);
  --border-accent: rgba(16, 185, 129, 0.25);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent: #10b981;
  --accent-hover: #34d399;
  --accent-bg: rgba(16, 185, 129, 0.1);
  --accent-shadow: rgba(16, 185, 129, 0.25);
  --blue: #3b82f6;
  --amber: #f59e0b;
  --red: #ef4444;
  --radius: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-sm: 0.5rem;
}

/* Light theme: align with Stitch light mode screens (screens/*.md) */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f8f7;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --border: rgba(148, 163, 184, 0.6);
  --border-accent: rgba(16, 185, 129, 0.35);
  --text: #1e293b;
  --text-muted: #475569;
  --text-dim: #64748b;
  --accent: #10b77f;
  --accent-hover: #34d399;
  --accent-bg: rgba(16, 185, 129, 0.1);
  --accent-shadow: rgba(16, 185, 129, 0.2);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: var(--accent-hover);
}
.text-accent {
  color: var(--accent);
}
.text-dim {
  color: var(--text-dim);
}

/* Layout */
.layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Screen design: glass and glow utilities */
.glass-effect {
  background: rgba(16, 185, 129, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(16, 185, 129, 0.1);
}
.emerald-glow {
  box-shadow: 0 0 20px -5px rgba(16, 185, 129, 0.2);
}
.emerald-glow:hover {
  box-shadow: 0 0 30px -2px rgba(16, 185, 129, 0.3);
}

/* Header (screen: sticky, border white/10, backdrop) */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.header-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo:hover {
  color: var(--text);
}
.logo-icon {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  background: var(--accent-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
  font-size: 1.25rem !important;
}
.logo-icon.material-symbols-outlined {
  font-size: 1.25rem !important;
}
.logo-sub {
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 500;
  margin-left: 0.25rem;
}
.nav {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  flex-shrink: 0;
  gap: 0.25rem;
}
.nav a {
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 0.375rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.nav a:hover {
  color: var(--text);
  background: rgba(51, 65, 85, 0.5);
}
.cta-link {
  color: var(--accent) !important;
  background: var(--accent-bg);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-weight: 500;
}
.cta-link:hover {
  color: var(--accent-hover) !important;
  background: rgba(16, 185, 129, 0.2);
}

/* Main */
.main {
  flex: 1;
}

/* Sections */
.section {
  max-width: 64rem;
  margin: 0 auto;
  padding: 4rem 1rem;
}
.section-alt {
  background: rgba(15, 23, 42, 0.5);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* Hero (screen: background glow blurs, badge, large h1, two CTAs) */
.hero {
  position: relative;
  padding: 4rem 1rem 5rem;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(16, 185, 129, 0.12), transparent);
  pointer-events: none;
}
.hero-glow {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
}
.hero-glow--top {
  top: -10%;
  left: -10%;
  width: 40%;
  height: 40%;
  background: rgba(16, 185, 129, 0.15);
}
.hero-glow--bottom {
  bottom: -10%;
  right: -10%;
  width: 30%;
  height: 30%;
  background: rgba(59, 130, 246, 0.1);
}
.hero-inner {
  max-width: 64rem;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.hero-inner .badge {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  font-size: 0.75rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background: var(--accent-bg);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent);
  font-size: 0.875rem;
  margin-bottom: 2rem;
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 1.5rem;
  color: var(--text);
  line-height: 1.1;
}
.hero .lead {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 48rem;
  margin: 0 0 0.5rem;
  font-weight: 500;
}
.hero .sub {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}
.hero .hero-h2 {
  font-size: 1.375rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
  color: var(--text);
  max-width: 42rem;
}
.hero .section-desc {
  color: var(--text-muted);
  max-width: 42rem;
  margin: 0 0 1rem;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}
.hero-cta .btn {
  min-width: 11.25rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  text-decoration: none;
  font-family: inherit;
}
.btn-primary {
  background: var(--accent);
  color: #0f172a;
  font-weight: 700;
  box-shadow: 0 4px 14px var(--accent-shadow);
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}
.btn-outline {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.btn-outline:hover {
  background: rgba(51, 65, 85, 0.5);
  border-color: var(--border-accent);
  color: var(--text);
}
.btn-lg {
  min-height: 3.5rem;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}
.btn-primary.btn-lg {
  box-shadow: 0 10px 25px var(--accent-shadow);
}
.btn-primary.btn-lg:hover {
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.35);
}

/* Section titles */
.section h2 {
  font-size: clamp(1.875rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  color: var(--text);
}
.section .section-desc {
  color: var(--text-muted);
  max-width: 42rem;
  margin: 0 0 3rem;
}

/* Cards grid */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
/* Four-pillar layout: 2x2 on tablet, 1x4 on desktop (avoids 3+1) */
.cards--four {
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 64rem) {
  .cards--four {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 32rem) {
  .cards--four {
    grid-template-columns: 1fr;
  }
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: background 0.2s, border-color 0.2s;
}
.card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(71, 85, 105, 0.8);
}
/* Screen-style feature cards: rounded-2xl, hover border accent, icon box */
.card--feature {
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}
.card--feature:hover {
  border-color: var(--border-accent);
}
.card--feature .card-icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-lg);
  transition: background 0.2s, color 0.2s;
}
.card--feature:hover .card-icon {
  background: var(--accent);
  color: #0f172a;
}
.card--pillar {
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.card--pillar .card-icon {
  margin-bottom: 1rem;
}
.card-icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.card-icon.emerald { background: var(--accent-bg); color: var(--accent); }
.card-icon.blue { background: rgba(59, 130, 246, 0.1); color: var(--blue); }
.card-icon.amber { background: rgba(245, 158, 11, 0.1); color: var(--amber); }
.card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--text);
}
.card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}
.card .price-amount {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.card-icon .material-symbols-outlined {
  font-size: 1.5rem;
}

/* Product blocks (screen: rounded-xl, border, icon + title row) */
.product-block {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  padding: 2rem;
  margin-bottom: 2rem;
  transition: border-color 0.2s;
}
.product-block:hover {
  border-color: var(--border-accent);
}
.product-block h2 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
}
.product-block h2 .material-symbols-outlined {
  color: var(--accent);
  font-size: 1.75rem;
}
.product-block h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 1rem;
}
.product-block .hero-cta {
  margin-top: 1rem;
}
.tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}
.tool-tags code {
  background: var(--accent-bg);
  color: var(--accent);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  border: 1px solid var(--border-accent);
}

/* List */
.ul-check {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ul-check li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
}
.ul-check li strong {
  color: var(--text);
}
.ul-check .check {
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 0.125rem;
}

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.tag {
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.team-avatar {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  background: var(--accent-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.team-avatar.blue { background: rgba(59, 130, 246, 0.2); color: var(--blue); }
.team-card h3 { margin: 0 0 0.25rem; font-size: 1.125rem; }
.team-card .role { color: var(--accent); font-size: 0.875rem; margin: 0 0 0.5rem; }
.team-card .role.blue { color: var(--blue); }
.team-card .bio { color: var(--text-muted); font-size: 0.875rem; margin: 0; line-height: 1.5; }

/* CTA block (screen: skewed bg band for American Agentic Future) */
.cta-block {
  text-align: center;
  padding: 5rem 1rem;
  position: relative;
}
.section-cta {
  position: relative;
  padding: 5rem 1rem;
  overflow: hidden;
}
.section-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent-bg);
  transform: skewY(-3deg);
  transform-origin: right;
  z-index: 0;
}
.section-cta .section {
  position: relative;
  z-index: 1;
}
.cta-block .badge { margin-bottom: 2rem; }
.cta-block h2 { margin: 0 0 1rem; }
.cta-block .cta-desc { color: var(--text-muted); max-width: 36rem; margin: 0 auto 2.5rem; }
.cta-block .hero-cta { justify-content: center; }

/* Footer (screen: border white/5, logo + links + tagline) */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 2rem 1rem;
  background: var(--bg);
}
.footer-inner {
  max-width: 64rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  color: var(--text-dim);
  font-size: 0.875rem;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dim);
  font-weight: 600;
}
.footer-logo .material-symbols-outlined {
  color: rgba(16, 185, 129, 0.6);
  font-size: 1.25rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}
.footer-links a {
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.footer-inner a:hover { color: var(--text-muted); }
.footer-tagline {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  opacity: 0.8;
}
@media (min-width: 640px) {
  .footer-inner { flex-direction: row; flex-wrap: wrap; }
}

/* Flow page (aligned with Stitch onboarding screens: rounded-xl, slate border) */
.flow-page {
  padding: 2rem 1rem 3rem;
}
@media (min-width: 40rem) {
  .flow-page { padding: 3rem 1rem 4rem; }
}
.flow-inner {
  max-width: 32rem;
  margin: 0 auto;
}
.flow-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  padding: 0.25rem 0;
}
.flow-back:hover { color: var(--text); }
.flow-title { font-size: 1.5rem; font-weight: 700; margin: 0 0 0.25rem; }
.flow-desc { color: var(--text-muted); font-size: 0.875rem; margin: 0 0 2rem; }

/* Stepper: horizontal nav with active state (Stitch-style) */
.stepper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  padding: 0 0.25rem;
  gap: 0.25rem;
}
.stepper-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 0;
  max-width: 5.5rem;
}
.stepper-dot {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  border: 2px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.stepper-step.active .stepper-dot,
.stepper-step.done .stepper-dot {
  border-color: var(--accent);
  background: var(--accent-bg);
  color: var(--accent);
}
.stepper-step.active .stepper-dot {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
}
.stepper-step .stepper-label {
  font-size: 0.625rem;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.2;
}
@media (min-width: 24rem) {
  .stepper-step .stepper-label { font-size: 0.6875rem; }
}

/* Flow card: rounded-xl, border aligned with Stitch card style */
.flow-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s, background 0.2s;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
}
.flow-card:hover {
  border-color: rgba(71, 85, 105, 0.9);
}
.flow-card h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem;
  margin: 0 0 0.5rem;
}
.flow-card h3 .icon { color: var(--accent); }
.flow-card .card-desc { color: var(--text-muted); font-size: 0.875rem; margin: 0 0 1rem; }
.flow-card .form-group { margin-bottom: 1rem; }
.flow-card label { display: block; font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.375rem; }
.flow-card input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(30, 41, 59, 0.8);
  color: var(--text);
  font-size: 0.875rem;
  font-family: ui-monospace, monospace;
}
.flow-card input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  min-width: 1.15rem;
  min-height: 1.15rem;
  max-width: 1.15rem;
  max-height: 1.15rem;
  padding: 0;
  margin: 0.2rem 0 0;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--accent);
}
.flow-card input::placeholder { color: var(--text-dim); }
.flow-card select,
.flow-card .wallet-network {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #1e293b;
  color: #f1f5f9;
  font-size: 0.875rem;
  min-height: 2.25rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  padding-right: 1.75rem;
}
.flow-card select option,
.flow-card .wallet-network option {
  background: #1e293b;
  color: #f1f5f9;
}
.flow-card .error {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--red);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.flow-card .cornerstone-bank-section,
.flow-card .plaid-section { margin-top: 1rem; width: 100%; min-width: 0; max-width: 100%; }
.flow-card .cornerstone-bank-section .checkbox-label,
.flow-card .plaid-section .checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  cursor: pointer;
}
.flow-card .cornerstone-bank-section .checkbox-label input,
.flow-card .plaid-section .checkbox-label input {
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  min-width: 1.15rem;
  min-height: 1.15rem;
  max-width: 1.15rem;
  max-height: 1.15rem;
  margin-top: 0.2rem;
  padding: 0;
  cursor: pointer;
  accent-color: var(--accent);
}
.flow-card .cornerstone-bank-section .checkbox-label span,
.flow-card .plaid-section .checkbox-label span {
  flex: 1;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
  line-height: 1.4;
}
.flow-card .cornerstone-bank-section .btn,
.flow-card .plaid-section .btn { display: inline-block; margin-top: 0.25rem; }
.flow-card .cornerstone-bank-status,
.flow-card .plaid-status { margin-left: 0; margin-top: 0.5rem; font-size: 0.875rem; color: var(--text-muted); display: block; }
.flow-card .cornerstone-bank-status.error,
.flow-card .plaid-status.error { color: var(--red); }
.flow-card .wallet-addr { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1rem; font-family: ui-monospace, monospace; }
.flow-card .snippet-block {
  margin-bottom: 1rem;
}
.flow-card .snippet-block label { margin-bottom: 0.5rem; }
.flow-card pre {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
  overflow-x: auto;
  margin: 0 0 0.5rem;
}
.flow-card .copy-row { display: flex; gap: 0.5rem; align-items: flex-start; }
.flow-card .copy-row pre { flex: 1; margin: 0; }
.btn-icon {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.btn-icon:hover { background: rgba(51, 65, 85, 0.5); color: var(--text); }
.success-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.success-header .icon-wrap {
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background: var(--accent-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.meta-connect-wrap { margin: 1rem 0; }

.wallet-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.wallet-row:last-of-type { border-bottom: none; }
.wallet-row-fields {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.wallet-row .wallet-address { flex: 1; min-width: 0; }
.wallet-row .wallet-network { width: 6.5rem; flex-shrink: 0; }
.wallet-row .btn-remove-wallet { flex-shrink: 0; }
.wallet-row .row-attest { margin-left: 0; padding: 0.5rem 0; }
.wallet-row .row-attest .attest-done { color: var(--accent); margin-left: 0.5rem; }
.flow-card .tos-consent-row {
  margin-top: 1.25rem;
  margin-bottom: 0.75rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
  width: 100%;
  clear: both;
  display: block;
}
.flow-card .tos-consent-row .checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0;
  width: 100%;
  min-width: 0;
  cursor: pointer;
}
.flow-card .tos-consent-row .checkbox-label input,
.flow-card .tos-consent-row .checkbox-label input[type="checkbox"] {
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  min-width: 1.15rem;
  min-height: 1.15rem;
  max-width: 1.15rem;
  max-height: 1.15rem;
  margin-top: 0.2rem;
  padding: 0;
  cursor: pointer;
  accent-color: var(--accent);
}
.flow-card .tos-consent-row .checkbox-label span {
  flex: 1;
  min-width: 0;
  line-height: 1.4;
  word-break: break-word;
  overflow-wrap: break-word;
}
.btn-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: #f6851b;
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.btn-meta:hover { background: #e2761b; }
.btn-meta:disabled { opacity: 0.7; cursor: not-allowed; }
.wallet-connected {
  padding: 0.75rem 1rem;
  background: var(--accent-bg);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.flow-card .skip-btn { margin-top: 1rem; }
.flow-links { display: flex; gap: 0.75rem; margin-top: 1.5rem; flex-wrap: wrap; }

/* Validation in progress */
.status-validating { display: inline-flex; align-items: center; gap: 0.35rem; }
.status-validating::before { content: ""; width: 0.75rem; height: 0.75rem; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: flow-spin 0.6s linear infinite; }
@keyframes flow-spin { to { transform: rotate(360deg); } }

/* Modal */
.flow-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.flow-modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); }
.flow-modal-dialog { position: relative; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 1.5rem; max-width: 24rem; width: 100%; margin: 0 1rem; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4); }
.flow-modal-title { margin: 0 0 0.5rem; font-size: 1.125rem; color: var(--text); }
.flow-modal-actions { display: flex; gap: 0.75rem; margin-top: 1.25rem; justify-content: flex-end; }

/* ========== Light theme overrides ========== */
html[data-theme="light"] .header,
html[data-theme="light"] .top-bar {
  background: rgba(255, 255, 255, 0.92);
  border-color: var(--border);
}
html[data-theme="light"] .glass-effect {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.2);
}
html[data-theme="light"] .btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
html[data-theme="light"] .btn-outline:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  color: var(--text);
}
html[data-theme="light"] .card,
html[data-theme="light"] .card--feature {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
html[data-theme="light"] .flow-card input {
  background: #f1f5f9;
  color: var(--text);
  border-color: var(--border);
}
html[data-theme="light"] .flow-card input[type="checkbox"] {
  accent-color: var(--accent);
}
html[data-theme="light"] .flow-card select,
html[data-theme="light"] .flow-card .wallet-network {
  background: #f1f5f9;
  color: var(--text);
  border-color: var(--border);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none' stroke='%23475569' stroke-width='2'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
}
html[data-theme="light"] .flow-card select option,
html[data-theme="light"] .flow-card .wallet-network option {
  background: #f1f5f9;
  color: var(--text);
}
html[data-theme="light"] .flow-card pre {
  background: #f1f5f9;
  color: var(--text-muted);
  border-color: var(--border);
}

/* Tailwind utility overrides when light theme is active */
html[data-theme="light"] .bg-background-dark { background: var(--bg) !important; }
html[data-theme="light"] .text-slate-100,
html[data-theme="light"] .text-white { color: var(--text) !important; }
html[data-theme="light"] .text-slate-300,
html[data-theme="light"] .text-slate-400 { color: var(--text-muted) !important; }
html[data-theme="light"] .border-white\/10,
html[data-theme="light"] .border-slate-800 { border-color: var(--border) !important; }
html[data-theme="light"] .bg-white\/5 { background: var(--bg-card) !important; }
html[data-theme="light"] .bg-slate-900 { background: var(--bg-card) !important; }
html[data-theme="light"] .bg-slate-900\/20,
html[data-theme="light"] .bg-slate-900\/30,
html[data-theme="light"] .bg-slate-900\/40,
html[data-theme="light"] .bg-slate-900\/50 { background: var(--bg-card-hover) !important; }
html[data-theme="light"] .border-slate-700 { border-color: var(--border) !important; }
html[data-theme="light"] .text-slate-500,
html[data-theme="light"] .text-slate-600 { color: var(--text-dim) !important; }

/* ========== Top bar (reference: one row = logo | nav links | theme | Get onboarded) ========== */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  min-height: 4rem;
}
/* Single row at all widths (reference): logo | nav links | theme | Get onboarded */
.top-bar__inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 1rem 1.5rem;
}
.top-bar__inner > a:first-of-type {
  flex-shrink: 0;
}
.top-bar__nav {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
  position: relative;
  z-index: 60;
  pointer-events: auto;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.top-bar__nav::-webkit-scrollbar { height: 4px; }
.top-bar__nav a {
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 0.5rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  position: relative;
  z-index: 61;
  flex-shrink: 0;
}
.top-bar__nav a:hover { color: var(--accent); }
.top-bar__nav a.bg-primary { color: var(--bg-card); }
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}
.theme-toggle,
.theme-toggle button { pointer-events: auto; position: relative; z-index: 61; }
.theme-toggle [role="button"],
.theme-toggle button {
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.theme-toggle [role="button"]:hover,
.theme-toggle button:hover { color: var(--text); }
.theme-toggle [aria-pressed="true"],
.theme-toggle .theme-active { color: var(--accent); }
.top-bar__menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.top-bar__menu-btn:hover { background: var(--bg-card-hover); }

/* Nav always visible (no hamburger); reference single-row on desktop */
.top-bar__menu-btn { display: none !important; }
.top-bar-drawer-backdrop { display: none !important; }
.top-bar__nav { display: flex !important; }
.top-bar__nav.is-open { display: flex !important; }
