:root {
  --ink: #2b1d14;
  --ink-soft: #5a4634;
  --parchment: #f4ead8;
  --parchment-deep: #e9dbbf;
  --parchment-side: #ecdfc4;
  --rule: #c9b48a;
  --ember: #7a2414;
  --ember-bright: #a0351d;
  --flame: #d9822b;
  --gold: #b8892e;
  --gold-light: #e0b858;
  --moss: #2f5a2e;
  --night: #1a120e;
  --night-soft: #2a1a12;
  --plum: #4a2a4f;
}

* { box-sizing: border-box; }

html { background: var(--night); }

body {
  margin: 0;
  font-family: Georgia, "Palatino Linotype", "Book Antiqua", Palatino, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--night);
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(217,130,43,0.10), transparent 60%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.012) 0 2px, transparent 2px 6px);
}

a { color: var(--moss); text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 2px; }
a:hover, a:focus { color: var(--ember-bright); text-decoration-style: solid; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--gold-light); color: var(--night); padding: 6px 12px; z-index: 50;
}
.skip:focus { left: 8px; top: 8px; }

#page {
  max-width: 1020px;
  margin: 18px auto 30px;
  background: var(--parchment);
  border: 1px solid #8a6a3a;
  box-shadow: 0 0 0 4px #3b2a1c, 0 0 0 5px #8a6a3a, 0 10px 40px rgba(0,0,0,0.7);
}

#topbar {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px;
  background: var(--night-soft);
  color: #d7c39b;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 16px;
  border-bottom: 1px solid #5a3a26;
}
#topbar .greeting { color: var(--gold-light); }

#masthead {
  background-color: #241812;
  background-image:
    radial-gradient(ellipse at 50% 120%, rgba(217,130,43,0.55), rgba(122,36,20,0.25) 40%, transparent 70%),
    radial-gradient(ellipse at 20% 0%, rgba(74,42,79,0.35), transparent 60%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.015) 0 1px, transparent 1px 7px);
  padding: 26px 30px 22px;
  border-bottom: 1px solid #8a6a3a;
}
.brand { display: flex; align-items: center; gap: 18px; text-decoration: none; color: inherit; width: max-content; max-width: 100%; }
.brand:hover, .brand:focus { text-decoration: none; }
.flame { display: block; filter: drop-shadow(0 0 8px rgba(242,193,78,0.55)); animation: flicker 3.2s infinite ease-in-out; transform-origin: 50% 100%; }
.brandtext { display: flex; flex-direction: column; }
.sitename {
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: 40px; line-height: 1.05; letter-spacing: 0.06em;
  color: var(--gold-light);
  text-shadow: 0 2px 0 #3a2410, 0 0 18px rgba(242,193,78,0.35);
}
.tagline { color: #e4d2aa; font-style: italic; font-size: 14px; margin-top: 6px; letter-spacing: 0.03em; }

@keyframes flicker {
  0%, 100% { transform: scaleY(1) scaleX(1); opacity: 1; }
  25% { transform: scaleY(1.03) scaleX(0.98); opacity: 0.94; }
  50% { transform: scaleY(0.98) scaleX(1.02); opacity: 1; }
  75% { transform: scaleY(1.02) scaleX(0.99); opacity: 0.97; }
}

#mainnav {
  background: linear-gradient(#6a2318, #4a160e 55%, #3d110b);
  border-top: 1px solid #a04a36;
  border-bottom: 2px solid #1a0a08;
  box-shadow: inset 0 1px 0 rgba(255,220,150,0.18);
}
#navtoggle { display: none; }
#navlist {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center;
}
#navlist li { margin: 0; }
#navlist a {
  display: block;
  padding: 9px 11px;
  color: #f3dfb0;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 12px;
  white-space: nowrap;
  border-left: 1px solid rgba(255,255,255,0.08);
  border-right: 1px solid rgba(0,0,0,0.35);
}
#navlist a:hover, #navlist a:focus { background: rgba(255,220,150,0.13); color: #fff3d6; }
#navlist li.current a { background: #8a2e1e; color: #fff3d6; box-shadow: inset 0 3px 6px rgba(0,0,0,0.45); }

#columns { display: grid; grid-template-columns: 232px 1fr; }

#sidebar {
  background: var(--parchment-side);
  border-right: 1px solid var(--rule);
  padding: 10px 0 20px;
}
.box {
  margin: 12px 12px 0;
  border: 3px double #9a7a46;
  background: #f7efdd;
}
.box h3 {
  margin: 0;
  background: linear-gradient(#6b3a26, #4a2418);
  color: #f0d9a8;
  font-size: 12px;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 6px 10px;
  border-bottom: 1px solid #2a1a12;
}
.boxbody { padding: 8px 10px; }
.boxbody p { margin: 4px 0; }
.sidenav { list-style: none; margin: 0; padding: 0; }
.sidenav li a {
  display: block; padding: 5px 10px 5px 22px; font-size: 14px;
  border-bottom: 1px dotted var(--rule);
  text-decoration: none;
  position: relative;
}
.sidenav li a::before { content: "\00b7"; position: absolute; left: 10px; color: var(--gold); }
.sidenav li:last-child a { border-bottom: 0; }
.sidenav li a:hover { background: var(--parchment-deep); }
.sidenav li.current a { font-weight: bold; background: #efe3c6; color: var(--ember); }
.sidenav li.current a::before { content: "\25B8"; }
.moonglyph { font-size: 38px; text-align: center; line-height: 1; margin: 2px 0 6px; }
.blessing { font-style: italic; font-size: 14px; color: var(--ink-soft); }
.center { text-align: center; }
.counter { margin: 4px 0; }
.counter span {
  display: inline-block; width: 18px; height: 26px; line-height: 26px;
  background: #0b0b0b; color: #7cff4a;
  font-family: "Courier New", Courier, monospace; font-size: 18px; font-weight: bold;
  border: 1px solid #444; border-right: 0; text-align: center;
}
.counter span:last-child { border-right: 1px solid #444; }
.small { font-size: 12.5px; color: var(--ink-soft); }

#content { padding: 20px 32px 44px; min-width: 0; }
.breadcrumb { font-size: 12.5px; color: var(--ink-soft); margin: 0 0 10px; text-transform: uppercase; letter-spacing: 0.06em; }
.breadcrumb .sep { color: var(--gold); margin: 0 2px; }

h1, h2, h3, h4 { font-family: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif; font-weight: normal; line-height: 1.2; }
h1 { font-size: 32px; color: var(--ember); margin: 0 0 18px; padding-bottom: 8px; border-bottom: 3px double var(--gold); }
h2 { font-size: 23px; color: #5a3a1e; margin: 30px 0 10px; }
h2::before { content: "\2726\00a0"; color: var(--gold); font-size: 16px; vertical-align: 2px; }
h3 { font-size: 18px; color: var(--ember); margin: 22px 0 6px; }
h4 { font-size: 16px; font-weight: bold; color: var(--ink-soft); margin: 18px 0 4px; }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 14px; padding-left: 26px; }
li { margin-bottom: 5px; }
strong { color: #3d2a1a; }
em { color: inherit; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 24px 0; }

blockquote {
  margin: 18px 0; padding: 12px 18px;
  border-left: 4px solid var(--gold);
  background: #f1e5cb;
  font-style: italic;
  color: var(--ink-soft);
}
blockquote p:last-child { margin-bottom: 0; }
blockquote cite { display: block; font-style: normal; font-size: 13px; margin-top: 6px; color: var(--ink-soft); }

.lead { font-size: 18px; color: var(--ink-soft); font-style: italic; }
.note, .callout, .warning {
  border: 1px solid var(--gold); background: #fbf3df; padding: 12px 16px; margin: 18px 0;
}
.note h3, .callout h3, .warning h3 { margin-top: 0; }
.warning { border-color: var(--ember-bright); background: #f6e3d9; }
.callout { border-width: 3px; border-style: double; }

table { border-collapse: collapse; width: 100%; margin: 14px 0 20px; font-size: 15px; background: #faf3e3; }
th, td { border: 1px solid var(--rule); padding: 7px 10px; text-align: left; vertical-align: top; }
th { background: var(--parchment-deep); color: #3d2a1a; font-weight: bold; letter-spacing: 0.03em; }
tbody tr:nth-child(even) td { background: #f3e9d3; }
table caption { caption-side: top; text-align: left; font-style: italic; color: var(--ink-soft); padding: 4px 0; }
.tablewrap { overflow-x: auto; }

dl { margin: 0 0 14px; }
dt { font-weight: bold; color: var(--ember); margin-top: 12px; }
dd { margin: 2px 0 0 0; }
.glossary .entry { padding: 8px 0; border-bottom: 1px dotted var(--rule); }
.glossary .entry dt { margin-top: 0; }

.filterbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 14px; padding: 10px 12px; background: var(--parchment-deep); border: 1px solid var(--rule); }
.filterbar label { font-weight: bold; font-size: 14px; }
.filterbar input {
  font-family: inherit; font-size: 15px; padding: 5px 8px; border: 1px solid #8a6a3a; background: #fffaf0; color: var(--ink);
  min-width: 220px;
}
.filterbar .count { font-size: 13px; color: var(--ink-soft); }
.hidden { display: none !important; }

.btn, button.btn, input[type="submit"] {
  display: inline-block;
  font-family: inherit; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase;
  color: #2b1d14; background: linear-gradient(#f0cf7a, #c9962f);
  border: 2px outset #d8ae4a; padding: 8px 16px; cursor: pointer; text-decoration: none;
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.btn:hover, .btn:focus, input[type="submit"]:hover { background: linear-gradient(#f7dc92, #d4a23a); color: #1a120e; text-decoration: none; }
.btn:active, input[type="submit"]:active { border-style: inset; }
.btn.secondary { background: linear-gradient(#efe3c6, #d9c79a); border-color: #c9b48a; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; }

.hero {
  margin: 0 0 22px; padding: 26px 28px 22px;
  background: #2a1a12;
  background-image: radial-gradient(ellipse at 50% 110%, rgba(217,130,43,0.5), transparent 65%);
  border: 3px double var(--gold);
  color: #efe0bd;
  text-align: center;
}
.hero h1 { color: var(--gold-light); border: 0; margin: 0 0 10px; font-size: 34px; text-shadow: 0 2px 0 #1a0a08; }
.hero p { font-size: 17px; color: #e4d2aa; max-width: 640px; margin: 0 auto 14px; }
.hero .actions { justify-content: center; margin-bottom: 0; }
.hero img { margin-bottom: 6px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0 8px; }
.feature { border: 1px solid var(--rule); background: #faf3e3; padding: 14px 16px; box-shadow: inset 0 0 0 3px #f4ead8, inset 0 0 0 4px var(--rule); }
.feature h3 { margin: 6px 0 6px; font-size: 18px; }
.feature img { display: block; width: 46px; height: 46px; margin: 0 0 4px; }
.feature p { font-size: 14.5px; margin-bottom: 6px; }
.feature a.more { font-size: 13.5px; text-transform: uppercase; letter-spacing: 0.06em; }

.twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.wheel { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }
.sabbat-card { border: 1px solid var(--rule); background: #faf3e3; padding: 12px 12px 10px; position: relative; }
.sabbat-card h3 { margin: 0 0 2px; font-size: 18px; }
.sabbat-card .date { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); margin-bottom: 6px; }
.sabbat-card p { font-size: 14px; margin-bottom: 6px; }
.sabbat-card.next { border: 2px solid var(--flame); background: #fdf1dc; }
.sabbat-card .flag {
  display: none; position: absolute; top: -10px; right: 8px;
  background: var(--ember-bright); color: #fff3d6; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; padding: 2px 8px;
}
.sabbat-card.next .flag { display: inline-block; }
.wheelimg { display: block; margin: 0 auto 10px; max-width: 360px; width: 100%; height: auto; }

.figure { margin: 18px auto; text-align: center; }
.figure img { max-width: 100%; height: auto; }
.figure figcaption { font-size: 13px; color: var(--ink-soft); font-style: italic; margin-top: 6px; }
.figure.right { float: right; margin: 4px 0 14px 22px; max-width: 220px; }

.post-meta { font-size: 13px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.06em; margin: -8px 0 18px; }
.postlist .post { padding: 14px 0; border-bottom: 1px dotted var(--rule); }
.postlist .post h3 { margin: 0 0 2px; }
.postlist .post p { margin-bottom: 4px; }

.schedule td:first-child { white-space: nowrap; font-weight: bold; }

.covenant { padding-left: 28px; }
.covenant > li { margin-bottom: 22px; padding-left: 6px; }
.covenant > li::marker { color: var(--gold); font-weight: bold; }
.covenant h3 { margin-top: 0; }

.sitemap { list-style: square; }
.sitemap ul { list-style: circle; margin-top: 4px; }

form.contact { max-width: 560px; }
form.contact label { display: block; font-weight: bold; margin: 12px 0 4px; font-size: 14.5px; }
form.contact input[type="text"], form.contact input[type="email"], form.contact textarea, form.contact select {
  width: 100%; font-family: inherit; font-size: 15px; padding: 7px 9px;
  border: 1px solid #8a6a3a; background: #fffaf0; color: var(--ink);
}
form.contact textarea { min-height: 160px; }
form.contact input[type="submit"] { margin-top: 18px; }
form.contact .formnote { font-size: 13px; color: var(--ink-soft); }
.formstatus { margin-top: 12px; font-weight: bold; color: var(--moss); }
.formstatus.error { color: var(--ember-bright); }

#footer {
  background: #241812;
  color: #d7c39b;
  padding: 22px 30px 26px;
  border-top: 1px solid #8a6a3a;
  text-align: center;
  font-size: 14px;
}
#footer a { color: var(--gold-light); }
#footer .footlinks { margin-bottom: 14px; letter-spacing: 0.04em; }
.blessedbe { font-family: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif; font-style: italic; font-size: 19px; color: #f0d9a8; margin: 10px 0 16px; }
.badges { margin: 0 0 14px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.badge {
  display: inline-block; font-size: 10.5px; line-height: 1; letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid #8a6a3a; padding: 6px 9px 4px; color: #e4d2aa; background: #1a120e;
}
#footer .small { color: #b4a07a; margin: 4px 0; }

#totop {
  position: fixed; right: 18px; bottom: 18px; display: none;
  background: var(--night-soft); color: var(--gold-light); border: 1px solid #8a6a3a;
  padding: 8px 10px 6px; font-size: 12px; line-height: 1; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
}
#totop.show { display: block; }

@media (max-width: 860px) {
  .wheel { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: 1fr; }
  .twocol { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  #page { margin: 0; border-left: 0; border-right: 0; box-shadow: none; }
  #columns { grid-template-columns: 1fr; }
  #sidebar { order: 2; border-right: 0; border-top: 3px double #9a7a46; }
  #content { order: 1; padding: 18px 18px 30px; }
  .sitename { font-size: 30px; }
  #masthead { padding: 20px 18px 16px; }
  #navtoggle {
    display: block; width: 100%; background: none; border: 0; color: #f3dfb0; font-family: inherit;
    font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; padding: 10px; text-align: left; cursor: pointer;
  }
  #navlist { display: none; flex-direction: column; }
  #navlist.open { display: flex; }
  #navlist a { border: 0; border-top: 1px solid rgba(0,0,0,0.3); }
  .figure.right { float: none; margin: 14px auto; max-width: 260px; }
  .hero h1 { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .flame { animation: none; }
}

@media print {
  html, body { background: #fff; }
  #page { box-shadow: none; border: 0; max-width: none; }
  #topbar, #mainnav, #sidebar, #footer .badges, #totop, .skip { display: none; }
  #columns { display: block; }
  #masthead { background: #fff; border-bottom: 2px solid #000; }
  .sitename { color: #000; text-shadow: none; }
  .tagline { color: #333; }
  a { color: #000; }
}
