/* =====================================================
   Ticket VeriGuard - styles-v2.css
   Shared stylesheet for:
   - index.html
   - search.html
   - brokers.html
   - prototype.html
   - duplicate-check.html
   ===================================================== */

/* =====================================================
   1. TOKENS
   ===================================================== */
:root {
  --bg: #0b0f14;
  --bg-2: #111826;
  --panel: #111826;
  --panel-soft: rgba(255,255,255,.02);
  --panel-border: rgba(255,255,255,.08);

  --brand: #4f46e5;
  --brand-2: #22d3ee;

  --text: #e5e7eb;
  --muted: #94a3b8;

  --success: #10b981;
  --danger: #ef4444;

  --radius: 16px;
  --radius-sm: 12px;

  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --ring: 0 0 0 3px rgba(79,70,229,.35);

  --container: 1100px;

  --nav-h: 104px;
  --nav-h-sm: 72px;
  --logo-w: 300px;
  --logo-w-sm: 200px;

  --section-py: 56px;
}

/* =====================================================
   2. RESET / BASE
   ===================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Ubuntu, Cantarell, "Noto Sans", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(79,70,229,.15), transparent),
    radial-gradient(900px 500px at -10% 20%, rgba(34,211,238,.12), transparent),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

main {
  background:
    radial-gradient(circle at top center, rgba(99,102,241,.06), transparent 70%),
    radial-gradient(1600px 800px at 70% 0%, rgba(34,211,238,.08), transparent 60%),
    linear-gradient(180deg, #0b0f14 0%, #111826 100%);
}

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

a {
  color: var(--brand-2);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

button {
  cursor: pointer;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  padding: 2px 6px;
  font-size: .95em;
}

/* =====================================================
   3. LAYOUT
   ===================================================== */
.container,
.tvb-container,
.tvb-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

section,
.section {
  position: relative;
  padding: var(--section-py) 0;
}

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

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

@media (max-width: 940px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* =====================================================
   4. TYPOGRAPHY / SHARED TEXT
   ===================================================== */
h1,
h2,
h3 {
  line-height: 1.2;
  margin-top: 0;
}

h1 {
  font-size: clamp(30px, 5vw, 44px);
  margin-bottom: 10px;
}

h2 {
  font-size: clamp(24px, 3vw, 32px);
  margin-bottom: 12px;
}

h3 {
  font-size: 22px;
  margin-bottom: 10px;
}

p {
  margin-top: 0;
}

.lead {
  color: var(--muted);
  font-size: clamp(15px, 1.7vw, 18px);
}

.section-title {
  margin: 0 0 12px;
}

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

.badge,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  color: var(--muted);
  font-size: 14px;
}

.grad-text {
  background: linear-gradient(90deg, #ffffff 0%, #c7d2fe 45%, #67e8f9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* =====================================================
   5. NAVIGATION
   ===================================================== */
header.nav,
header {
  position: sticky;
  top: 0;
  z-index: 50;
  margin: 12px 16px 0;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 18px;
  background: rgba(11,15,20,.68);
  backdrop-filter: blur(10px);
  box-shadow:
    0 0 25px rgba(79,70,229,.28),
    0 0 45px rgba(34,211,238,.12);
}

.nav--brand {
  display: grid;
  grid-template-columns: var(--logo-w) 1fr;
  align-items: center;
  column-gap: 22px;
  height: var(--nav-h);
  padding: 0 18px;
  position: relative;
}

.logo-bay {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: calc(var(--nav-h) - 12px);
  overflow: hidden;
}

.logo-img {
  width: auto;
  height: 125%;
  object-fit: contain;
  object-position: left center;
}

.topnav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 24px;
}

.topnav a,
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  color: #dbe4ff;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(17,24,38,.55);
  backdrop-filter: blur(4px);
  transition:
    transform .18s ease,
    background .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    color .18s ease;
}

.topnav a:hover,
.nav-link:hover {
  color: #fff;
  background: rgba(79,70,229,.20);
  border-color: rgba(99,102,241,.55);
  transform: translateY(-2px);
  box-shadow:
    0 4px 14px rgba(79,70,229,.25),
    0 0 10px rgba(34,211,238,.15);
  text-decoration: none;
}

.nav-active,
.nav-link.nav-active,
.nav-link[aria-current="page"] {
  color: #fff;
  background: linear-gradient(
    90deg,
    rgba(79,70,229,.45),
    rgba(34,211,238,.35)
  );
  border-color: rgba(99,102,241,.75);
  box-shadow:
    0 0 16px rgba(79,70,229,.45),
    0 0 24px rgba(34,211,238,.18);
}

.nav-toggle {
  display: none;
  position: relative;
  justify-self: end;
  width: 42px;
  height: 36px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  background: rgba(17,24,38,.65);
}

.nav-toggle .bar {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  border-radius: 1px;
  background: #e5e7eb;
  transition: transform .2s ease, opacity .2s ease, top .2s ease;
}

.nav-toggle .bar:nth-child(1) { top: 10px; }
.nav-toggle .bar:nth-child(2) { top: 17px; }
.nav-toggle .bar:nth-child(3) { top: 24px; }

.nav-toggle[aria-expanded="true"] .bar:nth-child(1) {
  top: 17px;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(3) {
  top: 17px;
  transform: rotate(-45deg);
}

@media (max-width: 900px) {
  .nav--brand {
    grid-template-columns: minmax(140px, var(--logo-w-sm)) auto;
    height: var(--nav-h-sm);
    column-gap: 12px;
  }

  .logo-bay {
    height: calc(var(--nav-h-sm) - 8px);
  }

  .logo-img {
    height: auto;
    max-height: 100%;
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .topnav {
    position: fixed;
    top: calc(12px + var(--nav-h-sm));
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 0 0 18px 18px;
    background: rgba(11,15,20,.96);
    transform: translateY(-6px);
    opacity: 0;
    z-index: 60;
    transition: transform .2s ease, opacity .2s ease;
  }

  .topnav a,
  .nav-link {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,.06);
  }

  header.nav-open .topnav {
    display: flex;
    transform: translateY(0);
    opacity: 1;
  }

  body.menu-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    backdrop-filter: blur(2px);
    z-index: 40;
  }
}

/* =====================================================
   6. BUTTONS
   ===================================================== */
a.btn,
button.btn,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: var(--panel);
  color: var(--text);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform .15s ease,
    box-shadow .15s ease,
    background .20s ease,
    border-color .20s ease,
    opacity .20s ease;
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
  background: rgba(255,255,255,.10);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.btn[disabled],
.btn[aria-disabled="true"],
.btn.is-loading {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

.btn-primary,
.btn.primary {
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  border-color: transparent;
  color: #0b0f14;
  box-shadow: 0 8px 26px rgba(34,211,238,.18);
}

.btn-primary:hover,
.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(34,211,238,.24);
}

.btn-ghost,
.btn.ghost {
  background: transparent;
  border-color: rgba(148,163,184,.28);
  color: var(--text);
}

.btn-ghost:hover,
.btn.ghost:hover {
  border-color: var(--brand-2);
  background: rgba(255,255,255,.05);
}

.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,.35);
}

.btn-outline:hover {
  border-color: var(--brand-2);
  background: rgba(255,255,255,.06);
}

.btn-link {
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--brand-2);
}

.btn-link:hover {
  transform: none;
  text-decoration: underline;
  background: transparent;
}

.btn-sm {
  padding: 8px 12px;
  border-radius: 10px;
}

.btn-lg {
  padding: 14px 22px;
  border-radius: 14px;
}

.btn-block,
.btn.w-full {
  width: 100%;
}

.btn-active {
  background: linear-gradient(135deg, #2f5bff, #26c6ff);
  color: #fff;
  border-color: rgba(38,198,255,.8);
  box-shadow:
    0 0 14px rgba(38,198,255,.35),
    0 6px 18px rgba(0,0,0,.35);
}

/* =====================================================
   7. CARDS / SHARED COMPONENTS
   ===================================================== */
.card,
.tvb-card,
.tvg-card {
  padding: 22px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: linear-gradient(
    180deg,
    rgba(18, 28, 48, 0.9),
    rgba(10, 18, 34, 0.95)
  );
  backdrop-filter: blur(6px);
  box-shadow:
    0 10px 35px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.03);
}

.hero-card {
  display: grid;
  gap: 12px;
}

.stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(17,24,38,.68);
  border: 1px solid rgba(255,255,255,.06);
}

.note {
  display: block;
  font-size: 12px;
}

.contact-cta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.contact-cta .actions,
.actions,
.cta,
.cta-row,
.tvb-cta,
.tvb-cta-row,
.tvg-pilot-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.feature-list,
.steps,
.tvb-list,
.tvg-pilot-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  position: relative;
  margin: 8px 0;
  padding-left: 26px;
  color: var(--text);
}

.feature-list li::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(45deg, #10b981, #34d399);
  box-shadow: 0 0 0 2px rgba(16,185,129,.25);
}

.steps {
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  margin: 8px 0;
  color: var(--text);
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  font-weight: 800;
  color: #0b0f14;
  background: radial-gradient(circle at 30% 30%, #22d3ee, #4f46e5);
  box-shadow: 0 8px 18px rgba(79,70,229,.35);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* =====================================================
   8. HOMEPAGE
   ===================================================== */
.page-index .hero {
  padding: 72px 0 44px;
}

.page-index .hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  gap: 28px;
  align-items: stretch;
}

.page-index .hero-copy .lead {
  max-width: 40rem;
}

.page-index .hero-copy .cta {
  margin-top: 6px;
}

#what > .container > p,
#why p {
  max-width: 760px;
}

#use-cases .card.item,
#how-home .card.item,
#what .card.item,
#why .card.item {
  height: 100%;
}

.btn.primary:hover {
  transform: translateY(-2px);
}

.tvb-broker-teaser {
  padding: clamp(40px, 6vw, 72px) 0;
  background:
    radial-gradient(1000px 520px at 105% 10%, rgba(34,211,238,.08), transparent 60%),
    radial-gradient(1200px 600px at -5% 40%, rgba(99,102,241,.12), transparent 70%);
}

.tvb-head h2 {
  margin: 0 0 6px;
}

.tvb-sub {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: clamp(15px, 1.4vw, 18px);
  max-width: 52rem;
}

.tvb-benefits {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.tvb-benefits li {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 14px;
  background: rgba(16,24,39,.5);
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.tvb-benefits li:hover {
  transform: translateY(-2px);
  border-color: rgba(99,102,241,.35);
  background: rgba(16,24,39,.7);
}

.tvb-benefits svg {
  width: 20px;
  height: 20px;
  display: block;
  stroke: currentColor;
}

@media (min-width: 820px) {
  .tvb-benefits {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* =====================================================
   9. SEARCH PAGE / TRACKER
   ===================================================== */
.page-search .section {
  padding: 24px 0;
}

.page-search .section:first-of-type {
  padding-top: 36px;
}

.page-search .tti-workflow > h1,
.page-search .tti-workflow > .lead {
  max-width: 58rem;
}

.search-card {
  display: grid;
  gap: 16px;
}

.tms-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

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

.ms-label {
  display: grid;
  gap: 6px;
}

.ms-label-text {
  font-weight: 700;
  color: #dbe4ff;
}

.ms-input-wrap {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: #0e1420;
}

.ms-input {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  line-height: 1.4;
}

.ms-input:focus {
  outline: none;
}

.ms-sites {
  margin: 2px 0 0;
  padding: 0;
  border: 0;
}

.ms-legend {
  margin-bottom: 8px;
  font-weight: 700;
  color: #c8d3f9;
}

.ms-site-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: #0f1726;
  color: #e5e7eb;
  cursor: pointer;
  user-select: none;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.pill-check:hover {
  border-color: rgba(34,211,238,.35);
  background: rgba(17,24,38,.95);
  transform: translateY(-1px);
}

.pill-check input {
  appearance: none;
  position: relative;
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 3px;
  background: transparent;
}

.pill-check input:checked {
  border-color: transparent;
  background: linear-gradient(45deg, var(--brand), var(--brand-2));
}

.pill-check input:checked::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 1px;
  background: rgba(255,255,255,.88);
}

.ms-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ms-hint {
  display: block;
  max-width: 620px;
  font-size: 14px;
}

#tms-preview {
  display: grid;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: rgba(14,20,32,.65);
}

.ms-links {
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.ms-links,
.ms-links a,
.ms-links p,
.ms-links span,
.ms-links div {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ms-links a,
.ms-links p,
.ms-links span,
.ms-links div {
  display: block;
  max-width: 100%;
  min-width: 0;
}

.tms-info-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid rgba(148,163,184,.45);
  border-radius: 999px;
  background: rgba(15,23,42,.8);
  color: var(--text);
  font-size: 13px;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.tms-info-pill span:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(148,163,184,.7);
  border-radius: 999px;
  font-weight: 600;
}

.tms-info-pill:hover {
  transform: translateY(-1px);
  background: rgba(30,64,175,.72);
  border-color: rgba(129,140,248,.9);
}

.ms-explainer {
  overflow: hidden;
  font-size: .94rem;
  transition: max-height .25s ease, opacity .22s ease, margin-top .22s ease, padding .22s ease;
}

.ms-explainer.is-collapsed {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
}

.ms-explainer-title {
  margin-bottom: 6px;
}

.page-search [aria-labelledby="step-1-title"] .card,
.page-search [aria-labelledby="step-2-title"] .card,
.page-search [aria-labelledby="step-3-title"] .card {
  position: relative;
}

.page-search [aria-labelledby="step-1-title"] .card::before,
.page-search [aria-labelledby="step-2-title"] .card::before,
.page-search [aria-labelledby="step-3-title"] .card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 16px 0 0 16px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  opacity: .9;
}

.tti-capture-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.tti-capture-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

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

.tti-form.is-editing {
  padding: 16px;
  border: 1px solid rgba(34,211,238,.45);
  border-radius: 16px;
  background: rgba(34,211,238,.06);
  box-shadow: 0 0 0 3px rgba(34,211,238,.10);
}

.tti-edit-banner {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(34,211,238,.35);
  background: rgba(34,211,238,.08);
  color: #d9fbff;
  font-weight: 600;
}

#tti-status {
  min-height: 24px;
  font-weight: 600;
}

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

.tti-field {
  display: grid;
  gap: 6px;
}

.tti-input {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: #0e1420;
  color: var(--text);
}

.tti-input:focus {
  outline: none;
  box-shadow: var(--ring);
}

.tti-url {
  grid-column: 1 / -1;
}

.tti-row {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

.tti-table-wrap {
  overflow-x: auto;
  padding-top: 4px;
}

.tti-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
}

.tti-table th,
  .tti-table tr.is-editing-row td {
  background: rgba(79,70,229,.18);
}

.tti-table tr.is-editing-row {
  box-shadow: inset 4px 0 0 var(--brand-2);
}

.tti-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  text-align: left;
  vertical-align: top;
}

.tti-table th {
  color: rgba(255,255,255,.72);
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tti-table {
  width: 100%;
  border-collapse: collapse;
}

.tti-table th,
.tti-table td {
  border: 1px solid rgba(56, 189, 248, 0.28);
  vertical-align: top;
}

.tti-mini {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: .88rem;
}

.tti-event-card {
  border: 1px solid rgba(64, 194, 255, 0.45);
  border-radius: 18px;
  padding: 1rem;
  background: rgba(7, 18, 45, 0.92);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.tti-event-card__header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.tti-event-card__title {
  margin: 0;
  font-size: 1.15rem;
}

.tti-event-card__meta {
  margin: 0.35rem 0 0;
  opacity: 0.9;
}

.tti-event-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-start;
}

.tti-event-card__table-wrap {
  overflow-x: auto;
}

.tti-event-card__table-wrap {
  overflow: hidden; /* THIS is what actually clips the corners */
  border-radius: 14px;
  border: 1px solid rgba(56, 189, 248, 0.28);
}

/* ==========================================
   Compare cards - inner event table styling
   ========================================== */

.tti-event-card__table-wrap {
  overflow-x: auto;
  margin-top: 0.75rem;
}

.tti-event-table thead th:first-child {
  border-top-left-radius: 14px;
}

.tti-event-table thead th:last-child {
  border-top-right-radius: 14px;
}

.tti-event-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 14px;
}

.tti-event-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 14px;
}

.tti-event-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  border: 1px solid rgba(56, 189, 248, 0.28);
  background: rgba(3, 15, 42, 0.96);
}

.tti-event-table thead th {
  padding: 10px 12px;
  text-align: center;
  vertical-align: top;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(79, 70, 229, 0.22);
  border: 1px solid rgba(56, 189, 248, 0.28);
  white-space: nowrap;
}

.tti-event-table tbody td {
  padding: 12px 12px;
  text-align: left;
  vertical-align: top;
  border: 1px solid rgba(56, 189, 248, 0.28);
  background: transparent;
}

.tti-event-table thead th {
  background: rgba(79, 70, 229, 0.28); /* slightly stronger */
  border-bottom: 2px solid rgba(56, 189, 248, 0.5);
}

.tti-event-table tbody tr.is-editing-row td {
  background: rgba(79, 70, 229, 0.18);
}

.tti-event-table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

.tti-event-table tbody tr.is-lowest-price-row td {
  background: rgba(250, 204, 21, 0.10);
}

.tti-event-table tbody tr.is-lowest-allin-row td {
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.22);
}

.tti-event-table a {
  color: var(--brand-2);
  font-weight: 600;
  text-decoration: none;
}

/* Keep labels readable */
.tti-event-table th,
.tti-event-table td {
  text-align: left;
}

/* Center numeric + action columns */
.tti-event-table th:nth-child(6),
.tti-event-table td:nth-child(6), /* Price */

.tti-event-table th:nth-child(7),
.tti-event-table td:nth-child(7), /* Total */

.tti-event-table th:nth-child(8),
.tti-event-table td:nth-child(8), /* Link */

.tti-event-table th:nth-child(9),
.tti-event-table td:nth-child(9) { /* Actions */
  text-align: center;
}

.tti-event-table td {
  vertical-align: middle;
}

.tti-event-table td,
.tti-event-table th {
  padding: 12px 14px;
}

.tti-event-table a:hover {
  text-decoration: underline;
}

.tti-event-table td:last-child {
  white-space: nowrap;
}

.tti-event-table td:last-child .tti-mini {
  display: block;
  width: 100%;
  text-align: center;
  margin-bottom: 0.5rem;
}

.tti-event-table td:last-child .tti-mini:last-child {
  margin-bottom: 0;
}

/* Optional sizing to keep columns closer to the old look */
.tti-event-table th:nth-child(1),
.tti-event-table td:nth-child(1) {
  min-width: 120px;
}

.tti-event-table th:nth-child(5),
.tti-event-table td:nth-child(5) {
  min-width: 115px;
}

.tti-event-table th:nth-child(9),
.tti-event-table td:nth-child(9) {
  min-width: 110px;
}

#tti-event-summary {
  display: none !important;
}

.tms-preset-list {
  display: grid;
  gap: 12px;
}

.tms-preset-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: rgba(14,20,32,.55);
}

.tms-preset-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.tms-preset-name {
  font-weight: 700;
  color: var(--text);
}

.tms-preset-details {
  color: var(--muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.tms-preset-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .tms-preset-card {
    flex-direction: column;
    align-items: stretch;
  }

  .tms-preset-actions .btn {
    width: 100%;
  }
}

.tti-form.is-editing {
  padding: 16px;
  border: 1px solid rgba(34,211,238,.45);
  border-radius: 16px;
  background: rgba(34,211,238,.06);
  box-shadow: 0 0 0 3px rgba(34,211,238,.10);
}

.tti-table tr.is-editing-row td {
  background: rgba(79,70,229,.18);
}

.tti-table tr.is-editing-row {
  box-shadow: inset 4px 0 0 var(--brand-2);
}

#tti-status {
  min-height: 24px;
  font-weight: 600;
}

.tti-form.is-editing + #tti-status,
.tti-form.is-editing ~ #tti-status {
  color: #c7f9ff;
}

.tti-compare-toolbar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tti-sort-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tti-sort-select {
  min-width: 180px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  background: #0e1420;
  color: var(--text);
}

.tti-sort-select:focus {
  outline: none;
  box-shadow: var(--ring);
}

.tti-best-deal-summary {
  margin: 0 0 14px;
}

.tti-best-deal-card {
  padding: 16px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  background:
    radial-gradient(circle at top left, rgba(250,204,21,.10), transparent 45%),
    radial-gradient(circle at top right, rgba(34,211,238,.10), transparent 45%),
    rgba(14,20,32,.70);
}

.tti-best-deal-label {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #0b0f14;
  background: linear-gradient(90deg, #facc15, #fde68a);
}

.tti-best-deal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tti-best-deal-item {
  padding: 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  background: rgba(255,255,255,.03);
}

.tti-best-deal-kicker {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 6px;
}

.tti-best-deal-value {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 4px;
  color: var(--text);
}

.tti-best-deal-meta,
.tti-best-deal-empty {
  color: var(--muted);
  font-size: 14px;
}

.tti-price-badge {
  display: inline-flex;
  margin-left: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  color: #0b0f14;
  background: linear-gradient(90deg, #facc15, #fde68a);
  vertical-align: middle;
}

.tti-price-badge {
  display: inline-block;
  margin-top: 4px;
}

.tti-price-badge {
  vertical-align: middle;
  margin-left: 6px;
}

.tti-price-badge-allin {
  background: linear-gradient(90deg, #22d3ee, #a5f3fc);
}

.tti-table tr.is-lowest-price-row td {
  background: rgba(250, 204, 21, 0.10);
}

.tti-table tr.is-lowest-allin-row td {
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.22);
}

@media (max-width: 640px) {
  .tti-compare-toolbar {
    align-items: stretch;
  }

  .tti-sort-wrap {
    width: 100%;
  }

  .tti-sort-select {
    width: 100%;
  }

  .tti-best-deal-grid {
    grid-template-columns: 1fr;
  }
}
/* =====================================================
   10. BROKERS PAGE
   ===================================================== */
body.tvb-page main {
  background:
    radial-gradient(circle at top center, rgba(99,102,241,.06), transparent 70%),
    radial-gradient(1600px 800px at 70% 0%, rgba(34,211,238,.08), transparent 60%),
    linear-gradient(180deg, #0b0f14 0%, #111826 100%);
}

.tvb-page section {
  padding: 56px 0;
  background: transparent;
}

.tvb-hero {
  margin-bottom: 0;
  padding: 32px 40px;
}

.tvb-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.1;
  padding: 20px;
}

.tvb-hero p {
  max-width: 48rem;
  color: var(--muted);
  font-size: clamp(15px, 1.7vw, 18px);
}

.tvb-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.tvb-panels,
.tvb-row,
.tvb-grid-2 {
  display: grid;
  gap: 20px;
}

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

.tvb-card h3 {
  margin-bottom: 10px;
  color: var(--text);
}

.tvb-card p {
  color: var(--muted);
}

.tvb-list {
  display: grid;
  gap: 10px;
}

.tvb-list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 10px;
}

.tvb-list svg {
  width: 20px;
  height: 20px;
  display: block;
  stroke: currentColor;
}

.tvg-pilot-card {
  display: grid;
  gap: 18px;
}

.tvg-pilot-label h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.tvg-pilot-label p {
  margin: 0;
}

.tvg-pilot-list {
  display: grid;
  gap: 4px;
  font-size: 13px;
  color: #cbd5f5;
}

.tvg-pilot-list li::before {
  content: "•";
  margin-right: 6px;
  color: #22d3ee;
}

/* =====================================================
   11. HOW IT WORKS / PROTOTYPE
   ===================================================== */
.page-prototype .section {
  padding: 56px 0;
}

.page-prototype .lead {
  max-width: 54rem;
}

.page-prototype pre {
  overflow: auto;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  background: #0e1420;
}

/* =====================================================
   12. FORMS
   ===================================================== */
.contact-form,
#contact-form {
  display: grid;
  gap: 12px;
  max-width: 520px;
  margin-top: 14px;
}

.contact-input,
.contact-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  background: #0e1420;
  color: var(--text);
}

input[type="email"],
input[type="text"],
input[type="url"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  background: #0e1420;
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: var(--ring);
}

/* =====================================================
   13. DUPLICATE CHECK PAGE
   ===================================================== */
.verify-page .tvb-container {
  max-width: 1100px;
}

.verify-page .tvb-hero {
  padding: 18px 0 6px;
}

.verify-page .tvb-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 3.2vw, 42px);
}

.verify-page .tvb-hero p {
  max-width: 820px;
}

.verify-page .tvb-card {
  margin-top: 18px;
  padding: 22px 20px;
}

.verify-page .grid-3 .card.item {
  padding: 22px 18px;
}

.verify-page .grid-3 .card.item:first-child {
  padding-left: 24px;
}

.verify-page .tvg-upload-row,
.verify-page .tvg-filter-row,
.verify-page .tvg-feedback-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.verify-page #tvg-file-input,
.tvg-file-label input[type="file"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.verify-page .tvg-file-label,
.tvg-file-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 170px;
  cursor: pointer;
  margin: 0;
}

.verify-page .tvg-file-name,
.tvg-file-name {
  min-width: 180px;
  flex: 1 1 220px;
  color: var(--muted);
}

.verify-page .tvg-upload-row .btn,
.tvg-upload-row .btn {
  white-space: nowrap;
}

.verify-page .tvg-microcopy {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.verify-page .tvg-summary-strip {
  margin-top: 14px;
  min-height: 24px;
}

.verify-page .tvg-filter-row {
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(15,23,42,0.7);
  border: 1px solid rgba(255,255,255,0.06);
}

.verify-page .tvg-filter-spacer {
  flex: 1 1 auto;
}

.verify-page .tvg-filter-select {
  min-width: 190px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(17, 24, 39, 0.95);
  color: #e5e7eb;
  appearance: none;
}

.verify-page .tvg-filter-select:focus {
  outline: none;
  border-color: rgba(34, 211, 238, 0.7);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.verify-page .tvg-table-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-bottom: 10px;
}

.verify-page .tvg-table-wrap {
  overflow: auto;
  max-height: 480px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 8, 23, 0.9);
}

.verify-page #tvg-results-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.94rem;
}

.verify-page #tvg-results-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: left;
  padding: 11px 12px;
  background: #1b2738;
  color: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.verify-page #tvg-results-table thead th:hover {
  color: var(--brand-2);
}

.verify-page #tvg-results-table tbody tr {
  transition: background-color 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease;
}

.verify-page #tvg-results-table tbody tr:hover {
  background: rgba(255,255,255,0.06);
  transform: none;
  box-shadow: none;
}

.verify-page #tvg-results-table tbody tr:not(.tvg-group-label-row):not(.tvg-empty-row) {
  background: rgba(255,255,255,0.02);
}

.verify-page #tvg-results-table tbody tr.tvg-row-approved,
.verify-page #tvg-results-table tbody tr.tvg-clean-row,
.verify-page #tvg-results-table tbody tr[data-decision="Approved"] {
  background: rgba(16,185,129,0.10);
}

.verify-page #tvg-results-table tbody tr.tvg-row-approved:hover,
.verify-page #tvg-results-table tbody tr.tvg-clean-row:hover,
.verify-page #tvg-results-table tbody tr[data-decision="Blocked"] {
  background: rgba(239,68,68,0.10);
}

.verify-page #tvg-results-table tbody tr.tvg-row-blocked,
.verify-page #tvg-results-table tbody tr.tvg-conflict-row,
.verify-page #tvg-results-table tbody tr[data-decision="Blocked"] {
  background: #7a1e1e;
}

.verify-page #tvg-results-table tbody tr.tvg-row-blocked:hover,
.verify-page #tvg-results-table tbody tr.tvg-conflict-row:hover,
.verify-page #tvg-results-table tbody tr[data-decision="Blocked"]:hover {
  background: #912525;
}

.verify-page #tvg-results-table tbody tr.tvg-group-label-row td,
.verify-page #tvg-results-table tr[data-group-summary="true"] td {
  background: #182233;
  color: #d9e7ff;
  font-weight: 700;
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-top: 10px;
  padding-bottom: 10px;
  white-space: normal;
}

.verify-page #tvg-results-table tbody td {
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: middle;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

.verify-page .tvg-empty-row td {
  text-align: center;
  color: var(--muted);
  padding: 24px 16px;
}

.verify-page #tvg-results-table thead th:nth-child(1) { width: 48px; }
.verify-page #tvg-results-table thead th:nth-child(2) { width: 130px; }
.verify-page #tvg-results-table thead th:nth-child(3) { width: 140px; }
.verify-page #tvg-results-table thead th:nth-child(4) { width: 270px; }
.verify-page #tvg-results-table thead th:nth-child(5) { width: 80px; }
.verify-page #tvg-results-table thead th:nth-child(6) { width: 70px; }
.verify-page #tvg-results-table thead th:nth-child(7) { width: 70px; }
.verify-page #tvg-results-table thead th:nth-child(8) { width: 170px; }

.verify-page .tvg-badge,
.verify-page .tvg-status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.verify-page .tvg-badge-approved,
.verify-page .tvg-status-ok {
  background: rgba(16,185,129,0.12);
  color: #bbf7d0;
  border: 1px solid rgba(16,185,129,0.25);
}


.verify-page .tvg-badge-blocked,
.verify-page .tvg-status-risk {
  background: rgba(239,68,68,0.12);
  color: #fecaca;
  border: 1px solid rgba(239,68,68,0.25);
}

.verify-page .tvg-conflict-row {
  box-shadow: inset 4px 0 0 rgba(255,90,90,0.7);
}

.verify-page #tvg-download-clean.btn,
.verify-page #tvg-download-clean.btn-ghost {
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.8rem;
  border: 1px solid rgba(148, 163, 253, 0.35);
  color: rgba(226, 232, 240, 0.9);
  background: radial-gradient(
    circle at top left,
    rgba(148, 163, 253, 0.16),
    rgba(15, 23, 42, 1)
  );
  transition: all 0.16s ease;
}

.verify-page #tvg-download-clean:hover:not(:disabled) {
  border-color: rgba(34, 211, 238, 0.7);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.25);
  transform: translateY(-1px);
}

.verify-page #tvg-download-clean:disabled {
  opacity: 0.35;
  cursor: default;
  box-shadow: none;
  transform: none;
}

.verify-page #tvg-analyze-btn {
  transition: all 0.18s ease, box-shadow 0.18s ease;
}

.verify-page #tvg-analyze-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: transparent !important;
  color: var(--text) !important;
  border-color: rgba(148,163,184,.28) !important;
  box-shadow: none !important;
}

.verify-page #tvg-analyze-btn.btn-active {
  background: linear-gradient(135deg, #2f5bff, #26c6ff) !important;
  color: #ffffff !important;
  border-color: rgba(38, 198, 255, 0.85) !important;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06) inset,
    0 0 14px rgba(38, 198, 255, 0.28),
    0 8px 20px rgba(20, 60, 140, 0.35) !important;
}

.verify-page #tvg-analyze-btn.btn-active:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08) inset,
    0 0 18px rgba(38, 198, 255, 0.38),
    0 10px 24px rgba(20, 60, 140, 0.42) !important;
}

/* =====================================================
   14. FOOTER
   ===================================================== */
footer {
  padding: 32px 0 60px;
  border-top: 1px solid rgba(255,255,255,.08);
  color: var(--muted);
}

.footer-bar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

/* =====================================================
   15. UTILITIES
   ===================================================== */
.mb-10 { margin-bottom: 10px; }
.mt-6 { margin-top: 6px; }
.mt-8 { margin-top: 8px; }
.flex { display: flex; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.w-100 { width: 100%; }
.block { display: block; }

/* =====================================================
   16. RESPONSIVE
   ===================================================== */
@media (max-width: 900px) {
  .page-index .hero {
    padding: 56px 0 32px;
  }

  .page-index .hero-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .page-index .cta,
  .cta,
  .cta-row,
  .actions,
  .tvb-cta,
  .tvb-cta-row,
  .tvg-pilot-actions,
  .contact-cta .actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-index .cta .btn,
  .cta .btn,
  .cta-row .btn,
  .actions .btn,
  .tvb-cta .btn,
  .tvb-cta-row .btn,
  .contact-cta .actions .btn {
    width: auto;
    min-width: 56%;
  }

  .tti-grid,
  .tvb-grid-2,
  .tvb-row {
    grid-template-columns: 1fr;
  }

  .tti-row,
  .ms-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ms-actions .btn {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .verify-page .tvb-card {
    padding: 18px;
  }

  .verify-page .tvg-upload-row,
  .verify-page .tvg-filter-row,
  .verify-page .tvg-feedback-row {
    align-items: stretch;
  }

  .verify-page .tvg-filter-select,
  .verify-page .tvg-upload-row .btn,
  .verify-page .tvg-file-label,
  .verify-page .tvg-file-name {
    width: 100%;
    min-width: 0;
  }

  .verify-page .tvg-filter-spacer {
    display: none;
  }
}

@media (max-width: 640px) {
  .tms-header-row {
    flex-direction: row;
    align-items: center;
  }

  .tms-info-pill {
    padding-inline: 8px;
    font-size: 12px;
  }

  .page-search .section {
    padding: 18px 0;
  }

  #tms-preview {
    padding: 12px;
  }
}

/* =====================================================
   17. REDUCED MOTION
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto;
  }

  .btn,
  .btn:hover,
  .btn:active,
  .topnav a,
  .nav-link,
  .tvb-benefits li,
  .tms-info-pill,
  .pill-check,
  .verify-page #tvg-results-table tbody tr {
    transition: none !important;
    transform: none !important;
    box-shadow: none !important;
  }
}