/*
 * Trail Map design system.
 * Spec: docs/superpowers/specs/2026-09-27-trail-map-landing-and-directory-design.md (R836).
 *
 * Linked from templates/base.html, so it loads on every portal page. Every
 * selector carries a tm- class so none of these rules can match portal
 * markup; tests/test_trail_css.py fails the build otherwise.
 *
 * Fonts are NOT imported here: this file loads on every portal page, and
 * only the landing page and the directory frame use Young Serif / Figtree.
 * Each of those links the Google Fonts stylesheet itself.
 */

:root {
  --tm-paper: #f3ecdc;
  --tm-card: #fbf8f1;
  --tm-ink: #22301f;
  --tm-muted: #4d5a48;
  --tm-faint: #5f6958;
  --tm-moss: #3d5a30;
  --tm-moss-dark: #2f4a25;
  --tm-rust: #a8492a;
  --tm-rust-dark: #83361c;
  --tm-ochre: #c98a2b;
  --tm-gold: #e0b25a;
  --tm-line: #dccfb2;
  --tm-chip: #b9ad92;
  --tm-map: #e9f0de;
  --tm-note: #ebe2cf;
  --tm-forest-2: #2c3d28;
  --tm-on-dark: #c9cfbd;
  --tm-pin-camp: #3d5a30;
  --tm-pin-community: #a8492a;
  --tm-pin-person: #6b4e9b;
  --tm-pin-service: #2f6f73;
  --tm-serif: "Young Serif", Georgia, "Times New Roman", serif;
  --tm-sans: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* The humanist front door's Lamplight palette (spec 2026-09-28 front
   doors, R924). Redefines colour tokens only; the pin tokens are left
   alone so a pin means the same thing on both sites. */
.tm-door-humanist {
  --tm-paper: #efe9df;
  --tm-card: #faf7f2;
  --tm-ink: #1d2636;
  --tm-muted: #4a5366;
  --tm-faint: #5a6275;
  --tm-line: #d9cfbf;
  --tm-moss: #2e4a6e;
  --tm-moss-dark: #243b58;
  --tm-rust: #9c4f1d;
  --tm-rust-dark: #7e3f17;
  --tm-gold: #e8b45c;
  --tm-map: #e3e7ee;
  --tm-note: #e6ded0;
  --tm-forest-2: #1f2d44;
  --tm-on-dark: #c3cbd9;
}

/* ── Page base ─────────────────────────────────────────────── */
.tm-page {
  background: var(--tm-paper);
  color: var(--tm-ink);
  font-family: var(--tm-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.tm-page h1, .tm-page h2, .tm-page h3, .tm-display {
  font-family: var(--tm-serif);
  font-weight: 400;
  text-wrap: balance;
}
:where(.tm-page) :is(h1, h2, h3) { margin: 0; }
:where(.tm-page) p { margin: 0; text-wrap: pretty; }
.tm-page :focus-visible { outline: 3px solid var(--tm-ochre); outline-offset: 3px; }
.tm-wrap { max-width: 1200px; margin: 0 auto; padding-inline: clamp(16px, 5vw, 40px); }
.tm-eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--tm-rust);
}
.tm-link { color: var(--tm-rust); font-weight: 700; text-decoration: none; }
.tm-link:hover { color: var(--tm-rust-dark); text-decoration: underline; }

/* ── Buttons ───────────────────────────────────────────────── */
.tm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 24px;
  border: 0;
  border-radius: 999px;
  font: 700 16px/1.2 var(--tm-sans);
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.tm-btn-moss { background: var(--tm-moss); color: #fff; }
.tm-btn-moss:hover { background: var(--tm-moss-dark); color: #fff; }
.tm-btn-line { background: transparent; border: 1.5px solid var(--tm-ink); color: var(--tm-ink); }
.tm-btn-line:hover { background: var(--tm-ink); color: var(--tm-paper); }
.tm-btn-gold { background: var(--tm-gold); color: var(--tm-ink); }
.tm-btn-gold:hover { background: #ebc274; color: var(--tm-ink); }
.tm-btn-ghost-light { background: transparent; border: 1.5px solid rgba(243, 236, 220, .5); color: var(--tm-paper); }
.tm-btn-ghost-light:hover { background: rgba(243, 236, 220, .1); color: var(--tm-paper); }
.tm-btn-card { background: var(--tm-card); color: var(--tm-ink); }
.tm-btn-card:hover { background: #fff; color: var(--tm-ink); }

/* ── Outlined card and chips ───────────────────────────────── */
.tm-card {
  background: var(--tm-card);
  border: 1.5px solid var(--tm-ink);
  border-radius: 20px;
  box-shadow: 8px 8px 0 var(--tm-ink);
}
.tm-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1.5px solid var(--tm-chip);
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
}

/* ── Nav (landing page and, in PR 2, the directory frame) ──── */
.tm-nav { border-bottom: 1px solid var(--tm-line); background: var(--tm-paper); }
.tm-nav .tm-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-block: 18px; }
.tm-brand { display: flex; align-items: center; gap: 10px; color: var(--tm-ink); text-decoration: none; font-weight: 700; font-size: 19px; }
.tm-brand:hover { color: var(--tm-ink); }
.tm-nav-links { display: flex; align-items: center; gap: 28px; font-weight: 600; font-size: 15px; }
.tm-nav-links a:not(.tm-btn) { color: var(--tm-ink); text-decoration: none; }
.tm-nav-links a:not(.tm-btn):hover { color: var(--tm-rust); }
.tm-nav-links .tm-btn { min-height: 40px; padding: 8px 18px; font-size: 15px; }
.tm-nav-toggle { border: 1.5px solid var(--tm-ink); border-radius: 10px; min-width: 44px; min-height: 44px; }
@media (max-width: 991.98px) {
  .tm-nav-panel {
    flex-basis: 100%;
    background: var(--tm-paper);
    border-top: 1px solid var(--tm-line);
    margin-top: 8px;
  }
  .tm-nav-links { flex-direction: column; align-items: stretch; gap: 4px; padding-block: 12px; }
  .tm-nav-links a:not(.tm-btn) { display: block; padding: 12px 4px; }
  .tm-nav-links .tm-btn { margin-top: 8px; }
}

/* ── Footer ────────────────────────────────────────────────── */
.tm-footer { border-top: 1.5px solid var(--tm-ink); }
.tm-footer .tm-wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; padding-block: 32px; font-size: 14px; color: var(--tm-muted); }
.tm-footer-links { display: flex; flex-wrap: wrap; gap: 24px; font-weight: 600; }
.tm-footer-links a { color: var(--tm-ink); text-decoration: none; }
.tm-footer-links a:hover { color: var(--tm-rust); }

/* ── Motion ────────────────────────────────────────────────── */
@keyframes tm-march { to { stroke-dashoffset: -36; } }
@keyframes tm-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.tm-trail { stroke-dasharray: 2 7; stroke-linecap: round; animation: tm-march 3s linear infinite; }
.tm-pin { transform-box: fill-box; animation: tm-bob 3.2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .tm-trail, .tm-pin { animation: none; }
}

/* ── Landing page (templates/marketing/home.html) ──────────── */
.tm-hero { position: relative; overflow: hidden; }
.tm-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.tm-hero .tm-wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 11fr) minmax(0, 13fr);
  gap: 64px;
  align-items: start;
  padding-block: 88px 96px;
}
.tm-hero-copy { display: flex; flex-direction: column; gap: 26px; }
.tm-hero-copy .tm-eyebrow { display: flex; align-items: center; gap: 8px; }
.tm-hero h1 { font-size: clamp(44px, 6vw, 80px); line-height: 1.02; letter-spacing: -.01em; }
.tm-hero h1 .tm-accent { color: var(--tm-rust); }
.tm-lead { font-size: clamp(18px, 2vw, 20px); line-height: 1.6; color: var(--tm-muted); }
.tm-count { font-size: 15px; color: var(--tm-faint); }
.tm-row { display: flex; flex-wrap: wrap; gap: 12px; }

.tm-how { background: var(--tm-card); border-block: 1.5px solid var(--tm-ink); }
.tm-how .tm-wrap { padding-block: 100px; display: flex; flex-direction: column; gap: 56px; }
.tm-how h2 { font-size: clamp(36px, 4.5vw, 56px); line-height: 1.05; text-align: center; }
.tm-steps { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.tm-steps-trail { position: absolute; left: 12%; top: 18px; width: 76%; height: 40px; }
.tm-step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.tm-step-num {
  width: 76px; height: 76px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--tm-serif); font-size: 32px;
  border: 5px solid var(--tm-card);
}
.tm-step-num-1 { background: var(--tm-moss); color: var(--tm-card); }
.tm-step-num-2 { background: var(--tm-ochre); color: var(--tm-ink); }
.tm-step-num-3 { background: var(--tm-rust); color: var(--tm-card); }
.tm-step h3 { font-size: 26px; }
.tm-step p { font-size: 16px; line-height: 1.6; color: var(--tm-muted); max-width: 320px; }

.tm-why { position: relative; overflow: hidden; text-align: center; }
.tm-why-rings { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 1440px; max-width: none; height: 520px; pointer-events: none; }
.tm-why .tm-wrap { position: relative; max-width: 1000px; padding-block: 110px; display: flex; flex-direction: column; align-items: center; gap: 26px; }
.tm-why h2.tm-eyebrow { font-family: var(--tm-sans); font-weight: 700; }
.tm-why-quote { font-family: var(--tm-serif); font-size: clamp(24px, 3vw, 34px); line-height: 1.4; text-wrap: balance; }
.tm-why-after { font-size: clamp(17px, 2vw, 20px); line-height: 1.6; color: var(--tm-muted); }

.tm-map-card {
  background: var(--tm-card);
  border: 1.5px solid var(--tm-ink);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 10px 10px 0 var(--tm-ink);
}
.tm-map-card-head {
  display: block;
  padding: 16px 18px;
  border-bottom: 1.5px solid var(--tm-ink);
  background: var(--tm-paper);
  color: var(--tm-ink);
  font-weight: 700;
  text-decoration: none;
}
.tm-map-card-head:hover { color: var(--tm-rust); }
.tm-map-live { height: 420px; }
.tm-map-illustration { background: var(--tm-map); aspect-ratio: 640 / 420; max-width: 100%; }
.tm-map-illustration svg { display: block; width: 100%; height: 100%; }
.tm-map-caption { padding: 12px 18px; border-top: 1.5px solid var(--tm-ink); font-size: 14px; color: var(--tm-muted); }
.tm-map-note { margin-top: 22px; font-size: 14px; }

.tm-org { background: var(--tm-ink); color: var(--tm-paper); }
.tm-org .tm-wrap { padding-block: 100px 110px; display: flex; flex-direction: column; gap: 48px; }
.tm-org-head { display: flex; flex-direction: column; gap: 18px; max-width: 820px; }
.tm-org h2 { font-size: clamp(36px, 4.5vw, 60px); line-height: 1.04; }
.tm-org-head p { font-size: 18px; line-height: 1.6; color: var(--tm-on-dark); }
.tm-badge {
  align-self: flex-start;
  font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--tm-ink); background: var(--tm-gold);
  padding: 6px 14px; border-radius: 999px;
}
.tm-feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tm-feat { background: var(--tm-forest-2); border-radius: 18px; padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.tm-feat strong { font-family: var(--tm-serif); font-weight: 400; font-size: 22px; }
.tm-feat span { font-size: 15px; color: var(--tm-on-dark); }
.tm-all-feats { border-top: 1px solid rgba(243, 236, 220, .18); padding-top: 28px; }
.tm-all-feats summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  border-radius: 999px; border: 1.5px solid rgba(243, 236, 220, .5);
  font-weight: 700; color: var(--tm-paper);
}
.tm-all-feats summary::-webkit-details-marker { display: none; }
.tm-all-feats summary:hover { background: rgba(243, 236, 220, .1); }
.tm-all-feats .tm-chev { transition: transform .2s; }
.tm-all-feats[open] .tm-chev { transform: rotate(180deg); }
.tm-groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px; margin-top: 40px; }
.tm-group h3 { font-size: 22px; color: var(--tm-gold); padding-bottom: 12px; border-bottom: 1.5px dashed rgba(224, 178, 90, .45); margin-bottom: 6px; }
.tm-group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tm-group li { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-bottom: 1px solid rgba(243, 236, 220, .1); }
.tm-group li b { font-weight: 700; font-size: 15px; }
.tm-group li span { font-size: 14px; line-height: 1.5; color: var(--tm-on-dark); }

.tm-story .tm-wrap { padding-block: 110px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 90px; align-items: center; }
.tm-note-card {
  margin: 0;
  background: var(--tm-card);
  border: 1.5px solid var(--tm-ink);
  border-radius: 22px;
  box-shadow: 10px 10px 0 var(--tm-moss);
  transform: rotate(-1.5deg);
  padding: 40px;
  display: flex; flex-direction: column; gap: 24px;
}
.tm-note-card blockquote { margin: 0; font-family: var(--tm-serif); font-size: clamp(24px, 2.6vw, 32px); line-height: 1.3; }
.tm-sig { display: flex; align-items: center; gap: 14px; padding-top: 20px; border-top: 1.5px dashed var(--tm-chip); }
.tm-monogram {
  width: 52px; height: 52px; flex-shrink: 0; border-radius: 50%;
  background: var(--tm-map); border: 1.5px solid var(--tm-ink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--tm-serif); font-size: 24px; color: var(--tm-moss);
}
.tm-sig-text { display: flex; flex-direction: column; gap: 2px; }
.tm-sig-text span { font-size: 14px; color: #5c6656; }
.tm-story-copy { display: flex; flex-direction: column; gap: 20px; }
.tm-story h2 { font-size: clamp(34px, 4vw, 54px); line-height: 1.05; }
.tm-story-copy p { font-size: 18px; line-height: 1.7; color: var(--tm-muted); max-width: 62ch; }
.tm-story-copy .tm-inspired { padding: 16px 20px; border-radius: 14px; background: var(--tm-note); font-size: 15px; line-height: 1.6; }
.tm-inspired .tm-link { color: var(--tm-rust-dark); }
.tm-contact .tm-wrap { padding-block: 0 90px; }
.tm-contact-box {
  background: var(--tm-rust); color: var(--tm-card);
  border-radius: 28px; padding: clamp(36px, 6vw, 80px);
  display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center;
}
.tm-contact h2 { font-size: clamp(38px, 5vw, 60px); line-height: 1; }
.tm-contact-box p { font-size: 19px; line-height: 1.6; color: #fdf0e8; max-width: 620px; margin-top: 14px; }
.tm-contact-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.tm-addr { font-size: 14px; color: #fdf0e8; user-select: all; }
.tm-footer-brand { display: flex; flex-direction: column; gap: 8px; }

@media (max-width: 980px) {
  .tm-hero .tm-wrap { grid-template-columns: 1fr; gap: 48px; padding-block: 56px 72px; }
  .tm-feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tm-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tm-story .tm-wrap { grid-template-columns: 1fr; gap: 56px; }
  .tm-note-card { max-width: 520px; }
  .tm-contact-box { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .tm-hero-copy .tm-row .tm-btn { flex: 1 1 100%; }
  .tm-steps { grid-template-columns: 1fr; gap: 44px; }
  .tm-steps-trail { display: none; }
  .tm-how .tm-wrap, .tm-why .tm-wrap { padding-block: 72px; }
  .tm-map-card { box-shadow: 6px 6px 0 var(--tm-ink); }
  .tm-map-live { height: 300px; }
  .tm-feats, .tm-groups { grid-template-columns: 1fr; }
  .tm-groups { gap: 28px; }
  .tm-all-feats summary { width: 100%; justify-content: center; }
  .tm-org .tm-wrap { padding-block: 72px; }
  .tm-story .tm-wrap { padding-block: 72px; }
  .tm-note-card { padding: 28px; transform: rotate(-1deg); box-shadow: 6px 6px 0 var(--tm-moss); }
  .tm-org .tm-row .tm-btn { flex: 1 1 100%; }
}

/* ── Directory pages (templates/directory/*, spec R843-R848) ──────────── */
.tm-dir-backdrop { position: fixed; inset: 0; background: var(--tm-paper); z-index: -1; }
.tm-dir { background: transparent; overflow-x: visible; }
.tm-nav.tm-page, .tm-dir-footer.tm-page { background: var(--tm-paper); }
.tm-nav-form { margin: 0; }
.tm-nav-signout { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--tm-ink); cursor: pointer; }
.tm-nav-signout:hover { color: var(--tm-rust); }
.tm-nav-links a[aria-current="page"] { color: var(--tm-rust); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.tm-dir-footer { margin-top: 48px; }
.tm-dir-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.tm-dir-head h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1.05; }
.tm-dir-head p { font-size: 18px; color: var(--tm-muted); max-width: 60ch; }
.tm-filters { padding: 22px; display: flex; flex-direction: column; gap: 18px; }
.tm-fields { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, .7fr) minmax(0, .9fr) auto; gap: 14px; align-items: end; }
.tm-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tm-label { font-size: 13px; font-weight: 700; letter-spacing: .02em; color: var(--tm-ink); }
.tm-input { width: 100%; min-height: 48px; padding: 11px 14px; border: 1.5px solid var(--tm-chip); border-radius: 12px; background: #fff; font: 16px var(--tm-sans); color: var(--tm-ink); }
.tm-input:focus { outline: none; border-color: var(--tm-ink); box-shadow: 0 0 0 3px rgba(201, 138, 43, .35); }
.tm-input-area { min-height: 120px; resize: vertical; line-height: 1.5; }
.tm-help { font-size: 13px; color: var(--tm-faint); }
.tm-fieldset-plain { border: 0; margin: 0; padding: 0; min-width: 0; }
.tm-fieldset-plain legend { float: none; width: auto; margin: 0 0 6px; padding: 0; font-size: 13px; }
.tm-tagset { display: flex; flex-wrap: wrap; gap: 8px; }
.tm-toggle { position: relative; margin: 0; }
.tm-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tm-toggle span { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border: 1.5px solid var(--tm-chip); border-radius: 999px; background: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }
.tm-toggle input:checked + span { background: var(--tm-ink); border-color: var(--tm-ink); color: var(--tm-paper); }
.tm-toggle input:focus-visible + span { outline: 3px solid var(--tm-ochre); outline-offset: 2px; }
.tm-results { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px; margin-top: 36px; align-items: start; }
.tm-results-head { font-weight: 700; font-size: 17px; margin-bottom: 16px; }
.tm-list { display: flex; flex-direction: column; gap: 16px; }
.tm-camp { background: var(--tm-card); border: 1.5px solid var(--tm-ink); border-radius: 18px; padding: 20px; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 16px; }
.tm-mono { width: 56px; height: 56px; border-radius: 14px; border: 1.5px solid var(--tm-ink); background: var(--tm-map); display: flex; align-items: center; justify-content: center; font-family: var(--tm-serif); font-size: 22px; overflow: hidden; flex-shrink: 0; }
.tm-mono img { width: 100%; height: 100%; object-fit: cover; }
.tm-camp-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tm-camp h2 { font-size: 22px; }
.tm-camp h2 a { color: var(--tm-ink); text-decoration: none; }
.tm-camp h2 a:hover { color: var(--tm-rust); }
.tm-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; color: var(--tm-muted); }
.tm-vtags { display: flex; flex-wrap: wrap; gap: 6px; }
.tm-vtag { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #e5ecd9; color: var(--tm-moss); }
.tm-camp-desc { font-size: 15px; color: var(--tm-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tm-camp-links { display: flex; flex-wrap: wrap; gap: 18px; font-size: 14px; }
.tm-map-panel { position: sticky; top: 20px; overflow: hidden; }
.tm-dir-map { height: 520px; }
.tm-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 24px; font-size: 15px; }
.tm-newcomer-line { margin: 8px 0 0; font-size: 15px; }
.tm-newcomer-states { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 24px; }
.tm-newcomer-states li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--tm-line, rgba(0,0,0,.12)); }
.tm-newcomer-states .tm-newcomer-links { display: flex; gap: 14px; }
.tm-newcomer-card { margin-top: 24px; padding: clamp(20px, 4vw, 36px); }
.tm-newcomer-card ul { margin: 12px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.tm-empty { margin-top: 36px; padding: clamp(28px, 5vw, 56px); display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.tm-empty h2 { font-size: clamp(28px, 3.5vw, 40px); line-height: 1.1; }
.tm-empty p { font-size: 17px; color: var(--tm-muted); max-width: 52ch; }
.tm-back { display: inline-flex; margin-bottom: 24px; }
.tm-prof-head { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 28px; }
.tm-prof-head .tm-mono { width: 96px; height: 96px; border-radius: 22px; font-size: 40px; }
.tm-prof-head h1 { font-size: clamp(32px, 4.5vw, 52px); line-height: 1.05; margin-bottom: 10px; }
.tm-prof-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px; margin-top: 36px; align-items: start; }
.tm-prof-main { display: flex; flex-direction: column; gap: 32px; }
.tm-prof-main h2 { font-size: 28px; margin-bottom: 12px; }
.tm-prof-main p { font-size: 18px; line-height: 1.7; color: var(--tm-muted); max-width: 62ch; white-space: pre-line; }
.tm-values { background: var(--tm-ink); color: var(--tm-paper); border-radius: 20px; padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.tm-values h2.tm-eyebrow { font-family: var(--tm-sans); font-weight: 700; font-size: 13px; color: var(--tm-gold); margin: 0; }
.tm-values blockquote { margin: 0; font-family: var(--tm-serif); font-size: clamp(20px, 2.4vw, 26px); line-height: 1.45; white-space: pre-line; }
.tm-vtag.tm-fact { background: var(--tm-map); color: var(--tm-ink); }
.tm-first-visit { display: grid; gap: 10px; }
.tm-values .tm-vtag { background: rgba(224, 178, 90, .18); color: var(--tm-gold); }
.tm-side { display: flex; flex-direction: column; gap: 20px; }
.tm-side-card { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.tm-side-card h2 { font-size: 20px; }
.tm-dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; font-size: 15px; }
.tm-dl dt { font-weight: 700; }
.tm-dl dd { margin: 0; color: var(--tm-muted); font-variant-numeric: tabular-nums; }
.tm-side-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: var(--tm-muted); overflow-wrap: anywhere; }
.tm-side-list b { color: var(--tm-ink); }
.tm-profile-map { height: 220px; border: 1.5px solid var(--tm-ink); border-radius: 14px; overflow: hidden; }
.tm-notice { padding: 16px 18px; border-radius: 14px; background: var(--tm-note); font-size: 15px; color: var(--tm-muted); margin-bottom: 28px; }
.tm-form-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 36px; align-items: start; }
.tm-form { display: flex; flex-direction: column; gap: 28px; }
.tm-fs { margin: 0; padding: 28px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.tm-fs > legend { display: flex; align-items: center; gap: 12px; float: none; width: 100%; margin: 0 0 6px; padding: 0; font-family: var(--tm-serif); font-size: 24px; }
.tm-step-no { width: 36px; height: 36px; border-radius: 50%; background: var(--tm-moss); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-family: var(--tm-sans); font-size: 15px; font-weight: 700; flex-shrink: 0; }
.tm-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tm-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tm-req { color: var(--tm-rust-dark); }
.tm-field-error { font-size: 13px; font-weight: 700; color: #8e2a12; }
.tm-errors { padding: 18px 20px; border: 1.5px solid var(--tm-rust); border-radius: 14px; background: #fbeee8; }
.tm-errors ul { margin: 8px 0 0; padding-left: 20px; }
.tm-locs { display: flex; flex-direction: column; gap: 14px; }
.tm-loc { border: 1.5px solid var(--tm-line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 14px; background: #fff; }
.tm-remove { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--tm-muted); }
.tm-add-loc { align-self: flex-start; background: none; border: 0; padding: 8px 0; font: 700 15px var(--tm-sans); color: var(--tm-rust-dark); cursor: pointer; }
.tm-aside { position: sticky; top: 20px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.tm-aside h2 { font-size: 22px; }
.tm-aside ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 12px; font-size: 15px; color: var(--tm-muted); }
.tm-aside b { color: var(--tm-ink); }
.tm-status { padding: clamp(24px, 4vw, 40px); display: flex; flex-direction: column; gap: 20px; max-width: 820px; }
.tm-status p { font-size: 18px; color: var(--tm-muted); }
.tm-status-pill { align-self: flex-start; font-weight: 700; font-size: 14px; padding: 8px 14px; border-radius: 999px; background: #f7e3c3; color: #6b4210; }
.tm-status-pill-live { background: #e3eddc; color: #24502f; }
.tm-track { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tm-track li { display: flex; flex-direction: column; gap: 6px; padding-top: 14px; border-top: 4px solid var(--tm-line); font-size: 14px; color: var(--tm-faint); }
.tm-track li b { font-size: 16px; color: var(--tm-ink); }
.tm-track li.tm-track-done { border-top-color: var(--tm-moss); }
.tm-track li.tm-track-now { border-top-color: var(--tm-ochre); }
@media (max-width: 991.98px) {
  .tm-nav-signout { display: block; padding: 12px 4px; width: 100%; text-align: left; }
}
@media (max-width: 980px) {
  .tm-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tm-fields .tm-field-wide, .tm-fields .tm-btn { grid-column: 1 / -1; }
  .tm-results { grid-template-columns: 1fr; }
  .tm-map-panel { position: static; order: -1; }
  .tm-dir-map { height: 300px; }
  .tm-prof-grid { grid-template-columns: 1fr; }
  .tm-form-grid { grid-template-columns: 1fr; }
  .tm-aside { position: static; }
}
@media (max-width: 640px) {
  .tm-fields { grid-template-columns: 1fr; }
  .tm-camp { grid-template-columns: 44px minmax(0, 1fr); padding: 16px; gap: 12px; }
  .tm-camp .tm-mono { width: 44px; height: 44px; font-size: 18px; border-radius: 12px; }
  .tm-prof-head { grid-template-columns: 64px minmax(0, 1fr); padding: 20px; gap: 16px; }
  .tm-prof-head .tm-mono { width: 64px; height: 64px; font-size: 28px; border-radius: 16px; }
  .tm-prof-head .tm-btn { grid-column: 1 / -1; }
  .tm-two, .tm-three { grid-template-columns: 1fr; }
  .tm-fs { padding: 20px; }
  .tm-track { grid-template-columns: 1fr; }
}

/* Camp / Community label (spec 2026-09-28 listing kind, R911). */
.tm-kind { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; color: var(--tm-card); }
.tm-kind-camp { background: var(--tm-pin-camp); }
.tm-kind-community { background: var(--tm-pin-community); }
.tm-kind-person { background: var(--tm-pin-person); }
.tm-kind-service { background: var(--tm-pin-service); }

/* Map pins by kind (R912). Two classes, because leaflet.css loads after this
   file and .leaflet-div-icon sets its own background and border. */
.tm-map-pin.tm-map-pin-camp, .tm-map-pin.tm-map-pin-community { border-radius: 50%; border: 2px solid var(--tm-card); box-shadow: 0 0 0 1.5px var(--tm-ink); }
.tm-map-pin.tm-map-pin-camp { background: var(--tm-pin-camp); }
.tm-map-pin.tm-map-pin-community { background: var(--tm-pin-community); }
.tm-map-legend { display: flex; flex-wrap: wrap; gap: 16px; margin: 0; padding: 10px 18px; font-size: 14px; color: var(--tm-muted); }
.tm-map-legend .tm-map-pin { display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; }

/* ── Community calendar (spec 2026-10-09, R2071-R2079) ─────── */
.tm-cal-types { border: 0; padding: 0; margin: 12px 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.tm-cal-check { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; color: var(--tm-muted); }
.tm-cal-group { display: grid; gap: 12px; margin-bottom: 24px; }
.tm-cal-month { font-family: var(--tm-sans); font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--tm-faint); border-bottom: 1px solid var(--tm-line); padding-bottom: 6px; }
.tm-cal-event { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; padding: 14px; }
.tm-cal-date { display: grid; justify-items: center; align-content: start; border-right: 1px solid var(--tm-line); padding-right: 12px; }
.tm-cal-dow { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; color: var(--tm-rust); }
.tm-cal-day { font-family: var(--tm-serif); font-size: 30px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tm-cal-mon { font-size: 12px; color: var(--tm-faint); text-transform: uppercase; letter-spacing: .08em; }
.tm-cal-body { display: grid; gap: 4px; min-width: 0; }
.tm-cal-body h3 { font-size: 19px; }
.tm-cal-type { justify-self: start; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--tm-moss); background: var(--tm-map); border-radius: 999px; padding: 2px 9px; }
.tm-cal-org { font-size: 14px; color: var(--tm-faint); }

.tm-coming { padding-block: 40px; }
.tm-coming-head { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.tm-coming-head h2 { font-size: clamp(24px, 3vw, 30px); }
.tm-coming-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tm-coming-card { display: grid; gap: 6px; align-content: start; padding: 16px; }
.tm-coming-card h3 { font-size: 19px; }
.tm-coming-when { font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--tm-rust); }
.tm-coming-where { font-size: 14px; color: var(--tm-muted); }
@media (max-width: 767.98px) { .tm-coming-cards { grid-template-columns: 1fr; } }
.tm-cal-cover { display: block; width: 100%; max-height: 140px; object-fit: cover; border-radius: 8px; margin-bottom: 6px; }
.tm-cal-body h3 a, .tm-coming-card h3 a { color: var(--tm-ink); text-decoration: none; }
.tm-cal-body h3 a:hover, .tm-coming-card h3 a:hover { color: var(--tm-rust); text-decoration: underline; }
.tm-cal-map-note { margin: 0; padding: 0 18px 14px; font-size: 13px; color: var(--tm-faint); }
