/* The Thieves Guild wiki — one stylesheet, no external fonts, no CDNs. */

:root {
  color-scheme: light dark;
  --bg: #fbf9f4;
  --fg: #1d1b18;
  --muted: #5d574d;
  --rule: #d8d1c4;
  --link: #7a2e1d;
  --link-visited: #5b3a63;
  --mark-bg: #fbe9a8;
  --panel: #f2eee4;
  --draft-bg: #a4243b;
  --draft-fg: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171614;
    --fg: #ebe6dc;
    --muted: #a79f91;
    --rule: #3a3731;
    --link: #e8a48c;
    --link-visited: #c3a5d1;
    --mark-bg: #5c4a12;
    --panel: #211f1c;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0 auto;
  padding: 1rem 1rem 3rem;
  max-width: 46rem;
  background: var(--bg);
  color: var(--fg);
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  font-size: 1.05rem;
  line-height: 1.6;
}

a { color: var(--link); }
a:visited { color: var(--link-visited); }

h1, h2, h3 { line-height: 1.25; margin: 1.6em 0 0.5em; }
h1 { font-size: 1.7rem; margin-top: 0.4em; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }

p { margin: 0 0 0.9em; }

.draft-banner {
  margin: 0 0 1rem;
  padding: 0.5rem 0.75rem;
  background: var(--draft-bg);
  color: var(--draft-fg);
  font-weight: bold;
  text-align: center;
}

.site-header {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
}

.site-title {
  display: block;
  font-size: 1.25rem;
  font-weight: bold;
  text-decoration: none;
  color: var(--fg);
}

.site-nav { margin: 0.5rem 0; }
.site-nav a { margin-right: 0.9rem; white-space: nowrap; }

.search { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.search-label { font-size: 0.9rem; color: var(--muted); }
.search input[type="search"] {
  flex: 1 1 12rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
}
.home-search { margin: 1rem 0 1.5rem; }
.home-search button {
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--panel);
  color: var(--fg);
  font: inherit;
  cursor: pointer;
}

.search-results {
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 3px;
}
.search-results ul, .search-page-results ul { list-style: none; margin: 0; padding: 0; }
.search-results li, .search-page-results li { padding: 0.15rem 0; }
.search-results .kind, .search-page-results .kind {
  margin-left: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.search-page-results .empty { color: var(--muted); }

.site-footer {
  margin-top: 2.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
  color: var(--muted);
}

table { width: 100%; border-collapse: collapse; margin: 0.5rem 0 1.5rem; }
th, td { text-align: left; vertical-align: top; padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--rule); }
th { font-size: 0.9rem; color: var(--muted); }
td.number, td.total, td.date { white-space: nowrap; }
td.summary { color: var(--muted); }

.meta, .totals, .updated, .updated-note, .note { color: var(--muted); }
.updated { font-size: 0.95rem; }
.shared { display: block; font-size: 0.85rem; color: var(--muted); }

.term-list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 2rem; }
.term-list li { break-inside: avoid; padding: 0.1rem 0; }
.count { color: var(--muted); font-size: 0.9rem; }
.season-count { white-space: nowrap; margin-right: 0.5rem; }

details {
  margin: 0.75rem 0;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--panel);
}
details > summary {
  cursor: pointer;
  padding: 0.5rem 0.75rem;
  font-weight: bold;
}
details > *:not(summary) { padding: 0 0.75rem; }
details > *:last-child { padding-bottom: 0.75rem; }

.snippets { list-style: none; margin: 0; padding: 0; }
.episode-snippets { margin-bottom: 0.9rem; }
.snippet {
  margin: 0.25rem 0 0.5rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--rule);
  color: var(--fg);
}
mark { background: var(--mark-bg); color: inherit; padding: 0 0.1em; }
.more { font-size: 0.9rem; color: var(--muted); }

.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; }
.pager .next { margin-left: auto; text-align: right; }

.section-links, .latest { padding-left: 1.2rem; }

@media (max-width: 40rem) {
  body { padding: 0.75rem 0.75rem 2.5rem; font-size: 1rem; }
  .term-list { columns: 1; }
  table, thead, tbody, th, td, tr { display: block; }
  thead { display: none; }
  tr { border-bottom: 1px solid var(--rule); padding: 0.4rem 0; }
  td { border: 0; padding: 0.1rem 0; }
  td.number, td.total, td.date { white-space: normal; }
}
