/* ─── Registry page styles ─── */
/* Inherits design tokens from the main landing page :root */

:root {
  --bg:        #f0efeb;
  --surface:   #e8e7e3;
  --surface-2: #dddcd8;
  --border:    #d4d4d4;
  --text:      #111827;
  --muted:     #374151;
  --green:     #16a34a;
  --red:       #dc2626;
  --blue:      #2563eb;
  --amber:     #d97706;
  --accent:    #111827;
  --sans:  'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:  'Geist Mono', 'Fira Code', Consolas, 'Courier New', monospace;
  --radius: 8px;
  --max-w: 1100px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

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

/* ─── Navigation (matches landing) ─── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.3px;
  color: var(--accent);
  margin-right: auto;
}
.nav-logo svg { flex-shrink: 0; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.nav-links a {
  font-size: 14px;
  color: var(--muted);
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }

/* ─── Page header ─── */
.registry-header {
  padding: 80px 0 48px;
}
.registry-header h1 {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.1;
  color: var(--accent);
  margin-bottom: 16px;
}
.registry-header p {
  font-size: 17px;
  color: var(--muted);
  max-width: 600px;
  line-height: 1.6;
}

/* ─── Score legend ─── */
.score-legend {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 32px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ─── Registry table ─── */
.registry-table-wrapper {
  padding: 0 0 96px;
}
.registry-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 32px;
}
.registry-table thead th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  padding: 12px 16px;
  border-bottom: 2px solid var(--border);
}
.registry-table tbody td {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  vertical-align: middle;
}
.registry-table tbody tr:hover {
  background: var(--surface);
}

/* ─── Name + address cell ─── */
.fac-name {
  font-weight: 600;
  color: var(--text);
  display: block;
}
.fac-address {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

/* ─── Trust score pill ─── */
.score-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}
.score-pill--high     { background: var(--green); }
.score-pill--moderate { background: var(--amber); }
.score-pill--low      { background: var(--red); }
.score-pill--muted    { background: #9CA3AF; }

/* ─── Detail cell badges ─── */
.detail-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-family: var(--mono);
  padding: 2px 8px;
  border-radius: 100px;
  border: 1px solid;
}
.detail-badge--yes { color: #15803d; border-color: #bbf7d0; background: #f0fdf4; }
.detail-badge--no  { color: var(--muted); border-color: var(--border); background: var(--surface); }

/* ─── Expand row ─── */
.expand-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--muted);
  transition: transform 0.2s;
  font-size: 14px;
  font-family: var(--sans);
}
.expand-btn:hover { color: var(--text); }
.expand-btn[aria-expanded="true"] { transform: rotate(90deg); }

.detail-row td {
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
}
.detail-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.detail-row.open .detail-content {
  max-height: 400px;
  padding: 16px 0;
}

/* ─── Score breakdown grid ─── */
.breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.breakdown-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
}
.breakdown-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 4px;
}
.breakdown-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.breakdown-value small {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

/* ─── Embed section ─── */
.embed-section {
  padding: 48px 0 96px;
  border-top: 1px solid var(--border);
}
.embed-section h2 {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--accent);
  margin-bottom: 8px;
}
.embed-section p {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 24px;
}
.embed-code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
  overflow-x: auto;
  white-space: pre;
  line-height: 1.6;
}

/* ─── Footer ─── */
.registry-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.registry-footer a {
  color: var(--text);
  font-weight: 500;
}

/* ─── FAQ ─── */
.faq-section {
  padding: 64px 0;
  border-top: 1px solid var(--border);
}
.faq-section h2 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 24px;
}
.faq-section details {
  border-bottom: 1px solid var(--border);
}
.faq-section summary {
  padding: 16px 0;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.faq-section summary::-webkit-details-marker { display: none; }
.faq-section summary::before {
  content: "+";
  display: inline-block;
  width: 20px;
  margin-right: 8px;
  color: var(--muted);
  font-weight: 400;
  font-family: var(--mono);
}
.faq-section details[open] > summary::before { content: "\2212"; }
.faq-section details > div {
  padding: 0 0 16px 28px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.faq-section details > div p { margin: 0; }
.faq-section details > div a { color: var(--accent); text-decoration: underline; }
.faq-section details > div code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--surface-2);
  padding: 1px 5px;
  border-radius: 3px;
}

/* ─── Loading / error states ─── */
.loading-state, .error-state {
  text-align: center;
  padding: 64px 0;
  color: var(--muted);
  font-size: 15px;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .registry-header { padding: 48px 0 32px; }
  .score-legend { flex-direction: column; gap: 12px; }
  .registry-table { font-size: 13px; }
  .registry-table thead th,
  .registry-table tbody td { padding: 10px 8px; }
  .breakdown-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
  .hide-mobile { display: none; }
}
