/* ── EAFunded Design System ── */
/* Shared across firm pages, firms index, blog pages, broker pages */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #F7F6F3;
  --surface: #FFFFFF;
  --accent: #F4622A;
  --accent-light: rgba(244,98,42,0.08);
  --text: #111111;
  --muted: #6B7280;
  --border: #E5E7EB;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --warn: #B45309;
  --warn-bg: rgba(180,83,9,0.08);
  --danger: #DC2626;
  --danger-bg: rgba(220,38,38,0.08);
  --success: #16A34A;
  --success-bg: rgba(22,163,74,0.08);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ── Navigation ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid #F3F4F6;
}

.logo {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.logo span { color: var(--accent); }

nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
}

nav > a:not(.logo):not(.nav-cta),
nav ul a {
  font-size: 0.9rem;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  transition: color 0.2s ease;
}

nav > a:not(.logo):not(.nav-cta):hover,
nav ul a:hover { color: var(--accent); }

.nav-cta {
  background: var(--accent);
  color: white !important;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.nav-cta:hover { background: #D4501F !important; }

/* ── Wrappers ── */
.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

.wrap-wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

.article-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

/* ── Breadcrumb ── */
.breadcrumb {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 2rem;
  font-weight: 400;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--muted); margin: 0 0.4rem; }

/* ── Page / section tags ── */
.firm-tag, .page-tag, .article-tag, .section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  background: white;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 1rem;
  margin-bottom: 1rem;
}

/* ── Headings ── */
h1 {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.75rem;
}

h1 .accent { color: var(--accent); }

h2 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0.75rem 0 1rem 1.5rem; }
li { margin-bottom: 0.35rem; }

/* ── Buttons ── */
.btn-primary {
  background: var(--accent);
  color: white !important;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
  display: inline-block;
  text-align: center;
}

.btn-primary:hover { background: #D4501F; }

.btn-secondary {
  background: transparent;
  color: var(--text) !important;
  padding: 0.75rem 1.75rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-block;
  text-align: center;
}

.btn-secondary:hover { background: var(--text); color: white !important; }

/* ── Badges ── */
.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.badge-green { background: var(--success-bg); color: var(--success); }
.badge-yellow { background: var(--warn-bg); color: var(--warn); }
.badge-red { background: var(--danger-bg); color: var(--danger); }
.badge-blue { background: var(--accent-light); color: var(--accent); }

/* ── Firm header ── */
.firm-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.firm-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.updated-date {
  font-size: 0.85rem;
  color: var(--muted);
}

.cta-block {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 200px;
}

/* ── Score bar ── */
.score-bar {
  background: white;
  border-radius: 16px;
  padding: 1.5rem 2rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow);
}

.score-grid {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
}

.score-item {
  flex: 1;
  min-width: 120px;
  padding: 0 1.5rem 0 0;
  border-right: 1px solid var(--border);
}

.score-item:last-child { border-right: none; padding-right: 0; }
.score-item:first-child { padding-left: 0; }

.score-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.4rem;
}

.score-value {
  font-size: 1.15rem;
  font-weight: 700;
  display: block;
  color: var(--text);
}

.score-value.green { color: var(--success); }
.score-value.yellow { color: var(--warn); }
.score-value.red { color: var(--danger); }
.score-value.blue { color: var(--accent); }

/* ── Section ── */
.section { margin: 2.5rem 0; }

/* ── Data table ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.data-table tr { border-bottom: 1px solid #F9FAFB; transition: background 0.15s ease; }
.data-table tr:last-child { border-bottom: none; }
.data-table tr:hover { background: #FAFAF9; }

.data-table td {
  padding: 0.85rem 1.25rem;
  vertical-align: top;
}

.data-table td:first-child {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  width: 40%;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.data-table td:last-child { color: var(--text); }

/* ── Verdict box ── */
.verdict-box {
  background: white;
  border-radius: 16px;
  border-left: 4px solid var(--accent);
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: var(--shadow);
}

.verdict-box h3 {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.verdict-box p {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 0;
}

/* ── Warning box ── */
.warning-box {
  background: rgba(180,83,9,0.04);
  border-radius: 12px;
  border-left: 4px solid var(--warn);
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.warning-box h3 {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--warn);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.warning-box ul { margin-left: 1.25rem; }
.warning-box li { font-size: 0.9rem; margin-bottom: 0.5rem; color: var(--text); }

/* ── Related cards ── */
.related-grid { display: flex; flex-direction: column; gap: 0; margin-top: 1rem; }

.related-card {
  background: white;
  border-radius: 0;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
  padding: 1.25rem 1rem;
  text-decoration: none;
  display: block;
  transition: border-left-color 0.15s ease, background 0.15s ease;
}

.related-card:first-child { border-radius: 12px 12px 0 0; }
.related-card:last-child { border-radius: 0 0 12px 12px; border-bottom: none; }

.related-card:hover {
  background: #FAFAF9;
  border-left-color: var(--accent);
}

.related-card-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.related-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.related-card p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0;
  line-height: 1.5;
}

/* ── Disclaimer ── */
.disclaimer {
  background: white;
  border-radius: 12px;
  border-left: 3px solid var(--border);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  box-shadow: var(--shadow);
}

.disclaimer p {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0;
}

/* ── Firms index: filter bar ── */
.page-desc {
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 2.5rem;
  font-size: 1rem;
  line-height: 1.7;
}

.filters {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-btn {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.4rem 1rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
  font-weight: 600;
}

/* ── Firms index: firm grid ── */
.firm-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.firm-card {
  background: white;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.firm-card:last-child { border-bottom: 1px solid var(--border); }
.firm-card:hover { background: #FAFAF9; border-color: #D1D5DB; }

.firm-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.firm-card-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.firm-card-name:hover { color: var(--accent); }

.firm-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
}

.stat { background: transparent; }

.stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.stat-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.firm-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.firm-card-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.detail-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.detail-link:hover { color: #D4501F; }

.cta-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: white;
  background: var(--accent);
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.cta-link:hover { background: #D4501F; }

.hidden { display: none; }

/* ── Blog: article meta ── */
.article-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 400;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

/* ── Blog: article body ── */
.article-body h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.01em;
}

.article-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 1.75rem 0 0.75rem;
}

.article-body p { margin-bottom: 1.25rem; color: var(--text); }

.article-body ul,
.article-body ol { margin: 1rem 0 1.5rem 1.5rem; }

.article-body li { margin-bottom: 0.5rem; }

.article-body strong { color: var(--text); font-weight: 700; }

.article-body a:not(.btn-primary) {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(244,98,42,0.3);
  transition: border-color 0.2s ease;
}

.article-body a:not(.btn-primary):hover { border-color: var(--accent); }

/* ── Blog index: grid and cards ── */
.blog-grid { display: flex; flex-direction: column; gap: 2rem; margin-top: 2rem; }

.blog-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.blog-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
  border-color: var(--accent);
}

.blog-card-meta {
  display: flex;
  gap: 1.25rem;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.blog-card h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.blog-card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.blog-card-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-light);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  margin-right: 0.75rem;
}

.read-more {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
}

/* ── Blog: rule card ── */
.rule-card {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 1.5rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow);
}

.rule-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.rule-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.rule-card p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

/* ── Blog: TOC ── */
.toc {
  background: white;
  border-radius: 12px;
  border-left: 4px solid var(--accent);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  box-shadow: var(--shadow);
}

.toc-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.toc ol { margin-left: 1.25rem; }

.toc li {
  font-size: 0.875rem;
  margin-bottom: 0.4rem;
  font-weight: 500;
}

.toc a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.toc a:hover { color: var(--accent); }

/* ── Blog: checklist ── */
.checklist {
  background: rgba(22,163,74,0.04);
  border-radius: 12px;
  border-left: 4px solid var(--success);
  padding: 1.5rem;
  margin: 2rem 0;
}

.checklist h3 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--success);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.checklist ul { margin-left: 0; list-style: none; }

.checklist li {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  padding-left: 1.75rem;
  position: relative;
  color: var(--text);
}

.checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

/* ── Blog: CTA box ── */
.cta-box {
  background: white;
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 2rem;
  margin: 2.5rem 0;
  text-align: center;
  box-shadow: var(--shadow);
}

.cta-box p {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

/* ── Blog: pros-cons grid ── */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

/* ── Footer ── */
footer {
  background: white;
  border-top: 1px solid var(--border);
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  flex-wrap: wrap;
}

footer a {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  margin: 0;
}

footer a:hover { color: var(--accent); }

.footer-copy {
  font-size: 0.8rem;
  color: var(--muted);
  width: 100%;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  margin-top: 0.25rem;
  line-height: 1.6;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  nav ul { display: none; }
  .nav-cta { display: none; }

  .wrap, .wrap-wide { padding: 2rem 1rem 3rem; }
  .article-wrap { padding: 2rem 1rem 3rem; }

  .firm-header { flex-direction: column; }
  .cta-block { width: 100%; }

  .score-grid { flex-wrap: wrap; gap: 1rem; }
  .score-item {
    flex: 0 0 calc(50% - 0.5rem);
    border-right: none;
    padding-right: 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
  }
  .score-item:nth-last-child(-n+2) { border-bottom: none; }

  .data-table { font-size: 0.82rem; }
  .data-table td { padding: 0.75rem 1rem; }
  .data-table td:first-child { width: 38%; }

  .firm-card-stats { grid-template-columns: repeat(3, 1fr); }

  .article-meta { gap: 0.75rem; }
  .toc { padding: 1rem 1.25rem; }
  .rule-card { padding: 1.25rem; }
  .checklist { padding: 1.25rem; }
  .cta-box { padding: 1.5rem 1rem; }
  .pros-cons { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .wrap, .wrap-wide { padding: 1.5rem 0.75rem 2.5rem; }
  .article-wrap { padding: 1.5rem 0.75rem 2.5rem; }

  .firm-card-stats { grid-template-columns: repeat(2, 1fr); }
  .firm-card-footer { flex-direction: column; align-items: flex-start; gap: 0.5rem; }

  .article-meta { flex-direction: column; gap: 0.4rem; }

  .data-table td:first-child { width: 34%; }

  footer { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
}
