:root {
  --ink: #182024;
  --muted: #5c676c;
  --paper: #f7f4ec;
  --panel: #ffffff;
  --line: #d9d1c2;
  --forest: #28483c;
  --forest-2: #3e6a56;
  --brass: #b6863f;
  --red: #843b39;
  --water: #306477;
  --shadow: 0 20px 55px rgba(25, 32, 36, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(40, 72, 60, 0.08), transparent 28%),
    linear-gradient(180deg, #fcfaf5 0%, var(--paper) 100%);
  font-family: Georgia, "Times New Roman", serif;
}

button,
input {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 24px 18px;
  color: #f8f5ec;
  background: linear-gradient(180deg, #203a32 0%, #152622 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  color: inherit;
  text-decoration: none;
}

.brand img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.42);
}

.brand strong,
.brand small {
  display: block;
  letter-spacing: 0;
}

.brand strong {
  font-size: 22px;
}

.brand small {
  margin-top: 2px;
  color: #d9c99e;
  font-size: 13px;
  text-transform: uppercase;
}

.search-label {
  display: block;
  margin-top: 28px;
  margin-bottom: 8px;
  color: #e8dcc6;
  font-size: 12px;
  text-transform: uppercase;
}

.search-box {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  min-height: 44px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-box input {
  width: 100%;
  min-width: 0;
  color: #ffffff;
  background: transparent;
  border: 0;
  outline: 0;
}

.search-box input::placeholder {
  color: #c8d1ce;
}

.nav-list {
  display: grid;
  gap: 6px;
  margin-top: 22px;
}

.nav-link {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 9px;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  color: #f7f1e4;
  text-decoration: none;
  border-left: 3px solid transparent;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--brass);
}

.nav-link span:first-child {
  color: #d9c99e;
  font-size: 14px;
}

.content {
  min-width: 0;
  padding: 28px clamp(18px, 5vw, 72px) 64px;
}

.topbar {
  display: flex;
  gap: 18px;
  align-items: center;
  max-width: 1060px;
  margin: 0 auto 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.icon-button {
  display: none;
  width: 42px;
  height: 42px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  cursor: pointer;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin: 0 0 14px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.12;
}

h3 {
  margin-bottom: 8px;
  font-size: 19px;
}

.page,
.search-results {
  max-width: 1060px;
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 28px;
  align-items: stretch;
  margin-bottom: 28px;
}

.hero-copy {
  padding: clamp(26px, 5vw, 52px);
  color: #fffaf0;
  background:
    linear-gradient(135deg, rgba(24, 32, 36, 0.92), rgba(40, 72, 60, 0.94)),
    url("assets/elder-world-studio-logo.jpg") center/cover;
  box-shadow: var(--shadow);
}

.hero-copy p {
  max-width: 720px;
  color: #efe5cf;
  font-size: 19px;
  line-height: 1.65;
}

.hero-meta {
  display: grid;
  gap: 12px;
  align-content: start;
}

.stat {
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.stat strong {
  display: block;
  color: var(--forest);
  font-size: 26px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0 30px;
}

.card {
  min-height: 132px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 10px 25px rgba(25, 32, 36, 0.06);
}

.card p,
.section p,
li {
  color: var(--muted);
  line-height: 1.62;
}

.section {
  margin: 26px 0;
  padding: 26px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.section.accent {
  border-left: 5px solid var(--water);
}

.list {
  display: grid;
  gap: 10px;
  padding-left: 20px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  color: var(--forest);
  background: #eef3ed;
  border: 1px solid #cbd8c8;
  font-size: 13px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--panel);
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--forest);
  background: #ece6d8;
}

.source-link {
  color: var(--water);
  font-weight: 700;
}

.search-results {
  margin-bottom: 20px;
}

.result-button {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  padding: 14px;
  color: var(--ink);
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  cursor: pointer;
}

.result-button strong {
  display: block;
  margin-bottom: 4px;
}

.result-button small {
  color: var(--muted);
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    z-index: 10;
    inset: 0 auto 0 0;
    width: min(86vw, 340px);
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .icon-button {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .content {
    padding-inline: 14px;
  }

  .topbar {
    align-items: flex-start;
  }

  .hero-copy,
  .section {
    padding: 20px;
  }
}
