/* Shared styling for the boarding-school theme — used by /contributors, /report, /corrections.
   The landing page (index.html) has its own inline styling already. */

:root {
  --parchment: #f5efe0;
  --parchment-dark: #ebe2cc;
  --ink: #1f1c17;
  --navy: #1e3a5f;
  --navy-deep: #142a45;
  --burgundy: #6b1c1c;
  --gold: #b08d57;
  --gold-soft: #d4b380;
  --rule: #c9b990;
  --muted: #5a544a;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--parchment); color: var(--ink); font-family: 'Lora', Georgia, serif; line-height: 1.6; }
a { color: var(--burgundy); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .15s; }
a:hover { border-bottom-color: var(--burgundy); }

.topbar { background: var(--navy-deep); color: var(--gold-soft); font-family: 'Inter', sans-serif; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; text-align: center; padding: 6px 0; border-bottom: 1px solid #0a1a2e; }
header.page { background: var(--navy); color: var(--parchment); border-bottom: 4px solid var(--gold); }
header.page::after { content:""; display:block; height:2px; background: var(--burgundy); }
.header-inner { max-width: 1100px; margin: 0 auto; padding: 24px 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 26px; letter-spacing: .02em; color: var(--parchment); }
.brand a { color: var(--parchment); border: none; }
.brand a:hover { color: var(--gold-soft); }
nav.top { display: flex; gap: 24px; font-family: 'Inter', sans-serif; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
nav.top a { color: var(--parchment); border: none; }
nav.top a:hover { color: var(--gold-soft); }
nav.top .auth-link { color: var(--gold-soft); border: 1px solid var(--gold); padding: 4px 12px; margin-left: 8px; }
nav.top .auth-link:hover { color: #fff; background: var(--burgundy); border-color: var(--burgundy); }

/* Auth dropdown menu (nickname → Dashboard / Account / Sign out) */
.auth-menu { position: relative; display: inline-block; margin-left: 8px; }
.auth-menu-btn { background: transparent; cursor: pointer; font: inherit; letter-spacing: inherit; text-transform: inherit; }
.auth-menu-btn .auth-caret { font-size: 10px; margin-left: 4px; opacity: .8; }
.auth-menu-btn .auth-gb { opacity: .75; font-size: 11px; }
.auth-menu-pop { position: absolute; top: calc(100% + 6px); right: 0; min-width: 180px; background: var(--parchment); border: 1px solid var(--gold); box-shadow: 0 6px 24px rgba(0,0,0,0.3); z-index: 100; padding: 6px 0; font-family: 'Inter', sans-serif; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
nav.top .auth-menu-pop a,
.auth-menu-pop a { display: block; padding: 9px 16px; color: var(--ink) !important; border: none; background: transparent; }
nav.top .auth-menu-pop a:hover,
.auth-menu-pop a:hover { background: var(--burgundy); color: #fff !important; }
.auth-menu-pop[hidden] { display: none; }

main.page { max-width: 1100px; margin: 0 auto; padding: 40px 40px 80px; }
.crumb { font-family: 'Inter', sans-serif; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.crumb .sep { color: var(--gold); margin: 0 8px; }
h1.title { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 40px; color: var(--navy-deep); margin-bottom: 8px; }
.lede { font-family: 'Lora', serif; font-size: 18px; color: var(--ink); max-width: 760px; border-bottom: 1px solid var(--rule); padding-bottom: 24px; margin-bottom: 28px; }

footer.page { background: var(--navy-deep); color: var(--gold-soft); padding: 30px 40px; border-top: 4px solid var(--gold); font-family: 'Lora', serif; }
.foot-inner { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 18px; }
.foot-motto { font-style: italic; font-size: 16px; }
.foot-links { font-family: 'Inter', sans-serif; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.foot-links a { color: var(--gold-soft); margin-left: 22px; border: none; }
.foot-links a:hover { color: #fff; }

/* Contributors page: renders markdown into .md-content */
.md-content { max-width: 800px; }
.md-content h1 { font-family: 'Playfair Display', serif; font-size: 32px; color: var(--navy-deep); margin: 28px 0 12px; }
.md-content h2 { font-family: 'Playfair Display', serif; font-size: 22px; color: var(--navy-deep); margin: 24px 0 10px; border-bottom: 1px solid var(--rule); padding-bottom: 6px; }
.md-content h3 { font-family: 'Playfair Display', serif; font-size: 18px; color: var(--burgundy); margin: 18px 0 6px; }
.md-content p { margin-bottom: 14px; }
.md-content ul, .md-content ol { margin: 0 0 14px 24px; }
.md-content li { margin-bottom: 4px; }
.md-content em { color: var(--muted); }
.md-content a { color: var(--burgundy); }
.md-content hr { border: 0; border-top: 1px solid var(--rule); margin: 24px 0; }
.md-content code { background: var(--parchment-dark); padding: 2px 5px; border-radius: 3px; font-size: 14px; }

/* Forms */
form.report { max-width: 720px; background: #fff; border: 1px solid var(--rule); padding: 28px 32px; }
form.report label { display: block; font-family: 'Inter', sans-serif; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--navy-deep); margin: 16px 0 6px; }
form.report input[type="text"], form.report input[type="email"], form.report select, form.report textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--rule); background: var(--parchment); font-family: 'Lora', serif; font-size: 15px; color: var(--ink); }
form.report textarea { min-height: 140px; resize: vertical; }
form.report .help { font-family: 'Lora', serif; font-size: 13px; color: var(--muted); margin-top: 4px; font-style: italic; }
form.report .honey { position: absolute; left: -9999px; }
form.report button { margin-top: 24px; background: var(--burgundy); color: #fff; border: 0; padding: 12px 28px; font-family: 'Inter', sans-serif; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; }
form.report button:hover { background: #8b2222; }
.form-msg { padding: 14px 18px; margin-top: 18px; font-family: 'Lora', serif; }
.form-msg.ok  { background: #e6f0e8; border-left: 4px solid #2d6a3e; color: #1a3a23; }
.form-msg.err { background: #fbe6e6; border-left: 4px solid var(--burgundy); color: #5a1a1a; }

/* Corrections */
.counts { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 24px; }
.count-pill { font-family: 'Inter', sans-serif; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; padding: 6px 14px; background: #fff; border: 1px solid var(--rule); }
.count-pill .n { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 16px; color: var(--navy-deep); margin-right: 6px; }
.filter-bar { font-family: 'Inter', sans-serif; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 18px; }
.filter-bar a { color: var(--muted); border: none; margin-right: 18px; padding-bottom: 4px; }
.filter-bar a.active { color: var(--navy-deep); border-bottom: 2px solid var(--gold); }
.issue { background: #fff; border: 1px solid var(--rule); border-left: 4px solid var(--gold); padding: 18px 22px; margin-bottom: 14px; }
.issue .meta { font-family: 'Inter', sans-serif; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.issue .state { display: inline-block; padding: 2px 8px; font-weight: 600; margin-right: 10px; }
.issue .state.open        { background: #f0e4d4; color: #5a4520; }
.issue .state.confirmed   { background: #d8e3ef; color: #1e3a5f; }
.issue .state.in_progress { background: #efe1d8; color: #6b3a1c; }
.issue .state.resolved    { background: #d8efd8; color: #1c5a1c; }
.issue .state.wontfix     { background: #efd8d8; color: var(--burgundy); }
.issue .body { color: var(--ink); margin-bottom: 6px; }
.issue .resolution { background: var(--parchment-dark); border-left: 3px solid var(--gold); padding: 10px 14px; margin-top: 10px; font-family: 'Lora', serif; font-style: italic; }
.issue .grade-tag { font-family: 'Playfair Display', serif; color: var(--burgundy); margin-right: 8px; }
.empty { color: var(--muted); font-style: italic; padding: 24px 0; }

@media (max-width: 700px) {
  .header-inner { flex-direction: column; align-items: flex-start; padding: 18px 22px; }
  nav.top { gap: 14px; flex-wrap: wrap; }
  main.page { padding: 28px 22px 48px; }
  h1.title { font-size: 30px; }
}

/* Glossary terms inside rendered markdown */
.glossary-term {
  background: rgba(176, 141, 87, .14);
  border-bottom: 1px dashed var(--gold);
  cursor: pointer;
  padding: 0 2px;
}
.glossary-term:hover, .glossary-term:focus {
  background: rgba(107, 28, 28, .12);
  border-bottom-color: var(--burgundy);
  outline: none;
}

/* Glossary modal */
.glossary-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(20, 42, 69, .55);
  display: none;
  align-items: center; justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.glossary-modal-backdrop.open { display: flex; }
.glossary-modal {
  background: var(--parchment);
  border: 1px solid var(--rule);
  border-top: 6px solid var(--burgundy);
  max-width: 560px;
  width: 100%;
  padding: 26px 32px 28px;
  font-family: 'Lora', serif;
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
}
.glossary-close {
  position: absolute; top: 10px; right: 14px;
  background: transparent; border: 0;
  font-size: 28px; line-height: 1; color: var(--muted);
  cursor: pointer; padding: 4px 8px;
}
.glossary-close:hover { color: var(--burgundy); }
.glossary-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: var(--navy-deep);
  margin-bottom: 14px;
  padding-right: 30px;
}
.glossary-body p {
  margin-bottom: 12px;
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink);
}
.glossary-body p:last-child { margin-bottom: 0; }

/* Glossary index page */
.glossary-index {
  max-width: 800px;
}
.glossary-toc {
  background: #fff;
  border: 1px solid var(--rule);
  padding: 16px 22px;
  margin-bottom: 28px;
  font-family: 'Lora', serif;
}
.glossary-toc h4 {
  font-family: 'Inter', sans-serif;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.glossary-toc a {
  display: inline-block;
  margin: 2px 14px 2px 0;
  color: var(--burgundy);
  font-size: 14.5px;
  border: none;
}
.glossary-entry {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
}
.glossary-entry h3 {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: var(--navy-deep);
  margin-bottom: 6px;
}
.glossary-entry p {
  font-size: 15.5px;
  color: var(--ink);
  line-height: 1.55;
  margin-bottom: 8px;
}
