:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --border: #e4e4e7;
  --text: #18181b;
  --text-secondary: #52525b;
  --text-tertiary: #a1a1aa;
  --accent: #0f766e;
  --warn-border: #fde68a;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 250, 250, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

nav .inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 1.8rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 450;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.mobile-nav-menu {
  display: none;
  position: relative;
}

.mobile-nav-menu summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  line-height: 1;
  cursor: pointer;
  user-select: none;
  padding: 0;
}

.mobile-nav-menu summary::-webkit-details-marker {
  display: none;
}

.mobile-nav-menu[open] summary {
  color: var(--accent);
}

.mobile-nav-icon {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.22rem;
  width: 1rem;
}

.mobile-nav-icon span {
  display: block;
  width: 100%;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
}

.mobile-nav-panel {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  min-width: 11rem;
  padding: 0.55rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(24, 24, 27, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.mobile-nav-panel a {
  display: block;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}

.mobile-nav-panel a:hover {
  background: #f4f4f5;
  color: var(--accent);
  text-decoration: none;
}

.hero {
  max-width: 900px;
  margin: 0 auto;
  padding: 8rem 2rem 3rem;
  text-align: center;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1.2rem;
}

.hero .subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 1.35rem;
  line-height: 1.65;
}

.hero .updated {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.content {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
}

section {
  padding: 0 0 3rem;
}

.market-note {
  display: grid;
  gap: 1rem;
}

.theme-card,
.risk-card,
.insight-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.theme-card {
  padding: 1.4rem;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.08), transparent 36%),
    linear-gradient(180deg, #ffffff 0%, #f8fbfa 100%);
}

.risk-card {
  padding: 1.15rem 1.25rem;
  border-color: var(--warn-border);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.07), rgba(255, 255, 255, 0));
}

.market-note-kicker,
.insight-kicker {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.market-note-headline {
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 0.55rem;
}

.market-note-copy,
.risk-copy {
  font-size: 0.97rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.insight-card {
  padding: 1rem;
}

.insight-title {
  font-size: 1rem;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.insight-copy {
  font-size: 0.88rem;
  line-height: 1.58;
  color: var(--text-secondary);
  margin-bottom: 0.7rem;
}

.insight-evidence,
.insight-implication {
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.insight-evidence {
  margin-bottom: 0.45rem;
}

.insight-evidence strong,
.insight-implication strong,
.risk-copy strong {
  color: var(--text);
}

.chat-card {
  margin-top: 2.6rem;
  padding: 1.25rem;
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.08), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #f6fbfa 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 16px 30px rgba(24, 24, 27, 0.04);
}

.chat-header {
  margin-bottom: 0.75rem;
}

.chat-title {
  font-size: 1.12rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 650;
  color: var(--text);
}

.chat-form {
  display: grid;
  gap: 0.75rem;
}

.chat-form textarea,
.chat-actions button {
  font: inherit;
}

.chat-thread {
  display: grid;
  gap: 0.85rem;
  max-height: 28rem;
  overflow-y: auto;
  padding: 0.2rem 0.05rem 0.2rem 0;
  margin-bottom: 0.95rem;
}

.chat-thread:empty {
  display: none;
}

.chat-bubble {
  max-width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  white-space: pre-wrap;
}

.chat-bubble-assistant {
  background: rgba(15, 118, 110, 0.08);
  border: 1px solid rgba(15, 118, 110, 0.16);
}

.chat-bubble-user {
  margin-left: auto;
  background: rgba(15, 118, 110, 0.08);
  color: var(--text);
  border: 1px solid rgba(15, 118, 110, 0.16);
}

.chat-bubble-label {
  margin-bottom: 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.chat-bubble-copy {
  font-size: 0.95rem;
  line-height: 1.65;
}

.turnstile-shell {
  min-height: 0;
  margin-bottom: 0.3rem;
}

.chat-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 5.25rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  line-height: 1.55;
}

.chat-form textarea:focus {
  outline: 2px solid rgba(15, 118, 110, 0.18);
  outline-offset: 1px;
  border-color: rgba(15, 118, 110, 0.38);
}

.chat-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.chat-actions button {
  min-width: 5.4rem;
  min-height: 2.65rem;
  padding: 0.72rem 1.1rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #0f766e, #155e75);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.chat-actions button:disabled,
.chat-form textarea:disabled {
  cursor: not-allowed;
  opacity: 1;
}

.chat-form textarea:disabled {
  background: #f4f4f5;
  color: var(--text-tertiary);
  border-color: #e7e7ea;
}

.chat-actions button:disabled {
  background: #d4d4d8;
  color: #71717a;
  box-shadow: none;
}

footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 2.5rem;
}

footer .inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer-left {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-mobile-hide {
  display: inline-flex;
}

@media (max-width: 860px) {
  .insight-grid {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 600px) {
  footer .inner {
    flex-direction: column;
    gap: 1rem;
  }

  .footer-left {
    font-size: 0.76rem;
  }

  .footer-links {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .footer-mobile-hide {
    display: none;
  }

  .hero {
    padding: 8rem 1.5rem 4rem;
  }

  .content {
    padding: 0 1.5rem 3rem;
  }

  nav .inner {
    padding: 0 1.25rem;
  }

  .nav-links {
    display: none;
  }

  .mobile-nav-menu {
    display: flex;
    align-items: center;
  }

  .mobile-nav-menu summary {
    min-height: 1.2rem;
    transform: translateY(-1px);
  }

  .logo {
    font-size: 0.96rem;
  }

  .chat-card {
    margin-top: 2rem;
    padding: 1rem;
    border-radius: 15px;
  }

  .chat-thread {
    max-height: none;
  }

  .chat-actions {
    justify-content: stretch;
  }

  .chat-actions button {
    width: 100%;
  }

}
