/*
 * OUT OF THE WILDERNESS
 * Story-first theme — Version 1
 */

:root {
  --ow-ink: #292f2c;
  --ow-forest: #39453d;
  --ow-paper: #f1e8d8;
  --ow-gold: #b89a68;
  --ow-text: #332f29;
  --ow-muted: #796b57;
}

body {
  margin: 0;
  background: var(--ow-ink);
  color: var(--ow-text);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.8;
}

/* Archive header */
body > header {
  background: var(--ow-ink);
  color: var(--ow-paper);
  border-bottom: 1px solid #71634e;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

header .site-title {
  margin-bottom: 1rem;
  font-size: clamp(1.7rem, 4vw, 2.7rem);
  line-height: 1.2;
  font-weight: normal;
}

header .site-title a,
header .site-title a:visited {
  color: #f1e8d8 !important;
  text-decoration: none;
  opacity: 1;
}

header nav a,
header nav a:visited {
  color: #e6d8be;
}

header nav a:hover {
  color: #e2bd7f;
}

/* Reading environment */
#content {
  box-sizing: border-box;
  background: var(--ow-paper);
  color: var(--ow-text);
  padding: 4rem max(24px, calc((100% - 900px) / 2));
  min-height: 70vh;
}

#content h1 {
  color: #30382f;
  font-family: Georgia, serif;
  font-size: clamp(2.2rem, 5vw, 3.7rem);
  font-weight: normal;
  line-height: 1.18;
  letter-spacing: -0.025em;
}

#content h2,
#content h3 {
  color: #3a4035;
  font-family: Georgia, serif;
  font-weight: normal;
  line-height: 1.3;
}

#content p {
  max-width: 690px;
  font-size: 1.1rem;
  line-height: 1.85;
  margin-bottom: 1.5rem;
}

#content a {
  color: #795b35;
  text-decoration-color: var(--ow-gold);
  text-underline-offset: 3px;
}

/* Archival objects */
#content .media-embed,
#content .item-showcase {
  max-width: 790px;
  margin: 3rem auto;
}

#content img {
  max-width: 100%;
  height: auto;
}

#content .media-embed img,
#content .item-showcase img {
  border: 8px solid #faf6ed;
  box-shadow: 0 8px 28px rgba(44, 35, 20, 0.17);
}

#content blockquote {
  max-width: 690px;
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  border-left: 3px solid var(--ow-gold);
  background: #e6dac5;
  color: #594632;
  font-style: italic;
}

/* Footer */
body > footer {
  background: var(--ow-ink);
  color: #d5c6a9;
  border-top: 1px solid #71634e;
}

/* Mobile */
@media (max-width: 700px) {
  #content {
    padding: 2rem 20px 3rem;
  }

  #content p {
    font-size: 1.05rem;
    line-height: 1.75;
  }

  body > header {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }
}

/* WILDERNESS HEADER — VERSION 2 */

body > header.wilderness-header {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem 2rem;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 1.25rem max(24px, calc((100% - 1180px) / 2));
  background: #292f2c !important;
  color: #f1e8d8;
  border: 0;
  border-bottom: 1px solid #877657;
}

.wilderness-header .site-title {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  padding: 0;
  background: transparent !important;
  border: 0;
  font: normal clamp(1.5rem, 3vw, 2.4rem)/1.2 Georgia, serif;
}

.wilderness-header .site-title a,
.wilderness-header .site-title a:visited {
  color: #f1e8d8 !important;
  background: transparent !important;
  text-decoration: none;
}

.wilderness-header #top-nav {
  grid-column: 2;
  grid-row: 1;
  position: static;
  background: transparent !important;
  border: 0;
  padding: 0;
  margin: 0;
  width: auto;
}

.wilderness-header #top-nav ul,
.wilderness-header #top-nav-contents {
  background: transparent;
}

.wilderness-header #top-nav a,
.wilderness-header #top-nav a:visited {
  color: #e1d4bc !important;
  background: transparent;
  text-decoration: none;
}

.wilderness-header #top-nav a:hover {
  color: #d8b77c !important;
}

.wilderness-header #search {
  display: none !important;
}

.wilderness-header .banner {
  grid-column: 1 / -1;
}

body > footer {
  padding: 2rem max(24px, calc((100% - 900px) / 2));
  background: #292f2c !important;
  color: #d4c4a5;
}

@media (max-width: 700px) {
  body > header.wilderness-header {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 1.25rem 20px;
  }

  .wilderness-header .site-title {
    font-size: 1.45rem;
  }

  .wilderness-header #mobile-nav-toggle {
    display: block;
  }
}

/* CURATED STORY SOURCES */

.ow-story-sources {
  max-width: 960px;
  margin: 4rem auto 2rem;
  padding: 2rem 0;
  border-top: 1px solid #c5b9a2;
  font-family: inherit;
}

.ow-sources-eyebrow,
.ow-source-type {
  font-family: system-ui, sans-serif;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: #806647;
}

.ow-sources-heading h2 {
  margin: .6rem 0;
}

.ow-sources-heading p {
  max-width: 680px;
}

.ow-source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.8rem 0;
}

.ow-source-card {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  padding: 1.25rem;
  background: #f3eee5;
  border: 1px solid #d4c7b3;
  border-radius: 8px;
  color: #33302a;
  text-decoration: none;
}

a.ow-source-card:hover {
  background: #e8ddca;
  border-color: #94744f;
  color: #33302a;
}

.ow-source-card strong {
  font-size: 1.15rem;
  line-height: 1.3;
}

.ow-source-card > span:not(.ow-source-type) {
  font-size: .9rem;
  line-height: 1.5;
}

.ow-source-action {
  margin-top: auto;
  font-weight: 700;
  color: #765026;
}

.ow-source-pending {
  opacity: .76;
}

.ow-source-status {
  margin-top: auto;
  font-style: italic;
  color: #756958;
}

.ow-source-disclosure {
  font-size: .85rem;
  color: #6e675d;
  border-top: 1px solid #d4c7b3;
  padding-top: 1rem;
}

@media (max-width: 650px) {
  .ow-source-grid {
    grid-template-columns: 1fr;
  }
}

/* INLINE ARCHIVE REFERENCES */

#content a.ow-inline-artifact {
  color: #765026 !important;
  text-decoration: none !important;
  border-bottom: 1px dashed #a88551;
  background: rgba(185, 151, 95, .08);
  cursor: pointer;
}

#content a.ow-inline-artifact:hover,
#content a.ow-inline-artifact:focus-visible {
  background: #e8ddca;
  color: #284d3c !important;
  border-bottom-style: solid;
}

/* UNIFIED STORY LINKS — PEOPLE AND ARTIFACTS */

#content a.ow-person-reference,
#content a.ow-inline-artifact {
  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;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 150ms ease,
              color 150ms ease;
}

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

