/* The illustrated guide keeps every chapter in the document for search and translation. */
.journal { min-width: 0; }
.journal-heading { display: flex; align-items: baseline; gap: 18px; margin: 4px 0 22px; }
.kb-refined .section .journal-heading h2 {
  margin: 0; color: var(--ink); font: 600 clamp(44px,4.5vw,74px)/.99 var(--book-serif);
  letter-spacing: -.04em;
}
.journal-place {
  display: inline-flex; gap: 8px; align-items: center; color: #d2b798;
  font: 550 14px/1.45 var(--atlas-ui);
}
.journal-place::before { content: ''; width: 23px; height: 1px; background: #92724e; }
.journal-tabs {
  display: grid; grid-template-columns: repeat(5,minmax(0,1fr));
  border-block: 1px solid var(--rule); margin-bottom: 15px;
  scroll-margin-top: calc(var(--header-size) + 12px);
}
.journal-tabs[hidden], .journal-page[hidden], .journal-next[hidden] { display: none; }
.journal-tabs button {
  position: relative; display: flex; align-items: center; gap: 11px; min-width: 0; padding: 12px 10px;
  background: transparent; border: 0; color: #c7c1bb; text-align: start; cursor: pointer;
}
.journal-tabs button + button { border-left: 1px solid var(--rule); }
.journal-tabs img { width: clamp(38px,3.3vw,54px); height: 42px; object-fit: cover; border-radius: 2px; filter: saturate(.67); }
.journal-tabs button > span { min-width: 0; }
.journal-tabs small { display: block; color: #a9a29a; font: 500 11px/1.25 var(--atlas-ui); font-variant-numeric: tabular-nums; }
.journal-tabs strong { display: block; color: inherit; font: 600 14px/1.45 var(--atlas-ui); overflow-wrap: anywhere; }
.journal-tabs button:hover, .journal-tabs button[aria-selected=true] { color: #f5e5d0; background: #282423; }
.journal-tabs button[aria-selected=true]::after { content: ''; position: absolute; height: 2px; background: var(--accent); inset: auto 0 0; }
.journal-tabs button[aria-selected=true] img { filter: none; }
.journal-page {
  display: grid; grid-template-columns: minmax(0,1.18fr) minmax(0,1fr); min-width: 0;
  border: 1px solid #4a4039; border-radius: 5px; overflow: clip;
  background: radial-gradient(ellipse at 82% 0%,#302823 0%,#222022 46%,#201f21 100%);
}
.journal-art { min-height: 345px; position: relative; isolation: isolate; }
.journal-art img { position: absolute; height: 100%; width: 100%; object-fit: cover; object-position: 49% 44%; }
.journal-art::after { content: ''; position: absolute; inset: 0; box-shadow: inset -1px 0 #ffffff15; pointer-events: none; }
.journal-body { align-self: center; min-width: 0; padding: clamp(22px,2.6vw,46px); }
.journal-kicker { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; color: #e3b784; font: 650 13px/1.4 var(--atlas-ui); }
.journal-kicker::before { content: ''; width: 25px; height: 1px; background: #bb936a; }
.kb-refined .section .journal-body h3 { margin: 0 0 14px; color: #faf1e6; font: 600 clamp(29px,2.65vw,46px)/1.02 var(--book-serif); letter-spacing: -.025em; }
.kb-refined .section .journal-body p { margin: 0; max-width: 57ch; color: #ddd7d1; font: 450 16px/1.6 var(--atlas-ui); }
.journal-note { margin-top: 12px; }
.journal-note summary, .journal-body > button[data-kb-link] {
  width: fit-content; cursor: pointer; color: #ddbea0; background: none; border: 0; padding: 3px 0;
  font: 550 14px/1.45 var(--atlas-ui);
}
.journal-body > button[data-kb-link] { display: block; text-decoration: underline; text-underline-offset: 4px; margin-top: 8px; }
.journal-note summary:hover, .journal-body > button[data-kb-link]:hover { color: #ffe1bc; }
.kb-refined .section .journal-note p { padding: 6px 0 4px; color: var(--secondary); font-size: 14px; }
.journal-next {
  display: inline-flex; align-items: center; gap: 18px; margin-top: 22px; padding: 10px 16px;
  min-height: 42px; border: 1px solid #f3cca3; border-radius: 4px; color: #241b12;
  background: #e7bd8e; font: 650 14px/1.4 var(--atlas-ui); cursor: pointer;
}
.journal-next:hover { background: #f3cfa7; }
.kb-refined .section h2[tabindex="-1"]:focus { outline: 0; }
.kb-refined .section h2[tabindex="-1"]:focus-visible { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .15em; text-decoration-thickness: 2px; }
.journal-page:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[data-kb-section="firstSteps"] .first-steps { gap: clamp(24px,2.7vw,42px); }
[data-kb-section="firstSteps"] .first-steps-heading > span { color: var(--accent); font: 550 13px/1.4 var(--atlas-ui); letter-spacing: .025em; text-transform: none; }
.kb-refined .journal-roster .first-steps-heading h3, .kb-refined .first-steps-systems h3 {
  margin: 4px 0 14px; color: var(--ink); font: 600 clamp(28px,2.2vw,38px)/1.12 var(--book-serif);
}
.journal-roster .first-steps-npcs { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(240px,100%),1fr)); gap: 8px 16px; }
.journal-roster .first-steps-npcs article {
  grid-template-columns: 76px minmax(0,1fr); min-height: 84px; gap: 12px; padding: 4px 8px 4px 0;
  border: 0; border-top: 1px solid var(--rule); border-radius: 0; background: transparent;
}
.journal-roster .first-steps-npcs img { width: 76px; height: 76px; object-fit: contain; background: radial-gradient(ellipse at 50% 65%,#40362e,transparent 72%); }
.journal-roster .first-steps-npcs b { color: var(--ink); font: 650 16px/1.35 var(--atlas-ui); }
.journal-roster .first-steps-npcs span, [data-kb-section="firstSteps"] .first-steps-interface span { color: var(--secondary); font-size: 14px; line-height: 1.5; }
.journal-interface { padding: 0 18px; border-block: 1px solid var(--rule); background: #1e1d1f; }
.journal-interface > summary { color: var(--ink); cursor: pointer; font: 600 17px/1.4 var(--atlas-ui); padding: 18px 0; }
.journal-interface .first-steps-interface { margin-bottom: 18px; }
[data-kb-section="firstSteps"] .first-steps-system-grid button { background: var(--surface); border-color: var(--rule); }
[data-kb-section="firstSteps"] .first-steps-system-grid b { color: var(--ink); font-size: 15px; }
[data-kb-section="firstSteps"] .first-steps-system-grid small { color: var(--secondary); font-size: 14px; }
@media (min-width:901px) and (max-width:1160px) {
  .journal-tabs img { width: 30px; height: 34px; }
  .journal-tabs button { gap: 6px; padding-inline: 6px; }
  .journal-tabs strong { font-size: 13px; }
  .journal-page { grid-template-columns: minmax(0,1fr) minmax(0,1.12fr); }
}
@media (max-width:700px) {
  .journal-heading { margin: 2px 0 14px; gap: 12px; flex-wrap: wrap; }
  .kb-refined .section .journal-heading h2 { font-size: clamp(36px,9.5vw,50px); }
  .journal-place { font-size: 13px; }
  .journal-place::before { width: 12px; }
  .journal-tabs { margin: 0 0 10px; scroll-margin-top: 54px; }
  .journal-tabs button { padding: 6px 2px; gap: 3px; flex-direction: column; justify-content: center; }
  .journal-tabs img { width: 100%; max-width: 60px; height: 30px; }
  .journal-tabs button > span { width: 100%; }
  .journal-tabs strong { text-align: center; font-size: clamp(10px,2.9vw,13px); }
  .journal-tabs small { display: none; }
  .journal-page { grid-template-columns: minmax(0,1fr); }
  .journal-art { min-height: 0; aspect-ratio: 2.25; }
  .journal-body { padding: 17px 19px 20px; }
  .journal-kicker { margin-bottom: 7px; }
  .kb-refined .section .journal-body h3 { font-size: 33px; margin-bottom: 10px; }
  .kb-refined .section .journal-body p { font-size: 15px; }
  .journal-next { margin-top: 15px; }
}
@media (prefers-reduced-motion:no-preference) {
  .journal-page[role=tabpanel]:not([hidden]) .journal-body { animation: kb-chapter-in .18s ease-out; }
  @keyframes kb-chapter-in { from { opacity: .45; transform: translateY(3px); } to { opacity: 1; transform: none; } }
}
