/* English Mountain Network: colours taken from the emblem
   (pine, weathered wood, cream lettering, sunrise gold, Tennessee red). */
:root {
  --pine-900: #142a1d;
  --pine-800: #1e3d2a;
  --pine-700: #2a5238;
  --moss: #4f7a4a;
  --bark: #5a3a22;
  --bark-light: #8a5a33;
  --gold: #e9a321;
  --gold-dark: #b97c0c;
  --tn-red: #c8102e;

  --bg: #f6f0e3;
  --surface: #fffaf0;
  --surface-2: #f1e8d6;
  --text: #24211c;
  --muted: #6f675b;
  --border: #e0d3ba;
  --link: #2a5238;
  --accent: #2a5238;
  --accent-text: #fffaf0;
  --warn-bg: #fbe3d4;
  --warn-text: #8a2b0c;
  --shadow: 0 1px 2px rgba(60, 40, 20, .08), 0 4px 14px rgba(60, 40, 20, .08);

  --font-head: "Bitter", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 10px;
  --gutter: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121a15;
    --surface: #1a241d;
    --surface-2: #213026;
    --text: #ece4d2;
    --muted: #a59c8b;
    --border: #2f3d33;
    --link: #a8d49a;
    --accent: #6fa865;
    --accent-text: #0f1a12;
    --warn-bg: #3d2416;
    --warn-text: #f3b48f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 14px rgba(0, 0, 0, .3);
  }
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex; flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 var(--font-body);
}
main { flex: 1; }
a { color: var(--link); text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; color: var(--text); }
h1 { font-size: clamp(1.5rem, 4vw, 2rem); margin: .3rem 0 1rem; }
h2 { font-size: 1.25rem; margin: 1.6rem 0 .7rem; }
h3 { font-size: 1.08rem; margin: .6rem 0 .3rem; }
code { font-size: .9em; }
img { max-width: 100%; height: auto; }
.muted { color: var(--muted); }
.lead { font-size: 1.15rem; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link { position: absolute; left: -999px; top: 0; background: var(--gold); color: #000; padding: .5rem 1rem; z-index: 100; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Buttons ---------- */
button, .button {
  display: inline-block;
  padding: .6rem 1.15rem;
  font: 600 1rem/1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
}
button:hover, .button:hover { filter: brightness(1.08); }
.button-gold { background: var(--gold); color: #2a1a05; }
.button-ghost { background: transparent; color: #fffaf0; border-color: rgba(255, 250, 240, .75); }
.link-button { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; border-radius: 0; }

/* ---------- Header & navigation ---------- */
.site-header {
  background: linear-gradient(180deg, var(--pine-800), var(--pine-900));
  border-bottom: 4px solid var(--bark);
  color: #f6f0e3;
  position: sticky; top: 0; z-index: 1000;
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 1rem;
  padding: .35rem var(--gutter);
}
.brand { display: block; flex: none; line-height: 0; }
.brand img { height: 58px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 1rem; flex: 1; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .2rem; }
.nav-account { margin-left: auto !important; }
.site-nav a, .site-nav .link-button {
  display: block; padding: .45rem .7rem; border-radius: 6px;
  color: #f6f0e3; text-decoration: none; font-weight: 600; font-size: .98rem;
}
.site-nav a:hover, .site-nav .link-button:hover { background: rgba(255, 255, 255, .08); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--gold); border-radius: 6px 6px 0 0; }
.site-nav .button-gold { color: #2a1a05; padding: .4rem 1rem; border-radius: 999px; }
.site-nav .button-gold:hover { background: var(--gold); }
.site-nav form { margin: 0; }
.nav-user { max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400 !important; opacity: .85; }

.nav-toggle {
  display: none; margin-left: auto;
  width: 46px; height: 46px; padding: 0;
  background: transparent; border: 2px solid rgba(255, 250, 240, .35); border-radius: 8px;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 22px; height: 2px; margin: 0 auto; background: #f6f0e3; position: relative;
  transition: transform .2s, opacity .2s;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .brand img { height: 50px; }
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--pine-900);
    border-bottom: 4px solid var(--bark);
    padding: .5rem var(--gutter) 1rem;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
  }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; align-items: stretch; }
  .nav-account { margin: .5rem 0 0 !important; padding-top: .5rem !important; border-top: 1px solid rgba(255, 255, 255, .15); }
  .site-nav a, .site-nav .link-button { padding: .75rem .5rem; font-size: 1.05rem; width: 100%; text-align: left; }
  .site-nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--gold); border-radius: 0; }
  .site-nav .button-gold { text-align: center !important; margin-top: .4rem; }
  .nav-user { max-width: none; }
}

/* ---------- Messages ---------- */
.messages { list-style: none; margin: 0 auto; padding: .8rem var(--gutter) 0; width: 100%; max-width: 1100px; }
.messages li + li { margin-top: .4rem; }
.messages li { padding: .6rem .9rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--gold); }

/* ---------- Layout ---------- */
.page { width: 100%; max-width: 1100px; margin: 0 auto; padding: 1rem var(--gutter) 2.5rem; }
.page.wide { max-width: 1500px; }
.page.narrow { max-width: 480px; }
.two-col { display: grid; grid-template-columns: minmax(260px, 1fr) 1.4fr; gap: 1.5rem; align-items: start; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }
.crumbs { margin: .4rem 0 0; font-size: .92rem; color: var(--muted); }
.home-head { display: flex; align-items: baseline; gap: .4rem 1rem; flex-wrap: wrap; }
.home-head h1 { margin-bottom: .3rem; }
.home-head p { margin: 0; }
.hint { color: var(--muted); margin: .4rem 0 .7rem; }

/* ---------- Home: hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(1.5rem, 5vw, 3rem) var(--gutter) clamp(4.5rem, 10vw, 7rem);
  text-align: center; color: #fffaf0;
}
.hero-sky {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 45% at 50% 30%, rgba(233, 163, 33, .55), transparent 70%),
    linear-gradient(180deg, #24435a 0%, #3e6a6e 38%, #c98a3d 78%, #e9a321 100%);
}
.hero-ridges { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 55%; }
.ridge-far { fill: #4e6f63; opacity: .85; }
.ridge-mid { fill: #2f5a40; }
.ridge-near { fill: var(--pine-800); }
.hero-content { position: relative; max-width: 820px; margin: 0 auto; }
.hero-logo { width: min(760px, 92vw); filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .35)); }
.hero-mission {
  font-family: var(--font-head); font-weight: 500;
  font-size: clamp(1.05rem, 2.6vw, 1.35rem); line-height: 1.45;
  max-width: 40rem; margin: 1rem auto 1.4rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .55);
}
.hero-actions { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }
.hero-actions .button { padding: .75rem 1.4rem; font-size: 1.05rem; }
.home > .page { padding-top: .5rem; }
.welcome { margin: 0 0 .5rem; color: var(--muted); }

/* ---------- Home: section cards ---------- */
.section-heading {
  font-size: 1.35rem; margin: 2rem 0 1rem;
  display: flex; align-items: center; gap: .7rem;
}
.section-heading::after { content: ""; flex: 1; height: 2px; background: linear-gradient(90deg, var(--bark-light), transparent); opacity: .5; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.card {
  display: flex; gap: .9rem; align-items: flex-start;
  padding: 1.1rem 1.1rem 1.2rem;
  background: var(--surface); color: var(--text); text-decoration: none;
  border: 1px solid var(--border); border-top: 4px solid var(--moss);
  border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(60, 40, 20, .16); }
.card-soon { border-top-color: var(--bark-light); }
.card-body { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; }
.card .tag { margin-left: 0; }
.card-title { font-family: var(--font-head); font-weight: 700; font-size: 1.12rem; }
.card-text { color: var(--muted); font-size: .98rem; }
.card-icon {
  flex: none; display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--pine-800); color: var(--gold);
}
.card-icon-lg { width: 72px; height: 72px; border-radius: 18px; }
.card-icon-lg .icon { width: 38px; height: 38px; }
.icon { width: 26px; height: 26px; }

/* ---------- Home: pillars & join ---------- */
.pillar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.4rem; }
.pillar { padding: .2rem 0; }
.pillar p { margin: 0; color: var(--muted); }
.pillar-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--surface-2); color: var(--bark-light); }
@media (prefers-color-scheme: dark) { .pillar-icon { color: var(--gold); } }
.join-panel {
  margin-top: 2.5rem; padding: 1.6rem var(--gutter);
  text-align: center; border-radius: var(--radius);
  background: var(--surface-2); border: 1px dashed var(--bark-light);
}
.join-panel h2 { margin-top: 0; }

/* ---------- Coming soon ---------- */
.coming-soon { text-align: center; max-width: 560px; margin: 2rem auto; }
.coming-soon .card-icon { margin: 0 auto; }

/* ---------- Footer ---------- */
.site-footer { background: var(--pine-900); color: #d9d0bd; border-top: 4px solid var(--bark); margin-top: 2rem; }
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 1.4rem var(--gutter); font-size: .95rem; }
.footer-mission { margin: 0 0 .5rem; font-family: var(--font-head); }
.footer-meta { margin: 0; opacity: .75; }
.footer-meta a { color: inherit; }
.footer-disclaimer { margin: .8rem 0 0; padding-top: .8rem; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .85rem; opacity: .7; }
.footer-main { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.footer-text { flex: 1; min-width: 0; }
.footer-badges { display: flex; gap: 1rem; flex: none; }
.footer-badges a { display: block; line-height: 0; border-radius: 50%; transition: transform .15s; }
.footer-badges a:hover { transform: translateY(-3px) scale(1.03); }
.footer-badges img { width: 112px; height: 112px; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .45)); }
@media (max-width: 700px) {
  .footer-main { flex-direction: column-reverse; align-items: stretch; }
  .footer-badges { justify-content: center; gap: 1.4rem; }
  .footer-badges img { width: 104px; height: 104px; }
}
.nav-external .icon, .card-title .icon { width: .85em; height: .85em; margin-left: .25em; vertical-align: -.05em; }
.tag-fb { color: #1d4fa3; }
@media (prefers-color-scheme: dark) { .tag-fb { color: #8fb3ff; } }

/* ---------- Forms ---------- */
input[type=search], input[type=text], input[type=email], input[type=password], input[type=tel], textarea, select {
  width: 100%; padding: .6rem .75rem; font: inherit; font-size: 1rem;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text);
}
.tool-search { display: flex; gap: .5rem; margin: .4rem 0 .6rem; }
.tool-search input { flex: 1; min-width: 0; }
.auth h1 { text-align: center; }
.auth form p, .auth form div { margin: 0 0 .9rem; }
.auth label { display: block; font-weight: 600; margin-bottom: .25rem; }
.auth .helptext, .auth ul.errorlist, .auth form ul { font-size: .88rem; color: var(--muted); }
.auth form ul { margin: .4rem 0 0; padding-left: 1.1rem; }
.auth ul.errorlist { color: var(--tn-red); padding-left: 1rem; }
.auth button[type=submit] { width: 100%; padding: .75rem; }
.auth input[type=checkbox] { width: auto; }

/* ---------- Data (property map) ---------- */
.map { height: 420px; border: 1px solid var(--border); border-radius: var(--radius); }
.map-tall { height: calc(100vh - 250px); min-height: 380px; }
@media (max-width: 800px) { .map { height: 340px; } .map-tall { height: calc(100vh - 260px); } }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); }
th, td { text-align: left; padding: .5rem .65rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: .85rem; color: var(--muted); font-weight: 600; background: var(--surface-2); white-space: nowrap; }
tbody tr:nth-child(even) { background: color-mix(in srgb, var(--surface-2) 45%, var(--surface)); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.retired, section.retired { opacity: .6; }
.count { color: var(--muted); font-weight: 400; font-size: .95rem; }
.tag {
  display: inline-block; padding: .05rem .5rem; margin-left: .3rem;
  font: 600 .72rem/1.5 var(--font-body); letter-spacing: .02em; vertical-align: middle;
  border-radius: 999px; background: var(--surface-2); color: var(--bark-light); border: 1px solid var(--border);
}
@media (prefers-color-scheme: dark) { .tag { color: var(--gold); } }
.tag.warn { background: var(--warn-bg); color: var(--warn-text); border-color: transparent; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; margin: 0; }
.facts dt { color: var(--muted); font-size: .92rem; }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts dt { margin-top: .55rem; }
}
.record { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .2rem 1rem 1rem; margin-top: 1rem; box-shadow: var(--shadow); }
.record h2 { margin-top: .9rem; }

/* ---------- Shared page bits ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: .8rem 1.5rem; flex-wrap: wrap; margin-bottom: .6rem; }
.page-head h1 { margin-bottom: .2rem; }
.page-head p { margin: 0; }
.page-head-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.button-outline { background: transparent; color: var(--link); border-color: currentColor; }
.button-block { display: block; width: 100%; text-align: center; }
.button-danger { background: transparent; color: var(--tn-red); border-color: currentColor; }
@media (prefers-color-scheme: dark) { .button-danger { color: #ff8a8a; } }
.notice { padding: .7rem 1rem; border-radius: var(--radius); background: var(--warn-bg); color: var(--warn-text); }
.empty-state { text-align: center; padding: 2.5rem 1rem; }
.empty-state .card-icon { margin: 0 auto .5rem; }
.empty-state h2 { margin: .6rem 0 .3rem; }
.pager { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 1.5rem; }
.tag-live { color: var(--moss); }

/* ---------- Marketplace: browse ---------- */
.filter-bar { display: grid; grid-template-columns: 2fr 1fr 1fr auto auto; gap: .5rem; align-items: center; margin: 1rem 0 1.2rem; }
.filter-clear { white-space: nowrap; }
@media (max-width: 760px) {
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .filter-bar input[type=search] { grid-column: 1 / -1; }
  .filter-bar button { grid-column: 1 / -1; }
  .filter-clear { grid-column: 1 / -1; text-align: center; }
}
.listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
@media (max-width: 520px) { .listing-grid { grid-template-columns: 1fr 1fr; gap: .7rem; } }
.listing-card {
  display: flex; flex-direction: column;
  background: var(--surface); color: var(--text); text-decoration: none;
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
}
.listing-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(60, 40, 20, .16); }
.listing-thumb { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); display: block; }
.listing-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.listing-thumb-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--bark-light); opacity: .5; }
.listing-thumb-empty .icon { width: 44px; height: 44px; }
.listing-kind, .listing-kind-inline {
  font: 700 .72rem/1 var(--font-body); letter-spacing: .05em; text-transform: uppercase;
  padding: .35rem .55rem; border-radius: 999px; color: #fff;
}
.listing-kind { position: absolute; top: .5rem; left: .5rem; }
.listing-kind-inline { display: inline-block; background: var(--pine-700); }
.kind-wanted { background: var(--bark-light); }
.kind-free { background: var(--moss); }
.listing-info { display: flex; flex-direction: column; gap: .15rem; padding: .65rem .8rem .8rem; }
.listing-price { font: 700 1.1rem/1.2 var(--font-head); color: var(--pine-700); }
@media (prefers-color-scheme: dark) { .listing-price, .listing-price-lg { color: var(--gold) !important; } }
.listing-title { font-weight: 600; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.listing-meta { color: var(--muted); font-size: .88rem; }
.listing-info .tag { margin: .35rem 0 0; align-self: flex-start; }

/* ---------- Marketplace: listing page ---------- */
.listing-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 1.6rem; align-items: start; margin-top: .6rem; }
@media (max-width: 820px) { .listing-layout { grid-template-columns: 1fr; } }
.gallery-main { width: 100%; max-height: 70vh; object-fit: contain; background: #0d120f; border-radius: var(--radius); display: block; }
.gallery-thumbs { display: flex; gap: .5rem; margin-top: .5rem; overflow-x: auto; padding-bottom: .2rem; }
.gallery-thumb { flex: none; padding: 0; border: 3px solid transparent; border-radius: 8px; background: none; width: 84px; overflow: hidden; }
.gallery-thumb img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery-thumb.active { border-color: var(--gold); }
.gallery-empty { aspect-ratio: 4 / 3; display: grid; place-content: center; justify-items: center; gap: .4rem; background: var(--surface-2); border-radius: var(--radius); color: var(--muted); }
.gallery-empty .icon { width: 48px; height: 48px; }
.listing-side h1 { margin: .5rem 0 .3rem; }
.listing-price-lg { font: 800 1.7rem/1.2 var(--font-head); color: var(--pine-700); margin: 0 0 .4rem; }
.listing-side .listing-meta { font-size: .95rem; }
.contact-box, .owner-box { margin-top: 1rem; padding: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.contact-box h2, .owner-box h2 { margin: 0 0 .7rem; font-size: 1.08rem; }
.contact-box p { margin: .5rem 0 0; }
.contact-box .button { overflow-wrap: anywhere; }
.owner-box .muted { margin: -.3rem 0 .7rem; font-size: .92rem; }
.owner-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.owner-actions form { margin: 0; }
.listing-description { max-width: 46rem; }
.listing-description p { overflow-wrap: anywhere; }

/* ---------- Forms (listing form) ---------- */
.form-page { max-width: 720px; }
.listing-form fieldset { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: .6rem 1.1rem 1rem; margin: 0 0 1.1rem; }
.listing-form legend { font: 700 1.05rem var(--font-head); padding: 0 .4rem; }
.listing-form fieldset[hidden] { display: none; }
.field { margin: .75rem 0 0; }
.field label, .field .label { display: block; font-weight: 600; margin-bottom: .3rem; }
.optional { font-weight: 400; font-size: .85rem; color: var(--muted); }
.helptext { font-size: .88rem; color: var(--muted); margin: .3rem 0 0; }
.field-error, .form-errors { color: var(--tn-red); font-size: .92rem; margin: .3rem 0 0; }
@media (prefers-color-scheme: dark) { .field-error, .form-errors { color: #ff8a8a; } }
.form-errors { padding: .6rem 1rem; border: 1px solid currentColor; border-radius: var(--radius); margin-bottom: 1rem; }
.form-errors p { margin: 0; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--tn-red); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }
.checkbox-field label { display: flex; gap: .6rem; align-items: flex-start; font-weight: 600; }
.checkbox-field .muted { display: block; font-weight: 400; font-size: .9rem; overflow-wrap: anywhere; }
.checkbox-field input { flex: none; width: 1.2rem; height: 1.2rem; margin-top: .2rem; }
input[type=file] { width: 100%; padding: .6rem; border: 2px dashed var(--border); border-radius: 8px; background: var(--surface-2); font: inherit; }
input[type=number] { width: 100%; padding: .6rem .75rem; font: inherit; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); }
.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--surface-2); }
.segmented label { margin: 0; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; padding: .5rem 1.1rem; font-weight: 600; }
.segmented input:checked + span { background: var(--accent); color: var(--accent-text); }
.segmented input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: -3px; }
.photo-edit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .6rem; margin: .5rem 0; }
.photo-edit { display: block; font-weight: 400 !important; font-size: .9rem; }
.photo-edit img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; display: block; }
.photo-edit span { display: flex; gap: .3rem; align-items: center; margin-top: .25rem; }
.form-actions { display: flex; align-items: center; gap: 1.2rem; }
.form-actions button { padding: .75rem 1.6rem; font-size: 1.05rem; }

/* Membership status on the profile page */
.membership-box { padding: 1rem 1.2rem; margin: 1rem 0 1.5rem; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); }
.membership-box p { margin: .5rem 0 0; }

/* Lot checkboxes on the sign-up and profile forms */
.lot-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(4.6rem, 1fr)); gap: .3rem;
  max-height: 15rem; overflow-y: auto; padding: .5rem; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); }
.lot-picker[hidden] { display: none; }
.lot-picker label { display: flex; align-items: center; gap: .35rem; margin: 0; padding: .25rem .4rem; font-weight: 400;
  border-radius: 6px; cursor: pointer; }
.lot-picker label:has(input:checked) { background: var(--gold); color: #2a1a05; font-weight: 600; }

/* Messages: unread badge, pop-up form, inbox and conversation */
.badge { display: inline-block; min-width: 1.3em; padding: 0 .4em; border-radius: 999px; background: var(--gold);
  color: #2a1a05; font-size: .78rem; font-weight: 700; line-height: 1.4; text-align: center; vertical-align: middle; }

.message-dialog { width: min(560px, calc(100vw - 2 * var(--gutter))); padding: 1.2rem 1.3rem; border: 0;
  border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.message-dialog::backdrop { background: rgba(20, 30, 22, .55); }
.message-dialog h2 { margin-top: 0; }
.message-dialog textarea { margin: .4rem 0 1rem; }

.conversation-list { list-style: none; margin: 1rem 0; padding: 0; display: grid; gap: .6rem; }
.conversation-row { display: grid; gap: .2rem; padding: .8rem 1rem; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: inherit; text-decoration: none; }
.conversation-row:hover { border-color: var(--gold); }
.conversation-row.unread { border-left: 4px solid var(--gold); }
.conversation-head { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; }
.conversation-time { margin-left: auto; font-size: .9rem; }
.conversation-title { font-weight: 600; }

.thread { list-style: none; margin: 1.2rem 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.bubble { max-width: 85%; padding: .6rem .85rem; border-radius: 14px 14px 14px 4px; background: var(--surface-2); }
.bubble.mine { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: var(--pine-700); color: #fffaf0; }
.bubble-meta { display: block; font-size: .8rem; opacity: .75; margin-bottom: .15rem; }
.reply-form label { display: block; font-weight: 600; margin-bottom: .3rem; }
.reply-form textarea { margin-bottom: .8rem; }

/* Property Rights & Resources */
.subnav { display: flex; flex-wrap: wrap; gap: .3rem; margin: .4rem 0 1.2rem; padding-bottom: .6rem; border-bottom: 1px solid var(--border); }
.subnav a { padding: .3rem .75rem; border-radius: 999px; text-decoration: none; color: var(--link); }
.subnav a[aria-current="page"] { background: var(--pine-700); color: #fffaf0; }
.resources-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 2rem; }
.post-card { display: grid; gap: .15rem; padding: .7rem 0; border-bottom: 1px solid var(--border); }
.post-card p { margin: .2rem 0 0; }
.prose { max-width: 70ch; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin: .25rem 0; }
.event-list { list-style: none; margin: .5rem 0 1rem; padding: 0; display: grid; gap: .6rem; }
.event-list.past { opacity: .75; }
.event-row { display: flex; gap: .8rem; align-items: flex-start; }
.event-date { flex: none; width: 3.2rem; text-align: center; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); overflow: hidden; }
.event-month { display: block; background: var(--pine-700); color: #fffaf0; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.event-day { display: block; font-family: var(--font-head); font-size: 1.35rem; font-weight: 700; line-height: 1.6; }
.event-body { display: grid; gap: .15rem; }
.event-text, .doc-text { display: block; margin-top: .15rem; }
.pill-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.pill-list a { display: inline-block; padding: .35rem .8rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); text-decoration: none; }
.doc-list { list-style: none; padding: 0; display: grid; gap: .7rem; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .8rem; }
.contact-card { display: grid; gap: .2rem; padding: .8rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.tool-search select { width: auto; }
.pager { display: flex; gap: 1.5rem; }
