/* 3PAO List — single shared stylesheet. No frameworks, no third-party requests. */

:root {
  --bg: #ffffff;
  --bg-soft: #f1f4f7;
  --bg-card: #fbfcfd;
  --ink: #1d2733;
  --muted: #5a6b7d;
  --accent: #1f4e79;
  --accent-dark: #14334f;
  --accent-light: #7fa8cc;
  --accent-soft: #e3edf6;
  --border: #d3dae2;
  --header-bg: #16263f;
  --header-muted: #b9c7d6;
  --radius: 8px;
  --max: 74ch;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover, a:focus-visible { color: var(--accent-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
.wide { max-width: 1020px; }

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #fff; padding: 0.6rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; color: #fff; }

/* Header */
.site-header { border-bottom: 3px solid var(--accent-light); background: var(--header-bg); }
.header-inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.5rem;
  padding-top: 0.9rem; padding-bottom: 0.9rem;
}
.brand {
  font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em;
  color: #fff; text-decoration: none; white-space: nowrap;
}
.brand span { color: var(--accent-light); }
.brand:hover { color: #fff; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; margin-left: auto; }
.site-nav a {
  color: var(--header-muted); text-decoration: none; font-size: 0.95rem; font-weight: 600;
  padding: 0.3rem 0;
}
.site-nav a:hover { color: #fff; }

/* Hero */
.hero {
  background: linear-gradient(180deg, #1d314f 0%, #16263f 100%);
  border-bottom: 1px solid var(--border); padding: 2.75rem 0 2.5rem; color: #fff;
}
.hero h1 { font-size: 2rem; line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.75rem; color: #fff; }
.hero .lede { font-size: 1.12rem; color: #d4dee9; margin: 0 0 1.25rem; max-width: 62ch; }
.hero .tagline {
  color: var(--accent-light); font-weight: 800; letter-spacing: 0.14em;
  text-transform: uppercase; font-size: 0.85rem; margin: 0 0 0.9rem;
}
.hero .updated { font-size: 0.9rem; color: #9fb2c6; margin: 1rem 0 0; }
.hero .updated a { color: #c9d8e8; }

/* Stat strip */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
  margin: 1.5rem 0 0.5rem;
}
.stat {
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.1rem; text-align: center;
}
.stat .num { display: block; font-size: 2rem; font-weight: 800; line-height: 1.1; color: var(--accent-dark); letter-spacing: -0.02em; }
.stat .lbl { display: block; font-size: 0.9rem; color: var(--muted); margin-top: 0.3rem; line-height: 1.4; }
.class-line {
  font-size: 0.95rem; color: var(--muted); margin: 0.75rem 0 0; text-align: center;
}
.class-line strong { color: var(--ink); }

/* Headings */
h2 { font-size: 1.45rem; line-height: 1.3; letter-spacing: -0.015em; margin: 2.5rem 0 0.6rem; padding-top: 0.5rem; border-top: 1px solid var(--border); }
h2:first-of-type { border-top: none; padding-top: 0; }
h3 { font-size: 1.15rem; margin: 1.6rem 0 0.4rem; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1.2rem; padding-left: 1.4rem; }
li { margin-bottom: 0.35rem; }
li::marker { color: var(--accent); }
small, .small { font-size: 0.9rem; color: var(--muted); }
strong { font-weight: 700; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em; background: var(--bg-soft); padding: 0.1em 0.35em; border-radius: 4px;
}

/* Directory controls */
.controls {
  display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: end;
  margin: 1.25rem 0 0.75rem;
}
.control { display: flex; flex-direction: column; gap: 0.3rem; }
.control-grow { flex: 1 1 16rem; }
.control label { font-size: 0.9rem; font-weight: 700; color: var(--muted); }
.control input[type="search"], .control select {
  font: inherit; font-size: 1rem; color: var(--ink);
  border: 1.5px solid var(--border); border-radius: 6px;
  padding: 0.5rem 0.7rem; background: #fff; width: 100%;
}
.control input[type="search"]:focus, .control select:focus { border-color: var(--accent); }
.filter-group { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
  font: inherit; font-size: 0.92rem; font-weight: 600;
  background: #fff; color: var(--accent-dark); border: 1.5px solid var(--border);
  border-radius: 999px; padding: 0.35rem 0.9rem; cursor: pointer;
}
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.result-count { font-size: 0.95rem; color: var(--muted); margin: 0 0 0.75rem; }
.filter-note { font-size: 0.9rem; color: var(--muted); margin: 0.75rem 0 0; }

/* Directory table */
.table-wrap { overflow-x: auto; margin: 0.5rem 0 1rem; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
th, td { text-align: left; padding: 0.65rem 0.85rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { background: var(--bg-soft); font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-card); }
.col-num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
th.col-num { text-align: right; }
.col-date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.col-firm a { color: var(--ink); font-weight: 600; text-decoration: none; }
.col-firm a:hover { color: var(--accent); text-decoration: underline; }

/* Class badges */
.badge {
  display: inline-block; font-size: 0.83rem; font-weight: 700; white-space: nowrap;
  border-radius: 999px; padding: 0.15rem 0.65rem; line-height: 1.5;
}
.badge-d { background: #16263f; color: #fff; }
.badge-c { background: #2f6db3; color: #fff; }
.badge-b { background: #dbe4ee; color: #1f4e79; }
.badge-a { background: #e8edf2; color: #5a6b7d; }
.badge-none { background: transparent; color: var(--muted); border: 1px dashed #b9c7d6; font-weight: 600; }
.badge-unknown { background: transparent; color: var(--muted); border: 1px solid #b9c7d6; font-weight: 600; }

/* Empty state */
.empty {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-soft); padding: 1.25rem 1.4rem; margin: 0.5rem 0 1rem;
}
.empty p:last-child { margin-bottom: 0; }

/* Callouts */
.note {
  border: 1px solid var(--border); border-left: 4px solid var(--accent);
  background: var(--bg-soft); border-radius: 6px; padding: 0.9rem 1.1rem; margin: 1.25rem 0;
}
.note p:last-child { margin-bottom: 0; }

/* Buttons */
.button {
  display: inline-block; background: var(--accent-light); color: #101c2b; font-weight: 700;
  text-decoration: none; padding: 0.6rem 1.2rem; border-radius: 8px; margin: 0.25rem 0.5rem 0.25rem 0;
}
.button:hover, .button:focus-visible { background: #a8c4dd; color: #101c2b; }
.button-secondary {
  display: inline-block; background: transparent; color: #fff; font-weight: 700;
  text-decoration: none; padding: 0.55rem 1.15rem; border-radius: 8px;
  border: 1.5px solid var(--accent-light); margin: 0.25rem 0;
}
.button-secondary:hover { background: rgba(127, 168, 204, 0.15); color: #fff; }
.button-dark {
  display: inline-block; background: var(--accent); color: #fff; font-weight: 700;
  text-decoration: none; padding: 0.6rem 1.2rem; border-radius: 8px; margin: 0.25rem 0;
}
.button-dark:hover, .button-dark:focus-visible { background: var(--accent-dark); color: #fff; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); margin-top: 3rem; padding: 2rem 0 2.5rem; font-size: 0.95rem; color: var(--muted); }
.site-footer a { color: var(--muted); }
.site-footer .disclaimer { font-size: 0.9rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.2rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.footer-nav a { font-weight: 600; }

@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .hero h1 { font-size: 1.6rem; }
  .site-nav { margin-left: 0; }
  .header-inner { gap: 0.5rem; }
  .col-date { font-size: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Imagery: hero banner and flag ribbon */
.flag-ribbon {
  height: 14px;
  background: repeating-linear-gradient(to bottom, #b22234 0 2px, #ffffff 2px 4px);
  border-bottom: 1px solid var(--border);
}
.hero-figure { margin: 0; }
.hero-figure img { display: block; width: 100%; height: auto; }
.tagline .flag-mark {
  height: 0.95em; width: auto; vertical-align: -0.12em; margin-right: 0.55em;
  border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 2px;
}
