
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #14181f;
  --muted: #667085;
  --border: #e6e8ef;
  --primary: #2451e0;
  --primary-dark: #1a3aa8;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #f59e0b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.06);
  --shadow-hover: 0 8px 24px rgba(16,24,40,.10);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}
.brand-mark { font-size: 1.5rem; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; font-size: 1rem; }
.brand-text small { font-weight: 500; color: var(--muted); font-size: .72rem; }
.site-nav { display: flex; gap: 4px; }
.nav-link {
  color: var(--muted);
  font-weight: 600;
  font-size: .92rem;
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
}
.nav-link:hover { background: var(--bg); text-decoration: none; color: var(--text); }
.nav-link.active { color: var(--primary); background: #eef2ff; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text);
}

/* Main */
.main-content { padding: 32px 20px 32px; min-height: 60vh; }

/* Hero */
.hero { padding: 40px 0 8px; max-width: 720px; }
.hero h1 { font-size: 2.4rem; line-height: 1.15; margin: 0 0 16px; font-weight: 800; }
.hero .accent { color: var(--primary); }
.hero .lede { color: var(--muted); font-size: 1.1rem; line-height: 1.6; margin: 0 0 24px; }
.hero-compact { padding: 0 0 4px; }
.hero-compact h1 { font-size: 1.5rem; margin-bottom: 6px; }
.hero-compact .lede { font-size: 1rem; margin-bottom: 0; }

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg); }
.btn-sm { padding: 8px 14px; font-size: .85rem; }

/* Nav cards */
.nav-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 20px 0 24px;
}
.nav-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-height: 100%;
}
.nav-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); text-decoration: none; }
.nav-card-head { display: flex; align-items: center; gap: 10px; }
.nav-card-icon { font-size: 1.5rem; line-height: 1; }
.nav-card h2 { margin: 0; font-size: 1.15rem; }
.nav-card-sub { margin: 0; color: var(--muted); font-size: .85rem; line-height: 1.4; }
.nav-card-link { font-weight: 600; color: var(--primary); font-size: .88rem; align-self: flex-end; margin-top: 8px; }

/* FAQ */
.faq { margin: 8px 0 24px; }
.faq-title { font-size: 1.1rem; margin: 0 0 12px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px 16px;
  margin-bottom: 8px;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  padding: 12px 0;
  list-style: none;
  position: relative;
  padding-right: 24px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 10px;
  font-size: 1.2rem;
  color: var(--muted);
  font-weight: 400;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item p { margin: 0 0 14px; color: var(--muted); line-height: 1.5; font-size: .92rem; }

.disclaimer { color: var(--muted); font-size: .8rem; border-top: 1px solid var(--border); padding-top: 14px; }

/* Page head */
.page-head { margin-bottom: 24px; }
.page-head h1 { margin: 0 0 6px; font-size: 1.7rem; }
.page-head-split { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head-actions { flex-shrink: 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

.breadcrumbs { color: var(--muted); font-size: .85rem; margin-bottom: 14px; }
.breadcrumbs a { color: var(--muted); font-weight: 600; }
.breadcrumbs span { margin: 0 4px; }

/* Toolbar */
.toolbar { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.search-input, .select-input {
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: .95rem;
  background: var(--surface);
  color: var(--text);
}
.search-input { flex: 1 1 260px; }
.select-input { flex: 0 0 auto; }
.search-input:focus, .select-input:focus { outline: 2px solid var(--primary); outline-offset: -1px; }

/* Lists (meetings / members) */
.meeting-list, .member-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.meeting-row, .member-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: box-shadow .15s ease, transform .15s ease;
}
.meeting-row:hover, .member-row:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); text-decoration: none; }

.meeting-date-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  background: #eef2ff;
  border-radius: 10px;
  color: var(--primary);
}
.meeting-day { font-weight: 800; font-size: 1.15rem; line-height: 1; }
.meeting-mon { font-size: .68rem; text-transform: uppercase; letter-spacing: .02em; }

.meeting-main, .member-main { flex: 1; min-width: 0; }
.meeting-title { font-weight: 700; }
.meeting-meta, .member-meta { color: var(--muted); font-size: .85rem; margin-top: 2px; }

.member-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2451e0, #6d8bf5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
  flex-shrink: 0;
}
.member-avatar.large { width: 64px; height: 64px; font-size: 1.1rem; }
.member-name { font-weight: 700; }

.member-attendance {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 160px;
  flex-shrink: 0;
}
.attendance-pct { font-weight: 700; font-size: .85rem; width: 3em; text-align: right; flex-shrink: 0; }

.bar-track { flex: 1; height: 8px; border-radius: 6px; background: #e9ecef; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; }
.bar-fill.high { background: linear-gradient(90deg, #16a34a, #15803d); }
.bar-fill.medium { background: linear-gradient(90deg, #f59e0b, #d97706); }
.bar-fill.low { background: linear-gradient(90deg, #dc2626, #b91c1c); }

.meeting-arrow { color: var(--muted); font-size: 1.4rem; flex-shrink: 0; }

/* Cards / detail pages */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 16px; font-size: 1.05rem; }
.card.center-content { display: flex; flex-direction: column; align-items: center; text-align: center; }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.member-detail-head { display: flex; align-items: center; gap: 16px; }
.member-detail-head h1 { margin: 0 0 4px; font-size: 1.5rem; }

.kv-list { display: flex; flex-direction: column; gap: 10px; margin: 0 0 12px; }
.kv-list > div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px dashed var(--border); }
.kv-list dt { color: var(--muted); font-size: .9rem; }
.kv-list dd { margin: 0; font-weight: 700; }

.donut-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.donut { display: block; }

.vote-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: .88rem; }
.vote-legend li { display: flex; align-items: center; gap: 8px; }
.vote-legend .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* Tables */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: .9rem; }
.data-table th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: 10px 12px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table .num { color: var(--muted); white-space: nowrap; }
.data-table .qtitle { max-width: 420px; }
.data-table .center { text-align: center; }
.vote-cell { font-weight: 700; }

.v-yes { color: var(--success); }
.v-no { color: var(--danger); }
.v-abs { color: var(--warning); }
.v-absent, .v-dnv { color: var(--muted); }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 700;
  white-space: nowrap;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-muted { background: #f1f2f6; color: var(--muted); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  color: var(--muted);
  font-size: .82rem;
  text-align: center;
}

/* Responsive */
@media (max-width: 760px) {
  .nav-cards { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.4rem; }
  .site-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 8px;
    display: none;
    gap: 2px;
  }
  .site-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .member-attendance { width: 110px; }
}

@media (max-width: 480px) {
  .meeting-row, .member-row { flex-wrap: wrap; }
  .member-attendance { order: 3; width: 100%; }
}
