/*
 * The guide. Everything Voidscape added that a Classic player would not recognise.
 *
 * Reads the tokens landing.css already defines so the page ages with the rest of the
 * site instead of drifting into its own palette. The only new tokens are the recessed
 * item slot, which market.css owns privately and this page needs its own copy of.
 */

:root {
	--slot-bg: #0d0a15;
	--slot-line: rgba(143, 85, 223, 0.22);
}

/* landing.css does not define this - every page that offers a skip link styles it
   itself, and without a rule it is simply a visible blue link parked over the wordmark. */
.skip-link {
	position: fixed;
	top: 10px;
	left: 10px;
	z-index: 100;
	transform: translateY(-160%);
	border: 1px solid var(--line-strong);
	border-radius: 7px;
	background: var(--void-2);
	color: var(--text);
	padding: 9px 13px;
}

.skip-link:focus { transform: translateY(0); }

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* landing.css styles only its own nav/footer links, so in-body prose links would
   otherwise render as default browser blue on a near-black page. */
.guide-main a,
.guide-hero a {
	color: var(--purple-hi);
	text-decoration: none;
	border-bottom: 1px solid rgba(178, 140, 242, 0.35);
}

.guide-main a:hover,
.guide-main a:focus-visible,
.guide-hero a:hover {
	color: var(--text);
	border-bottom-color: var(--text);
}

/* The jump strip is inside neither, but its links are chips, not prose. */
.jump-link { border-bottom: 0; }

.guide-hero {
	padding-bottom: 10px;
}

/* landing.css floors .hero-title at 46px, which suits a two-word title like
   "Patch notes". This one is long enough to need a smaller floor on a phone. */
.guide-hero .hero-title {
	font-size: clamp(32px, 7vw, 76px);
}

.guide-hero .hero-sub {
	max-width: 660px;
}

/* The reader arrives asking "is this thing still in the game" as often as "what does it
   do", so the freshness stamp sits in the hero rather than buried in a footer. */
.guide-stamp {
	margin-top: 16px;
	font-size: 13px;
	color: var(--muted);
}

.guide-stamp strong {
	color: var(--gold-hi);
	font-weight: 700;
}

/* ------------------------------------------------------------------ jump nav */

/* Sticky because the page is long by design: one screen of hunting for the Void Chest
   section is worse than a permanent 44px strip. */
.jump {
	position: sticky;
	top: 0;
	z-index: 20;
	margin-top: 18px;
	padding: 10px 24px;
	background: rgba(11, 8, 18, 0.86);
	backdrop-filter: blur(9px);
	-webkit-backdrop-filter: blur(9px);
	border-bottom: 1px solid var(--line);
}

.jump-inner {
	max-width: 1080px;
	margin: 0 auto;
	display: flex;
	gap: 8px;
	overflow-x: auto;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}

/* No scrollbar chrome on the strip itself - it reads as a broken element on desktop
   where the row usually fits without scrolling. */
.jump-inner::-webkit-scrollbar { height: 4px; }
.jump-inner::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }

.jump-link {
	flex: 0 0 auto;
	padding: 7px 14px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: rgba(21, 16, 34, 0.55);
	color: var(--muted);
	text-decoration: none;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.02em;
	white-space: nowrap;
	transition: border-color 120ms ease, color 120ms ease, background 120ms ease;
}

.jump-link:hover,
.jump-link:focus-visible {
	border-color: var(--line-strong);
	color: var(--text);
}

.jump-link.is-current {
	border-color: var(--purple-hi);
	background: rgba(143, 85, 223, 0.18);
	color: var(--text);
}

/* ------------------------------------------------------------------ sections */

.guide-main {
	max-width: 1080px;
	margin: 0 auto;
	padding: 0 24px;
}

.guide-section {
	padding: 46px 0 8px;
	/* Clears the sticky strip so an anchored heading is not hidden underneath it. */
	scroll-margin-top: 68px;
}

.guide-section + .guide-section {
	border-top: 1px solid rgba(143, 85, 223, 0.14);
}

.section-head {
	max-width: 720px;
	margin-bottom: 26px;
}

.section-kicker {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--purple-hi);
}

.section-title {
	margin-top: 8px;
	font-family: var(--display);
	font-size: clamp(27px, 4vw, 38px);
	font-weight: 400;
	line-height: 1.15;
	color: var(--text);
}

.section-lede {
	margin-top: 12px;
	color: var(--muted);
	font-size: 16px;
}

.sub-title {
	margin: 34px 0 16px;
	font-family: var(--display);
	font-size: 21px;
	font-weight: 400;
	color: var(--text);
}

.sub-title:first-child { margin-top: 0; }

/* Blocks stacked directly in a section space themselves rather than each instance
   carrying its own margin. Adjacent margins collapse, so a block following a
   .sub-title or .section-head keeps that element's larger spacing instead of summing. */
.guide-section > .panel,
.guide-section > .panel-grid,
.guide-section > .table-wrap,
.guide-section > .item-grid,
.guide-section > .npc-grid,
.guide-section > .facts,
.guide-section > .note {
	margin-top: 18px;
}

.guide-section > .section-lede {
	margin-bottom: 16px;
}

/* ------------------------------------------------------------------ item cards */

.item-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(390px, 1fr));
	gap: 16px;
}

.item-card {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--line);
	border-radius: 14px;
	background: var(--panel);
	overflow: hidden;
}

/* The four-piece set is the thing people came here for. A quiet lift, not a spotlight. */
.item-card.is-marquee {
	border-color: var(--line-strong);
	box-shadow: 0 0 0 1px rgba(143, 85, 223, 0.1), 0 14px 34px rgba(0, 0, 0, 0.34);
}

.item-head {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 16px 18px 12px;
}

/* Recessed square, same treatment as the market listing rows, so an item looks like
   the same object on both pages.

   Every item sprite in assets/market/item is exactly 48x32, so the scale can be a
   hard-coded integer multiple instead of the measure-and-fit pass market.js runs.
   2x = 96x64 inside a 108x76 box. Fractional scaling would blur pixel art, so if the
   sprite dimensions ever stop being uniform this needs revisiting, not loosening. */
.slot {
	position: relative;
	width: 108px;
	height: 76px;
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--slot-bg);
	border: 1px solid var(--slot-line);
	border-radius: 8px;
	box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.55);
	overflow: hidden;
}

.slot img {
	display: block;
	width: 96px;
	height: 64px;
	max-width: none;
	image-rendering: pixelated;
}

.slot.is-missing::after {
	content: "?";
	font-family: var(--display);
	font-size: 20px;
	color: var(--faint);
}

.item-ident {
	min-width: 0;
	flex: 1 1 auto;
}

.item-name {
	font-family: var(--display);
	font-size: 19px;
	font-weight: 400;
	line-height: 1.2;
	color: var(--text);
}

.item-desc {
	margin-top: 5px;
	font-size: 13px;
	color: var(--muted);
	font-style: italic;
}

/* ------------------------------------------------------------------ tags */

.tag-row {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 9px;
}

.tag {
	padding: 3px 9px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: rgba(21, 16, 34, 0.6);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--muted);
	white-space: nowrap;
}

.tag.is-slot { color: var(--purple-hi); border-color: rgba(178, 140, 242, 0.4); }
.tag.is-req { color: var(--gold-hi); border-color: rgba(201, 164, 91, 0.4); }
.tag.is-untradable { color: #d98d6a; border-color: rgba(217, 141, 106, 0.4); }
.tag.is-id { color: var(--faint); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ stat block */

.item-body {
	padding: 0 18px 16px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	flex: 1 1 auto;
}

/* Bonuses read as a table because that is how they read in the game's own panel, and
   because a player comparing two weapons wants the numbers in a column. */
/* Separators are drawn by each cell rather than by grid gap. A gap-based grid paints
   the container colour through the empty tail cells when the stat count does not fill
   the last row (five stats in three columns), which reads as a stray coloured block. */
.bonuses {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
	border: 1px solid var(--line);
	border-radius: 9px;
	background: var(--void-2);
	overflow: hidden;
}

.bonuses div {
	padding: 8px 6px;
	text-align: center;
	box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line);
}

.bonuses dt {
	font-size: 10px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--faint);
}

.bonuses dd {
	margin-top: 3px;
	font-family: var(--display);
	font-size: 17px;
	color: var(--text);
	font-variant-numeric: tabular-nums;
}

.bonuses dd.is-zero { color: var(--faint); }
.bonuses dd.is-neg { color: #d98d6a; }

/* ------------------------------------------------------------------ prose rows */

.row {
	display: flex;
	gap: 10px;
	font-size: 14px;
	line-height: 1.5;
}

.row-label {
	flex: 0 0 74px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--faint);
	padding-top: 3px;
}

.row-body { flex: 1 1 auto; min-width: 0; color: var(--text); }
.row-body p + p { margin-top: 7px; }
.row-body strong { color: var(--purple-hi); font-weight: 600; }

.row.is-effect .row-label { color: var(--purple-hi); }

/* The drop rate is the single most-argued number on any RSC server. It gets its own
   monospaced pill so it can be read, screenshotted and quoted without ambiguity. */
.rate {
	display: inline-block;
	padding: 1px 7px;
	border: 1px solid rgba(201, 164, 91, 0.4);
	border-radius: 5px;
	background: rgba(201, 164, 91, 0.1);
	color: var(--gold-hi);
	font-size: 13px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.gp {
	color: var(--gold-hi);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

/* ------------------------------------------------------------------ callouts */

.note {
	margin-top: 4px;
	padding: 10px 13px;
	border-left: 2px solid var(--line-strong);
	border-radius: 0 7px 7px 0;
	background: rgba(143, 85, 223, 0.08);
	font-size: 13px;
	color: var(--muted);
}

.note strong { color: var(--text); font-weight: 600; }

.note.is-warn {
	border-left-color: rgba(217, 141, 106, 0.7);
	background: rgba(217, 141, 106, 0.08);
}

/* ------------------------------------------------------------------ plain panels */

.panel {
	border: 1px solid var(--line);
	border-radius: 14px;
	background: var(--panel);
	padding: 18px 20px;
}

.panel-title {
	font-family: var(--display);
	font-size: 19px;
	font-weight: 400;
	color: var(--text);
	margin-bottom: 10px;
}

.panel p { font-size: 14px; color: var(--muted); }
.panel p + p { margin-top: 9px; }
.panel strong { color: var(--text); font-weight: 600; }

.panel-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 16px;
}

/* ------------------------------------------------------------------ fact grid */

/* Rates, costs and caps: short numbers that deserve to be scannable rather than
   buried mid-sentence. */
.facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 12px;
}

.facts article {
	border: 1px solid var(--line);
	border-radius: 11px;
	background: var(--panel);
	padding: 14px 15px;
}

.facts span {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--faint);
}

.facts strong {
	display: block;
	margin: 5px 0 6px;
	font-family: var(--display);
	font-size: 26px;
	font-weight: 400;
	color: var(--purple-hi);
	line-height: 1;
}

.facts p { font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------------ tables */

/* Wide content scrolls inside its own box so the page body never scrolls sideways
   on a phone. */
/* position:relative is load-bearing, not decoration. The .sr-only cells inside these
   tables are absolutely positioned, and a static ancestor does not clip absolutely
   positioned descendants, so on a phone they escaped the scroll box at their static
   x offset and dragged the whole document wider than the viewport. */
.table-wrap {
	position: relative;
	overflow-x: auto;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: var(--panel);
	-webkit-overflow-scrolling: touch;
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	min-width: 480px;
}

thead th {
	position: sticky;
	top: 0;
	background: var(--void-2);
	text-align: left;
	padding: 11px 14px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--faint);
	border-bottom: 1px solid var(--line);
	white-space: nowrap;
}

tbody td {
	padding: 10px 14px;
	border-bottom: 1px solid rgba(143, 85, 223, 0.12);
	color: var(--text);
	vertical-align: middle;
}

tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(143, 85, 223, 0.06); }

td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.is-name { font-weight: 600; }

/* An item name in a table still wants its sprite - it is the fastest way to know
   whether you have already seen the thing. */
.cell-item {
	display: flex;
	align-items: center;
	gap: 10px;
}

/* 1x here - 48x32 native inside a 56x40 box. */
.cell-slot {
	width: 56px;
	height: 40px;
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--slot-bg);
	border: 1px solid var(--slot-line);
	border-radius: 6px;
	overflow: hidden;
}

.cell-slot img {
	display: block;
	width: 48px;
	height: 32px;
	max-width: none;
	image-rendering: pixelated;
}

/* ------------------------------------------------------------------ mobs */

/* NPC renders are large and each a different size, so they are sized by height and
   left to smooth on downscale. Nearest-neighbour on a non-integer reduction of a
   500px render chews the pixel edges rather than preserving them. */
.mob-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
	gap: 10px;
	margin-top: 18px;
}

.mob {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	padding: 14px 8px 10px;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: var(--panel);
}

.mob img {
	height: 124px;
	width: auto;
	max-width: 100%;
	object-fit: contain;
	filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45));
}

.mob figcaption {
	font-family: var(--display);
	font-size: 14px;
	color: var(--text);
	text-align: center;
	line-height: 1.2;
}

.mob.is-large img { height: 190px; }

.mob-panel {
	display: flex;
	align-items: center;
	gap: 22px;
}

.mob-panel .mob {
	flex: 0 0 auto;
	border: 0;
	background: none;
	padding: 0;
}

.mob-panel .mob figcaption { color: var(--faint); font-size: 13px; }

.mob-copy { flex: 1 1 auto; min-width: 0; }
.mob-copy p { font-size: 14px; color: var(--muted); }
.mob-copy p + p { margin-top: 9px; }
.mob-copy strong { color: var(--text); font-weight: 600; }

/* ------------------------------------------------------------------ recipes */

.recipe {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 10px;
	margin: 12px 0 6px;
}

.ing {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	width: 78px;
}

.ing figcaption {
	font-size: 11px;
	line-height: 1.25;
	color: var(--muted);
	text-align: center;
}

.ing.is-result figcaption { color: var(--purple-hi); font-weight: 600; }

.recipe-arrow {
	align-self: center;
	font-family: var(--display);
	font-size: 26px;
	color: var(--faint);
	padding: 0 2px;
}

.recipe-step { font-size: 14px; color: var(--text); margin-top: 4px; }
.recipe-step strong { color: var(--purple-hi); }
.recipe-note { font-size: 12px; color: var(--faint); margin-bottom: 14px; }

/* ------------------------------------------------------------------ key panel */

.key-panel {
	display: flex;
	align-items: center;
	gap: 16px;
}

.key-panel .slot { flex: 0 0 auto; }
.key-panel .panel-title { margin-bottom: 6px; }

/* ------------------------------------------------------------------ npc cards */

.npc-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 14px;
}

.npc-card {
	border: 1px solid var(--line);
	border-radius: 12px;
	background: var(--panel);
	padding: 14px 16px;
}

.npc-name {
	font-family: var(--display);
	font-size: 17px;
	color: var(--text);
}

.npc-line {
	margin-top: 4px;
	font-size: 12px;
	color: var(--faint);
	font-variant-numeric: tabular-nums;
}

.npc-stats {
	display: flex;
	gap: 10px;
	margin-top: 10px;
	font-size: 12px;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}

.npc-stats b { color: var(--text); font-weight: 600; }

.npc-drop {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid rgba(143, 85, 223, 0.14);
	font-size: 13px;
	color: var(--muted);
}

.npc-card.is-aggro .npc-name::after {
	content: "aggressive";
	margin-left: 8px;
	padding: 2px 7px;
	border: 1px solid rgba(217, 141, 106, 0.45);
	border-radius: 999px;
	font-family: var(--body);
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: #d98d6a;
	vertical-align: middle;
}

/* ------------------------------------------------------------------ step list */

.steps {
	list-style: none;
	counter-reset: step;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* The marker is absolutely positioned rather than a flex sibling: a flex li would
   turn every inline <strong> in the step text into its own flex item and lay the
   sentence out as a row of disconnected fragments. */
.steps li {
	counter-increment: step;
	position: relative;
	padding-left: 38px;
	min-height: 26px;
	font-size: 14px;
	line-height: 1.55;
	color: var(--text);
}

.steps li::before {
	content: counter(step);
	position: absolute;
	left: 0;
	top: 0;
	width: 26px;
	height: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--line-strong);
	border-radius: 50%;
	font-family: var(--display);
	font-size: 14px;
	color: var(--purple-hi);
}

/* ------------------------------------------------------------------ closer */

.closer {
	max-width: 720px;
	margin: 48px auto 0;
	padding: 0 24px;
	text-align: center;
	color: var(--muted);
	font-size: 15px;
}

.quiet-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 22px;
	margin-top: 16px;
}

/* ------------------------------------------------------------------ responsive */

@media (max-width: 760px) {
	.guide-main { padding: 0 16px; }
	.jump { padding: 8px 16px; }
	.guide-section { padding-top: 34px; }

	.item-grid { grid-template-columns: 1fr; }

	/* Label-above rather than label-beside: 74px of gutter is a lot of a 320px screen. */
	.row { flex-direction: column; gap: 3px; }
	.row-label { flex: none; padding-top: 0; }

	.bonuses { grid-template-columns: repeat(3, 1fr); }
	.facts { grid-template-columns: repeat(2, 1fr); }

	.mob-grid { grid-template-columns: repeat(2, 1fr); }
	.mob img { height: 104px; }

	/* Sprite above the copy rather than beside it. */
	.mob-panel { flex-direction: column; align-items: flex-start; gap: 14px; }
	.mob-panel .mob { align-self: center; }

	.key-panel { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (max-width: 420px) {
	.facts { grid-template-columns: 1fr; }
	.item-head { gap: 11px; }
}

@media (prefers-reduced-motion: reduce) {
	.jump-link { transition: none; }
}
