/* Prodigy Directory — fresh site (not agent-registry shell) */
:root {
  --bg: #f6f4f0;
  --surface: #ffffff;
  --ink: #12141a;
  --muted: #5c6470;
  --line: #e4e0d8;
  --accent: #1a4d8c;
  --accent-2: #0f355f;
  --ok: #1f6b4a;
  --ok-bg: #e8f5ee;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(18, 20, 26, 0.06);
  --sans: "IBM Plex Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --max: 1080px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-2); }
.wrap { width: min(var(--max), calc(100% - 2rem)); margin: 0 auto; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(246, 244, 240, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; min-height: 64px; padding: .55rem 0;
}
.brand {
  display: flex; flex-direction: column; gap: 0; text-decoration: none; color: inherit;
}
.brand strong { font-size: 1.05rem; letter-spacing: -.02em; }
.brand span { font-size: .72rem; color: var(--muted); letter-spacing: .04em; }
.nav {
  display: none; gap: 1.1rem; align-items: center; font-weight: 600; font-size: .92rem;
}
.nav a { color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--accent); }
.nav-toggle {
  width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.nav-toggle span {
  display: block; width: 18px; height: 2px; background: var(--ink); position: relative;
}
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.drawer {
  display: none; border-top: 1px solid var(--line); padding: .5rem 0 1rem;
}
.drawer.open { display: block; }
.drawer a {
  display: block; padding: .85rem 0; border-bottom: 1px solid var(--line);
  color: var(--ink); text-decoration: none; font-weight: 600;
}
@media (min-width: 800px) {
  .nav { display: flex; }
  .nav-toggle { display: none; }
  .drawer { display: none !important; }
}

/* type */
h1, h2, h3 { font-family: var(--serif); letter-spacing: -.02em; line-height: 1.15; margin: 0 0 .5rem; }
h1 { font-size: clamp(2rem, 5vw, 2.75rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); }
.lede { font-size: 1.05rem; color: var(--muted); max-width: 36rem; margin: 0 0 1.25rem; }
.eyebrow {
  font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 .55rem;
}

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 46px; padding: .65rem 1.15rem; border-radius: 8px;
  border: 1.5px solid var(--accent); background: var(--accent); color: #fff;
  font-weight: 700; font-size: .92rem; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.btn-ghost {
  background: transparent; color: var(--ink); border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); background: var(--surface); }
.actions { display: flex; flex-wrap: wrap; gap: .55rem; margin: 1rem 0 0; }

/* hero */
.hero { padding: 2.25rem 0 1.5rem; }
.hero-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 1.5rem 1.35rem; box-shadow: var(--shadow);
}
@media (min-width: 800px) {
  .hero-panel { padding: 2rem 2.1rem; }
}

/* search */
.search-bar {
  display: grid; gap: .65rem; margin: 1.25rem 0 0;
}
@media (min-width: 700px) {
  .search-bar { grid-template-columns: 1fr auto; align-items: stretch; }
}
.search-bar input {
  width: 100%; min-height: 48px; padding: .7rem 1rem; border-radius: 8px;
  border: 1px solid var(--line); background: #fafaf8; font: inherit; color: var(--ink);
}
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .85rem 0 0; }
.chip {
  border: 1px solid var(--line); background: #fafaf8; color: var(--muted);
  border-radius: 999px; padding: .35rem .75rem; font-size: .8rem; font-weight: 600;
  cursor: pointer;
}
.chip[aria-pressed="true"] {
  background: var(--ink); color: #fff; border-color: var(--ink);
}

/* cards */
.section { padding: 1.25rem 0 2.5rem; }
.section-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  margin: 0 0 1rem;
}
.section-head p { margin: 0; color: var(--muted); font-size: .9rem; }
.grid {
  display: grid; gap: .85rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .grid { grid-template-columns: 1fr 1fr 1fr; } }
.card {
  display: flex; flex-direction: column; gap: .55rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.05rem; text-decoration: none; color: inherit;
  transition: border-color .15s, box-shadow .15s, transform .15s;
  min-height: 100%;
}
.card:hover {
  border-color: #c9c3b8; box-shadow: var(--shadow); transform: translateY(-1px); color: inherit;
}
.badge {
  display: inline-flex; align-items: center; gap: .3rem; width: fit-content;
  font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ok); background: var(--ok-bg); border-radius: 999px; padding: .28rem .55rem;
}
.card h3 { font-size: 1.15rem; margin: 0; font-family: var(--serif); }
.card p { margin: 0; color: var(--muted); font-size: .92rem; flex: 1; }
.card .meta { font-size: .8rem; color: var(--muted); word-break: break-word; }
.empty {
  grid-column: 1 / -1; text-align: center; color: var(--muted);
  padding: 2.5rem 1rem; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius);
}

/* forms */
.form {
  display: grid; gap: .9rem; max-width: 34rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 1.25rem; box-shadow: var(--shadow);
}
.form label { display: grid; gap: .35rem; font-size: .85rem; font-weight: 600; color: var(--muted); }
.form input, .form textarea, .form select {
  min-height: 46px; padding: .65rem .8rem; border-radius: 8px; border: 1px solid var(--line);
  background: #fafaf8; font: inherit; color: var(--ink);
}
.form textarea { min-height: 110px; resize: vertical; }
.form .hp { position: absolute; left: -10000px; height: 0; overflow: hidden; }
.msg-ok { color: var(--ok); font-weight: 600; }
.msg-err { color: #a33; font-weight: 600; }

/* detail */
.detail-hero {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 1.5rem 1.25rem; box-shadow: var(--shadow); margin: 1.5rem 0;
}
.detail-hero .site-link { font-size: .95rem; word-break: break-all; }
.back { display: inline-flex; margin: 1.25rem 0 0; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .9rem; }
.back:hover { color: var(--ink); }

/* footer */
.site-footer {
  border-top: 1px solid var(--line); padding: 1.5rem 0 2.5rem; margin-top: 1rem;
  color: var(--muted); font-size: .88rem;
}
.site-footer .row {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem;
}
.site-footer a { color: var(--muted); }

body.has-sticky { padding-bottom: 72px; }
.sticky-cta {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--surface); border-top: 1px solid var(--line);
  padding: .55rem .85rem calc(.55rem + env(safe-area-inset-bottom));
  gap: .5rem;
}
.sticky-cta .btn { flex: 1; }
@media (max-width: 799px) {
  body.has-sticky .sticky-cta { display: flex; }
}

/* Prodigy seal */
.prodigy-seal {
  display: inline-flex; align-items: center; gap: .45rem;
  text-decoration: none; color: inherit;
}
.prodigy-seal img {
  width: 36px; height: 36px; border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(18,20,26,.08);
}
.prodigy-seal .seal-txt { display: flex; flex-direction: column; gap: 1px; line-height: 1.15; }
.prodigy-seal .seal-k { font-size: .65rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.prodigy-seal .seal-n { font-size: .82rem; font-weight: 700; color: var(--ink); }
.badge-seal {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ok); background: var(--ok-bg); border-radius: 999px;
  padding: .22rem .5rem .22rem .28rem;
}
.badge-seal img { width: 18px; height: 18px; border-radius: 8px; }
.card .badge-seal { margin-bottom: .15rem; }
.footer-seal-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem; margin-top: .35rem;
}


/* listing cards with logos */
.card{
  display:grid;
  grid-template-columns:72px 1fr;
  gap:.85rem 1rem;
  align-items:start;
}
.card-logo{
  width:72px;height:72px;border-radius:14px;
  background:#fafaf8;border:1px solid var(--line);
  object-fit:contain;padding:6px;
}
.card-body{display:flex;flex-direction:column;gap:.4rem;min-width:0}
.card-body h3{font-size:1.12rem;margin:0;line-height:1.2}
.card-body p{
  margin:0;color:var(--muted);font-size:.9rem;
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;
}
.detail-logo{
  width:88px;height:88px;border-radius:18px;
  background:#fff;border:1px solid var(--line);
  object-fit:contain;padding:8px;margin:0 0 .85rem;
  box-shadow:var(--shadow);
}
@media(min-width:640px){
  .card{grid-template-columns:80px 1fr}
  .card-logo{width:80px;height:80px}
}


.search-bar {
  display: grid;
  grid-template-columns: 1fr;
  gap: .55rem;
}
@media (min-width: 640px) {
  .search-bar {
    grid-template-columns: minmax(0, 1fr) 110px auto;
    align-items: stretch;
  }
}
.search-bar select {
  min-height: 48px; padding: .65rem .75rem; border-radius: 8px;
  border: 1px solid var(--line); background: #fafaf8; font: inherit; color: var(--ink);
}
