/* ═══════════════════════════════════════════════════════════
   Iowa Neighbor – pixel-close recreation (OpenStreetMap version)
   ═══════════════════════════════════════════════════════════ */
:root {
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --teal-light: #ccfbf1;
  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --green-600: #16a34a;
  --amber-500: #f59e0b;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.04);
  --shadow-lg: 0 4px 24px rgba(0,0,0,.1);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

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

body {
  font-family: var(--font);
  color: var(--slate-900);
  background: var(--slate-50);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, select, input { font-family: inherit; }

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--slate-200);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text .brand { font-weight: 700; font-size: 1.05rem; color: var(--slate-900); }
.logo-text .version { font-size: 0.7rem; color: var(--slate-400); font-weight: 500; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 1rem;
  flex: 1;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate-600);
  border-radius: 8px;
  transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--slate-100); color: var(--slate-900); }
.nav-link.active {
  color: var(--teal);
  background: transparent;
  position: relative;
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -0.75rem;
  left: 0.75rem;
  right: 0.75rem;
  height: 2px;
  background: var(--teal);
  border-radius: 1px;
}

.header-actions { display: flex; gap: 0.5rem; margin-left: auto; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
}
.btn-ghost {
  background: transparent;
  color: var(--slate-700);
  border: 1px solid var(--slate-200);
}
.btn-ghost:hover { background: var(--slate-50); }
.btn-primary {
  background: var(--teal);
  color: white;
}
.btn-primary:hover { background: var(--teal-dark); }
.btn-search {
  background: var(--slate-900);
  color: white;
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  white-space: nowrap;
}
.btn-search:hover { background: #1e293b; }

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #e0f2fe 0%, #f0fdfa 40%, #fef9c3 100%);
  min-height: 420px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(255,255,255,.15), rgba(255,255,255,.7)),
    url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1600&q=80') center/cover no-repeat;
  opacity: 0.55;
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 3rem;
}
.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--slate-600);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--slate-900);
  margin-bottom: 1rem;
  max-width: 640px;
}
.hero-sub {
  font-size: 1.05rem;
  color: var(--slate-700);
  max-width: 560px;
  margin-bottom: 1.75rem;
  line-height: 1.6;
}

.search-bar {
  display: flex;
  gap: 0.5rem;
  background: white;
  padding: 0.5rem;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  max-width: 720px;
  flex-wrap: wrap;
}
.search-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  flex: 1;
  min-width: 160px;
}
.search-field.location { flex: 2; }
.search-field input,
.search-field select {
  border: none;
  outline: none;
  font-size: 0.95rem;
  width: 100%;
  background: transparent;
  color: var(--slate-800);
}
.search-field select { cursor: pointer; }

.hero-badge {
  position: absolute;
  top: 2.5rem;
  right: 2rem;
  background: white;
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  box-shadow: var(--shadow);
  max-width: 240px;
}
.hero-badge strong { display: block; font-size: 0.9rem; color: var(--slate-900); }
.hero-badge span { font-size: 0.78rem; color: var(--slate-500); line-height: 1.35; }
.badge-icon {
  background: var(--teal-light);
  border-radius: 8px;
  padding: 0.4rem;
  flex-shrink: 0;
}

/* ── Categories ─────────────────────────────────────────── */
.categories {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.5rem 1rem;
}
.cat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.85rem;
}
@media (max-width: 1100px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px)  { .cat-grid { grid-template-columns: repeat(2, 1fr); } }

.cat-card {
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 1.15rem 1rem;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .12s;
}
.cat-card:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.cat-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}
.cat-card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--slate-900);
}
.cat-card p {
  font-size: 0.75rem;
  color: var(--slate-500);
  line-height: 1.35;
}

/* ── Trust strip ────────────────────────────────────────── */
.trust-strip {
  max-width: 1280px;
  margin: 0 auto 1.5rem;
  padding: 1.1rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
}
@media (max-width: 900px) { .trust-strip { grid-template-columns: repeat(2, 1fr); } }
.trust-item {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}
.trust-item strong { display: block; font-size: 0.85rem; color: var(--slate-900); }
.trust-item span { font-size: 0.75rem; color: var(--slate-500); line-height: 1.35; }

/* ── Results ────────────────────────────────────────────── */
.results-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem;
}
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.results-header h2 { font-size: 1.35rem; font-weight: 700; }
.results-meta { font-size: 0.875rem; color: var(--slate-500); margin-top: 0.2rem; }
.results-meta strong { color: var(--slate-700); }
.sort-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: var(--slate-600);
}
.sort-wrap select {
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  background: white;
  font-size: 0.875rem;
}

.results-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 960px) {
  .results-layout { grid-template-columns: 1fr; }
  .results-sidebar { order: -1; }
}

/* Cards */
.results-list { display: flex; flex-direction: column; gap: 0.9rem; }

.resource-card {
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 1rem;
  transition: box-shadow .15s;
}
.resource-card:hover { box-shadow: var(--shadow); }

.card-thumb {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ccfbf1, #a5f3fc);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-thumb .placeholder {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--teal-dark);
  text-align: center;
  line-height: 1.2;
  padding: 0.3rem;
}

.card-body { min-width: 0; }
.card-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.35rem; }
.tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--slate-100);
  color: var(--slate-600);
}
.tag.food { background: #d1fae5; color: #047857; }
.tag.shelter { background: #ede9fe; color: #6d28d9; }

.card-body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--slate-900);
}
.card-meta {
  font-size: 0.8rem;
  color: var(--slate-600);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.4rem;
}
.card-meta span { display: flex; align-items: center; gap: 0.35rem; }
.card-desc {
  font-size: 0.82rem;
  color: var(--slate-500);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  min-width: 150px;
}
.badge-status {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.badge-status.verified { background: #d1fae5; color: #047857; }
.badge-status.review { background: #fef3c7; color: #b45309; }

.confidence {
  width: 100%;
  text-align: right;
}
.confidence-label {
  font-size: 0.7rem;
  color: var(--slate-500);
  margin-bottom: 0.2rem;
  display: flex;
  justify-content: space-between;
}
.confidence-bar {
  height: 6px;
  background: var(--slate-200);
  border-radius: 3px;
  overflow: hidden;
}
.confidence-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .3s;
}
.confidence-fill.high { background: #16a34a; }
.confidence-fill.mid  { background: #f59e0b; }
.confidence-fill.low  { background: #ef4444; }

.card-side .meta-line {
  font-size: 0.72rem;
  color: var(--slate-500);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.view-details {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--teal);
  margin-top: auto;
}
.view-details:hover { text-decoration: underline; }

/* Sidebar */
.results-sidebar { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 70px; }

.map-panel {
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  overflow: hidden;
}
#map {
  height: 280px;
  width: 100%;
  background: #e2e8f0;
}
.btn-map {
  width: 100%;
  background: white;
  border: none;
  border-top: 1px solid var(--slate-200);
  padding: 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate-700);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.btn-map:hover { background: var(--slate-50); }

.filter-panel {
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  padding: 1.1rem;
}
.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.filter-header h3 { font-size: 0.95rem; font-weight: 600; }
.link-btn {
  background: none;
  border: none;
  color: var(--teal);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.filter-group { margin-bottom: 1rem; }
.filter-group > label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--slate-700);
  margin-bottom: 0.35rem;
}
.filter-input {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
}
.filter-input input {
  border: none;
  outline: none;
  font-size: 0.85rem;
  width: 100%;
  background: transparent;
}
.filter-group select {
  width: 100%;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  font-size: 0.85rem;
  background: white;
}
.checkbox-list { display: flex; flex-direction: column; gap: 0.35rem; }
.check-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--slate-700);
  cursor: pointer;
}
.check-item input { accent-color: var(--teal); width: 15px; height: 15px; }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  background: white;
  border-top: 1px solid var(--slate-200);
  padding: 2rem 1.5rem;
  margin-top: 1rem;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}
.footer-brand .logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.footer-brand p { font-size: 0.85rem; color: var(--slate-500); }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { font-size: 0.85rem; color: var(--slate-600); font-weight: 500; }
.footer-links a:hover { color: var(--teal); }
.footer-note {
  width: 100%;
  font-size: 0.75rem;
  color: var(--slate-400);
  text-align: center;
  margin-top: 0.5rem;
}

/* Leaflet tweaks */
.leaflet-container { font-family: var(--font); }
.custom-marker {
  background: var(--teal);
  border: 2px solid white;
  border-radius: 50%;
  width: 14px !important;
  height: 14px !important;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}

/* Multi-state select — present in DOM, hidden until expansion */
.state-select-wrap[hidden] { display: none !important; }
.state-select-wrap {
  display: flex;
  align-items: center;
  margin-left: 0.5rem;
}
.state-select-wrap select {
  font: inherit;
  font-size: 0.875rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  background: var(--surface, #fff);
  color: var(--text, #0f172a);
  cursor: pointer;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* Hero — match original V2 mock (Iowa capitol sunrise) */
.hero {
  position: relative;
  background-image:
    linear-gradient(90deg, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.78) 42%, rgba(255,255,255,0.25) 70%, rgba(255,255,255,0.05) 100%),
    url("assets/hero-bg.jpg");
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  min-height: 340px;
  padding: 2.5rem 0 2.75rem;
  overflow: hidden;
}
.hero::before {
  content: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.hero-eyebrow {
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  font-weight: 600;
  color: #0f766e;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.hero h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
  margin: 0 0 0.75rem;
  max-width: 18ch;
}
.hero-sub {
  color: #334155;
  max-width: 36rem;
  margin: 0 0 1.35rem;
  line-height: 1.55;
  font-size: 1rem;
}
/* Stronger Together — only inside hero, scrolls away with hero (not fixed over results) */
.hero {
  position: relative;
  overflow: hidden;
}
.hero-badge {
  position: absolute;
  right: 1.5rem;
  bottom: 1.75rem;
  top: auto;
  transform: none;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  padding: 0.9rem 1.1rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  max-width: 240px;
  z-index: 2;
  pointer-events: none;
}
@media (max-width: 900px) {
  .hero-badge {
    display: none; /* hide on smaller layouts where it collides with search */
  }
  .hero {
    background-position: 70% center;
  }
}


/* ── About & Support pages ── */
.page-main {
  max-width: 640px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}
.page-card {
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
  padding: 2rem 2rem 1.75rem;
}
.page-card h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 1rem;
}
.page-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0d9488;
  margin: 0 0 0.5rem;
}
.about-card p, .support-lead {
  color: #334155;
  line-height: 1.65;
  margin: 0 0 1rem;
}
.about-points {
  display: grid;
  gap: 0.75rem;
  margin: 1.5rem 0;
}
.about-point {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 1rem;
  background: #f0fdfa;
  border-radius: 10px;
  border: 1px solid #ccfbf1;
}
.about-point strong { color: #0f766e; font-size: 0.9rem; }
.about-point span { color: #475569; font-size: 0.875rem; }
.about-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.15rem;
  border-radius: 10px;
  border: 1.5px solid #0d9488;
  color: #0d9488;
  background: #fff;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn-outline:hover { background: #f0fdfa; }

.amount-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.5rem 0 1rem;
}
.amount-btn {
  min-width: 4.25rem;
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  color: #0f172a;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.amount-btn:hover { border-color: #0d9488; color: #0d9488; }
.amount-btn.selected {
  background: #0d9488;
  border-color: #0d9488;
  color: #fff;
}
.other-amount-wrap {
  margin-bottom: 1rem;
}
.other-amount-wrap label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.35rem;
}
.other-amount-wrap input {
  width: 100%;
  max-width: 12rem;
  padding: 0.55rem 0.75rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font: inherit;
}
.donate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25rem 0 1rem;
}
.btn-donate {
  min-width: 10rem;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
}
.support-note {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 1rem 0 0;
  padding: 0.75rem 1rem;
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
  border-radius: 10px;
  font-size: 0.85rem;
  color: #334155;
}
.note-icon {
  color: #0d9488;
  font-weight: 700;
}
.support-about-link {
  margin: 1.25rem 0 0;
  font-size: 0.9rem;
}
.support-about-link a { color: #0d9488; font-weight: 500; }


/* Resource detail modal + OSM map */
.detail-modal {
  position: fixed; inset: 0; z-index: 2000;
  display: none; align-items: center; justify-content: center;
}
.detail-modal.open { display: flex; }
.detail-backdrop {
  position: absolute; inset: 0; background: rgba(15,23,42,0.45);
}
.detail-panel {
  position: relative; z-index: 1;
  background: #fff; border-radius: 16px;
  width: min(560px, 94vw); max-height: 90vh; overflow: auto;
  padding: 1.5rem 1.5rem 1.25rem;
  box-shadow: 0 20px 50px rgba(15,23,42,0.2);
}
.detail-close {
  position: absolute; top: 0.75rem; right: 0.85rem;
  border: none; background: transparent; font-size: 1.5rem;
  line-height: 1; color: #64748b; cursor: pointer;
}
.detail-map {
  height: 220px; border-radius: 12px; margin: 1rem 0;
  border: 1px solid #e2e8f0; background: #f1f5f9;
}
.detail-actions {
  display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.5rem;
}
.view-details {
  background: none; border: none; padding: 0;
  color: #0d9488; font-weight: 600; cursor: pointer;
  font: inherit; text-align: left;
}
.view-details:hover { text-decoration: underline; }

.about-credit {
  margin: 1.5rem 0 0.5rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}
.about-credit p { margin: 0 0 0.4rem; color: #334155; }
.about-credit p:last-child { margin-bottom: 0; }


/* Connection mode — top-right Online/Offline */
.conn-status-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  margin-right: 0.35rem;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04);
}
.conn-status-btn .conn-label { font-weight: 700; }
.conn-status-btn .conn-date { color: #64748b; font-weight: 500; font-size: 0.75rem; }
.conn-status-btn .conn-dot {
  width: 0.5rem; height: 0.5rem; border-radius: 999px; background: #94a3b8;
}
.conn-status-btn.is-online {
  border-color: #86efac;
  background: #f0fdf4;
}
.conn-status-btn.is-online .conn-label { color: #15803d; font-weight: 700; }
.conn-status-btn.is-online .conn-dot { background: #22c55e; }
.conn-status-btn.is-offline {
  border-color: #fecaca;
  background: #fef2f2;
}
.conn-status-btn.is-offline .conn-label { color: #b91c1c; font-weight: 700; }
.conn-status-btn.is-offline .conn-dot { background: #ef4444; }
.conn-status-fixed {
  position: fixed; top: 0.75rem; right: 0.75rem; z-index: 1500;
}
.conn-mode-pop {
  position: fixed;
  top: 3.5rem;
  right: 1rem;
  z-index: 1600;
  max-width: min(360px, calc(100vw - 1.5rem));
}
.conn-pop-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15,23,42,0.14);
  padding: 1rem 1.1rem 1rem;
}
.conn-pop-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 0.65rem;
}
.conn-pop-head strong { font-size: 1rem; color: #0f172a; }
.conn-pop-close {
  border: none; background: transparent; font-size: 1.35rem;
  line-height: 1; color: #64748b; cursor: pointer;
}
.conn-pop-body { font-size: 0.9rem; color: #334155; line-height: 1.45; }
.conn-pop-body p { margin: 0 0 0.55rem; }
.conn-state { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.5rem !important; }
.conn-state.online strong { color: #15803d; font-weight: 700; }
.conn-state.offline strong { color: #b91c1c; font-weight: 700; }
.conn-state .conn-dot {
  width: 0.55rem; height: 0.55rem; border-radius: 999px; display: inline-block;
}
.conn-state.online .conn-dot { background: #22c55e; }
.conn-state.offline .conn-dot { background: #ef4444; }
.conn-muted { color: #64748b; font-size: 0.85rem; }
.conn-warn {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font-size: 0.85rem;
  margin: 0.5rem 0 0.25rem;
}
.conn-pop-actions {
  display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.85rem;
}
.conn-pop-actions .btn {
  border-radius: 10px; padding: 0.5rem 0.9rem; font-weight: 600; font-size: 0.85rem;
  border: none; cursor: pointer;
}
.conn-pop-actions .btn-primary { background: #0d9488; color: #fff; }
.conn-pop-actions .btn-outline {
  background: #fff; color: #0d9488; border: 1.5px solid #0d9488;
}
@media (max-width: 720px) {
  .conn-status-btn .conn-date { display: none; }
  .conn-mode-pop { right: 0.5rem; left: 0.5rem; max-width: none; }
}


/* PWA — Add to Home Screen (optional) */
.pwa-install-btn {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid #99f6e4;
  background: #f0fdfa;
  color: #0f766e;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  margin-right: 0.35rem;
  white-space: nowrap;
}
.pwa-install-btn:hover { background: #ccfbf1; }
.pwa-install-fixed {
  position: fixed; top: 3.25rem; right: 0.75rem; z-index: 1490;
}
.pwa-install-pop {
  position: fixed;
  top: 3.75rem;
  right: 1rem;
  z-index: 1650;
  max-width: min(380px, calc(100vw - 1.5rem));
}
.pwa-pop-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15,23,42,0.14);
  padding: 1rem 1.1rem;
}
.pwa-pop-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 0.55rem;
}
.pwa-pop-close {
  border: none; background: transparent; font-size: 1.35rem;
  color: #64748b; cursor: pointer; line-height: 1;
}
.pwa-pop-body { font-size: 0.9rem; color: #334155; line-height: 1.45; }
.pwa-pop-body p { margin: 0 0 0.5rem; }
.pwa-muted { color: #64748b; font-size: 0.85rem; }
.pwa-pop-actions {
  display: flex; gap: 0.45rem; justify-content: flex-end; margin-top: 0.85rem;
}
.pwa-pop-actions .btn {
  border-radius: 10px; padding: 0.5rem 0.95rem; font-weight: 600; font-size: 0.85rem;
  border: none; cursor: pointer;
}
.pwa-pop-actions .btn-primary { background: #0d9488; color: #fff; }
.pwa-pop-actions .btn-outline {
  background: #fff; color: #0d9488; border: 1.5px solid #0d9488;
}
.pwa-hint {
  margin: 0.75rem 0 0;
  padding: 0.55rem 0.65rem;
  background: #f0fdfa;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #0f766e;
}
@media (max-width: 720px) {
  .pwa-install-btn { font-size: 0.7rem; padding: 0.3rem 0.55rem; }
  .pwa-install-pop { left: 0.5rem; right: 0.5rem; max-width: none; }
}

.detail-verified-foot {
  margin: 1rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid #e2e8f0;
  font-size: 0.8rem;
  color: #64748b;
}
