/**
 * PFTrace Design System
 * Registry-style interface
 */

/* =============================================================================
   RESET & BASE
   ============================================================================= */

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

body {
  font-family: monospace;
  max-width: 800px;
  margin: 2rem auto;
  background: #f9f9f9;
  color: #333;
  line-height: 1.6;
  padding: 0 1rem;
}

/* =============================================================================
   CARD CONTAINER
   ============================================================================= */

.card {
  background: white;
  padding: 2rem;
  border: 1px solid #ddd;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* =============================================================================
   TYPOGRAPHY
   ============================================================================= */

h1 {
  border-bottom: 2px solid #333;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

h2 {
  margin-top: 2rem;
  color: #444;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1rem;
}

ul {
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.5rem;
}

a {
  color: #0066cc;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* =============================================================================
   HEADER NAV
   ============================================================================= */

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

.nav-brand a {
  font-size: 1.5rem;
  font-weight: bold;
  color: #333;
  text-decoration: none;
}

.nav-brand a:hover {
  text-decoration: none;
}

.nav-subtitle {
  display: block;
  font-size: 0.75rem;
  color: #666;
}

.nav-links {
  display: flex;
  gap: 1rem;
}

.nav-links a {
  color: #666;
  font-size: 0.9rem;
}

.nav-links a:hover {
  color: #0066cc;
}

/* =============================================================================
   ARTICLE FEATURED IMAGE
   ============================================================================= */

.article-featured-image {
  margin: 1.5rem 0;
  text-align: center;
}

.article-featured-image img {
  max-width: 50%;
  height: auto;
  border: 1px solid #eee;
}

/* Article content styling */
.article-content strong,
.article-content b {
  color: #000;
  letter-spacing: 0.02em;
}

/* =============================================================================
   GLOSSARY LIST
   ============================================================================= */

.glossary-list dt {
  font-weight: bold;
  margin-top: 1rem;
  color: #333;
}

.glossary-list dt:first-child {
  margin-top: 0;
}

.glossary-list dd {
  margin: 0.25rem 0 0 0;
  padding-left: 1rem;
  color: #666;
  border-left: 2px solid #eee;
}


/* =============================================================================
   STATUS BAR (Yellow info bar)
   ============================================================================= */

.status-bar {
  background: #fff3cd;
  border: 1px solid #ffeeba;
  color: #856404;
  padding: 1rem;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.status-bar strong {
  font-weight: bold;
}

/* =============================================================================
   REGISTRY TABLE (Simple 2-column layout)
   ============================================================================= */

.registry-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.registry-table th,
.registry-table td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #eee;
}

.registry-table th {
  background: #fafafa;
  font-weight: bold;
  font-size: 0.85rem;
  color: #666;
  border-bottom: 2px solid #ddd;
}

.registry-table td a {
  color: #0066cc;
  text-decoration: none;
}

.registry-table td a:hover {
  text-decoration: underline;
}

/* =============================================================================
   FIRM GRID (3-column layout with verified dates)
   ============================================================================= */

.registry-legend {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 1rem;
  text-align: left;
}

.tick {
  color: #16a34a;
  font-weight: bold;
}

.firm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .firm-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

.firm-card {
  padding: 0.75rem;
  border: 1px solid #eee;
  background: #fafafa;
}

.firm-card a {
  color: #0066cc;
  text-decoration: none;
  display: block;
  font-weight: 500;
}

.firm-card a:hover {
  text-decoration: underline;
}

.firm-verified {
  font-size: 0.8rem;
  color: #666;
  margin-top: 0.15rem;
}

.firm-verified .tick {
  margin-right: 0.25rem;
}

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

/* =============================================================================
   DIRECTORY GRID (Legacy - kept for reference)
   ============================================================================= */

.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.directory-item {
  padding: 0.75rem;
  border: 1px solid #eee;
  background: #fafafa;
}

.directory-item a {
  color: #0066cc;
  text-decoration: none;
  display: block;
  font-weight: 500;
}

.directory-item a:hover {
  text-decoration: underline;
}

.directory-item .meta {
  font-size: 0.8rem;
  color: #888;
  margin-top: 0.25rem;
}

/* =============================================================================
   AFFILIATE SECTION
   ============================================================================= */

.affiliate-section {
  border-left: 3px solid #f59e0b;
}

.affiliate-note {
  font-size: 0.85rem;
  color: #666;
  font-style: italic;
  margin-bottom: 1rem;
}

.affiliate-disclosure {
  font-size: 0.8rem;
  color: #888;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px dashed #ddd;
  font-style: italic;
}

/* =============================================================================
   FOOTER
   ============================================================================= */

.footer {
  margin-top: 3rem;
  font-size: 0.85rem;
  color: #666;
  border-top: 1px solid #ddd;
  padding-top: 1.5rem;
  text-align: center;
}

.footer p {
  margin-bottom: 0.75rem;
}

.footer-small {
  font-size: 0.75rem;
  color: #999;
}

.footer-links {
  font-size: 0.8rem;
}

.footer-links a {
  color: #666;
  text-decoration: underline;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-copyright {
  font-size: 0.75rem;
  color: #999;
  margin-top: 1rem;
}

/* =============================================================================
   ASSERTION TEXT (Prop Firm Page)
   ============================================================================= */

.assertion-text {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f9f9f9;
  border-left: 3px solid #ddd;
}

/* =============================================================================
   UPDATE POLICY SECTION
   ============================================================================= */

.update-policy {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
}

.update-policy h2 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.update-policy p {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.6;
}

/* =============================================================================
   OBSERVATION CARD (Firm Page)
   ============================================================================= */

.observation-card {
  background: #fafafa;
  border: 1px solid #ddd;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.observation-card .header,
.observation-header {
  font-weight: bold;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  margin-top: 0;
  font-size: 1.1rem;
}

.observation-row {
  display: flex;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}

.observation-row:last-child {
  border-bottom: none;
}

.observation-label {
  width: 170px;
  flex-shrink: 0;
  color: #666;
}

.observation-value {
  flex: 1;
}

/* =============================================================================
   CHANGE TRACE
   ============================================================================= */

.change-trace {
  margin: 2rem 0;
}

.change-trace h2 {
  margin-top: 0;
}

.trace-list {
  list-style: none;
  padding: 0;
}

.trace-item {
  display: flex;
  gap: 1rem;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  border-bottom: 1px solid #eee;
}

.trace-date {
  color: #888;
  flex-shrink: 0;
  width: 120px;
}

.trace-event {
  color: #666;
}

/* Grouped Change Trace */
.trace-grouped {
  margin-top: 1rem;
}

.trace-month {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #eee;
}

.trace-month:last-child {
  border-bottom: none;
}

.trace-month-title {
  font-size: 0.95rem;
  color: #333;
}

.trace-month p {
  font-size: 0.85rem;
  color: #666;
  margin: 0.25rem 0 0 0;
}

/* =============================================================================
   BREADCRUMB
   ============================================================================= */

.breadcrumb {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: #666;
}

.breadcrumb a:hover {
  color: #0066cc;
}

/* =============================================================================
   UTILITIES
   ============================================================================= */

.text-muted {
  color: #888;
}

.text-sm {
  font-size: 0.9rem;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-1 {
  margin-bottom: 1rem;
}

.mb-2 {
  margin-bottom: 2rem;
}

.mt-1 {
  margin-top: 1rem;
}

.mt-2 {
  margin-top: 2rem;
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 600px) {
  body {
    margin: 1rem auto;
    padding: 0 0.5rem;
  }

  .card {
    padding: 1rem;
  }

  .nav-logo {
    height: 32px;
  }

  .footer-content {
    flex-direction: column;
  }

  .footer-logo {
    margin-top: 1rem;
  }

  .footer-logo img {
    width: 150px;
  }

  .observation-row {
    flex-direction: column;
    gap: 0.25rem;
  }

  .observation-label {
    width: auto;
    font-weight: bold;
  }
}

/* =============================================================================
   REGISTRY REFERENCES (Citation-style section for prop firm tags)
   ============================================================================= */

.registry-references {
  margin-top: 2rem;
  padding: 1rem;
  background: #f9f9f9;
  border-left: 3px solid #ddd;
  font-size: 0.85rem;
}

.registry-references h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #555;
  margin: 0 0 0.75rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.registry-references ul {
  margin: 0;
  padding-left: 1.25rem;
}

.registry-references li {
  margin-bottom: 0.35rem;
}

.registry-references a {
  color: #0066cc;
}

.registry-references a:hover {
  text-decoration: underline;
}

/* =============================================================================
   PROMO CONTENT (Promotional/Affiliate pages)
   ============================================================================= */

.promo-post {
  max-width: 800px;
}

.promo-content {
  /* Promo content can have more vibrant styling */
}

.promo-content a {
  color: #0066cc;
  font-weight: 500;
}

.promo-content strong {
  color: #222;
}