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

:root {
  --thraid-ink: #0f172a;
  --thraid-muted: #64748b;
  --thraid-line: #d7dee8;
  --thraid-blue: #2563eb;
  --thraid-gold: #f8bd06;
  --thraid-card: #ffffff;
  --thraid-soft: #f8fafc;
}

html {
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

h1,
h2,
h3,
h4,
.logo-font {
  font-family: "Space Grotesk", Inter, system-ui, sans-serif;
  letter-spacing: 0;
}

.logo-font[href] {
  color: inherit;
  text-decoration: none;
}

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

button,
[role="button"],
.pill,
.nav-link,
.nav-child {
  touch-action: manipulation;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible {
  outline: 3px solid rgba(59,130,246,.55);
  outline-offset: 2px;
}

button,
.btn,
.pill,
.strip-btn,
.buyer-action,
.rail-search-submit {
  min-height: 2.55rem;
}

button,
.btn,
.strip-btn,
.buyer-action {
  overflow-wrap: anywhere;
}

input,
select,
textarea {
  min-width: 0;
}

img,
video,
iframe {
  max-width: 100%;
}

.card,
.rail-card,
.glass,
.market-card,
.domain-card,
.hub-card,
.trend-card,
.follow-card,
.escrow-step,
.seller-tool-card,
.appraisal-trust-card,
.factor-card {
  overflow-wrap: anywhere;
}

.rail-card h2,
.rail-card h3,
.glass h2,
.glass h3,
.card h2,
.card h3,
.market-card h2,
.market-card h3,
.domain-card h2,
.domain-card h3 {
  line-height: 1.12;
}

.rail-card p,
.glass p,
.card p,
.market-card p,
.domain-card p {
  line-height: 1.55;
}

.thraid-action-row,
.action-row,
.button-row,
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .65rem;
}

.thraid-action-row > *,
.action-row > *,
.button-row > *,
.modal-actions > * {
  flex: 0 0 auto;
}

.soft-loading,
[data-loading],
.loading-copy {
  color: #94a3b8;
  font-weight: 700;
}

.thraid-global-mobile-nav {
  display: none;
}

@media (max-width: 640px) {
  h1 {
    font-size: clamp(2rem, 11vw, 3.1rem);
    line-height: .98;
  }

  h2 {
    font-size: clamp(1.35rem, 7vw, 2.05rem);
  }

  .rail-card,
  .glass,
  .market-card,
  .domain-card,
  .card {
    border-radius: 1.15rem !important;
  }

  button,
  .btn,
  .pill,
  .strip-btn,
  .buyer-action {
    white-space: normal;
  }

  .grid {
    min-width: 0;
  }

  body.has-thraid-global-mobile-nav {
    padding-bottom: 5.25rem !important;
  }

  .thraid-global-mobile-nav {
    position: fixed;
    left: .65rem;
    right: .65rem;
    bottom: .65rem;
    z-index: 9990;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .2rem;
    padding: .42rem;
    border: 1px solid rgba(113,113,122,.48);
    border-radius: 1rem;
    background: rgba(9,9,11,.94);
    color: #e5e7eb;
    box-shadow: 0 18px 55px rgba(0,0,0,.38);
    backdrop-filter: blur(18px);
  }

  .thraid-global-mobile-nav a {
    min-width: 0;
    min-height: 3.55rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .28rem;
    border-radius: .75rem;
    color: inherit;
    text-decoration: none;
    font-size: .67rem;
    font-weight: 850;
  }

  .thraid-global-mobile-nav a:hover,
  .thraid-global-mobile-nav a:focus-visible,
  .thraid-global-mobile-nav a[aria-current="page"] {
    background: #18181b;
    color: #ffffff;
  }

  .thraid-global-mobile-nav a[aria-current="page"] {
    box-shadow: inset 0 -2px 0 #3b82f6;
  }

  .thraid-global-mobile-nav i {
    font-size: 1.05rem;
  }
}

html.light,
html.light body {
  color-scheme: light;
}

html.light body {
  background: #f3f4f6 !important;
  color: var(--thraid-ink) !important;
}

html.light .bg-black:not(button):not(a):not(label),
html.light .bg-zinc-950:not(button):not(a):not(label),
html.light .bg-zinc-900:not(button):not(a):not(label),
html.light .bg-zinc-800:not(button):not(a):not(label),
html.light .bg-neutral-950:not(button):not(a):not(label),
html.light .bg-neutral-900:not(button):not(a):not(label),
html.light .bg-slate-950:not(button):not(a):not(label),
html.light .bg-slate-900:not(button):not(a):not(label),
html.light .glass,
html.light .rail-card,
html.light .market-card,
html.light .domain-card,
html.light .hub-card,
html.light .trend-card,
html.light .follow-card,
html.light .seller-tool-card,
html.light .appraisal-trust-card,
html.light .factor-card {
  background: var(--thraid-card) !important;
  color: var(--thraid-ink) !important;
  border-color: var(--thraid-line) !important;
}

html.light .bg-zinc-800\/50,
html.light .bg-zinc-900\/50 {
  background: rgba(255,255,255,.92) !important;
  color: var(--thraid-ink) !important;
}

html.light .text-zinc-500,
html.light .text-zinc-400,
html.light .text-neutral-500,
html.light .text-neutral-400,
html.light .text-slate-500,
html.light .text-slate-400 {
  color: var(--thraid-muted) !important;
}

/* Shared utility rail: keep persistent tools visible without collisions. */
.thraid-command-fab {
  right: 1rem !important;
  bottom: 1rem !important;
}

.thraid-radio {
  right: 1rem !important;
  bottom: 5.25rem !important;
}

.thraid-system-bell {
  right: 1rem !important;
  bottom: 9.5rem !important;
}

.thraid-revenue-fab {
  right: 1rem !important;
  bottom: 13.75rem !important;
}

.market-concierge-toggle {
  right: 1rem !important;
  bottom: 18rem !important;
}

.market-concierge-panel {
  right: 1rem !important;
  bottom: 22rem !important;
}

#kofi-widget-overlay,
.floatingchat-container-wrap,
.floating-chat-kofi-button,
.thraid-kofi-support {
  right: 1rem !important;
  bottom: 22rem !important;
}

.thraid-kofi-support {
  position: fixed;
  z-index: 9998;
  min-height: 3.25rem;
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: .45rem 1rem .45rem .5rem;
  border: 1px solid rgba(252, 191, 71, .48);
  border-radius: 999px;
  background: #fcbf47;
  color: #1f2937;
  box-shadow: 0 14px 38px rgba(0, 0, 0, .28);
  font: 800 .96rem/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, border-color .16s ease;
}

.thraid-kofi-support:hover {
  transform: translateY(-2px);
  background: #ffd166;
  box-shadow: 0 18px 46px rgba(0, 0, 0, .34);
}

.thraid-kofi-support:focus-visible {
  outline: 3px solid rgba(59, 130, 246, .45);
  outline-offset: 3px;
}

.thraid-kofi-support-icon {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #ffffff;
  color: #ef4444;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .12);
}

html.light .thraid-kofi-support,
[data-theme="light"] .thraid-kofi-support {
  border-color: #d7dee9;
  background: #ffffff;
  color: #172033;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .14);
}

html.light .thraid-kofi-support:hover,
[data-theme="light"] .thraid-kofi-support:hover {
  border-color: #f0b429;
  background: #fff9e8;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .18);
}

@media (max-width: 640px) {
  .thraid-command-fab {
    right: .65rem !important;
    bottom: calc(5.45rem + env(safe-area-inset-bottom, 0px)) !important;
  }

  .thraid-radio {
    right: 4.45rem !important;
    bottom: calc(5.45rem + env(safe-area-inset-bottom, 0px)) !important;
  }

  .thraid-radio.open {
    right: .5rem !important;
  }

  .thraid-system-bell {
    right: 8.25rem !important;
    bottom: calc(5.45rem + env(safe-area-inset-bottom, 0px)) !important;
  }

  .thraid-system-bell.open {
    right: .5rem !important;
  }

  .thraid-system-bell .thraid-bell-panel {
    position: fixed !important;
    left: .5rem !important;
    right: .5rem !important;
    bottom: calc(9.45rem + env(safe-area-inset-bottom, 0px)) !important;
    width: auto !important;
    max-width: none !important;
    max-height: min(62dvh, calc(100dvh - 11rem)) !important;
  }

  .thraid-revenue-fab {
    left: .65rem !important;
    right: auto !important;
    bottom: calc(5.45rem + env(safe-area-inset-bottom, 0px)) !important;
    min-height: 3.35rem;
    padding: .65rem .8rem !important;
  }

  .market-concierge-toggle {
    right: .65rem !important;
    bottom: calc(9.45rem + env(safe-area-inset-bottom, 0px)) !important;
    padding: .68rem .8rem !important;
  }

  .market-concierge-panel {
    right: .5rem !important;
    bottom: calc(13.3rem + env(safe-area-inset-bottom, 0px)) !important;
    width: calc(100vw - 1rem) !important;
    max-height: 56dvh;
    overflow-y: auto;
  }
}

html.light input,
html.light select,
html.light textarea {
  background: #ffffff !important;
  color: var(--thraid-ink) !important;
  border-color: #cbd5e1 !important;
}

html.light input::placeholder,
html.light textarea::placeholder {
  color: #64748b !important;
}

html.light .border-zinc-800,
html.light .border-zinc-700,
html.light .border-neutral-800,
html.light .border-slate-800 {
  border-color: var(--thraid-line) !important;
}

html.light .hover\:bg-zinc-900:hover,
html.light .hover\:bg-zinc-800:hover,
html.light .hover\:bg-neutral-900:hover {
  background: #eef2ff !important;
  color: #111827 !important;
}

html.light .native-media-frame,
html.light .composer-preview-body,
html.light .photo-tile,
html.light video,
html.light iframe {
  background: #0f172a !important;
}

html.light .thraid-global-mobile-nav {
  background: rgba(255,255,255,.96) !important;
  color: #334155 !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 16px 45px rgba(15,23,42,.16) !important;
}

html.light .thraid-global-mobile-nav a:hover,
html.light .thraid-global-mobile-nav a:focus-visible,
html.light .thraid-global-mobile-nav a[aria-current="page"] {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
}
