:root {
  --bg: #faf7f2;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #55595f;
  --brand: #1f3a5f;
  --brand-dark: #142842;
  --accent: #2e6b4f;
  --danger: #a12a2a;
  --line: #d9d3c7;
  --focus: #ffb703;
}
* { box-sizing: border-box; }
html { font-size: 20px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.55;
}
a { color: var(--brand); }
.wrap { max-width: 760px; margin: 0 auto; padding: 20px 16px 60px; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px; background: var(--brand); color: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}
.topbar a, .topbar button { color: #fff; }
.topbar .brand { font-size: 1.1rem; font-weight: 600; text-decoration: none; }
.linkbtn {
  background: none; border: 0; font: inherit; text-decoration: underline; cursor: pointer; padding: 8px;
}
h1 { font-size: 2.1rem; line-height: 1.2; margin: 0.4em 0 0.5em; }
h2 { font-size: 1.5rem; margin: 1.2em 0 0.4em; }
p { margin: 0.6em 0; }
.muted { color: var(--muted); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px; margin: 18px 0;
}
label { display: block; font-size: 1.1rem; font-weight: 600; margin: 18px 0 6px;
  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif; }
input[type=text], input[type=email], input[type=password], input[type=url], textarea, select {
  width: 100%; font: inherit; font-size: 1.15rem; padding: 14px;
  border: 2px solid #8d877a; border-radius: 10px; background: #fff; color: var(--text);
}
textarea { min-height: 260px; resize: vertical; }
input[type=file] { font-size: 1.1rem; width: 100%; padding: 12px 0; }
input[type=radio], input[type=checkbox] { width: 26px; height: 26px; accent-color: var(--brand); flex: none; }
.choice { display: flex; align-items: center; gap: 12px; margin: 16px 0 6px; font-size: 1.15rem;
  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif; font-weight: 600; }
.choice label { margin: 0; }
:focus-visible { outline: 4px solid var(--focus); outline-offset: 2px; }

.btn {
  display: block; width: 100%; text-align: center; text-decoration: none; cursor: pointer;
  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 1.4rem; font-weight: 700; letter-spacing: 0.02em;
  min-height: 68px; padding: 16px 18px; margin: 14px 0;
  border: 0; border-radius: 14px; background: var(--brand); color: #fff;
}
.btn:hover { background: var(--brand-dark); }
.btn.green { background: var(--accent); }
.btn.green:hover { background: #235240; }
.btn.light { background: #fff; color: var(--brand); border: 3px solid var(--brand); }
.btn.light:hover { background: #eef2f8; }
.btn.danger { background: var(--danger); }
.btn.small { min-height: 48px; font-size: 1.05rem; padding: 10px 14px; width: auto; display: inline-block; margin: 6px 6px 6px 0; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

.msg { padding: 14px 16px; border-radius: 10px; margin: 16px 0; font-family: system-ui, Arial, sans-serif; font-size: 1.1rem; }
.msg.error { background: #fde8e8; border: 2px solid var(--danger); color: #5c1414; }
.msg.ok { background: #e6f4ec; border: 2px solid var(--accent); color: #123d28; }
.msg.info { background: #eaf0f8; border: 2px solid var(--brand); color: #12263f; }
.hidden { display: none !important; }

/* tribute */
.tribute { text-align: center; }
.tribute img.portrait {
  width: 100%; max-width: 340px; height: auto; border-radius: 16px; border: 6px solid #fff;
  box-shadow: 0 4px 18px rgba(0,0,0,0.18);
}
.tribute h1 { margin-bottom: 0.1em; }
.tribute .dates { font-size: 1.3rem; color: var(--muted); margin: 0 0 12px; }
.blurb { font-size: 1.2rem; text-align: left; margin: 14px 0; }
.service { text-align: left; }
.service h2 { margin-top: 0; }

/* posts */
.post { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin: 18px 0; }
.post .by { font-family: system-ui, Arial, sans-serif; font-size: 1.2rem; font-weight: 700; }
.post .when { font-family: system-ui, Arial, sans-serif; color: var(--muted); font-size: 0.95rem; margin-bottom: 10px; }
.post .ptitle { font-size: 1.4rem; font-weight: 700; margin: 8px 0; }
.post .pbody { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1.15rem; }
.post img.media, .post video.media { max-width: 100%; height: auto; border-radius: 10px; display: block; margin: 8px 0; background: #000; }
.post .embed { position: relative; padding-top: 56.25%; margin: 8px 0; }
.post .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 10px; }
.post .caption { font-style: italic; margin: 6px 0; overflow-wrap: anywhere; }
.badge { display: inline-block; font-family: system-ui, Arial, sans-serif; font-size: 0.9rem; font-weight: 700;
  padding: 3px 10px; border-radius: 99px; margin-left: 6px; }
.badge.pending { background: #fff1c7; color: #5a4300; }
.badge.approved { background: #d8f0e2; color: #123d28; }
.badge.rejected { background: #f3d9d9; color: #5c1414; }
.reviewrow { display: flex; gap: 14px; align-items: flex-start; }
.reviewrow .post { flex: 1; min-width: 0; margin: 0; }
.reviewrow { margin: 18px 0; }
.reviewrow input[type=checkbox] { margin-top: 20px; width: 32px; height: 32px; }

/* pager */
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 20px 0;
  font-family: system-ui, Arial, sans-serif; }
.pager button { min-width: 48px; min-height: 48px; padding: 6px 12px; font-size: 1.15rem; font-weight: 700;
  border: 2px solid var(--brand); background: #fff; color: var(--brand); border-radius: 10px; cursor: pointer; }
.pager button.current { background: var(--brand); color: #fff; }
.pager button[disabled] { opacity: 0.4; cursor: default; }
.pager .gap { padding: 0 4px; }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.tabs button { flex: 1; min-width: 120px; min-height: 52px; font-size: 1.05rem; font-weight: 700; border-radius: 10px;
  border: 2px solid var(--brand); background: #fff; color: var(--brand); cursor: pointer; font-family: system-ui, Arial, sans-serif; }
.tabs button.current { background: var(--brand); color: #fff; }
progress { width: 100%; height: 24px; }

@media (min-width: 900px) {
  html { font-size: 21px; }
  .wrap { max-width: 820px; padding-top: 30px; }
  .landing { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; max-width: 1060px; align-items: start; }
  .landing .card { margin-top: 0; }
}
