/* Shareiti: muted slate / olive / gold palette from the brand banner; bright colors only in the logo. */
:root {
  --bg: #F7F5F0;
  --surface: #FFFFFF;
  --ink: #2B3A40;
  --ink-2: #4F5B5E;
  --ink-3: #5E686A;
  --line: #E4E0D6;
  --line-2: #D3CEC2;
  --line-soft: #EEEBE4;
  --slate: #4E6E82;
  --slate-dk: #3E5A6B;
  --slate-tint: #EAEFF1;
  --olive: #637340;
  --olive-dk: #55623A;
  --olive-tint: #EEF0E6;
  --gold: #C9A445;
  --gold-ink: #8A6D2B;
  --gold-tint: #F5EFE2;
  --charcoal: #34474F;
  --logo-blue: #1565D8;
  --logo-green: #2E9A2F;
  --logo-orange: #D97706;
  --danger: #A23B2A;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(43, 58, 64, .08);
  --display: 'Montserrat', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--body); }
img { max-width: 100%; display: block; }
a { color: var(--slate-dk); }
a:hover { color: var(--ink); }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.2px; line-height: 1.2; margin: 0; color: var(--ink); }
h1 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 700; }
h2 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 700; }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 10px 14px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- buttons, chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border-radius: var(--radius-sm); font: 600 15px/1.2 var(--body); text-decoration: none; border: 1.5px solid transparent; cursor: pointer; white-space: nowrap; }
.btn-primary { background: var(--slate); color: #fff; }
.btn-primary:hover { background: var(--slate-dk); color: #fff; }
.btn-go { background: var(--olive); color: #fff; }
.btn-go:hover { background: var(--olive-dk); color: #fff; }
.btn-ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-3); color: var(--ink); }
.btn-danger { background: var(--surface); border-color: #E2C3BC; color: var(--danger); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn-lg { min-height: 54px; padding: 12px 28px; font-size: 17px; }
.chip { display: inline-block; font: 700 12px/1 var(--body); letter-spacing: .4px; text-transform: uppercase; padding: 6px 10px; border-radius: 6px; }
.chip-light { background: var(--surface); color: var(--slate-dk); }
.chip-free { background: var(--olive); color: #fff; }
.chip-hold { background: var(--gold-ink); color: #fff; }
.chip-given { background: var(--ink-3); color: #fff; }
.pill { display: inline-block; font-size: 13px; font-weight: 600; color: var(--slate-dk); background: var(--slate-tint); padding: 7px 12px; border-radius: 6px; text-decoration: none; }
.pill:hover { background: #DDE6EA; color: var(--ink); }

/* ---------- header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: relative; z-index: 5; }
.header-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 52px; height: 42px; object-fit: contain; }
.wordmark { font: 600 25px/1 var(--display); letter-spacing: -.6px; color: var(--logo-blue); }
.wordmark .iti { color: var(--logo-green); }
.wordmark .com { color: var(--logo-orange); font-weight: 500; font-size: .62em; }
.mainnav { display: flex; flex-wrap: wrap; gap: 4px 22px; flex: 1 1 380px; }
.mainnav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; padding: 10px 0; border-bottom: 2px solid transparent; }
.mainnav a[aria-current="page"], .mainnav a:hover { border-bottom-color: var(--gold); }
.header-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.navtoggle, .navbtn { display: none; }
@media (max-width: 860px) {
  .navbtn { display: inline-flex; margin-left: auto; width: 44px; height: 44px; align-items: center; justify-content: center; border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); cursor: pointer; }
  .mainnav, .header-actions { display: none; flex-basis: 100%; }
  .navtoggle:checked ~ .mainnav { display: flex; flex-direction: column; gap: 0; }
  .navtoggle:checked ~ .header-actions { display: flex; padding-bottom: 6px; }
  .header-actions .btn { flex: 1 1 auto; }
}
.flash { padding: 12px 0; font-weight: 600; }
.flash-ok { background: var(--olive-tint); color: var(--olive-dk); }
.flash-err { background: #F7E6E2; color: var(--danger); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 600px; overflow: hidden; }
.hero picture, .hero picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 35% center; }
.hero-inner { position: relative; max-width: 1360px; margin: 0 auto; padding: 110px 6% 140px; display: flex; flex-direction: column; gap: 26px; align-items: flex-start; }
.hero-inner h1 { line-height: 0; }
.hero-inner h1 img { width: 620px; max-width: 100%; height: auto; }
.hero-rule { width: 120px; height: 2px; background: var(--gold); }
.hero-line { font: 600 clamp(22px, 3vw, 32px)/1.25 var(--display); color: var(--logo-blue); letter-spacing: -.3px; }
.hero-line span { color: #23801F; }
@media (max-width: 640px) {
  .hero { min-height: 520px; }
  .hero picture img { object-position: 72% center; }
  .hero-inner { padding: 36px 20px 130px; }
  .hero-inner::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 300px; background: linear-gradient(180deg, rgba(247,245,240,.85), rgba(247,245,240,0)); z-index: -1; }
}

/* ---------- search ---------- */
.searchbox { position: relative; margin: -60px auto 0; max-width: 1040px; background: var(--surface); border-radius: var(--radius); box-shadow: 0 14px 40px rgba(43,58,64,.12);
  padding: 18px; display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.inputwrap { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); padding: 0 14px; height: 52px; background: var(--surface); color: var(--ink-3); }
.inputwrap input { border: 0; outline: 0; flex: 1; font: inherit; font-size: 16px; color: var(--ink); background: transparent; min-width: 0; }
.inputwrap:focus-within { border-color: var(--slate); }
.searchbox .grow { flex: 3 1 300px; }
.searchbox .near { flex: 1 1 180px; }
.searchbox .popular { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-3); font-weight: 600; }

/* ---------- sections & cards ---------- */
.section { padding-top: 56px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 20px; }
.section-head a { font-weight: 600; font-size: 15px; }
.grid { display: grid; gap: 18px; }
.grid-cats { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
a.card { text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
a.card:hover { border-color: var(--line-2); box-shadow: var(--shadow); color: var(--ink); }
.cat-card { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.cat-icon { width: 46px; height: 46px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--slate-tint); color: var(--slate-dk); }
.cat-card.is-item .cat-icon { background: var(--olive-tint); color: var(--olive-dk); }
.cat-card strong { font-family: var(--display); font-size: 16px; }
.cat-card span.small { font-size: 13px; color: var(--ink-3); line-height: 1.4; }
.listing-card { overflow: hidden; display: flex; flex-direction: column; }
.card-media { position: relative; height: 160px; background: var(--olive-tint); color: var(--olive-dk); display: flex; align-items: center; justify-content: center; }
.card-media.is-resource { background: var(--slate-tint); color: var(--slate-dk); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media .chip { position: absolute; top: 12px; left: 12px; }
.card-media .chip-free, .card-media .chip-hold { left: auto; right: 12px; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 5px; }
.card-title { font-weight: 700; font-size: 16px; line-height: 1.3; }
.card-meta { font-size: 14px; color: var(--ink-3); }
.card-owner { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.avatar { border-radius: 50%; background: var(--gold); color: var(--charcoal); font: 700 18px/1 var(--display); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.avatar-xs { width: 24px; height: 24px; font-size: 10px; background: var(--slate-tint); color: var(--slate-dk); }
.empty { padding: 32px; text-align: center; color: var(--ink-3); border: 1.5px dashed var(--line-2); border-radius: var(--radius); background: var(--surface); }
.empty strong { display: block; color: var(--ink); font-size: 17px; margin-bottom: 6px; }

.res-col { padding: 22px; display: flex; flex-direction: column; gap: 4px; }
.res-col h3 { margin-bottom: 8px; }
.res-link { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; }
.res-link:last-of-type { border-bottom: 0; }
.res-link strong { font-weight: 600; }
.res-link span { font-size: 13px; color: var(--ink-3); }
.res-link:hover strong { text-decoration: underline; }

.spotlight { background: var(--charcoal); color: #fff; border-radius: 16px; padding: 40px; display: flex; flex-wrap: wrap; gap: 32px; align-items: center; }
.spotlight .avatar { width: 168px; height: 168px; font-size: 58px; border: 6px solid #fff; }
.spotlight .badge { position: absolute; bottom: 6px; right: -6px; background: var(--gold-ink); color: #fff; font: 700 12px/1 var(--body); padding: 8px 12px; border-radius: 6px; border: 3px solid var(--charcoal); display: flex; gap: 5px; align-items: center; }
.spotlight .eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 1.5px; color: #D8BC74; }
.spotlight h2 { color: #fff; font-size: 34px; }
.spotlight p { color: #E4E8E8; font-size: 17px; line-height: 1.6; max-width: 660px; white-space: pre-line; }
.stat-pill { background: rgba(255,255,255,.12); padding: 8px 14px; border-radius: 6px; font-weight: 600; font-size: 14px; }
.btn-light { background: #fff; color: var(--charcoal); }
.btn-outline-light { border-color: rgba(255,255,255,.5); color: #fff; }
.btn-outline-light:hover { border-color: #fff; color: #fff; }
.step { padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.step-n { width: 40px; height: 40px; border-radius: 50%; color: #fff; font: 700 17px/1 var(--display); display: flex; align-items: center; justify-content: center; }
.step p { color: var(--ink-3); }

/* ---------- directory ---------- */
.dir-layout { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; padding-top: 28px; padding-bottom: 48px; }
.filters { flex: 1 1 260px; max-width: 300px; padding: 22px; display: flex; flex-direction: column; gap: 22px; }
.filters fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.filters legend { font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--ink-2); margin-bottom: 10px; text-transform: uppercase; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--slate); }
.results { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 700px) { .filters { max-width: none; } }
.dir-search { display: flex; flex-wrap: wrap; gap: 10px; }
.dir-search .inputwrap { flex: 1 1 240px; height: 48px; }
.pager { display: flex; gap: 10px; justify-content: center; padding-top: 10px; }

/* ---------- forms ---------- */
.form-card { padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.input, select.input, textarea.input { width: 100%; border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); padding: 12px 14px; font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); }
.input:focus { outline: 0; border-color: var(--slate); }
textarea.input { min-height: 120px; resize: vertical; }
.hint { font-size: 13px; color: var(--ink-3); }
.row-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: #ECE8DF; padding: 5px; border-radius: 10px; }
.seg input { position: absolute; opacity: 0; }
.seg label { text-align: center; padding: 11px; border-radius: 8px; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.seg input:checked + label { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(43,58,64,.12); }
.seg input:focus-visible + label { outline: 3px solid var(--gold); }
.catpick { display: flex; flex-wrap: wrap; gap: 8px; }
.catpick input { position: absolute; opacity: 0; }
.catpick label { padding: 10px 14px; border: 1.5px solid var(--line-2); border-radius: 8px; font-weight: 600; font-size: 14px; cursor: pointer; background: #fff; }
.catpick input:checked + label { border-color: var(--slate); background: var(--slate-tint); color: var(--slate-dk); }
.catpick input:focus-visible + label { outline: 3px solid var(--gold); }
.note { display: flex; gap: 10px; align-items: flex-start; background: var(--gold-tint); color: #5C4A20; border-radius: 10px; padding: 12px 14px; font-size: 14px; font-weight: 500; }
.note svg { flex: 0 0 auto; margin-top: 1px; color: var(--gold-ink); }
.errors { background: #F7E6E2; color: var(--danger); border-radius: 10px; padding: 12px 16px; font-weight: 600; }
.errors ul { margin: 0; padding-left: 18px; }
.auth { max-width: 460px; margin: 48px auto; }

/* ---------- member page ---------- */
.owner-bar { background: var(--gold-tint); border-bottom: 1px solid #E2D8BE; }
.owner-bar .wrap { padding-top: 12px; padding-bottom: 12px; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; color: #5C4A20; font-weight: 600; }
.profile { overflow: hidden; }
.profile-cover { height: 150px; width: 100%; object-fit: cover; }
.profile-head { padding: 0 28px 24px; display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: flex-start; margin-top: -54px; position: relative; }
.profile-head .avatar { width: 124px; height: 124px; font-size: 44px; border: 6px solid #fff; }
.profile-head .who { flex: 1 1 340px; display: flex; flex-direction: column; gap: 6px; padding-top: 68px; }
.profile-head .who + div { padding-top: 70px; }
@media (max-width: 640px) { .profile-head .who, .profile-head .who + div { padding-top: 0; } }
.hero-badge { background: var(--gold-ink); color: #fff; font-weight: 700; font-size: 12px; padding: 5px 10px; border-radius: 6px; letter-spacing: .5px; }
.profile-tabs { border-top: 1px solid var(--line-soft); padding: 0 20px; display: flex; flex-wrap: wrap; gap: 4px; }
.profile-tabs a { padding: 15px 12px; font-weight: 600; color: var(--ink-2); text-decoration: none; border-bottom: 3px solid transparent; }
.profile-tabs a:hover { border-bottom-color: var(--line-2); }
.member-layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; padding-top: 24px; padding-bottom: 56px; }
.member-layout > .main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.member-layout > aside { flex: 1 1 320px; display: flex; flex-direction: column; gap: 18px; }
.res-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.res-item:last-child { border-bottom: 0; }
.res-tag { flex: 0 0 auto; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--slate-dk); background: var(--slate-tint); padding: 4px 8px; border-radius: 6px; min-width: 76px; text-align: center; margin-top: 2px; }
.owner-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.owner-actions form { display: inline; }

/* ---------- listing detail ---------- */
.detail { display: flex; flex-wrap: wrap; gap: 28px; padding-top: 28px; padding-bottom: 56px; align-items: flex-start; }
.detail-media { flex: 1 1 420px; min-height: 320px; border-radius: var(--radius); overflow: hidden; background: var(--olive-tint); color: var(--olive-dk); display: flex; align-items: center; justify-content: center; }
.detail-media.is-resource { background: var(--slate-tint); color: var(--slate-dk); }
.detail-media img { width: 100%; max-height: 560px; object-fit: contain; background: #fff; }
.detail-info { flex: 1 1 380px; display: flex; flex-direction: column; gap: 16px; }
.detail-info .desc { white-space: pre-line; color: var(--ink-2); font-size: 17px; }
.owner-card { display: flex; align-items: center; gap: 12px; padding: 14px; text-decoration: none; color: var(--ink); }
.owner-card .avatar { width: 48px; height: 48px; font-size: 17px; }
.contact-box { padding: 18px; background: var(--slate-tint); border-radius: var(--radius); }
details.report summary { cursor: pointer; color: var(--ink-3); font-size: 14px; }

/* ---------- admin ---------- */
table.data { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }
table.data th, table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
table.data th { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--ink-2); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.stat { padding: 18px; }
.stat b { display: block; font: 700 28px/1.1 var(--display); }
.stat span { color: var(--ink-3); font-size: 14px; }
.prose { display: flex; flex-direction: column; gap: 14px; color: var(--ink-2); font-size: 17px; }
.prose h2 { margin-top: 18px; }
.prose ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }

/* ---------- footer ---------- */
.site-footer { margin-top: 64px; background: var(--surface); border-top: 1px solid var(--line); }
.footer-row { padding-top: 32px; padding-bottom: 20px; display: flex; flex-wrap: wrap; gap: 20px 48px; justify-content: space-between; align-items: center; }
.brand-footer > span { display: flex; flex-direction: column; gap: 6px; }
.brand-footer img { width: 60px; height: 48px; }
.tagline { font-size: 11px; letter-spacing: 2.2px; color: var(--ink-2); font-weight: 600; text-transform: uppercase; }
.footnav { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.footnav a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 15px; }
.footnav a:hover { color: var(--ink); text-decoration: underline; }
.footer-small { padding-bottom: 28px; font-size: 13px; color: var(--ink-3); }
