/* Self-hosted Inter — no third-party requests, keeps visitor data private. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("assets/fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("assets/fonts/inter-700.woff2") format("woff2"); }

:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --ink: #1c1d22;
  --ink-soft: #5b5f6a;
  --ink-faint: #8c909b;
  --line: #e7e5de;
  --line-strong: #d8d6cd;
  --accent: #1f5fb0;
  --accent-ink: #ffffff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 22, 30, .04), 0 8px 24px rgba(20, 22, 30, .05);
  --shadow-hover: 0 2px 6px rgba(20, 22, 30, .07), 0 16px 40px rgba(20, 22, 30, .09);
  --maxw: 1120px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 18px; padding-bottom: 18px;
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-flag {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: linear-gradient(180deg, #d11 0 33.3%, #fff 33.3% 66.6%, #1f5fb0 66.6% 100%);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}
.brand-title { font-size: 1.12rem; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.brand-sub { margin: 1px 0 0; font-size: .82rem; color: var(--ink-soft); }

.lang-toggle { display: inline-flex; background: var(--bg); border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; flex: none; }
.lang-btn {
  border: 0; background: transparent; cursor: pointer; font: inherit; font-weight: 600;
  font-size: .82rem; color: var(--ink-soft); padding: 5px 12px; border-radius: 999px; line-height: 1;
}
.lang-btn.is-active { background: var(--ink); color: #fff; }

/* ---------- Notice ---------- */
.notice {
  margin-top: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 22px 24px 24px;
  box-shadow: var(--shadow);
}
.notice-tag {
  display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent);
  background: rgba(31,95,176,.08); padding: 4px 9px; border-radius: 6px;
}
.notice-title { font-size: 1.25rem; line-height: 1.3; margin: 12px 0 8px; letter-spacing: -.01em; }
.notice-body { margin: 0 0 18px; color: var(--ink-soft); max-width: 70ch; font-size: .96rem; }
.notice-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font-weight: 600; font-size: .9rem; padding: 10px 16px; border-radius: 10px;
  border: 1px solid transparent; cursor: pointer; transition: transform .08s ease, background .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #1a528f; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink-faint); }

/* ---------- Controls ---------- */
.controls {
  margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
}
.search-field { position: relative; flex: 1 1 280px; min-width: 0; }
.search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-faint); }
#search {
  width: 100%; font: inherit; font-size: .95rem; padding: 12px 14px 12px 42px;
  border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--ink);
}
#search::placeholder { color: var(--ink-faint); }
#search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31,95,176,.14); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-soft);
  font: inherit; font-size: .82rem; font-weight: 600; padding: 8px 13px; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px; transition: border-color .15s, color .15s, background .15s;
}
.chip:hover { border-color: var(--ink-faint); color: var(--ink); }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- Directory ---------- */
.result-count { margin: 26px 0 14px; font-size: .85rem; color: var(--ink-faint); }
.grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  padding-bottom: 8px;
}
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: box-shadow .18s ease, transform .18s ease;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }

.card-head { display: flex; gap: 15px; align-items: center; }
.photo {
  width: 72px; height: 72px; border-radius: 14px; object-fit: cover; object-position: center top;
  flex: none; background: var(--bg); border: 1px solid var(--line);
}
.card-id { min-width: 0; }
.card-name { font-size: 1.06rem; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.card-party { margin: 3px 0 0; font-size: .85rem; color: var(--ink-soft); }

.group-badge {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 9px;
  font-size: .74rem; font-weight: 600; color: var(--ink); padding: 4px 9px 4px 8px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--bg);
}
.group-badge .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }

.committees { margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.committees .label { width: 100%; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); margin-bottom: 2px; }
.tag { font-size: .72rem; font-weight: 600; color: var(--ink-soft); background: var(--bg); border: 1px solid var(--line); padding: 3px 8px; border-radius: 6px; }

.contacts { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.contacts .label { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); margin-bottom: 10px; }
.contact-row { display: flex; flex-wrap: wrap; gap: 8px; }
.contact-btn {
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
  font-size: .82rem; font-weight: 600; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 9px;
  padding: 7px 11px; transition: border-color .15s, background .15s, color .15s;
}
.contact-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(31,95,176,.05); }
.contact-btn svg { width: 15px; height: 15px; flex: none; }
.contact-btn.is-email { background: var(--ink); color: #fff; border-color: var(--ink); }
.contact-btn.is-email:hover { background: #34363f; color: #fff; }

.empty { text-align: center; color: var(--ink-faint); padding: 50px 0; font-size: .95rem; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 56px; border-top: 1px solid var(--line); background: var(--surface); padding: 32px 0 44px; }
.site-footer p { margin: 0 0 10px; font-size: .82rem; color: var(--ink-soft); max-width: 80ch; }
.site-footer .footer-meta { color: var(--ink-faint); font-size: .78rem; }

@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .brand-sub { display: none; }
  .brand-title { font-size: 1rem; }
  .notice { padding: 18px 16px 20px; }
  .notice-title { font-size: 1.12rem; }
  .notice-actions .btn { flex: 1 1 auto; justify-content: center; }
  .grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
