/* ============================================================
   Prototype B v1 — "Painted Street"
   Hand-printed neighbourhood zine. Warm paper, leaf greens,
   plaster pink, the odd marker red. Used only inside
   /b/v1-painted/*.html. Hydrates via shared /js/b-api.js and
   /js/b-main.js (read-only).
   ============================================================ */

:root {
  --paper:        #F7F1E6;
  --paper-deep:   #F0E5CD;
  --paper-pale:   #FBF6EA;
  --paper-card:   #FCF8EE;

  --plaster:      #E8A4A0;
  --plaster-deep: #D4847F;
  --brick:        #C66B5A;
  --leaf:         #86B255;
  --moss:         #5B7F37;
  --sky:          #BCD6E5;
  --sandstone:    #E8D9B4;

  --ink:          #2E2A26;
  --ink-soft:     #534B40;
  --ink-mute:     #7A7060;
  --ink-faint:    #A89E8C;

  --marker:       #C03E2E;   /* used sparingly */
  --hairline:     rgba(46, 42, 38, 0.18);
  --hairline-soft:rgba(46, 42, 38, 0.10);

  --font-display: "Fraunces", "Cormorant Garamond", Georgia, serif;
  --font-body:    "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-hand:    "Caveat", "Bradley Hand", cursive;

  --shadow-card:  0 1px 0 rgba(46,42,38,.06), 0 18px 32px -22px rgba(46,42,38,.22);
  --shadow-soft:  0 1px 0 rgba(46,42,38,.06), 0 8px 14px -10px rgba(46,42,38,.18);

  --radius:       14px;
  --radius-sm:    9px;

  --maxw:         1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* paper grain via inline SVG turbulence */
  background-image:
    radial-gradient(circle at 12% -10%, rgba(232,164,160,.18) 0, transparent 38%),
    radial-gradient(circle at 92% 8%,   rgba(188,214,229,.22) 0, transparent 32%),
    radial-gradient(circle at 50% 110%, rgba(134,178,85,.12) 0, transparent 45%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.18  0 0 0 0 0.16  0 0 0 0 0.14  0 0 0 0.045 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-attachment: fixed, fixed, fixed, fixed;
  background-color: var(--paper);
}

a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1.2px; }
a:hover { color: var(--marker); }

img { display: block; max-width: 100%; height: auto; }

button { font: inherit; cursor: pointer; }

:focus-visible {
  outline: 2.5px solid var(--marker);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px; top: 0;
  z-index: 200;
  padding: .8rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 241, 230, 0.92);
  backdrop-filter: blur(8px) saturate(115%);
  border-bottom: 1px solid var(--hairline);
}
.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: .5rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 36, "SOFT" 60;
}
.brand .brand-mark {
  display: inline-block;
  width: 11px; height: 11px;
  background: var(--brick);
  border-radius: 50%;
  margin-right: .15rem;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(198,107,90,.18);
}
.brand .brand-hand {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--moss);
  margin-left: .2rem;
  transform: translateY(2px);
}

.nav-links {
  display: flex;
  gap: .1rem;
  align-items: center;
}
.nav-links a {
  text-decoration: none;
  padding: .55rem .9rem;
  border-radius: 999px;
  color: var(--ink-soft);
  font-weight: 500;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: background .15s ease, color .15s ease;
}
.nav-links a:hover { color: var(--ink); background: rgba(46,42,38,.06); }
.nav-links a[aria-current="page"] {
  color: var(--ink);
  background: rgba(198,107,90,.12);
  box-shadow: inset 0 0 0 1px rgba(198,107,90,.32);
}

.menu-btn {
  display: none;
  min-height: 44px;
  min-width: 44px;
  padding: .4rem .7rem;
  background: transparent;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  color: var(--ink);
}

/* ---------- shell ---------- */
.shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 2.4rem;
  align-items: center;
  padding: 2.2rem 0 1.2rem;
}

.hero-art {
  position: relative;
  isolation: isolate;
  aspect-ratio: 4 / 3;
}
.hero-art .wash {
  position: absolute; inset: -3% -4% -5% -3%;
  background:
    radial-gradient(60% 55% at 30% 30%, rgba(134,178,85,.55), transparent 70%),
    radial-gradient(55% 50% at 75% 75%, rgba(232,164,160,.55), transparent 75%),
    radial-gradient(45% 40% at 80% 25%, rgba(188,214,229,.55), transparent 70%);
  filter: blur(18px) saturate(110%);
  z-index: 0;
  border-radius: 22px;
}
.hero-art .frame {
  position: absolute; inset: 0;
  z-index: 1;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transform: rotate(-1.2deg);
  background: var(--paper-card);
}
.hero-art .frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  /* subtle warm wash on top of the photo so it reads as painted */
  mix-blend-mode: multiply;
  filter: contrast(1.02) saturate(1.05);
}
.hero-art .frame::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(247,241,230,.08), rgba(247,241,230,.18));
  pointer-events: none;
}
.hero-art .inset {
  position: absolute;
  right: -3%;
  bottom: -6%;
  width: 44%;
  aspect-ratio: 4 / 3;
  z-index: 2;
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper-card);
  box-shadow: var(--shadow-soft);
  transform: rotate(3.2deg);
  border: 5px solid var(--paper-card);
}
.hero-art .inset img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-art .pin {
  position: absolute;
  top: -10px; left: 22%;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffd9d3, var(--brick) 65%, #6b2a1f 100%);
  box-shadow: 0 4px 6px rgba(0,0,0,.18);
  z-index: 3;
  transform: rotate(-8deg);
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.4rem, 4.4vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.018em;
  margin: 0 0 1rem;
  color: var(--ink);
  font-variation-settings: "opsz" 96, "SOFT" 80;
}
.hero-copy h1 em {
  font-style: italic;
  color: var(--marker);
  font-variation-settings: "opsz" 96, "SOFT" 100;
}
.hero-copy .eyebrow {
  font-family: var(--font-hand);
  color: var(--moss);
  font-size: 1.35rem;
  margin: 0 0 .6rem;
  transform: rotate(-1.5deg);
  display: inline-block;
}
.hero-copy p.lede {
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 36ch;
  margin: 0 0 1.4rem;
}
.cta-row {
  display: flex;
  gap: .7rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  min-height: 44px;
  border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 1px 0 rgba(46,42,38,.06), 0 10px 20px -12px rgba(46,42,38,.6);
}
.btn-primary:hover {
  background: var(--marker);
  color: var(--paper);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--hairline);
}
.btn-ghost:hover {
  background: rgba(46,42,38,.05);
  color: var(--ink);
}

/* ---------- festoon divider ---------- */
.festoon {
  margin: 2.4rem auto 1.6rem;
  height: 38px;
  width: 100%;
  display: block;
}

/* ---------- sections ---------- */
.section {
  margin-top: 1.6rem;
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.65rem, 2.6vw, 2.05rem);
  line-height: 1.1;
  letter-spacing: -0.012em;
  margin: 0;
  position: relative;
  padding-bottom: .35rem;
  font-variation-settings: "opsz" 72, "SOFT" 60;
}
.section-head h2::after {
  content: "";
  position: absolute;
  left: 0; right: 12%;
  bottom: -2px;
  height: 8px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 8' preserveAspectRatio='none'><path d='M0 5 Q 12 1, 24 5 T 48 5 T 72 5 T 96 5 T 120 5 T 144 5 T 168 5 T 192 5' fill='none' stroke='%23C03E2E' stroke-width='1.6' stroke-linecap='round' opacity='.85'/></svg>");
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
.section-head .lede {
  color: var(--ink-soft);
  max-width: 42ch;
  margin: 0;
}

/* ---------- KPI strip ---------- */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.3rem;
}
.kpi-card {
  background: var(--paper-card);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}
/* Decorative color blobs removed — keep KPI cards plain paper. */
.kpi-card h3 {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .72rem;
  color: var(--ink-mute);
  margin: 0 0 .35rem;
  font-weight: 700;
}
.kpi-card .kpi {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.4vw, 2.5rem);
  line-height: 1;
  margin: 0;
  font-weight: 500;
  font-variation-settings: "opsz" 96, "SOFT" 100;
  color: var(--ink);
}

/* ---------- card grid (lists hydrated by b-main.js) ---------- */
/* Pasted notices, not SaaS cards. Irregular corners, light paper shadow,
   a small tape strip and a corner stamp. Slight rotation per nth-child
   for the assembled-by-neighbours feel. Class hooks (.list-item-head,
   .list-item-title, .list-item-meta, .list-item-body) come from the
   shared b-main.js renderer; legacy CSS in /b/styles.css provides
   plain fallback. */
.list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem 1.2rem;
}
.list-item {
  background: var(--paper-card);
  border: 1px solid var(--hairline-soft);
  border-radius: 6px 10px 4px 12px;
  padding: 1.15rem 1.2rem 1.2rem;
  /* paper-on-paper rather than floating SaaS shadow */
  box-shadow:
    1px 2px 0 rgba(46,42,38,.05),
    0 6px 14px -12px rgba(46,42,38,.22);
  position: relative;
  overflow: hidden;
  transform: rotate(-.5deg);
  transition: transform .14s ease, box-shadow .14s ease;
}
.list-item:hover {
  transform: rotate(-.2deg) translateY(-1px);
  box-shadow:
    1px 2px 0 rgba(46,42,38,.07),
    0 12px 22px -16px rgba(46,42,38,.28);
}

.list-item > * { position: relative; z-index: 1; }

/* When a card is wrapped in a link (post listings), preserve typography
   and make the whole tile click-through without forcing underline. */
.list-item-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.list-item-link:hover .list-item-title,
.list-item-link:focus-visible .list-item-title {
  text-decoration: underline;
  text-decoration-color: rgba(192,62,46,.5);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}
.list-item-link:focus-visible {
  outline: 2px solid var(--marker);
  outline-offset: 4px;
  border-radius: 8px;
}

/* new class hooks emitted by b-main.js */
.list-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .7rem;
  flex-wrap: wrap;
  margin-bottom: .2rem;
}
.list-item-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.22rem;
  line-height: 1.25;
  letter-spacing: -0.008em;
  font-variation-settings: "opsz" 36, "SOFT" 60;
  color: var(--ink);
}
.list-item-meta {
  margin: .45rem 0 .55rem;
  /* hand-drawn ruled line under the metadata */
  padding-bottom: .4rem;
  border-bottom: 1px dashed var(--hairline);
}
.list-item-body {
  margin: 0;
  color: var(--ink-soft);
}

/* irregularity per position — three reusable paper shapes */
.list-item:nth-child(2n) {
  transform: rotate(.45deg);
  border-radius: 10px 6px 12px 4px;
}

.list-item:nth-child(3n) {
  transform: rotate(-.3deg);
  border-radius: 4px 12px 8px 10px;
}

.list-item:nth-child(4n) {
  transform: rotate(.65deg);
  border-radius: 12px 4px 6px 10px;
}

/* ---------- event card (date-first, no description teaser) ----------
   Used for the "Coming up" home strip and the events page. Big date
   block on the left, structured "When / Where" rows on the right.
   Description deliberately lives on the event detail page only \u2014
   the card is a glanceable handbill, not a wall of text. */
.event-card {
  background: var(--paper-card);
  border: 1px solid var(--hairline-soft);
  border-radius: 6px 10px 4px 12px;
  padding: 1rem 1.1rem 1rem 1rem;
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 1rem;
  align-items: center;
  box-shadow:
    1px 2px 0 rgba(46,42,38,.05),
    0 6px 14px -12px rgba(46,42,38,.22);
  transform: rotate(-.35deg);
  transition: transform .14s ease, box-shadow .14s ease;
}
.event-card:hover {
  transform: rotate(-.1deg) translateY(-1px);
  box-shadow:
    1px 2px 0 rgba(46,42,38,.07),
    0 12px 22px -16px rgba(46,42,38,.28);
}
.event-card:nth-child(2n) {
  transform: rotate(.4deg);
  border-radius: 10px 6px 12px 4px;
}
.event-card:nth-child(3n) {
  transform: rotate(-.25deg);
  border-radius: 4px 12px 8px 10px;
}

.event-card-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: .55rem .3rem .65rem;
  background: var(--paper-pale, #F4ECD8);
  border: 1px solid var(--hairline-soft);
  border-radius: 6px;
  line-height: 1;
}
.event-card-weekday {
  font-family: var(--font-body);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.event-card-day {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.85rem;
  color: var(--ink);
  margin: .15rem 0 .05rem;
  font-variation-settings: "opsz" 72, "SOFT" 60;
}
.event-card-month {
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--marker);
}

.event-card-body {
  min-width: 0; /* prevent overflow under the date block */
}
.event-card-title {
  margin: 0 0 .35rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.18rem;
  line-height: 1.25;
  letter-spacing: -0.008em;
  font-variation-settings: "opsz" 36, "SOFT" 60;
  color: var(--ink);
}
.event-card-line {
  margin: .08rem 0;
  color: var(--ink-soft);
  font-size: .94rem;
}
.event-card-label {
  display: inline-block;
  min-width: 3.4rem;
  font-family: var(--font-body);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-right: .35rem;
}

/* ---------- pills (painted asymmetric) ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  padding: .22rem .7rem .3rem;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 36' preserveAspectRatio='none'><path d='M6 4 Q 60 0, 116 6 Q 118 18, 114 32 Q 60 36, 4 30 Q 2 18, 6 4 Z' fill='%23E8D9B4' opacity='.85'/></svg>");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  border-radius: 30px;
  transform: rotate(-1deg);
  white-space: nowrap;
}

/* ---------- meta line ---------- */
.meta {
  color: var(--ink-mute);
  font-size: .92rem;
}

/* ---------- highlight card (Clark Street) ---------- */
.feature {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
  background: var(--paper-card);
  border-radius: var(--radius);
  border: 1px solid var(--hairline-soft);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.feature .feature-art {
  position: relative;
  min-height: 220px;
  background:
    radial-gradient(60% 70% at 30% 30%, rgba(134,178,85,.45), transparent 70%),
    radial-gradient(70% 80% at 80% 80%, rgba(232,164,160,.45), transparent 75%),
    var(--paper-deep);
}
.feature .feature-art::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.18  0 0 0 0 0.16  0 0 0 0 0.14  0 0 0 0.07 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
  opacity: .55;
}
.feature .feature-body {
  padding: 1.6rem 1.7rem;
}
.feature .eyebrow {
  font-family: var(--font-hand);
  color: var(--moss);
  font-size: 1.25rem;
  margin: 0 0 .25rem;
  display: inline-block;
  transform: rotate(-1deg);
}
.feature h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.5rem, 2.4vw, 1.85rem);
  line-height: 1.18;
  margin: 0 0 .6rem;
  letter-spacing: -0.012em;
  font-variation-settings: "opsz" 72, "SOFT" 60;
}
.feature p { color: var(--ink-soft); margin: 0 0 1rem; max-width: 50ch; }

/* ---------- notice (read-only badge) ---------- */
.notice {
  font-size: .92rem;
  color: var(--ink-mute);
  padding: .5rem .9rem;
  background: rgba(232, 217, 180, .35);
  border: 1px dashed var(--hairline);
  border-radius: 10px;
  display: inline-flex;
  gap: .5rem;
  align-items: center;
  margin: 0;
}
.notice strong { color: var(--ink-soft); }

/* ---------- footer ---------- */
footer.footer {
  max-width: var(--maxw);
  margin: 3rem auto 2rem;
  padding: 1.5rem 1.25rem 0;
  border-top: 1px solid var(--hairline);
  color: var(--ink-mute);
  font-size: .92rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
footer.footer .hand {
  font-family: var(--font-hand);
  color: var(--moss);
  font-size: 1.15rem;
}

/* ---------- blocked state (gate fallback styling) ---------- */
.local-only {
  max-width: 520px;
  margin: 6rem auto;
  padding: 2rem;
  background: var(--paper-card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-soft);
}
.local-only h2 {
  font-family: var(--font-display);
  font-weight: 500;
  margin: 0 0 .5rem;
}

/* ============================================================
   sub-page elements (forum, events, clark-street)
   ============================================================ */

/* compact page header — smaller than the home hero */
.page-header {
  padding: 1.6rem 0 .6rem;
}
.page-header .eyebrow {
  font-family: var(--font-hand);
  color: var(--moss);
  font-size: 1.3rem;
  margin: 0 0 .15rem;
  transform: rotate(-1.2deg);
  display: inline-block;
}
.page-header h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 3.8vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0;
  max-width: 22ch;
  font-variation-settings: "opsz" 96, "SOFT" 80;
}
.page-header h1 em { font-style: italic; color: var(--marker); }
.page-header p.lede {
  font-size: 1.08rem;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: .6rem 0 0;
}

/* accessible label hiding */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* forum filter row */
.filter-row {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  align-items: center;
  margin: 1.2rem 0 0;
  padding: 1rem 1.1rem;
  background: var(--paper-card);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.filter-row input[type="search"],
.filter-row select {
  font: inherit;
  padding: .65rem 1rem;
  min-height: 44px;
  border-radius: 999px;
  background: var(--paper-pale);
  border: 1px solid var(--hairline);
  color: var(--ink);
  flex: 1 1 220px;
  max-width: 340px;
  transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}
.filter-row input[type="search"]::placeholder { color: var(--ink-faint); }
.filter-row input[type="search"]:focus,
.filter-row select:focus {
  outline: none;
  border-color: var(--marker);
  background: #FFF;
  box-shadow: 0 0 0 3px rgba(192,62,46,.20);
}
.filter-row select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path d='M1 1 L 6 6 L 11 1' fill='none' stroke='%23534B40' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1.05rem center;
  background-size: 11px 7px;
  padding-right: 2.4rem;
  cursor: pointer;
}
.filter-row .primary,
.filter-row button[type="submit"] {
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  padding: .7rem 1.2rem;
  border: 1px solid transparent;
  font-weight: 600;
  min-height: 44px;
  cursor: pointer;
  transition: background .14s ease, transform .12s ease;
}
.filter-row .primary:hover,
.filter-row button[type="submit"]:hover {
  background: var(--marker);
  transform: translateY(-1px);
}

/* disabled-action row beneath the filter */
.disabled-row {
  display: flex;
  gap: .8rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: .9rem;
  color: var(--ink-mute);
  font-size: .92rem;
}
.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: .58;
  cursor: not-allowed;
  background: var(--paper-deep);
  color: var(--ink-mute);
  border-color: var(--hairline);
  box-shadow: none;
}
.btn[disabled]:hover,
.btn[aria-disabled="true"]:hover {
  background: var(--paper-deep);
  color: var(--ink-mute);
  transform: none;
}

/* single-column stack used by full forum / events lists */
.list-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1.3rem;
}

/* secondary section heading (e.g. "Past events") */
.subsection-head {
  margin: 2.4rem 0 .8rem;
  display: flex;
  align-items: baseline;
  gap: .8rem;
  flex-wrap: wrap;
}
.subsection-head h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.3rem, 2vw, 1.55rem);
  margin: 0;
  letter-spacing: -0.012em;
  font-variation-settings: "opsz" 60, "SOFT" 60;
}
.subsection-head .meta { color: var(--ink-mute); }

/* Clark Street: hero painted illustration tile (no photo) */
.painted-tile {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--sandstone);
  isolation: isolate;
}
.painted-tile svg { display: block; width: 100%; height: 100%; }
.painted-tile::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.18  0 0 0 0 0.16  0 0 0 0 0.14  0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
  opacity: .55;
  pointer-events: none;
}

/* marked-up plan variant: same paper feel but lighter overlay so the
   hand-drawn annotations stay crisp */
.painted-plan { background: #FBF6EA; }
.painted-plan::after { opacity: .28; }

/* Clark Street: timeline */
.timeline {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0;
  display: grid;
  gap: 1rem;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 76px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: repeating-linear-gradient(to bottom, var(--brick) 0 4px, transparent 4px 8px);
  opacity: .45;
}
.timeline li {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 1rem;
  align-items: start;
  position: relative;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: 70px;
  top: 10px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--brick);
  box-shadow: 0 0 0 4px var(--paper);
}
.timeline li.done::before { background: var(--leaf); }
.timeline li.now::before  { background: var(--marker); box-shadow: 0 0 0 4px var(--paper), 0 0 0 7px rgba(192,62,46,.25); }
.timeline .when {
  font-family: var(--font-hand);
  color: var(--moss);
  font-size: 1.25rem;
  margin: 0;
  padding-top: 2px;
}
.timeline .what {
  background: var(--paper-card);
  padding: .9rem 1.15rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--hairline-soft);
  box-shadow: var(--shadow-soft);
}
.timeline .what h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1rem;
  margin: 0 0 .25rem;
  letter-spacing: -0.005em;
  font-variation-settings: "opsz" 36, "SOFT" 60;
}
.timeline .what p { margin: 0; color: var(--ink-soft); }

/* Clark Street: agreed-list (checklist) */
.checklist {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: grid;
  gap: .6rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.checklist li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: .7rem;
  align-items: start;
  padding: .85rem 1.05rem;
  background: var(--paper-card);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
}
.checklist li::before {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: var(--leaf);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3.5 8 L 7 11.5 L 13 4.5' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
  margin-top: 1px;
}
.checklist li strong { font-weight: 600; color: var(--ink); display: block; }
.checklist li span { color: var(--ink-soft); font-size: .94rem; }

/* Clark Street: resident quotes */
.quotes {
  display: grid;
  gap: 1rem;
  margin: 1.2rem 0;
}
.quote {
  background: var(--paper-card);
  border-left: 4px solid var(--plaster);
  padding: 1.1rem 1.3rem 1.15rem;
  border-radius: 0 14px 14px 0;
  margin: 0;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.quote::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 60px;
  background: radial-gradient(60% 100% at 20% 0%, rgba(232,164,160,.22), transparent 70%);
  pointer-events: none;
}
.quote p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.45;
  margin: 0 0 .5rem;
  color: var(--ink);
  position: relative;
  font-variation-settings: "opsz" 60, "SOFT" 80;
}
.quote cite {
  font-family: var(--font-hand);
  color: var(--moss);
  font-size: 1.1rem;
  font-style: normal;
}
.quote:nth-child(2) { border-left-color: var(--leaf); }
.quote:nth-child(2)::before {
  background: radial-gradient(60% 100% at 20% 0%, rgba(134,178,85,.22), transparent 70%);
}
.quote:nth-child(3) { border-left-color: var(--sky); }
.quote:nth-child(3)::before {
  background: radial-gradient(60% 100% at 20% 0%, rgba(188,214,229,.28), transparent 70%);
}

/* ---------- events notice-strip (replaces dashboard-y KPI cards) ---------- */
.event-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin: 1.4rem 0 .4rem;
  padding: 1.1rem 1.3rem 1.15rem;
  background: var(--paper-card);
  border: 1px dashed var(--hairline);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transform: rotate(-.25deg);
}
.event-cta::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 38px;
  background: radial-gradient(60% 100% at 20% 0%, rgba(232,217,180,.55), transparent 70%);
  pointer-events: none;
}
.event-cta::after {
  /* a small painted tape strip in the top-left */
  content: "";
  position: absolute;
  top: -8px; left: 18px;
  width: 62px; height: 22px;
  background: rgba(232, 164, 160, .85);
  transform: rotate(-4deg);
  box-shadow: 0 2px 4px rgba(46,42,38,.10);
}
.event-cta > * { position: relative; z-index: 1; }
.event-cta .cta-headline {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1.25;
  margin: 0 0 .2rem;
  font-variation-settings: "opsz" 60, "SOFT" 60;
}
.event-cta .cta-text {
  margin: 0;
  color: var(--ink-soft);
  max-width: 44ch;
}
.event-cta a {
  color: var(--marker);
  font-weight: 600;
  text-decoration-thickness: 1.4px;
}
.event-cta a:hover { color: var(--ink); }
.event-cta .cta-count {
  font-family: var(--font-hand);
  color: var(--moss);
  font-size: 1.3rem;
  margin: 0;
  white-space: nowrap;
}
.event-cta .cta-count strong {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--ink);
  font-size: 2rem;
  display: inline-block;
  margin-right: .35rem;
  vertical-align: -2px;
  font-variation-settings: "opsz" 96, "SOFT" 100;
}

/* ---------- locked button (read-only CTAs, semantically enabled) ---------- */
.btn-locked {
  background: var(--paper-deep);
  color: var(--ink-mute);
  border-color: var(--hairline);
  box-shadow: none;
  cursor: pointer;
  position: relative;
  padding-right: 2.2rem;
}
.btn-locked::after {
  /* small padlock glyph */
  content: "";
  position: absolute;
  right: .9rem;
  top: 50%;
  width: 14px; height: 14px;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M5 7 V5 a3 3 0 0 1 6 0 v2' fill='none' stroke='%237A7060' stroke-width='1.5' stroke-linecap='round'/><rect x='3.5' y='7' width='9' height='7' rx='1.2' fill='%23E8D9B4' stroke='%237A7060' stroke-width='1.4'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
  opacity: .85;
}
.btn-locked:hover {
  background: var(--sandstone);
  color: var(--ink-soft);
  transform: none;
}

/* ---------- account block in the topbar ---------- */
.account-block {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .88rem;
  color: var(--ink-soft);
}
.account-block .meta { margin: 0; font-size: inherit; }
.link-btn {
  background: none;
  border: 0;
  padding: .3rem .55rem;
  border-radius: 4px;
  font: inherit;
  font-weight: 600;
  color: var(--marker);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  text-decoration-color: rgba(192,62,46,.4);
}
.link-btn:hover { background: var(--paper-pale); text-decoration-color: var(--marker); }

/* ---------- form fields (login + new-post) ---------- */
.form-stack {
  display: grid;
  gap: 1rem;
  margin-top: 1.4rem;
}
.field { display: grid; gap: .35rem; }
.field label,
.field-label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: .98rem;
  color: var(--ink);
}
.field-hint {
  font-size: .82rem;
  color: var(--ink-mute);
}
.form-input,
.form-textarea,
.form-select {
  font: inherit;
  width: 100%;
  padding: .68rem .95rem;
  background: var(--paper-pale);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  color: var(--ink);
  min-height: 44px;
  box-sizing: border-box;
  transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}
.form-textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 1.55;
  border-radius: 4px 10px 6px 8px; /* small irregularity matching list-items */
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--marker);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(192,62,46,.18);
}
.form-actions {
  display: flex;
  gap: .8rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: .4rem;
}
.form-status {
  margin-top: .8rem;
  color: var(--ink-soft);
  font-size: .92rem;
}

.image-preview {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .4rem;
  margin-top: .4rem;
  padding: .6rem;
  background: var(--paper-pale);
  border: 1px dashed var(--hairline);
  border-radius: 6px;
}
.image-preview img {
  max-width: 100%;
  max-height: 280px;
  border-radius: 4px;
  display: block;
}

.post-image {
  display: block;
  max-width: 100%;
  max-height: 520px;
  margin: 1rem 0;
  border-radius: 6px;
  border: 1px solid var(--hairline);
  background: var(--paper-pale);
}
.list-item-thumb {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 4px;
  margin: .5rem 0 .2rem;
  border: 1px solid var(--hairline);
  background: var(--paper-pale);
}

.post-reactions {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin: 1.2rem 0 .4rem;
  flex-wrap: wrap;
}
.reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font: inherit;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: .95rem;
  padding: .42rem .85rem;
  background: var(--paper-pale);
  color: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  cursor: pointer;
  transition: background .14s ease, border-color .14s ease, color .14s ease, transform .12s ease;
}
.reaction-btn:hover:not(:disabled) {
  background: #fff;
  border-color: var(--marker);
}
.reaction-btn:disabled {
  opacity: .6;
  cursor: progress;
}
.reaction-btn .reaction-icon {
  color: var(--marker);
  font-size: 1.05rem;
  line-height: 1;
}
.reaction-btn .reaction-count {
  font-variant-numeric: tabular-nums;
  color: var(--ink-mute);
  font-size: .9rem;
}
.reaction-btn.is-on {
  background: #FCE9D2;
  border-color: var(--marker);
  color: var(--marker);
}
.reaction-btn.is-on .reaction-count {
  color: var(--marker);
}
.reaction-btn.is-on .reaction-icon {
  transform: scale(1.1);
}

/* submitted-banner = posted=pending|published feedback strip */
.submitted-banner {
  margin: 1rem 0 1.2rem;
  padding: .8rem 1rem;
  background: rgba(134, 178, 85, .18);
  border-left: 4px solid var(--leaf, #5b7f37);
  border-radius: 4px 12px 6px 10px;
  color: var(--ink);
  font-size: .95rem;
}

/* "Start a discussion" upgraded link replacing the locked button */
.post-cta-row {
  display: flex;
  gap: .8rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: .9rem;
  color: var(--ink-mute);
  font-size: .92rem;
}

/* ---------- responsive ---------- */
@media (max-width: 840px) {
  .menu-btn { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    right: 1rem;
    left: 1rem;
    background: var(--paper-pale);
    border: 1px solid var(--hairline);
    border-radius: 14px;
    padding: .5rem;
    flex-direction: column;
    align-items: stretch;
    box-shadow: var(--shadow-card);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; }

  .hero { grid-template-columns: 1fr; gap: 1.4rem; padding: 1rem 0 .5rem; }
  .hero-art { aspect-ratio: 5 / 4; }
  .list { grid-template-columns: 1fr; }
  .feature { grid-template-columns: 1fr; }
  .feature .feature-art { min-height: 180px; }
  .kpi-strip { grid-template-columns: 1fr 1fr; }

  .timeline::before { left: 8px; }
  .timeline li { grid-template-columns: 1fr; gap: .35rem; }
  .timeline li::before { left: 2px; top: 8px; }
  .timeline .when { padding-left: 22px; }
  .timeline .what { margin-left: 0; }
  .checklist { grid-template-columns: 1fr; }
  .filter-row input[type="search"],
  .filter-row select { max-width: none; flex: 1 1 100%; }
}

@media (max-width: 480px) {
  body { font-size: 16.5px; }
  .shell { padding: 1rem .9rem 3rem; }
  .hero-copy h1 { font-size: 2.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .list-item:hover { transform: none; }
}
