
:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --ink: #111111;
  --muted: #5c5c56;
  --line: #111111;
  --accent: #ffd23f;
  --accent-soft: #fff3c4;
  --radius: 10px;
  --shadow: 2px 2px 0px #000000;
  --shadow-lg: 4px 4px 0px #000000;
  --font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg);
}
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track {
  background: var(--bg);
  border-left: 1px solid var(--line);
}
::-webkit-scrollbar-thumb {
  background: var(--accent);
  border: 2px solid var(--line);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: #ffdd66; }
::-webkit-scrollbar-thumb:active { background: var(--accent-soft); }
::-webkit-scrollbar-corner { background: var(--bg); }

.container { width: min(1120px, 92%); margin: 0 auto; }

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.navbar-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
}
.brand-badge {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--accent);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 8px;
  font-size: 0.9rem;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.nav-links a {
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all .15s ease;
}
.nav-links a:hover,
.nav-links a.active {
  border-color: var(--line);
  box-shadow: var(--shadow);
  background: var(--surface);
}
.nav-links a.active { background: var(--accent-soft); }

.nav-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 1rem;
}
.nav-toggle i { transition: transform .25s ease; }
.nav-toggle.is-open i { transform: rotate(90deg); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform .1s ease, box-shadow .1s ease, background .15s ease;
}
.btn:hover { background: var(--accent-soft); }
.btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 #000; }
.btn-primary { background: var(--accent); }
.btn-primary:hover { background: #ffdd66; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #333; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }

.hero { padding: 80px 0 60px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 22px;
}
.eyebrow i { color: var(--ink); }
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -1.5px;
  margin-bottom: 18px;
}
.hero h1 .hl {
  background: var(--accent);
  padding: 0 8px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 8px;
  display: inline-block;
  transform: rotate(-1deg);
}
.hero p.lead {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 30px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.service-teaser {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: center;
}
.service-teaser h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  letter-spacing: -1px;
  margin-bottom: 12px;
}
.service-teaser p { color: var(--muted); margin-bottom: 24px; }
.teaser-list { display: grid; gap: 10px; }
.teaser-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.teaser-item:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lg);
  background: var(--accent-soft);
}
.teaser-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  flex: 0 0 auto;
}
.teaser-name { flex: 1; font-weight: 600; }
.teaser-arrow { color: var(--muted); flex: 0 0 auto; }

.section { padding: 70px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  letter-spacing: -1px;
  margin-bottom: 10px;
}
.section-head p { color: var(--muted); }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-lg); }
.card-img {
  position: relative;
  aspect-ratio: 16 / 9;
  border-bottom: 1px solid var(--line);
  background: var(--accent-soft);
  overflow: hidden;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .25s ease;
}
.card:hover .card-img img { transform: scale(1.04); }
.card-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.card-tag {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 4px 12px;
  background: var(--accent);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.card-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--accent);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  font-size: 1rem;
  flex: 0 0 auto;
}
.card-body { padding: 22px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.card-body h3 {
  font-size: 1.12rem;
  letter-spacing: -0.3px;
  line-height: 1.35;
  min-height: 2.7em;
  overflow-wrap: anywhere;
}
.card-body p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
  min-height: 5em;
  overflow-wrap: anywhere;
}
.card-price {
  display: flex;
  align-items: baseline;
  margin-top: auto;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.card-price strong { font-size: 1.15rem; white-space: nowrap; }
.card-price span { color: var(--muted); font-size: 0.8rem; }
.card-actions { display: flex; gap: 10px; }
.card-actions .btn { flex: 1; justify-content: center; }

.card-features { display: flex; flex-direction: column; gap: 8px; }
.card-features li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 11px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink);
}
.card-features li > i {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: grid;
  place-items: center;
  margin-top: 1px;
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  font-size: 0.62rem;
}
.card-features li > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.market-list { display: grid; gap: 14px; }
.market-row {
  display: grid;
  grid-template-columns: 30px 92px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.market-row:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--ink);
}
.market-number { font-weight: 800; color: var(--muted); font-size: 0.9rem; }
.market-thumb {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--accent-soft);
}
.market-thumb img { width: 100%; height: 100%; object-fit: cover; }
.market-thumb i { font-size: 1.6rem; }
.market-info { min-width: 0; }
.market-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.market-name { font-size: 1.05rem; letter-spacing: -0.3px; line-height: 1.35; }
.market-tag {
  padding: 3px 10px;
  background: var(--accent);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.market-desc {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.market-features { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.market-chip {
  max-width: 230px;
  padding: 3px 9px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.market-buy { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.market-price { font-weight: 800; font-size: 1.05rem; white-space: nowrap; }
.market-buy .btn { white-space: nowrap; }
.market-empty {
  padding: 50px 20px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 14px;
}
.market-empty i { display: block; font-size: 2rem; margin-bottom: 12px; }
.market-empty h3 { margin-bottom: 6px; }
.market-empty p { color: var(--muted); }

.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;
}
.market-skeleton {
  display: grid;
  grid-template-columns: 30px 92px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  pointer-events: none;
}
.market-skeleton .sk {
  display: block;
  background: linear-gradient(90deg, #ecece6 25%, #f7f7f2 50%, #ecece6 75%);
  background-size: 200% 100%;
  animation: market-shimmer 1.4s ease-in-out infinite;
}
@keyframes market-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.market-skeleton .sk-number { width: 24px; height: 14px; border-radius: 999px; }
.market-skeleton .sk-thumb { width: 92px; height: 92px; border-radius: 10px; }
.market-skeleton .sk-info { display: flex; flex-direction: column; gap: 10px; }
.market-skeleton .sk-line { height: 12px; border-radius: 999px; }
.market-skeleton .sk-title { width: 45%; height: 18px; }
.market-skeleton .sk-desc { width: 90%; }
.market-skeleton .sk-short { width: 65%; }
.market-skeleton .sk-buy { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.market-skeleton .sk-price { width: 90px; height: 16px; border-radius: 999px; }
.market-skeleton .sk-button { width: 120px; height: 36px; border-radius: var(--radius); }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
}
.step-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 26px;
}
.step-card .step-num {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: var(--accent);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 16px;
}
.step-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.step-card p { color: var(--muted); font-size: 0.9rem; }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: center;
}
.about-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 30px;
}
.about-card h3 { margin-bottom: 12px; letter-spacing: -0.3px; }
.about-card p { color: var(--muted); margin-bottom: 12px; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 26px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 18px;
  text-align: center;
}
.stat b { display: block; font-size: 1.6rem; letter-spacing: -1px; }
.stat span { color: var(--muted); font-size: 0.82rem; }

.cta-band {
  background: var(--accent);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 50px 0;
  flex-wrap: wrap;
}
.cta-inner h2 { font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -1px; }
.cta-inner p { color: #4a4a42; margin-top: 4px; }

.footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 44px 0 26px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 36px;
  margin-bottom: 30px;
}
.footer h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
}
.footer p { color: var(--muted); font-size: 0.9rem; }
.footer ul { display: flex; flex-direction: column; gap: 8px; }
.footer ul a { color: var(--muted); font-size: 0.9rem; transition: color .15s ease; }
.footer ul a:hover { color: var(--ink); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.82rem;
}

.err-page {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 60px 0;
}
.err-code {
  font-size: clamp(5rem, 18vw, 9rem);
  font-weight: 900;
  letter-spacing: -4px;
  line-height: 1;
  color: var(--ink);
  text-shadow: 4px 4px 0 var(--accent);
  margin-bottom: 10px;
}
.err-page h1 { font-size: 1.5rem; margin-bottom: 10px; }
.err-page p { color: var(--muted); margin-bottom: 28px; }

.chat-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 180;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 3px solid #000;
  border-radius: 50%;
  background: var(--accent);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  font-size: 1.25rem;
  transition: transform .15s ease, box-shadow .15s ease;
}
.chat-fab:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #000; }
.chat-fab:focus-visible,
.chat-close:focus-visible,
.chat-send:focus-visible,
.chat-input:focus-visible,
.chat-chip:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.chat-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 20px;
  background: rgba(17, 17, 17, .38);
  backdrop-filter: blur(2px);
  animation: chat-fade .18s ease;
}
.chat-overlay[hidden] { display: none; }
.chat-panel {
  width: min(430px, 100%);
  height: min(650px, calc(100vh - 40px));
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 3px solid #000;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(17, 17, 17, .18), var(--shadow-lg);
  overflow: hidden;
  animation: chat-rise .24s ease;
}
@keyframes chat-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes chat-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 11px;
  background: var(--surface);
  box-shadow: 0 4px 14px rgba(17, 17, 17, .1);
}
.chat-heading { flex: 1; min-width: 0; }
.chat-title { font-weight: 800; letter-spacing: -.3px; }
.chat-subtitle { font-size: .75rem; color: var(--muted); }
.chat-close {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
.chat-close:hover { background: var(--accent-soft); }
.chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg);
}
.chat-row { display: flex; gap: 8px; align-items: flex-end; max-width: 100%; }
.chat-row.is-assistant { align-items: flex-start; }
.chat-avatar {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  font-size: .72rem;
  font-weight: 800;
}
.chat-bubble {
  max-width: calc(100% - 40px);
  padding: 10px 13px;
  border: 0;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 2px 10px rgba(17, 17, 17, .07);
  font-size: .9rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.chat-row.is-user { justify-content: flex-end; }
.chat-row.is-user .chat-bubble {
  max-width: 86%;
  background: var(--accent-soft);
  border-bottom-right-radius: 3px;
}
.chat-row.is-assistant .chat-bubble {
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}
.chat-row.is-user.is-new .chat-bubble { animation: chat-pop .22s ease both; }
@keyframes chat-pop {
  from { opacity: 0; transform: translateY(6px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.chat-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(5px);
  animation: chat-word-in .2s ease-out forwards;
  will-change: opacity, transform;
}
@keyframes chat-word-in {
  to { opacity: 1; transform: translateY(0); }
}

.chat-word--math {
  display: inline;
  transform: none;
  animation-name: chat-word-fade;
}
@keyframes chat-word-fade { to { opacity: 1; } }
.chat-md > :first-child { margin-top: 0; }
.chat-md > :last-child { margin-bottom: 0; }
.chat-md p { margin: 0 0 8px; }
.chat-md h1, .chat-md h2, .chat-md h3 { margin: 10px 0 6px; font-size: 1rem; line-height: 1.3; }
.chat-md ul, .chat-md ol { margin: 0 0 8px; padding-left: 22px; list-style: none; }
.chat-md li { position: relative; margin: 3px 0; }
.chat-md .chat-marker {
  position: absolute;
  left: -20px;
  top: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: inherit;
  white-space: nowrap;
}
.chat-md .chat-marker.is-number { left: -24px; font-variant-numeric: tabular-nums; }
.chat-md a { font-weight: 600; text-decoration: underline; }
.chat-md blockquote {
  margin: 8px 0;
  padding: 4px 10px;
  border-left: 3px solid var(--accent);
  background: var(--bg);
  color: var(--muted);
}
.chat-md code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--accent-soft);
  font-family: Consolas, Monaco, monospace;
  font-size: .85em;
}
.chat-md pre {
  margin: 8px 0;
  padding: 12px;
  overflow-x: auto;
  border: 0;
  border-radius: 8px;
  background: #111;
  color: #f8f8f2;
}
.chat-md pre code { padding: 0; background: none; color: inherit; font-size: .82rem; }
.chat-md .hljs-keyword,
.chat-md .hljs-selector-tag,
.chat-md .hljs-literal,
.chat-md .hljs-type { color: #ff79c6; }
.chat-md .hljs-string,
.chat-md .hljs-attr { color: #a5d6a7; }
.chat-md .hljs-number,
.chat-md .hljs-built_in { color: #ffd23f; }
.chat-md .hljs-comment { color: #9aa0a6; font-style: italic; }
.chat-md .hljs-title,
.chat-md .hljs-function { color: #8be9fd; }
.chat-md code.hljs { display: block; }
.chat-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  margin: 8px 0;
  -webkit-overflow-scrolling: touch;
}
.chat-md table { width: max-content; min-width: 100%; margin: 0; border-collapse: collapse; font-size: .82rem; }
.chat-md th, .chat-md td {
  padding: 6px 8px;
  border: 0;
  border-bottom: 1px solid rgba(17, 17, 17, .1);
  text-align: left;
  white-space: nowrap;
}
.chat-md th { background: var(--accent-soft); font-weight: 700; }
.chat-md tr:last-child td { border-bottom: 0; }
.chat-md img { max-width: 100%; border: 0; border-radius: 8px; }
.chat-md .katex-display { margin: 10px 0; overflow-x: auto; overflow-y: hidden; }
.chat-typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.chat-typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: chat-bounce 1s infinite ease-in-out;
}
.chat-typing i:nth-child(2) { animation-delay: .15s; }
.chat-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes chat-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .45; }
  30% { transform: translateY(-4px); opacity: 1; }
}
.chat-suggestions {
  align-self: center;
  width: min(280px, 100%);
  margin: auto 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 6px 18px rgba(17, 17, 17, .08);
  transition: opacity .18s ease, transform .18s ease;
}
.chat-suggestions.is-changing { opacity: 0; transform: translateY(4px); }
.chat-chip {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 0;
  border-radius: 9px;
  background: #f1efe6;
  color: var(--muted);
  font-size: .8rem;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.chat-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
}
.chat-chip:hover { background: var(--accent); color: var(--ink); transform: translateX(2px); }
.chat-composer {
  display: flex;
  gap: 8px;
  padding: 12px 14px 8px;
  background: var(--surface);
  box-shadow: 0 -6px 18px rgba(17, 17, 17, .05);
}
.chat-input {
  flex: 1;
  min-height: 42px;
  max-height: 120px;
  padding: 10px 12px;
  resize: none;
  border: 0;
  border-radius: 10px;
  background: #f1efe6;
  font: inherit;
  font-size: .9rem;
  line-height: 1.4;
}
.chat-input::placeholder { color: #8b8a82; }
.chat-send {
  width: 44px;
  display: grid;
  place-items: center;
  border: 3px solid #000;
  border-radius: 10px;
  background: var(--accent);
  box-shadow: var(--shadow);
  cursor: pointer;
}
.chat-send:disabled { opacity: .5; cursor: not-allowed; }
.chat-note { padding: 0 14px 10px; background: var(--surface); color: var(--muted); font-size: .68rem; text-align: center; }

@media (max-width: 860px) {
  .hero-grid, .about-grid, .service-teaser { grid-template-columns: 1fr; }
  .hero-grid > * { min-width: 0; }
  .service-teaser { gap: 30px; }
  .hero { padding: 44px 0 36px; }
  .section { padding: 50px 0; }
  .section-head { margin-bottom: 30px; }
  .market-row { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; }
  .market-number { display: none; }
  .market-thumb { width: 72px; height: 72px; }
  .market-buy {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .market-skeleton { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; }
  .market-skeleton .sk-number { display: none; }
  .market-skeleton .sk-thumb { width: 72px; height: 72px; }
  .market-skeleton .sk-buy {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links {
    position: fixed;
    top: 63px;
    left: 0; right: 0;
    background: var(--surface);
    border-bottom: 0 solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    display: flex;
    overflow: hidden;
    max-height: 0;
    padding: 0 4%;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    pointer-events: none;
    transition:
      max-height .32s cubic-bezier(.4, 0, .2, 1),
      padding .32s cubic-bezier(.4, 0, .2, 1),
      border-bottom-width .32s ease,
      opacity .22s ease,
      transform .32s cubic-bezier(.4, 0, .2, 1),
      visibility .32s;
  }
  .nav-links.open {
    max-height: calc(100vh - 63px);
    padding: 16px 4%;
    border-bottom-width: 1px;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-links a {
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-8px);
    transition:
      opacity .25s ease,
      transform .25s ease,
      border-color .15s ease,
      box-shadow .15s ease,
      background .15s ease;
  }
  .nav-links.open a { opacity: 1; transform: translateY(0); }
  .nav-links.open a:nth-child(1) { transition-delay: .04s; }
  .nav-links.open a:nth-child(2) { transition-delay: .08s; }
  .nav-links.open a:nth-child(3) { transition-delay: .12s; }
  .nav-links.open a:nth-child(4) { transition-delay: .16s; }
  .nav-toggle { display: grid; place-items: center; margin-left: auto; }
  .brand { margin-right: auto; }
  .stats-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .hero h1 { font-size: clamp(1.85rem, 8vw, 2.5rem); letter-spacing: -1px; }
  .hero h1 .hl { transform: none; }
  .hero p.lead { font-size: 1rem; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .eyebrow { font-size: 0.72rem; padding: 5px 12px; margin-bottom: 16px; letter-spacing: 0.5px; }
  .teaser-item { padding: 12px; gap: 10px; }
  .market-row { padding: 12px; }
  .market-thumb { width: 60px; height: 60px; }
  .market-skeleton { padding: 12px; }
  .market-skeleton .sk-thumb { width: 60px; height: 60px; }
  .market-chip:nth-child(n + 3) { display: none; }
  .cta-inner { padding: 38px 0; }
  .cta-inner .btn { width: 100%; justify-content: center; }
  .err-page { padding: 40px 0; }
  .chat-overlay { padding: 0; }
  .chat-panel {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border: 3px solid #000;
    border-radius: 0;
  }
  .chat-fab { right: 16px; bottom: 16px; }
}

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

@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .cta-inner { justify-content: center; text-align: center; }
  .steps-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-links,
  .nav-links a,
  .nav-toggle i {
    transition: none !important;
  }
  .market-skeleton .sk { animation: none; }
  .chat-overlay, .chat-panel, .chat-typing i,
  .chat-row.is-user.is-new .chat-bubble, .chat-word { animation: none !important; }
  .chat-word { opacity: 1; transform: none; }
  .chat-fab, .chat-chip, .chat-suggestions { transition: none; }
}
