/* Troop 444 public site — shared styles
   Layout: SOAR-familiar two-zone shell (sidebar identity box + menu, main
   content) per Troop444_Public_Homepage_Spec.md (June 2026).
   Identity: deep forest green + brass gold, slab-serif trail-sign headings,
   parchment background with faint topographic contours. (Interim tokens —
   final §5 design treatment pending Winston's token-plan sign-off.) */
@import url('https://fonts.googleapis.com/css2?family=Bitter:wght@600;700&family=Inter:wght@400;600;700&display=swap');

:root {
  --green: #1B3A2D;
  --green-2: #234A38;
  --green-deep: #152C21;
  --gold: #C6A44E;
  --gold-bright: #E8CE8B;
  --paper: #F4F1E8;
  --ink: #28302B;
  --muted: #6F7569;
  --line: #E4E0D4;
  --font: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-head: 'Bitter', Georgia, serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  background-color: var(--paper);
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="280" height="280"><g fill="none" stroke="%231B3A2D" stroke-opacity="0.045" stroke-width="1.2"><path d="M0 40 Q70 10 140 40 T280 40"/><path d="M0 90 Q70 60 140 90 T280 90"/><path d="M0 140 Q70 110 140 140 T280 140"/><path d="M0 190 Q70 160 140 190 T280 190"/><path d="M0 240 Q70 210 140 240 T280 240"/></g></svg>');
  color: var(--ink);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* ── Two-zone shell ───────────────────────────────────────────────────── */
.shell {
  flex: 1;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 26px 20px 56px;
  display: flex;
  align-items: flex-start;
  gap: 28px;
}

.main { flex: 1; min-width: 0; }

/* ── Sidebar: identity box + CMS menu ─────────────────────────────────── */
.sidebar { width: 240px; flex-shrink: 0; }

.identity {
  background: linear-gradient(160deg, var(--green) 0%, var(--green-deep) 100%);
  color: #fff;
  border: 1px solid var(--green-deep);
  border-bottom: 3px solid var(--gold);
  border-radius: 14px;
  padding: 20px 16px 18px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(27,58,45,0.12);
}
.identity img {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 2px solid rgba(198,164,78,0.55);
  background: #fff;
}
.identity .id-link { display: block; color: #fff; text-decoration: none; }
.identity .id-link:hover .id-name { text-decoration: underline; }
.identity .id-name {
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 700;
  margin-top: 8px;
}
.identity .id-sub {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.78;
  margin: 4px 0 12px;
  line-height: 1.7;
}
.identity .login {
  display: block;
  background: var(--gold);
  color: var(--green-deep);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}
.identity .login:hover { background: var(--gold-bright); }

.menu { margin-top: 18px; }
.menu .menu-head {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 12px 10px 4px;
  border-bottom: 2px solid var(--gold);
  margin-bottom: 4px;
}
.menu a {
  display: block;
  padding: 7px 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--green);
  text-decoration: none;
  border-left: 3px solid transparent;
  border-radius: 0 8px 8px 0;
}
.menu a:hover { background: rgba(27,58,45,0.07); }
.menu a.active {
  background: #fff;
  border-left-color: var(--gold);
  color: var(--green-deep);
}

/* Nested menu (N1, Aug 2026). Sub-items expand on click; the caret rotates.
   Buttons are reset to look exactly like the anchors beside them so a parent
   row and a leaf row are visually identical. */
.menu .mi-toggle-full {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 7px 10px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--green);
  text-align: left;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
}
.menu .mi-toggle-full:hover { background: rgba(27,58,45,0.07); }
.menu .mi-row { display: flex; align-items: center; }
.menu .mi-row .mi-inline { flex: 1; }
.menu .mi-toggle {
  flex: none;
  padding: 7px 10px;
  font-size: 11px;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
}
.menu .mi-caret { font-size: 11px; color: var(--muted); }
.menu .mi-toggle.open, .menu .mi-toggle-full.open .mi-caret { transform: rotate(90deg); }
.menu .mi-toggle, .menu .mi-caret { display: inline-block; transition: transform 0.15s ease; }
.menu .mi-sub[hidden] { display: none; }

/* ── Mobile bar (burger) — hidden on desktop ──────────────────────────── */
.mobile-bar {
  display: none;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-deep) 100%);
  color: #fff;
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 290;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
}
.mobile-bar img { width: 36px; height: 36px; border-radius: 50%; border: 2px solid rgba(198,164,78,0.5); background: #fff; }
.mobile-bar .mb-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.mobile-bar .mb-name { font-family: var(--font-head); font-size: 17px; font-weight: 700; }
.mobile-bar .mb-sub { font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.75; }
.mobile-bar .burger {
  background: none;
  border: none;
  padding: 6px;
  margin-right: 2px;
  cursor: pointer;
  display: flex;
}
.mobile-bar .login {
  margin-left: auto;
  background: var(--gold);
  color: var(--green-deep);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
}

.scrim { display: none; }

/* ── Hero / welcome block ─────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  border-radius: 16px;
  padding: 32px 32px;
  margin-bottom: 26px;
  box-shadow: 0 2px 10px rgba(27,58,45,0.06);
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="280" height="280"><g fill="none" stroke="%231B3A2D" stroke-opacity="0.05" stroke-width="1.4"><path d="M0 40 Q70 10 140 40 T280 40"/><path d="M0 90 Q70 60 140 90 T280 90"/><path d="M0 140 Q70 110 140 140 T280 140"/><path d="M0 190 Q70 160 140 190 T280 190"/><path d="M0 240 Q70 210 140 240 T280 240"/></g></svg>');
  pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.hero h2 {
  margin: 0 0 12px;
  font-family: var(--font-head);
  font-size: 30px;
  line-height: 1.2;
  color: var(--green);
}
.hero p { margin: 0 0 10px; color: var(--ink); max-width: 62ch; font-size: 15px; }
.hero .actions { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.hero .hero-photo {
  /* Lodge-sign photo: never crop the routed text; never upscale past the
     source's 234px (it blurs). Shrinks on narrow screens. */
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  margin-bottom: 16px;
  display: block;
}
.hero blockquote {
  margin: 16px 0 0;
  padding: 10px 16px;
  border-left: 3px solid var(--gold);
  font-family: var(--font-head);
  font-size: 15px;
  font-style: italic;
  color: var(--green-2);
  max-width: 52ch;
}
.hero blockquote cite { display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 4px; }

.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(27,58,45,0.18); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-2); }
.btn-outline { background: #fff; color: var(--green); border: 1.5px solid var(--green); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(27,58,45,0.05);
}
.card h3 { margin: 0 0 8px; font-family: var(--font-head); font-size: 17px; color: var(--green); }

h2.section {
  font-family: var(--font-head);
  font-size: 21px;
  color: var(--green);
  margin: 26px 0 14px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--gold);
  display: inline-block;
}

/* ── News feed / announcements ────────────────────────────────────────── */
.news-post { border-left: 4px solid var(--gold); }
.news-post h3 { margin: 0 0 2px; font-size: 18px; }
.news-post h3 a { color: var(--green); text-decoration: none; }
.news-post h3 a:hover { text-decoration: underline; }
.news-post .meta { font-size: 11px; color: var(--muted); margin-bottom: 8px; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600; }
.news-post .excerpt { margin: 0 0 8px; font-size: 14px; }
.news-post .more { font-size: 13px; font-weight: 700; color: var(--green); text-decoration: none; }
.news-post .more:hover { text-decoration: underline; }

.announcement { border-left: 4px solid var(--gold); }
.announcement .meta { font-size: 11px; color: var(--muted); margin-bottom: 6px; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600; }
.announcement .body p { margin: 0 0 10px; font-size: 14px; }
.announcement .body p:last-child { margin-bottom: 0; }
.empty-note { color: var(--muted); font-size: 14px; padding: 8px 2px; }

/* ── Forms ────────────────────────────────────────────────────────────── */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--green); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  font-family: var(--font);
  border: 1px solid #D6D2C4;
  border-radius: 9px;
  background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(27,58,45,0.12);
}
.form-note { font-size: 12px; color: var(--muted); }
.form-status { padding: 12px 14px; border-radius: 9px; font-size: 14px; margin-bottom: 14px; display: none; }
.form-status.ok { display: block; background: #DCFCE7; color: #166534; }
.form-status.err { display: block; background: #FEE2E2; color: #B91C1C; }

/* ── Policy / prose pages ─────────────────────────────────────────────── */
.prose h3 { font-family: var(--font-head); color: var(--green); margin: 22px 0 8px; font-size: 16px; }
.prose p, .prose li { font-size: 14px; }
.prose a { color: var(--green); font-weight: 600; }
.draft-banner {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  color: #92400E;
  border-radius: 9px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 18px;
}

/* ── Footer ───────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 3px solid var(--gold);
  background: var(--green-deep);
  color: rgba(255,255,255,0.75);
  padding: 22px 20px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.03em;
}
.site-footer img { width: 18px; height: 18px; border-radius: 50%; vertical-align: -4px; margin-right: 8px; }
.site-footer a { color: var(--gold-bright); }

/* ── Responsive: sidebar collapses to a hamburger sheet under 900px ───── */
@media (max-width: 899px) {
  .shell { display: block; padding: 18px 14px 48px; }
  .mobile-bar { display: flex; }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 86vw;
    background: var(--paper);
    padding: 16px 14px;
    overflow-y: auto;
    transform: translateX(-103%);
    transition: transform .18s ease-out;
    z-index: 310;
    box-shadow: 4px 0 22px rgba(21,44,33,0.25);
  }
  .sidebar.open { transform: none; }
  .scrim {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(21,44,33,0.45);
    z-index: 300;
    border: none;
    padding: 0;
    width: 100%;
  }
  .scrim.show { display: block; }
  .hero { padding: 24px 20px; }
  .hero h2 { font-size: 25px; }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar { transition: none; }
  .btn { transition: none; }
  .btn:hover { transform: none; }
}

/* ── Volunteer survey (July 2026) ── */
.vol-groupnote { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.vol-card { background: #FAFBF8; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 0 0 10px; }
.vol-cardtitle { font-weight: 700; color: var(--green); margin: 0 0 4px; font-size: 15px; }
.vol-carddesc { font-size: 13px; color: #4A5148; margin: 0 0 10px; line-height: 1.5; }
.vol-seg { display: flex; gap: 8px; flex-wrap: wrap; }
.vol-segbtn { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 14px;
  font-family: var(--font); font-size: 13px; cursor: pointer; color: #444; }
.vol-segbtn.on-yes { background: #D8F3DC; border-color: #2D6A4F; color: #1B4332; font-weight: 700; }
.vol-segbtn.on-maybe { background: #FDE8CD; border-color: #B08148; color: #7F5539; font-weight: 700; }
.vol-segbtn.on-no, .vol-segbtn.on-registered { background: #F2F4F7; border-color: #98A2B3; color: #475467; font-weight: 700; }
.vol-check { display: block; font-size: 14px; margin: 0 0 8px; cursor: pointer; }
.vol-callout { background: #FFF9EC; border: 1px solid var(--gold); border-radius: 10px; padding: 14px 16px; margin: 12px 0 0; }
@media (prefers-reduced-motion: reduce) { .vol-segbtn { transition: none; } }

/* ─── Newsletter archive page (Batch E, July 2026) ─── */
.nl-hello { font-size: 15px; color: #444; margin: 0 0 16px; }
.nl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.nl-item { display: block; padding: 16px 14px; background: #fff; border: 1px solid #E4E0D4; border-radius: 12px; text-decoration: none; transition: border-color 0.15s, transform 0.15s; }
.nl-item:hover { border-color: var(--gold); transform: translateY(-2px); }
.nl-year { font-family: Georgia, serif; font-size: 26px; font-weight: 700; color: #1B3A2D; }
.nl-title { font-size: 12px; color: #777; margin-top: 4px; line-height: 1.4; }
