:root {
  --bg: #f6f2ec; --surface: #fffdf9; --ink: #1d1a17; --muted: #6b635a; --line: #e3dbd0;
  --brick: #b4432b; --brick-ink: #fff; --canal: #1f5a63; --chip: #efe7dc;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #161412; --surface: #201d1a; --ink: #f1ebe3; --muted: #a59b8f; --line: #36302a;
    --brick: #e0694d; --brick-ink: #160c08; --canal: #6fb3bc; --chip: #2b2622; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 Inter, system-ui, sans-serif; }
a { color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

header { padding: 56px 0 28px; border-bottom: 1px solid var(--line); }
.eyebrow { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--brick); font-weight: 600; }
h1 { font-family: Fraunces, Georgia, serif; font-weight: 800; font-size: clamp(2.4rem, 7vw, 4.5rem); line-height: 1; margin: 10px 0 14px; letter-spacing: -.02em; }
.lede { max-width: 620px; color: var(--muted); font-size: 18px; margin: 0; }
.stats { display: flex; gap: 28px; margin-top: 24px; flex-wrap: wrap; }
.stats b { display: block; font-family: Fraunces, Georgia, serif; font-size: 28px; }
.stats span { color: var(--muted); font-size: 14px; }

.controls { position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 16px 0 12px; border-bottom: 1px solid var(--line); }
input[type=search] { width: 100%; padding: 12px 14px; font: inherit; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
input[type=search]:focus { outline: 2px solid var(--brick); outline-offset: 1px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-top: 12px; scrollbar-width: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--chip); color: var(--ink); padding: 6px 12px; border-radius: 999px; font: 500 14px Inter, sans-serif; cursor: pointer; }
.chip[aria-pressed=true] { background: var(--brick); border-color: var(--brick); color: var(--brick-ink); }

.count { color: var(--muted); font-size: 14px; margin: 18px 0 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; padding-bottom: 64px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.card:hover, .card:focus-visible { border-color: var(--brick); outline: none; }
.top { display: flex; gap: 12px; align-items: center; }
.avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 600 16px Inter, sans-serif; color: #fff; overflow: hidden; position: relative; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.avatar img.logo { inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); object-fit: contain; }
.avatar:has(img.logo) { background: #fff !important; border: 1px solid var(--line); }
.avatar.lg { width: 88px; height: 88px; font-size: 28px; margin-bottom: 12px; }
.credit { font-size: 12px; color: var(--muted); margin-top: 18px; }
.name { font-weight: 600; font-size: 17px; line-height: 1.2; }
.role { color: var(--muted); font-size: 14px; }
.summary { margin: 0; font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--chip); color: var(--muted); }
.tag.sector { color: var(--canal); font-weight: 600; }
.empty { color: var(--muted); padding: 40px 0; }

dialog { width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 32px); border: 1px solid var(--line); border-radius: 16px; padding: 0; background: var(--surface); color: var(--ink); }
dialog::backdrop { background: rgb(0 0 0 / .45); }
.d-body { padding: 24px; }
.d-close { float: right; border: 0; background: var(--chip); color: var(--ink); width: 34px; height: 34px; border-radius: 50%; font-size: 18px; cursor: pointer; }
.d-body h2 { font-family: Fraunces, Georgia, serif; font-size: 30px; margin: 0 0 4px; line-height: 1.1; }
.d-body h3 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 22px 0 8px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 15px; margin: 16px 0 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.btn { display: inline-block; padding: 8px 14px; border-radius: 8px; background: var(--brick); color: var(--brick-ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.btn.ghost { background: var(--chip); color: var(--ink); }
.articles { list-style: none; padding: 0; margin: 0; }
.articles li { padding: 10px 0; border-top: 1px solid var(--line); }
.articles a { font-weight: 500; }
.articles small { display: block; color: var(--muted); }

footer { border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--muted); font-size: 14px; }

/* Site menu */
.nav { border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 56px; }
.brand { font-family: Fraunces, Georgia, serif; font-weight: 800; font-size: 18px; text-decoration: none; }
.menu { display: flex; gap: 4px; }
.menu a { padding: 6px 12px; border-radius: 999px; text-decoration: none; font-weight: 500; font-size: 15px; color: var(--muted); }
.menu a:hover { color: var(--ink); }
.menu a[aria-current=page] { background: var(--chip); color: var(--ink); }
.nav + header { padding-top: 40px; }

/* Members */
.section { padding: 48px 0; border-bottom: 1px solid var(--line); }
.section h2 { font-family: Fraunces, Georgia, serif; font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 8px; line-height: 1.1; }
.section > .wrap > p { color: var(--muted); max-width: 620px; margin: 0 0 24px; }
.criteria { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; counter-reset: c; }
.criteria li { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; counter-increment: c; }
.criteria li::before { content: counter(c, decimal-leading-zero); display: block; font-family: Fraunces, Georgia, serif; font-weight: 800; font-size: 28px; color: var(--brick); margin-bottom: 8px; }
.criteria b { display: block; font-size: 17px; margin-bottom: 4px; }
.criteria span { color: var(--muted); font-size: 15px; }
.steps { padding: 0; margin: 0; list-style: none; max-width: 680px; counter-reset: s; }
.steps li { position: relative; padding: 0 0 22px 48px; counter-increment: s; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--canal); color: var(--surface); font-weight: 600; font-size: 15px; }
.steps b { display: block; }
.steps span { color: var(--muted); }
.note { background: var(--chip); border-radius: 14px; padding: 20px; max-width: 680px; }
.note p { margin: 0; }
/* Member card at real credit-card size (85.6mm wide) */
.card-wrap { margin: 16px 0 0; }
.member-card { display: block; width: 85.6mm; max-width: 100%; height: auto; border-radius: 3.2% / 5.4%; box-shadow: 0 10px 24px rgb(0 0 0 / .25); transform: rotate(-2deg); }

/* Founder profile + A–Z pages */
.profile { max-width: 760px; padding-top: 24px; padding-bottom: 64px; }
.crumbs { font-size: 14px; color: var(--muted); margin: 0 0 20px; }
.crumbs a { text-decoration: none; }
.p-head { display: flex; gap: 18px; align-items: center; padding: 0; border: 0; }
.p-head .avatar.lg { margin: 0; }
.profile h1 { font-size: clamp(2rem, 6vw, 3rem); margin: 0 0 6px; }
.p-role { margin: 0; color: var(--muted); }
.p-summary { font-size: 18px; margin: 20px 0; }
.profile h2 { font-family: Fraunces, Georgia, serif; font-size: 22px; margin: 32px 0 10px; }
.related { list-style: none; padding: 0; margin: 0; }
.related li { padding: 8px 0; border-top: 1px solid var(--line); }
.related a { font-weight: 600; }
.related span { color: var(--muted); font-size: 14px; }
.letters { display: flex; flex-wrap: wrap; gap: 10px; }
.letters a { font-weight: 600; text-decoration: none; color: var(--brick); }
