/* Shared styling for the cat/ (UH Mānoa Cataloging) site.
   Visual values (background #F5EEEE, article box styling, tree link colors)
   are carried over from the original TreePad SAFE export's inline <style>
   blocks (tree.html, documents/*.html) — preserved, not redesigned. */

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  background-color: #F5EEEE;
  font-family: Arial, Helvetica, sans-serif;
  color: #000000;
  margin: 0;
}

a { color: #330099; }
a:visited { color: #551A8B; }

.skip-link {
  position: absolute;
  left: 0;
  top: -3em;
  z-index: 1000;
  padding: 0.5em 1em;
  background: #102542;
  color: #fff;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid #005fcc;
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Site header, shared by the welcome cluster and the manual */
.site-heading {
  padding: 0.75rem 1rem;
  font-size: 2rem;
  font-weight: bold;
}

.site-heading a {
  color: inherit;
  text-decoration: none;
}

/* Manual: two-column layout (sidebar tree + article), replacing the old
   heading/tree/article 3-frame frameset so individual pages are directly
   linkable. */
.manual-layout {
  display: flex;
  align-items: flex-start;
  gap: 0;
  min-height: 100vh;
}

.manual-tree {
  width: 320px;
  flex: 0 0 320px;
  max-height: 100vh;
  overflow-y: auto;
  position: sticky;
  top: 0;
  padding: 0.5rem;
  border-right: 1px solid #ccc;
  font-size: 12px;
}

.manual-tree ul {
  list-style: none;
  margin: 0;
  padding-left: 1.1rem;
}

.manual-tree > ul {
  padding-left: 0;
}

.manual-tree li {
  white-space: nowrap;
}

.manual-tree a {
  text-decoration: none;
}

.manual-tree img {
  vertical-align: text-bottom;
}

.manual-tree a:hover,
.manual-tree a:focus-visible {
  text-decoration: underline;
}

.manual-tree .current > a {
  color: #FF0000;
  font-weight: bold;
}

.manual-article {
  flex: 1 1 auto;
  padding: 1rem;
  min-width: 0;
}

/* The article content box itself — matches the original .clsarticlepage
   rule from documents/*.html's inline <style>. */
.clsarticlepage {
  text-align: left;
  max-width: 700px;
  margin: 0 auto 1rem;
  font-size: 12px;
  font-family: Arial, Helvetica, sans-serif;
  color: #000000;
  padding: 50px;
  border: 1px solid #D0D0D0;
  background-color: #FFFFFF;
}

@media (max-width: 800px) {
  .manual-layout {
    flex-direction: column;
  }
  .manual-tree {
    width: auto;
    flex: none;
    position: static;
    max-height: 40vh;
    border-right: none;
    border-bottom: 1px solid #ccc;
  }
  .clsarticlepage {
    padding: 1.25rem;
  }
}
