:root {
  color-scheme: dark;
  --bg: #030303;
  --bg-2: #09090b;
  --panel: rgba(13, 13, 17, 0.72);
  --panel-strong: rgba(20, 20, 26, 0.94);
  --line: rgba(255, 255, 255, 0.04);
  --line-strong: rgba(255, 255, 255, 0.08);
  --text: #fafafa;
  --soft: #e4e4e7;
  --muted: #a1a1aa;
  --faint: #52525b;
  --violet: #8b5cf6;
  --pink: #d946ef;
  --indigo: #4f46e5;
  --cyan: #06b6d4;
  --emerald: #10b981;
  --amber: #f59e0b;
  --danger: #ef4444;
  --radius: 12px;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
  font-family: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

h1, h2, h3, h4, .brand strong, .symbol {
  font-family: "Outfit", "Inter", sans-serif;
}

code, pre, .mono, .hero-ledger span, .terminal-feed em, .hero-market-tape, .ticker-band span, .orderbook-panel span, .order-row span, .feed-row span {
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(139, 92, 246, 0.16), transparent 340px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.07), transparent 34%, rgba(236, 72, 153, 0.08)),
    var(--bg);
  color: var(--text);
  line-height: 1.55;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 78% 16%, rgba(139, 92, 246, 0.26), transparent 24%),
    radial-gradient(circle at 18% 58%, rgba(34, 211, 238, 0.12), transparent 28%),
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: auto, auto, 56px 56px, 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.92), transparent 78%);
}

body::after {
  content: "";
  position: fixed;
  inset: auto 0 0;
  height: 42vh;
  z-index: -2;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(9, 9, 11, 0.82));
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 100;
  transform: translateY(-140%);
  background: var(--text);
  color: var(--bg);
  padding: 8px 12px;
  border-radius: var(--radius);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(9, 9, 11, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--violet), var(--pink), var(--indigo));
  font-weight: 900;
  box-shadow: 0 16px 36px rgba(139, 92, 246, 0.28);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  letter-spacing: 0;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  color: var(--soft);
  padding: 8px 11px;
  border-radius: var(--radius);
  font-size: 14px;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.language-switcher {
  display: inline-flex;
  gap: 2px;
  margin-left: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.site-nav .language-switcher a {
  padding: 5px 8px;
  font-size: 12px;
}

.site-nav .language-switcher a.active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 104px clamp(18px, 5vw, 72px) 0;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.82), rgba(34, 211, 238, 0.7), transparent);
  opacity: 0.62;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 22%, rgba(139, 92, 246, 0.18), transparent 24%),
    radial-gradient(circle at 88% 58%, rgba(34, 211, 238, 0.1), transparent 22%),
    linear-gradient(120deg, rgba(236, 72, 153, 0.08), transparent 38%),
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
  background-size: auto, auto, auto, 42px 42px, 42px 42px;
}

.hero-backdrop::before,
.hero-backdrop::after {
  content: "";
  position: absolute;
}

.hero-backdrop::before {
  right: clamp(36px, 8vw, 120px);
  top: 18%;
  width: min(520px, 38vw);
  height: min(520px, 48vh);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    radial-gradient(circle at 28% 26%, rgba(139, 92, 246, 0.34), transparent 24%),
    radial-gradient(circle at 68% 62%, rgba(52, 211, 153, 0.2), transparent 20%),
    rgba(18, 18, 22, 0.4);
  background-size: 56px 56px, 56px 56px, auto, auto, auto;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 30px 90px rgba(0, 0, 0, 0.28);
  transform: skewY(-5deg);
}

.hero-backdrop::after {
  inset: 0;
  background:
    linear-gradient(90deg, rgba(9, 9, 11, 0.98) 0%, rgba(9, 9, 11, 0.88) 52%, rgba(9, 9, 11, 0.64) 100%),
    linear-gradient(0deg, #09090b 0%, rgba(9, 9, 11, 0.34) 46%, rgba(9, 9, 11, 0.94) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(360px, 0.76fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  max-width: 1360px;
  min-height: 72vh;
  margin: 0 auto;
  padding-bottom: 38px;
}

.eyebrow,
.kicker,
.plan-tag {
  color: var(--amber);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 880px;
  margin: 12px 0 20px;
  font-size: clamp(42px, 6.2vw, 76px);
  line-height: 1.02;
  letter-spacing: 0;
  word-break: keep-all;
  overflow-wrap: normal;
}

.hero h1 span {
  display: block;
  width: fit-content;
  background: linear-gradient(90deg, #a78bfa, #d946ef, #fcd34d, #6366f1);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-x 5s ease infinite;
}

.hero-copy p {
  max-width: 760px;
  color: var(--soft);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button,
.agent-actions button,
.agent-actions a,
.harness-card button,
.trade-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 9px 15px;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.button:active,
.agent-actions button:active,
.agent-actions a:active,
.harness-card button:active,
.trade-tabs button:active {
  transform: scale(0.97);
}

.button.primary {
  background: linear-gradient(90deg, var(--violet), var(--pink), var(--indigo));
  background-size: 220% auto;
  color: #fff;
  font-weight: 850;
  box-shadow: 0 18px 44px rgba(139, 92, 246, 0.28);
  animation: gradient-x 5s ease infinite;
}

.button.secondary,
.button.ghost {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.button.full {
  width: 100%;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 40px 0 0;
}

.hero-stats div {
  min-width: 156px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(9, 9, 11, 0.62);
  backdrop-filter: blur(12px);
}

.hero-stats dt {
  font-size: 25px;
  font-weight: 900;
}

.hero-stats dd {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.hero-ledger {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 760px;
  margin-top: 26px;
}

.hero-ledger div {
  position: relative;
  overflow: hidden;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(24, 24, 27, 0.52);
  backdrop-filter: blur(14px);
}

.hero-ledger div::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--violet), var(--pink), var(--cyan));
  opacity: 0.8;
}

.hero-ledger span,
.terminal-feed em {
  color: var(--faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  text-transform: uppercase;
}

.hero-ledger strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
}

.hero-ledger small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.exchange-terminal,
.orderbook-panel,
.flow-panel,
.harness-card,
.agent-card,
.request-form,
.request-output,
.settlement-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.exchange-terminal {
  position: relative;
  overflow: hidden;
  padding: 18px;
  background:
    radial-gradient(circle at 18% 0%, rgba(139, 92, 246, 0.28), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(34, 211, 238, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(139, 92, 246, 0.14), transparent 36%),
    rgba(18, 18, 22, 0.92);
}

.exchange-terminal::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 0 1px rgba(139, 92, 246, 0.08);
}

.terminal-head,
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.terminal-head span:last-child {
  color: var(--emerald);
  font-size: 12px;
  font-weight: 800;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 5px rgba(52, 211, 153, 0.12);
}

.quick-order {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.terminal-feed {
  display: grid;
  gap: 6px;
  margin: 14px 0 16px;
}

.feed-row {
  display: grid;
  grid-template-columns: 1fr auto 82px auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  color: var(--soft);
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
}

.feed-row:hover {
  border-color: rgba(34, 211, 238, 0.42);
  background: rgba(34, 211, 238, 0.08);
}

.feed-row span {
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 900;
  font-size: 12px;
}

.feed-row strong {
  color: var(--emerald);
  font-size: 12px;
}

.feed-row b {
  color: var(--emerald);
  font-size: 12px;
  text-align: right;
}

.trade-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.trade-tabs button {
  min-height: 36px;
  background: transparent;
  color: var(--muted);
}

.trade-tabs button.active {
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.92), rgba(236, 72, 153, 0.82));
  color: white;
}

.form-grid {
  display: grid;
  gap: 12px;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 7px;
  color: var(--soft);
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 12px 14px;
  outline: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23a1a1aa'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--violet);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.18), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.quote-box {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: var(--radius);
  background: rgba(34, 211, 238, 0.06);
}

.quote-row,
.quote-total {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 14px;
}

.quote-row strong {
  color: var(--soft);
}

.quote-total {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--text);
}

.quote-total strong {
  color: var(--emerald);
  font-size: 20px;
}

.fineprint {
  margin: -2px 0 0;
  color: var(--faint);
  font-size: 12px;
}

.ticker-band {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(24, 24, 27, 0.74);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.hero-market-tape {
  display: flex;
  gap: 34px;
  width: max-content;
  min-width: 100%;
  padding: 10px clamp(18px, 6vw, 72px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(90deg, rgba(9, 9, 11, 0.54), rgba(39, 39, 42, 0.38), rgba(9, 9, 11, 0.54));
  color: rgba(250, 250, 250, 0.58);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  animation: tape-slide 38s linear infinite;
}

.hero-market-tape span {
  position: relative;
}

.hero-market-tape span::after {
  content: "";
  position: absolute;
  right: -20px;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.76);
  transform: translateY(-50%);
}

.ticker-band > div {
  display: flex;
  width: max-content;
  gap: 28px;
  padding: 10px clamp(18px, 6vw, 72px);
  animation: ticker 32s linear infinite;
}

.ticker-band span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  white-space: nowrap;
}

.ticker-band strong {
  color: var(--text);
}

.ticker-band em {
  color: var(--soft);
  font-style: normal;
}

.ticker-band small {
  color: var(--emerald);
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes tape-slide {
  from { transform: translateX(0); }
  to { transform: translateX(-28%); }
}

@keyframes gradient-x {
  0% { background-position: 0% center; }
  50% { background-position: 100% center; }
  100% { background-position: 0% center; }
}

.showcase-strip {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(520px, 1.12fr);
  gap: 28px;
  align-items: center;
  padding: 72px clamp(18px, 6vw, 72px);
}

.showcase-copy h2 {
  max-width: 720px;
  margin: 8px 0 12px;
  font-size: clamp(30px, 4vw, 58px);
  line-height: 1.02;
}

.showcase-copy p:last-child {
  max-width: 640px;
  color: var(--muted);
  font-size: 17px;
}

.showcase-grid {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  grid-template-rows: repeat(2, minmax(180px, 1fr));
  gap: 14px;
}

.showcase-grid article {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 20% 10%, rgba(139, 92, 246, 0.2), transparent 28%),
    radial-gradient(circle at 88% 72%, rgba(34, 211, 238, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02)),
    rgba(24, 24, 27, 0.84);
  box-shadow: var(--shadow);
}

.showcase-grid article:first-child {
  grid-row: span 2;
}

.showcase-grid article::after {
  content: "";
  position: absolute;
  inset: auto 18px 18px auto;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.18), transparent 68%);
  pointer-events: none;
}

.map-card-head {
  position: relative;
  z-index: 1;
}

.showcase-grid span {
  display: block;
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  font-weight: 900;
}

.showcase-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 18px;
}

.showcase-grid dl {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  margin: 0;
}

.showcase-grid dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.showcase-grid dt {
  color: var(--emerald);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 900;
}

.showcase-grid dd {
  margin: 0;
  color: var(--soft);
}

.showcase-grid p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--soft);
  font-size: 18px;
}

.section {
  padding: 82px clamp(18px, 6vw, 72px);
}

.section-head {
  max-width: 820px;
  margin-bottom: 32px;
}

.section-head.split {
  max-width: none;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.section h2 {
  margin: 8px 0 12px;
  font-size: clamp(30px, 4vw, 56px);
  line-height: 1.05;
  letter-spacing: 0;
}

.section-head p {
  color: var(--muted);
  font-size: 17px;
}

.catalog-tools {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 180px;
  gap: 12px;
}

.search-box {
  position: relative;
}

.search-box span {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 13px;
}

.search-box input {
  padding-left: 54px;
}

.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--soft);
  padding: 8px 13px;
  cursor: pointer;
}

.chip.active,
.chip:hover {
  border-color: rgba(252, 211, 77, 0.65);
  color: var(--text);
  background: rgba(252, 211, 77, 0.1);
}

.agent-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.agent-card {
  position: relative;
  overflow: hidden;
  display: flex;
  min-height: 320px;
  flex-direction: column;
  padding: 18px;
}

.agent-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.92), rgba(236, 72, 153, 0.82), rgba(34, 211, 238, 0.72));
  opacity: 0.78;
}

.agent-card::after {
  content: "";
  position: absolute;
  right: -38px;
  top: -56px;
  width: 160px;
  height: 160px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.14), transparent 64%);
  pointer-events: none;
}

.agent-card > * {
  position: relative;
  z-index: 1;
}

.agent-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.symbol {
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.agent-badge,
.status-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--soft);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.agent-card h3 {
  margin: 16px 0 8px;
  font-size: 20px;
}

.agent-card p,
.harness-card p,
.flow-step p,
.settlement-panel p,
.request-output p {
  color: var(--muted);
}

.market-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: auto 0 14px;
}

.market-metrics div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.agent-card:hover {
  border-color: rgba(139, 92, 246, 0.42);
  transform: translateY(-2px);
  transition: transform 180ms ease, border-color 180ms ease;
}

.market-metrics span,
.settlement-metrics span,
.detail-grid span {
  display: block;
  color: var(--faint);
  font-size: 12px;
}

.market-metrics strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 13px;
}

.agent-meta {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
}

.agent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.agent-actions button,
.agent-actions a,
.harness-card button {
  min-height: 36px;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--soft);
  font-size: 13px;
}

.agent-actions button:first-child {
  border-color: rgba(52, 211, 153, 0.46);
  background: rgba(52, 211, 153, 0.12);
  color: var(--emerald);
}

.trade-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(380px, 1.15fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.orderbook-panel,
.flow-panel {
  padding: 18px;
}

.panel-title {
  margin-bottom: 14px;
}

.panel-title span {
  color: var(--amber);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.orderbook {
  display: grid;
  gap: 7px;
}

.order-row {
  display: grid;
  grid-template-columns: 36px 1fr 80px 110px;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  color: var(--soft);
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
}

.order-row:hover {
  border-color: rgba(34, 211, 238, 0.48);
  background: rgba(34, 211, 238, 0.08);
}

.order-row span {
  color: var(--faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.order-row strong {
  color: var(--text);
}

.order-row em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.order-row b {
  color: var(--emerald);
  text-align: right;
}

.flow-panel {
  display: grid;
  gap: 10px;
}

.flow-step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 4px 14px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.flow-step span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: rgba(139, 92, 246, 0.16);
  color: var(--violet);
  font-weight: 900;
}

.flow-step.active {
  border-color: rgba(139, 92, 246, 0.5);
  background: rgba(139, 92, 246, 0.1);
}

.flow-step strong,
.flow-step p {
  margin: 0;
}

.harness-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.harness-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  padding: 18px;
  min-height: 300px;
}

.harness-card h3 {
  margin: 14px 0 8px;
}

.harness-card dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.harness-card dt {
  color: var(--faint);
  font-size: 12px;
}

.harness-card dd {
  margin: 3px 0 0;
  color: var(--soft);
}

.settlement-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 28px;
  padding: clamp(22px, 4vw, 42px);
  background:
    linear-gradient(100deg, rgba(139, 92, 246, 0.18), rgba(34, 211, 238, 0.08)),
    var(--panel);
}

.settlement-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.settlement-metrics div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(9, 9, 11, 0.48);
}

.settlement-metrics strong {
  display: block;
  margin: 4px 0;
  font-size: 24px;
}

.settlement-metrics small {
  color: var(--muted);
}

.request-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.52fr);
  gap: 16px;
}

.request-form,
.request-output {
  padding: 18px;
}

.request-form {
  display: grid;
  gap: 14px;
}

.request-output h3 {
  margin-top: 0;
}

.request-output a {
  color: var(--cyan);
}

.muted {
  color: var(--muted);
}

.empty-state {
  grid-column: 1 / -1;
}

.success-box,
.error-box {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: var(--radius);
}

.success-box {
  border: 1px solid rgba(52, 211, 153, 0.32);
  background: rgba(52, 211, 153, 0.1);
}

.success-box strong {
  color: var(--emerald);
}

.error-box {
  border: 1px solid rgba(251, 113, 133, 0.36);
  background: rgba(251, 113, 133, 0.1);
  color: #fecdd3;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 36px clamp(18px, 6vw, 72px);
  border-top: 1px solid var(--line);
  background: rgba(9, 9, 11, 0.76);
}

.site-footer p {
  max-width: 520px;
  color: var(--muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
  color: var(--soft);
}

.agent-dialog {
  width: min(760px, calc(100vw - 28px));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111113;
  color: var(--text);
  padding: 0;
  box-shadow: var(--shadow);
}

.agent-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

.dialog-close {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
}

.detail-wrap {
  padding: 24px;
}

.detail-head h2 {
  margin: 10px 0;
  font-size: 30px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0;
}

.detail-grid div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.detail-section {
  margin-top: 18px;
}

.detail-section ul {
  display: grid;
  gap: 8px;
  padding-left: 18px;
  color: var(--soft);
}

.detail-section p {
  color: var(--soft);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

@media (max-width: 1120px) {
  .hero-grid,
  .trade-layout,
  .settlement-panel,
  .showcase-strip {
    grid-template-columns: 1fr;
  }

  .hero-backdrop::before {
    right: 28px;
    width: min(520px, 52vw);
  }

  .agent-grid,
  .harness-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .site-header {
    align-items: flex-start;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    left: 18px;
    right: 18px;
    top: 66px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(18, 18, 22, 0.98);
  }

  .site-nav.open {
    display: flex;
  }

  .hero {
    padding-top: 70px;
  }

  .hero-backdrop::before {
    right: -18%;
    top: 14%;
    width: 78%;
    height: 38%;
    opacity: 0.46;
  }

  .hero h1 {
    font-size: clamp(40px, 11vw, 54px);
  }

  .hero-grid {
    min-height: auto;
  }

  .hero-market-tape {
    gap: 24px;
    padding-block: 9px;
    font-size: 10px;
  }

  .hero-ledger,
  .showcase-grid {
    grid-template-columns: 1fr;
  }

  .showcase-grid {
    grid-template-rows: auto;
  }

  .showcase-grid article:first-child {
    grid-row: auto;
  }

  .showcase-grid article {
    min-height: 230px;
  }

  .showcase-strip {
    padding-block: 54px;
  }

  .exchange-terminal {
    padding: 14px;
  }

  .form-grid.two,
  .catalog-tools,
  .agent-grid,
  .harness-grid,
  .request-layout,
  .detail-grid,
  .settlement-metrics {
    grid-template-columns: 1fr;
  }

  .section-head.split {
    align-items: stretch;
    flex-direction: column;
  }

  .order-row {
    grid-template-columns: 28px 1fr;
  }

  .order-row em,
  .order-row b {
    text-align: left;
  }

  .feed-row {
    grid-template-columns: 1fr auto;
  }

  .feed-row em,
  .feed-row b {
    text-align: left;
  }

  .site-footer {
    flex-direction: column;
  }

  .site-footer nav {
    justify-content: flex-start;
  }
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  transition: background 0.2s;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* Pipeline Visualizer Styles */
.pipeline-container {
  margin: 20px 0;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}

.pipeline-title {
  font-size: 11px;
  color: var(--faint);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
  text-align: center;
  font-family: "JetBrains Mono", monospace;
}

.pipeline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  gap: 6px;
}

.pipeline-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  background: rgba(13, 13, 17, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  min-width: 82px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.pipeline-node.user-node {
  border-color: var(--violet);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.15);
}

.pipeline-node.harness-node {
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.15);
}

.pipeline-node.agent-node {
  border-color: var(--pink);
  box-shadow: 0 0 12px rgba(217, 70, 239, 0.15);
}

.pipeline-node.active-pulse {
  animation: node-pulse-glow 1.5s infinite alternate;
}

@keyframes node-pulse-glow {
  0% {
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.05);
  }
  100% {
    box-shadow: 0 0 18px currentColor;
  }
}

.node-icon {
  font-size: 18px;
  margin-bottom: 4px;
}

.node-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--soft);
  text-align: center;
  white-space: nowrap;
}

.pipeline-edge {
  flex-grow: 1;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.04) 100%);
  position: relative;
  overflow: hidden;
  border-radius: 1px;
}

.edge-pulse {
  position: absolute;
  top: 0;
  left: -40px;
  width: 40px;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  animation: pulse-flow 2s infinite linear;
}

.pipeline-node.user-node + .pipeline-edge .edge-pulse {
  background: linear-gradient(90deg, transparent, var(--violet), transparent);
}

.pipeline-node.harness-node + .pipeline-edge .edge-pulse {
  background: linear-gradient(90deg, transparent, var(--pink), transparent);
  animation-delay: 0.6s;
}

@keyframes pulse-flow {
  0% { left: -40px; }
  100% { left: 100%; }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: grid;
  gap: 12px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 320px;
  max-width: 420px;
  background: rgba(13, 13, 17, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(20px);
}

.toast.show {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.toast.success {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(16, 185, 129, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.toast.error {
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(239, 68, 68, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 12px;
  flex-shrink: 0;
}

.toast.success .toast-icon {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
}

.toast.error .toast-icon {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.toast-content {
  display: grid;
  gap: 4px;
  flex-grow: 1;
}

.toast-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.toast-message {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.toast-close {
  background: transparent;
  border: none;
  color: var(--faint);
  cursor: pointer;
  padding: 0;
  font-size: 16px;
  line-height: 1;
  transition: color 0.2s;
}

.toast-close:hover {
  color: var(--text);
}

/* Card Glow Enhancements & Glassmorphic touches */
.agent-card, .harness-card, .exchange-terminal, .orderbook-panel, .flow-panel, .request-form, .request-output, .settlement-panel {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.agent-card:hover {
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(139, 92, 246, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: translateY(-4px);
}

.harness-card:hover {
  border-color: rgba(6, 182, 212, 0.3);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(6, 182, 212, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: translateY(-4px);
}

.agent-card .agent-actions button:first-child:hover {
  background: rgba(16, 185, 129, 0.22);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}

/* Modern Tab Indicator Style (Glass Pill Active) */
.trade-tabs button {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.trade-tabs button.active {
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

/* Flow Section Pulsing Number */
.flow-step span {
  transition: all 0.3s ease;
}

.flow-step.active span {
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
  animation: active-step-pulse 2s infinite alternate;
}

@keyframes active-step-pulse {
  0% { box-shadow: 0 0 4px rgba(139, 92, 246, 0.2); }
  100% { box-shadow: 0 0 16px rgba(139, 92, 246, 0.5); }
}

/* Live Market Monitor Terminal */
.market-monitor-terminal {
  position: relative;
  overflow: hidden;
  padding: 18px;
  background:
    radial-gradient(circle at 86% 0%, rgba(6, 182, 212, 0.16), transparent 28%),
    radial-gradient(circle at 18% 78%, rgba(217, 70, 239, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(6, 182, 212, 0.08), transparent 36%),
    rgba(13, 13, 17, 0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  min-height: 430px;
  display: flex;
  flex-direction: column;
}

.market-monitor-terminal::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 0 1px rgba(6, 182, 212, 0.06);
}

.status-dot.pulsing {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 5px rgba(52, 211, 153, 0.12);
  animation: status-pulse 2s infinite;
}

@keyframes status-pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
  70% { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.monitor-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.stat-box {
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 9px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  display: block;
  font-size: 14px;
  font-weight: 800;
  font-family: "JetBrains Mono", monospace;
  margin-top: 2px;
}

.text-green { color: var(--emerald); }
.text-blue { color: var(--cyan); }
.text-amber { color: var(--amber); }

.log-stream-container {
  margin-top: 14px;
  height: 120px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 8px 12px;
  overflow: hidden;
  position: relative;
}

.log-stream {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--soft);
}

.log-row {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  animation: typing 0.5s ease-out;
}

@keyframes typing {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.featured-markets-list {
  margin-top: 16px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.list-header {
  display: grid;
  grid-template-columns: 1fr 68px 60px 58px;
  font-size: 10px;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.market-rows {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  flex-grow: 1;
}

.market-row-item {
  display: grid;
  grid-template-columns: 1fr 68px 60px 58px;
  align-items: center;
  font-size: 12px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.market-row-item:last-child {
  border-bottom: none;
}

.market-name {
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.market-name small {
  color: var(--muted);
  font-weight: 400;
  margin-left: 4px;
}

.market-price {
  font-family: "JetBrains Mono", monospace;
  color: var(--emerald);
}

.sparkline-container {
  display: flex;
  align-items: center;
}

.sparkline {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: draw-sparkline 1.5s forwards ease-out;
}

@keyframes draw-sparkline {
  to { stroke-dashoffset: 0; }
}

.btn-trade-link {
  font-size: 10px;
  font-weight: 700;
  color: var(--cyan);
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.16);
  border-radius: 4px;
  padding: 3px 5px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-trade-link:hover {
  background: var(--cyan);
  color: #fff;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.25);
}

