/* Lost Cat Search - georgethornton.net */
:root {
  --bg: #faf7f3;
  --card: #ffffff;
  --ink: #26221e;
  --muted: #7a7168;
  --line: #e8e1d8;
  --primary: #e05d2d;
  --primary-dark: #c44e22;
  --ok: #1f9d55;
  --info: #2f6fd6;
  --err: #d64545;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 16px;
}
::selection { background: #f8d9c4; color: #5a2c12; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2 { line-height: 1.2; }
h1, h2, h3 { text-wrap: balance; overflow-wrap: break-word; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(224, 93, 45, .35); border-color: var(--primary); }
mark { background: #ffe8b8; color: inherit; padding: 0 3px; border-radius: 4px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Skip link */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 99; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0; font-weight: 600; }
.skip-link:focus { left: 0; text-decoration: none; color: #fff; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 1px 6px rgba(38, 34, 30, .04); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--ink); display: flex; gap: 10px; align-items: center; }
.brand:hover { text-decoration: none; }
.brand .brand-text { line-height: 1; }
.nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.nav a:not(.btn) { color: var(--ink); font-weight: 500; }
.nav a:not(.btn):hover { color: var(--primary-dark); }
.nav a[aria-current="page"]:not(.btn) { color: var(--primary-dark); font-weight: 700; }
.nav a[aria-current="page"]:not(.btn)::after { content: ""; display: block; height: 2px; background: var(--primary); border-radius: 2px; margin-top: 1px; }

/* Buttons */
.btn { display: inline-block; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; cursor: pointer; font-size: .95rem; transition: background .12s, border-color .12s, transform .06s, box-shadow .12s; }
.btn:active { transform: translateY(1px); }
.btn:hover { text-decoration: none; border-color: var(--primary); color: var(--primary-dark); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(196, 78, 34, .22); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; box-shadow: 0 3px 12px rgba(196, 78, 34, .3); }
.btn-lg { padding: 12px 22px; font-size: 1.05rem; }
.btn-danger { background: #fff; border-color: var(--err); color: var(--err); }
.btn-danger:hover { background: var(--err); border-color: var(--err); color: #fff; }

main.container { padding-top: 24px; padding-bottom: 48px; min-height: 60vh; }
main.container:focus { outline: none; }

/* Flash messages */
.flash-wrap { margin-bottom: 16px; }
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 8px; font-weight: 500; }
.flash-success { background: #e7f6ec; color: #14532d; border: 1px solid #bfe5cd; }
.flash-error { background: #fdecec; color: #7f1d1d; border: 1px solid #f5c2c2; }

/* Hero (cat artwork + paw-print pattern) */
.hero { position: relative; text-align: center; padding: 46px 18px 42px; overflow: hidden; border: 1px solid #f3ddc4; border-radius: var(--radius);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='%23f0c9a5'%3E%3Cellipse cx='50' cy='64' rx='21' ry='17'/%3E%3Ccircle cx='24' cy='38' r='9.5'/%3E%3Ccircle cx='42' cy='26' r='10'/%3E%3Ccircle cx='62' cy='26' r='10'/%3E%3Ccircle cx='79' cy='39' r='9.5'/%3E%3C/g%3E%3C/svg%3E") repeat, linear-gradient(180deg, #fdeedd 0%, #fbf4e9 100%);
  background-size: 120px 120px; }
.hero-art { position: relative; z-index: 1; width: 140px; margin: 0 auto 8px; animation: bob 4s ease-in-out infinite; }
.hero-art img { width: 100%; display: block; filter: drop-shadow(0 10px 16px rgba(224, 93, 45, .28)); }
.hero h1, .hero p, .hero > .btn { position: relative; z-index: 1; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.paw-float { position: absolute; z-index: 0; opacity: .35; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='%23e08a4f'%3E%3Cellipse cx='50' cy='64' rx='21' ry='17'/%3E%3Ccircle cx='24' cy='38' r='9.5'/%3E%3Ccircle cx='42' cy='26' r='10'/%3E%3Ccircle cx='62' cy='26' r='10'/%3E%3Ccircle cx='79' cy='39' r='9.5'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain; }
.paw-float.f1 { top: 16px; left: 5%; width: 46px; height: 46px; transform: rotate(-20deg); }
.paw-float.f2 { bottom: 20px; right: 6%; width: 40px; height: 40px; transform: rotate(15deg); }
.paw-float.f3 { top: 42%; left: 11%; width: 26px; height: 26px; transform: rotate(8deg); }
.paw-float.f4 { top: 20%; right: 12%; width: 30px; height: 30px; transform: rotate(12deg); }
.hero h1 { font-size: 2rem; margin: 0 0 10px; }
.hero p { color: var(--muted); font-size: 1.08rem; margin: 0 0 18px; }

/* Filters */
.filters form { display: flex; gap: 10px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.filters input[type=search] { flex: 1 1 260px; }
input, select, textarea { font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
textarea { resize: vertical; min-height: 110px; }

/* Grid + cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; margin-top: 22px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.card:hover { text-decoration: none; box-shadow: 0 6px 18px rgba(38, 34, 30, .10); transform: translateY(-2px); }
.card-photo { position: relative; aspect-ratio: 4 / 3; background: #f1ece5; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.no-photo { font-size: 3rem; opacity: .6; }
.no-photo.big { font-size: 5rem; }
.badge { position: absolute; top: 10px; left: 10px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; text-transform: capitalize; color: #fff; }
.badge-lost { background: var(--err); }
.badge-found { background: var(--ok); }
.badge-safe { background: var(--info); }
.card-body { padding: 12px 14px 16px; }
.card-body h3 { margin: 0 0 4px; font-size: 1.08rem; }
.muted { color: var(--muted); margin: 4px 0 0; }
.small { font-size: .85rem; }

.empty { grid-column: 1 / -1; text-align: center; padding: 44px 18px; background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.empty h2 { margin-top: 0; }

/* How-it-works strip */
.strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 26px; }
.strip > div { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.strip .num { display: inline-block; width: 28px; height: 28px; line-height: 28px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; text-align: center; font-size: 14px; margin-bottom: 8px; }
.strip h3 { margin: 0 0 4px; font-size: 1rem; }
.strip p { margin: 0; color: var(--muted); font-size: .92rem; }

/* Detail page */
.back { display: inline-block; margin-bottom: 14px; font-weight: 600; }
.detail-grid { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 26px; align-items: start; }
.detail-photo img { width: 100%; border-radius: var(--radius); display: block; background: #f1ece5; }
.detail-info h1 { margin: 6px 0 8px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 14px 0; }
.facts div { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.facts dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 2px; }
.facts dd { margin: 0; font-weight: 600; }
.contact-box { background-color: #fff8f3; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='%23f7dcc4'%3E%3Cellipse cx='50' cy='64' rx='21' ry='17'/%3E%3Ccircle cx='24' cy='38' r='9.5'/%3E%3Ccircle cx='42' cy='26' r='10'/%3E%3Ccircle cx='62' cy='26' r='10'/%3E%3Ccircle cx='79' cy='39' r='9.5'/%3E%3C/g%3E%3C/svg%3E"); background-size: 84px 84px; border: 1px solid #f0d9c8; border-radius: var(--radius); padding: 16px 18px; margin-top: 20px; }
.contact-box p { margin: 4px 0; }

/* Forms */
.narrow { max-width: 640px; margin: 0 auto; }
.prose h2 { margin-top: 28px; }
.prose { max-width: 46rem; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
label.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .95rem; }
label.field input, label.field select, label.field textarea { font-weight: 400; }
.hint { font-weight: 400; color: var(--muted); font-size: .85rem; }
.req::after { content: " *"; color: var(--err); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Admin */
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .num { font-size: 1.7rem; font-weight: 700; }
.stat .lbl { color: var(--muted); font-size: .85rem; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 20px; }
.panel h2 { margin-top: 0; font-size: 1.1rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th { text-align: left; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 2px solid var(--line); white-space: nowrap; }
table.data td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: none; }
.row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row-form { display: flex; gap: 6px; align-items: center; margin: 0; }
.row-form select, .row-form input { padding: 6px 8px; font-size: .88rem; }
.status-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; color: #fff; font-size: .78rem; font-weight: 700; text-transform: capitalize; white-space: nowrap; }
.status-pill-lost { background: var(--err); }
.status-pill-found { background: var(--ok); }
.status-pill-safe { background: var(--info); }
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.rank-list li:last-child { border-bottom: none; }
.rank-list span { overflow-wrap: anywhere; }

/* Footer */
.site-footer { background: #fff; border-top: 1px solid var(--line); padding: 18px 0 26px; color: var(--muted); font-size: .9rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.footer-left { display: flex; flex-direction: column; gap: 4px; }
.footer-left a { color: var(--muted); font-weight: 500; }
.footer-left a:hover { color: var(--primary-dark); }

/* Brand logo */
.brand-logo { width: 30px; height: 30px; display: block; }

/* PayPal donate button */
.donate-btn { display: inline-flex; align-items: center; gap: 9px; background: linear-gradient(135deg, #0b2e6f 0%, #0057d8 100%); color: #fff; font-weight: 700; padding: 12px 22px; border-radius: 999px; box-shadow: 0 4px 14px rgba(0, 64, 167, .35); transition: transform .12s ease, box-shadow .12s ease; }
.donate-btn:hover { text-decoration: none; color: #fff; transform: translateY(-2px); box-shadow: 0 7px 18px rgba(0, 64, 167, .45); }
.donate-btn .pp { font-style: italic; font-weight: 800; letter-spacing: -.5px; white-space: nowrap; }
.donate-btn .pp span { color: #ffc439; }
.donate-btn-sm { padding: 8px 16px; font-size: .88rem; box-shadow: 0 3px 10px rgba(0, 64, 167, .3); }

/* About page donate card */
.donate-card { margin-top: 34px; background: linear-gradient(135deg, #fff7ef, #fdf1e0); border: 1px solid #f0d9c8; border-radius: var(--radius); padding: 26px 26px 24px; text-align: center; }
.donate-card h2 { margin-top: 0; }
.donate-card p { max-width: 540px; margin-left: auto; margin-right: auto; }

/* Missing-cat illustration */
.cat-missing { width: 190px; display: block; margin: 6px auto 12px; }

/* Report form header */
.form-hero { text-align: center; margin-bottom: 14px; }
.form-hero img { width: 76px; display: inline-block; filter: drop-shadow(0 6px 10px rgba(224, 93, 45, .25)); }
.form-hero h1 { margin-top: 8px; }

/* Print-friendly */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media (max-width: 760px) {
  .detail-grid, .two-col, .row2, .strip { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.5rem; }
  .hero-art { width: 104px; }
  .paw-float.f3, .paw-float.f4 { display: none; }
}

@media print {
  .site-header, .site-footer, .donate-btn, .paw-float, .hero-art { display: none; }
  body { background: #fff; }
}
