/* Swiss minimalism, Olive & Chalk. Tokens first; everything below uses them. */
:root {
  --color-background: #f8f7f1;     /* chalk */
  --color-surface: #ffffff;        /* warm white */
  --color-text: #28332a;           /* deep olive charcoal */
  --color-text-secondary: #5e6457; /* muted stone, darkened from #71766A for AA on chalk */
  --color-accent: #66734a;         /* olive */
  --color-accent-strong: #58653f;  /* olive text on soft olive (AA) */
  --color-accent-soft: #e8ebdf;    /* soft olive */
  --color-border: #e2e3da;         /* light divider */
  --color-border-strong: #c9cbbd;
  --wash: 248 247 241;           /* photo wash, = chalk as r g b */
  /* photo wash: -edge at the sides, -mid behind the content column */
  --wash-edge: .93; --wash-mid: .96; --wash-home-edge: .82; --wash-home-mid: .93; --wash-wizard: .84;
  --color-err: #a33a2a;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 4px;
  --radius-lg: 6px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --max: 1140px;
  --ease: 160ms ease;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* class display rules must not un-hide */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font: 400 16px/1.6 var(--font); color: var(--color-text); background: var(--color-background);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgb(var(--wash) / var(--wash-edge)) 0%, rgb(var(--wash) / var(--wash-mid)) 22%, rgb(var(--wash) / var(--wash-mid)) 78%, rgb(var(--wash) / var(--wash-edge)) 100%), var(--bg-image, none) center / cover no-repeat;
}
a { color: inherit; text-decoration-color: var(--color-border-strong); text-underline-offset: 3px; transition: color var(--ease), text-decoration-color var(--ease); }
a:hover { color: var(--color-accent); text-decoration-color: currentColor; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.15; font-weight: 600; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.label { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-secondary); }
.lede { font-size: 18px; color: var(--color-text-secondary); max-width: 52ch; }
.hint { font-size: 14px; color: var(--color-text-secondary); }
.empty { color: var(--color-text-secondary); padding: var(--s7) 0; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--s4); }
@media (min-width: 720px) { .wrap { padding: 0 var(--s6); } }
main.wrap { flex: 1; padding-top: var(--s6); padding-bottom: var(--s8); }
.narrow main.wrap { max-width: 640px; }

/* Full-width sticky header: brand (+ tagline) | search | actions */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5);
  padding: var(--s3) var(--s4); background: var(--color-background); border-bottom: 1px solid var(--color-border);
}
@media (min-width: 720px) { .site-header { padding: var(--s3) var(--s6); flex-wrap: nowrap; } }
.brand-block { min-width: 0; margin-right: auto; }
.brand { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.brand a { text-decoration: none; }
.tagline { font-size: 12px; color: var(--color-text-secondary); line-height: 1.35; }
.head-search { position: relative; display: flex; align-items: center; order: 3; flex: 1 1 100%; }
@media (min-width: 720px) { .head-search { order: 0; flex: 0 1 420px; } }
.head-search svg { position: absolute; left: var(--s3); color: var(--color-text-secondary); pointer-events: none; }
.head-search input { min-height: 40px; padding-left: 36px; font-size: 15px; }
.head-nav { display: flex; align-items: center; gap: var(--s3); font-size: 14px; flex: none; }
.head-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  color: var(--color-text); border-radius: var(--radius); transition: color var(--ease), background var(--ease);
}
.head-icon:hover { color: var(--color-accent); background: var(--color-accent-soft); }
.head-icon svg { width: 20px; height: 20px; }
@media (max-width: 480px) { .tagline { display: none; } }

.site-footer { border-top: 1px solid var(--color-border); font-size: 13px; color: var(--color-text-secondary); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3); padding-top: var(--s5); padding-bottom: var(--s5); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: var(--s5); }
.site-footer a { text-decoration: none; }

.crumbs { display: flex; gap: var(--s2); font-size: 13px; color: var(--color-text-secondary); margin-bottom: var(--s6); }
.crumbs a { text-decoration: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 44px; padding: 0 var(--s5); border-radius: var(--radius);
  font: 500 15px/1 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
  color: var(--color-text); background: var(--color-surface); border: 1px solid var(--color-border-strong);
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}
.btn:hover { color: var(--color-text); border-color: var(--color-text); }
.btn-primary { color: var(--color-background); background: var(--color-text); border-color: var(--color-text); }
.btn-primary:hover { color: var(--color-background); background: var(--color-accent-strong); border-color: var(--color-accent-strong); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--color-text-secondary); }
.btn-ghost:hover { border-color: transparent; color: var(--color-text); }
.btn-danger { color: var(--color-err); }
.btn-danger:hover { color: var(--color-err); border-color: var(--color-err); }
.btn-sm { min-height: 36px; padding: 0 var(--s4); font-size: 14px; }
.btn-lg { min-height: 52px; padding: 0 var(--s6); font-size: 16px; }

/* ---------- inputs ---------- */
:where(input:not([type=radio]):not([type=checkbox]), select, textarea) {
  width: 100%; min-height: 44px; padding: var(--s2) var(--s3);
  font: 400 16px/1.4 var(--font); color: var(--color-text);
  background: var(--color-surface); border: 1px solid var(--color-border-strong); border-radius: var(--radius);
  transition: border-color var(--ease), box-shadow var(--ease);
}
:where(input, select, textarea):focus-visible { outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-accent-soft); }
textarea { resize: vertical; }
input[type=radio], input[type=checkbox] { accent-color: var(--color-accent); width: 18px; height: 18px; flex: none; }
label { font-weight: 500; }

/* ---------- notices ---------- */
.notice { padding: var(--s3) var(--s4); border-left: 3px solid var(--color-border-strong); background: var(--color-surface); margin-bottom: var(--s5); font-size: 15px; }
.notice.ok { border-left-color: var(--color-accent); background: var(--color-accent-soft); }
.notice.err { border-left-color: var(--color-err); color: var(--color-err); }
.notice h2 { font-size: 20px; margin-bottom: var(--s2); color: var(--color-text); }
.notice ul { margin: var(--s2) 0 0; padding-left: var(--s5); }

/* ---------- home / index ---------- */
.intro { padding-bottom: var(--s5); }
.intro-sm h1 { font-size: clamp(28px, 4vw, 36px); }

.filters { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s5); }
.filters a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--s3);
  font-size: 13px; font-weight: 500; text-decoration: none; color: var(--color-text-secondary);
  border: 1px solid var(--color-border); border-radius: var(--radius); background: rgb(255 255 255 / .7);
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}
.filters a:hover { color: var(--color-text); background: #fff; }
.filters a[aria-current] { color: var(--color-accent-strong); background: var(--color-accent-soft); border-color: var(--color-accent-soft); }

.index-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s4); padding-bottom: var(--s2); }
.index-head a { font-size: 13px; color: var(--color-text-secondary); }

/* ---------- directory rows ---------- */
.rows { display: flex; flex-direction: column; gap: var(--s2); }
/* each listing is a soft translucent tile; hover lifts it */
.row {
  position: relative; display: flex; flex-direction: column; gap: var(--s3);
  padding: var(--s5) var(--s4); border-radius: var(--radius-lg);
  background: rgb(255 255 255 / .6); border: 1px solid rgb(255 255 255 / .8);
  transition: background var(--ease), box-shadow var(--ease), transform var(--ease);
}
.row:hover { background: var(--color-surface); box-shadow: 0 6px 20px rgb(30 47 69 / .08), 0 1px 3px rgb(30 47 69 / .06); transform: translateY(-1px); }
/* #slug in the URL (clicked name or a shared link) highlights that row; clears the sticky header */
.row { scroll-margin-top: 120px; }
.row:target { background: var(--color-surface); box-shadow: 0 6px 20px rgb(30 47 69 / .08), 0 1px 3px rgb(30 47 69 / .06); }
.row-title { font-size: 20px; letter-spacing: -0.015em; }
.row-title a { text-decoration: none; }
.row-title a::after { content: ""; position: absolute; inset: 0; } /* whole row is the anchor link */
.row-meta .contact { position: relative; z-index: 1; } /* contact links stay clickable above it */
.row:has(.row-title a) { cursor: pointer; }
.row-desc { color: var(--color-text-secondary); font-size: 15px; margin-top: var(--s1); max-width: 62ch; }
.row-meta { display: flex; flex-direction: column; gap: var(--s2); }
@media (min-width: 820px) {
  .row { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: var(--s6); align-items: start; padding: var(--s5); }
}

.contact { display: flex; flex-direction: column; gap: var(--s1); list-style: none; margin: 0; padding: 0; font-size: 14px; }
.contact li { display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.contact a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact svg { color: var(--color-text-secondary); }

/* ---------- detail ---------- */
.detail { max-width: 760px; }
.detail .label { margin-bottom: var(--s3); }
.detail h1 { font-size: clamp(36px, 6vw, 56px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.04; }
.detail-desc { font-size: 20px; line-height: 1.5; margin-top: var(--s5); max-width: 40ch; }
.detail-contact { margin-top: var(--s7); padding-top: var(--s4); border-top: 1px solid var(--color-text); }
.detail-contact .contact { margin-top: var(--s3); font-size: 17px; gap: var(--s3); }
.detail-contact svg { width: 18px; height: 18px; }
.detail-back { margin-top: var(--s7); font-size: 14px; }

.cat-index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--color-text); max-width: 760px; }
.cat-index li { display: flex; justify-content: space-between; align-items: baseline; padding: var(--s4) var(--s2); border-bottom: 1px solid var(--color-border); }
.cat-index a { font-size: 18px; font-weight: 500; text-decoration: none; }

.prose { max-width: 680px; }
.prose h1 { font-size: clamp(32px, 5vw, 40px); margin-bottom: var(--s5); }
.prose h2 { font-size: 20px; margin: var(--s6) 0 var(--s2); }
.prose p { margin-bottom: var(--s3); color: var(--color-text-secondary); }

/* ---------- simple forms (login / join / auth) ---------- */
.narrow h1 { font-size: clamp(32px, 5vw, 40px); margin-bottom: var(--s3); }
.narrow .lede { margin-bottom: var(--s6); }
.panel { display: flex; flex-direction: column; gap: var(--s3); padding-top: var(--s5); border-top: 1px solid var(--color-text); }
.panel .btn { align-self: flex-start; margin-top: var(--s2); }
.panel.center h1 { margin-bottom: 0; }

/* ---------- listing form (shared) ---------- */
.account-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0; }
.account-head h1 { margin: 0; font-size: 24px; letter-spacing: -0.02em; }
.listing-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.listing-form .q { display: block; font-weight: 600; padding: 0; color: var(--color-text); }
.listing-form legend.q { float: left; width: 100%; } /* keep legend inside the card */
.listing-form legend.q + * { clear: both; }
.listing-form .hint { margin: var(--s1) 0 var(--s3); }
.counter { text-align: right; font-size: 12px; color: var(--color-text-secondary); margin-top: var(--s1); font-variant-numeric: tabular-nums; }
.choices { display: flex; flex-direction: column; gap: var(--s2); }
.choice {
  display: flex; align-items: center; gap: var(--s3); min-height: 48px; padding: 0 var(--s4);
  background: var(--color-surface); border: 1px solid var(--color-border-strong); border-radius: var(--radius);
  cursor: pointer; font-weight: 500; transition: border-color var(--ease), background var(--ease);
}
.choice:hover { border-color: var(--color-text); }
.choice:has(input:checked) { border-color: var(--color-accent); background: var(--color-accent-soft); }
.consent { display: flex; gap: var(--s3); align-items: flex-start; font-weight: 400; font-size: 14px; color: var(--color-text-secondary); margin: var(--s5) 0 0; }
.consent input { margin-top: 2px; }
.nav { display: flex; gap: var(--s2); justify-content: flex-end; margin-top: var(--s5); }
.locked { font-size: 18px; font-weight: 600; margin-top: var(--s1); }

/* edit mode: compact one-page form, two columns on wider screens */
.edit { display: grid; grid-template-columns: 1fr; gap: var(--s3) var(--s5); margin-top: var(--s3); }
@media (min-width: 640px) { .edit { grid-template-columns: 1fr 1fr; } .edit .span2 { grid-column: 1 / -1; } }
.edit .card { padding: 0; }
.edit .q { font-size: 13px; font-weight: 600; margin-bottom: var(--s1); }
.edit :where(input:not([type=radio]):not([type=checkbox]), select, textarea) { min-height: 40px; font-size: 15px; }
.edit .card > .nav { display: none; } /* wizard Back/Next rows: empty in edit mode */
.edit .review > .nav { display: flex; }
.edit .locked { font-size: 16px; margin: 0; }
.edit .locked .hint { display: block; font-size: 12px; font-weight: 400; margin-top: 2px; }
.edit .counter { margin-top: 2px; }
.edit .consent { margin-top: 0; }
.edit .review .nav { justify-content: flex-start; margin-top: var(--s2); }
.edit .review [data-back] { display: none; }
.edit .cf-turnstile { margin-top: var(--s3); }

/* show/hide switch (phone visibility) */
.phone-row { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s2); }
.phone-row input[type=tel] { width: 100%; }
.switch { position: relative; display: inline-flex; align-items: center; gap: var(--s2); font-size: 13px; font-weight: 500; color: var(--color-text-secondary); cursor: pointer; white-space: nowrap; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { position: relative; width: 36px; height: 20px; flex: none; border-radius: 999px; background: var(--color-border-strong); transition: background var(--ease); }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform var(--ease); }
.switch input:checked + .track { background: var(--color-accent); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.switch input:checked ~ .off, .switch input:not(:checked) ~ .on { display: none; }

.danger { margin-top: var(--s7); padding-top: var(--s4); border-top: 1px solid var(--color-border); }
.danger summary { cursor: pointer; font-size: 14px; color: var(--color-err); }
.danger p { margin: var(--s3) 0; font-size: 14px; color: var(--color-text-secondary); }
.danger .nav { justify-content: flex-start; flex-wrap: wrap; }
.restore { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin-top: var(--s6); }
.restore .hint { flex-basis: 100%; }

/* ---------- wizard: one card at a time over the directory's photo ---------- */
.has-wizard .site-footer { display: none; }
.wizard {
  position: fixed; inset: 0; z-index: 50; overflow: hidden;
  background-color: var(--color-background);
  /* chalk wash over the photo keeps it firmly in the background */
  background-image: linear-gradient(rgb(var(--wash) / var(--wash-wizard)), rgb(var(--wash) / var(--wash-wizard))), var(--bg-image, none);
  background-size: cover; background-position: center;
}
.progress { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--color-border); }
.progress span { display: block; height: 100%; width: 0; background: var(--color-accent); transition: width 240ms ease; }
.wizard .card {
  position: absolute; left: 50%; top: 50%; width: min(560px, calc(100% - 32px)); max-height: calc(100% - 48px); overflow: auto;
  padding: var(--s6); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px rgb(40 51 42 / .06);
  opacity: 0; transform: translate(calc(-50% + 96px), -50%) scale(.97); pointer-events: none;
  transition: transform 520ms cubic-bezier(.22, 1, .36, 1), opacity 380ms ease;
}
.wizard .card.past { transform: translate(calc(-50% - 96px), -50%) scale(.97); transition-duration: 360ms, 240ms; }
.wizard .card.active { opacity: 1; transform: translate(-50%, -50%); pointer-events: auto; box-shadow: 0 12px 40px rgb(40 51 42 / .10); }
.wizard .card.active > * { animation: rise 480ms cubic-bezier(.22, 1, .36, 1) both; }
.wizard .card.active > :nth-child(2) { animation-delay: 70ms; }
.wizard .card.active > :nth-child(3) { animation-delay: 140ms; }
.wizard .card.active > :nth-child(4) { animation-delay: 210ms; }
.wizard .card.active > :nth-child(n+5) { animation-delay: 280ms; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.wizard .q { font-size: clamp(24px, 4vw, 30px); letter-spacing: -0.02em; line-height: 1.2; margin-bottom: var(--s4); }
.wizard :where(input:not([type=radio]):not([type=checkbox]), select, textarea) { min-height: 52px; font-size: 18px; }
.welcome h1 { font-size: clamp(32px, 6vw, 44px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.05; margin: var(--s5) 0 var(--s4); }
.welcome p:not(.label) { color: var(--color-text-secondary); font-size: 17px; }
.welcome .nav { justify-content: flex-start; }
.review [data-preview] .row { padding: var(--s4) 0; border-top: 1px solid var(--color-text); display: flex; flex-direction: column; }
.review [data-preview] .row:hover { background: none; }
@media (max-width: 560px) { .wizard .card { padding: var(--s5); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation: none !important; }
}

/* ---------- admin ---------- */
body.admin { display: block; font-size: 14px; }
body.admin::before { display: none; }
.admin-head { display: flex; gap: var(--s4); align-items: center; padding: 0 var(--s5); min-height: 56px; border-bottom: 1px solid var(--color-border); }
.admin-head a { margin-left: auto; font-size: 13px; }
.admin main { padding: var(--s5); }
.admin .btn { min-height: 36px; padding: 0 var(--s4); font-size: 14px; }
.admin .btn-sm { min-height: 30px; padding: 0 var(--s3); font-size: 13px; }
.invite { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; padding: var(--s2) 0 var(--s5); border-bottom: 1px solid var(--color-border); margin-bottom: var(--s5); }
.invite strong { margin-right: var(--s2); }
.invite input { width: auto !important; flex: 1 1 160px; min-height: 36px !important; font-size: 14px !important; }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3); align-items: center; margin-bottom: var(--s3); }
.toolbar nav { display: flex; flex-wrap: wrap; gap: var(--s1); }
.toolbar nav a { padding: var(--s1) var(--s3); border-radius: var(--radius); text-decoration: none; color: var(--color-text-secondary); text-transform: capitalize; }
.toolbar nav a.on { color: var(--color-accent-strong); background: var(--color-accent-soft); }
.table-wrap { overflow-x: auto; border-top: 1px solid var(--color-text); }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: var(--s3); border-bottom: 1px solid var(--color-border); white-space: nowrap; }
th { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-secondary); }
tbody tr:hover { background: var(--color-surface); }
td small { color: var(--color-text-secondary); }
.actions form { display: flex; gap: var(--s1); justify-content: flex-end; }
.pill { display: inline-block; padding: 2px var(--s2); border-radius: var(--radius); font-size: 12px; font-weight: 500; background: var(--color-border); }
.pill.live { color: var(--color-accent-strong); background: var(--color-accent-soft); }
.pill.pending { background: #f1e7c8; }
.pill.suspended { color: var(--color-err); background: #f4e1dc; }
tr.s-suspended td, tr.s-deleted td { color: var(--color-text-secondary); }

/* sign-in hand-off: just a spinner while the page posts itself */
.loading { position: fixed; inset: 0; display: grid; place-items: center; }
.loading span { width: 28px; height: 28px; border: 2px solid var(--color-border-strong); border-top-color: var(--color-accent); border-radius: 50%; animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* site name inside the wizard card; .static = the /join error page header line */
.wizard .card .card-brand { color: var(--color-text); font-weight: 700; font-size: 15px; letter-spacing: -0.01em; margin-bottom: 2px; }
.wizard-brand.static { margin: 0 0 var(--s5); font-weight: 700; font-size: 15px; }
.wizard-brand a { text-decoration: none; }
.done-title { font-size: clamp(28px, 5vw, 36px); font-weight: 700; letter-spacing: -0.03em; margin: var(--s3) 0; }
/* login: compact and centered, button attached to the email field */
.centered main.wrap { display: grid; place-items: center; padding-top: var(--s7); padding-bottom: var(--s7); }
.login { width: 100%; max-width: 420px; text-align: center; }
.login h1 { font-size: clamp(28px, 5vw, 36px); font-weight: 700; letter-spacing: -0.03em; margin-bottom: var(--s2); }
.login .lede { font-size: 15px; margin: 0 auto var(--s5); }
.login .notice { text-align: left; }
.login .cf-turnstile { margin-top: var(--s3); display: flex; justify-content: center; }
.inline-field {
  display: flex; background: var(--color-surface); border: 1px solid var(--color-border-strong); border-radius: var(--radius);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.inline-field:focus-within { border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-accent-soft); }
.inline-field input { flex: 1; min-width: 0; border: 0 !important; box-shadow: none !important; background: transparent; }
.inline-field .btn { margin: 4px; min-height: 40px; padding: 0 var(--s4); }

/* pre-launch home */
.soon { max-width: 520px; margin: auto; padding: var(--s6); text-align: center; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.soon h2 { font-size: clamp(28px, 5vw, 36px); font-weight: 700; letter-spacing: -0.03em; margin: var(--s2) 0 var(--s3); }
.soon .hint { font-size: 15px; margin-bottom: var(--s5); }

/* home: transparent header over a lighter photo wash; solid again once scrolled */
.site-header.on-photo { background: transparent; border-bottom-color: transparent; transition: background var(--ease), border-color var(--ease); }
.site-header.on-photo.scrolled { background: var(--color-background); border-bottom-color: var(--color-border); }
body.home::before { --wash-edge: var(--wash-home-edge); --wash-mid: var(--wash-home-mid); }

/* two-tone wordmark (BRAND_MARK) */
.brand-mark { font-weight: 800; letter-spacing: 0.02em; }
.brand-mark .accent { color: var(--color-accent); }
.invite.launch input[type=date] { flex: 0 0 auto; }
.invite .hint { flex-basis: 100%; margin: 0; }

/* launch countdown */
.countdown { display: flex; justify-content: center; gap: var(--s4); margin: var(--s3) 0 var(--s5); font-variant-numeric: tabular-nums; }
.countdown span { display: flex; flex-direction: column; align-items: center; min-width: 56px; }
.countdown b { font-size: clamp(28px, 6vw, 40px); font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.countdown small { margin-top: var(--s1); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-secondary); }

/* THEME="sunny": warm white, navy text, slate-blue accent, butter highlights (text colors all AA) */
[data-theme="sunny"] {
  --color-background: #fffcf4;
  --color-surface: #ffffff;
  --color-text: #1e2f45;           /* navy */
  --color-text-secondary: #56606e;
  --color-accent: #3f5f86;         /* slate blue: wordmark accent, links, switch, countdown */
  --color-accent-strong: #1e2f45;  /* text on butter */
  --color-accent-soft: #fbefc4;    /* butter: selected filter, notices, highlights */
  --color-border: #efe7d2;
  --color-border-strong: #e2d6b8;
  --gold: #d8b24a;                 /* decorative only (too light for text) */
  --wash: 255 254 250;
}
[data-theme="sunny"] .countdown b { color: var(--color-accent); }
[data-theme="sunny"] .notice.ok { border-left-color: var(--gold); }
[data-theme="sunny"] .filters a[aria-current] { border-color: var(--gold); }

/* pre-launch: center the card in the space between header and footer */
main.wrap:has(> .soon) { display: flex; flex-direction: column; justify-content: center; }

/* BG_WASH="light": for photos that are already pale and airy */
[data-wash="light"] { --wash-edge: .7; --wash-mid: .92; --wash-home-edge: .5; --wash-home-mid: .9; --wash-wizard: .5; }

/* admin preview */
.preview-badge {
  position: fixed; right: var(--s4); bottom: var(--s4); z-index: 60; padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 700; text-decoration: none; color: #1a2e05; background: #a3e635; /* deliberately loud: admin-only */
  box-shadow: 0 2px 10px rgb(0 0 0 / .2);
}
.preview-badge:hover { color: #1a2e05; background: #bef264; }
.row .pill.pending { align-self: flex-start; }
.admin-head a + a { margin-left: var(--s4); }

/* account: listing <-> edit form slider */
.slider { overflow: hidden; transition: height 450ms cubic-bezier(.22, 1, .36, 1); margin: 0 -4px; }
.slider-track { display: flex; width: 200%; transition: transform 450ms cubic-bezier(.22, 1, .36, 1); }
.slide { width: 50%; flex: none; padding: 0 4px 4px; } /* padding keeps focus rings inside the clip */
.slider.editing .slider-track { transform: translateX(-50%); }
.slider.no-anim, .slider.no-anim .slider-track { transition: none; }
.edit-btn { margin-top: var(--s4); }
.cancel-btn { margin-top: var(--s2); }

/* wizard close (×): back to the home page */
.wizard-close {
  position: absolute; top: var(--s4); right: var(--s4); z-index: 2; display: grid; place-items: center;
  width: 40px; height: 40px; color: var(--color-text-secondary); transition: color var(--ease);
}
.wizard-close:hover { color: var(--color-text); }
.wizard-close svg { width: 24px; height: 24px; stroke-width: 1.5; }

/* trade/category badge on a listing */
.badge {
  align-self: flex-start; display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: .02em; line-height: 1.4;
  color: var(--color-accent-strong); background: var(--color-accent-soft); border: 0;
}
.review [data-preview] .row { background: transparent; border-color: transparent; padding: var(--s4) 0; }
