/* ---------- Design tokens ---------- */
:root {
  --bg: #000;
  --panel: rgba(8, 10, 8, 0.78);
  --panel-border: rgba(160, 190, 160, 0.25);
  --text: #eef1ee;
  --text-muted: #b9c4b9;
  --accent: #d4bd82;
  --accent-hover: #ecd9a0;
  --focus: #ffffff;
  --radius: 8px;
  --max-width: 960px;
  --banner-height: 64px;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--banner-height) + 1rem); /* anchor links won't hide under the banner */
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  color: var(--text);
  font-family: Verdana, Geneva, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
}

/* Fixed background image */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--bg) url("images/celtic-cross.jpg") center center / contain no-repeat;
}

h1, h2, h3 {
  line-height: 1.25;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 0.5rem; }
h2 { font-size: 1.5rem; margin-top: 2rem; }
h3 { font-size: 1.15rem; }

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-hover);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--accent);
  color: #000;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  z-index: 200;
  font-weight: bold;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Sticky banner navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.92);
  border-bottom: 1px solid var(--panel-border);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  min-height: var(--banner-height);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 1.1rem;
  font-weight: bold;
  letter-spacing: 0.08em;
  color: var(--text);
  text-decoration: none;
  text-transform: uppercase;
}

.brand:hover {
  color: var(--accent);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.site-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.site-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
  border-radius: var(--radius) var(--radius) 0 0;
}

/* Hamburger button (only shown on small screens when JavaScript is running) */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, background 0.2s, opacity 0.2s;
}

.nav-toggle-bars {
  position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after  { top: 7px; }

/* Turn the bars into an X when the menu is open */
.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Breadcrumbs (use on deeper pages like blog posts and forum threads) ---------- */
.breadcrumb {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  padding: 1rem 1.25rem 0;
  font-size: 0.85rem;
}

.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.breadcrumb li + li::before {
  content: "/";
  color: var(--text-muted);
  margin-right: 0.25rem;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.breadcrumb [aria-current="page"] {
  color: var(--text);
}

/* ---------- Layout ---------- */
main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.page-title {
  text-shadow: 0 2px 10px #000;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.panel > :first-child { margin-top: 0; }
.panel > :last-child { margin-bottom: 0; }

/* ---------- Hero (home) ---------- */
.hero {
  text-align: center;
  padding: 5rem 1.5rem;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  margin-bottom: 1.5rem;
}

.hero h1 {
  color: var(--text);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9);
}

.hero .tagline {
  color: var(--accent);
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  margin: 0 auto 1.25rem;
}

.hero p {
  max-width: 55ch;
  margin: 0 auto 1.75rem;
  color: var(--text);
}

.section-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-shadow: 0 1px 6px #000;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  min-height: 44px;
  background: var(--accent);
  color: #000;
  font-family: inherit;
  font-size: 1rem;
  font-weight: bold;
  text-decoration: none;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.button:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #000;
}

.button.secondary {
  background: transparent;
  color: var(--accent);
  margin-left: 0.5rem;
}

.button.secondary:hover {
  background: rgba(212, 189, 130, 0.15);
  color: var(--accent-hover);
}

/* ---------- Cards grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.card-grid .panel {
  margin-bottom: 0;
}

.meta {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ---------- FAQ ---------- */
details {
  border-bottom: 1px solid var(--panel-border);
  padding: 0.25rem 0;
}

details:last-of-type {
  border-bottom: none;
}

summary {
  cursor: pointer;
  padding: 0.85rem 0;
  font-weight: bold;
  color: var(--text);
}

summary:hover {
  color: var(--accent);
}

details p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

/* ---------- Forms ---------- */
.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: bold;
}

input:not([type="checkbox"]),
textarea,
select {
  width: 100%;
  padding: 0.75rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(160, 190, 160, 0.5);
  border-radius: var(--radius);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

textarea {
  min-height: 160px;
  resize: vertical;
}

/* ---------- Forms: extras ---------- */
select {
  padding: 0.6rem 0.75rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(160, 190, 160, 0.5);
  border-radius: var(--radius);
  max-width: 100%;
  min-height: 44px;
}

textarea.tall { min-height: 320px; }

.hint { margin: 0.35rem 0 0; font-size: 0.82rem; color: var(--text-muted); }
.form-group.check { display: flex; gap: 0.6rem; align-items: flex-start; }
.form-group.check input { margin-top: 0.35rem; width: 1.1rem; height: 1.1rem; flex: none; }
.form-group.check label { margin: 0; font-weight: normal; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.narrow { max-width: 560px; margin-left: auto; margin-right: auto; }
.inline-form { display: inline; margin: 0; }

.link-button {
  background: none; border: 0; padding: 0.4rem 0.25rem; font: inherit; font-size: 0.85rem;
  color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.link-button:hover { color: var(--accent-hover); }

.button.small { padding: 0.4rem 1rem; min-height: 36px; font-size: 0.9rem; }
.button.secondary { margin-left: 0.5rem; }

/* ---------- Notices ---------- */
.notice {
  padding: 0.8rem 1rem; margin: 0 0 1rem; border-radius: var(--radius);
  border: 1px solid var(--panel-border); background: rgba(0, 0, 0, 0.8); color: var(--text);
}
.notice-error   { border-color: #e07a7a; background: rgba(90, 20, 20, 0.85); }
.notice-success { border-color: #7fc68a; background: rgba(20, 70, 30, 0.85); }
.badge {
  display: inline-block; padding: 0 0.5rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: #000; background: var(--accent); border-radius: 999px; vertical-align: middle;
}

/* ---------- Account bar + breadcrumbs ---------- */
.account-bar { background: rgba(0, 0, 0, 0.85); border-bottom: 1px solid var(--panel-border); font-size: 0.85rem; }
.account-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0.25rem 1.25rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem 1rem;
}
.account-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; align-items: center; }
.crumbs { margin: 0 0 1rem; font-size: 0.85rem; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem; }
.crumbs li + li::before { content: "/"; color: var(--text-muted); margin-right: 0.25rem; }
.crumbs a { color: var(--text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }

/* ---------- Forum ---------- */
.board-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.board-head .page-title { margin: 0; }
.board-head .meta { margin: 0; }
.jump { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; }
.jump label { margin: 0; }
.jump select { width: auto; min-width: 14rem; }
.state-list { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; font-size: 0.9rem; }

.sortbar { display: flex; gap: 0.25rem; margin: 0 0 1rem; flex-wrap: wrap; }
.sortbar a {
  padding: 0.5rem 1rem; min-height: 40px; display: inline-flex; align-items: center; text-decoration: none;
  color: var(--text-muted); background: rgba(0, 0, 0, 0.7); border: 1px solid var(--panel-border); border-radius: var(--radius);
}
.sortbar a:hover { color: var(--text); }
.sortbar a[aria-current] { color: #000; background: var(--accent); border-color: var(--accent); font-weight: bold; }

.thread-row, .comment-wrap { display: flex; gap: 0.9rem; align-items: flex-start; }
.thread-row {
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius);
  padding: 0.9rem 1.1rem; margin-bottom: 0.6rem; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.thread-main { flex: 1; min-width: 0; }
.thread-row h3 { margin: 0 0 0.25rem; font-size: 1.05rem; overflow-wrap: anywhere; }
.thread-row .meta, .thread-main .meta { margin: 0; }
.thread-full h1 { font-size: clamp(1.4rem, 3.5vw, 2rem); margin: 0 0 0.4rem; overflow-wrap: anywhere; }

.votes { display: flex; flex-direction: column; align-items: center; min-width: 2.4rem; margin: 0; }
.vote {
  width: 40px; height: 32px; padding: 0; font-size: 1rem; line-height: 1; cursor: pointer;
  color: var(--text-muted); background: transparent; border: 0; border-radius: 6px;
}
.vote:hover { color: var(--text); background: rgba(255, 255, 255, 0.1); }
.vote.active { color: var(--accent); }
.score { font-weight: bold; font-size: 0.95rem; }

.prose { overflow-wrap: anywhere; }
.prose a { word-break: break-all; }

.comment-tree { margin-top: 1rem; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .comment-list { margin-left: 1.1rem; padding-left: 0.9rem; border-left: 2px solid var(--panel-border); }
.comment-list.flat .comment-list { margin-left: 0; padding-left: 0; }
.comment { margin: 0.6rem 0; }
.comment-wrap {
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 0.7rem 0.9rem;
}
.comment-body { flex: 1; min-width: 0; }
.comment-body .meta { margin: 0 0 0.3rem; }
.comment-body .prose p, .comment-body .prose { margin: 0; }
.comment-body.removed { padding: 0.4rem 0.9rem; }
.comment-actions { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; align-items: flex-start; margin-top: 0.4rem; }
.reply summary { font-weight: normal; font-size: 0.85rem; padding: 0.4rem 0; color: var(--accent); }
.reply[open] { flex-basis: 100%; }
.comment-form textarea { min-height: 90px; margin-bottom: 0.5rem; }

.pager { display: flex; gap: 1.5rem; justify-content: center; align-items: center; margin: 1.5rem 0; }

/* ---------- Private chat ---------- */
.dm-link { font-size: 0.85rem; }
.convo {
  display: grid; grid-template-columns: 1fr auto; gap: 0.1rem 1rem; padding: 0.85rem 1.1rem; margin-bottom: 0.6rem;
  background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius);
  color: var(--text); text-decoration: none;
}
.convo:hover { border-color: var(--accent); }
.convo.unread { border-left: 4px solid var(--accent); }
.convo-name { font-weight: bold; }
.convo-snippet { grid-column: 1; color: var(--text-muted); font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.convo .meta { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.chat-log { max-height: 55vh; min-height: 200px; overflow-y: auto; padding: 0.25rem; margin-bottom: 1rem; display: flex; flex-direction: column; gap: 0.6rem; }
.msg { display: flex; }
.msg.mine { justify-content: flex-end; }
.msg-bubble { max-width: min(36rem, 85%); padding: 0.55rem 0.85rem; border-radius: 14px; background: rgba(255, 255, 255, 0.1); border: 1px solid var(--panel-border); }
.msg.mine .msg-bubble { background: rgba(212, 189, 130, 0.2); border-color: rgba(212, 189, 130, 0.5); }
.msg-bubble .prose { margin: 0; }
.msg-bubble .meta { margin: 0.25rem 0 0; font-size: 0.75rem; }
.chat-form { display: flex; gap: 0.6rem; align-items: flex-end; }
.chat-form textarea { min-height: 70px; }
.chat-empty { text-align: center; margin: auto; }

/* ---------- Friends + reports ---------- */
.dot { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 50%; margin-right: 0.4rem; background: #6b7280; }
.online .dot { background: #4ade80; box-shadow: 0 0 6px #4ade80; }
.friend-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0 0 1rem; }
.friend-strip-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-right: 0.25rem; }
.friend-chip {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 0.8rem; font-size: 0.9rem; text-decoration: none;
  color: var(--text); background: rgba(0, 0, 0, 0.75); border: 1px solid var(--panel-border); border-radius: 999px;
}
.friend-chip:hover { border-color: var(--accent); }
.friend-chip.current { background: var(--accent); color: #000; border-color: var(--accent); }
.friend-chip .badge { margin-left: 0.4rem; }
.friend-chip.more { color: var(--text-muted); }
.friend-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem 1rem; padding: 0.8rem 1.1rem; margin-bottom: 0.5rem; }
.friend-name { display: inline-flex; align-items: center; gap: 0.25rem; }
.report-link, .reported { font-size: 0.75rem; }
.reported { color: var(--text-muted); }
.report-preview { margin: 0 0 1.25rem; max-height: 16rem; overflow-y: auto; border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 0.25rem 0.9rem; background: rgba(0, 0, 0, 0.5); }
.report-preview p { margin: 0.6rem 0; overflow-wrap: anywhere; }
.report-preview .flagged { border-left: 3px solid #e07a7a; padding-left: 0.6rem; }
.snapshot { white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; font-size: 0.9rem; background: rgba(0, 0, 0, 0.55); border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 0.8rem; margin: 0.75rem 0 0.25rem; }

/* ---------- Avatars + profiles ---------- */
.avatar { border-radius: 50%; vertical-align: middle; background: #1a211a; flex: none; }
.avatar.inline { margin-right: 0.15rem; }
.who { display: inline-flex; align-items: center; gap: 0.4rem; }
.profile-head { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; margin-bottom: 1rem; }
.profile-head h1 { margin: 0 0 0.25rem; }
.profile-head .meta { margin: 0 0 0.75rem; }
.profile-actions { margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.profile-actions .button.secondary { margin-left: 0; }
.avatar-picker { border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 1rem; margin: 0 0 1.5rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 0.75rem; }
.avatar-picker legend { padding: 0 0.5rem; font-weight: bold; }
.avatar-choice { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.35rem; margin: 0; padding: 0.6rem 0.3rem; border: 2px solid transparent; border-radius: var(--radius); cursor: pointer; font-weight: normal; font-size: 0.8rem; text-align: center; }
.avatar-choice:hover { background: rgba(255, 255, 255, 0.08); }
.avatar-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.avatar-choice:has(input:checked) { border-color: var(--accent); background: rgba(212, 189, 130, 0.15); }
.avatar-choice:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
#about-count.over { color: #ff9b9b; font-weight: bold; }

/* ---------- Home: quotation ---------- */
.hero .quote { max-width: 64ch; margin: 0 auto 1.5rem; padding: 0; border: 0; }
.hero .quote p { max-width: none; margin: 0 0 0.6rem; }
.hero .quote .latin { font-style: italic; color: var(--accent); font-size: 0.98rem; }
.hero .quote .english { color: var(--text); font-size: 1rem; }
.hero .quote .english + .latin { margin-top: 1.4rem; }
.hero .quote-cite { max-width: 64ch; margin: 0 auto 1.75rem; font-size: 0.85rem; color: var(--text-muted); }
.hero .quote-cite a { color: var(--text-muted); }

/* ---------- Tables (moderation) ---------- */
.scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th, .table td { text-align: left; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--panel-border); vertical-align: middle; }
.table th { color: var(--text-muted); font-weight: bold; }
.app-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; align-items: center; }
.app-actions input[type="text"] { flex: 1; min-width: 12rem; }
.app-actions .button.secondary { margin-left: 0; }

code { background: rgba(255, 255, 255, 0.12); padding: 0.1rem 0.35rem; border-radius: 4px; }

@media (max-width: 760px) {
  .jump select { min-width: 0; flex: 1; }
  .thread-row, .comment-wrap { gap: 0.6rem; }
}

/* ---------- Quotations in content panels ---------- */
.panel blockquote {
  margin: 1.25rem 0; padding: 0.75rem 1.25rem; border-left: 3px solid var(--accent);
  background: rgba(255, 255, 255, 0.05); border-radius: 0 var(--radius) var(--radius) 0;
}
.panel blockquote p { margin: 0 0 0.5rem; font-style: italic; }
.panel blockquote footer { font-size: 0.85rem; color: var(--text-muted); font-style: normal; }
.panel blockquote footer a { color: var(--accent); }

.promise { font-size: 1.35rem; font-weight: bold; color: var(--accent); letter-spacing: 0.03em; }

/* ---------- Blog ---------- */
.lede { color: var(--text-muted); margin: -0.25rem 0 1rem; text-shadow: 0 1px 6px #000; }
.blog-section { margin-top: 2.25rem; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1rem; margin-bottom: 0.9rem; }
.section-head h2 { margin: 0; font-size: 1.7rem; text-shadow: 0 2px 10px #000; }
.section-head h2 a { color: var(--text); text-decoration: none; border-bottom: 2px solid var(--accent); }
.section-head .meta { margin: 0; text-shadow: 0 1px 6px #000; }
.post-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.post-card-img { display: block; }
.post-card-img img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; }
.post-card-body { padding: 1.1rem 1.25rem 1.3rem; }
.post-card-body h3 { margin: 0.2rem 0 0.5rem; font-size: 1.15rem; }
.post-card-body h3 a { color: var(--text); text-decoration: none; }
.post-card-body h3 a:hover { color: var(--accent); }
.post-card-body p { margin: 0 0 0.6rem; }
.post-card-body .meta { margin: 0; }
.article { max-width: 780px; margin-left: auto; margin-right: auto; }
.article h1 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); margin: 0.2rem 0 1rem; }
.post-hero { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: var(--radius); margin: 0 0 1rem; border: 1px solid var(--panel-border); }
.article .prose h2 { font-size: 1.35rem; margin: 2rem 0 0.6rem; color: var(--accent); }
.article .prose h3 { font-size: 1.1rem; margin: 1.6rem 0 0.4rem; }
.article .prose p, .article .prose li { line-height: 1.8; }
.article .prose ul { padding-left: 1.3rem; }
.article .prose blockquote { font-size: 0.97rem; }
.article .prose blockquote p { font-style: normal; }
.article .disclaimer { margin-top: 2rem; font-size: 0.85rem; }

.keybox { display: block; margin: 0.6rem 0; padding: 0.6rem; word-break: break-all; font-size: 1rem; user-select: all; }

/* ---------- Footer ---------- */
.site-footer {
  background: rgba(0, 0, 0, 0.88);
  border-top: 1px solid var(--panel-border);
  text-align: center;
  padding: 1.25rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-nav ul {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.5rem;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.site-footer p {
  margin: 0;
}

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
  :root {
    --banner-height: 60px;
  }

  /* Hamburger layout (only applies when JavaScript is available) */
  .js .nav-toggle {
    display: inline-flex;
  }

  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.97);
    border-bottom: 1px solid var(--panel-border);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.7);
    padding: 0.5rem 1.25rem 1rem;
  }

  .js .site-nav.open {
    display: block;
  }

  .js .site-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .js .site-nav a {
    min-height: 48px;
    padding: 0 0.5rem;
    font-size: 1rem;
    border-bottom: 1px solid rgba(160, 190, 160, 0.15);
    border-radius: 0;
  }

  .js .site-nav li:last-child a {
    border-bottom: none;
  }

  .js .site-nav a[aria-current="page"] {
    box-shadow: inset 3px 0 0 var(--accent);
    padding-left: 0.85rem;
    border-radius: 0;
  }

  /* Fallback if JavaScript is disabled: links simply wrap under the brand */
  .no-js-fallback .site-nav {
    width: 100%;
    padding-bottom: 0.5rem;
  }

  .hero {
    padding: 3rem 1rem;
  }

  .button.secondary {
    margin: 0.75rem 0 0;
  }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}