/* Sub pages: one header treatment that carries the hero art down from the landing page */
body[data-page], body[data-title] { background: var(--ink); display: flex; flex-direction: column; }
.page { flex: 1; padding: var(--nav-h) 0 88px; }
.narrow { max-width: 880px; }

.page-head { position: relative; isolation: isolate; text-align: center; padding: clamp(44px, 7vw, 76px) 0 30px; margin-bottom: 24px; }
.page-head::before {
    content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: calc(-1 * var(--nav-h)); bottom: -40px;
    background: url("/bg2.webp") center 35% / cover no-repeat; filter: grayscale(1); opacity: .3;
    -webkit-mask-image: linear-gradient(180deg, #000 25%, transparent); mask-image: linear-gradient(180deg, #000 25%, transparent);
}
.page-title { margin: 0; font-size: clamp(2rem, 5.4vw, 3.2rem); font-weight: 700; letter-spacing: .04em; text-shadow: 0 4px 30px rgba(0, 0, 0, .8); }
.page-head .lede, .lost .lede { margin-left: auto; margin-right: auto; text-shadow: 0 1px 10px rgba(0, 0, 0, .9); }
.page-head .lede + .lede { margin-top: 6px; }
.page-head .ornament { margin-top: 24px; }
.page-head > .wrap > * { animation: rise-in .6s var(--ease) both; }

.card { padding: 22px 24px; background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--radius); }
.card-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 18px; }
.card-row p { margin: 0; color: var(--parchment-dim); }
.note { margin: 22px 0 0; text-align: center; font-size: .84rem; color: var(--parchment-faint); }
.plain { padding: 0; background: none; border: 0; cursor: pointer; font-size: .9rem; }

/* ---------- Top killers ---------- */
.board { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
.board th { padding: 0 16px 8px; text-align: left; font-family: var(--font-display); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--parchment-faint); border-bottom: 1px solid var(--gilt-line); }
.board td { padding: 13px 16px; background: var(--panel); border-block: 1px solid var(--hairline); font-variant-numeric: tabular-nums; transition: background-color .25s, border-color .25s; }
.board td:first-child { border-left: 1px solid var(--hairline); border-radius: var(--radius) 0 0 var(--radius); width: 76px; }
.board td:last-child { border-right: 1px solid var(--hairline); border-radius: 0 var(--radius) var(--radius) 0; }
.board tbody tr:hover td { background: var(--panel-soft); border-color: var(--gilt-line); }
.board .num { text-align: right; }
.rank { font-family: var(--font-display); font-weight: 700; color: var(--parchment-faint); }
.top .rank { display: grid; place-items: center; width: 28px; height: 28px; position: relative; isolation: isolate; color: var(--ink-deep); }
.top .rank::before { content: ""; position: absolute; inset: 4px; z-index: -1; transform: rotate(45deg); background: var(--gilt-soft); }
.top-2 .rank::before { background: #d6d6d2; }
.top-3 .rank::before { background: #b98a62; }
.top td { border-color: var(--gilt-line); }
.top td:first-child { border-left-color: var(--gilt); }
.top td:last-child { border-right-color: var(--gilt-line); }
/* the body font keeps the real upper / lower case of character names, which Cinzel cannot show */
.who { font-weight: 600; overflow-wrap: anywhere; }
.kills { color: var(--gilt-soft); font-weight: 700; }
.presence { display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; color: var(--parchment-faint); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #555; flex: none; }
.presence.is-online { color: var(--ok); }
.presence.is-online .dot { background: var(--ok); box-shadow: 0 0 8px rgba(124, 207, 138, .7); }
.board .skeleton { height: 14px; }
@media (max-width: 620px) {
    .board th, .board td { padding-left: 10px; padding-right: 10px; }
    .board td:first-child { width: 48px; }
    .board th:nth-child(3), .board td:nth-child(3) { display: none; }
    .board th:last-child { font-size: 0; }
    .board td:last-child { width: 28px; }
    .presence span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

/* ---------- Vote ---------- */
.vote-list { display: grid; gap: 10px; }
.vote-item { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 18px 20px; background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--radius); transition: border-color .3s; }
.vote-item.is-ready { border-color: var(--gilt-line); }
.vote-item.is-ready:hover { border-color: var(--gilt-soft); }
.vote-name { font-family: var(--font-display); font-size: 1.08rem; font-weight: 700; letter-spacing: .03em; }
.vote-state { margin-left: auto; font-size: .85rem; color: var(--parchment-faint); font-variant-numeric: tabular-nums; }
.vote-item.is-ready .vote-state { color: var(--ok); }
.vote-skeleton { height: 80px; }

/* ---------- Download ---------- */
.get { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 34px 24px; border-color: var(--gilt-line); }
.status { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-size: .9rem; color: var(--parchment-dim); }
.status[data-state="open"] .dot { background: var(--ok); box-shadow: 0 0 10px rgba(124, 207, 138, .7); }
.status[data-state="closed"] .dot { background: var(--gilt); }
.status[data-state="error"] .dot { background: var(--bad); }
.steps { counter-reset: s; margin-top: 36px; }
.steps li { counter-increment: s; position: relative; display: flex; gap: 22px; padding-bottom: 30px; }
.steps li::before { content: counter(s, upper-roman); flex: none; z-index: 1; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--gilt-line); border-radius: 50%; background: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: .84rem; color: var(--gilt-soft); }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 21px; top: 42px; bottom: 0; width: 1px; background: linear-gradient(var(--gilt-line), transparent); }
.steps h2 { margin: 8px 0 4px; font-size: 1.04rem; }
.steps p { margin: 0 0 6px; font-size: .92rem; color: var(--parchment-dim); }

/* ---------- Legal ---------- */
.doc { padding: clamp(22px, 4vw, 44px); background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--radius); }
.doc h2 { margin: 34px 0 10px; font-size: 1.16rem; color: var(--gilt-soft); }
.doc h2:first-of-type { margin-top: 0; }
.doc p, .doc li { color: var(--parchment-dim); font-size: .95rem; line-height: 1.75; }
.doc ul { list-style: disc; padding-left: 22px; margin: 8px 0; }
.doc li::marker { color: var(--gilt); }
.doc code { overflow-wrap: anywhere; color: var(--parchment); }
.doc .updated { margin: 0 0 24px; font-size: .8rem; color: var(--parchment-faint); }

/* ---------- 404 ---------- */
.lost { display: grid; place-items: center; text-align: center; padding-top: calc(var(--nav-h) + 48px); }
.lost-code { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(6rem, 24vw, 13rem); line-height: 1; letter-spacing: .06em; background: linear-gradient(100deg, var(--light) 49.6%, #3a3a3a 50.4%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lost-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 32px; }
