:root {
  /* Paws Across Timiskaming colours, from pawsacrosstimiskaming.org */
  --bg: #F2F0E9;            /* cream */
  --card: #FFFDF9;          /* warm white */
  --text: #3E2B24;          /* dark brown */
  --muted: #5D4037;         /* brown */
  --border: #D6CFC7;        /* beige */
  --accent: #4A6B3E;        /* green: buttons, selected items */
  --accent-soft: #E6ECDF;
  --orange: #D97D3E;        /* "PAWS" orange: decoration only (too light for small text) */
  --orange-text: #A3521C;   /* darker orange that is readable as text */
  --alert-bg: #FBE8D8; --alert-text: #8A3F12;
  --placeholder: #E5DFD6; --radius: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Heebo, system-ui, -apple-system, sans-serif;
       font-size: 16px; line-height: 1.35; }
main { max-width: 480px; margin: 0 auto; padding: 24px 16px 40px; min-height: 100vh; display: flex; flex-direction: column; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* headings */
.greeting { color: var(--muted); margin: 24px 0 6px; }
h1 { font-size: 28px; line-height: 1.15; margin: 0 0 22px; font-weight: 700; }
.topbar { display: flex; align-items: center; gap: 8px; margin: 12px 0 18px; }
.topbar h1 { margin: 0; font-size: 24px; }
.topbar .crumb { color: var(--muted); }
.topbar .sub { color: var(--muted); font-size: 14px; }
.back { width: 44px; height: 44px; border: 0; background: none; border-radius: 12px; display: grid; place-items: center; margin-left: -10px; }
.back:active { background: var(--placeholder); }
.section-label { text-transform: uppercase; letter-spacing: .06em; font-size: 14px; font-weight: 600; color: var(--muted); margin: 26px 0 12px; }
.muted { color: var(--muted); }

/* big home buttons */
.big { width: 100%; display: flex; align-items: center; gap: 18px; text-align: left; padding: 20px 20px; margin-bottom: 12px;
       background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); min-height: 88px; }
.big .icon { color: var(--accent); flex: none; }
.big strong { display: block; font-size: 20px; font-weight: 600; }
.big span.desc { color: var(--muted); font-size: 15px; }
.big.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.big.primary .icon, .big.primary span.desc { color: #fff; }
.big.primary span.desc { opacity: .85; }
.big:disabled { opacity: .55; cursor: default; }
.soon { font-size: 12px; font-weight: 600; background: var(--placeholder); color: var(--muted); padding: 2px 8px; border-radius: 99px; margin-left: 6px; vertical-align: 2px; }

/* alert */
.alert { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--alert-bg); color: var(--alert-text);
         border: 0; border-radius: 12px; padding: 14px 16px; margin: 0 0 12px; }
.spacer { flex: 1; }

/* search */
.field-label { font-size: 15px; color: var(--muted); margin-bottom: 6px; display: block; }
.search { display: flex; align-items: center; gap: 10px; background: var(--card); border: 2px solid var(--accent); border-radius: 14px; padding: 0 8px 0 14px; }
.search input { flex: 1; border: 0; outline: 0; background: none; font-size: 18px; padding: 14px 0; min-width: 0; }
.search .icon { color: var(--muted); }
.chips { display: flex; gap: 8px; margin: 16px 0; flex-wrap: wrap; }
.chip { border: 1px solid var(--border); background: var(--card); border-radius: 99px; padding: 10px 16px; min-height: 44px; font-size: 15px; }
.chip[aria-pressed="true"] { background: var(--text); color: #fff; border-color: var(--text); }
.chips.species { margin-top: -6px; }
.chips.species:empty { display: none; }
.chips.species .chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
.chip .count { margin-left: 6px; opacity: .65; font-size: 13px; }

/* lists & cards */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.result { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; padding: 12px; margin-bottom: 10px; min-height: 80px; }
.result .text { flex: 1; min-width: 0; }
.result strong { display: block; font-size: 18px; font-weight: 600; }
.result .meta { color: var(--muted); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chev { color: var(--muted); flex: none; }
.photo { flex: none; width: 58px; height: 58px; border-radius: 10px; background: var(--placeholder); object-fit: cover;
         display: grid; place-items: center; color: var(--muted); font-size: 12px; overflow: hidden; }
.photo.lg { width: 92px; height: 92px; border-radius: 12px; }
.photo { position: relative; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .2s; }
.photo img.loaded { opacity: 1; }
.empty { color: var(--muted); text-align: center; padding: 32px 12px; }

/* animal summary */
.summary { display: flex; gap: 16px; padding: 16px; align-items: center; margin-bottom: 16px; }
.summary h2 { margin: 0 0 4px; font-size: 26px; }
.summary .meta { color: var(--muted); font-size: 15px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { text-align: left; padding: 16px; min-height: 104px; display: flex; flex-direction: column; justify-content: space-between; gap: 12px;
        background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); font-weight: 600; font-size: 17px; }
.tile .icon { color: var(--accent); }
.tile:disabled { cursor: default; }
.tile:disabled .label { opacity: .55; }
.btn { width: 100%; min-height: 52px; border-radius: 14px; font-weight: 600; font-size: 17px; border: 0; background: var(--accent); color: #fff; }
.btn.secondary { background: var(--card); color: var(--accent); border: 1px solid var(--border); }
a.btn { display: grid; place-items: center; text-decoration: none; }
.history { padding: 4px 16px; }
.history .row { padding: 12px 0; border-bottom: 1px solid var(--border); }
.history .row:last-child { border-bottom: 0; }
.history .row .when { color: var(--muted); font-size: 14px; }
.badge { font-size: 13px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--alert-bg); color: var(--alert-text); }
.badge.ok { background: var(--accent-soft); color: var(--accent); }

/* sign in */
label.f { display: block; font-weight: 500; font-size: 15px; margin: 18px 0 6px; }
input.f { width: 100%; font-size: 17px; padding: 13px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
input.f:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.msg { margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: var(--alert-bg); color: var(--alert-text); }
.msg.ok { background: var(--accent-soft); color: var(--accent); }
.signout { background: none; border: 0; color: var(--muted); text-decoration: underline; padding: 12px; margin: 24px auto 0; display: block; min-height: 44px; }

.loading { color: var(--muted); padding: 24px 0; text-align: center; }

/* log vaccine form */
.option { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left;
          background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px 18px; min-height: 56px; margin-bottom: 10px; }
.option .opt-title { font-weight: 600; font-size: 17px; }
.option .opt-sub { color: var(--muted); font-size: 14px; }
.option .tick { color: var(--accent); font-size: 20px; font-weight: 700; visibility: hidden; }
.option[aria-pressed="true"] { border: 2px solid var(--accent); background: var(--accent-soft); padding: 13px 17px; }
.option[aria-pressed="true"] .tick { visibility: visible; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.with-clear { display: flex; gap: 8px; }
.with-clear input { flex: 1; min-width: 0; }
.clear { border: 1px solid var(--border); background: var(--card); border-radius: 12px; padding: 0 14px; min-height: 48px; color: var(--muted); }
.small { font-size: 14px; margin: 6px 0 0; }
.checks { padding: 8px 16px; margin-top: 20px; }
.checks-title { font-weight: 600; padding: 8px 0; }
.check { display: flex; align-items: center; gap: 12px; min-height: 48px; border-top: 1px solid var(--border); }
.check input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.note { color: var(--muted); text-align: center; font-size: 14px; margin: 24px 0 10px; }
textarea.f { width: 100%; font: inherit; font-size: 17px; padding: 13px 14px; border: 1px solid var(--border);
              border-radius: 12px; background: var(--card); resize: vertical; min-height: 140px; }
textarea.f:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
input.weight { font-size: 22px; font-weight: 600; }
.weigh-row { display: grid; grid-template-columns: 1fr 120px; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); }
.weigh-row input.weight { font-size: 18px; padding: 10px 12px; }
.preview { display: block; width: 100%; max-height: 360px; object-fit: contain; border-radius: var(--radius);
           background: var(--placeholder); margin-top: 16px; }
.done { text-align: center; padding-top: 48px; }
.done h1 { margin: 12px 0 10px; }
.done-mark { width: 72px; height: 72px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 36px;
             display: grid; place-items: center; margin: 0 auto; }
.note-body { white-space: pre-wrap; }
/* intake wizard */
select.f { width: 100%; font: inherit; font-size: 17px; padding: 13px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
.progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: -6px 0 18px; }
.progress span { height: 5px; border-radius: 3px; background: var(--border); }
.progress span.on { background: var(--orange); }
.check.plain { border-top: 0; }
.result.slim { min-height: 60px; }
.picked { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; margin-top: 10px;
          border: 2px solid var(--accent); background: var(--accent-soft); }
select.chip.more { appearance: none; -webkit-appearance: none; padding-right: 28px; color: var(--text);
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235D4037' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 12px center; }
select.chip.more.on { background-color: var(--text); color: #fff; border-color: var(--text); }
.add-foster { margin-top: 12px; }
.new-foster { padding: 8px 16px 16px; margin-top: 12px; }

/* branding */
.brand-logo { display: block; width: 210px; max-width: 70%; height: auto; margin: 8px auto 4px; }
.home-head { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.home-head img { width: 52px; height: 52px; border-radius: 12px; flex: none; }
.home-head .greeting { margin: 0; color: var(--orange-text); font-weight: 500; }
.soon { background: var(--alert-bg); color: var(--alert-text); }
.big:not(.primary) .icon { color: var(--accent); }
.btn:active, .big.primary:active { filter: brightness(.92); }
.chips.species .chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
h1, .summary h2, .result strong, .big strong { letter-spacing: -0.01em; }
.photo.has-photo > span { visibility: hidden; }
