/**
 * @title Atomicity Hiscores
 * @description 2006 layout, rough medieval finish: rubble wall, masonry-framed panels, singed parchment.
 *              Skill icons are cut from the game cache; the textures are generated by tools/hiscores_art.
 **/
@font-face {
	font-family: 'RuneScape UF';
	src: url('../fonts/RuneScape-UF.woff2') format('woff2'),
	     url('../fonts/RuneScape-UF.woff') format('woff'),
	     url('../fonts/RuneScape-UF.ttf') format('truetype');
	font-display: swap;
}

html, body {
	margin: 0;
	min-height: 100%;
	background: #0a0907 url('../images/hiscores/stone.png') repeat;
	color: #d9cdb0;
	font: 15px/1.3 Arial, Helvetica, sans-serif;
}
body { box-shadow: inset 0 0 220px 40px rgba(0, 0, 0, .75); min-height: 100vh; }
a { color: #d9cdb0; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- masonry columns down both sides of a wide window ---- */
.hs-pillar {
	position: fixed;
	top: 0; bottom: 0;
	width: 84px;
	background: #15120e url('../images/hiscores/slab.png') repeat;
	box-shadow: inset 12px 0 18px -6px #000, inset -12px 0 18px -6px #000, 0 0 30px 6px #000;
	z-index: 0;
	pointer-events: none;
}
.hs-pillar-l { left: 0; }
.hs-pillar-r { right: 0; }

#hs-wrap { position: relative; z-index: 1; max-width: 1060px; margin: 0 auto; padding: 0 16px 24px; }
#hs-top {
	padding: 18px 0 6px;
	text-align: center;
	font-family: 'RuneScape UF', Georgia, serif;
	font-size: 30px;
	color: #a89870;
	text-shadow: 2px 2px 0 #000, 0 0 8px #000;
}
#hs-top a { color: #d9a12a; }
#hs-top a:hover { text-decoration: none; color: #f0b838; }

#hs-cols {
	display: grid;
	grid-template-columns: 236px minmax(0, 1fr) 220px;
	gap: 18px;
	align-items: start;
}

/* ---- stone-framed boxes (skill list, right-hand panels) ---- */
.hs-stone {
	position: relative;
	padding: 9px;
	background: #1a1712 url('../images/hiscores/slab.png') repeat;
	box-shadow: 0 0 0 1px #000, 0 8px 18px rgba(0, 0, 0, .9), inset 0 0 0 1px rgba(255, 240, 200, .06), inset 0 0 10px rgba(0, 0, 0, .8);
}
.hs-fill {
	background: rgba(8, 7, 5, .92);
	box-shadow: inset 0 0 0 1px #000, inset 0 0 16px #000, 0 0 0 1px rgba(150, 130, 95, .18);
}

/* ---- left: Category banner + skill list ---- */
#hs-left { padding-top: 8px; }
#hs-banner { position: relative; z-index: 2; display: block; width: 236px; height: auto; margin-bottom: -16px; }
.hs-bantext { font-family: 'RuneScape UF', Georgia, serif; font-size: 34px; fill: #23170a; }
#hs-left .hs-stone { padding-top: 12px; }
#hs-tables { list-style: none; margin: 0; padding: 8px 0; }
#hs-tables li a {
	display: flex;
	align-items: center;
	gap: 6px;
	height: 23px;
	padding: 0 8px 0 6px;
	font-size: 15px;
	color: #d9cdb0;
	text-shadow: 1px 1px 0 #000;
}
#hs-tables li a:hover { color: #fff; text-decoration: none; background: rgba(60, 52, 38, .5); }
#hs-tables li.hs-on a {
	background: linear-gradient(90deg, #1b1f2c, #2d3347 50%, #181b27);
	box-shadow: inset 0 0 0 1px #000, inset 0 0 8px rgba(0, 0, 0, .7);
	color: #f0d890;
}
.hs-ico {
	flex: none;
	display: inline-block;
	width: 26px; height: 26px;
	margin: -2px 0;
	background: url('../images/hiscores/skills.png?v=30') no-repeat;
	image-rendering: pixelated;
	vertical-align: middle;
}
#hs-left .hs-ico { filter: drop-shadow(0 0 1px rgba(205, 185, 140, .7)); }
.hs-ico0 { background: none; }

/* ---- centre: the singed scroll ---- */
#hs-scroll { position: relative; margin-top: 18px; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .85)); }
.hs-roll {
	position: relative;
	z-index: 2;
	height: 60px;
	margin: 0 -16px;
	background: url('../images/hiscores/scroll-top.png') center / 100% 100% no-repeat;
}
.hs-roll-b { background-image: url('../images/hiscores/scroll-bottom.png'); }
#hs-main {
	position: relative;
	z-index: 1;
	margin: -16px 0;
	padding: 26px 68px 26px 42px;
	min-height: 380px;
	background: url('../images/hiscores/parchment.png') center top / 100% auto repeat-y;
	color: #1c1206;
}
#hs-main a { color: #1c1206; }
#hs-main a:hover { color: #6a1a00; }
.hs-title {
	margin: 0 0 8px;
	text-align: center;
	font: 24px 'RuneScape UF', Georgia, serif;
	color: #2a1606;
	text-shadow: 0 1px 0 rgba(255, 240, 200, .35);
}
.hs-title a { text-decoration: underline; }

.hs-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.hs-table th { padding: 2px 6px; text-align: left; font-weight: bold; color: #2a1606; border-bottom: 1px solid rgba(60, 35, 10, .45); }
.hs-table td { padding: 1px 6px; vertical-align: middle; }
.hs-table .hs-r { text-align: right; font-variant-numeric: tabular-nums; }
.hs-table .hs-c { text-align: center; }
.hs-table tbody tr:hover td { background: rgba(90, 55, 15, .14); }
.hs-table tr.hs-hl td { background: rgba(90, 55, 15, .3); font-weight: bold; }
.hs-personal td:first-child a, .hs-compare td:first-child a { display: inline-flex; align-items: center; gap: 5px; }
.hs-personal tbody tr:first-child td { font-weight: bold; }
.hs-compare { font-size: 14px; }
.hs-compare thead tr:first-child th { font-size: 15px; }
.hs-compare td:nth-child(4), .hs-compare th:nth-child(4) { padding-right: 14px; border-right: 1px solid rgba(60, 35, 10, .45); }
.hs-compare thead tr:first-child th:nth-child(2) { border-right: 1px solid rgba(60, 35, 10, .45); }
.hs-table td.hs-win  { color: #0f4a0c; font-weight: bold; }
.hs-table td.hs-lose { color: #7a0c06; }

/* quest points: the table, a player's quests and diaries */
#hs-tables li.hs-sep { height: 0; margin: 6px 8px; border-top: 1px solid #000; border-bottom: 1px solid rgba(150, 130, 95, .25); }
.hs-qtable td:nth-child(2) { width: 60%; }
.hs-qsum { text-align: center; margin: 0 0 10px; font-size: 15px; }
.hs-qsum a { text-decoration: underline; }
.hs-sub { margin: 16px 0 4px; text-align: center; font: 20px 'RuneScape UF', Georgia, serif; color: #2a1606; }
.hs-quests td { padding: 2px 6px; }
.hs-table td.hs-none { text-align: center; font-style: italic; color: #4a3418; }
.hs-personal tr.hs-qrow td { border-top: 1px solid rgba(60, 35, 10, .45); font-weight: bold; }
.hs-personal tr.hs-clue td { font-size: 14px; }
.hs-table tr.hs-total td { border-top: 1px solid rgba(60, 35, 10, .45); font-weight: bold; }

/* while a page is loading in place */
#hs-main, #hs-tables, #hs-right { transition: opacity .12s; }
html.hs-loading #hs-main { opacity: .55; }
html.hs-loading, html.hs-loading a { cursor: progress; }

/* page arrows on the right of the scroll */
.hs-arrows {
	position: absolute;
	right: 22px; top: 50%;
	transform: translateY(-50%);
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.hs-arrows a, .hs-arrows span {
	display: block;
	width: 32px; height: 36px;
	background: url('../images/hiscores/arrow.svg') center / contain no-repeat;
}
.hs-arrows .hs-down { transform: rotate(180deg); }
.hs-arrows span { opacity: .3; }
.hs-arrows a:hover { filter: brightness(1.4); }

.hs-pager { display: flex; justify-content: space-between; margin-top: 10px; font-size: 13px; color: #3a2410; }
.hs-pager em { font-style: normal; }
.hs-empty { text-align: center; padding: 30px 8px; }
.hs-note { text-align: center; font-size: 14px; color: #3a2410; margin: 8px 0; }
.hs-err { text-align: center; color: #7a0c06; font-weight: bold; }
.hs-login { display: flex; flex-direction: column; gap: 10px; width: 230px; margin: 18px auto 0; }
.hs-login label { display: flex; flex-direction: column; gap: 3px; font-weight: bold; font-size: 14px; }

/* live refresh: rows that changed */
@keyframes hs-flash { from { background: #e0a830; } to { background: transparent; } }
.hs-table tr.hs-up td  { animation: hs-flash 2.5s ease-out; }
.hs-table tr.hs-lvl td { animation: hs-flash 5s ease-out; }
.hs-table tr.hs-lvl td:nth-child(3)::after { content: ' \25B2'; color: #0f6a0c; }

/* ---- right: search, compare, friends ---- */
#hs-right { display: flex; flex-direction: column; gap: 22px; padding-top: 24px; }
.hs-panel { display: flex; flex-direction: column; align-items: center; gap: 7px; margin: 0; padding: 0 12px 14px; text-align: center; }
.hs-panel h2 {
	align-self: stretch;
	margin: 0 -12px 4px;
	padding: 6px 4px;
	font: bold 15px Arial, Helvetica, sans-serif;
	color: #e0b850;
	text-shadow: 1px 1px 0 #000;
	background: linear-gradient(#2a241b, #15120d);
	border-bottom: 1px solid #000;
	box-shadow: 0 1px 0 rgba(150, 130, 95, .15);
}
.hs-panel p { margin: 0 0 2px; font-size: 14px; color: #c8bb9c; }
input[type=text], input[type=number], input[type=password], input[type=email] {
	box-sizing: border-box;
	width: 100%;
	height: 28px;
	padding: 2px 7px;
	background: #0c0a07;
	color: #eadfc4;
	border: 1px solid #000;
	border-radius: 0;
	box-shadow: inset 0 1px 4px #000, 0 0 0 1px #4a4134;
	font: 15px Arial, Helvetica, sans-serif;
}
input:focus { outline: none; box-shadow: inset 0 1px 4px #000, 0 0 0 1px #b08a38; }
.hs-login input { background: rgba(20, 12, 4, .85); }
.hs-panel input { width: 100%; }
button, .hs-btn {
	display: inline-block;
	padding: 4px 14px;
	background: linear-gradient(#4b4436, #26211a);
	color: #e8c872;
	border: 1px solid #000;
	border-radius: 0;
	box-shadow: inset 0 1px 0 rgba(255, 240, 200, .15), 0 0 0 1px #3a3328, 0 2px 4px rgba(0, 0, 0, .8);
	font: bold 14px Arial, Helvetica, sans-serif;
	text-shadow: 1px 1px 0 #000;
	cursor: pointer;
}
#hs-right a.hs-btn, #hs-main a.hs-btn { color: #e8c872; }
button:hover, .hs-btn:hover { background: linear-gradient(#5c5442, #2e281f); color: #ffd880; text-decoration: none; }
button:active { background: linear-gradient(#26211a, #3b352a); }

/* ---- footer ---- */
#hs-foot { display: flex; justify-content: space-between; margin-top: 18px; font-size: 13px; color: #8f8268; text-shadow: 1px 1px 0 #000; }
#hs-foot a { color: #c99a30; }
.hs-foot-links a + a { margin-left: 16px; }
#hs-live i {
	display: inline-block;
	width: 7px; height: 7px;
	margin-right: 5px;
	border-radius: 50%;
	background: #3a3226;
	vertical-align: 1px;
}
#hs-live.on i { background: #4a2; box-shadow: 0 0 6px #4a2; }

/* ---- smaller screens ---- */
@media (max-width: 1340px) { .hs-pillar { display: none; } }
@media (max-width: 900px) {
	body { box-shadow: none; }
	#hs-cols { grid-template-columns: 1fr; gap: 8px; }
	#hs-scroll { order: 1; margin-top: 4px; }
	#hs-left { order: 2; }
	#hs-right { order: 3; padding-top: 10px; }
	#hs-banner { margin: 0 auto -16px; }
	#hs-tables { display: grid; grid-template-columns: 1fr 1fr; }
	.hs-roll { height: 44px; margin: 0 -6px; }
	#hs-main { margin: -12px 0; padding: 18px 46px 18px 32px; min-height: 0; }
	.hs-arrows { right: 12px; }
	.hs-arrows a, .hs-arrows span { width: 26px; height: 30px; }
	.hs-table { font-size: 14px; }
	.hs-table th, .hs-table td { padding: 1px 4px; }
	.hs-compare { font-size: 11px; }
	.hs-compare .hs-ico { display: none; }
	.hs-compare th, .hs-compare td { padding: 1px 2px; }
	.hs-compare td:nth-child(4), .hs-compare th:nth-child(4) { padding-right: 4px; }
}

/* ---- accounts (src/account.inc): the forms on the scroll, the box on the right ---- */
.ac .ac-scroll { flex: 1; }
.ac-form { width: 280px; }
.ac-form small { margin-top: -6px; font-size: 12px; color: #4a3218; line-height: 1.3; }
.ac-ok { text-align: center; color: #1f4a0c; font-weight: bold; }
.ac-facts { margin: 6px auto 4px; border-collapse: collapse; font-size: 14px; }
.ac-facts th, .ac-facts td { padding: 4px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(60, 35, 10, .3); }
.ac-facts th { color: #2a1606; white-space: nowrap; }
.ac-row { display: flex; gap: 10px; justify-content: center; margin: 10px 0; }
.ac-inline { text-align: center; margin: 8px 0; }
button.ac-link { background: none; border: 0; box-shadow: none; padding: 0; color: #3a2410; font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
button.ac-link:hover { background: none; color: #000; }
.ac-box p { margin: 4px 0 6px; }
.ac-box form { margin: 0; }
.ac-box form button { width: 100%; }
/* the authenticator app's setup (account.inc): the QR code on white, the key to type, the backup codes */
.ac-qr { display: flex; justify-content: center; margin: 8px 0; }
.ac-qr svg { width: 220px; height: 220px; padding: 6px; background: #fff; border: 2px solid #3a2410; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.ac-key { display: inline-block; margin-top: 4px; padding: 3px 8px; font: bold 15px/1.4 monospace; letter-spacing: 1px; color: #1c1206; background: rgba(255, 248, 225, .7); border: 1px solid rgba(60, 35, 10, .4); }
.ac-backups { display: grid; grid-template-columns: repeat(2, max-content); gap: 6px 22px; justify-content: center; margin: 8px auto 14px; padding: 10px 16px; list-style: none; width: max-content; font: bold 16px/1.4 monospace; color: #1c1206; background: rgba(255, 248, 225, .7); border: 1px solid rgba(60, 35, 10, .4); }
.ac-captcha { display: flex; justify-content: center; min-height: 65px; margin: 4px 0; }
.ac-staff { display: inline-block; margin-left: 3px; padding: 0 4px; font-size: 11px; font-weight: bold; color: #1c1206; background: #e0b850; vertical-align: 1px; }
