/* Book of Heroes help, FAQ and chat rules. The look is the game's original
   parchment-and-leather help pages, rebuilt without the 2011 webview hacks. */
@import url("https://fonts.googleapis.com/css2?family=Berkshire+Swash&family=Kurale&display=swap");

:root {
  --ink: #754E26;
  --leather: #963;
  --heading: #900;
  --link: #005F9D;
  --note-link: #9D0043;
  --title: #FFD17D;
  --title-edge: #927031;
}

* { box-sizing: border-box; }
html { background: #2b1d12; }
body {
  margin: 0;
  font: 16px/1.5 Kurale, Georgia, "Times New Roman", serif;
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}
img { border: 0; max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

/* One parchment column, the width the art was cut for. */
.page {
  max-width: 768px;
  min-height: 100vh;
  margin: 0 auto;
  background: #f3ead4 url(boh/parchment.png) center top repeat-y;
  box-shadow: 0 0 40px rgba(0,0,0,.6);
}

/* Leather header band. */
header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  height: 43px;
  background: url(boh/header-fill.png) left top / 137px 43px repeat-x;
}
header h1 {
  flex: 1;
  margin: 0;
  padding: 0 15px 0 0;
  text-align: center;
  font: 24px/43px "Berkshire Swash", Georgia, serif;
  color: var(--title);
  -webkit-text-stroke: .25px var(--title-edge);
  text-shadow: 0 1px 1px rgba(0,0,0,.4);
  white-space: nowrap;
}
header h1 em {
  font-size: 60%;
  font-style: normal;
  position: relative;
  top: -5px;
  padding: 0 .25em 2px;
  border-top: 1px dotted #FC0;
  border-bottom: 1px dotted #FC0;
  -webkit-text-stroke: 0;
}
header h1.small { font-size: 21px; }
header h1.smallest { font-size: 18px; }

main { padding: 0 0 5em; }
h3 { margin: 1.25em 0 .5em; font-size: 18px; color: var(--heading); }
h3:first-child { margin-top: 0; }
p { margin: 0 0 1em; }
strong { color: var(--heading); }

/* --- Help guide: one bordered row per section, opening in place. --- */
.notes, .guide summary {
  display: block;
  margin: 1em .5em 0;
  padding: 2px 0 0 .5em;
  min-height: 40px;
  line-height: 40px;
  font-size: 18px;
  border: 1px solid var(--leather);
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
  background-image: linear-gradient(rgba(153,102,51,.1), rgba(153,102,51,0));
}
.notes a { color: var(--note-link); display: block; }
.guide details { margin: 0; }
.guide summary { cursor: pointer; color: var(--link); list-style: none; }
.guide summary::-webkit-details-marker { display: none; }
.guide summary::after { content: "+"; float: right; padding-right: .6em; color: var(--leather); }
.guide details[open] summary::after { content: "\2013"; }
.guide details .body {
  margin: 0 .5em 1em;
  padding: 1em 1em 0;
  border-left: 1px solid var(--leather);
  border-right: 1px solid var(--leather);
  text-align: justify;
}
.guide details .body > :last-child { margin-bottom: 0; padding-bottom: 1em; }
.guide ul, .guide ol { margin: 0 0 1em; padding-left: 1.5em; }
.guide li { margin-bottom: .5em; }
.guide ol li { list-style: decimal; }
.image_centered { text-align: center; margin: 1em 0; }
.image_centered img {
  border: 1px solid #f2ede0;
  border-radius: 10px;
  box-shadow: 1px 5px 15px rgba(0,0,0,.5);
}

/* --- FAQ: question list up top, answers below, each with a Back link. --- */
.faq { padding: 0 8px; }
.faq h2 {
  margin: .25em 0 1em;
  font-size: 24px;
  font-weight: normal;
  color: var(--heading);
  border-bottom: 1px solid var(--heading);
}
.faq h3 { margin: 0 0 1.25em; font-size: 18px; font-weight: normal; color: var(--ink); opacity: .85; }
.faq h4 { margin: 0; padding-top: 2em; font-size: 18px; font-weight: normal; opacity: .85; }
.faq p { margin: 1em 0; font-family: Georgia, "Times New Roman", serif; text-align: justify; }
.faq ul, .faq ol { margin: 0 15px 1em 30px; padding: 0; font-family: Georgia, "Times New Roman", serif; }
.faq li { margin-bottom: 1em; }
.faq .note { margin-left: 5px; font-size: 12px; }
.faq .special { color: #C00; }
.faq .center { text-align: center; }
.divider {
  height: 25px;
  margin: 5px 0;
  border: 1px solid var(--heading);
  border-radius: 5px;
  background: #633;
  opacity: .25;
}
.back a {
  display: block;
  width: 150px;
  margin: 0 auto;
  padding: 3px 1em 1px;
  text-align: center;
  border: 1px solid var(--link);
  border-radius: 5px;
}

/* --- Chat rules: numbered rules, one block per language. --- */
.rules { padding: 0 1em; }
.rules > section { margin-top: 1.5em; }
.rules strong { color: var(--note-link); font-size: 1.25em; line-height: 2em; }
.rules ol { padding-left: 1.5em; margin: 0 0 1em; }
.rules li { margin-top: 1em; }
.rules li li { margin-top: .25em; }
[hidden] { display: none; }
.languages {
  margin: .75em .5em 0;
  text-align: center;
  font-size: 14px;
  line-height: 1.8;
}
.languages a { padding: 0 .35em; white-space: nowrap; }
.languages a[aria-current] { color: var(--ink); border-bottom: 1px solid var(--leather); }

footer {
  margin: 3em 1em 0;
  padding-top: 1em;
  border-top: 1px solid rgba(153,102,51,.4);
  text-align: center;
  font-size: 14px;
}
