/* Astra PTS — public site on top of the original theme (static/orig/astra.css):
   what the original did with fancybox/inline styles, and our own pages (bosses, wiki, clans, profiles) in its look. */

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
body { display: block; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 300; background: var(--color-gold); color: var(--color-bg); padding: 8px 14px; }
.skip:focus { left: 8px; }

/* mobile drawer: staggered items (the original set --i inline) */
.nav-drawer__nav > :nth-child(1) { --i: 0; } .nav-drawer__nav > :nth-child(2) { --i: 1; } .nav-drawer__nav > :nth-child(3) { --i: 2; }
.nav-drawer__nav > :nth-child(4) { --i: 3; } .nav-drawer__nav > :nth-child(5) { --i: 4; } .nav-drawer__nav > :nth-child(6) { --i: 5; }
.nav-drawer__nav > :nth-child(7) { --i: 6; } .nav-drawer__nav > :nth-child(8) { --i: 7; } .nav-drawer__nav > :nth-child(9) { --i: 8; }
.nav-drawer__nav > :nth-child(10) { --i: 9; }
.step--d2 { --reveal-delay: .12s; } .step--d3 { --reveal-delay: .24s; }

/* download window (fancybox inline in the original) */
.window { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 24px 16px; overflow-y: auto; }
.window .fancybox-bg { position: fixed; inset: 0; opacity: 0; transition: opacity .3s var(--ease); }
.window.fancybox-is-open .fancybox-bg { opacity: .92; }
.window__slide { position: relative; width: 100%; display: flex; justify-content: center; opacity: 0; transform: translateY(14px);
  transition: opacity .4s var(--ease), transform .4s var(--ease); }
.window.fancybox-is-open .window__slide { opacity: 1; transform: none; }

/* flash message */
.toast { position: fixed; top: calc(var(--nav-h) + 12px); left: 50%; z-index: 350; transform: translateX(-50%); max-width: min(560px, calc(100vw - 32px));
  padding: 12px 20px; background: var(--color-surface-raised); border: 1px solid var(--color-border-strong); color: var(--color-ivory);
  box-shadow: var(--shadow-card); cursor: pointer; transition: opacity .3s; }
.toast--err { border-color: rgba(184, 102, 75, .7); }
.toast--ok { border-color: rgba(143, 191, 115, .55); }

/* pages without a hero start below the fixed header */
.main-content > :first-child:not(.hero):not(.page-hero):not(.page-head) { margin-top: calc(var(--nav-h) + 40px); }

/* our page head = the original compact page hero */
.page-head {
  position: relative; isolation: isolate; overflow: hidden; margin-bottom: clamp(32px, 4vw, 56px);
  padding: calc(var(--nav-h) + clamp(56px, 8vw, 120px)) 0 clamp(40px, 5vw, 64px); border: 0;
  background:
    linear-gradient(90deg, rgba(6, 5, 4, .9) 0%, rgba(6, 5, 4, .55) 55%, rgba(6, 5, 4, .35) 100%),
    linear-gradient(180deg, rgba(6, 5, 4, .6) 0%, transparent 35%, var(--color-bg) 100%),
    url('/static/orig/images/bg/castle_bot.jpg') center 40% / cover no-repeat;
}
.page-head::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line-gold); opacity: .25; }
.page-head .wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.page-head h1 { font-size: var(--fs-h1); text-shadow: 0 4px 40px rgba(0, 0, 0, .6); margin: 0; max-width: 900px; }
.page-head h1 small { font-family: var(--font-ui); font-size: .4em; letter-spacing: .04em; }
.page-head .kicker, .page-head .label { color: var(--color-gold); font: 700 var(--fs-label) / 1 var(--font-ui); letter-spacing: var(--tracking-label); text-transform: uppercase; }
.page-head__lead { max-width: 560px; color: var(--color-muted); font-size: 1.125rem; margin: 0; }
.page-hero { margin-bottom: clamp(32px, 4vw, 56px); }
.page-hero .news-card__date { color: var(--color-muted); }
.page-hero + .article-layout, .page-hero + .section { margin-top: 0; }

/* home: the world now */
.world-section { padding-top: 0; }
.world-section .stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.world-section .stat-cell { display: flex; flex-direction: column; gap: 8px; padding: 26px 24px; position: relative;
  background: linear-gradient(180deg, rgba(28, 24, 18, .9), rgba(19, 16, 12, .9)); border: 1px solid var(--color-border); }
.world-section .stat-cell__label { display: flex; align-items: center; gap: 10px; }
.world-section .stat-cell__value { font-family: var(--font-display); font-size: 1.75rem; color: var(--color-ivory); line-height: 1.15; }
.world-note { color: var(--color-muted); font-size: var(--fs-small); min-height: 1.4em; }
@media (max-width: 767px) { .world-section .stat-grid { grid-template-columns: 1fr; } }
.legends-more { margin-top: 18px; text-align: right; }
.legends-more .link-arrow { display: inline-flex; align-items: center; gap: 8px; }
.leaderboard__char { color: var(--color-ivory); }
a.leaderboard__char:hover { color: var(--color-gold-light); }
.news-card__title a { color: inherit; }
.news-card__title a:hover { color: var(--color-gold-light); }
.news-card__media { display: block; }
.news-section--page { padding-top: 0; }

/* our components inside the original palette */
.panel { background: linear-gradient(180deg, rgba(28, 24, 18, .92), rgba(19, 16, 12, .92)); border: 1px solid var(--color-border); padding: 24px; margin-bottom: 22px; }
.prose p { margin: 0 0 1em; }
.prose ul { list-style: disc; } .prose ol { list-style: decimal; }
.block { margin-bottom: 40px; }
.main-content > .wrap:last-child, .main-content > div.wrap:last-child { padding-bottom: clamp(56px, 8vw, 110px); }
.btn[disabled] { opacity: .5; cursor: progress; }
.linkbtn { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: var(--color-gold-light); }
.link-back::before { content: '← '; }
.error-page { padding: calc(var(--nav-h) + 100px) 0 120px; text-align: center; }
.forum-topic__avatar { background-image: url('/static/orig/images/forum/ava-def.jpg'); }
.link-arrow::after { content: none; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; }
.news-section--page .news-grid + .news-grid { margin-top: 28px; }
