/* version 0.7.1 */
/* Palette drawn from the guild crest: charcoal ironwork, parchment,
   gold lettering, crimson dagger-and-key. */
:root {
  --bg: #101216;
  --fg: #ece5d3;
  --dim: #857f70;
  --accent: #7e1f2a;
  --gold: #b3924a;
  --line: #2b2e35;
}

* { box-sizing: border-box; }

/* Full-height column so the closing words sit at the foot of the window on
   a short page, and below the content on a long one. */
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: Georgia, "Times New Roman", serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
  padding: 2rem 1rem;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--line);
}

nav a { color: var(--fg); text-decoration: none; }
nav a:hover { color: #fff; }
nav form { margin-left: auto; }
.navcrest img { height: 30px; width: 30px; display: block; }

/* One menu holds every destination, so the bar never crowds: crest, the
   way in, and the way out. */
.navmenu { position: relative; }
.navmenu > summary {
  cursor: pointer;
  color: var(--gold);
  letter-spacing: 0.1em;
  list-style: none;
}
.navmenu > summary::-webkit-details-marker { display: none; }
.navmenu > summary::after { content: " \25be"; }
.navmenu[open] > summary::after { content: " \25b4"; }

.navmenu-panel {
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 0;
  z-index: 10;
  min-width: 12rem;
  padding: 0.35rem 0;
  background: #16161a;
  border: 1px solid var(--line);
}
.navmenu-panel a { display: block; padding: 0.45rem 1.25rem; }
.navmenu-panel a:hover { background: var(--accent); color: #fff; }
.navmenu-panel hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0.35rem 0;
}

.crest { display: block; width: 80px; height: auto; margin: 0 auto 0.5rem; }

/* The referral door: the full crest over the Guild's summons. Said flat,
   never winked at; the menace is in the reader's own second reading. */
.crest-large {
  display: block;
  width: min(12rem, 50vw);
  height: auto;
  margin: 0 auto 1.25rem;
}
.summons {
  text-align: center;
  font-style: italic;
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
}
.motto {
  text-align: center;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin: 0 0 2.5rem;
}
.motto .sep { color: var(--dim); margin: 0 0.5em; }

/* The closing words, at the foot of every page. Quiet on purpose: a
   sign-off, not a slogan. */
.benediction {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  text-align: right;
  color: var(--dim);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.75rem 1.5rem;
  border-top: 1px solid var(--line);
}

a { color: var(--fg); }

h1 { font-weight: normal; letter-spacing: 0.05em; color: var(--gold); }
h2 { font-weight: normal; letter-spacing: 0.04em; border-bottom: 1px solid var(--line); padding-bottom: 0.3rem; }
h3 { font-weight: normal; margin-bottom: 0.15rem; }

.dim { color: var(--dim); }

.teaser { margin-bottom: 1rem; }
.teaser p { margin-top: 0; }

.chronicle-line { margin: 0.35rem 0; }
.chronicle-line .dim { font-size: 0.85rem; margin-right: 0.5rem; }

.review-badge a {
  display: inline-block;
  border: 1px solid var(--accent);
  padding: 0.4rem 1rem;
  text-decoration: none;
  color: var(--gold);
}

.comments { margin-top: 2rem; border-top: 1px solid var(--line); padding-top: 0.5rem; }
.comment { margin-bottom: 1rem; }
.comment p { margin: 0.15rem 0; }
form.inline { display: inline; }

.announcement { border-left: 2px solid var(--accent); padding-left: 1rem; margin-bottom: 2rem; }

/* Ex cathedra. Deliberately unframed: with nothing standing, the landing
   page must not show an empty box where a message would have been. */
.excathedra {
  color: var(--gold);
  font-size: 1.1rem;
  line-height: 1.6;
  text-align: center;
  /* A rule beneath, never around: it separates the pronouncement from the
     Record's heading below without drawing a box that would be visible as
     an empty frame when nothing stands. */
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.5rem;
  margin: 0 0 2.5rem;
}
.excathedra p { margin: 0.4rem 0; }

.prose { line-height: 1.6; }
.prose img { max-width: 100%; }
.prose blockquote { border-left: 2px solid var(--gold); margin-left: 0; padding-left: 1rem; color: var(--dim); }
.prose code { background: #16161a; padding: 0.1rem 0.3rem; }
.prose pre { background: #16161a; padding: 1rem; overflow-x: auto; }

/* Fills whatever height is left rather than a fixed 80vh, which would have
   fought the footer for the bottom of the screen. */
.front {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 0;
  gap: 3rem;
}

/* crest.svg is cropped to the art (a 4:5 portrait), so these widths are
   the crest's true width: set the width, the height follows. The small
   key-and-dagger mark (mark.svg) takes the nav and favicon, where the full
   crest's detail would blur. */
.logo {
  width: min(14rem, 60vw);
  height: auto;
}

.doors { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }

.button {
  display: inline-block;
  background: none;
  border: 1px solid var(--accent);
  color: var(--fg);
  padding: 0.6rem 2rem;
  font-family: inherit;
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-decoration: none;
  cursor: pointer;
}

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

.linklike {
  background: none;
  border: none;
  color: var(--fg);
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  padding: 0;
}

.linklike:hover { color: #fff; }

.narrow { max-width: 28rem; margin: 0 auto; }

.errorpage { text-align: center; padding-top: 4rem; }

input {
  background: #16161a;
  border: 1px solid var(--line);
  color: var(--fg);
  padding: 0.5rem;
  font-family: inherit;
  font-size: 1rem;
  width: 100%;
}

label { display: block; margin-bottom: 0.25rem; color: var(--dim); }

.errorlist { color: #c25b5b; list-style: none; padding: 0; }

.qr { background: #fff; padding: 1rem; width: fit-content; margin: 1rem 0; }
.qr svg { display: block; width: 200px; height: 200px; }

input[type="checkbox"] { width: auto; }

table.roster { width: 100%; border-collapse: collapse; }
table.roster th, table.roster td {
  text-align: left;
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid var(--line);
}
table.roster th { color: var(--gold); font-weight: normal; }

.instrument {
  border: 1px solid var(--line);
  padding: 0.5rem 1rem;
  margin: 1rem 0 0.25rem;
}
.instrument summary { cursor: pointer; color: var(--gold); }
.attest label { display: inline; color: var(--fg); }

textarea {
  background: #16161a;
  border: 1px solid var(--line);
  color: var(--fg);
  padding: 0.5rem;
  font-family: inherit;
  font-size: 1rem;
  width: 100%;
}
select {
  background: #16161a;
  border: 1px solid var(--line);
  color: var(--fg);
  padding: 0.5rem;
  font-family: inherit;
  font-size: 1rem;
}

/* The markdown editor, dressed for the house. EasyMDE ships a white
   writing surface and an unstyled toolbar, which in a dark room is a
   lantern with its labels in shadow.

   Every rule is prefixed with .EasyMDEContainer on purpose: the widget's
   own stylesheet is written into the body by {{ form.media }}, after this
   file in the head, so an equally specific rule here would lose. These
   are members-area only; the admin does not load site.css and keeps its
   light editor. */
.EasyMDEContainer .CodeMirror {
  background: #16161a;
  color: var(--fg);
  border-color: var(--line);
  font-family: Georgia, "Times New Roman", serif;
}
.EasyMDEContainer .CodeMirror-cursor { border-left-color: var(--gold); }
.EasyMDEContainer .CodeMirror-selected { background: #2b2e35; }
.EasyMDEContainer .CodeMirror-focused .CodeMirror-selected { background: #3a3f4a; }
.EasyMDEContainer .CodeMirror-placeholder { color: var(--dim); }
.EasyMDEContainer .CodeMirror-fullscreen { background: #16161a; }

.EasyMDEContainer .editor-toolbar {
  background: var(--bg);
  border-color: var(--line);
}
.EasyMDEContainer .editor-toolbar button { color: var(--fg); }
.EasyMDEContainer .editor-toolbar button:hover,
.EasyMDEContainer .editor-toolbar button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.EasyMDEContainer .editor-toolbar i.separator {
  border-left-color: var(--line);
  border-right-color: transparent;
}
.EasyMDEContainer .editor-toolbar.fullscreen { background: var(--bg); }
.EasyMDEContainer .editor-toolbar.fullscreen::before,
.EasyMDEContainer .editor-toolbar.fullscreen::after { background: none; }

.EasyMDEContainer .editor-preview,
.EasyMDEContainer .editor-preview-side {
  background: var(--bg);
  color: var(--fg);
  border-color: var(--line);
}
.EasyMDEContainer .editor-preview pre,
.EasyMDEContainer .editor-preview-side pre { background: #16161a; }
.EasyMDEContainer .editor-statusbar { color: var(--dim); }

.EasyMDEContainer .cm-s-easymde .cm-header { color: var(--gold); }
.EasyMDEContainer .cm-s-easymde .cm-quote { color: var(--dim); }
.EasyMDEContainer .cm-s-easymde .cm-link,
.EasyMDEContainer .cm-s-easymde .cm-url { color: var(--gold); }
.EasyMDEContainer .cm-s-easymde .cm-comment {
  background: #16161a;
  color: var(--dim);
}
