/* ==========================================================================
   History Hands Network: shared styles
   Headings: Fraunces (heavy + soft, to match the wordmark)
   Body: Figtree
   ========================================================================== */

:root {
  --paper: #f4ecdf;
  --paper-2: #ebdfca;
  --paper-3: #e1d0b2;
  --card: #fbf7f0;
  --white: #fffdf9;
  --ink: #2a1a0f;
  --ink-2: #523e2e;
  --muted: #7f6a55;
  --line: #d9c7a9;
  --line-2: #bea27b;
  --brown: #6b4226;
  --brown-dark: #48291a;
  --word: #7b6648;
  --rust: #b4532a;
  --rust-soft: #f3dccd;
  --sage: #5f6f45;
  --sage-soft: #e2e5d0;
  --mustard: #d49b35;
  --mustard-soft: #f4e3bd;

  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font-body); font-size: 18px; line-height: 1.6;
  color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brown); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--rust); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--mustard); outline-offset: 2px; }
svg { flex-shrink: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-variation-settings: "SOFT" 100, "WONK" 0;
  font-weight: 800; line-height: 1.04; letter-spacing: -.015em;
  margin: 0 0 .4em; color: var(--ink);
}
h1 { font-size: clamp(2.6rem, 6vw, 4.8rem); font-weight: 900; letter-spacing: -.025em; }
h2 { font-size: clamp(2rem, 3.8vw, 3rem); }
h3 { font-size: 1.35rem; line-height: 1.15; letter-spacing: -.005em; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 36em; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.opt { font-weight: 500; color: var(--muted); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } body { font-size: 17px; } }

.section { padding: 96px 0; }
.section-tight { padding: 60px 0; }
.bg-2 { background: var(--paper-2); }
.bg-dark { background: var(--brown-dark); color: #eadcc5; }
.bg-dark h2, .bg-dark h3 { color: #fbf3e4; }

/* kicker: a small, quiet label used sparingly */
.kicker { display: block; font-family: var(--font-body); font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--rust); margin-bottom: 6px; }

/* section header label */
.eyebrow { display: block; font-family: var(--font-body); font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--rust); margin: 0 0 14px; }
.bg-dark .eyebrow, .motto .eyebrow { color: var(--mustard); }

/* thick rule like a printed page */
.rule { height: 0; border-top: 2px solid var(--ink); margin: 26px 0; }
.rule-thin { border-top: 1px solid var(--line-2); }
.rule-top { border-top: 1.5px solid var(--line); padding-top: 14px; }

/* --- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 24px; border-radius: 8px; border: 2px solid transparent;
  font-family: var(--font-body); font-weight: 700; font-size: 1.02rem; text-decoration: none; cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease; white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--brown); border-color: var(--brown); color: #fbf3e4; }
.btn-primary:hover { background: var(--brown-dark); border-color: var(--brown-dark); color: #fff; }
.btn-outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-light { background: var(--white); border-color: var(--line-2); color: var(--ink); }
.btn-light:hover { border-color: var(--ink); color: var(--ink); }
.btn-rust { background: var(--rust); border-color: var(--rust); color: #fff; }
.btn-rust:hover { background: #983f1c; border-color: #983f1c; color: #fff; }
.btn-ghost { background: transparent; color: var(--brown); padding: 0 12px; }
.btn-ghost:hover { color: var(--rust); }
.btn-danger { background: transparent; border-color: transparent; color: #9a3b18; padding: 0 12px; }
.btn-danger:hover { text-decoration: underline; color: #7a2c10; }
.btn-sm { min-height: 42px; padding: 0 16px; font-size: .94rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.text-link { font-weight: 700; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--brown); }
.text-link svg { width: 18px; height: 18px; transition: transform .15s ease; }
.text-link:hover svg { transform: translateX(3px); }

/* --- Header -------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 2px solid var(--ink); }
.nav-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 74px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; flex-shrink: 0; }
.brand-hand { width: 40px; height: 46px; object-fit: contain; }
.brand-word { height: 44px; width: auto; }
.nav-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* Page buttons: one full-width bar, every button the same size */
.nav-bar { border-top: 2px solid var(--ink); background: var(--paper-2); }
.nav-links { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; border-left: 1.5px solid var(--line-2); }
.nav-links li { border-right: 1.5px solid var(--line-2); }
.nav-links a {
  display: flex; align-items: center; justify-content: center; text-align: center; height: 100%; min-height: 58px; padding: 8px 6px;
  text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.08rem; line-height: 1.15; transition: background .15s ease;
}
.nav-links a:hover { background: var(--paper-3); color: var(--ink); }
.nav-links a.active { background: var(--ink); color: var(--paper); }

.bell-wrap, .me-wrap { position: relative; }
.bell { color: var(--ink); text-decoration: none; position: relative; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--white); cursor: pointer; display: grid; place-items: center; }
.bell svg { width: 21px; height: 21px; }
.bell:hover { border-color: var(--ink); }
.notif-dot { position: absolute; top: -5px; right: -6px; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 999px; background: var(--rust); color: #fff; font-size: .72rem; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--paper); }
.tab-dot { position: static; display: inline-grid; margin-left: 6px; border: 0; }
.me-btn { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; }
.me-btn .avatar { width: 44px; height: 44px; border: 2px solid var(--ink); }
.bell-panel, .me-panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: 360px; max-width: calc(100vw - 32px);
  background: var(--white); border: 2px solid var(--ink); border-radius: var(--r); box-shadow: 0 18px 40px -20px rgba(42, 26, 15, .5);
  max-height: 70vh; overflow-y: auto; z-index: 60;
}
.me-panel { width: 240px; padding: 16px; display: flex; flex-direction: column; gap: 2px; }
.me-panel b { line-height: 1.2; }
.me-panel .muted { margin-bottom: 10px; }
.me-panel a, .me-panel button { display: block; text-align: left; padding: 9px 0; border: 0; background: none; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; cursor: pointer; }
.me-panel a:hover, .me-panel button:hover { color: var(--rust); }
.bell-head { padding: 14px 16px; border-bottom: 2px solid var(--ink); position: sticky; top: 0; background: var(--white); }
.note { padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: .95rem; line-height: 1.4; }
.note.unread { background: var(--mustard-soft); }
.note a { color: var(--ink); text-decoration: none; font-weight: 600; }
.note a:hover { text-decoration: underline; }
.note .when { display: block; font-size: .8rem; color: var(--muted); margin-top: 3px; }
.note-act { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.note-act .hours-in { width: 96px; min-height: 42px; padding: 8px 10px; }
.note-act.done { flex-direction: row; align-items: center; color: var(--sage); font-weight: 700; font-size: .9rem; }
.note-act.done svg { width: 18px; height: 18px; }

@media (max-width: 960px) {
  .nav-links { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .nav-links li:nth-child(n+5) { border-top: 1.5px solid var(--line-2); }
  .nav-links a { min-height: 52px; font-size: 1rem; }
}
@media (max-width: 600px) {
  .site-header { position: static; }
  .nav-top { height: 66px; gap: 10px; }
  .brand-word { height: 34px; }
  .brand-hand { width: 28px; height: 34px; }
  .nav-actions { gap: 8px; }
  .nav-actions .btn { padding: 0 12px; min-height: 40px; }
  .site-header .nav-actions .btn-primary svg { display: none; }
  .bell, .me-btn .avatar { width: 40px; height: 40px; }
  .nav-bar > .wrap { padding: 0; }
  .nav-links { border-left: 0; }
  .nav-links li:nth-child(4n) { border-right: 0; }
  .nav-links a { min-height: 50px; font-size: .9rem; padding: 6px 4px; }
}
@media (max-width: 400px) { .brand-word { height: 28px; } .brand-hand { display: none; } .nav-actions .btn-ghost { padding: 0 6px; } .nav-links a { font-size: .8rem; padding: 6px 2px; } .nav-actions { gap: 6px; } .bell, .me-btn .avatar { width: 36px; height: 36px; } .site-header .nav-actions .post-btn { padding: 0 9px; } .site-header .nav-actions .post-btn svg { display: inline; } .post-btn span { display: none; } }
@media (max-width: 360px) { .site-header .wrap { padding: 0 12px; } .nav-top { gap: 8px; } .brand-word { height: 24px; } .nav-actions { gap: 4px; } .bell, .me-btn .avatar { width: 34px; height: 34px; } .bell svg { width: 18px; height: 18px; } .site-header .nav-actions .btn { min-height: 34px; padding: 0 8px; font-size: .85rem; } }
@media (max-width: 340px) { .nav-links a { font-size: .7rem; } }

/* --- Avatars + covers ---------------------------------------------------- */
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
  display: inline-grid; place-items: center; font-family: var(--font-body); font-weight: 800; font-size: .95rem; color: #fff; letter-spacing: .02em;
}
.avatar.sq { border-radius: 10px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.xs { width: 28px; height: 28px; font-size: .68rem; }
.avatar.xs.sq { border-radius: 6px; }
.avatar.sm { width: 36px; height: 36px; font-size: .8rem; }
.avatar.lg { width: 72px; height: 72px; font-size: 1.5rem; }
.avatar.xl { width: 132px; height: 132px; font-size: 2.6rem; border: 5px solid var(--paper); }
.avatar.xl.sq { border-radius: 22px; }
.cover { height: clamp(180px, 23vw, 320px); background: var(--brown-dark); overflow: hidden; position: relative; border-bottom: 2px solid var(--ink); }
.cover > svg, .cover > img, .cover-fill { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-photo { position: absolute; inset: 0; display: block; overflow: hidden; background: var(--brown-dark); }
.cover-photo .cover-bg { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); max-width: none; object-fit: cover; filter: blur(26px) brightness(.72) saturate(1.1); }
.cover-photo .cover-fg { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 600px) { .cover { height: 170px; } .avatar.xl { width: 104px; height: 104px; } .prof, .dash-head { flex-direction: column; align-items: flex-start !important; } .prof .btn-row, .dash-head .btn-row { margin-left: 0 !important; } }

/* --- Cards --------------------------------------------------------------- */
.card { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r); padding: 26px; }
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.tag-sample { display: inline-block; font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-2); border-radius: 4px; padding: 0 5px; vertical-align: middle; margin-left: 4px; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; font-weight: 700; white-space: nowrap; }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.status.wait { color: #94640f; }
.status.ok { color: var(--sage); }
.status.off { color: var(--muted); }

/* Opportunity card */
.opp { display: flex; flex-direction: column; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r); overflow: hidden; cursor: pointer; transition: border-color .15s ease; }
.opp:hover { border-color: var(--ink); }
.opp-img { aspect-ratio: 16 / 8; overflow: hidden; border-bottom: 1.5px solid var(--line); background: var(--paper-2); }
.opp-img img, .opp-img svg { width: 100%; height: 100%; object-fit: cover; }
.opp-body { padding: 20px 22px 18px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.opp-org { display: flex; align-items: center; gap: 9px; font-size: .9rem; font-weight: 600; color: var(--ink-2); text-decoration: none; min-width: 0; }
.opp-org > span:last-child { overflow: hidden; text-overflow: ellipsis; }
a.opp-org:hover { color: var(--rust); }
.opp h3 { margin: 0; font-size: 1.4rem; }
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 3px; font-size: .94rem; color: var(--ink-2); }
.facts li { padding-left: 16px; position: relative; }
.facts li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; background: var(--line-2); border-radius: 1px; }
.spots { align-self: flex-start; font-size: .85rem; font-weight: 800; color: var(--sage); background: var(--sage-soft); border-radius: 6px; padding: 3px 10px; }
.spots.is-full { color: var(--muted); background: var(--paper-2); }
.opp.full { background: var(--paper-2); border-color: var(--line); filter: grayscale(.85); opacity: .72; }
.opp.full:hover { opacity: .9; }
.opp.full .go { color: var(--muted); }
.signup-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.signup-list li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .95rem; line-height: 1.45; }
.signup-list li > div { min-width: 0; overflow-wrap: anywhere; }
.signup-list .status { margin-left: 6px; font-size: .8rem; }
.su-note { margin-top: 6px; background: var(--white); border-left: 3px solid var(--line-2); padding: 6px 10px; color: var(--ink-2); font-size: .92rem; }
.who { margin-top: 10px; }
.who summary { cursor: pointer; font-weight: 800; color: var(--brown); font-size: .95rem; }
.who summary:hover { color: var(--rust); }
.who .signup-list { margin-top: 10px; }
.opp-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1.5px solid var(--line); }
.go { font-weight: 800; color: var(--brown); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.go svg { width: 18px; height: 18px; transition: transform .15s ease; }
.opp:hover .go svg { transform: translateX(3px); }

/* Idea card */
.idea { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.idea:hover { border-color: var(--ink); }
.idea-media { aspect-ratio: 4 / 3; position: relative; overflow: hidden; background: var(--paper-2); border-bottom: 1.5px solid var(--line); }
.idea-media img, .idea-media svg { width: 100%; height: 100%; object-fit: cover; }
.idea-media .count { position: absolute; right: 10px; bottom: 10px; background: var(--ink); color: #fff; font-size: .78rem; font-weight: 700; padding: 3px 9px; border-radius: 4px; }
.idea-body { padding: 18px 22px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.idea-body h3 { margin: 0; font-size: 1.3rem; }
.tags-line { margin: 0; font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--rust); }
.clamp { margin: 0; color: var(--ink-2); font-size: .97rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.idea-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; }
.like { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border-radius: 8px; border: 2px solid var(--line-2); background: var(--white); font-weight: 800; font-size: .95rem; cursor: pointer; color: var(--ink-2); flex-shrink: 0; }
.like svg { width: 18px; height: 18px; }
.like:hover { border-color: var(--rust); color: var(--rust); }
.like.on { background: var(--rust); border-color: var(--rust); color: #fff; }
.like.on svg path { fill: #fff; stroke: #fff; }
.like.pop { animation: pop .35s ease; }
@keyframes pop { 40% { transform: scale(1.12); } }

/* --- Forms --------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 20px; }
.field label, .label { font-weight: 700; font-size: 1rem; }
.hint { font-size: .87rem; color: var(--muted); margin-top: -2px; }
.input, .select, .textarea { width: 100%; min-height: 52px; padding: 12px 14px; border: 2px solid var(--line-2); border-radius: 8px; background: var(--white); font-size: 1.04rem; transition: border-color .15s ease, box-shadow .15s ease; }
.textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.textarea.short { min-height: 90px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brown); box-shadow: 0 0 0 3px rgba(212, 155, 53, .35); }
select.input { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%232a1a0f' stroke-width='2.2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 44px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 1rem; cursor: pointer; margin-bottom: 14px; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--brown); flex-shrink: 0; }
.form-error { background: var(--rust-soft); color: #7e2f12; border-left: 4px solid var(--rust); padding: 12px 16px; border-radius: 4px; font-weight: 600; margin-bottom: 18px; display: none; }
.form-error.show { display: block; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.row-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0 16px; }
@media (max-width: 560px) { .row-2, .row-3 { grid-template-columns: 1fr; } }

.choice-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.choice-row.two { grid-template-columns: repeat(2, 1fr); }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: flex; flex-direction: column; justify-content: center; gap: 2px; height: 100%; min-height: 62px; padding: 12px 14px; border: 2px solid var(--line-2); border-radius: 8px; background: var(--white); font-weight: 700; cursor: pointer; transition: border-color .15s ease, background .15s ease; line-height: 1.25; }
.choice span small { font-weight: 500; color: var(--muted); font-size: .85rem; }
.choice span:hover { border-color: var(--ink); }
.choice input:checked + span { border-color: var(--brown); background: var(--brown); color: #fbf3e4; }
.choice input:checked + span small { color: #eadcc5; }
.choice input:focus-visible + span { outline: 3px solid var(--mustard); outline-offset: 2px; }
@media (max-width: 560px) { .choice-row { grid-template-columns: 1fr; } }

.photo-drop { display: flex; align-items: center; gap: 16px; border: 2px solid var(--line-2); border-radius: 8px; background: var(--white); padding: 18px; cursor: pointer; transition: border-color .15s ease; }
.photo-drop:hover, .photo-drop.drag { border-color: var(--ink); }
.photo-drop svg { width: 30px; height: 30px; color: var(--brown); }
.photo-drop b { display: block; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.thumbs:empty { display: none; }
.thumbs figure { margin: 0; position: relative; width: 96px; height: 96px; border-radius: 8px; overflow: hidden; border: 1.5px solid var(--line-2); }
.thumbs figure.wide { width: 220px; height: 124px; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.thumbs button { position: absolute; top: 5px; right: 5px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; cursor: pointer; display: grid; place-items: center; }
.thumbs button svg { width: 14px; height: 14px; }

/* Map picker */
.picker { border: 2px solid var(--ink); border-radius: var(--r); overflow: hidden; background: var(--white); }
.picker-map { height: 320px; }
.picker-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 16px; border-top: 2px solid var(--ink); font-size: .95rem; line-height: 1.4; }
.picker-bar small { color: var(--muted); }
.picker-bar .ok { display: inline-flex; gap: 8px; align-items: center; color: var(--sage); font-weight: 800; }
.picker-bar .ok svg { width: 20px; height: 20px; }
.leaflet-container { font-family: var(--font-body); }
.leaflet-tile-pane { filter: sepia(.4) saturate(.75) contrast(.96) brightness(1.02); }
.hh-pin { background: none; border: 0; }
.hh-pin svg { filter: drop-shadow(0 3px 3px rgba(42, 26, 15, .35)); }

/* --- Modal --------------------------------------------------------------- */
.modal-back { position: fixed; inset: 0; z-index: 100; background: rgba(42, 26, 15, .55); display: none; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.modal-back.show { display: flex; animation: fade .15s ease; }
.modal { background: var(--card); border: 2px solid var(--ink); border-radius: var(--r-lg); width: 100%; max-width: 640px; position: relative; overflow: hidden; animation: rise .2s ease; }
.modal.wide { max-width: 860px; }
.modal-head { padding: 28px 30px 0; }
.modal-head h2 { font-size: clamp(1.7rem, 4vw, 2.3rem); margin: 12px 0 0; padding-right: 30px; }
.modal-head .opp-org { padding-right: 40px; }
.modal-body { padding: 22px 30px 30px; }
.modal-body h3 { margin-bottom: 12px; }
.modal-img { aspect-ratio: 16 / 8; background: var(--paper-2); border-bottom: 2px solid var(--ink); position: relative; overflow: hidden; }
.modal-img img, .modal-img svg { width: 100%; height: 100%; object-fit: cover; }
.modal-img.gallery img { object-fit: contain; background: var(--ink); }
.dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.dots button { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; background: transparent; cursor: pointer; padding: 0; }
.dots button.on { background: #fff; }
.modal-close { position: absolute; top: 14px; right: 14px; z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--ink); background: var(--white); cursor: pointer; display: grid; place-items: center; }
.modal-close svg { width: 18px; height: 18px; }
.desc { color: var(--ink-2); }
.detail { display: grid; grid-template-columns: repeat(2, 1fr); margin: 0 0 20px; border-top: 2px solid var(--ink); }
.detail div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.detail div:nth-child(odd) { padding-right: 14px; }
.detail dt { font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.detail dd { margin: 2px 0 0; font-weight: 600; line-height: 1.35; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } }
@media (max-width: 560px) { .modal-head { padding: 24px 20px 0; } .modal-body { padding: 18px 20px 24px; } .detail { grid-template-columns: 1fr; } }

.callout { background: var(--paper-2); border-left: 4px solid var(--brown); border-radius: 4px; padding: 16px 18px; }
.callout.ok { background: var(--sage-soft); border-left-color: var(--sage); }
.callout.warn { background: var(--mustard-soft); border-left-color: var(--mustard); }
.done-box { text-align: center; padding: 6px 0; }
.done-box p { max-width: 30em; margin-left: auto; margin-right: auto; }
.done-check { width: 68px; height: 68px; border-radius: 50%; background: var(--sage); color: #fff; display: grid; place-items: center; margin: 0 auto 14px; }
.done-check svg { width: 32px; height: 32px; }

/* --- Toast --------------------------------------------------------------- */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 30px); z-index: 200; background: var(--ink); color: #fbf3e4; padding: 14px 22px; border-radius: 8px; font-weight: 600; opacity: 0; transition: all .25s ease; max-width: calc(100% - 32px); text-align: center; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* --- Page header --------------------------------------------------------- */
.page-head { padding: 60px 0 40px; border-bottom: 2px solid var(--ink); }
.page-head h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); max-width: 15em; }
.page-head .lead { margin-bottom: 0; }
.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; flex-wrap: wrap; }

/* --- Toolbar / filters --------------------------------------------------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 30px 0 24px; }
.search { flex: 1; min-width: 240px; position: relative; display: block; }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); }
.search .input { padding-left: 46px; }
.seg { display: inline-flex; border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; flex-wrap: wrap; }
.seg button { border: 0; border-left: 2px solid var(--ink); background: var(--white); padding: 10px 16px; font-weight: 700; cursor: pointer; color: var(--ink); font-size: .95rem; }
.seg button:first-child { border-left: 0; }
.seg button.on { background: var(--ink); color: var(--paper); }
.seg button:not(.on):hover { background: var(--paper-2); }

.empty { text-align: center; padding: 56px 24px; border: 2px solid var(--line-2); border-radius: var(--r); color: var(--muted); }
.empty h3 { color: var(--ink-2); }

/* --- Footer -------------------------------------------------------------- */
.site-footer { background: var(--brown-dark); color: #d9c7a9; padding: 70px 0 30px; border-top: 2px solid var(--ink); }
.site-footer a { color: #f4e9d6; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 40px; }
.foot-grid h4 { font-family: var(--font-body); color: #fbf3e4; font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; font-size: .97rem; }
.foot-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none !important; }
.foot-hand { width: 46px; height: 54px; object-fit: contain; }
.foot-word { width: 230px; max-width: calc(100vw - 110px); height: auto; }
.foot-line { font-family: var(--font-head); font-variation-settings: "SOFT" 100; font-weight: 700; font-size: 1.4rem; color: #fbf3e4; margin: 18px 0 12px; line-height: 1.25; }
.site-footer a.foot-mail { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.02rem; color: #fbf3e4; border-bottom: 2px solid var(--mustard); padding-bottom: 2px; max-width: 100%; }
.site-footer a.foot-mail:hover { text-decoration: none; color: #fff; border-bottom-color: #fff; }
.foot-mail svg { width: 20px; height: 20px; color: var(--mustard); }
.foot-bottom { border-top: 1px solid rgba(217, 199, 169, .25); margin-top: 50px; padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .88rem; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > div:first-child { grid-column: 1 / -1; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }

/* --- Utility ------------------------------------------------------------- */
[hidden] { display: none !important; }
.center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.stack > * + * { margin-top: 16px; }
.flex { display: flex; gap: 12px; align-items: center; }
.between { justify-content: space-between; }
.wrap-flex { flex-wrap: wrap; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Report button (small, quiet, on posts, profiles and chats) */
.report-row { margin: 18px 0 0; text-align: right; }
.report-link { background: none; border: 0; padding: 4px 0; color: var(--muted); font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; text-decoration: underline; text-underline-offset: 3px; }
.report-link svg { width: 15px; height: 15px; }
.report-link:hover { color: var(--rust); }
.rep-reasons { display: grid; gap: 2px; margin: 4px 0 14px; }
