@import url('https://fonts.googleapis.com/css2?family=Special+Elite&family=Inter:wght@400;500;600;700;800&display=swap');

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, sans-serif;
  background: #EEF2ED;
  color: #14231F;
}
#app { display: flex; flex-direction: column; min-height: 100vh; }

.header { background: #123C3A; color: #F2F4F1; padding: 26px 18px 20px; text-align: center; }
.header-tab {
  display: inline-block; background: #E3A73B; color: #14231F;
  font-family: 'Special Elite', monospace; font-size: 11px; letter-spacing: 1px;
  padding: 2px 8px; margin-bottom: 8px;
}
.h1 { font-family: 'Special Elite', monospace; font-size: 40px; margin: 0; font-weight: 400; letter-spacing: 1px; line-height: 1.1; }
.tagline { margin: 10px auto 0; font-size: 14px; color: #C9D6D2; max-width: 420px; line-height: 1.4; }

.nav { display: flex; background: #F7F8F5; border-bottom: 1px solid #C9D2C6; position: sticky; top: 0; z-index: 2; }
.nav-btn { flex: 1; background: none; border: none; padding: 12px 6px; font-size: 13px; cursor: pointer; color: #6B756F; font-weight: 500; border-bottom: 3px solid transparent; }
.nav-btn.active { color: #14231F; font-weight: 700; border-bottom: 3px solid #E3A73B; }

.body { padding: 14px; flex: 1; width: 100%; max-width: 760px; margin: 0 auto; }
.nav { justify-content: center; }
.nav .nav-btn { flex: 0 1 180px; }

input, textarea {
  width: 100%; box-sizing: border-box; padding: 9px 10px; font-size: 14px;
  border: 1px solid #C9D2C6; background: #fff; outline: none; font-family: Inter, sans-serif;
}
input.search-input { padding: 12px 14px; font-size: 15px; margin-bottom: 14px; }
textarea { resize: vertical; }

.card { background: #fff; border: 1px solid #C9D2C6; padding: 14px; margin-bottom: 10px; width: 100%; }
.card.clickable { cursor: pointer; text-align: left; display: block; }
.card.border-agency { border-left: 4px solid #123C3A; }
.card.border-agent { border-left: 4px solid #B87F1E; }
.card.border-hospital { border-left: 4px solid #8C3A32; }
.card.border-group { border-left: 4px solid #3F5E8C; }

.choice-grid { display: grid; gap: 10px; grid-template-columns: 1fr; margin: 12px 0 6px; }
.choice-card { text-align: left; background: #fff; border: 2px solid #C9D2C6; padding: 14px; cursor: pointer; font-family: Inter, sans-serif; color: #14231F; }
.choice-card:hover { border-color: #123C3A; }
.choice-card.active { border-color: #E3A73B; background: #FFF9EE; }
.choice-title { font-weight: 800; font-size: 15px; margin-bottom: 4px; }
.choice-desc { font-size: 12.5px; line-height: 1.5; color: #5B6660; }
.inline-link { background: none; border: none; padding: 0; color: #123C3A; font-weight: 700; text-decoration: underline; cursor: pointer; font-size: 12px; font-family: Inter, sans-serif; }
@media (min-width: 520px) { .choice-grid { grid-template-columns: 1fr 1fr; } }

.empty-box { background: #F7F8F5; border: 1px dashed #C9D2C6; padding: 16px; margin-bottom: 14px; }

.back-btn { background: none; border: none; color: #123C3A; font-weight: 700; cursor: pointer; padding: 0; font-size: 14px; }
.primary-btn {
  width: 100%; background: #123C3A; color: #fff; border: none; padding: 13px 0;
  font-size: 15px; font-weight: 700; cursor: pointer; margin-top: 4px;
}
.primary-btn:disabled { opacity: 0.6; cursor: default; }
.tiny-btn {
  padding: 5px 10px; font-size: 12px; font-weight: 700; border: 1px solid #C9D2C6;
  background: #fff; color: #14231F; cursor: pointer; text-decoration: none; display: inline-block;
}
.tiny-btn.approve { background: #1F5C57; color: #fff; border-color: #1F5C57; }
.tiny-btn.reject { background: #8C3A32; color: #fff; border-color: #8C3A32; }

.toast { background: #123C3A; color: #fff; padding: 8px 12px; font-size: 13px; margin: 0 14px 10px; }
.footer { text-align: center; font-size: 11px; color: #6B756F; padding: 14px 10px 20px; }
.admin-link { display: block; margin: 8px auto 0; background: none; border: none; color: #9BA59E; font-size: 10px; text-decoration: underline; cursor: pointer; }

.stars { display: flex; gap: 3px; }
.star { background: none; border: none; padding: 0; cursor: pointer; font-size: 20px; line-height: 1; color: #D8DDD5; }
.star.filled { color: #E3A73B; }
.star[disabled] { cursor: default; }

.category-row { margin-bottom: 12px; }
.category-head { display: flex; justify-content: space-between; align-items: baseline; }
.category-head .label { font-size: 13px; font-weight: 600; }
.category-head .weight { font-size: 11px; color: #8A948E; }
.anchor-list { margin: 2px 0 0; padding: 0; list-style: none; }
.anchor-list li { display: flex; gap: 6px; font-size: 11px; color: #6B756F; line-height: 1.5; }
.anchor-list .score { color: #B87F1E; font-weight: 700; flex-shrink: 0; }

.return-toggle { display: flex; gap: 6px; margin-top: 4px; }
.return-btn { flex: 1; padding: 6px 0; font-size: 12px; font-weight: 700; border: 1px solid #C9D2C6; background: #fff; color: #14231F; cursor: pointer; }
.return-btn.active { background: #123C3A; color: #fff; border-color: #123C3A; }
/* one straight row, lowest to highest; scrolls sideways on narrow phones */
.pay-grid { display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.pay-grid .return-btn { flex: 1 0 88px; padding: 8px 4px; white-space: nowrap; }

.badge { font-size: 10px; font-weight: 700; color: #fff; padding: 2px 6px; letter-spacing: 0.3px; display: inline-block; }
.badge.y { background: #1F5C57; }
.badge.n { background: #8C3A32; }
.badge.maybe { background: #B87F1E; }
.badge.anon { background: #5B6660; }
.edit-banner { border-left: 4px solid #E3A73B; background: #FFF9EE; }
.anon-row { margin-top: 12px; padding-top: 10px; border-top: 1px solid #EEF2ED; }

.chip { font-size: 11px; color: #5B6660; margin-right: 10px; }

.section-label { font-size: 11px; letter-spacing: 0.3px; font-weight: 700; margin-bottom: 8px; }
.score-row { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.score-row .big { font-weight: 800; font-size: 18px; }

.error-text { color: #8C3A32; font-size: 13px; }
.hint-text { font-size: 12px; color: #6B756F; margin: 6px 0 0; }

.checkbox-row { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-size: 12px; color: #5B6660; }
.checkbox-row input { width: auto; margin-top: 2px; }

a.tiny-btn { text-decoration: none; }
.link-btn { display: block; width: 100%; background: none; border: none; color: #123C3A; font-size: 12px; text-decoration: underline; cursor: pointer; padding: 10px 0 0; text-align: center; font-family: Inter, sans-serif; }

/* ---------- category averages (detail view) ---------- */
.stats-table { width: 100%; border-collapse: collapse; }
.stats-table td { padding: 5px 4px; border-bottom: 1px solid #EEF2ED; font-size: 12.5px; vertical-align: middle; }
.stats-table tr:last-child td { border-bottom: none; }
.stats-label { color: #3C4A45; }
.stats-stars { width: 80px; }
.stats-avg { width: 40px; text-align: right; font-weight: 800; font-size: 14px !important; }
.stats-n { width: 60px; text-align: right; color: #8A948E; font-size: 11px !important; }
.stats-return { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; font-size: 12px; color: #3C4A45; }

/* ---------- landing page ---------- */

.header-compact { padding: 30px 18px 10px; }
.header-compact .h1 { font-size: 48px; }

.landing { flex: 1; }
.landing section { padding: 30px 18px; text-align: center; }
.landing section > * { margin-left: auto; margin-right: auto; }

.hero {
  background: #123C3A;
  color: #F2F4F1;
  padding-top: 6px !important;
}
.hero-copy { max-width: 620px; margin: 0 auto; }
.hero .eyebrow {
  font-family: 'Special Elite', monospace;
  font-size: 11px; letter-spacing: 1.4px; color: #E3A73B; margin-bottom: 10px;
}
.hero-h {
  font-family: 'Special Elite', monospace;
  font-weight: 400; font-size: 27px; line-height: 1.22; margin: 0 0 12px;
}
.hero-sub { font-size: 15px; line-height: 1.55; color: #C9D6D2; margin: 0 auto 18px; max-width: 540px; }
.hero-fine { font-size: 12px; color: #8FA39E; margin: 12px 0 0; }
.hero-art { display: block; width: 100%; max-width: 480px; height: auto; margin: 26px auto 0; border: 1px solid #1F5C57; }

.cta-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.btn {
  font-family: Inter, sans-serif; font-size: 15px; font-weight: 700;
  padding: 13px 22px; border: 2px solid transparent; cursor: pointer;
}
.btn-amber { background: #E3A73B; color: #14231F; border-color: #E3A73B; }
.btn-amber:hover { background: #F0B54B; }
.btn-ghost { background: transparent; color: #F2F4F1; border-color: #5C7C77; }
.btn-ghost:hover { border-color: #E3A73B; color: #E3A73B; }

.lp-label {
  font-family: 'Special Elite', monospace;
  font-size: 11px; letter-spacing: 1.4px; color: #B87F1E; margin-bottom: 10px;
}
.lp-h { font-family: 'Special Elite', monospace; font-weight: 400; font-size: 21px; line-height: 1.3; margin: 0 0 12px; }
.lp-lead { font-size: 16px; line-height: 1.6; font-weight: 500; margin: 0 auto 12px; max-width: 620px; }
.lp-body { font-size: 14.5px; line-height: 1.65; color: #3C4A45; margin: 0 auto 10px; max-width: 620px; }

.verify-band { background: #F7F8F5; border-top: 1px solid #C9D2C6; border-bottom: 1px solid #C9D2C6; }
.check-list { list-style: none; padding: 0; margin: 14px auto 0; max-width: 620px; }
.check-list li { margin-bottom: 9px; font-size: 14px; line-height: 1.5; color: #3C4A45; }
.check-list li::before { content: "✓"; color: #1F5C57; font-weight: 800; font-size: 15px; margin-right: 8px; }

.feature-grid { display: grid; gap: 12px; grid-template-columns: 1fr; margin-top: 14px; max-width: 960px; }
.feature { background: #fff; border: 1px solid #C9D2C6; border-top-width: 4px; padding: 16px; }
.feature p { margin: 0; font-size: 13.5px; line-height: 1.6; color: #3C4A45; }
.feature-kicker { font-size: 11px; font-weight: 800; letter-spacing: 0.5px; margin-bottom: 7px; }
.f-hospital { border-top-color: #8C3A32; }
.f-hospital .feature-kicker { color: #8C3A32; }
.f-agency { border-top-color: #123C3A; }
.f-agency .feature-kicker { color: #123C3A; }
.f-agent { border-top-color: #B87F1E; }
.f-agent .feature-kicker { color: #B87F1E; }
.f-group { border-top-color: #3F5E8C; }
.f-group .feature-kicker { color: #3F5E8C; }

.step-list { list-style: none; padding: 0; margin: 0 auto; max-width: 560px; }
.step-list li { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 20px; font-size: 14.5px; line-height: 1.6; color: #3C4A45; }
.step-list strong { color: #14231F; display: block; }
.step-n {
  flex-shrink: 0; width: 34px; height: 34px; background: #123C3A; color: #E3A73B;
  font-family: 'Special Elite', monospace; font-size: 17px;
  display: flex; align-items: center; justify-content: center;
}

.beware-band { background: #14231F; color: #E7EAE6; border-top: 4px solid #8C3A32; }
.beware-stamp {
  display: inline-block; border: 2px solid #8C3A32; color: #D9736A;
  font-family: 'Special Elite', monospace; font-size: 12px; letter-spacing: 2px;
  padding: 4px 10px; margin-bottom: 14px; transform: rotate(-2deg);
}
.beware-body { font-size: 14.5px; line-height: 1.65; color: #C2CBC6; margin: 0 auto 12px; max-width: 620px; }
.beware-fine { font-size: 12.5px; line-height: 1.55; color: #8A948E; margin: 0 auto; max-width: 620px; font-style: italic; }

.final-cta { background: #F7F8F5; border-top: 1px solid #C9D2C6; }
.final-cta .btn-ghost { color: #123C3A; border-color: #C9D2C6; }
.final-cta .btn-ghost:hover { border-color: #123C3A; color: #123C3A; }

@media (min-width: 760px) {
  .h1 { font-size: 52px; }
  .header-compact .h1 { font-size: 64px; }
  .landing section { padding: 48px 40px; }
  .hero { padding-top: 16px !important; }
  .hero-h { font-size: 36px; }
  .hero-art { max-width: 540px; margin-top: 32px; }
  .lp-h { font-size: 24px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
