/* ============================================================
   Variant 2 — Noticeboard
   A community-noticeboard system: pinned papers, sticky filters,
   denser layout, utility serif headings + clean sans body.
   ============================================================ */

:root {
  --surface:          #F3EFE7;
  --surface-elev:     #FFFFFF;
  --surface-pinned:   #FFFCEF;
  --surface-sunken:   #ECE6DA;

  --ink:              #1A1714;
  --ink-soft:         #4A4239;
  --ink-mute:         #7A7060;

  --rule:             rgba(26,23,20,.10);
  --rule-strong:      rgba(26,23,20,.18);

  --pin-red:          #C8362D;
  --pin-yellow:       #E6B441;
  --pin-blue:         #3D6FA8;
  --pin-green:        #2E7A4A;

  --accent:           #C8362D;
  --accent-hover:     #A82A22;
  --accent-soft:      #FBE5E1;

  --shadow-card:      0 1px 2px rgba(26,23,20,.06), 0 4px 14px -10px rgba(26,23,20,.18);
  --shadow-card-lift: 0 2px 4px rgba(26,23,20,.08), 0 10px 22px -14px rgba(26,23,20,.28);

  --font-serif: "Newsreader", Georgia, "Iowan Old Style", serif;
  --font-sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono:  "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--surface);
  background-image:
    radial-gradient(rgba(26,23,20,.045) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: 0 0;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule-strong);
  transition: color .15s ease, text-decoration-color .15s ease;
}
a:hover { color: var(--accent); text-decoration-color: var(--accent); }

.skip-link {
  position: absolute; top: -40px; left: 0;
  background: var(--ink); color: var(--surface-elev);
  padding: .5rem .8rem; z-index: 1000;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(243,239,231,.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.topbar-inner {
  max-width: 1200px; margin: 0 auto;
  padding: .85rem 1.4rem;
  display: flex; align-items: center; gap: 1.2rem;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  text-decoration: none; color: var(--ink);
  font-family: var(--font-serif);
  font-weight: 600; font-size: 1.15rem;
  letter-spacing: -.01em;
}
.brand-mark {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--pin-red);
  box-shadow: 0 1px 2px rgba(0,0,0,.25), inset 0 -1px 2px rgba(0,0,0,.18);
  display: inline-block;
}
.menu-btn {
  margin-left: auto;
  border: 1px solid var(--rule-strong);
  background: var(--surface-elev);
  padding: .4rem .7rem; border-radius: 4px;
  font: 500 .85rem/1 var(--font-sans);
  cursor: pointer;
  display: none;
}
.nav-links {
  margin-left: auto;
  display: flex; gap: 1.6rem; flex-wrap: wrap;
}
.nav-links a {
  text-decoration: none;
  font: 500 .92rem/1 var(--font-sans);
  color: var(--ink-soft);
  padding: .3rem 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--ink); border-bottom-color: var(--rule-strong); }
.nav-links a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

@media (max-width: 780px) {
  .menu-btn { display: inline-block; }
  .nav-links {
    flex-basis: 100%;
    flex-direction: column; gap: .3rem;
    display: none;
    padding-top: .6rem;
    border-top: 1px solid var(--rule);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .55rem 0; }
}

/* ---------- shell ---------- */
.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.6rem 1.4rem 4rem;
}

/* ---------- type ---------- */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--ink);
}
h1 { font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.1; margin: 0 0 .8rem; font-weight: 600; }
h2 { font-size: clamp(1.45rem, 2.4vw, 1.85rem); line-height: 1.2; margin: 0 0 .6rem; }
h3 { font-size: 1.12rem; line-height: 1.3; margin: 0 0 .4rem; }

p { margin: 0 0 .8rem; }
.lede { font-size: 1.08rem; color: var(--ink-soft); margin: 0 0 1rem; }
.eyebrow {
  font: 500 .76rem/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--ink-mute);
  margin: 0 0 .6rem;
}

em { font-style: italic; color: var(--accent); }

/* ---------- hero ---------- */
.hero {
  padding: 2.2rem 0 2.6rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1.8rem;
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 2.6rem;
  align-items: center;
}
.hero-board {
  position: relative;
  background: var(--surface-elev);
  border: 1px solid var(--rule);
  border-radius: 6px;
  box-shadow: var(--shadow-card);
  padding: 1.2rem 1.2rem 1.4rem;
  min-height: 280px;
  overflow: hidden;
}
.hero-board::before {
  /* faux push-pin top centre */
  content: "";
  position: absolute;
  top: -8px; left: 50%;
  transform: translateX(-50%);
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--pin-red);
  box-shadow: 0 2px 3px rgba(0,0,0,.32), inset 0 -2px 3px rgba(0,0,0,.25), inset 0 1px 1px rgba(255,255,255,.4);
  z-index: 2;
}
.hero-board-eyebrow {
  font: 500 .72rem/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--accent);
  margin: 0 0 .7rem;
}
.hero-board h2 {
  font-size: 1.55rem;
  margin: 0 0 .5rem;
}
.hero-board ul {
  margin: .9rem 0 0;
  padding: 0;
  list-style: none;
  display: flex; flex-direction: column; gap: .55rem;
}
.hero-board li {
  display: flex; gap: .8rem; align-items: baseline;
  padding-bottom: .55rem;
  border-bottom: 1px dashed var(--rule);
}
.hero-board li:last-child { border-bottom: 0; padding-bottom: 0; }
.hero-board .li-tag {
  font: 500 .68rem/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink-mute);
  flex: 0 0 4.2rem;
}
.hero-board .li-text { color: var(--ink-soft); font-size: .94rem; }

@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; gap: 1.6rem; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .65rem 1rem;
  font: 500 .92rem/1 var(--font-sans);
  text-decoration: none;
  border: 1px solid var(--ink);
  border-radius: 4px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary {
  background: var(--ink);
  color: var(--surface-elev);
}
.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
}
.btn-ghost:hover {
  background: var(--ink);
  color: var(--surface-elev);
}
.btn-locked {
  background: var(--surface-sunken);
  color: var(--ink-mute);
  border-color: var(--rule-strong);
  cursor: not-allowed;
  position: relative;
  padding-left: 2rem;
}
.btn-locked::before {
  content: "";
  position: absolute; left: .8rem; top: 50%;
  transform: translateY(-50%);
  width: 12px; height: 12px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A7060' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><rect x='5' y='11' width='14' height='10' rx='1.5'/><path d='M8 11V8a4 4 0 0 1 8 0v3'/></svg>");
  background-size: contain; background-repeat: no-repeat;
}
.btn-locked:hover { background: var(--surface-sunken); color: var(--ink-mute); border-color: var(--rule-strong); }

.cta-row {
  display: flex; gap: .7rem; flex-wrap: wrap;
  margin-top: 1.2rem;
}

/* ---------- notice strip ---------- */
.notice {
  background: var(--surface-elev);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  padding: .7rem .95rem;
  font-size: .92rem;
  color: var(--ink-soft);
  border-radius: 0 4px 4px 0;
}
.notice strong { color: var(--ink); font-weight: 600; }
.notice .meta-inline { color: var(--ink-mute); font-family: var(--font-mono); font-size: .82rem; }

/* ---------- section heads ---------- */
.section { margin: 2.4rem 0; scroll-margin-top: 5rem; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  margin-bottom: 1.2rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--rule);
}
.section-head h2 { margin-bottom: .15rem; }
.section-head .lede { margin: 0; font-size: 1rem; }

.page-header {
  margin: .5rem 0 2rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--rule);
}
.page-header h1 { margin-bottom: .2rem; }
.page-header .lede { font-size: 1.1rem; margin: .2rem 0 0; max-width: 60ch; }

/* ---------- pinned tag ---------- */
.pinned-tag {
  display: inline-block;
  background: var(--accent);
  color: var(--surface-elev);
  font: 600 .68rem/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .14em;
  padding: .3rem .55rem;
  border-radius: 2px;
  transform: rotate(-1.2deg);
  margin-bottom: .55rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.18);
}

/* ---------- card grid ---------- */
.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.1rem;
}
.list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.1rem;
}
@media (max-width: 540px) {
  .board-grid, .list { grid-template-columns: 1fr; gap: .9rem; }
}

/* ---------- list-item (the pinned-paper card) ---------- */
.list-item {
  position: relative;
  background: var(--surface-elev);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1.15rem 1.05rem 1rem;
  box-shadow: var(--shadow-card);
  transition: transform .15s ease, box-shadow .15s ease;
}
.list-item::before {
  /* push-pin */
  content: "";
  position: absolute;
  top: -7px; left: 14px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--pin-red);
  box-shadow: 0 2px 3px rgba(0,0,0,.32), inset 0 -2px 3px rgba(0,0,0,.25), inset 0 1px 1px rgba(255,255,255,.4);
  z-index: 1;
}
.list-item:nth-child(4n+1)::before { background: var(--pin-red);    left: 14px; }
.list-item:nth-child(4n+2)::before { background: var(--pin-blue);   left: 18px; }
.list-item:nth-child(4n+3)::before { background: var(--pin-yellow); left: 12px; }
.list-item:nth-child(4n)::before   { background: var(--pin-green);  left: 16px; }
.list-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-lift);
}

.list-item-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .65rem;
  flex-wrap: wrap;
  margin-bottom: .35rem;
}
.list-item-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.15rem;
  line-height: 1.25;
  margin: 0;
  flex: 1 1 auto;
}
.list-item-meta {
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .04em;
  color: var(--ink-mute);
  margin: .15rem 0 .55rem;
  padding-bottom: .45rem;
  border-bottom: 1px dotted var(--rule);
}
.list-item-body {
  color: var(--ink-soft);
  font-size: .94rem;
  line-height: 1.5;
  margin: 0;
}

/* pinned variant for .list-item */
.list-item.pinned {
  background: var(--surface-pinned);
  border-color: var(--pin-yellow);
}
.list-item.pinned::before { background: var(--pin-yellow); }

/* ---------- pill ---------- */
.pill {
  display: inline-block;
  font: 500 .68rem/1.4 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ink-soft);
  background: var(--surface-sunken);
  border: 1px solid var(--rule);
  padding: .25rem .5rem;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- sticky filter bar ---------- */
.filter-bar {
  position: sticky;
  top: 64px; /* below topbar */
  z-index: 20;
  background: rgba(243,239,231,.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: .85rem 1rem;
  margin: 0 0 1.4rem;
  box-shadow: 0 2px 6px -4px rgba(0,0,0,.12);
}
.filter-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: .6rem;
  align-items: center;
}
.filter-row input[type="search"],
.filter-row select {
  font: 400 .92rem/1 var(--font-sans);
  padding: .55rem .7rem;
  background: var(--surface-elev);
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  color: var(--ink);
  min-width: 0;
}
.filter-row input[type="search"]:focus,
.filter-row select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200,54,45,.18);
}
.filter-row .primary {
  font: 500 .9rem/1 var(--font-sans);
  background: var(--ink);
  color: var(--surface-elev);
  border: 1px solid var(--ink);
  padding: .58rem .95rem;
  border-radius: 4px;
  cursor: pointer;
}
.filter-row .primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}
@media (max-width: 640px) {
  .filter-row { grid-template-columns: 1fr; }
}

/* ---------- counts ribbon (forum/events) ---------- */
.counts-ribbon {
  display: flex; flex-wrap: wrap; gap: 1.6rem;
  padding: .55rem 0 1.2rem;
  margin-bottom: 1.4rem;
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.counts-ribbon span strong {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--ink);
  letter-spacing: 0;
  text-transform: none;
  margin-right: .4rem;
  vertical-align: -2px;
}

/* ---------- event-tear-strip ---------- */
.event-tear {
  position: relative;
  background: var(--surface-elev);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.4rem 1.6rem 1.6rem;
  margin: 1.4rem 0 2rem;
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.6rem;
  align-items: center;
}
.event-tear::after {
  /* scissor-cut dashed strip */
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: calc(100% - 8.5rem);
  border-left: 2px dashed var(--rule-strong);
}
.event-tear h2 {
  font-size: 1.4rem;
  margin: 0 0 .4rem;
}
.event-tear p { margin: 0; color: var(--ink-soft); }
.event-tear .event-tear-tab {
  text-align: center;
  padding: 0 .6rem 0 1.6rem;
}
.event-tear .event-tear-tab strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 2.4rem;
  line-height: 1;
  color: var(--accent);
  margin-bottom: .25rem;
}
.event-tear .event-tear-tab span {
  font-family: var(--font-mono);
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--ink-mute);
}
@media (max-width: 640px) {
  .event-tear { grid-template-columns: 1fr; padding: 1.2rem; gap: .9rem; }
  .event-tear::after { display: none; }
  .event-tear .event-tear-tab { text-align: left; padding: 0; border-top: 1px dashed var(--rule-strong); padding-top: .8rem; }
}

/* ---------- feature project card (home) ---------- */
.feature {
  background: var(--surface-elev);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.6rem 1.6rem 1.8rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1.3fr;
  gap: 1.8rem;
  align-items: center;
}
.feature-art {
  min-height: 200px;
  background:
    repeating-linear-gradient(45deg, var(--surface-sunken) 0 14px, var(--surface) 14px 28px),
    var(--surface);
  border: 1px solid var(--rule);
  border-radius: 4px;
  position: relative;
}
.feature-art::after {
  content: "MAP / PLAN";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font: 500 .8rem/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--ink-mute);
  background: var(--surface-elev);
  padding: .35rem .7rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
}
@media (max-width: 720px) {
  .feature { grid-template-columns: 1fr; }
}

/* ---------- footer ---------- */
.footer {
  margin: 3rem 0 0;
  padding: 1.4rem 0;
  border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  color: var(--ink-mute);
  font-size: .88rem;
}
.footer a { color: var(--ink-soft); }

/* ---------- staging banner (injected) ---------- */
#staging-banner {
  font-family: var(--font-mono) !important;
}

/* ---------- plan page ---------- */
.plan-board {
  background: var(--surface-elev);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 1.1rem 1.1rem 1.4rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 1.6rem;
}
.plan-board svg { width: 100%; height: auto; display: block; }

.lane-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.6rem 0;
}
.lane {
  background: var(--surface-elev);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1rem 1rem 1.1rem;
  box-shadow: var(--shadow-card);
}
.lane h3 {
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--ink-mute);
  margin: 0 0 .8rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--rule);
}
.lane.lane-done h3   { color: var(--pin-green); }
.lane.lane-now h3    { color: var(--accent); }
.lane.lane-next h3   { color: var(--pin-blue); }
.lane ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .55rem; }
.lane li {
  font-size: .92rem;
  color: var(--ink-soft);
  padding-left: 1.2rem;
  position: relative;
  line-height: 1.45;
}
.lane li::before {
  content: "";
  position: absolute;
  left: 0; top: .45rem;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ink-mute);
}
.lane.lane-done li::before { background: var(--pin-green); }
.lane.lane-now li::before  { background: var(--accent); }
.lane.lane-next li::before { background: var(--pin-blue); }
@media (max-width: 720px) {
  .lane-grid { grid-template-columns: 1fr; }
}

/* ---------- empty state ---------- */
.empty {
  background: var(--surface-elev);
  border: 1px dashed var(--rule-strong);
  border-radius: 4px;
  padding: 1.2rem;
  color: var(--ink-mute);
  text-align: center;
  font-style: italic;
}

/* ---------- helpers ---------- */
.meta {
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--ink-mute);
  letter-spacing: .02em;
}
.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;
}
.local-only {
  background: var(--surface-elev);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 2rem;
  margin: 4rem auto;
  max-width: 480px;
  text-align: center;
}

/* ---------- index hero pinned snippet ---------- */
.hero-stamp {
  position: absolute;
  bottom: 12px; right: 14px;
  font-family: var(--font-mono);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--ink-mute);
  background: var(--surface);
  padding: .2rem .45rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  transform: rotate(2deg);
}
