:root {
  /* Whitstable: oyster-shell grey, harbour blue-green, muted teal — not Thanet candy */
  --sea: #1a4a52;
  --sea-mid: #2a6a74;
  --sea-deep: #0d2a30;
  --foam: #ebe6df;
  --paper: #f7f4ef;
  --sand: #d4cbb8;
  --pebble: #b8b0a0;
  --coral: #3d7a6e;
  --coral-dark: #2a5a50;
  --gold: #a89060;
  --ink: #1a2426;
  --muted: #5a686c;
  --line: rgba(26, 36, 38, 0.12);
  --shadow: 0 18px 40px rgba(13, 42, 48, 0.12);
  --radius: 18px;
  --font: "Nunito Sans", "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #2a6a74 0%, transparent 50%),
    radial-gradient(900px 400px at 100% 0%, #8a9a7a 0%, transparent 42%),
    var(--foam);
  min-height: 100vh;
  line-height: 1.5;
}

a { color: inherit; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; }

.wrap {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: rgba(7, 30, 38, 0.88);
  color: var(--foam);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(160deg, #4a9a8e, #1a4a52 55%, #3d7a6e);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  color: white;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2);
}
.brand-text strong {
  display: block;
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.brand-text span {
  display: block;
  font-size: 0.72rem;
  opacity: 0.7;
  margin-top: -2px;
}
.nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-left: auto;
}
.nav a, .nav button.ghost {
  color: rgba(246,241,232,0.82);
  text-decoration: none;
  padding: 8px 11px;
  border-radius: 999px;
  font-size: 0.9rem;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.nav a:hover, .nav a.active {
  background: rgba(255,255,255,0.1);
  color: white;
}
.cta {
  background: var(--coral) !important;
  color: white !important;
  font-weight: 700;
}
.cta:hover { filter: brightness(1.05); }

.hero {
  padding: 42px 0 18px;
  color: var(--sea-deep);
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(12,61,74,0.08);
  color: var(--sea);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hero h1 {
  font-family: var(--display);
  font-weight: 650;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.08;
  margin: 14px 0 10px;
  letter-spacing: -0.03em;
  max-width: 16ch;
}
.hero p.lede {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 58ch;
  margin: 0 0 22px;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
}
.btn-primary { background: var(--sea); color: white; }
.btn-primary:hover { background: var(--sea-mid); }
.btn-ghost {
  background: white;
  color: var(--sea);
  border: 1px solid var(--line);
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 28px;
}
.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
}
.stat b { display: block; font-family: var(--display); font-size: 1.4rem; }
.stat span { color: var(--muted); font-size: 0.82rem; }

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin: 8px 0 18px;
}
.search, .select, .field input, .field textarea, .field select {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  color: var(--ink);
}
.search { flex: 1; min-width: 200px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
  font-size: 0.86rem;
}
.chip.active, .chip:hover { background: var(--sea); color: white; border-color: var(--sea); }

.grid {
  display: grid;
  grid-template-columns: 1.7fr 0.9fr;
  gap: 22px;
  padding-bottom: 60px;
}
.cards { display: grid; gap: 12px; }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset;
}
.card:hover { border-color: rgba(12,61,74,0.25); }
.meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 6px;
}
.tag {
  background: rgba(12,61,74,0.08);
  color: var(--sea);
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tag.sale { background: rgba(201,75,50,0.12); color: var(--coral-dark); }
.tag.event { background: rgba(196,160,70,0.18); color: #7a5d12; }
.tag.trade { background: rgba(21,96,112,0.12); color: var(--sea-mid); }
.tag.featured { background: var(--coral); color: white; }
.card h3 {
  margin: 0 0 6px;
  font-size: 1.12rem;
  font-family: var(--display);
  letter-spacing: -0.02em;
}
.card p { margin: 0; color: #334247; }
.price {
  margin-top: 10px;
  font-weight: 800;
  color: var(--sea);
}
.card-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.side { display: grid; gap: 14px; align-content: start; }
.panel {
  background: var(--sea-deep);
  color: var(--foam);
  border-radius: 22px;
  padding: 20px;
}
.panel h2, .card-block h2 {
  font-family: var(--display);
  font-size: 1.2rem;
  margin: 0 0 10px;
}
.panel p { color: rgba(246,241,232,0.75); margin: 0 0 14px; }
.biz {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.biz:first-of-type { border-top: 0; }
.biz-mark {
  width: 42px; height: 42px; border-radius: 12px;
  background: #1b4e5a;
  display: grid; place-items: center;
  font-weight: 800;
  flex-shrink: 0;
}
.biz b { display: block; }
.biz span { font-size: 0.8rem; opacity: 0.75; }

.card-block {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
}
.week li {
  list-style: none;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.week { margin: 0; padding: 0; }
.week li:first-child { border-top: 0; }
.week time { display: block; color: var(--coral); font-size: 0.78rem; font-weight: 800; }

.page-head { padding: 28px 0 8px; }
.page-head h1 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 8px 0;
  letter-spacing: -0.03em;
}
.page-head p { color: var(--muted); margin: 0 0 8px; max-width: 62ch; }

.form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  display: grid;
  gap: 14px;
  margin-bottom: 40px;
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.82rem; font-weight: 800; color: var(--sea); }
.hint { color: var(--muted); font-size: 0.8rem; }
.ok {
  background: #e7f6ee;
  color: #1b5c38;
  padding: 12px 14px;
  border-radius: 12px;
}
.err {
  background: #fdecea;
  color: #8c2416;
  padding: 12px 14px;
  border-radius: 12px;
}

.offline-notice {
  background: #fff4d6;
  color: #6d5314;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 16px;
}

.biz-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.biz-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}
.biz-card.paid {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(201,75,50,0.12);
}
.money {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0 28px;
}
.money .card b { font-family: var(--display); font-size: 1.5rem; color: var(--sea); }

.empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--muted);
}

footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 50px;
  color: var(--muted);
  font-size: 0.88rem;
}
.foot-grid {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-photo {
  position: relative;
  min-height: min(72vh, 620px);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: white;
}
.hero-photo img.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%;
}
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7,30,38,0.15) 0%, rgba(7,30,38,0.55) 48%, rgba(7,30,38,0.88) 100%);
}
.hero-copy {
  position: relative;
  z-index: 1;
  padding: 48px 0 36px;
}
.hero-photo .kicker { background: rgba(255,255,255,0.14); color: #fff; }
.hero-photo h1 { color: white; max-width: 14ch; }
.hero-photo p.lede { color: rgba(246,241,232,0.94); text-shadow: 0 1px 12px rgba(0,0,0,0.35); }
.hero-photo .stat {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.16);
  color: white;
  backdrop-filter: blur(10px);
}
.hero-photo .stat span { color: rgba(246,241,232,0.75); }
.hero-photo .btn-ghost {
  background: rgba(255,255,255,0.12);
  color: white;
  border-color: rgba(255,255,255,0.25);
}
.town-rail {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin: -28px auto 22px;
  position: relative;
  z-index: 2;
}
.town-card {
  position: relative;
  height: 118px;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  color: white;
  text-align: left;
  box-shadow: var(--shadow);
}
.town-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.town-card span {
  position: absolute;
  left: 10px;
  bottom: 10px;
  font-weight: 800;
  font-size: 0.92rem;
  text-shadow: 0 1px 8px rgba(0,0,0,0.55);
}
.town-card.active { outline: 3px solid var(--coral); outline-offset: 2px; }
.pulls {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 4px 0 22px;
}
.pull {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}
.pull b { display: block; font-family: var(--display); font-size: 1.05rem; margin-bottom: 4px; }
.pull p { margin: 0; color: var(--muted); font-size: 0.88rem; }
.card.media {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 14px;
  align-items: start;
  padding: 12px;
}
.card.media .thumb {
  width: 128px;
  height: 128px;
  border-radius: 14px;
  object-fit: cover;
}
.mailer form { display: grid; gap: 8px; }
.credit { font-size: 0.72rem; opacity: 0.6; margin-top: 8px; }

.hidden { display: none !important; }
.view { animation: in 0.25s ease; }
@keyframes in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 860px) {
  .grid, .row, .stats, .money, .biz-grid, .town-rail, .pulls { grid-template-columns: 1fr 1fr; }
  .nav { display: none; }
  .mobile-nav { display: flex !important; }
  .hero { padding-top: 24px; }
  .card.media { grid-template-columns: 88px 1fr; }
  .card.media .thumb { width: 88px; height: 88px; }
  .hero-photo { min-height: 520px; }
}
.mobile-nav {
  display: none;
  position: sticky;
  bottom: 0;
  z-index: 40;
  background: var(--sea-deep);
  color: white;
  justify-content: space-around;
  padding: 8px 6px 12px;
}
.mobile-nav a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.72rem;
  text-align: center;
  padding: 6px;
}
.mobile-nav a.active { color: white; font-weight: 800; }
.mobile-nav span { display: block; font-size: 1.05rem; }


/* Local books promo strip (site owner soft ads) */
.books-ad .hint { margin: 0 0 12px; }
.book-rail { display: grid; gap: 10px; }
.book-ad {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fbf8f2;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.book-ad:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.book-ad img {
  width: 56px;
  height: 84px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: #ddd;
}
.book-ad b {
  display: block;
  font-size: 0.92rem;
  line-height: 1.25;
  color: var(--sea-deep);
}
.book-ad em {
  display: block;
  font-style: normal;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 3px;
}
.book-ad small {
  display: block;
  margin-top: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--coral);
}


/* Tip / support (Amelia) — matches book-rail soft promo */
.tip-support .hint { margin: 0 0 12px; }
.tip-rail { display: grid; gap: 10px; }
.tip-link {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fbf8f2;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tip-link:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.tip-ico {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 1.45rem;
  background: #f0e8da;
  border: 1px solid var(--line);
}
.tip-link b {
  display: block;
  font-size: 0.92rem;
  line-height: 1.25;
  color: var(--sea-deep);
}
.tip-link em {
  display: block;
  font-style: normal;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 3px;
}
.tip-link small {
  display: block;
  margin-top: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--coral);
}


/* PWA install hint — soft, mobile-first */
.install-hint {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  z-index: 45;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(7, 30, 38, 0.94);
  color: var(--foam);
  box-shadow: 0 12px 28px rgba(7, 30, 38, 0.28);
  border: 1px solid rgba(246, 241, 232, 0.12);
}
.install-hint.hidden { display: none; }
.install-hint p {
  margin: 0;
  flex: 1 1 160px;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
}
.install-hint-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.install-hint .btn {
  padding: 8px 12px;
  font-size: 0.82rem;
  border-radius: 10px;
}
.install-hint .btn-ghost {
  background: transparent;
  color: var(--foam);
  border: 1px solid rgba(246, 241, 232, 0.28);
}
.install-hint .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}
@media (min-width: 860px) {
  .install-hint {
    left: auto;
    right: 20px;
    bottom: 20px;
    max-width: 380px;
  }
}

.hint-inline { font-weight: 400; color: var(--muted); font-size: 0.9em; }
#when-field.emphasize label { color: var(--sea); }
#when-field.emphasize input {
  border-color: var(--sea);
  box-shadow: 0 0 0 2px rgba(12, 61, 74, 0.12);
}
.card.empty a { color: var(--sea); font-weight: 700; text-decoration: underline; }


/* Demo banner — Whitstable pilot, not live */
.demo-banner {
  background: #3d7a6e;
  color: #f7f4ef;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 9px 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.demo-banner a { color: #fff; text-decoration: underline; }
.demo-pill {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  padding: 2px 8px;
  border-radius: 999px;
  margin-right: 6px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.topbar { top: 0; }
body.has-demo-banner .topbar { top: 34px; }
.coming-soon {
  opacity: 0.75;
  pointer-events: none;
}
.coming-soon-note {
  background: rgba(61,122,110,0.12);
  color: var(--coral-dark);
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
}
.photo-credits {
  font-size: 0.72rem;
  line-height: 1.45;
  opacity: 0.75;
  margin-top: 10px;
}
.photo-credits a { text-decoration: underline; }
.town-rail { grid-template-columns: repeat(5, 1fr); }


/* Welcome intro — Whitstable story, home + about */
.welcome-strip {
  margin: 18px 0 8px;
  padding: 18px 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.welcome-strip .kicker {
  margin-bottom: 6px;
}
.welcome-strip h2 {
  font-family: var(--display);
  font-size: 1.35rem;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
  max-width: 28ch;
}
.welcome-strip p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 68ch;
}
.welcome-strip p:last-child { margin-bottom: 0; }
.welcome-strip a {
  color: var(--sea);
  font-weight: 700;
  text-decoration: none;
}
.welcome-strip a:hover { text-decoration: underline; }

.welcome-strip--slim {
  margin: 14px 0 4px;
  padding: 12px 16px;
}
.welcome-strip--slim p {
  margin: 0;
  font-size: 0.92rem;
}

/* Privacy / legal pages */
.legal-page {
  padding: 36px 0 60px;
}
.legal-page h1 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 0 0 8px;
  color: var(--sea-deep);
}
.legal-page .legal-updated {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 28px;
}
.legal-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.legal-card h2 {
  font-family: var(--display);
  font-size: 1.25rem;
  margin: 0 0 10px;
  color: var(--sea);
}
.legal-card h3 {
  font-size: 1rem;
  margin: 16px 0 6px;
}
.legal-card p, .legal-card li {
  color: var(--ink);
  font-size: 0.95rem;
}
.legal-card ul {
  margin: 8px 0 0;
  padding-left: 1.2em;
}
.legal-card a {
  color: var(--sea-mid);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-callout {
  border-left: 4px solid var(--coral);
  background: rgba(0,0,0,0.03);
  padding: 12px 14px;
  border-radius: 0 12px 12px 0;
  margin: 12px 0 0;
}
