:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #12313a;
  background: #f4fbfa;
  --ink: #12313a;
  --muted: #5f7378;
  --teal: #078c9a;
  --teal-dark: #087b75;
  --line: #d6ecea;
  --surface: #ffffff;
  --shadow: 0 18px 50px rgb(16 86 93 / 12%);
}

* { box-sizing: border-box; }

body { margin: 0; min-width: 320px; overflow-x: hidden; }

a { color: inherit; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #f2b84b;
  outline-offset: 3px;
}

.app-shell {
  min-height: 100vh;
  padding: 0 24px 48px;
}

.site-header {
  width: min(100%, 1180px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
  padding: 22px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 850;
  text-decoration: none;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: block;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 10px;
  object-fit: contain;
}

.top-nav { display: flex; align-items: center; gap: 8px; }
.nav-link { padding: 10px 14px; border-radius: 999px; color: var(--muted); font-size: 0.9rem; font-weight: 750; text-decoration: none; }
.nav-link:hover, .nav-link.active { background: #e2f6f3; color: var(--teal-dark); }

.page-container { width: min(100%, 1180px); margin: 0 auto; }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr); gap: 22px; align-items: stretch; }
.hero-copy, .trust-card, .metric-card, .empty-state { border: 1px solid var(--line); border-radius: 26px; background: var(--surface); box-shadow: var(--shadow); }
.hero-copy { padding: clamp(28px, 5vw, 64px); }
.hero-copy > p:not(.eyebrow):not(.status-message) { max-width: 680px; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.2rem); line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 20px; }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: 12px 18px; border: 1px solid transparent; border-radius: 13px; font-size: 0.9rem; font-weight: 800; text-decoration: none; transition: transform 160ms ease, box-shadow 160ms ease; }
.button:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgb(16 86 93 / 12%); }
.button-primary { background: var(--teal); color: #fff; }
.button-secondary { border-color: #b7e7e3; background: #e7f7f4; color: var(--teal-dark); }
.trust-card { display: flex; flex-direction: column; justify-content: center; padding: 30px; background: linear-gradient(145deg, #e9f9f6, #fff); }
.trust-icon { display: grid; width: 48px; height: 48px; place-items: center; margin-bottom: 28px; border-radius: 16px; background: var(--teal); color: #fff; font-size: 1.4rem; }
.trust-card h2 { margin: 0; font-size: 1.7rem; line-height: 1.08; }
.trust-card > p:not(.eyebrow) { color: var(--muted); line-height: 1.55; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 22px 0 44px; }
.metric-card { display: flex; min-height: 132px; flex-direction: column; justify-content: center; padding: 22px; box-shadow: none; }
.metric-card strong { margin: 3px 0; color: var(--ink); font-size: 2.4rem; line-height: 1; }
.metric-card > span:last-child { color: var(--muted); font-size: 0.82rem; }
.metric-card-reward { background: #fffaf0; border-color: #f5d79b; }
.metric-label { color: var(--teal-dark); font-size: 0.8rem; font-weight: 800; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-heading h2 { margin: 0; font-size: 1.85rem; }
.section-note { color: var(--muted); font-size: 0.85rem; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.filter-bar label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.75rem; font-weight: 800; }
.filter-bar select { min-height: 38px; padding: 8px 30px 8px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; font-size: 0.8rem; font-weight: 700; }
.empty-state { display: grid; min-height: 190px; place-items: center; align-content: center; padding: 28px; text-align: center; box-shadow: none; }
.empty-state h3 { margin: 8px 0 4px; }
.empty-state p { margin: 0; color: var(--muted); }
.empty-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: #e7f7f4; color: var(--teal); font-size: 1.5rem; }
.report-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.report-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: 0 12px 28px rgb(16 86 93 / 8%); }
.report-card-image-wrap { height: 160px; overflow: hidden; background: #e7f7f4; }
.report-card-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.report-card-body { padding: 16px; }
.report-card-topline, .report-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.report-type, .report-status { display: inline-flex; min-height: 25px; align-items: center; padding: 4px 8px; border-radius: 999px; font-size: 0.68rem; font-weight: 850; }
.report-type-lost { background: #fff0f1; color: #bb4652; }
.report-type-found { background: #eefaf0; color: #287442; }
.report-type-sighting { background: #fff8e8; color: #946415; }
.report-status { background: #f1f5f5; color: var(--muted); }
.report-card h3 { margin: 13px 0 4px; font-size: 1.08rem; }
.report-card-meta, .report-card-description { margin: 0; color: var(--muted); font-size: 0.8rem; line-height: 1.45; }
.report-card-description { min-height: 46px; margin-top: 10px; }
.report-card-footer { align-items: end; margin-top: 16px; color: var(--muted); font-size: 0.7rem; }
.text-link { color: var(--teal-dark); font-weight: 800; text-decoration: none; white-space: nowrap; }
.text-link:hover { text-decoration: underline; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.match-list { display: grid; gap: 14px; }
.match-card { display: grid; grid-template-columns: 142px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-left: 5px solid var(--teal); border-radius: 18px; background: var(--surface); box-shadow: 0 12px 28px rgb(16 86 93 / 8%); }
.match-very-high { border-left-color: #198a64; }
.match-high { border-left-color: var(--teal); }
.match-possible { border-left-color: #d89b2b; }
.match-weak { border-left-color: #a0abad; }
.match-card-image { width: 142px; height: 100%; min-height: 210px; object-fit: cover; background: #e7f7f4; }
.match-card-content { padding: 18px; }
.match-card-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.match-band { color: var(--teal-dark); font-size: 0.76rem; font-weight: 850; }
.match-card h3 { margin: 5px 0 0; font-size: 1.2rem; }
.match-score { display: inline-flex; align-items: baseline; color: var(--ink); font-size: 1.65rem; line-height: 1; }
.match-score small { color: var(--muted); font-size: 0.7rem; }
.match-card-meta, .match-explanation { color: var(--muted); font-size: 0.82rem; line-height: 1.45; }
.match-card-signals { display: flex; flex-wrap: wrap; gap: 7px; margin: 13px 0; }
.match-card-signals span { padding: 6px 8px; border-radius: 8px; background: #f1f7f6; color: var(--teal-dark); font-size: 0.72rem; font-weight: 800; }
.match-explanation { margin: 0 0 15px; }
.match-contact-button { min-height: 38px; padding: 9px 13px; font-size: 0.78rem; }
.matches-empty { display: grid; min-height: 180px; place-items: center; align-content: center; padding: 28px; border: 1px dashed #b7d9d6; border-radius: 18px; text-align: center; }
.matches-empty h3 { margin: 8px 0 4px; }
.matches-empty p { margin: 0; color: var(--muted); }
.detail-page { padding-bottom: 30px; }
.result-banner { min-height: 24px; margin: 18px 0 12px; color: var(--teal-dark); font-size: 0.88rem; font-weight: 800; }
.detail-summary { display: grid; grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.25fr); overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.detail-image-wrap { min-height: 300px; background: #e7f7f4; }
.detail-image-wrap img { display: block; width: 100%; height: 100%; min-height: 300px; object-fit: cover; }
.detail-copy { padding: clamp(24px, 5vw, 48px); }
.detail-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-copy h1 { margin: 12px 0 8px; font-size: clamp(2rem, 5vw, 3.4rem); }
.detail-copy > p { color: var(--muted); line-height: 1.6; }
.detail-meta { font-weight: 800; }
.detail-location { padding: 12px; border-radius: 10px; background: #e7f7f4; color: var(--teal-dark) !important; font-size: 0.82rem; font-weight: 750; }
.detail-date { font-size: 0.82rem; }
.matches-section { margin-top: 38px; }
.resolution-panel { max-width: 620px; margin: 26px auto 0; padding: 26px; border: 1px solid #bfe7c9; border-radius: 20px; background: #f0fbf2; text-align: center; }
.resolution-panel h2 { margin: 6px 0; }
.resolution-panel > p:not(.eyebrow):not(.resolution-message) { color: #41704c; }
.resolution-panel [disabled] { cursor: default; opacity: 0.8; }
.resolution-message { color: #287442; font-weight: 800; }
.contact-dialog { width: min(100% - 28px, 480px); padding: 0; border: 0; border-radius: 22px; color: var(--ink); box-shadow: 0 24px 70px rgb(16 86 93 / 24%); }
.contact-dialog::backdrop { background: rgb(18 49 58 / 48%); }
.contact-dialog form { position: relative; padding: 30px; }
.contact-dialog h2 { margin: 8px 0; font-size: 1.6rem; }
.contact-dialog form > p:not(.eyebrow):not(.form-feedback) { color: var(--muted); font-size: 0.88rem; line-height: 1.55; }
.dialog-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: #eef6f5; color: var(--muted); cursor: pointer; font-size: 1.35rem; line-height: 1; }
.contact-candidate { display: grid; gap: 4px; margin: 18px 0; padding: 13px; border-radius: 11px; background: #e7f7f4; }
.contact-candidate span { color: var(--muted); font-size: 0.78rem; }
.contact-dialog [type="submit"] { width: 100%; border: 0; cursor: pointer; }
.form-page { padding-bottom: 30px; }
.form-intro { max-width: 760px; margin: 22px auto 18px; text-align: center; }
.form-intro h1 { margin-inline: auto; }
.form-intro > p:not(.eyebrow) { color: var(--muted); line-height: 1.55; }
.form-card { max-width: 900px; margin: 0 auto; padding: clamp(22px, 4vw, 42px); border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.form-section-heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.form-section-heading + .form-section-heading { margin-top: 34px; }
.step-badge { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: #e7f7f4; color: var(--teal-dark); font-size: 0.82rem; font-weight: 850; }
.form-section-heading h2 { margin: 0; font-size: 1.18rem; }
.form-section-heading p { margin: 3px 0 0; color: var(--muted); font-size: 0.82rem; }
.segmented-control { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.segment { position: relative; display: block; }
.segment input { position: absolute; opacity: 0; }
.segment span { display: block; padding: 14px 10px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); cursor: pointer; font-size: 0.82rem; font-weight: 800; text-align: center; }
.segment input:checked + span { border-color: var(--teal); background: #e7f7f4; color: var(--teal-dark); box-shadow: 0 0 0 2px #b7e7e3; }
.segment input:focus-visible + span { outline: 3px solid #f2b84b; outline-offset: 3px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid label { display: grid; gap: 7px; color: var(--ink); font-size: 0.78rem; font-weight: 800; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; min-height: 44px; padding: 11px 12px; border: 1px solid #c9dfdd; border-radius: 10px; background: #fbfefe; color: var(--ink); font: inherit; font-size: 0.88rem; }
.form-grid textarea { resize: vertical; }
.form-grid input::placeholder, .form-grid textarea::placeholder { color: #91a5a8; }
.photo-preview { display: block; width: 100%; height: 110px; margin-top: 2px; overflow: hidden; border: 1px dashed #b7d9d6; border-radius: 10px; background: #e7f7f4; }
.photo-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.field-wide { grid-column: 1 / -1; }
.location-field { display: grid; gap: 8px; }
.location-field > label { color: var(--ink); font-size: 0.78rem; font-weight: 800; }
.location-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.button-small { min-height: 36px; padding: 8px 11px; font-size: 0.76rem; }
.location-map { width: 100%; height: 320px; min-height: 320px; overflow: hidden; border: 1px solid #c9dfdd; border-radius: 12px; background: #e7f7f4; z-index: 0; }
.location-map-fallback { padding: 24px; color: var(--muted); font-size: 0.82rem; }
.location-hint { margin: 0; color: var(--muted); font-size: 0.76rem; line-height: 1.4; }
.privacy-note { margin: 24px 0 18px; padding: 12px 14px; border-radius: 11px; background: #fff8e8; color: #76551b; font-size: 0.78rem; line-height: 1.45; }
.form-feedback { min-height: 0; margin-bottom: 12px; color: #bb4652; font-size: 0.8rem; font-weight: 750; }
.field-error { color: #bb4652; font-size: 0.72rem; font-weight: 750; }
.form-grid [aria-invalid="true"] { border-color: #d75e69; box-shadow: 0 0 0 2px rgb(215 94 105 / 12%); }
.submit-button { width: 100%; border: 0; cursor: pointer; }

.foundation-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0; }
.chip { display: inline-flex; align-items: center; min-height: 32px; padding: 6px 11px; border: 1px solid transparent; border-radius: 999px; font-size: 0.78rem; font-weight: 800; }
.chip-primary { border-color: #b7e7e3; background: #e7f7f4; color: var(--teal-dark); }
.chip-success { border-color: #bee6c9; background: #eefaf0; color: #287442; }
.chip-reward { border-color: #f5d79b; background: #fff8e8; color: #946415; }

.starter-card {
  width: min(100%, 720px);
  padding: clamp(28px, 6vw, 64px);
  border: 1px solid #d6ecea;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.eyebrow { margin: 0 0 12px; color: #078c9a; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
h1 { max-width: 560px; margin: 0; color: var(--ink); font-size: clamp(2rem, 7vw, 4.25rem); line-height: 0.98; }
.starter-card > p:not(.eyebrow):not(.status-message) { max-width: 560px; color: var(--muted); font-size: 1.08rem; line-height: 1.6; }
.status-message { padding: 12px 16px; border-radius: 12px; background: #e7f7f4; color: #087b75 !important; font-weight: 700; }

@media (max-width: 560px) {
  .app-shell { padding: 0 14px 32px; }
  .site-header { padding: 16px 0; }
  .nav-link { padding: 8px 10px; }
  .starter-card { padding: 28px 22px; border-radius: 22px; }
  .hero-grid, .metric-grid { grid-template-columns: 1fr; }
  .report-grid { grid-template-columns: 1fr; }
  .match-card { grid-template-columns: 1fr; }
  .match-card-image { width: 100%; height: 180px; min-height: 0; }
  .detail-summary { grid-template-columns: 1fr; }
  .detail-image-wrap, .detail-image-wrap img { min-height: 220px; height: 220px; }
  .hero-copy { padding: 28px 22px; }
  .trust-card { padding: 24px 22px; }
  .button { width: 100%; }
  .section-heading { align-items: start; flex-direction: column; gap: 5px; }
  .segmented-control, .form-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
}

.rewards-page { padding-bottom: 40px; }
.rewards-hero { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 22px; align-items: center; margin-top: 22px; padding: clamp(26px, 5vw, 48px); border: 1px solid #f5d79b; border-radius: 24px; background: linear-gradient(135deg, #fffaf0, #fff); box-shadow: var(--shadow); }
.rewards-hero h1 { max-width: 680px; font-size: clamp(2rem, 5vw, 3.4rem); }
.rewards-hero p:not(.eyebrow) { max-width: 600px; color: var(--muted); line-height: 1.55; }
.points-balance { display: grid; justify-items: center; padding: 22px 14px; border-radius: 18px; background: #f9e5ad; color: #76551b; text-align: center; }
.points-balance span, .points-balance small { font-size: 0.76rem; font-weight: 800; }
.points-balance strong { margin: 5px 0; color: var(--ink); font-size: 3rem; line-height: 1; }
.profile-strip { display: flex; align-items: center; gap: 13px; margin: 18px 0 42px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.profile-avatar { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 50%; background: #e7f7f4; font-size: 1.4rem; }
.profile-strip p { margin: 3px 0 0; color: var(--muted); font-size: 0.78rem; }
.badge-row { display: flex; gap: 8px; margin-left: auto; }
.badge-row span { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: #fff8e8; color: #946415; }
.reward-grid { display: grid; gap: 12px; }
.reward-card { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 10px 24px rgb(16 86 93 / 6%); }
.reward-icon { display: grid; width: 56px; height: 56px; place-items: center; border-radius: 16px; font-size: 1.35rem; }
.reward-icon-1 { background: #dff3ed; color: #1a8a68; }
.reward-icon-2 { background: #e5effb; color: #3977b3; }
.reward-icon-3 { background: #ffead8; color: #cf743c; }
.reward-copy h3 { margin: 3px 0; font-size: 1rem; }
.reward-copy p { margin: 0; color: var(--muted); font-size: 0.78rem; }
.demo-label { color: #946415; font-size: 0.62rem; font-weight: 850; letter-spacing: 0.08em; }
.reward-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 9px; color: var(--muted); font-size: 0.72rem; }
.reward-meta strong { color: #946415; }
.reward-button { min-height: 38px; padding: 9px 13px; font-size: 0.76rem; }
.mobile-nav { display: none; }
.redemption-success { margin-top: 18px; padding: 24px; border: 1px solid #bfe7c9; border-radius: 18px; background: #f0fbf2; text-align: center; }
.redemption-success h2 { margin: 5px 0 12px; font-size: 1.2rem; }
.redemption-success > p:not(.eyebrow) { color: #41704c; font-size: 0.82rem; }
.redemption-code { display: inline-block; padding: 12px 16px; border: 1px dashed #75b98a; border-radius: 10px; background: #fff; color: #287442; font-size: 1.35rem; letter-spacing: 0.08em; }

@media (max-width: 560px) {
  .rewards-hero { grid-template-columns: 1fr; }
  .profile-strip { margin-bottom: 30px; }
  .badge-row { display: none; }
  .reward-card { grid-template-columns: 46px minmax(0, 1fr); gap: 11px; }
  .reward-icon { width: 46px; height: 46px; }
  .reward-button { grid-column: 2; justify-self: start; }
  .mobile-nav { position: sticky; bottom: 0; z-index: 5; display: grid; grid-template-columns: repeat(3, 1fr); width: calc(100% + 28px); margin: 24px -14px -32px; padding: 9px 10px; border-top: 1px solid var(--line); background: rgb(255 255 255 / 94%); box-shadow: 0 -8px 22px rgb(16 86 93 / 8%); }
  .mobile-nav a { display: grid; justify-items: center; gap: 2px; color: var(--muted); font-size: 1rem; font-weight: 800; text-decoration: none; }
  .mobile-nav span { font-size: 0.62rem; }
  .mobile-nav .active { color: var(--teal-dark); }
}
