/* BiS-снаряжение спека: [bis] — inc/bis.php */

.bis { --cls: var(--gold); margin: 1.6em 0; }
.bis-src-drop { --src: #e8914a; }
.bis-src-quest { --src: #e9cf5b; }
.bis-src-craft { --src: #4fd17a; }
.bis-src-rep { --src: #4f8edc; }
.bis-src-pvp { --src: #e0524f; }
.bis-src-vendor { --src: #aab3c2; }
.bis-src-world { --src: #c58be8; }

/* Иконка и название предмета */
.bis-icon { flex-shrink: 0; display: block; border-radius: 8px; border: 2px solid #3a3f4a; background: #000; box-shadow: 0 2px 8px rgba(0, 0, 0, .45); }
.bis-icon.q2 { border-color: color-mix(in srgb, #1eff00 55%, #222); }
.bis-icon.q3 { border-color: color-mix(in srgb, #0070dd 75%, #222); box-shadow: 0 0 12px rgba(0, 112, 221, .28); }
.bis-icon.q4 { border-color: color-mix(in srgb, #a335ee 75%, #222); box-shadow: 0 0 12px rgba(163, 53, 238, .3); }
.bis-icon--empty { background: repeating-linear-gradient(45deg, #11151d 0 6px, #161b25 6px 12px); }
.bis .wh-link { background-image: none !important; padding-left: 0 !important; text-decoration: none; }
.entry-content .bis .wh-link.q1 { color: #f2efe8; }
.entry-content .bis .wh-link.q2 { color: #3ce63c; }
.entry-content .bis .wh-link.q3 { color: #3d9bff; }
.entry-content .bis .wh-link.q4 { color: #b867f5; }

.bis-item { display: flex; align-items: center; gap: 12px; min-width: 0; }
.bis-item__text { min-width: 0; }
.bis-item__name { font-weight: 600; font-size: 15.5px; line-height: 1.3; }
.bis-item__src { margin-top: 4px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.bis-item__note { margin-top: 3px; font-size: 12.5px; color: var(--muted); font-style: italic; }
.bis-chip {
	display: inline-block; margin-right: 4px; padding: 1px 7px; border-radius: 999px;
	font-size: 11.5px; font-weight: 600; letter-spacing: .02em; white-space: nowrap;
	color: var(--src, var(--muted)); background: color-mix(in srgb, var(--src, var(--muted)) 14%, transparent);
	border: 1px solid color-mix(in srgb, var(--src, var(--muted)) 35%, transparent);
}
.bis-chip--a { --src: #4f8edc; }
.bis-chip--h { --src: #e0524f; }

/* Фракция: предметы другой фракции прячутся */
.bis[data-faction="a"] [data-faction="h"].bis-item,
.bis[data-faction="h"] [data-faction="a"].bis-item { display: none; }

/* Ячейка */
.bis-slot {
	position: relative; padding: 12px 14px;
	background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
	transition: border-color .2s, opacity .2s;
}
.bis-slot:hover { border-color: color-mix(in srgb, var(--cls) 45%, var(--border)); }
.bis-slot__label { margin-bottom: 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.bis-alts { margin-top: 10px; border-top: 1px dashed var(--border); padding-top: 8px; }
.bis-alts summary { cursor: pointer; font-size: 13px; color: var(--gold); list-style: none; }
.bis-alts summary::-webkit-details-marker { display: none; }
.bis-alts summary::before { content: "▸ "; display: inline-block; transition: transform .2s; }
.bis-alts[open] summary::before { transform: rotate(90deg); }
.bis-alts__list { display: grid; gap: 10px; margin-top: 10px; }
.bis-alts .bis-item__name { font-size: 14px; font-weight: 500; }

/* Шапка: спек, фракция, характеристики, ссылки */
.bis-head {
	display: flex; flex-direction: column; gap: 18px; padding: 20px;
	background:
		radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, var(--cls) 22%, transparent), transparent 70%),
		var(--surface);
	border: 1px solid color-mix(in srgb, var(--cls) 40%, var(--border)); border-radius: var(--radius);
}
/* Медальон спека: иконка в кольцах цвета класса — заполняет свободное место панели */
.bis-head__emblem {
	position: relative; align-self: center; margin: auto 0; width: 168px; height: 168px; border-radius: 50%;
	display: grid; place-items: center;
	border: 1px solid color-mix(in srgb, var(--cls) 35%, transparent);
	background: radial-gradient(circle, color-mix(in srgb, var(--cls) 16%, transparent) 0 45%, transparent 70%);
}
.bis-head__emblem::before, .bis-head__emblem::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.bis-head__emblem::before { inset: 14px; border: 2px dashed color-mix(in srgb, var(--cls) 30%, transparent); }
.bis-head__emblem::after { inset: -10px; border: 1px solid color-mix(in srgb, var(--cls) 14%, transparent); }
.bis-head__emblem img {
	width: 76px; height: 76px; border-radius: 50%; border: 3px solid color-mix(in srgb, var(--cls) 75%, #000);
	box-shadow: 0 0 28px color-mix(in srgb, var(--cls) 45%, transparent), 0 0 0 6px rgba(0, 0, 0, .35);
}
.bis-head__emblem + .bis-head__links { margin-top: 0; }
.bis-head__title { display: flex; align-items: center; gap: 14px; }
.bis-head__icon { border-radius: 10px; border: 2px solid color-mix(in srgb, var(--cls) 70%, #000); box-shadow: 0 0 18px color-mix(in srgb, var(--cls) 35%, transparent); }
.bis-head__spec { font: 400 26px/1.1 var(--font-head); color: var(--cls); }
.bis-head__phase { margin-top: 4px; font-size: 13px; color: var(--muted); letter-spacing: .04em; }
.bis-head__cap { margin-bottom: 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.entry-content .bis-stats { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; counter-reset: st; }
.entry-content .bis-stats li { margin: 0; padding: 4px 10px; font-size: 13.5px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, .04); border: 1px solid var(--border); counter-increment: st; }
.bis-stats li::before { content: counter(st) ". "; color: var(--gold); font-weight: 700; }
.bis-stats li:not(:last-child)::after { content: " ›"; color: var(--muted); }
.entry-content .bis-summary { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.entry-content .bis-summary li { margin: 0; }
.bis-summary__btn {
	display: flex; align-items: center; gap: 10px; width: 100%; padding: 4px 8px 4px 4px; margin-left: -4px;
	font: 400 14px/1.3 var(--font-body); color: var(--text); text-align: left; cursor: pointer;
	background: transparent; border: 1px solid transparent; border-radius: var(--radius-sm); transition: background .2s, border-color .2s;
}
.bis-summary__btn::after { content: "показать"; margin-left: auto; font-size: 12px; color: var(--muted); opacity: 0; transition: opacity .2s; }
.bis-summary__btn:hover { background: rgba(255, 255, 255, .04); }
.bis-summary__btn:hover::after { opacity: 1; }
.bis-summary__btn[aria-pressed="true"] { background: color-mix(in srgb, var(--src) 12%, transparent); border-color: color-mix(in srgb, var(--src) 45%, transparent); }
.bis-summary__btn[aria-pressed="true"]::after { content: "сбросить ×"; opacity: 1; color: var(--src); }
.bis-summary__n {
	display: inline-grid; place-items: center; min-width: 28px; height: 24px; border-radius: 6px;
	font-weight: 700; color: var(--src); background: color-mix(in srgb, var(--src) 16%, transparent);
}
.bis-head__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.entry-content .bis-head__link {
	flex: 1 1 auto; text-align: center; padding: 9px 14px; border-radius: var(--radius-sm);
	font-size: 14px; font-weight: 600; text-decoration: none; color: var(--text);
	background: rgba(255, 255, 255, .05); border: 1px solid var(--border); transition: border-color .2s, color .2s;
}
.entry-content .bis-head__link:hover { border-color: var(--gold); color: var(--gold); }

/* Чары и расходники */
.entry-content .bis-extras { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.entry-content .bis-extras li { margin: 0; display: flex; align-items: center; gap: 10px; }
.bis-extras .bis-icon { border-width: 1px; border-radius: 6px; }
.bis-extras__text { min-width: 0; font-size: 13.5px; line-height: 1.25; }
.bis-extras__label { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* Переключатель фракции */
.bis-faction { display: flex; flex-wrap: wrap; gap: 6px; }
.bis-faction { padding: 4px; border-radius: 999px; background: rgba(0, 0, 0, .3); border: 1px solid var(--border); align-self: flex-start; }
.bis-faction__btn {
	cursor: pointer; padding: 6px 16px; border-radius: 999px; border: 1px solid transparent;
	font: 600 13.5px/1.2 var(--font-body); color: var(--muted); background: transparent; transition: color .2s, background .2s, border-color .2s;
}
.bis-faction__btn[data-faction="a"][aria-pressed="true"] { color: #fff; background: #2b5da8; }
.bis-faction__btn[data-faction="h"][aria-pressed="true"] { color: #fff; background: #a3302d; }
.bis.is-filtered .bis-slot.is-dim { opacity: .28; }

.bis-note { margin-top: 12px; font-size: 13px; color: var(--muted); }

/* Вид «окно персонажа» */
.bis-doll { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr) minmax(260px, .9fr) minmax(0, 1fr); grid-template-areas: "left head right" "bottom bottom bottom"; }
.bis-doll > .bis-head { grid-area: head; }
.bis-col { display: grid; gap: 10px; align-content: start; }
.bis-col--left { grid-area: left; }
.bis-col--right { grid-area: right; }
.bis-col--bottom { grid-area: bottom; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
/* Правая колонка — зеркально: иконка у края, как в игре */
.bis-col--right .bis-slot__label,
.bis-col--right .bis-slot__fill,
.bis-col--right .bis-item { text-align: right; }
.bis-col--right .bis-item { flex-direction: row-reverse; }
.bis-col--right .bis-alts summary { text-align: right; }
.bis-col--left .bis-slot { border-left: 3px solid color-mix(in srgb, var(--cls) 55%, var(--border)); }
.bis-col--right .bis-slot { border-right: 3px solid color-mix(in srgb, var(--cls) 55%, var(--border)); }

@media (max-width: 1099px) {
	.bis-head__emblem { display: none; }
	.bis-doll { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "head head" "left right" "bottom bottom"; }
	.bis-doll > .bis-head { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
	.bis-head__title, .bis-head__links { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
	.bis-doll { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "left" "right" "bottom"; }
	.bis-doll > .bis-head { display: flex; }
	.bis-col--right .bis-slot__label, .bis-col--right .bis-slot__fill, .bis-col--right .bis-item, .bis-col--right .bis-alts summary { text-align: left; }
	.bis-col--right .bis-item { flex-direction: row; }
	.bis-col--right .bis-slot { border-right-width: 1px; border-right-color: var(--border); border-left: 3px solid color-mix(in srgb, var(--cls) 55%, var(--border)); }
}

/* Хаб /bis/: [bis_hub] */
.bis-hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin: 1.5em 0 2em; }
.bis-hub__class { padding: 14px 16px 16px; background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--cc); border-radius: var(--radius); }
.entry-content .bis-hub__title { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font: 400 24px/1.1 var(--font-head); color: var(--cc); }
.entry-content .bis-hub__title img { border-radius: 50%; box-shadow: 0 0 0 2px var(--cc); }
.entry-content .bis-hub__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.entry-content .bis-hub__list li { margin: 0; }
.bis-hub__list a, .bis-hub__list .is-soon > span {
	display: flex; align-items: center; gap: 12px; padding: 7px 10px; border-radius: var(--radius-sm);
	border: 1px solid transparent; color: var(--text); text-decoration: none; transition: background .15s, border-color .15s;
}
.entry-content .bis-hub__list a { text-decoration: none; }
.bis-hub__list a:hover { background: rgba(255, 255, 255, .05); border-color: color-mix(in srgb, var(--cc) 50%, transparent); color: var(--text); }
.bis-hub__list img { flex-shrink: 0; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--cc) 60%, #000); }
.bis-hub__spec { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.bis-hub__name { font-weight: 600; font-size: 15px; }
.bis-hub__official { font-size: 12.5px; color: var(--muted); }
.bis-hub__list .is-soon > span { opacity: .55; }
.bis-hub__lvl { margin-left: auto; flex-shrink: 0; padding: 2px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: var(--gold); border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); background: color-mix(in srgb, var(--gold) 10%, transparent); }
.bis-hub__soon { margin-left: auto; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* Страница на всю ширину ради куклы — текст остаётся удобной ширины */
.entry--page .entry-content > :not(.bis):not(.bis-hub) { max-width: 820px; }

/* Пустая ячейка: подсказка вместо предмета */
.bis-slot--empty { padding: 9px 14px; background: transparent; border-style: dashed; }
.bis-slot--empty .bis-slot__label { margin-bottom: 3px; }
.bis-slot__fill { font-size: 13px; line-height: 1.35; color: var(--muted); }
.bis.is-filtered .bis-slot--empty { opacity: .28; }

/* Основные предметы внутри гайда: общий источник данных с полной подборкой. */
.entry-content .bis-table { display: table; width: 100%; min-width: 0; table-layout: fixed; margin: 0; font-size: 14px; }
.bis-table caption { text-align: left; padding: 0 0 10px; color: var(--muted); font-size: 13px; }
.entry-content .bis-table th, .entry-content .bis-table td { padding: 10px 12px; vertical-align: top; overflow-wrap: anywhere; }
.bis-table thead th:first-child { width: 19%; }
.bis-table thead th:nth-child(2) { width: 36%; }
.bis-table tbody th { color: var(--muted); font-weight: 500; text-align: left; }
.bis-table__item { display: flex; align-items: flex-start; gap: 9px; min-width: 0; }
.bis-table__item .bis-icon { border-width: 1px; border-radius: 5px; }
.bis-table__item .wh-link { line-height: 1.35; font-weight: 600; }
.bis-table__source { color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.bis-table__type { display: block; color: var(--text); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.bis-table__note { display: block; margin-top: 4px; font-style: italic; }
.entry-content .bis-table__more { margin: 16px 0 0; }
.bis-table__more .btn { white-space: normal; text-align: center; }
@media (max-width: 600px) {
	.entry-content .bis-table, .bis-table tbody { display: block; overflow: visible; }
	.bis-table caption { display: block; width: auto; }
	.bis-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
	.entry-content .bis-table tr { display: grid; grid-template-columns: minmax(0, 1fr); padding: 11px 12px; border-bottom: 1px solid var(--border); }
	.entry-content .bis-table tbody th, .entry-content .bis-table td { display: block; padding: 0; border: 0; width: auto; }
	.bis-table tbody th { margin-bottom: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
	.entry-content .bis-table__source { margin: 6px 0 0 37px; }
	.bis-table__type { display: inline; margin-right: 5px; }
}
