/* Look adapted from goodshepherd.css: sky-blue header, green hill footer, white cards with green top rule */
:root {
  /* Sky blues */
  --gs-blue-900: #0c4a8c;
  --gs-blue-700: #0f55a3;
  --gs-blue-500: #2a66b0;
  --gs-blue-100: #5e95d0;
  --gs-blue-50:  #e8f0f9;
  /* Hill greens */
  --gs-green-900: #006b3a;
  --gs-green-700: #00793e;
  --gs-green-500: #11994b;
  --gs-green-300: #3bb54a;
  --gs-green-50:  #e9f6ec;
  /* Neutrals */
  --gs-white: #fdfdfd;
  --gs-gray-100: #f2f2f2;
  --gs-gray-500: #6b7280;
  --gs-ink: #1b2a3a;

  --primary: var(--gs-blue-700); --primary-hover: var(--gs-blue-900);
  --secondary: var(--gs-green-500); --secondary-hover: var(--gs-green-700);
  --accent: var(--gs-green-300);
  --bg: var(--gs-white); --surface: var(--gs-gray-100);
  --fg: var(--gs-ink); --muted: var(--gs-gray-500); --on-dark: var(--gs-white);
  --border: #d6dee8;
  --danger: #b3261e; --danger-bg: #fdecea;

  --gradient-sky: linear-gradient(180deg, var(--gs-blue-700) 0%, var(--gs-blue-500) 55%, var(--gs-blue-100) 100%);
  --gradient-hill: linear-gradient(90deg, var(--gs-green-500) 0%, var(--gs-green-700) 100%);
  --radius: 8px;
  --shadow: 0 2px 8px rgba(12, 74, 140, .15);
  --shadow-hover: 0 6px 16px rgba(12, 74, 140, .22);
  --focus-ring: 0 0 0 3px rgba(59, 181, 74, .35);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; display: flex; flex-direction: column; background: var(--bg); color: var(--fg);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
main { flex: 1; width: 100%; }
h1, h2, h3 { color: var(--primary); line-height: 1.25; }
h4, h5, h6 { color: var(--secondary-hover); }
a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--secondary); }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }

/* ---------- Header / footer ---------- */
.site-header { background: var(--gradient-sky); color: var(--on-dark); padding: 1rem 0;
  border-bottom: 6px solid var(--accent); margin-bottom: 2rem; }
.site-header .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem 1.5rem; }
.brand { display: flex; align-items: center; gap: .75rem; font-size: 1.6rem; font-weight: 700; line-height: 1.2;
  color: var(--on-dark); text-decoration: none; }
.brand > a { display: flex; }
.brand-logo { width: 56px; height: 56px; flex-shrink: 0; border-radius: 50%; background: var(--gs-white);
  padding: 2px; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.site-header a, .site-header button.link { color: var(--on-dark); text-decoration: none; }
.site-header a:hover, .site-header button.link:hover { color: var(--on-dark); text-decoration: underline; }
nav { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; font-size: .92rem; }

.site-footer { background: var(--gradient-hill); color: var(--on-dark); padding: 2rem 0; margin-top: 3rem; font-size: .9rem; }
.site-footer a { color: var(--gs-green-50); }

.page-title { font-size: 1.75rem; margin: 0 0 1.25rem; }

/* ---------- Cards / surfaces ---------- */
.card, .post, .panel {
  background: var(--bg); border: 1px solid var(--border); border-top: 4px solid var(--secondary);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card { padding: 1.25rem 1.5rem; margin-bottom: 1.25rem; transition: box-shadow .15s, transform .15s; }
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.card h2 { margin: 0 0 .25rem; font-size: 1.35rem; line-height: 1.3; }
.card h2 a { color: var(--primary); text-decoration: none; }
.card h2 a:hover { color: var(--secondary); }
.card p { margin: .5rem 0; }
.meta { color: var(--muted); font-size: .85rem; margin-bottom: .75rem; }
.more { font-weight: 600; font-size: .9rem; text-decoration: none; color: var(--secondary-hover); }
.more:hover { color: var(--primary); }
.empty { color: var(--muted); text-align: center; }

.post { padding: 2rem; }
.post h1 { margin-top: 0; font-size: 2rem; line-height: 1.2; }
.post-body img { max-width: 100%; height: auto; border-radius: var(--radius); }
.post-body blockquote { border-left: 4px solid var(--accent); margin-left: 0; padding: .25rem 1rem;
  background: var(--gs-green-50); color: var(--fg); border-radius: 0 var(--radius) var(--radius) 0; }
.post-body pre { background: var(--surface); padding: 1rem; border-radius: var(--radius); overflow-x: auto; }
.post-body table { border-collapse: collapse; display: block; overflow-x: auto; }
.post-body td, .post-body th { border: 1px solid var(--border); padding: .4rem .6rem; }
.post-body th { background: var(--gs-blue-50); }
.post-body hr { border: 0; height: 4px; background: var(--accent); border-radius: 2px; }

.pager { display: flex; justify-content: space-between; align-items: center; margin: 2rem 0; color: var(--muted); }

/* ---------- Forms ---------- */
.panel { padding: 1.75rem; }
.panel.narrow { max-width: 420px; margin: 0 auto; }
.panel h1, .panel h2 { margin-top: 0; }
label { display: block; font-weight: 600; margin-bottom: 1rem; }
label small { display: block; margin-top: .3rem; font-weight: 400; color: var(--muted); }
input[type=text], input:not([type]), input[type=password], input[type=datetime-local], textarea, select {
  display: block; width: 100%; margin-top: .3rem; padding: .5rem .75rem; font: inherit; color: var(--fg);
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus-ring); }
input[type=checkbox] { accent-color: var(--secondary); width: 1.1rem; height: 1.1rem; }
label.check { display: flex; gap: .5rem; align-items: center; margin-top: 1rem; }
.add-user { margin-top: 2rem; }
.tox-tinymce { margin-bottom: 1rem; border-radius: var(--radius) !important; }
.form-actions { display: flex; gap: 1rem; align-items: center; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; padding: .6rem 1.25rem; border: 2px solid transparent; border-radius: var(--radius);
  background: var(--primary); color: var(--on-dark); font: 600 .95rem/1.2 inherit; text-decoration: none;
  cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.btn:hover { background: var(--primary-hover); color: var(--on-dark); }
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
button.link { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; cursor: pointer; }
button.link:hover { text-decoration: underline; color: var(--secondary); }
button.link.danger { color: var(--danger); }
form.inline { display: inline; }

/* ---------- Admin tables ---------- */
.toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.toolbar h1 { margin: 0 0 1rem; }
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden; background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.admin-table th, .admin-table td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--border); font-size: .92rem; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table th { background: var(--primary); color: var(--on-dark); font-weight: 600; }
.admin-table tbody tr:nth-child(even) { background: var(--gs-blue-50); }
.admin-table .actions { white-space: nowrap; display: flex; gap: .8rem; }
.badge { display: inline-block; font-size: .75rem; padding: .15rem .6rem; border-radius: 999px; font-weight: 600; }
.badge.pub { background: var(--gs-green-50); color: var(--gs-green-700); }
.badge.draft { background: var(--gs-blue-50); color: var(--gs-blue-700); }

/* ---------- Flash messages ---------- */
.flash { padding: .75rem 1rem; margin-bottom: 1rem; border-left: 5px solid var(--primary);
  background: var(--gs-blue-50); border-radius: var(--radius); }
.flash.success { border-left-color: var(--secondary); background: var(--gs-green-50); }
.flash.error { border-left-color: var(--danger); background: var(--danger-bg); }

@media (max-width: 480px) {
  .brand { font-size: 1.35rem; }
  .brand-logo { width: 44px; height: 44px; }
  .post { padding: 1.25rem; }
}
