:root {
  --ink: #1d2927;
  --muted: #4f6360;
  --ground: #eef0ef;
  --card: #ffffff;
  --line: #d6dad8;
  --soft: #e3eae8;
  --accent: #2c4a40;
  --accent-dark: #1f362f;
  --accent-soft: #dfe8e4;
  --danger: #9b2c2c;
  --danger-soft: #f8e1e1;
  --ok: #1d5b34;
  --ok-soft: #ddefe3;
  --warn: #7a4b00;
  --warn-soft: #fbefd5;
  --violet: #4a3a75;
  --violet-soft: #e8e4f2;
  --heading: "Bricolage Grotesque", system-ui, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
}
h1, h2, h3 { font-family: var(--heading); line-height: 1.15; margin: 0; }
h1 { font-family: var(--serif); font-size: 38px; font-weight: 400; letter-spacing: -0.01em; }
h2 { font-size: 18px; font-weight: 600; font-family: inherit; }
h3 { font-size: 16px; font-weight: 600; font-family: inherit; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
p { margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- top bar ---------- */
.topbar { background: var(--ground); color: var(--ink); padding: 0 32px; border-bottom: 1px solid var(--line); }
.topbar-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; min-height: 64px; }
.brand { font-family: var(--serif); font-weight: 400; font-size: 26px; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand:hover { color: var(--ink); }
.who { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.who form { display: inline; }
.linklike { background: none; border: 0; padding: 0; color: var(--ink); font: inherit; text-decoration: underline; cursor: pointer; min-height: 44px; }
.tabs { display: flex; flex-wrap: wrap; gap: 0 4px; margin-left: auto; }
.tabs a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  color: var(--ink); text-decoration: none; border-bottom: 2px solid transparent;
}
.tabs a:hover { color: var(--accent); }
.tabs a.on { border-bottom-color: var(--accent); }
.tabs a.signin { font-weight: 600; }

main.page { max-width: 1164px; margin: 0 auto; padding: 28px 32px 56px; display: flex; flex-direction: column; gap: 24px; }
.page-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }

/* ---------- leader layout ---------- */
.leader-shell { display: flex; flex-wrap: wrap; min-height: calc(100vh - 62px); }
.side { flex: 1 1 240px; max-width: 280px; min-width: 220px; background: #14201e; color: #e8efee; padding: 24px 16px; display: flex; flex-direction: column; gap: 20px; }
.side .brand { padding: 0 8px; display: block; color: #fff; font-size: 22px; font-family: var(--heading); font-weight: 700; }
.side .linklike { color: #cfe0dd; }
.side .sub { padding: 0 8px; font-size: 13px; color: #a9bab7; margin-top: 2px; }
.side nav { display: flex; flex-direction: column; gap: 4px; }
.side nav a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px;
  padding: 0 12px; border-radius: 8px; color: #e8efee; text-decoration: none;
}
.side nav a:hover { background: #1f2e2c; }
.side nav a.on { background: var(--accent); color: #fff; font-weight: 600; }
.badge { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: #f2c46d; color: #3b2600; font-size: 12px; font-weight: 600; text-align: center; }
.side .foot { margin-top: auto; padding: 12px; border-radius: 8px; background: #1f2e2c; font-size: 13px; color: #a9bab7; }
.leader-main { flex: 999 1 560px; min-width: 0; padding: 28px 32px 56px; display: flex; flex-direction: column; gap: 24px; }

/* ---------- cards and layout helpers ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.hero { background: var(--accent); color: #fff; border-radius: 12px; padding: 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.hero h2 { font-family: var(--heading); font-size: 24px; font-weight: 700; }
.split { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.split > .grow { flex: 999 1 380px; min-width: 0; }
.split > .side-card { flex: 1 1 300px; min-width: 0; }
.cols { display: flex; flex-wrap: wrap; gap: 24px; }
.cols > * { flex: 1 1 340px; min-width: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); text-decoration: none; }
.tile .num { font-family: var(--heading); font-size: 40px; font-weight: 700; line-height: 1; }
.tile .lbl { font-size: 16px; font-weight: 600; }
.row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding-top: 12px; border-top: 1px solid var(--soft); }
.row .info { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row .name { font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions form { margin: 0; }
.photo-row { display: flex; flex-wrap: wrap; gap: 16px 20px; }
.photo-row .thumb { flex: 0 0 160px; width: 160px; height: 110px; object-fit: cover; border-radius: 8px; background: #cfd9d6; }
.photo-row .body { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.gallery-grid figure { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.gallery-grid img { width: 100%; height: 160px; object-fit: cover; border-radius: 8px; background: #cfd9d6; }
.gallery-grid figcaption { font-size: 14px; }

/* ---------- chips and notices ---------- */
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--soft); color: var(--muted); white-space: nowrap; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--danger-soft); color: var(--danger); }
.chip.public { background: var(--accent-soft); color: var(--accent-dark); }
.chip.members { background: var(--violet-soft); color: var(--violet); }
.alert { padding: 12px 16px; border-radius: 8px; font-weight: 500; }
.alert.success { background: var(--ok-soft); color: var(--ok); }
.alert.error { background: var(--danger-soft); color: var(--danger); }
.alert.info { background: #e8f1f1; color: var(--accent-dark); }
.alert.warning { background: var(--warn-soft); color: var(--warn); }
.pill-note { font-size: 13px; color: var(--muted); background: var(--soft); padding: 4px 10px; border-radius: 999px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px;
  border: 1px solid #c5d0cd; border-radius: 8px; background: #fff; color: var(--ink);
  font: inherit; cursor: pointer; text-decoration: none;
}
.btn:hover { background: #f7faf9; color: var(--ink); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; font-weight: 600; }
.btn-danger:hover { background: #7f2222; color: #fff; }
.btn-light { background: #fff; border-color: #fff; color: var(--accent-dark); font-weight: 600; }
.hero { background: var(--accent); }
.btn-ghost-danger { color: var(--danger); }
.btn[disabled] { background: #eef2f1; border-color: var(--line); color: #6b7a77; cursor: not-allowed; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.field label { font-size: 13px; color: var(--muted); }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=tel],
.field input[type=date], .field input[type=datetime-local], .field input[type=url], .field select, .field textarea,
.field input[type=file] {
  min-height: 44px; padding: 8px 12px; border: 1px solid #c5d0cd; border-radius: 8px; font: inherit; background: #fff; max-width: 100%;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.field .error, .error { color: var(--danger); font-size: 13px; }
.field .hint, .hint { color: var(--muted); font-size: 13px; }
.field.check { flex-direction: row; }
label.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; color: var(--ink); }
label.check input { width: 20px; height: 20px; flex: none; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 8px; border-top: 1px solid var(--soft); }
.switch-row .t { display: flex; flex-direction: column; }
.switch-row .t span:first-child { font-weight: 500; }
.switch-row input { width: 22px; height: 22px; flex: none; }
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.inline-form .field { margin: 0; }
ul.errorlist { list-style: none; margin: 0; padding: 0; color: var(--danger); font-size: 13px; }

.narrow { max-width: 480px; margin: 0 auto; width: 100%; }
.footer { padding: 20px 32px 32px; color: var(--muted); font-size: 13px; text-align: center; }
.hero-public { padding: 72px 32px 56px; }
.hero-grid { max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 40px 64px; }
.hero-text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.hero-text h1 { font-family: var(--serif); font-weight: 300; font-size: clamp(40px, 6.2vw, 76px); line-height: 1.02; letter-spacing: -0.02em; color: var(--ink); }
.hero-text p { font-family: var(--serif); font-size: 20px; line-height: 1.6; max-width: 36em; color: var(--ink); margin: 0; }
.btn-solid, .btn-outline {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 28px;
  border: 2px solid var(--accent); border-radius: 3px; font-weight: 600; text-decoration: none; font-size: 16px;
}
.btn-solid { background: var(--accent); color: #fff; }
.btn-solid:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--accent); }
.btn-outline:hover { background: var(--accent-soft); color: var(--accent-dark); }
.frame { flex: 1 1 380px; min-width: 0; margin: 0; }
.frame-photo {
  position: relative; aspect-ratio: 3 / 2; background: #c9d1cd center / cover no-repeat; border-radius: 3px; overflow: hidden;
}
.frame-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.frame-photo img.slide { opacity: 0; transition: opacity 1.2s ease; }
.frame-photo img.slide.on { opacity: 1; }
.focus { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border: 1.5px solid rgba(255,255,255,.55); border-radius: 2px; pointer-events: none; }
.thirds {
  position: absolute; inset: 0 -1px -1px 0; pointer-events: none;
  background-image:
    linear-gradient(to left, rgba(214,170,60,.6) 1px, transparent 1px),
    linear-gradient(to top, rgba(214,170,60,.6) 1px, transparent 1px);
  background-size: 33.3333% 33.3333%;
}
.corner { position: absolute; width: 28px; height: 28px; border: 0 solid rgba(255,255,255,.9); pointer-events: none; }
.corner.tl { top: 18px; left: 18px; border-top-width: 2px; border-left-width: 2px; }
.corner.tr { top: 18px; right: 18px; border-top-width: 2px; border-right-width: 2px; }
.corner.bl { bottom: 18px; left: 18px; border-bottom-width: 2px; border-left-width: 2px; }
.corner.br { bottom: 18px; right: 18px; border-bottom-width: 2px; border-right-width: 2px; }

@media (max-width: 640px) {
  .topbar, main.page, .leader-main { padding-left: 16px; padding-right: 16px; }
  h1 { font-size: 26px; }
  .hero-public { padding: 40px 16px 32px; }
}

.details-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }
.photo-details { margin-top: 2px; }
details.more { border-top: 1px solid var(--soft); padding-top: 12px; }
details.more summary { cursor: pointer; font-weight: 600; min-height: 32px; }

.meter { height: 12px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--accent); }
.plain-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }

.table { border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-weight: 600; }

.round-heading { margin: 24px 0 8px; }
.gallery-details { margin: 4px 0 0; }
.gallery-details div { display: inline-block; margin-right: 10px; }
.gallery-details dt, .gallery-details dd { display: inline; margin: 0; }
.gallery-details dt { font-weight: 600; }
