/* Cellular Advisory — shared stylesheet */

:root {
  --navy: #0b2545;
  --blue: #1361a8;
  --blue-light: #eaf3fb;
  --white: #ffffff;
  --gray-50: #f7f9fb;
  --gray-100: #eef1f5;
  --gray-300: #cbd5e1;
  --gray-500: #64748b;
  --gray-700: #334155;
  --text: #1a2733;
  --radius: 10px;
  --max-width: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header / Nav ---------- */

.site-header {
  border-bottom: 1px solid var(--gray-100);
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 100;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Brand lockup (Claude Implementation Brief: MA Brand System) -- logo image
   (house mark + initials + "Brotherly Love", baked into assets/ma-logo.png)
   on the left, MAY Assistant wordmark on the right. Two separate links, both
   pointing home, per the brief's interaction requirements. Replaces the
   former plain-text .brand/.brand-name/.brand-tagline classes. */
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  min-height: 44px; /* touch target */
}

.brand-logo-link:hover,
.brand-name-link:hover {
  opacity: 0.85;
}

.brand-logo-link:focus-visible,
.brand-name-link:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

.brand-logo {
  display: block;
  height: 44px;
  width: auto;
}

.brand-name-link {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--navy);
  text-decoration: none;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .brand-lockup {
    flex-direction: column;
    gap: 4px;
  }
  .brand-logo {
    height: 36px;
  }
  .brand-name-link {
    font-size: 1.05rem;
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li {
  flex-shrink: 0; /* never squeeze an item's width -- that's what was forcing "How It Works" / "Market Trends" to wrap onto two lines */
}

.nav-links a {
  display: inline-block;
  color: var(--gray-700);
  font-weight: 500;
  font-size: 0.95rem;
  font-family: inherit;
  white-space: nowrap; /* keep every link's text on one line, side by side, matching the brand wordmark's treatment */
  line-height: 1.2;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--blue);
}

.nav-cta {
  background: var(--blue);
  color: var(--white) !important;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
}
.nav-cta:hover { background: var(--navy); text-decoration: none; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--navy);
  cursor: pointer;
}

/* Prominent "Log In / Sign Up" pill, top-right of the header (KW-style). */
.nav-auth-pill {
  background: var(--navy);
  color: var(--white) !important;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.88rem;
  white-space: nowrap;
  margin-left: 20px;
}
.nav-auth-pill:hover { background: var(--blue); text-decoration: none; }

@media (max-width: 800px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-auth-pill { padding: 9px 16px; font-size: 0.82rem; margin-left: 12px; }
  .nav-wrap.open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-100);
    gap: 16px;
    z-index: 99;
  }
}

/* ---------- Hero ---------- */

.hero {
  background: linear-gradient(180deg, var(--blue-light) 0%, var(--white) 100%);
  padding: 72px 0 64px;
  text-align: center;
}

.hero h1 {
  font-size: 2.6rem;
  color: var(--navy);
  margin: 0 0 12px;
  line-height: 1.15;
}

.hero .slogan {
  font-size: 1.1rem;
  color: var(--blue);
  font-weight: 600;
  letter-spacing: 0.03em;
  margin: 0 0 20px;
}

.hero p.lead {
  max-width: 640px;
  margin: 0 auto 32px;
  font-size: 1.15rem;
  color: var(--gray-700);
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Hero v2 (animated, split layout) ---------- */

.hero-v2 {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #0b2545 0%, #123a6b 100%);
  padding: 88px 0 96px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-bg .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  animation: orb-float 16s ease-in-out infinite;
}

.orb-1 {
  width: 420px; height: 420px;
  background: #1361a8;
  top: -140px; left: -100px;
  animation-delay: 0s;
}
.orb-2 {
  width: 360px; height: 360px;
  background: #2f7fd6;
  bottom: -160px; right: -80px;
  animation-delay: -5s;
}
.orb-3 {
  width: 260px; height: 260px;
  background: #6ea6e0;
  top: 40%; left: 55%;
  animation-delay: -10s;
}

@keyframes orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -20px) scale(1.08); }
}

.hero-v2-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-v2-inner { grid-template-columns: 1fr; }
  .hero-v2-visual { order: -1; }
}

.badge-light {
  background: rgba(255,255,255,0.12);
  color: #cfe3f7;
}

.hero-v2-copy h1 {
  font-size: 2.7rem;
  line-height: 1.15;
  color: var(--white);
  margin: 14px 0 16px;
}

.hero-v2-copy .lead {
  font-size: 1.12rem;
  color: #cfe3f7;
  max-width: 520px;
  margin: 0 0 28px;
}

.hero-v2-copy .hero-actions { justify-content: flex-start; }

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.5rem; color: var(--white); }
.hero-stats span { font-size: 0.82rem; color: #9db8d6; margin-top: 2px; }

/* Entrance animation for hero content -- plays once on load, not tied to
   scroll (the hero is already in view). Two elements, staggered. */
.hero-anim {
  animation: hero-fade-up 0.8s ease forwards;
  opacity: 0;
}
.hero-anim-delay-1 { animation-delay: 0.22s; }

@keyframes hero-fade-up {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Phone mockup (animated SMS demo) ---------- */

.phone-mockup {
  width: 300px;
  margin: 0 auto;
  background: #0e1b2b;
  border-radius: 34px;
  padding: 14px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.06);
}

.phone-notch {
  width: 90px;
  height: 18px;
  background: #0e1b2b;
  border-radius: 0 0 14px 14px;
  margin: 0 auto 6px;
  position: relative;
}
.phone-notch::after {
  content: '';
  position: absolute;
  top: 6px; left: 50%;
  transform: translateX(-50%);
  width: 40px; height: 5px;
  border-radius: 999px;
  background: #1c2c40;
}

.phone-screen {
  background: var(--white);
  border-radius: 22px;
  padding: 16px 14px;
  min-height: 380px;
  display: flex;
  flex-direction: column;
}

.phone-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-100);
  margin-bottom: 14px;
}

.phone-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue);
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.phone-name { font-weight: 700; color: var(--navy); font-size: 0.9rem; }
.phone-status { font-size: 0.72rem; color: var(--gray-500); }

.phone-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bubble {
  max-width: 84%;
  padding: 9px 13px;
  border-radius: 16px;
  font-size: 0.82rem;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  animation: bubble-in 0.5s ease forwards;
  animation-delay: var(--d, 0s);
}

.bubble-in {
  align-self: flex-start;
  background: var(--gray-100);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.bubble-out {
  align-self: flex-end;
  background: var(--blue);
  color: var(--white);
  border-bottom-right-radius: 4px;
}

@keyframes bubble-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Scroll-reveal (slide-transition-like section entrances) ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

.reveal-delay-1.in-view { transition-delay: 0.1s; }
.reveal-delay-2.in-view { transition-delay: 0.2s; }
.reveal-delay-3.in-view { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .hero-anim, .bubble, .hero-bg .orb {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---------- Feature grid ("Everything in one place") ---------- */

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; }
}

.feature-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 24px;
  color: inherit !important;
  text-decoration: none !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -20px rgba(11,37,69,0.25);
  border-color: var(--blue);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--blue-light);
  color: var(--blue);
  margin-bottom: 16px;
}
.feature-icon svg { width: 22px; height: 22px; }

.feature-card h3 { margin: 0 0 6px; color: var(--navy); font-size: 1.02rem; }
.feature-card p { margin: 0; color: var(--gray-500); font-size: 0.9rem; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--blue);
  color: var(--white) !important;
}
.btn-primary:hover { background: var(--navy); text-decoration: none; }

.btn-secondary {
  background: var(--white);
  color: var(--blue) !important;
  border-color: var(--blue);
}
.btn-secondary:hover { background: var(--blue-light); text-decoration: none; }

/* ---------- Sections ---------- */

section { padding: 64px 0; }
section.alt { background: var(--gray-50); }

h2 {
  color: var(--navy);
  font-size: 1.9rem;
  margin-bottom: 8px;
}

.section-lead {
  color: var(--gray-500);
  max-width: 680px;
  margin-bottom: 36px;
}

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

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

@media (max-width: 800px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
}

.card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 28px;
}

.card h3 {
  color: var(--navy);
  margin-top: 0;
}

/* ---------- Steps / how it works ---------- */

.step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}

.step-list li {
  counter-increment: step;
  position: relative;
  padding: 20px 0 20px 56px;
  border-bottom: 1px solid var(--gray-100);
}
.step-list li:last-child { border-bottom: none; }

.step-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-list h3 { margin: 0 0 6px; color: var(--navy); font-size: 1.05rem; }
.step-list p { margin: 0; color: var(--gray-700); }

/* ---------- Pricing ---------- */

.price-card {
  border: 2px solid var(--blue);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  max-width: 420px;
  margin: 0 auto;
}

.price-card h3 { color: var(--navy); font-size: 1.4rem; }

.price-card .price-note {
  color: var(--gray-500);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.price-card ul {
  text-align: left;
  padding-left: 20px;
  color: var(--gray-700);
  margin-bottom: 28px;
}

.price-card ul li { margin-bottom: 10px; }

/* ---------- Pricing: billing interval toggle ---------- */

.billing-toggle {
  display: flex;
  justify-content: center;
  gap: 4px;
  background: var(--gray-100);
  border-radius: 999px;
  padding: 4px;
  max-width: 340px;
  margin: 0 auto 32px;
}

.billing-toggle-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--gray-700);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.billing-toggle-btn.active {
  background: var(--white);
  color: var(--blue);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.billing-toggle-badge {
  background: var(--blue-light);
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

/* ---------- Brokerage seat pricing (js/pricing-data.js + pricing-tiers.js) ---------- */

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

.pricing-section { padding: 64px 0; }

.pricing-shell {
  display: grid;
  gap: 24px;
}

.pricing-intro {
  max-width: 760px;
  display: grid;
  gap: 12px;
}

.pricing-eyebrow {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0;
}

.pricing-subhead, .pricing-note {
  max-width: 70ch;
  color: var(--gray-500);
  margin: 0;
}

/* Seat calculator -- above the table, not in the original brief, but a
   cheap live-demo touch since the tier lookup is already client-side. */
.pricing-calculator {
  background: var(--blue-light);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.pricing-calculator label {
  font-weight: 600;
  color: var(--navy);
  font-size: 0.92rem;
}
.pricing-calculator input {
  width: 90px;
  padding: 8px 10px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: 0.95rem;
}
#pricing-seat-result {
  margin: 0;
  font-size: 0.95rem;
  color: var(--gray-700);
  flex-basis: 100%;
}

.pricing-table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 420px; /* ~5-6 rows visible before scrolling -- all 10 tiers live in one compact scroll panel instead of stretching the page */
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
}

.pricing-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  background: var(--white);
}

.pricing-table thead th {
  text-align: left;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
  padding: 16px 20px;
  white-space: nowrap;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-100);
  position: sticky;
  top: 0;
  z-index: 1;
}

.pricing-table tbody th,
.pricing-table tbody td {
  padding: 16px 20px;
  text-align: left;
  border-top: 1px solid var(--gray-100);
  vertical-align: middle;
  color: var(--gray-700);
  font-weight: 400;
}

.pricing-table tbody th { color: var(--navy); font-weight: 600; }

.pricing-table tbody tr:hover { background: var(--gray-50); }

.pricing-tier-badge {
  display: inline-block;
  margin-left: 10px;
  background: var(--blue-light);
  color: var(--blue);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Mobile card stack -- shown instead of the table below 640px (see media
   query at the bottom of this block). */
.pricing-mobile-cards { display: none; }

.pricing-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
}
.pricing-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.pricing-card-top h3 { margin: 0; color: var(--navy); font-size: 1.05rem; }
.pricing-card-top span {
  background: var(--blue-light);
  color: var(--blue);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}
.pricing-card dl { margin: 0; display: grid; gap: 8px; }
.pricing-card dl > div { display: flex; justify-content: space-between; font-size: 0.9rem; }
.pricing-card dt { color: var(--gray-500); }
.pricing-card dd { margin: 0; color: var(--navy); font-weight: 600; }

.pricing-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.pricing-benefits > div {
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--gray-100);
  color: var(--gray-700);
  font-size: 0.9rem;
  font-weight: 500;
}

.pricing-actions { display: flex; justify-content: flex-start; }

@media (max-width: 900px) {
  .pricing-benefits { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .pricing-table-wrap { display: none; }
  .pricing-mobile-cards { display: block; }
}

/* ---------- FAQ ---------- */

.faq-item { border-bottom: 1px solid var(--gray-100); padding: 20px 0; }
.faq-item h3 { margin: 0 0 8px; color: var(--navy); font-size: 1.05rem; }
.faq-item p { margin: 0; color: var(--gray-700); }

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: start;
}

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

.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--navy);
  font-size: 0.92rem;
}
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}
.form-field textarea { resize: vertical; min-height: 120px; }

.contact-info-card {
  background: var(--blue-light);
  border-radius: var(--radius);
  padding: 28px;
}
.contact-info-card h3 { color: var(--navy); margin-top: 0; }
.contact-info-card p { margin: 6px 0; }

.form-status {
  margin-top: 14px;
  font-size: 0.95rem;
}
.form-status.success { color: #0f7a3d; }
.form-status.error { color: #b3261e; }

/* ---------- Legal pages ---------- */

.legal-content h2 { margin-top: 40px; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p, .legal-content li { color: var(--gray-700); }
.legal-updated { color: var(--gray-500); font-size: 0.9rem; margin-bottom: 40px; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy);
  color: var(--gray-100);
  padding: 48px 0 28px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

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

.site-footer h4 {
  color: var(--white);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}

.site-footer a { color: var(--gray-300); }
.site-footer a:hover { color: var(--white); }

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  font-size: 0.85rem;
  color: var(--gray-300);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Market Trends: live ticker (NYSE-style marquee) ---------- */

.ticker-bar {
  background: var(--navy);
  color: var(--white);
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.ticker-bar .ticker-live-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 2;
  background: var(--navy);
  padding: 0 14px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9fd3a3;
  box-shadow: 16px 0 16px -8px var(--navy);
}

.ticker-live-dot .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #33cc66;
  animation: ticker-pulse 1.4s ease-in-out infinite;
}

@keyframes ticker-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(51,204,102,0.6); }
  50% { opacity: 0.55; box-shadow: 0 0 0 4px rgba(51,204,102,0); }
}

.ticker-track {
  display: inline-flex;
  padding: 10px 0 10px 130px;
  animation: ticker-scroll 55s linear infinite;
  will-change: transform;
}

.ticker-bar:hover .ticker-track { animation-play-state: paused; }

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

.ticker-item {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 0 24px;
  font-size: 0.88rem;
  border-right: 1px solid rgba(255,255,255,0.1);
}

.ticker-item .t-name { font-weight: 700; color: var(--white); }
.ticker-item .t-metric { color: #cbd5e1; }
.ticker-item .t-change { font-weight: 700; }
.ticker-item .t-change.up { color: #4ade80; }
.ticker-item .t-change.down { color: #f87171; }
.ticker-item .t-change.flat { color: #cbd5e1; }

/* ---------- Market Trends: rankings + scorecards ---------- */

.freshness-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-100);
  color: var(--gray-700);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.82rem;
  margin-bottom: 24px;
}

.freshness-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gray-500);
}

.rankings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

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

.rankings-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  overflow: hidden;
}

.rankings-table th {
  text-align: left;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-500);
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray-100);
}

.rankings-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.92rem;
}

.rankings-table tr:last-child td { border-bottom: none; }

.rankings-table .rank-num {
  color: var(--gray-500);
  font-weight: 600;
  width: 28px;
}

.score-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.82rem;
}

.score-pill.hot { background: #fde8e8; color: #b3261e; }
.score-pill.cold { background: #e8f0fd; color: #1361a8; }

.attribution-note {
  color: var(--gray-500);
  font-size: 0.82rem;
  border-top: 1px solid var(--gray-100);
  margin-top: 40px;
  padding-top: 20px;
}

/* ---------- TREC Forms directory ---------- */

.forms-toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 28px;
}

.forms-search {
  flex: 1;
  min-width: 220px;
  padding: 11px 14px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
}

.forms-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.forms-tab {
  border: 1px solid var(--gray-300);
  background: var(--white);
  color: var(--gray-700);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.forms-tab.active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

.forms-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 40px;
}

.forms-table th {
  text-align: left;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gray-500);
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray-100);
}

.forms-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.92rem;
  vertical-align: top;
}

.forms-table tr:last-child td { border-bottom: none; }

.forms-table .form-id {
  color: var(--gray-500);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.forms-table .form-date {
  color: var(--gray-500);
  white-space: nowrap;
}

.forms-empty {
  color: var(--gray-500);
  padding: 24px 0;
  text-align: center;
}

.disclaimer-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 20px 24px;
  color: var(--gray-700);
  font-size: 0.9rem;
  margin: 32px 0;
}

.disclaimer-box strong { color: var(--navy); }

/* ---------- Utility ---------- */

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.badge {
  display: inline-block;
  background: var(--blue-light);
  color: var(--blue);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 16px;
}
