@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --bg: #fbfaf6;
  --surface: #ffffff;
  --surface-warm: #fffaf0;
  --ink: #111111;
  --muted: #6f6b63;
  --line: #e9e3d8;
  --line-strong: #d9cfbf;
  --yellow: #f7bd16;
  --yellow-soft: #fff5d6;
  --yellow-line: #f4c84b;
  --green: #2f9d5b;
  --orange: #f08a00;
  --red: #c8333a;
  --blue: #2563eb;
  --shadow: 0 14px 36px rgba(34, 31, 25, .07);
  --shadow-soft: 0 8px 20px rgba(34, 31, 25, .055);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input { font: inherit; }

button,
a {
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease, transform .18s ease;
}

button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .7; }
button:active { transform: translateY(1px); }

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(247, 189, 22, .32);
  outline-offset: 3px;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topbar {
  height: 82px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 48px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: var(--ink);
  text-decoration: none;
  font-size: 24px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid #e7c14a;
  background: linear-gradient(135deg, #fff9dc, #fff3b6);
  color: #111;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 6px 18px rgba(247, 189, 22, .12);
  overflow: hidden;
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.main-nav {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 44px;
}

.main-nav button {
  position: relative;
  min-width: 72px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 650;
}

.main-nav button::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  height: 3px;
  border-radius: 99px 99px 0 0;
  background: transparent;
}

.main-nav button.active::after {
  background: var(--yellow);
}

.ghost-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
}

.x-slot {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 750;
  box-shadow: var(--shadow-soft);
}

.ca-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--yellow-soft);
  color: #8a5b00;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.ca-address {
  flex: 0 1 auto;
  max-width: 100%;
  overflow: visible;
  letter-spacing: 0;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ca-strip {
  position: sticky;
  top: 82px;
  z-index: 45;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 250, 240, .94);
  backdrop-filter: blur(16px);
}

.ca-strip-button {
  width: min(1700px, calc(100% - 88px));
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 auto;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.ca-strip-button::-webkit-scrollbar {
  display: none;
}

.ca-copy {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.x-slot {
  width: 50px;
  height: 50px;
  padding: 0;
  justify-content: center;
}

.x-slot-mark {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: #111;
}

.x-slot-mark svg {
  width: 18px;
  height: 18px;
}

.main-nav button:hover,
.ghost-icon:hover,
.x-slot:hover {
  background: #fffaf0;
}

.connect-wallet {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 22px;
  border: 0;
  border-radius: 10px;
  background: #111;
  color: #fff;
  font-weight: 750;
  box-shadow: var(--shadow-soft);
}

.connect-wallet:hover,
.ghost-icon:hover,
.x-slot:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.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;
}

.page-shell {
  width: min(1700px, calc(100% - 88px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.ask-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 410px;
  gap: 40px;
  align-items: start;
}

.main-column {
  min-width: 0;
}

.ask-hero {
  padding: 14px 16px 18px;
}

.hero-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.status-pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #19633d;
  font-size: 12px;
  font-weight: 750;
}

.status-pill i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.status-pill.offline {
  color: var(--orange);
}

.status-pill.offline i {
  background: var(--orange);
}

.ask-hero h1 {
  margin: 0;
  font-size: clamp(42px, 4.5vw, 58px);
  line-height: 1.02;
  letter-spacing: 0;
}

.ask-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: #2f2f2f;
  font-size: 18px;
  line-height: 1.48;
  overflow-wrap: anywhere;
}

.ask-hero strong {
  color: var(--blue);
}

.chat-card,
.risk-report,
.rail-card,
.sub-card {
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.chat-card {
  padding: 28px 34px 30px;
}

.flow-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 2px 0 18px;
}

.flow-panel article {
  min-height: 76px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.72);
}

.flow-panel article.active {
  border-color: rgba(247, 189, 22, .62);
  background: #fffaf0;
}

.flow-panel span,
.step-list span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-weight: 800;
}

.flow-panel strong,
.flow-panel small,
.step-list strong,
.step-list small {
  display: block;
}

.flow-panel small,
.step-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.primary-composer {
  margin-top: 0;
  margin-bottom: 20px;
  border-color: #d7c8ad;
  box-shadow: 0 12px 28px rgba(247, 189, 22, .1);
}

.message {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.message > div,
.summary-grid > *,
.composer {
  min-width: 0;
}

.user-message {
  min-height: 88px;
  align-items: center;
  padding: 18px;
  background: linear-gradient(90deg, #fff8dc, #fffaf0);
}

.avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 800;
}

.user-avatar {
  background: var(--yellow);
  color: #fff;
}

.lens-avatar {
  color: var(--yellow);
}

.message strong {
  font-size: 16px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.message p {
  margin: 8px 0 0;
  color: var(--muted);
}

.message time {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.inline-copy {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  margin-left: 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  vertical-align: middle;
}

.inline-copy svg {
  width: 15px;
  height: 15px;
}

.ai-message {
  margin-top: 20px;
  padding: 18px;
  background: #fff;
}

.ai-content {
  min-width: 0;
}

.ai-content p {
  max-width: calc(100% - 8px);
  overflow-wrap: anywhere;
}

.ai-answer {
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfaf6;
}

.ai-answer p {
  margin: 0 0 8px;
  color: #38342d;
  line-height: 1.5;
}

.ai-answer p:last-child,
.ai-answer ul:last-child {
  margin-bottom: 0;
}

.ai-answer ul {
  margin: 0;
  padding-left: 18px;
  color: #38342d;
}

.ai-answer li + li {
  margin-top: 5px;
}

.summary-grid {
  display: grid;
  grid-template-columns: minmax(250px, 288px) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.score-card,
.finding-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.score-card {
  padding: 20px 22px;
}

.score-card span {
  color: #3d3d3d;
  font-size: 14px;
  font-weight: 600;
}

.score-card strong {
  display: block;
  margin-top: 12px;
  font-size: 56px;
  line-height: 1;
}

.score-card em {
  color: var(--muted);
  font-size: 20px;
  font-style: normal;
  font-weight: 500;
}

.score-card p {
  margin: 10px 0 0;
  color: var(--orange);
  font-weight: 750;
}

.score-track {
  height: 8px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #ddd8ce;
}

.score-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--yellow), #f59e0b);
}

.score-track.orange i {
  background: linear-gradient(90deg, #f59e0b, #f97316);
}

.finding-card {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
}

.finding-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
}

.finding-row > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.finding-row.good > span {
  color: var(--green);
  background: rgba(47, 157, 91, .1);
}

.finding-row.watch > span {
  color: var(--orange);
  background: rgba(240, 138, 0, .1);
}

.finding-row.info > span {
  color: var(--yellow);
  background: rgba(247, 189, 22, .14);
}

.finding-row strong {
  display: block;
  font-size: 13px;
}

.finding-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.quick-actions button,
.composer button,
.object-choice,
.rail-head button,
.text-link,
.subpage-search button,
.history-item {
  cursor: pointer;
}

.quick-actions button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #333;
  font-size: 12px;
  font-weight: 600;
}

.quick-actions button:hover,
.object-choice:hover,
.text-link:hover,
.history-item:hover {
  border-color: var(--yellow-line);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.empty-analysis {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 22px;
  border: 1px dashed var(--yellow-line);
  border-radius: 18px;
  background: linear-gradient(135deg, #fffdf5, #fffaf0);
}

.empty-analysis > div {
  min-width: 0;
}

.empty-analysis strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
}

.empty-analysis p {
  margin: 8px 0 0;
  max-width: 720px;
  color: var(--muted);
  line-height: 1.55;
}

.sub-empty {
  min-height: 360px;
  align-content: start;
}

.live-health-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.sub-empty .live-health-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.live-health-grid article {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.live-health-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.live-health-grid strong {
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.composer {
  min-height: 70px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto 58px;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
  padding: 10px 10px 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #fff;
}

.composer input {
  min-width: 0;
  height: 46px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
}

.attach-btn {
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.network-pill {
  height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-weight: 600;
}

.network-pill i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #2563eb;
}

.send-btn {
  width: 58px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: #111;
  color: #fff;
}

.disclaimer {
  margin: 12px 0 0;
  color: #9a958b;
  text-align: center;
  font-size: 12px;
}

.error,
.notice {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 650;
}

.error {
  border: 1px solid rgba(200, 51, 58, .24);
  background: rgba(200, 51, 58, .08);
  color: var(--red);
}

.notice {
  border: 1px solid rgba(47, 157, 91, .24);
  background: rgba(47, 157, 91, .08);
  color: var(--green);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  max-width: min(420px, calc(100vw - 32px));
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid rgba(47, 157, 91, .22);
  border-radius: 14px;
  background: #fff;
  color: #174b31;
  box-shadow: 0 18px 48px rgba(34, 31, 25, .16);
  animation: toastIn .22s ease both;
  font-weight: 700;
}

.toast.danger {
  border-color: rgba(200, 51, 58, .28);
  color: var(--red);
}

.toast svg {
  flex: 0 0 auto;
}

.toast span {
  overflow-wrap: anywhere;
}

.toast.danger svg {
  color: var(--red);
}

.toast:not(.danger) svg {
  color: var(--green);
}

.right-rail {
  display: grid;
  gap: 18px;
}

.rail-card {
  padding: 22px;
}

.rail-card h2 {
  margin: 0;
  font-size: 19px;
}

.rail-card > p {
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.object-choice {
  width: 100%;
  min-height: 64px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 24px;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  text-align: left;
  transition-duration: .1s;
}

.object-choice.active {
  border-color: var(--yellow-line);
  background: var(--yellow-soft);
  box-shadow: 0 8px 18px rgba(247, 189, 22, .13);
}

.object-choice > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #111;
}

.object-choice strong {
  display: block;
  font-size: 14px;
}

.object-choice small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.object-choice i {
  justify-self: end;
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.object-choice.active i {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--yellow);
  color: #fff;
}

.rail-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.rail-head button,
.text-link {
  border: 0;
  background: transparent;
  color: #111;
  font-weight: 700;
}

.wallet-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.live-data-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.live-data-list p {
  margin: 0;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.wallet-stats span,
.token-line small,
.snapshot-metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.wallet-stats strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
}

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

.mini-chart {
  height: 78px;
  margin: 14px 0;
  border-radius: 10px;
  background:
    linear-gradient(135deg, transparent 0 14%, rgba(247, 189, 22, .18) 14% 18%, transparent 18% 32%, rgba(247, 189, 22, .22) 32% 37%, transparent 37% 56%, rgba(247, 189, 22, .25) 56% 62%, transparent 62%),
    linear-gradient(180deg, #fff, #fff7da);
}

.token-line,
.snapshot-metric {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  min-height: 30px;
}

.token-line span {
  font-weight: 700;
}

.token-line strong {
  font-weight: 600;
}

.token-snapshot .score-track {
  margin: 18px 0;
}

.snapshot-head {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: 18px;
}

.token-avatar {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dbeafe;
  color: #2563eb;
}

.snapshot-head strong,
.snapshot-head small {
  display: block;
}

.snapshot-head small {
  color: var(--muted);
  margin-top: 2px;
}

.snapshot-head b {
  font-size: 30px;
}

.snapshot-head em {
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
}

.snapshot-metric em {
  justify-self: end;
  min-width: 52px;
  padding: 3px 8px;
  border-radius: 7px;
  background: rgba(47, 157, 91, .12);
  color: var(--green);
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
  text-align: center;
}

.snapshot-metric em.watch {
  background: var(--yellow-soft);
  color: var(--orange);
}

.snapshot-metric em.rpc {
  background: rgba(37, 99, 235, .1);
  color: #2563eb;
}

.snapshot-metric em.missing {
  background: #f5f1e8;
  color: var(--muted);
}

.text-link {
  display: block;
  margin: 18px auto 0;
}

.risk-report {
  margin-top: 18px;
  padding: 22px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.section-head > div {
  display: flex;
  gap: 12px;
  align-items: center;
}

.section-head svg {
  color: #111;
}

.section-head strong,
.section-head small {
  display: block;
}

.section-head small {
  color: var(--muted);
  margin-top: 2px;
}

.section-head button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
}

.risk-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.risk-summary-grid article,
.fact-table article {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.risk-summary-grid article {
  min-height: 118px;
  padding: 16px;
}

.risk-summary-grid article > span,
.fact-table article > span,
.success-strip > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fafafa;
  color: var(--orange);
}

.risk-summary-grid small,
.fact-table small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.risk-summary-grid strong {
  display: block;
  margin-top: 10px;
  font-size: 22px;
}

.risk-summary-grid p {
  margin: 6px 0 0;
  color: var(--orange);
  font-size: 13px;
  font-weight: 650;
}

.fact-table {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.fact-table article {
  min-height: 82px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
}

.fact-table strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.success-strip {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #cfe5c9;
  border-radius: 12px;
  background: #f4fbf1;
}

.success-strip > span {
  color: var(--green);
}

.success-strip strong,
.success-strip em {
  font-style: normal;
}

.success-strip p {
  margin: 4px 0 0;
  color: var(--muted);
}

.subpage {
  display: grid;
  gap: 22px;
}

.subpage-hero,
.sub-card {
  padding: 28px;
}

.subpage-hero {
  display: flex;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.subpage-hero > span {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--yellow-soft);
  color: var(--orange);
}

.subpage h1 {
  margin: 0;
  font-size: 40px;
}

.subpage-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-left: auto;
}

.subpage p {
  margin: 8px 0 0;
  color: var(--muted);
}

.subpage-search {
  min-height: 78px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.subpage-search input {
  border: 0;
  outline: 0;
  padding: 0 14px;
  font-size: 18px;
}

.subpage-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  background: #111;
  color: #fff;
  font-weight: 700;
}

.subpage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 18px;
}

.analysis-card {
  overflow: hidden;
}

.analysis-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.analysis-top h2,
.workflow-card h2 {
  margin: 4px 0 0;
  font-size: 26px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--yellow-soft);
  color: #8a5b00;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.score-badge {
  min-width: 118px;
  min-height: 82px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffaf0;
}

.score-badge strong {
  font-size: 44px;
  line-height: 1;
}

.score-badge span {
  color: var(--muted);
  font-weight: 700;
}

.light-score {
  margin-top: 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.light-score > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.light-score span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.compact-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.compact-facts article {
  min-height: 88px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.compact-facts small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.compact-facts strong {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
}

.ai-note {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfaf6;
}

.ai-note > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--yellow-soft);
  color: var(--orange);
}

.ai-note strong {
  display: block;
  margin-bottom: 6px;
}

.ai-note p {
  margin-top: 0;
}

.step-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.step-list article {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.full-action {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  border: 0;
  border-radius: 12px;
  background: #111;
  color: #fff;
  font-weight: 800;
}

.full-action:hover {
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
}

.history-head h3 {
  margin: 0;
  font-size: 16px;
}

.history-head button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.empty-state {
  margin-top: 18px;
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: #fff;
}

.empty-state.small {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.45;
}

.history-item {
  width: 100%;
  min-height: 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  text-align: left;
}

.history-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.history-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-item small {
  grid-row: 1 / 3;
  grid-column: 2;
  color: var(--orange);
  font-weight: 700;
}

.loader {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

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

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

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

@media (max-width: 1280px) {
  .ask-layout {
    grid-template-columns: 1fr;
  }

  .right-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .topbar {
    height: auto;
    flex-wrap: wrap;
    padding: 14px 20px;
    gap: 14px 18px;
  }

  .brand {
    order: 1;
  }

  .ghost-icon {
    order: 2;
    margin-left: auto;
  }

  .topbar-actions {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-left: 0;
  }

  .ca-strip {
    position: static;
  }

  .ca-strip-button {
    width: calc(100% - 40px);
  }

  .connect-wallet {
    order: 4;
  }

  .main-nav {
    order: 5;
    flex: 0 0 100%;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    gap: 34px;
    min-height: 48px;
  }

  .page-shell {
    width: calc(100% - 28px);
  }

  .summary-grid,
  .risk-summary-grid,
  .fact-table,
  .flow-panel,
  .compact-facts,
  .subpage-grid,
  .right-rail {
    grid-template-columns: 1fr;
  }

  .subpage-hero {
    flex-wrap: wrap;
  }

  .subpage-status {
    width: 100%;
    justify-content: flex-start;
    margin-left: 70px;
  }
}

@media (max-width: 640px) {
  .ask-hero h1 {
    font-size: 34px;
    line-height: 1.08;
  }

  .ask-hero p {
    max-width: calc(100% - 14px);
    font-size: 16px;
    line-height: 1.52;
  }

  .chat-card,
  .risk-report,
  .rail-card,
  .sub-card,
  .subpage-hero {
    padding: 18px;
  }

  .message,
  .composer,
  .subpage-search {
    grid-template-columns: 1fr;
  }

  .user-message,
  .ai-message {
    gap: 12px;
  }

  .message time {
    justify-self: start;
  }

  .network-pill,
  .send-btn,
  .subpage-search button {
    width: 100%;
  }

  .flow-panel article,
  .step-list article,
  .ai-note,
  .empty-analysis {
    grid-template-columns: 1fr;
  }

  .live-health-grid,
  .sub-empty .live-health-grid {
    grid-template-columns: 1fr;
  }

  .analysis-top,
  .light-score > div:first-child {
    display: grid;
  }

  .score-badge {
    width: 100%;
    justify-content: flex-start;
  }

  .subpage-status {
    margin-left: 0;
  }

  .toast {
    right: 16px;
    bottom: 16px;
  }

  .ca-strip-button {
    width: calc(100% - 28px);
  }

  .ca-address {
    font-size: 12px;
  }
}
