/* ── paroki.org — Mobile-first design system ── */

/* Font loaded async via HTML <link rel="preload"> — no @import block */

:root {
  --bg: #f6f8f4;
  --surface: #ffffff;
  --surface-alt: #f0f4ed;
  --text: #1a2e23;
  --text-secondary: #5a6b62;
  --text-muted: #8a9890;
  --line: #e2e8df;
  --brand: #176a43;
  --brand-dark: #0f4e31;
  --brand-light: #e8f5ee;
  --brand-glow: rgba(23,106,67,0.12);
  --accent: #c89a3b;
  --accent-light: #fdf6e8;
  --danger: #c0392b;
  --danger-light: #fdecea;
  --info: #2980b9;
  --info-light: #eaf4fc;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px rgba(20,49,34,0.06);
  --shadow: 0 4px 20px rgba(20,49,34,0.08);
  --shadow-lg: 0 12px 40px rgba(20,49,34,0.10);
  --bottom-bar-h: 64px;
  --topbar-h: 60px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--bottom-bar-h) + 8px);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font: inherit; }
input, select, textarea { font: inherit; }

/* ── Topbar ── */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  padding: 0 16px;
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff; display: grid; place-items: center;
  flex-shrink: 0;
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-text { font-weight: 800; font-size: 17px; color: var(--text); }

/* Desktop nav — hidden on mobile */
.nav-desktop { display: none; gap: 6px; }
.nav-desktop a {
  padding: 8px 16px; border-radius: 999px;
  font-weight: 600; font-size: 14px; color: var(--text-secondary);
  transition: all 0.2s;
}
.nav-desktop a:hover, .nav-desktop a.active {
  background: var(--brand-light); color: var(--brand);
}

/* Hamburger button */
.hamburger {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface);
  transition: 0.2s;
}
.hamburger:hover { background: var(--surface-alt); }
.hamburger svg { width: 20px; height: 20px; color: var(--text); }

/* Mobile slide-out menu */
.mobile-menu-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.4);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.mobile-menu-overlay.open { opacity: 1; pointer-events: auto; }

.mobile-menu {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 201;
  width: 280px; max-width: 85vw;
  background: var(--surface);
  padding: 20px;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; flex-direction: column; gap: 6px;
  box-shadow: -8px 0 30px rgba(0,0,0,0.12);
}
.mobile-menu-overlay.open .mobile-menu { transform: translateX(0); }

.mobile-menu-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.mobile-menu-close {
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface);
  display: grid; place-items: center;
}
.mobile-menu a {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 15px; color: var(--text-secondary);
  transition: 0.15s;
}
.mobile-menu a:hover, .mobile-menu a.active {
  background: var(--brand-light); color: var(--brand);
}
.mobile-menu a svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ── Bottom icon bar (mobile only) ── */
.bottom-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  height: var(--bottom-bar-h);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-around;
  padding: 0 8px;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-bar a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 12px; border-radius: 12px;
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  transition: 0.15s;
  text-decoration: none;
}
.bottom-bar a.active { color: var(--brand); }
.bottom-bar a.active svg { color: var(--brand); }
.bottom-bar svg { width: 22px; height: 22px; }

/* ── Page shell ── */
.page-shell { max-width: 960px; margin: 0 auto; padding: 12px; }

/* ── Typography ── */
h1 { font-size: 24px; font-weight: 900; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: 18px; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; }
h3 { font-size: 16px; font-weight: 700; line-height: 1.3; }
.text-muted { color: var(--text-secondary); }
.text-sm { font-size: 14px; }
.text-xs { font-size: 12px; }

/* ── Hero ── */
.hero { padding: 16px 0 8px; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--brand-light); color: var(--brand);
  font-size: 12px; font-weight: 700; letter-spacing: 0.02em;
  margin-bottom: 16px;
}
.hero h1 { margin-bottom: 12px; }
.hero .lead { color: var(--text-secondary); font-size: 14px; line-height: 1.6; margin-bottom: 16px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px;
  font-weight: 700; font-size: 14px;
  border: 1px solid transparent;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn-secondary:hover { background: var(--surface-alt); }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.card:hover { box-shadow: var(--shadow); border-color: #d0d8cc; }

.card-header { margin-bottom: 12px; }
.card-header h3 { margin-bottom: 4px; }
.card-subtitle { font-size: 13px; color: var(--text-secondary); }

/* Stats mini cards */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.stat-card .stat-value {
  font-size: 24px; font-weight: 900; color: var(--brand);
  line-height: 1.1; margin-bottom: 4px;
}
.stat-card .stat-label {
  font-size: 12px; font-weight: 600; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.stat-card.emphasis {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  border-color: var(--brand-dark);
  color: #fff;
}
.stat-card.emphasis .stat-value { color: #fff; }
.stat-card.emphasis .stat-label { color: rgba(255,255,255,0.75); }

/* ── Stat grid ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

/* ── Section ── */
.section { margin-top: 20px; }
.section-title { margin-bottom: 6px; }
.section-desc { color: var(--text-secondary); font-size: 14px; margin-bottom: 16px; }

/* ── Expandable sections ── */
.expandable {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 10px;
}
.expandable-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  background: none; border: none; font: inherit;
  font-weight: 700; font-size: 14px; color: var(--text);
  text-align: left;
}
.expandable-trigger .expand-icon {
  width: 20px; height: 20px; color: var(--text-muted);
  transition: transform 0.25s;
  flex-shrink: 0;
}
.expandable.open .expand-icon { transform: rotate(180deg); }
.expandable-trigger .badge-count {
  font-size: 12px; font-weight: 700;
  background: var(--brand-light); color: var(--brand);
  padding: 3px 8px; border-radius: 999px; margin-left: 8px;
}
.expandable-body {
  max-height: 0; overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.expandable.open .expandable-body { max-height: 2000px; }
.expandable-inner { padding: 0 16px 14px; }

/* ── Metric rows ── */
.metric-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.metric-row:last-child { border-bottom: none; }
.metric-row .metric-label { color: var(--text-secondary); flex: 1; }
.metric-row .metric-value { font-weight: 700; color: var(--text); }

/* ── Progress bars ── */
.progress-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.progress-row:last-child { border-bottom: none; }
.progress-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px; font-size: 14px;
}
.progress-header .label { color: var(--text-secondary); }
.progress-header .value { font-weight: 700; color: var(--brand); }
.progress-track {
  width: 100%; height: 8px; border-radius: 999px;
  background: var(--surface-alt); overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), #2ea068);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Feature panels (home) ── */
.feature-grid { display: grid; gap: 10px; }
.feature-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.feature-card .feature-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--brand-light); color: var(--brand);
  display: grid; place-items: center;
  margin-bottom: 8px;
}
.feature-card .feature-icon svg { width: 18px; height: 18px; }
.feature-card h3 { margin-bottom: 4px; }
.feature-card p { font-size: 14px; color: var(--text-secondary); }

/* ── Quote cards ── */
.quote-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 8px;
}
.quote-card blockquote { font-size: 14px; line-height: 1.6; color: var(--text); margin-bottom: 6px; }
.quote-card .original { font-size: 13px; color: var(--text-muted); font-style: italic; margin-bottom: 8px; }
.quote-card footer { font-size: 13px; color: var(--text-secondary); }
.quote-card footer a { color: var(--brand); text-decoration: underline; }

/* ── Roadmap ── */
.roadmap-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 8px;
}
.roadmap-badge {
  display: inline-flex; padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; margin-bottom: 8px;
}
.roadmap-badge.done { background: var(--brand-light); color: var(--brand); }
.roadmap-badge.active { background: var(--accent-light); color: #8a5d00; }
.roadmap-badge.next { background: var(--info-light); color: var(--info); }
.roadmap-item h3 { margin-bottom: 4px; }
.roadmap-item p { font-size: 14px; color: var(--text-secondary); }

/* ── Browse toolbar ── */
.browse-toolbar {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 10px;
}
.search-box {
  position: relative;
}
.search-box input {
  width: 100%; padding: 12px 14px 12px 40px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); font-size: 14px;
  transition: border-color 0.2s;
}
.search-box input:focus { outline: none; border-color: var(--brand); }
.search-box svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--text-muted); pointer-events: none;
}
.filter-row {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.filter-row select {
  flex: 1; min-width: 0;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); font-size: 13px; color: var(--text);
}

/* ── Tabs ── */
.tabs {
  display: flex; gap: 6px; overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-bottom: 10px;
  padding-bottom: 2px;
}
.tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  flex-shrink: 0;
  padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 13px; font-weight: 700; color: var(--text-secondary);
  white-space: nowrap; transition: 0.15s;
}
.tab-btn.active {
  background: var(--brand); color: #fff; border-color: var(--brand);
}

/* ── Browse results ── */
.browse-summary {
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 12px; padding: 0 2px;
}
.browse-results { display: grid; gap: 8px; align-items: start; }

/* ── Browse cards (profiles) ── */
.browse-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid; gap: 0;
  transition: box-shadow 0.2s;
}
.browse-card:hover { box-shadow: var(--shadow); }

/* Card thumbnail banner — church photo as background */
.card-thumb {
  height: 140px;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.card-thumb .thumb-cross {
  position: absolute; opacity: 0.18;
}
.card-thumb .thumb-cross svg { width: 56px; height: 56px; fill: #fff; }
.card-thumb .thumb-type {
  position: absolute; top: 8px; right: 10px;
  padding: 3px 10px; border-radius: 6px;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(4px);
  font-size: 10px; font-weight: 700; color: rgba(0,0,0,0.7);
  text-transform: uppercase; letter-spacing: 0.03em;
}
.card-thumb .thumb-initial {
  font-size: 32px; font-weight: 900; color: rgba(255,255,255,0.45);
  letter-spacing: 0.04em;
}
/* Real photo thumbnails — full cover */
.card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  position: absolute; inset: 0;
}
/* Gradient overlay on photos for readability */
.card-thumb.has-photo::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.35) 0%, transparent 60%);
  pointer-events: none;
}
.card-thumb.has-photo .thumb-type {
  top: auto; bottom: 8px;
  background: rgba(0,0,0,0.55); color: #fff;
}

.browse-card .card-content { padding: 10px 12px 12px; display: grid; gap: 6px; }
.browse-card h3 { font-size: 15px; margin: 0; }
.browse-card .card-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.browse-card .card-body { font-size: 14px; color: var(--text-secondary); }

/* Parent parish hint */
.parent-hint {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 4px;
  background: var(--accent-light); color: #8a5d00;
  font-size: 11px; font-weight: 600;
}
.parent-hint svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ── Pills / badges ── */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 7px; border-radius: 4px;
  font-size: 11px; font-weight: 600;
  background: var(--surface-alt); color: var(--text-secondary);
  white-space: nowrap;
}
.pill-brand { background: var(--brand-light); color: var(--brand); }
.pill-accent { background: var(--accent-light); color: #8a5d00; }
.pill-danger { background: var(--danger-light); color: var(--danger); }
.pill-info { background: var(--info-light); color: var(--info); }
a.pill:hover { opacity: 0.85; }

/* Source dots */
.source-dots { display: flex; gap: 4px; align-items: center; }
.source-dot {
  width: 8px; height: 8px; border-radius: 999px; background: var(--line);
}
.source-dot.active { background: var(--brand); }

/* Schedule preview */
.schedule-preview { display: grid; gap: 6px; margin-top: 4px; }
.schedule-row {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  padding: 8px 10px; border-radius: var(--radius-sm);
  background: var(--surface-alt); font-size: 13px;
}
.schedule-row strong { color: var(--brand); }

/* Missing fields */
.missing-line { display: flex; gap: 4px; flex-wrap: wrap; }

/* Gallery card */
.gallery-card { overflow: hidden; }
.gallery-card img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
}

/* ── Forms ── */
.form-section { margin-top: 20px; }
.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.form-card h2 { margin-bottom: 4px; }
.form-card .form-desc { font-size: 14px; color: var(--text-secondary); margin-bottom: 16px; }
.stacked-form { display: grid; gap: 12px; }
.form-field { display: grid; gap: 6px; }
.form-field .form-label { font-size: 13px; font-weight: 700; color: var(--text); }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--surface);
  font-size: 14px; color: var(--text); transition: border-color 0.2s;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--brand);
}
.form-status { font-size: 13px; min-height: 1.2em; color: var(--text-muted); }
.form-status.success { color: var(--brand); }
.form-status.error { color: var(--danger); }
.compact-list { margin: 0; padding-left: 18px; color: var(--text-secondary); font-size: 14px; line-height: 1.7; }

/* ── Diocesan progress mini cards ── */
.diocesan-grid { display: grid; gap: 8px; }
.diocesan-row {
  display: grid; gap: 4px; padding: 12px 0;
  border-bottom: 1px solid var(--line); font-size: 13px;
}
.diocesan-row:last-child { border-bottom: none; }
.diocesan-row .diocese-name { font-weight: 700; font-size: 14px; }
.diocesan-row .diocese-bars { display: flex; gap: 8px; flex-wrap: wrap; }
.diocese-mini-stat {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--text-secondary);
}
.diocese-mini-stat strong { color: var(--brand); }

/* ── Utilities ── */
.hidden { display: none !important; }
.mb-0 { margin-bottom: 0; }
.mt-12 { margin-top: 12px; }
.gap-6 { gap: 6px; }
.flex-wrap { flex-wrap: wrap; }

/* ── Split layout for forms ── */
.split-section { display: grid; gap: 12px; }

/* ══════════════════════════════════════════════
   Tablet breakpoint (640px+)
   ══════════════════════════════════════════════ */
@media (min-width: 640px) {
  .page-shell { padding: 16px 20px; }
  h1 { font-size: 30px; }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-row { flex-wrap: nowrap; }
  .browse-results { grid-template-columns: repeat(2, 1fr); }
  .split-section { grid-template-columns: repeat(2, 1fr); }
}

/* ══════════════════════════════════════════════
   Desktop breakpoint (960px+)
   ══════════════════════════════════════════════ */
@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .page-shell { padding: 20px 28px 48px; }
  h1 { font-size: 36px; }

  /* Show desktop nav, hide hamburger & bottom bar */
  .nav-desktop { display: flex; }
  .hamburger { display: none; }
  .bottom-bar { display: none; }

  .hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 24px; align-items: start; padding: 24px 0 12px; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .browse-toolbar { flex-direction: row; align-items: center; }
  .search-box { flex: 1; }
  .filter-row { flex: 0 0 auto; }
  .browse-results { grid-template-columns: repeat(2, 1fr); }

  /* Two-column expandables on desktop */
  .expandable-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
}

/* ══════════════════════════════════════════════
   Wide desktop (1200px+)
   ══════════════════════════════════════════════ */
@media (min-width: 1200px) {
  .browse-results { grid-template-columns: repeat(3, 1fr); }
}

/* ── Section header with icon ── */
.section-head {
  display: flex; align-items: flex-start; gap: 12px;
  margin-bottom: 14px;
}
.section-icon {
  width: 36px; height: 36px; min-width: 36px;
  border-radius: 10px;
  background: var(--brand-light); color: var(--brand);
  display: grid; place-items: center; flex-shrink: 0;
}
.section-icon svg { width: 18px; height: 18px; }
.section-head .section-title { margin-bottom: 2px; }
.section-head .section-desc { margin-bottom: 0; }

/* ── Content cards (tentang page) ── */
.content-cards { display: grid; gap: 10px; }
.content-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.content-card-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--brand-light); color: var(--brand);
  display: grid; place-items: center; margin-bottom: 8px;
}
.content-card-icon svg { width: 18px; height: 18px; }
.content-card h3 { font-size: 15px; margin-bottom: 4px; }
.content-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

/* ── Steps list ── */
.steps-list { display: grid; gap: 10px; }
.step-item {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.step-number {
  width: 32px; height: 32px; min-width: 32px;
  border-radius: 999px;
  background: var(--brand); color: #fff;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 800;
}
.step-item h3 { font-size: 15px; margin-bottom: 2px; }
.step-item p { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

/* ── Legal / Terms page ── */
.legal-content { margin-bottom: 24px; }
.legal-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
}
.legal-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
.legal-icon {
  width: 32px; height: 32px; min-width: 32px;
  border-radius: 8px;
  background: var(--brand-light); color: var(--brand);
  display: grid; place-items: center;
}
.legal-icon svg { width: 16px; height: 16px; }
.legal-section h2 { font-size: 16px; margin: 0; }
.legal-section p { font-size: 13px; color: var(--text-secondary); line-height: 1.65; margin-bottom: 8px; }
.legal-section p:last-child { margin-bottom: 0; }
.legal-section ul {
  margin: 0 0 8px; padding-left: 18px;
  font-size: 13px; color: var(--text-secondary); line-height: 1.7;
}
.legal-section ul:last-child { margin-bottom: 0; }

/* ── Footer ── */
.site-footer {
  background: var(--text); color: rgba(255,255,255,0.6);
  margin-top: 24px; padding: 24px 0 12px;
}
body[data-page="map"] .site-footer { display: none; }
.footer-inner { max-width: 960px; margin: 0 auto; padding: 0 12px; }
.footer-grid { display: grid; gap: 20px; margin-bottom: 16px; }
.footer-brand p { font-size: 12px; margin-top: 6px; line-height: 1.5; }
.footer-col h4 {
  font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.4);
  margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.06em;
}
.footer-col a {
  display: block; font-size: 13px; padding: 3px 0;
  color: rgba(255,255,255,0.6); transition: color 0.15s;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 12px; font-size: 11px;
}
.footer-bottom a { color: rgba(255,255,255,0.5); text-decoration: underline; }
.footer-bottom a:hover { color: #fff; }

@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .content-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .content-cards { grid-template-columns: repeat(3, 1fr); }
}

/* ── Comment Panel ── */
.comment-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.45); backdrop-filter: blur(2px);
  display: none; align-items: flex-end; justify-content: center;
}
.comment-overlay.open { display: flex; }
.comment-panel {
  background: var(--surface); border-radius: 16px 16px 0 0;
  width: 100%; max-height: 85vh;
  display: flex; flex-direction: column;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
}
.comment-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.comment-header h3 { margin: 0; font-size: 15px; }
.comment-close {
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg);
  display: grid; place-items: center; cursor: pointer;
}
.comment-close svg { width: 16px; height: 16px; }
.comment-body {
  flex: 1; overflow-y: auto; padding: 12px 16px;
  min-height: 80px;
}
.comment-empty {
  text-align: center; color: var(--text-muted);
  font-size: 13px; padding: 24px 0;
}
.comment-item {
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.comment-item:last-child { border-bottom: none; }
.comment-item-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}
.comment-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.comment-avatar.ai { background: #6c63ff; }
.comment-author { font-weight: 700; font-size: 13px; }
.comment-time { font-size: 11px; color: var(--text-muted); }
.comment-ai-badge {
  font-size: 10px; padding: 1px 6px; border-radius: 4px;
  background: #6c63ff; color: #fff; font-weight: 700;
}
.comment-text { font-size: 13px; line-height: 1.5; margin: 4px 0 6px; }
.comment-actions { display: flex; gap: 12px; }
.comment-actions button {
  background: none; border: none; cursor: pointer;
  font-size: 11px; color: var(--text-muted); padding: 0;
}
.comment-actions button:hover { color: var(--brand); }
.comment-replies { margin-left: 36px; }
.comment-replies .comment-item {
  border-bottom: none; padding: 8px 0;
  border-left: 2px solid var(--line); padding-left: 12px;
}
.comment-form-wrap {
  border-top: 1px solid var(--line); padding: 12px 16px;
  flex-shrink: 0;
}
.comment-reply-tag {
  font-size: 11px; color: var(--brand); margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
}
.comment-reply-tag button {
  background: none; border: none; cursor: pointer;
  font-size: 11px; color: var(--text-muted);
}
.comment-form { display: flex; flex-direction: column; gap: 8px; }
.comment-form input, .comment-form textarea {
  padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 6px; font-size: 13px; background: var(--bg);
}
.comment-form input:focus, .comment-form textarea:focus {
  outline: none; border-color: var(--brand);
}
.comment-form textarea { resize: vertical; min-height: 44px; }
.btn-comment {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--bg);
  font-size: 11px; color: var(--text-secondary); cursor: pointer;
  white-space: nowrap;
}
.btn-comment:hover { border-color: var(--brand); color: var(--brand); }
.btn-comment svg { width: 12px; height: 12px; }
.browse-summary {
  font-size: 13px; color: var(--text-muted);
  padding: 4px 0 8px;
}

@media (min-width: 960px) {
  .comment-overlay { align-items: stretch; justify-content: flex-end; }
  .comment-panel {
    width: 420px; max-height: 100vh;
    border-radius: 0;
  }
}
