/* Project Epoch Atlas page. Relies on the tokens in styles.css. */
.atlas-app { min-height: calc(100vh - 130px); background: var(--paper); color: var(--ink); }
.atlas-intro { padding: 90px clamp(24px, 8vw, 130px) 52px; background: linear-gradient(115deg, #ead09b, #d8b87c); border-bottom: 1px solid #9b7a3d; }
.atlas-intro h1 { font: 500 clamp(50px, 7vw, 92px) var(--display); line-height: 1.05; margin: 0 0 18px; }
.atlas-intro > p:not(.section-kicker) { color: #5f5039; max-width: 600px; line-height: 1.8; }
.atlas-intro .search { max-width: 510px; margin-top: 32px; padding: 10px 0; }
.atlas-intro .search input { font-size: 16px; }
.atlas-tools { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; margin-top: 14px; }
.atlas-status { margin: 0; min-height: 1.4em; font: 10px var(--display); letter-spacing: .08em; text-transform: uppercase; color: #8a6a35; }
.text-button { border: 0; background: transparent; padding: 0; color: #193d7d; font: 11px var(--display); letter-spacing: .12em; cursor: pointer; display: inline-flex; gap: 10px; align-items: center; transition: color .25s; }
.text-button:hover { color: #8b631e; }
.text-button span { display: inline-block; transition: transform .4s var(--ease-out); }
.text-button:hover span { transform: rotate(180deg); }

.atlas-browser { display: grid; grid-template-columns: 260px 1fr; max-width: 1260px; margin: 0 auto; min-height: 500px; }
.atlas-sidebar { padding: 48px 30px; border-right: 1px solid #b09053; display: flex; flex-direction: column; gap: 8px; align-self: start; position: sticky; top: var(--header-height); }
.atlas-tab { text-align: left; background: transparent; border: 0; border-left: 3px solid transparent; padding: 15px 14px; font: 12px var(--display); letter-spacing: .1em; color: #554528; cursor: pointer; transition: background-color .25s, color .25s, border-color .25s; }
.atlas-tab.active, .atlas-tab:hover { border-left-color: var(--blue); background: rgba(255, 245, 216, .55); color: #193d7d; }

.entry-list { padding: 42px 7vw; columns: 2; column-gap: 44px; }
.atlas-entry { break-inside: avoid; padding: 24px 12px 30px; margin: 0 -12px; border-top: 1px solid #b09053; animation: entry-in .5s ease both; animation-delay: calc(var(--n, 0) * 45ms); transition: background-color .4s, box-shadow .4s; }
@keyframes entry-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.atlas-entry.is-highlighted { background: rgba(255, 246, 222, .92); box-shadow: 0 0 0 2px var(--blue); }
.atlas-entry h2 { font: 500 27px var(--display); line-height: 1.15; margin: 13px 0; color: var(--ink); }
.entry-copy { color: #65543a; line-height: 1.75; font-size: 14px; margin: 0 0 12px; }
.entry-source { margin: 0; font: 10px var(--display); letter-spacing: .08em; color: #8a6a35; text-transform: uppercase; }
.entry-citations { font: 11px var(--body); line-height: 1.6; margin: 14px 0 0; color: #735a2d; }
.entry-citations a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.entry-citations a:hover { color: #8b631e; }
mark { background: rgba(33, 73, 149, .18); color: inherit; padding: 0 2px; }
.empty { color: #65543a; }
.to-top { position: fixed; right: 22px; bottom: 22px; z-index: 6; padding: 10px 14px; border: 1px solid var(--gold); background: rgba(7, 14, 25, .9); color: var(--gold); font: 11px var(--display); letter-spacing: .12em; opacity: 0; transform: translateY(10px); transition: opacity .3s, transform .3s var(--ease-out); pointer-events: none; }
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--gold); color: var(--ink); }

@media (max-width: 800px) {
  .atlas-intro { padding: 56px 24px 40px; }
  .atlas-browser { display: block; }
  .atlas-sidebar { position: static; border-right: 0; border-bottom: 1px solid #b09053; padding: 12px 12px 0; flex-direction: row; gap: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .atlas-tab { white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; padding: 12px; }
  .atlas-tab.active, .atlas-tab:hover { border-left: 0; border-bottom-color: var(--blue); }
  .entry-list { columns: 1; padding: 8px 24px 40px; }
  .atlas-entry { margin: 0; padding: 24px 0 30px; }
  .to-top { right: 14px; bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .atlas-entry { animation: none; }
}
