/* SMAS FAQ - static version. Colours and fonts follow the original xSmasFAQ page. */
:root {
  --navy: #042349;
  --purple: #665ed1;
  --font: Bahnschrift, "Segoe UI", Roboto, Arial, sans-serif;
  --nav-w: 330px;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  color: #222;
  display: flex;
  flex-direction: column;
  background: #fff;
}
button, input, select { font: inherit; }

/* header */
.top {
  flex: none;
  height: 80px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 0 0 10px;
  background-image: linear-gradient(to right, #52BCDC, #65D5EF);
}
.logo { display: block; line-height: 0; }
.logo img { display: block; }
.top-right {
  width: 140px;
  height: 80px;
  padding: 46px 10px 0 0;
  background: url(images/top_right_corner.png) no-repeat right top;
  text-align: right;
}
.top-right select {
  width: 120px;
  padding: 2px 4px;
  border: 1px solid #fff;
  border-radius: 3px;
  background: rgba(255, 255, 255, .9);
}

/* banner with search */
.banner {
  flex: none;
  height: 90px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 40px;
  background: var(--navy);
  color: #fff;
  transition: height .15s;
}
.banner.compact { height: 70px; }
.hello {
  flex: 0 1 auto;
  margin: 0 110px 0 0;
  font-size: 24px;
  font-weight: bold;
  white-space: nowrap;
}
.banner.compact .hello { visibility: hidden; }
.search { display: flex; align-items: center; flex: 0 1 490px; min-width: 0; }
.search input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 4px;
  border: 0;
  border-bottom: 4px solid #fff;
  background: var(--navy);
  color: #fff;
  font-size: 22px;
  outline: none;
}
.search input::placeholder { color: #c9d3e0; }
.search input::-webkit-search-cancel-button { filter: invert(1); }
.search button {
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  color: #fff;
  cursor: pointer;
}
.nav-toggle { display: none; }

/* body: menu + content */
.main { flex: 1; display: flex; min-height: 0; }
.nav {
  flex: none;
  width: var(--nav-w);
  overflow-y: auto;
  padding: 30px 0 30px;
  border-right: 5px solid var(--navy);
  background-image: linear-gradient(to bottom, #3FA3C8, #0B5E93);
  color: #fff;
}
.nav a { color: inherit; text-decoration: none; display: block; }
.nav .mod > a {
  padding: 6px 16px 6px 20px;
  font-size: 22px;
  font-weight: bold;
}
.nav .mod > a::before {
  content: "+";
  display: inline-block;
  width: 22px;
  font-weight: normal;
}
.nav .mod.open > a::before { content: "\2013"; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav .bos { display: none; margin: 0 0 8px 31px; border-left: 1px dotted rgba(255, 255, 255, .7); }
.nav .mod.open .bos { display: block; }
.nav .bos a {
  position: relative;
  padding: 5px 12px 5px 18px;
  font-size: 17px;
  font-weight: bold;
  line-height: 1.25;
}
.nav .bos a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 11px;
  border-top: 1px dotted rgba(255, 255, 255, .7);
}
.nav a:hover { background: rgba(255, 255, 255, .12); }
.nav a.sel { background: rgba(255, 255, 255, .25); }

.content {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 15px 30px 60px;
  outline: none;
}
.loading, .error { font-size: 18px; color: #666; }
.error { color: #b00020; }

/* breadcrumb */
.crumbs { font-size: 16px; margin: 0 0 18px; }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .sep { padding: 0 .4em; }

/* module / topic lists */
.module { margin: 0 0 22px; }
.module h2 {
  margin: 10px 0 12px 10px;
  font-size: 22px;
  font-weight: normal;
  color: var(--purple);
}
.module h2 a { color: inherit; text-decoration: none; }
.module h2 a:hover { text-decoration: underline; }
.topics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 30px;
  margin: 0;
  padding: 0 20px;
  list-style: none;
}
/* home page: keep a "More..." column on every module so the columns line up */
.topics.home { grid-template-columns: repeat(3, minmax(0, 1fr)) 5em; }
.topics a, .subs a {
  color: inherit;
  text-decoration: none;
  font-size: 20px;
  line-height: 1.25;
}
.topics a:hover, .subs a:hover { color: var(--purple); text-decoration: underline; }
.topics .more a { color: var(--purple); }
.subs { margin: 0; padding: 0 20px; list-style: none; }
.subs li { margin: 0 0 14px; }
.subs li::before { content: "\2022"; padding-right: .5em; font-size: 20px; }

/* article */
.article-body { overflow-x: auto; }
.article-body img { max-width: 100% !important; height: auto !important; }
.article-body table { max-width: 100%; }
.related { margin: 34px 0 0; font-size: 16px; }
.related ul { margin: 8px 0 0; padding: 0 0 0 20px; list-style: none; }
.related li { margin: 0 0 6px; }
.related a { color: var(--purple); text-decoration: none; }
.related a:hover { text-decoration: underline; }

/* search results */
.results-head { font-size: 16px; margin: 4px 0 16px; color: #555; }
.hit {
  display: block;
  margin: 0 10px 20px;
  padding: 8px 12px;
  border: 1px solid #000;
  color: inherit;
  text-decoration: none;
}
.hit:hover { background: #f4f6fb; }
.hit .path { font-size: 16px; }
.hit .title { margin-top: 6px; font-size: 20px; color: var(--purple); }
.hit .snip { margin-top: 6px; font-size: 14px; color: #333; }
.hit mark { background: #ff0; color: inherit; }
.nohit { margin: 0 10px; padding: 10px 12px; border: 1px solid #000; font-size: 20px; color: var(--purple); }

/* narrow screens: the menu becomes a drawer */
@media (max-width: 860px) {
  .top { height: 64px; }
  .logo img { width: 160px; height: 60px; }
  .top-right { height: 64px; padding-top: 34px; background-size: auto 64px; }
  .banner, .banner.compact { height: auto; flex-wrap: wrap; gap: 8px 12px; padding: 10px 14px; }
  .hello, .banner.compact .hello { display: none; }
  .search { flex: 1 1 200px; }
  .nav-toggle {
    display: block;
    padding: 6px 10px;
    border: 1px solid #fff;
    border-radius: 4px;
    background: none;
    color: #fff;
    cursor: pointer;
  }
  .main { position: relative; }
  .nav {
    position: absolute;
    z-index: 5;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(330px, 88vw);
    transform: translateX(-105%);
    transition: transform .2s;
    box-shadow: 4px 0 12px rgba(0, 0, 0, .3);
  }
  .nav.show { transform: none; }
  .content { padding: 12px 14px 40px; }
  .topics, .topics.home { grid-template-columns: 1fr; padding: 0 10px; }
  .module h2 { margin-left: 0; }
}
