/* Passalong identity (signature pass, 2026-10-06): the list's own subject-line grammar, made calm.
   Ethos: the parents list, only searchable, and gentle. Signature device: the FF / FS / ISO token whose state
   changes live (Pending, Found a home). Mark: the curb sign you stake out for porch pickup.
   Type: Lexend (made for reading fluency) for subjects, tokens and headings; Atkinson Hyperlegible (Braille
   Institute, built for low vision) for everything you read. Both self-hosted, OFL (fonts/LICENSE.txt).
   Colour: warm off-white and sage, pastel tokens with deep same-family text, no black. Spacing 4/8/12/16/24.
   Contrast computed: every text pair AA or better in both modes; control borders 3:1 or better. */

@font-face { font-family: 'Lexend'; src: url('/fonts/lexend-latin.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'Atkinson Hyperlegible'; src: url('/fonts/atkinson-400-latin.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Atkinson Hyperlegible'; src: url('/fonts/atkinson-700-latin.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --bg: #f8f6f0;
  --surface: #fffdf9;
  --ink: #34433b;
  --muted: #69736b;
  --line: #e8e4da;
  --control: #828b83;
  --accent: #3d7a57;
  --accent-ink: #fffdf9;
  --ff: #2f6a46; --ff-bg: #d9ecdc;
  --fs: #8b4f26; --fs-bg: #f7dfca;
  --iso: #3e5594; --iso-bg: #dde4f5;
  --home: #3d7a57; --oat: #eee8dc;
  --pend: #7f5a14; --pend-bg: #f8ebc8;
  --chip: #efece4;
  --size-bg: #ece8de;
  --warn-bg: #f8ebc8; --warn-ink: #5e4210;
  --danger: #9b3b2e;
  --focus: #3e5594;
  --selection: #d9ecdc;
  --display: 'Lexend', 'Atkinson Hyperlegible', system-ui, sans-serif;
  --text: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px;
  --gap: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #262c29;
    --surface: #2f3632;
    --ink: #ece8df;
    --muted: #b3b9b2;
    --line: #3a423d;
    --control: #7b867f;
    --accent: #9fd3b3;
    --accent-ink: #20302a;
    --ff: #bfe3c8; --ff-bg: #365442;
    --fs: #f3cba9; --fs-bg: #5c4331;
    --iso: #c9d4f3; --iso-bg: #3c4664;
    --home: #9fd3b3; --oat: #3a413c;
    --pend: #f3d48f; --pend-bg: #55462a;
    --chip: #323a35;
    --size-bg: #3a423d;
    --warn-bg: #55462a; --warn-ink: #f6e2b3;
    --danger: #f2a99d;
    --focus: #c9d4f3;
    --selection: #365442;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.5 var(--text); }
::selection { background: var(--selection); }
a { color: var(--accent); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; height: auto; display: block; }
main { max-width: 720px; margin: 0 auto; padding: var(--gap); min-height: 60vh; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; color: var(--ink); text-wrap: balance; }
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0.4em 0; letter-spacing: -0.01em; }
h2 { font-size: 1.2rem; margin: 1em 0 0.4em; }
.muted, .small { color: var(--muted); }
.small { font-size: 0.9rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header: the curb-sign mark and the full word, never split. */
.top {
  display: flex; align-items: center; gap: 12px;
  padding: 12px var(--gap); background: var(--bg);
  position: sticky; top: 0; z-index: 5; border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 8px; font: 600 1.45rem/1 var(--display); letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.brand svg { width: 30px; height: 30px; flex: none; }
.tagline { color: var(--muted); font-size: 0.9rem; flex: 1; }

.headnav { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.headnav a[data-tab] { color: var(--ink); font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; }
.headnav a[aria-current="page"] { color: var(--ff); text-decoration-thickness: 2px; }
.more-filters summary { cursor: pointer; font-weight: 700; color: var(--ink); min-height: 44px; display: flex; align-items: center; }
.more-filters summary::after { content: ''; width: 8px; height: 8px; margin-left: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); }
.more-filters[open] summary::after { transform: rotate(225deg) translateY(-1px); }
.more-filters summary::-webkit-details-marker { display: none; }
.more-filters summary { list-style: none; }
.more-filters .selects { margin-top: 4px; }

/* Buttons: soft moss, never black. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 12px 20px; border-radius: var(--r-lg); border: 0;
  background: var(--accent); color: var(--accent-ink); font: 600 1.05rem/1.2 var(--display); text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(1.06); }
.btn-small { min-height: 44px; padding: 8px 16px; font-size: 0.95rem; }
.btn-quiet { background: var(--chip); color: var(--ink); }
.btn-danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 2px var(--danger); }
.btn[disabled] { opacity: 0.6; cursor: default; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 6px 12px 6px 8px; border-radius: var(--r-md); border: 0;
  background: var(--chip); color: var(--ink); font: 700 0.95rem var(--text); cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ff); }
.chip.plain { padding: 6px 14px; }
.chip.danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1.5px var(--danger); }
.chips.type-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gap)); padding: 2px var(--gap); }
.chips.type-row::-webkit-scrollbar { display: none; }
.chips.type-row { -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
.chips.type-row .chip { flex: none; }
body[data-view="feed"] .top .btn-small, body[data-view="post"] .top .btn-small { display: none; }

/* The signature device: the list's FF / FS / ISO token, plus size, pending and found-a-home chips. */
.tok { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 36px; height: 26px; padding: 0 7px; border-radius: var(--r-sm); font: 600 0.82rem/1 var(--display); letter-spacing: 0.03em; }
.chip .tok { height: 22px; min-width: 30px; font-size: 0.75rem; }
.tok-free { background: var(--ff-bg); color: var(--ff); }
.tok-sale { background: var(--fs-bg); color: var(--fs); }
.tok-wanted { background: var(--iso-bg); color: var(--iso); }
.sz { display: inline-block; font: 600 0.8rem/1 var(--display); background: var(--size-bg); color: var(--ink); border-radius: 6px; padding: 3px 6px; }
.pend { display: inline-block; font: 700 0.76rem/1 var(--text); color: var(--pend); background: var(--pend-bg); border-radius: 6px; padding: 3px 6px; }
.home { display: inline-flex; align-items: center; gap: 5px; flex: none; height: 26px; padding: 0 8px; border-radius: var(--r-sm); background: var(--oat); color: var(--ink); font: 600 0.78rem/1 var(--display); }
.home svg { width: 12px; height: 12px; color: var(--home); }

.filters { display: grid; gap: 10px; margin-bottom: var(--gap); }
.filters .selects { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
input, select, textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; border-radius: var(--r-md); border: 1.5px solid var(--control);
  background: var(--surface); color: var(--ink); font: inherit;
}
input[type="search"] { border-radius: var(--r-lg); }
textarea { min-height: 110px; resize: vertical; }
label { display: block; font-weight: 700; margin: 16px 0 6px; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
label.check input { width: 22px; min-height: 22px; margin-top: 2px; flex: none; accent-color: var(--accent); }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 700; margin: 16px 0 6px; }

/* The feed: subject lines on soft cards, grouped by day. */
.week { margin: 0; }
.week + p:empty { display: none; }
.day { font: 500 0.95rem var(--display); color: var(--muted); margin: 16px 0 8px; }
.feed { display: grid; gap: 8px; }
.msg {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: 72px;
  background: var(--surface); border-radius: var(--r-lg); color: inherit; text-decoration: none;
}
.msg:hover { box-shadow: inset 0 0 0 1.5px var(--line); }
.msg .subj { flex: 1; min-width: 0; }
.msg .s { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font: 500 1.06rem/1.25 var(--display); }
.msg .m { font-size: 0.9rem; line-height: 1.3; color: var(--muted); margin: 3px 0 0; }
.msg > .tok, .msg > .home { width: 44px; justify-content: center; padding: 0; }
.msg > .home { width: auto; padding: 0 8px; }
.msg .thumb { width: 56px; height: 56px; border-radius: var(--r-md); object-fit: cover; flex: none; background: var(--chip); }
.msg.is-gone .s .t { text-decoration: line-through; text-decoration-color: var(--muted); text-decoration-thickness: 2px; color: var(--muted); }
.post-bar { position: sticky; bottom: 0; padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--bg); margin-top: 12px; box-shadow: 0 -16px 16px -4px var(--bg); }
.post-bar .btn { width: 100%; }

/* The listing page. */
.back { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; color: var(--ink); text-decoration: none; }
.listing .gallery { display: grid; gap: 8px; grid-template-columns: 1fr; }
.listing .gallery img { border-radius: var(--r-xl); width: 100%; aspect-ratio: 4 / 3; max-height: 45vh; object-fit: cover; background: var(--surface); }
@media (min-width: 720px) { .listing .gallery { grid-template-columns: repeat(2, 1fr); } }
.listing .line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 4px; color: var(--muted); }
.price { font: 600 1.2rem var(--display); margin: 0; }
.facts { color: var(--muted); margin: 4px 0 12px; }
.desc { white-space: normal; font-size: 1.05rem; }
.poster { color: var(--muted); }
.note { background: var(--warn-bg); color: var(--warn-ink); padding: 12px 14px; border-radius: var(--r-md); }
.note .small, .note .muted { color: inherit; }
.carseat p { margin: 0.4rem 0; }
.banner { display: flex; align-items: center; gap: 8px; background: var(--warn-bg); color: var(--warn-ink); padding: 12px 14px; border-radius: var(--r-md); font-weight: 700; }
.banner-gone { background: var(--oat); color: var(--ink); }
.banner-pending { background: var(--pend-bg); color: var(--pend); }
.actions { margin: 16px 0; display: grid; gap: 12px; }
.panel { background: var(--surface); border-radius: var(--r-xl); padding: 20px; max-width: 560px; }
.error { color: var(--danger); font-weight: 700; }
.ok { color: var(--accent); font-weight: 700; }

.field-label { font-weight: 700; margin: 16px 0 6px; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.photo-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 112px; margin: 8px 0 0; border: 2px dashed var(--control); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink); font: 600 1.05rem var(--display); cursor: pointer;
}
.photo-tile .plus { font: 400 2rem/1 var(--display); color: var(--accent); }
.file-input:focus-visible + .photo-tile { outline: 3px solid var(--focus); outline-offset: 2px; }
.photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.photos figure { margin: 0; position: relative; width: 96px; }
.photos img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--r-md); }
.photos figcaption { font-size: 0.75rem; color: var(--muted); text-align: center; }
.photos button { width: 100%; margin-top: 4px; min-height: 44px; }
.linklike { background: none; border: 0; padding: 8px 4px; min-height: 44px; font: 700 1rem var(--text); color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.code-input { font: 600 1.6rem var(--display); letter-spacing: 0.4em; max-width: 12ch; }
.intro { font-size: 1.05rem; margin: 4px 0 12px; }
.more { margin: 16px 0; }

.mine-item { display: grid; grid-template-columns: 72px 1fr; gap: 12px; padding: 12px; margin-bottom: 8px; background: var(--surface); border-radius: var(--r-lg); }
.mine-item img, .mine-item .thumb-empty { width: 72px; height: 72px; object-fit: cover; border-radius: var(--r-md); background: var(--chip); }

.foot { max-width: 720px; margin: 24px auto 0; padding: var(--gap); border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.foot a { color: var(--ink); }
.prose { max-width: 680px; font-size: 1.05rem; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 6px 0; }
.prose h1 { font-size: 1.8rem; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* Private demo banner (workers.dev only; app.js adds it). */
.demo-bar { background: var(--iso-bg); color: var(--iso); font-size: 0.9rem; text-align: center; padding: 8px 16px; line-height: 1.4; }
