/* STORY EXPLORER — VERSION 1 */

body.ow-explorer-open {
  overflow: hidden;
}

#content a[href^="#person-"] {
  color: #76542c;
  border-bottom: 1px dotted #a88a60;
  text-decoration: none;
  cursor: pointer;
}

#content a[href^="#person-"]:hover {
  color: #354e40;
  background: #e1d4bb;
}

.ow-explorer-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(12, 20, 17, 0.68);
  display: flex;
  justify-content: flex-end;
}

.ow-explorer {
  box-sizing: border-box;
  width: min(100%, 480px);
  height: 100%;
  overflow-y: auto;
  background: #292f2c;
  color: #f1e8d8;
  padding: 34px;
  box-shadow: -12px 0 40px rgba(0,0,0,.25);
  font-family: Georgia, serif;
}

.ow-explorer-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.ow-explorer-kicker {
  margin: 0;
  font: 600 11px Arial, sans-serif;
  letter-spacing: 2px;
  color: #c8ad7e;
}

.ow-explorer-close {
  background: transparent;
  border: 1px solid #837659;
  color: #f1e8d8;
  border-radius: 5px;
  padding: 8px 12px;
  cursor: pointer;
}

.ow-explorer h2 {
  color: #f1e8d8;
  font: normal 34px/1.16 Georgia, serif;
  margin: 0 0 12px;
}

.ow-explorer-subtitle {
  color: #c8b998;
  font-style: italic;
  margin-bottom: 30px;
}

.ow-explorer-description {
  color: #e4dccf;
  font-size: 17px;
  line-height: 1.75;
  border-top: 1px solid #706953;
  padding-top: 25px;
}

.ow-explorer h3 {
  color: #ceb487;
  font: 600 13px Arial, sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 32px;
}

.ow-explorer-connections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ow-explorer-card {
  background: #3a443e;
  border: 1px solid #586156;
  border-radius: 6px;
  padding: 16px;
}

.ow-explorer-card strong {
  display: block;
  color: #f1e8d8;
  font-size: 15px;
  font-weight: normal;
}

.ow-explorer-card small {
  display: block;
  margin-top: 7px;
  color: #c6b89f;
}

.ow-explorer-note {
  font-size: 12px;
  color: #aaa99b;
  margin-top: 30px;
}

.ow-explorer-link {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 14px;
  border: 1px solid #b89a68;
  color: #eddbbc !important;
  text-decoration: none;
}

@media(max-width: 600px) {
  .ow-explorer {
    width: 100%;
    padding: 24px;
  }
}

/* FOLLOW THE THREAD — DISCOVERY NAVIGATION */

.ow-discovery-trail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 30px;
  padding: 0 0 20px;
  border-bottom: 1px solid #706953;
}

.ow-trail-item {
  background: #39443d;
  border: 1px solid #65705f;
  border-radius: 4px;
  color: #e9dcc5;
  padding: 8px 11px;
  font: 12px Arial, sans-serif;
  cursor: pointer;
}

.ow-trail-item[aria-current="step"] {
  border-color: #c9ad7b;
  background: #5b523e;
  color: #fff0d0;
}

.ow-trail-arrow {
  color: #c9ad7b;
}

.ow-trail-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 25px;
}

.ow-trail-back {
  border: 1px solid #897758;
  background: transparent;
  color: #f0e4ce;
  border-radius: 4px;
  padding: 10px 14px;
  cursor: pointer;
}

.ow-trail-back:disabled {
  opacity: 0.35;
  cursor: default;
}

.ow-explorer-connections {
  grid-template-columns: 1fr;
}

.ow-explorer-card {
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: Georgia, serif;
}

/* STORY AND ARTIFACT CONNECTIONS */

.ow-explorer a.ow-archive-card {
  display: block;
  box-sizing: border-box;
  width: 100%;
  text-decoration: none;
  background: #414139;
  border-color: #8e7854;
  color: #f1e8d8;
}

.ow-explorer a.ow-archive-card:hover,
.ow-explorer a.ow-archive-card:focus-visible {
  background: #544a37;
  border-color: #d1b27c;
}

.ow-explorer a.ow-archive-card strong {
  color: #f1e8d8;
}

.ow-explorer a.ow-archive-card small {
  color: #d1bc96;
}

/* AUTOMATIC STORY REFERENCES */

#content a.ow-person-reference {
  color: #765026 !important;
  font-weight: 600;
  text-decoration: none !important;
  border-bottom: 2px dotted #b18d55;
  background: rgba(185, 151, 95, 0.10);
  padding: 0 2px;
  cursor: pointer;
}

#content a.ow-person-reference:hover,
#content a.ow-person-reference:focus-visible {
  color: #284d3c !important;
  background: #e4d2ae;
  border-bottom-color: #284d3c;
}
