:root {
  --bg: #020817;
  --surface: #050b16;
  --surface-soft: #050816;
  --surface-card: #020817;

  --border-soft: rgba(31, 41, 55, 0.85);
  --border-strong: rgba(148, 163, 184, 0.7);

  --accent-teal: #00f5a0;  /* teal/green similar to modern DeFi */
  --accent-teal-soft: rgba(0, 245, 160, 0.12);
  --accent-blue: #38bdf8;

  --text-main: #e5e7eb;
  --text-muted: #9ca3af;

  --radius-pill: 999px;
  --radius-lg: 18px;
  --radius-md: 14px;

  --shadow-soft: 0 20px 60px rgba(15, 23, 42, 0.85);
}

/* Reset */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-main);
  background: radial-gradient(circle at top, #020617 0, #020617 40%, #000 100%);
}

/* Layout */

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 16px 32px;
}

/* Top nav */

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  background: rgba(10, 14, 24, 0.96);
  border: 1px solid rgba(31, 41, 55, 0.9);
  backdrop-filter: blur(16px);
  box-shadow: 0 15px 45px rgba(15, 23, 42, 0.85);
  position: sticky;
  top: 10px;
  z-index: 20;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 17px;
  color: #ecfdf5;
  background: radial-gradient(circle at 30% 20%, #22c55e, #0ea5e9);
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.5);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.brand {
  font-size: 14px;
  font-weight: 600;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-link {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.nav-link:hover {
  color: var(--text-main);
  border-color: rgba(148, 163, 184, 0.5);
}

.nav-link-active {
  background: var(--accent-teal-soft);
  border-color: rgba(34, 197, 94, 0.7);
  color: #e0f2fe;
}

.nav-right {
  display: flex;
  align-items: center;   /* <— add this */
  gap: 8px;
}

/* center the email text inside its box */
.nav-email {
   font-size: 0px;        /* smaller font */
  font-weight: 400;
  display: flex;
  align-items: center;
  line-height: 1;        /* remove extra vertical slack */
}

/* Buttons */

.btn {
  border-radius: var(--radius-pill);
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1;        /* <— add this if not present */
}

.btn-primary {
  background: linear-gradient(135deg, #00f5a0, #00d4ff);
  color: #020617;
  border-color: rgba(148, 163, 184, 0.7);
  box-shadow: 0 14px 40px rgba(16, 185, 129, 0.4);
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border-color: rgba(148, 163, 184, 0.5);
}

.btn-outline:hover {
  border-color: var(--accent-teal);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: rgba(148, 163, 184, 0.4);
}

.btn-ghost:hover {
  color: var(--text-main);
  border-color: rgba(148, 163, 184, 0.8);
}

/* Hero */

.hero {
  margin-top: 28px;
  margin-bottom: 26px;
}






.hero-main {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.05fr);
  gap: 26px;
  align-items: center;
}

.hero-copy h1 {
  margin: 10px 0 10px;
  font-size: clamp(30px, 3.6vw, 38px);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.hero-copy p {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 14px;
  max-width: 520px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 6px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(55, 65, 81, 0.8);
  background: rgba(6, 11, 23, 0.9);
  font-size: 11px;
  color: var(--text-muted);
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-pill);
  background: radial-gradient(circle at 30% 30%, #22c55e, #16a34a);
}

.hero-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.metric-card {
  min-width: 140px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(10, 16, 32, 0.98);
  border: 1px solid rgba(31, 41, 55, 0.9);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.9);
}

.metric-label {
  font-size: 11px;
  color: var(--text-muted);
}

.metric-value {
  margin-top: 3px;
  font-size: 14px;
  font-weight: 600;
}

/* Hero panel */

.hero-panel {
  display: flex;
  justify-content: flex-end;
}

.hero-panel-inner {
  width: 100%;
  max-width: 380px;
  padding: 14px 14px 12px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(0, 245, 160, 0.08), rgba(56, 189, 248, 0.08));
  border: 1px solid rgba(31, 41, 55, 0.95);
  box-shadow: var(--shadow-soft);
}

.hero-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.hero-panel-title {
  font-size: 13px;
  font-weight: 500;
  color: #e0f2fe;
}

.hero-panel-sub {
  margin: 0 0 10px;
  font-size: 11px;
  color: var(--text-muted);
}

.hero-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.hero-stat {
  padding: 7px 8px;
  border-radius: 10px;
  background: rgba(8, 13, 23, 0.98);
  border: 1px solid rgba(31, 41, 55, 0.9);
}

.hero-stat-label {
  font-size: 11px;
  color: var(--text-muted);
}

.hero-stat-value {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  font-weight: 500;
}

/* Small chart */

.hero-mini-chart {
  padding: 8px 9px 9px;
  border-radius: 10px;
  background: rgba(8, 13, 23, 0.98);
  border: 1px solid rgba(31, 41, 55, 0.9);
}

.hero-mini-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.mini-title {
  font-size: 11px;
}

.mini-percent {
  font-size: 11px;
  color: #4ade80;
}

.hero-mini-bars {
  display: flex;
  gap: 5px;
  align-items: flex-end;
  height: 58px;
}

.hero-mini-bars span {
  flex: 1;
  border-radius: var(--radius-pill);
  background: linear-gradient(180deg, var(--accent-teal), rgba(15, 23, 42, 0.1));
}

/* Pills */

.pill {
  border-radius: var(--radius-pill);
  padding: 3px 8px;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.pill-live {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.8);
  color: #bbf7d0;
}

/* App shell */

.app-shell {
  padding: 16px 14px 16px;
  border-radius: 20px;
  background: rgba(6, 11, 23, 0.98);
  border: 1px solid rgba(31, 41, 55, 0.95);
  box-shadow: var(--shadow-soft);
}

.shell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.shell-caption {
  font-size: 11px;
  color: var(--text-muted);
}

/* Tabs */

.tab-bar {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: rgba(3, 7, 18, 0.96);
  border: 1px solid rgba(31, 41, 55, 0.95);
}

.tab-button {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.tab-active {
  background: var(--accent-teal-soft);
  color: #e0f2fe;
  border-color: rgba(34, 197, 94, 0.8);
}

.tab-panel {
  margin-top: 4px;
}

.tab-hidden {
  display: none;
}

/* Panels */

.panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1.05fr);
  gap: 16px;
}

.panel {
  border-radius: 16px;
  padding: 14px;
  background: rgba(6, 11, 23, 0.98);
  border: 1px solid rgba(31, 41, 55, 0.95);
}

.panel-header h2,
.panel-header h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
}

.panel-header p {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--text-muted);
}

/* Forms */

.prompt-form {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-label {
  font-size: 11px;
  color: var(--text-muted);
}

textarea,
input,
select {
  border-radius: 10px;
  border: 1px solid rgba(31, 41, 55, 0.95);
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
  background: rgba(3, 7, 18, 0.98);
  color: var(--text-main);
  outline: none;
}

textarea:focus,
input:focus,
select:focus {
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.4);
}

textarea {
  resize: vertical;
}

.form-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.form-row .field {
  flex: 1 1 0;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-status {
  font-size: 11px;
  color: var(--text-muted);
}

/* Chat history */

.chat-history {
  margin-bottom: 10px;
  max-height: 230px;
  overflow-y: auto;
  border-radius: 12px;
  padding: 8px;
  background: rgba(3, 7, 18, 0.98);
  border: 1px solid rgba(31, 41, 55, 0.95);
  font-size: 12px;
}

.chat-message {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px;
  border-radius: 9px;
  margin-bottom: 6px;
}

.chat-message.user {
  background: rgba(0, 245, 160, 0.08);
  align-self: flex-end;
}

.chat-message.agent {
  background: rgba(6, 11, 23, 0.98);
}

.chat-role {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.chat-content {
  font-size: 12px;
}

/* Output */

.output-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.output-text {
  max-height: 250px;
  overflow: auto;
}

.code-block {
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: #020617;
  border: 1px solid rgba(15, 23, 42, 0.99);
  font-size: 11px;
  color: var(--text-main);
  white-space: pre-wrap;
  word-wrap: break-word;
}

.output-chart {
  padding: 8px;
  border-radius: 10px;
  background: rgba(3, 7, 18, 0.98);
  border: 1px solid rgba(31, 41, 55, 0.95);
  height: 220px;
}

/* Download section: label on top, then dropdown + button centered, then hint text */
.output-download {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.download-row {
  display: flex;
  align-items: center;   /* centers button with dropdown */
  gap: 10px;
}

.download-hint {
  font-size: 11px;
  color: var(--text-muted);
}




/* Footer */

.site-footer {
  margin-top: 20px;
  padding-top: 10px;
  border-top: 1px solid rgba(31, 41, 55, 0.9);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.footer-sub {
  font-size: 10px;
}

/* Responsive */

@media (max-width: 960px) {
  .top-nav {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .hero-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-panel {
    justify-content: flex-start;
  }

  .panel-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .top-nav {
    padding: 8px 10px;
  }

  .hero-copy h1 {
    font-size: 26px;
  }

  .shell-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}
