:root {
  --bg: #F0EDE8;
  --surface: #F5F3EE;
  --surface-2: #EAE7E1;
  --border: #D8D4CC;
  --border-light: #E4E1DB;
  --text: #1A1A1A;
  --text-dim: #6B6860;
  --accent: #00D28A;
  --accent-bg: #E8F8F1;
  --accent-border: #A8E8CE;
  --accent-text: #0A7A52;
  --font-display: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body); line-height: 1.5; }
a { color: inherit; text-decoration: none; }

/* Nav */
.nav { background: rgba(240,237,232,0.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border-light); position: sticky; top: 0; z-index: 50; }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; }
.logo-hex { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.logo-hex svg { width: 18px; height: 18px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--text); }
.brand-sub { font-size: 9px; color: var(--text-dim); letter-spacing: 0.12em; text-transform: uppercase; margin-top: 2px; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { color: var(--text-dim); font-size: 13px; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-body); font-weight: 600; font-size: 14px; padding: 10px 20px; border: none; border-radius: 999px; cursor: pointer; transition: transform 0.15s, opacity 0.15s; text-decoration: none; }
.btn:hover { transform: translateY(-1px); opacity: 0.9; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn-green { background: var(--accent); color: #06120D; }
.btn-dark { background: var(--text); color: #fff; }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn-green-soft { background: var(--accent-bg); border: 1px solid var(--accent-border); color: var(--accent-text); }
.btn-pill { padding: 9px 20px; }
.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn-block { width: 100%; margin-top: 12px; border-radius: 999px; padding: 12px; }
.btn-secondary { background: transparent; border: 1px solid var(--border); color: var(--text); flex: 1; border-radius: 999px; padding: 10px; font-family: var(--font-body); font-size: 13px; font-weight: 500; cursor: pointer; }
.btn-secondary:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-text); }
.btn-secondary:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-icon { background: transparent; border: 1px solid var(--border); color: var(--text-dim); border-radius: 8px; width: 32px; height: 32px; cursor: pointer; font-size: 16px; }

/* Hero */
.hero { background: var(--surface); text-align: center; padding: 64px 24px 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-dim); font-size: 12px; font-weight: 500; padding: 6px 14px; border-radius: 999px; margin-bottom: 28px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.hero-logo-circle { margin: 0 auto 28px; width: 220px; height: 220px; display: flex; align-items: center; justify-content: center; }
.logo-hex-lg { width: 160px; height: 160px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.logo-hex-lg svg { width: 72px; height: 72px; }

h1 { font-family: var(--font-display); font-size: 64px; font-weight: 700; line-height: 1.05; letter-spacing: -0.01em; margin-bottom: 20px; color: var(--text); }
h1 em { font-style: italic; color: var(--accent-text); }
.sub { font-size: 16px; color: var(--text-dim); max-width: 560px; margin: 0 auto 32px; line-height: 1.7; }
.cta-row { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 52px; flex-wrap: wrap; }

/* Hero Mockup */
.hero-mockup { max-width: 820px; margin: 0 auto; background: #fff; border: 1px solid var(--border); border-radius: 16px 16px 0 0; overflow: hidden; box-shadow: 0 -4px 40px rgba(0,0,0,0.06); text-align: left; }
.mockup-bar { background: var(--surface-2); border-bottom: 1px solid var(--border-light); padding: 10px 16px; display: flex; align-items: center; gap: 7px; }
.mb-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.mb-url { flex: 1; background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 4px 12px; font-family: var(--font-mono); font-size: 11px; color: #999; margin: 0 14px; }
.mockup-body { display: grid; grid-template-columns: 1fr 1fr; }
.mp-col { padding: 20px; }
.mp-col-right { background: var(--bg); border-left: 1px solid var(--border-light); display: flex; flex-direction: column; gap: 12px; }
.panel-tag { font-family: var(--font-mono); font-size: 10px; color: #999; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 12px; }
.fake-input { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 12px; color: var(--text-dim); margin-bottom: 10px; line-height: 1.5; font-family: var(--font-body); }
.fake-btn { background: var(--accent); color: #06120D; font-weight: 600; font-size: 12px; padding: 8px 0; border-radius: 999px; text-align: center; margin-bottom: 12px; }
.fake-code { background: var(--surface-2); border: 1px solid var(--border-light); border-radius: 8px; padding: 10px 12px; font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); line-height: 1.8; }
.ck { color: #059669; }
.cs { color: #B45309; }
.fake-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.fc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.fc-name { font-family: var(--font-display); font-weight: 700; font-size: 14px; }
.badge-on { background: var(--accent-bg); border: 1px solid var(--accent-border); color: var(--accent-text); font-family: var(--font-mono); font-size: 10px; padding: 2px 8px; border-radius: 999px; }
.badge-pending { background: #FFF8E6; border: 1px solid #F5D98B; color: #92620A; font-family: var(--font-mono); font-size: 10px; padding: 2px 8px; border-radius: 999px; }
.fc-hash { font-family: var(--font-mono); font-size: 9px; color: #999; margin-bottom: 8px; word-break: break-all; }
.fc-links { display: flex; gap: 10px; }
.fc-links a { font-family: var(--font-mono); font-size: 10px; color: var(--accent); }
.live-strip { display: flex; align-items: center; gap: 8px; }
.deploy-strip { font-size: 11px; color: var(--text-dim); font-family: var(--font-mono); }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: inline-block; animation: pulse 1.6s infinite; flex-shrink: 0; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(0,210,138,0.4); } 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.status-text { font-family: var(--font-mono); font-size: 11px; color: var(--accent-text); }

/* Pipeline */
.pipeline { max-width: 1100px; margin: 80px auto 80px; padding: 0 24px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.pipeline-step { flex: 1; }
.step-num { font-family: var(--font-mono); color: var(--accent); font-size: 13px; font-weight: 500; }
.pipeline-step h3 { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin: 8px 0 6px; }
.pipeline-step p { color: var(--text-dim); font-size: 14px; line-height: 1.6; }
.pipeline-arrow { color: var(--border); font-size: 20px; margin-top: 36px; }

/* Console */
.console { max-width: 1100px; margin: 0 auto; padding: 40px 24px 100px; }
.console-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.console-header h2 { font-family: var(--font-display); font-size: 32px; font-weight: 700; }
.status-pill { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); background: var(--surface); border: 1px solid var(--border); padding: 6px 12px; border-radius: 999px; }
.console-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.panel-label { font-family: var(--font-mono); font-size: 11px; color: #999; text-transform: uppercase; letter-spacing: 0.08em; }
textarea { width: 100%; min-height: 90px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; color: var(--text); font-family: var(--font-body); font-size: 14px; padding: 12px; resize: vertical; }
textarea:focus { outline: none; border-color: var(--accent); }
.code-block { background: var(--surface-2); border: 1px solid var(--border-light); border-radius: 10px; padding: 14px; font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); margin-top: 14px; overflow-x: auto; max-height: 280px; overflow-y: auto; white-space: pre-wrap; word-break: break-word; }
.action-row { display: flex; gap: 10px; margin-top: 14px; }
.agent-list { display: flex; flex-direction: column; gap: 12px; max-height: 440px; overflow-y: auto; }
.empty-state { color: var(--text-dim); font-size: 14px; padding: 20px 0; }
.agent-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; transition: box-shadow 0.15s; }
.agent-card:hover { box-shadow: 0 4px 24px rgba(0,0,0,0.08); }
.agent-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.agent-type { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--text); }
.agent-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12px; color: var(--text-dim); }
.agent-hash { font-family: var(--font-mono); font-size: 10px; color: #bbb; word-break: break-all; margin-bottom: 10px; letter-spacing: 0.01em; }
.agent-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.btn-small { font-size: 12px; font-family: var(--font-display); font-weight: 600; padding: 6px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; transition: all 0.15s; }
.btn-small:hover { background: var(--surface-2); border-color: var(--accent); color: var(--accent-text); }
.btn-small.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-small.btn-primary:hover { opacity: 0.88; }
.agent-links { display: flex; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.agent-links a { font-family: var(--font-mono); font-size: 11px; color: var(--accent-text); text-decoration: none; }
.agent-links a:hover { text-decoration: underline; }
.agent-balance { font-size: 11px; font-family: var(--font-mono); color: var(--text-dim); background: var(--surface); border: 1px solid var(--border-light); border-radius: 6px; padding: 3px 8px; }
.wallet-balance-bar { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-dim); margin-bottom: 10px; padding: 8px 12px; background: var(--surface-2); border: 1px solid var(--border-light); border-radius: 8px; }
.wallet-balance-bar strong { color: var(--text); font-family: var(--font-mono); }
.gas-estimate { font-size: 12px; padding: 8px 12px; border-radius: 8px; margin-top: 10px; font-family: var(--font-mono); }
.gas-estimate-loading { background: var(--surface-2); color: var(--text-dim); border: 1px solid var(--border-light); }
.gas-estimate-ready { background: #F0FDF4; border: 1px solid #86EFAC; color: #166534; }
.gas-estimate-error { background: #FFF1F2; border: 1px solid #FECDD3; color: #9F1239; }
.config-review { display: flex; flex-direction: column; gap: 0; }
.config-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border-light); font-size: 13px; gap: 12px; }
.config-row:last-child { border-bottom: none; }
.config-row label { color: var(--text-dim); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; min-width: 80px; }
.config-row span { color: var(--text); font-weight: 500; text-align: right; }
.config-row input { flex: 1; font-family: var(--font-mono); font-size: 12px; padding: 5px 8px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-align: right; }
.config-row input:focus { outline: none; border-color: var(--accent); }
.config-row-warn input { border-color: #F5D98B; background: #FFFBEB; }
.config-warning { font-size: 12px; color: #92620A; background: #FFF8E6; border: 1px solid #F5D98B; border-radius: 8px; padding: 8px 12px; margin-top: 8px; }

/* Footer */
.footer { max-width: 1100px; margin: 0 auto; padding: 24px; border-top: 1px solid var(--border-light); display: flex; justify-content: space-between; color: var(--text-dim); font-size: 13px; }

/* Mobile */
@media (max-width: 700px) {
  h1 { font-size: 36px; }
  .sub { font-size: 15px; }
  .hero { padding: 40px 16px 0; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .nav-links { display: none; }
  .nav-inner { padding: 12px 16px; }
  .nav-right { gap: 8px; }
  .nav-right .btn { font-size: 12px; padding: 6px 10px; }
  .mockup-body { grid-template-columns: 1fr; }
  .mp-col-right { border-left: none; border-top: 1px solid var(--border-light); }
  .pipeline { flex-direction: column; }
  .pipeline-arrow { display: none; }
  /* Console two-col → single col on mobile */
  .console-grid { grid-template-columns: 1fr !important; gap: 16px !important; }
  .compiler-panel, .monitor-panel { min-width: 0; }
  .config-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .config-row span { text-align: left; }
  .config-row input { width: 100%; text-align: left; }
  .action-row { flex-direction: column; }
  .action-row button { width: 100%; }
  .agent-card-head { flex-wrap: wrap; gap: 6px; }
  .agent-actions { flex-direction: column; }
  .agent-actions button { width: 100%; }
  /* Nav demo toggle wraps */
  .demo-toggle-wrap { font-size: 11px; }
  .wallet-btn { font-size: 12px; padding: 6px 10px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .footer { flex-direction: column; gap: 16px; }
  .footer-badge-row { flex-wrap: wrap; }
  .console-grid { grid-template-columns: 1fr; }
  .action-row { flex-direction: column; }
  .console { padding: 24px 16px 60px; }
  .footer { flex-direction: column; gap: 8px; }
}

/* Wallet */
.nav-right { display: flex; align-items: center; gap: 10px; }
.wallet-pill { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
.btn.connected { background: var(--accent-bg); color: var(--accent-text); border: 1px solid var(--accent-border); }

/* Demo Section */
.demo-section { background: var(--text); color: #fff; padding: 80px 24px; }
.demo-inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.demo-text .section-tag { font-family: var(--font-mono); font-size: 11px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em; display: block; margin-bottom: 16px; }
.demo-text h2 { font-family: var(--font-display); font-size: 44px; font-weight: 700; line-height: 1.1; margin-bottom: 16px; color: #fff; }
.demo-text p { color: #999; font-size: 15px; line-height: 1.7; margin-bottom: 28px; }
.demo-timer-box { background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 20px; padding: 32px; text-align: center; }
.timer-label { font-family: var(--font-mono); font-size: 11px; color: #666; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; }
.timer-display { font-family: var(--font-display); font-size: 96px; font-weight: 700; color: #fff; line-height: 1; margin-bottom: 4px; transition: color 0.3s; }
.timer-unit { font-family: var(--font-mono); font-size: 12px; color: #666; margin-bottom: 16px; }
.timer-status { font-size: 13px; color: #999; margin-bottom: 20px; min-height: 20px; }
.checkin-row { margin-top: 8px; }
.demo-tx { margin-top: 16px; font-family: var(--font-mono); font-size: 11px; color: #999; display: flex; align-items: center; gap: 8px; justify-content: center; }

/* Templates */
.templates-section { padding: 80px 24px; background: var(--bg); }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-head { margin-bottom: 48px; }
.section-tag { font-family: var(--font-mono); font-size: 11px; color: var(--accent-text); text-transform: uppercase; letter-spacing: 0.1em; display: block; margin-bottom: 12px; }
.section-head h2 { font-family: var(--font-display); font-size: 44px; font-weight: 700; line-height: 1.1; }
.templates-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.template-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px; cursor: pointer; transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s; }
.template-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 8px 24px rgba(0,210,138,0.1); }
.template-icon { font-size: 28px; margin-bottom: 12px; }
.template-label { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 4px; }
.template-name { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.template-card p { font-size: 13px; color: var(--text-dim); line-height: 1.6; margin-bottom: 14px; }
.template-tag { background: var(--accent-bg); border: 1px solid var(--accent-border); color: var(--accent-text); font-family: var(--font-mono); font-size: 10px; padding: 3px 10px; border-radius: 999px; }

/* Console section header */
.console .section-tag { font-family: var(--font-mono); font-size: 11px; color: var(--accent-text); text-transform: uppercase; letter-spacing: 0.1em; display: block; margin-bottom: 6px; }
.console h2 { font-family: var(--font-display); font-size: 36px; font-weight: 700; margin-bottom: 0; }

/* Mobile additions */
@media (max-width: 700px) {
  .demo-inner { grid-template-columns: 1fr; gap: 32px; }
  .demo-text h2 { font-size: 32px; }
  .timer-display { font-size: 72px; }
  .templates-grid { grid-template-columns: 1fr; }
  .section-head h2 { font-size: 32px; }
  .nav-right .wallet-pill { display: none; }
}

/* Trust strip under eyebrow */
.trust-strip { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--text-dim); margin-bottom: 28px; }
.trust-item strong { color: var(--text); font-weight: 600; }
.trust-divider { color: var(--border); }

/* Footer fixed spacing, no more clamped-together columns */
.footer { max-width: 1100px; margin: 0 auto; padding: 40px 24px; border-top: 1px solid var(--border-light); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--text-dim); min-width: 160px; }
.footer-brand { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--text); }
.footer-links { flex-direction: row; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.footer-links a { color: var(--text-dim); }
.footer-links a:hover { color: var(--accent-text); }
.footer-powered { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px; }
.footer-badge { font-family: var(--font-mono); font-size: 11px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-dim); padding: 4px 10px; border-radius: 999px; }

@media (max-width: 700px) {
  .footer { flex-direction: column; gap: 20px; padding: 32px 16px; }
  .footer-links { flex-direction: column; gap: 8px; }
}

.wallet-option img { width: 24px; height: 24px; object-fit: contain; }

/* Standalone page shells */
.page-main { min-height: 60vh; }
.page-hero { max-width: 720px; margin: 0 auto; text-align: center; padding: 64px 24px 48px; }
.page-hero h1 { font-family: var(--font-display); font-size: 48px; font-weight: 700; line-height: 1.1; margin: 12px 0 16px; }
.page-sub { color: var(--text-dim); font-size: 16px; line-height: 1.7; }

.nav-links a.active { color: var(--text); font-weight: 600; }

/* How it works standalone card grid instead of a squeezed row */
.pipeline-standalone { max-width: 1000px; margin: 0 auto; padding: 0 24px 80px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.pipeline-step-lg { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 28px; }
.pipeline-step-lg h3 { font-family: var(--font-display); font-size: 24px; font-weight: 700; margin: 10px 0 8px; }
.pipeline-step-lg p { color: var(--text-dim); font-size: 14px; line-height: 1.7; }

.page-cta-band { background: var(--text); text-align: center; padding: 60px 24px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.page-cta-band h2 { font-family: var(--font-display); font-size: 32px; color: #fff; }
.page-cta-band .btn-outline { border-color: #444; color: #fff; }

/* Demo standalone centered single box, not a two-column split */
.demo-standalone { max-width: 420px; margin: 0 auto; padding: 0 24px 100px; }
.demo-standalone .demo-timer-box { background: var(--text); border-radius: 20px; padding: 40px 32px; text-align: center; }
.demo-standalone .timer-label { color: #666; }
.demo-standalone .timer-display { color: #fff; }
.demo-standalone #demoBtn { margin-top: 12px; width: 100%; }

/* Console standalone */
.console-standalone { max-width: 1100px; margin: 0 auto; padding: 40px 24px 100px; }
.console-standalone .console-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.console-standalone h1 { font-family: var(--font-display); font-size: 36px; font-weight: 700; margin: 4px 0 0; }

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

/* Footer animated, bolder badges */
.footer-copyright { font-size: 11px; color: #999; margin-top: 2px; }
.footer-powered-label { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); margin-bottom: 6px; display: block; }
.footer-badge-row { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  padding: 6px 12px; border-radius: 999px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  cursor: default;
}
.footer-badge:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  background: var(--accent-bg);
  box-shadow: 0 6px 16px rgba(0,210,138,0.15);
}
.footer-badge img { width: 14px; height: 14px; object-fit: contain; }
.footer-links a {
  position: relative;
  transition: color 0.2s ease;
}
.footer-links a::after {
  content: ""; position: absolute; left: 0; bottom: -3px; width: 0; height: 1px;
  background: var(--accent-text); transition: width 0.2s ease;
}
.footer-links a:hover::after { width: 100%; }
.template-icon svg { width: 28px; height: 28px; }

/* ===== Nav consistent everywhere, real transitions ===== */
.nav-links a {
  position: relative;
  padding: 4px 0;
  transition: color 0.2s ease;
}
.nav-links a::after {
  content: "";
  position: absolute; left: 0; bottom: -4px; width: 0; height: 2px;
  background: var(--accent); border-radius: 2px;
  transition: width 0.25s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--text); font-weight: 600; }

.wallet-pill { transition: color 0.2s ease; }

#walletBtn {
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
#walletBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}
#walletBtn.connected:hover {
  box-shadow: 0 6px 16px rgba(0,210,138,0.25);
}

.nav {
  transition: box-shadow 0.2s ease;
}

/* home-main needs no extra top padding since hero already has its own */
.home-main { display: block; }

/* ===== Demo page on-brand light card with green depth, not a black box ===== */
.demo-standalone { max-width: 480px; margin: 0 auto; padding: 40px 24px 120px; }
.demo-standalone .demo-timer-box {
  position: relative;
  background: linear-gradient(160deg, #FFFFFF 0%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 48px 32px;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.6);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.demo-standalone .demo-timer-box:hover { transform: translateY(-3px); box-shadow: 0 28px 60px -18px rgba(0,0,0,0.15); }
.demo-standalone .demo-timer-box::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(0,210,138,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(0,210,138,0.05) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(circle at 50% 20%, black 0%, transparent 70%);
}
.demo-standalone .demo-timer-box::after {
  content: ""; position: absolute; top: -80px; left: 50%; transform: translateX(-50%);
  width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,210,138,0.18) 0%, transparent 70%);
  filter: blur(8px); pointer-events: none;
}
.demo-standalone .timer-label,.demo-standalone .timer-unit,.demo-standalone .timer-status,
.demo-standalone .timer-display,.demo-standalone #demoBtn,.demo-standalone #demoStopBtn,
.demo-standalone .checkin-row,.demo-standalone .demo-tx { position: relative; z-index: 2; }
.demo-standalone .timer-label { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.1em; }
.demo-standalone .timer-display { font-family: var(--font-display); font-size: 96px; font-weight: 700; color: var(--text); line-height: 1; margin: 4px 0; transition: color 0.3s ease; }
.demo-standalone .timer-unit { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); margin-bottom: 14px; }
.demo-standalone .timer-status { font-family: var(--font-mono); font-size: 13px; color: var(--text-dim); margin-bottom: 18px; min-height: 18px; }
.demo-standalone #demoBtn, .demo-standalone #demoStopBtn { width: 100%; margin-top: 8px; }
.demo-standalone #demoStopBtn { margin-top: 10px; }
.demo-standalone .checkin-row { margin-top: 12px; }
.demo-standalone .demo-tx { margin-top: 18px; font-family: var(--font-mono); font-size: 12px; padding: 10px 14px; border-radius: 12px; }
.demo-tx-success { background: var(--accent-bg); border: 1px solid var(--accent-border); color: var(--accent-text); }
.demo-tx-success a { color: var(--accent-text); font-weight: 600; }
.demo-tx-error { background: #FFF3F2; border: 1px solid #F5C2BE; color: #B3261E; text-align: left; }

@media (max-width: 700px) { .demo-standalone .timer-display { font-size: 72px; } .demo-standalone .demo-timer-box { padding: 36px 24px; } }
.footer-badge-primary { font-weight: 700; }
.footer-secondary-note { font-family: var(--font-mono); font-size: 10px; color: #999; margin-top: 6px; display: block; }

/* Demo mode toggle */
.demo-toggle-wrap { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.demo-toggle-label { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
.demo-toggle-wrap input { display: none; }
.demo-toggle-slider {
  width: 34px; height: 18px; background: var(--border); border-radius: 999px; position: relative;
  transition: background 0.2s ease;
}
.demo-toggle-slider::before {
  content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px;
  background: #fff; border-radius: 50%; transition: transform 0.2s ease; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.demo-toggle-wrap input:checked + .demo-toggle-slider { background: var(--accent); }
.demo-toggle-wrap input:checked + .demo-toggle-slider::before { transform: translateX(16px); }
.config-review { text-align: left; font-family: var(--font-mono); font-size: 12px; }
.config-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border-light); gap: 12px; }
.config-row label { color: #999; text-transform: uppercase; font-size: 10px; letter-spacing: 0.06em; flex-shrink: 0; }
.config-row input { flex: 1; background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; font-family: var(--font-mono); font-size: 11px; }
.config-row-warn input { border-color: #E8B23A; }
.config-warning { background: #FFF8E6; border: 1px solid #F5D98B; color: #92620A; border-radius: 8px; padding: 8px 10px; margin-top: 10px; font-size: 11px; line-height: 1.5; }
.gas-estimate { font-family: var(--font-mono); font-size: 11px; border-radius: 8px; padding: 8px 12px; margin-top: 10px; }
.gas-estimate-loading { background: var(--surface-2); color: var(--text-dim); }
.gas-estimate-ready { background: var(--accent-bg); border: 1px solid var(--accent-border); color: var(--accent-text); }
.gas-estimate-error { background: #FFF3F2; border: 1px solid #F5C2BE; color: #B3261E; }

/* How it Works extras */
.how-example { background: var(--surface-2); border: 1px solid var(--border-light); border-radius: 8px; padding: 10px 14px; margin: 12px 0; display: flex; flex-direction: column; gap: 4px; }
.how-example-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); font-family: var(--font-mono); }
.how-example-text { font-size: 13px; color: var(--text); font-family: var(--font-mono); }
.how-tips { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 8px; }
.how-tips li { font-size: 13px; color: var(--text-dim); line-height: 1.5; }
.how-tips strong { color: var(--text); }
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 860px; margin: 0 auto; }
.faq-item { background: var(--surface-2); border: 1px solid var(--border-light); border-radius: 12px; padding: 20px; }
.faq-item h4 { font-size: 14px; font-weight: 600; margin: 0 0 8px; color: var(--text); }
.faq-item p { font-size: 13px; color: var(--text-dim); margin: 0; line-height: 1.6; }
.roadmap-section { background: var(--surface-2); border: 1px solid var(--border-light); border-radius: 12px; padding: 20px; margin-top: 16px; }
.roadmap-section h3 { font-size: 16px; font-weight: 600; margin: 0 0 12px; color: var(--text); }
.roadmap-section ul { margin: 0; padding-left: 20px; }
.roadmap-section li { font-size: 13px; color: var(--text-dim); line-height: 1.8; }
.roadmap-section li strong { color: var(--text); }
.page-section { max-width: 1100px; margin: 0 auto; padding: 48px 24px; }
@media (max-width: 700px) {
  .faq-grid { grid-template-columns: 1fr; }
  .pipeline-standalone { padding: 24px 16px; gap: 24px; }
  .pipeline-step-lg { padding: 20px; }
}

/* Prevent orphaned last words */
p, .page-sub, .sub, .faq-item p, .pipeline-step-lg p, .how-tips li {
  text-wrap: pretty;
}

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all 0.2s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu { display: none; flex-direction: column; background: var(--surface); border-top: 1px solid var(--border-light); padding: 16px 20px 20px; gap: 4px; }
.mobile-menu.open { display: flex; }
.mobile-menu a { font-size: 15px; font-weight: 500; color: var(--text); padding: 10px 0; border-bottom: 1px solid var(--border-light); text-decoration: none; }
.mobile-menu a:last-of-type { border-bottom: none; }
.mobile-menu-divider { height: 1px; background: var(--border-light); margin: 8px 0; }
.mobile-menu-wallet { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; }

/* Footer redesign */
.footer { border-top: 1px solid var(--border-light); padding: 48px 24px 24px; max-width: 1100px; margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand-col { display: flex; flex-direction: column; gap: 6px; }
.footer-brand { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--text); }
.footer-tagline { font-size: 13px; color: var(--text-dim); line-height: 1.5; max-width: 240px; }
.footer-links-col { display: flex; flex-direction: column; gap: 10px; }
.footer-links-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); font-weight: 600; margin-bottom: 4px; }
.footer-links-col a { font-size: 13px; color: var(--text-dim); text-decoration: none; transition: color 0.15s; }
.footer-links-col a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; border-top: 1px solid var(--border-light); font-size: 12px; color: var(--text-dim); flex-wrap: wrap; gap: 8px; }

@media (max-width: 700px) {
  .hamburger { display: flex; }
  .nav-links { display: none; }
  .nav-right { display: none; }
  .footer-top { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 4px; }
  .footer { padding: 32px 16px 20px; }
}

/* Editable amount + token select in compiler review card */
.amount-edit-wrap { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.amount-edit-wrap select, .amount-edit-wrap button, .amount-edit-wrap input { flex-shrink: 0; white-space: nowrap; }
.amount-edit-wrap input[type="number"] { width: 90px; padding: 6px 10px; border: 1px solid var(--border-light); border-radius: 6px; font-size: 14px; font-family: var(--font-mono); }
.amount-edit-wrap select { padding: 6px 8px; border: 1px solid var(--border-light); border-radius: 6px; font-size: 13px; background: var(--surface); }
#balanceRow { align-items: center; }
#balanceValue { font-family: var(--font-mono); font-weight: 600; color: var(--accent); }

/* New Compile button + agent card delete/balance */
.compiler-btn-row { display: flex; gap: 8px; }
.compiler-btn-row .btn-block { flex: 1; }
.agent-balance { font-size: 12px; color: var(--text-dim); font-family: var(--font-mono); margin: 4px 0; }
.btn-danger { color: var(--danger, #d9534f); border-color: var(--danger, #d9534f); }
.btn-danger:hover { background: var(--danger, #d9534f); color: #fff; }

/* Check-in feedback on agent cards */
.agent-last-checkin { font-size: 11px; color: var(--text-dim); margin: 2px 0 8px; transition: color 0.2s; }
.agent-last-checkin.checkin-flash { color: var(--accent, #00D28A); font-weight: 600; }

/* ── Templates Strip ── */
.templates-strip {
  max-width: 900px;
  margin: 0 auto 2rem;
  padding: 0 1.5rem;
}
.templates-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted, #888);
  margin-bottom: 0.75rem;
}
.templates-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.tpl-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border, #2a2a2a);
  border-radius: 10px;
  background: var(--surface, #111);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: left;
  min-width: 140px;
  flex: 1;
}
.tpl-card:hover {
  border-color: var(--green, #22c55e);
  background: var(--surface-hover, #1a1a1a);
}
.tpl-icon { font-size: 1.25rem; }
.tpl-name { font-size: 0.85rem; font-weight: 600; color: var(--text, #fff); }
.tpl-desc { font-size: 0.72rem; color: var(--text-muted, #888); line-height: 1.3; }
